MDL-19812
This commit is contained in:
@@ -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))) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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'),
|
||||
|
||||
+3
-3
@@ -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])) {
|
||||
|
||||
Reference in New Issue
Block a user