Skip to content
Permalink
Browse files

MDL-40735 mod_lesson: fixed up a header and stripped out hardcoded fo…

…rmatting
  • Loading branch information...
andyjdavis committed Aug 27, 2013
1 parent 4387152 commit 974beea10ae68871e356d436fdc4738b5fd4a86e
Showing with 22 additions and 14 deletions.
  1. +3 −3 mod/lesson/import.php
  2. +2 −1 mod/lesson/index.php
  3. +15 −8 mod/lesson/lesson.php
  4. +2 −2 mod/lesson/report.php
@@ -57,10 +57,10 @@
$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->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 @@
}
}
echo html_writer::table($table);
echo $OUTPUT->footer();
echo $OUTPUT->footer();
@@ -81,24 +81,31 @@
$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&amp;sesskey=".sesskey()."&amp;action=moveit&amp;pageid=$pageid&amp;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&amp;sesskey=".sesskey()."&amp;action=moveit&amp;pageid=$pageid&amp;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 @@
break;
}
}
echo "</table>\n";
echo html_writer::end_tag('div');
break;
case 'delete':
@@ -357,7 +357,7 @@
}
// 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 @@
//$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');

0 comments on commit 974beea

Please sign in to comment.
You can’t perform that action at this time.