Skip to content

Commit

Permalink
mod-quiz MDL-19813 Added set_url calls, replaced deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
samhemelryk committed Sep 24, 2009
1 parent 87a6540 commit 663db34
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/addrandom.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
// Print basic page layout.
$strupdatemodule = '';
if (has_capability('moodle/course:manageactivities', $contexts->lowest())) {
$strupdatemodule = update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'));
$strupdatemodule = $OUTPUT->update_module_button($cm->id, 'quiz');
}
$PAGE->navbar->add($streditingquiz);
$PAGE->set_title($streditingquiz);
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/attemptlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public function review_url($attemptid) {
public function update_module_button() {
if (has_capability('moodle/course:manageactivities',
get_context_instance(CONTEXT_COURSE, $this->course->id))) {
return update_module_button($this->cm->id, $this->course->id, get_string('modulename', 'quiz'));
return $OUTPUT->update_module_button($cm->id, 'quiz');
} else {
return '';
}
Expand Down
3 changes: 1 addition & 2 deletions mod/quiz/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,7 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo
get_string('questionbankmanagement', 'quiz').'</a> ';
$strupdatemodule = has_capability('moodle/course:manageactivities',
$contexts->lowest()) ?
update_module_button($cm->id, $course->id,
get_string('modulename', 'quiz')) :
$OUTPUT->update_module_button($cm->id, 'quiz') :
"";

$PAGE->navbar->add($pagetitle);
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/report/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview") {
$strquiz = get_string("modulename", "quiz");
/// Print the page header
$PAGE->set_title(format_string($quiz->name));
$PAGE->set_button(update_module_button($cm->id, $course->id, $strquiz));
$PAGE->set_button($OUTPUT->update_module_button($cm->id, 'quiz'));
echo $OUTPUT->header();
/// Print the tabs
$currenttab = 'reports';
Expand Down

0 comments on commit 663db34

Please sign in to comment.