mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Let $PAGE print the header, as it should be, instead of doing it manually.
This commit is contained in:
parent
55815b288d
commit
8ff1d30259
1 changed files with 1 additions and 20 deletions
|
@ -68,26 +68,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$strquizzes = get_string("modulenameplural", "quiz");
|
||||
$strquiz = get_string("modulename", "quiz");
|
||||
$stredit = get_string('editquestions', 'quiz');
|
||||
if ($PAGE->user_allowed_editing()) {
|
||||
$buttons = "<table><tr><td><form target=\"$CFG->framename\" method=\"get\" action=\"edit.php\">".
|
||||
"<input type=\"hidden\" name=\"quizid\" value=\"$quiz->id\" />".
|
||||
"<input type=\"submit\" value=\"$stredit\" /></form></td><td>".
|
||||
update_module_button($cm->id, $course->id, $strquiz).
|
||||
'</td>'.
|
||||
'<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
'<input type="hidden" name="id" value="'.$cm->id.'" />'.
|
||||
'<input type="hidden" name="edit" value="'.($PAGE->user_is_editing()?'off':'on').'" />'.
|
||||
'<input type="submit" value="'.get_string($PAGE->user_is_editing()?'turneditingoff':'blocksaddedit').'" /></form></td></tr></table>';
|
||||
} else {
|
||||
$buttons = '';
|
||||
}
|
||||
|
||||
print_header_simple("$quiz->name", "",
|
||||
"<a href=\"index.php?id=$course->id\">$strquizzes</a> -> $quiz->name",
|
||||
"", "", true, $buttons, navmenu($course, $cm));
|
||||
$PAGE->print_header($course->shortname.': %fullname%');
|
||||
|
||||
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id=\"layout-table\">';
|
||||
echo '<tr valign="top">';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue