mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-40735_lesson' of https://github.com/andyjdavis/moodle
This commit is contained in:
commit
c0382dd012
@ -57,10 +57,10 @@ $mform->set_data($data);
|
||||
|
||||
$PAGE->navbar->add($strimportquestions);
|
||||
$PAGE->set_title($strimportquestions);
|
||||
$PAGE->set_heading($strimportquestions);
|
||||
$PAGE->set_heading(format_string($course->fullname));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
echo $OUTPUT->heading_with_help($strimportquestions, 'importquestions', 'lesson' );
|
||||
echo $OUTPUT->heading(format_string($lesson->name), 2);
|
||||
echo $OUTPUT->heading_with_help($strimportquestions, 'importquestions', 'lesson', '', '', 3);
|
||||
|
||||
if ($data = $mform->get_data()) {
|
||||
|
||||
|
@ -53,6 +53,7 @@ $PAGE->navbar->add($strlessons);
|
||||
$PAGE->set_title("$course->shortname: $strlessons");
|
||||
$PAGE->set_heading($course->fullname);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strlessons, 2);
|
||||
|
||||
/// Get all the appropriate data
|
||||
|
||||
@ -116,4 +117,4 @@ foreach ($lessons as $lesson) {
|
||||
}
|
||||
}
|
||||
echo html_writer::table($table);
|
||||
echo $OUTPUT->footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -81,24 +81,31 @@ switch ($action) {
|
||||
$title = $DB->get_field("lesson_pages", "title", array("id" => $pageid));
|
||||
|
||||
echo $lessonoutput->header($lesson, $cm, '', false, null, get_string('moving', 'lesson', format_String($title)));
|
||||
echo $OUTPUT->heading(get_string("moving", "lesson", format_string($title)));
|
||||
echo $OUTPUT->heading(get_string("moving", "lesson", format_string($title)), 3);
|
||||
|
||||
$params = array ("lessonid" => $lesson->id, "prevpageid" => 0);
|
||||
if (!$page = $DB->get_record_select("lesson_pages", "lessonid = :lessonid AND prevpageid = :prevpageid", $params)) {
|
||||
print_error('cannotfindfirstpage', 'lesson');
|
||||
}
|
||||
|
||||
echo "<center><table cellpadding=\"5\" border=\"1\">\n";
|
||||
echo "<tr><td><a href=\"lesson.php?id=$cm->id&sesskey=".sesskey()."&action=moveit&pageid=$pageid&after=0\"><small>".
|
||||
get_string("movepagehere", "lesson")."</small></a></td></tr>\n";
|
||||
echo html_writer::start_tag('div', array('class' => 'move-page'));
|
||||
|
||||
echo html_writer::start_tag('div', array('class' => 'available-position'));
|
||||
$moveurl = "lesson.php?id=$cm->id&sesskey=".sesskey()."&action=moveit&pageid=$pageid&after=0";
|
||||
echo html_writer::link($moveurl, get_string("movepagehere", "lesson"));
|
||||
echo html_writer::end_tag('div');
|
||||
|
||||
while (true) {
|
||||
if ($page->id != $pageid) {
|
||||
if (!$title = trim(format_string($page->title))) {
|
||||
$title = "<< ".get_string("notitle", "lesson")." >>";
|
||||
}
|
||||
echo "<tr><td><b>$title</b></td></tr>\n";
|
||||
echo "<tr><td><a href=\"lesson.php?id=$cm->id&sesskey=".sesskey()."&action=moveit&pageid=$pageid&after={$page->id}\"><small>".
|
||||
get_string("movepagehere", "lesson")."</small></a></td></tr>\n";
|
||||
echo html_writer::tag('div', $title, array('class' => 'page'));
|
||||
|
||||
echo html_writer::start_tag('div', array('class' => 'available-position'));
|
||||
$moveurl = "lesson.php?id=$cm->id&sesskey=".sesskey()."&action=moveit&pageid=$pageid&after={$page->id}";
|
||||
echo html_writer::link($moveurl, get_string("movepagehere", "lesson"));
|
||||
echo html_writer::end_tag('div');
|
||||
}
|
||||
if ($page->nextpageid) {
|
||||
if (!$page = $DB->get_record("lesson_pages", array("id" => $page->nextpageid))) {
|
||||
@ -109,7 +116,7 @@ switch ($action) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo html_writer::end_tag('div');
|
||||
|
||||
break;
|
||||
case 'delete':
|
||||
|
@ -357,7 +357,7 @@ if ($action === 'delete') {
|
||||
}
|
||||
|
||||
// output the stats
|
||||
echo $OUTPUT->heading(get_string('lessonstats', 'lesson'));
|
||||
echo $OUTPUT->heading(get_string('lessonstats', 'lesson'), 3);
|
||||
$stattable = new html_table();
|
||||
$stattable->head = array(get_string('averagescore', 'lesson'), get_string('averagetime', 'lesson'),
|
||||
get_string('highscore', 'lesson'), get_string('lowscore', 'lesson'),
|
||||
@ -509,7 +509,7 @@ if ($action === 'delete') {
|
||||
//$headingobject->firstname = $students[$userid]->firstname;
|
||||
//$headingobject->attempt = $try + 1;
|
||||
//print_heading(get_string("studentattemptlesson", "lesson", $headingobject));
|
||||
echo $OUTPUT->heading(get_string('attempt', 'lesson', $try+1));
|
||||
echo $OUTPUT->heading(get_string('attempt', 'lesson', $try+1), 3);
|
||||
|
||||
$table->head = array();
|
||||
$table->align = array('right', 'left');
|
||||
|
Loading…
x
Reference in New Issue
Block a user