From: nicolasconnault Date: Thu, 6 Aug 2009 08:22:47 +0000 (+0000) Subject: MDL-19812 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=08ed955b35552e9d86cebd3febe45a23658a7003;p=moodle.git MDL-19812 --- diff --git a/mod/lesson/action/confirmdelete.php b/mod/lesson/action/confirmdelete.php index af580c0cde..3e1608c6b5 100644 --- a/mod/lesson/action/confirmdelete.php +++ b/mod/lesson/action/confirmdelete.php @@ -12,11 +12,11 @@ if (!$thispage = $DB->get_record("lesson_pages", array ("id" => $pageid))) { print_error('cannotfindpages', 'lesson'); } - print_heading(get_string("deletingpage", "lesson", format_string($thispage->title))); + echo $OUTPUT->heading(get_string("deletingpage", "lesson", format_string($thispage->title))); // print the jumps to this page $params = array("lessonid" => $lesson->id, "pageid" => $pageid); if ($answers = $DB->get_records_select("lesson_answers", "lessonid = :lessonid AND jumpto = :pageid + 1", $params)) { - print_heading(get_string("thefollowingpagesjumptothispage", "lesson")); + echo $OUTPUT->heading(get_string("thefollowingpagesjumptothispage", "lesson")); echo "

\n"; foreach ($answers as $answer) { if (!$title = $DB->get_field("lesson_pages", "title", array("id" => $answer->pageid))) { diff --git a/mod/lesson/action/move.php b/mod/lesson/action/move.php index 891571f41f..42304aed47 100644 --- a/mod/lesson/action/move.php +++ b/mod/lesson/action/move.php @@ -9,7 +9,7 @@ $pageid = required_param('pageid', PARAM_INT); $title = $DB->get_field("lesson_pages", "title", array("id" => $pageid)); - print_heading(get_string("moving", "lesson", format_string($title))); + echo $OUTPUT->heading(get_string("moving", "lesson", format_string($title))); $params = array ("lessonid" => $lesson->id, "prevpageid" => 0); if (!$page = $DB->get_record_select("lesson_pages", "lessonid = :lessonid AND prevpageid = :prevpageid", $params)) { diff --git a/mod/lesson/highscores.php b/mod/lesson/highscores.php index c955773b05..b097c60663 100644 --- a/mod/lesson/highscores.php +++ b/mod/lesson/highscores.php @@ -154,10 +154,10 @@ $grades = array(); } - print_heading(get_string("topscorestitle", "lesson", $lesson->maxhighscores), 'center', 4); + echo $OUTPUT->heading(get_string("topscorestitle", "lesson", $lesson->maxhighscores), 4, 'mdl-align'); if (!$highscores = $DB->get_records_select("lesson_high_scores", "lessonid = :lessonid", $params)) { - print_heading(get_string("nohighscores", "lesson"), 'center', 3); + echo $OUTPUT->heading(get_string("nohighscores", "lesson"), 3, 'mdl-align'); } else { foreach ($highscores as $highscore) { $grade = $grades[$highscore->gradeid]->grade; diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index bd3632225d..505d103225 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -228,7 +228,7 @@ if (!defined("LESSON_RESPONSE_EDITOR")) { * @param integer $lessonpageid if $extraeditbuttons is true then you must pass the page id here. **/ function lesson_print_header($cm, $course, $lesson, $currenttab = '', $extraeditbuttons = false, $lessonpageid = NULL) { - global $CFG, $PAGE; + global $CFG, $PAGE, $OUTPUT; $activityname = format_string($lesson->name, true, $course->id); @@ -270,7 +270,7 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '', $extraedit include($CFG->dirroot.'/mod/lesson/tabs.php'); } } else { - print_heading($activityname); + echo $OUTPUT->heading($activityname); } lesson_print_messages(); diff --git a/mod/lesson/report.php b/mod/lesson/report.php index c9fcd06b1f..6b22ddd762 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -315,7 +315,7 @@ } // output the stats - print_heading(get_string('lessonstats', 'lesson')); + echo $OUTPUT->heading(get_string('lessonstats', 'lesson')); $stattable = new stdClass; $stattable->head = array(get_string('averagescore', 'lesson'), get_string('averagetime', 'lesson'), get_string('highscore', 'lesson'), get_string('lowscore', 'lesson'), diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 659ecf3422..841277b7bd 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -511,7 +511,7 @@ lesson_print_header($cm, $course, $lesson, 'view', 'true', $page->id); if ($attemptflag) { - print_heading(get_string('attempt', 'lesson', $retries + 1)); + echo $OUTPUT->heading(get_string('attempt', 'lesson', $retries + 1)); } /// This calculates and prints the ongoing score @@ -530,7 +530,7 @@ // now starting to print the page's contents if ($page->qtype == LESSON_BRANCHTABLE) { - print_heading(format_string($page->title)); + echo $OUTPUT->heading(format_string($page->title)); } else { $lesson->slideshow = false; // turn off slide show for all pages other than LESSON_BRANTCHTABLE } @@ -846,7 +846,7 @@ lesson_add_pretend_blocks($PAGE, $cm, $lesson, $timer); lesson_print_header($cm, $course, $lesson, 'view'); - print_heading(get_string("congratulations", "lesson")); + echo $OUTPUT->heading(get_string("congratulations", "lesson")); print_box_start('generalbox boxaligncenter'); $ntries = $DB->count_records("lesson_grades", array("lessonid"=>$lesson->id, "userid"=>$USER->id)); if (isset($USER->modattempts[$lesson->id])) {