Skip to content

Commit

Permalink
MDL-19812
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 6, 2009
1 parent 8d84939 commit 08ed955
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions mod/lesson/action/confirmdelete.php
Expand Up @@ -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 "<p align=\"center\">\n";
foreach ($answers as $answer) {
if (!$title = $DB->get_field("lesson_pages", "title", array("id" => $answer->pageid))) {
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/action/move.php
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions mod/lesson/highscores.php
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions mod/lesson/locallib.php
Expand Up @@ -228,7 +228,7 @@
* @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);

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/report.php
Expand Up @@ -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'),
Expand Down
6 changes: 3 additions & 3 deletions mod/lesson/view.php
Expand Up @@ -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
Expand All @@ -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
}
Expand Down Expand Up @@ -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])) {
Expand Down

0 comments on commit 08ed955

Please sign in to comment.