navigation MDL-20276 Fixed use of override_active_url.

This commit is contained in:
Sam Hemelryk 2010-08-06 05:49:47 +00:00
parent bf1873c60b
commit 73eba4be68
4 changed files with 4 additions and 5 deletions

View file

@ -55,7 +55,7 @@
} }
} else { } else {
$PAGE->settingsnav->override_active_url($attemptobj->start_attempt_url()); navigation_node::override_active_url($attemptobj->start_attempt_url());
} }
/// If the attempt is already closed, send them to the review page. /// If the attempt is already closed, send them to the review page.

View file

@ -163,7 +163,7 @@ class quiz_statistics_report extends quiz_default_report {
} }
if (!$this->table->is_downloading()) { if (!$this->table->is_downloading()) {
// Only print headers if not asked to download data // Only print headers if not asked to download data
$PAGE->navigation->override_active_url( navigation_node::override_active_url(
new moodle_url('/mod/quiz/report.php', array('id' => $cm->id, 'mode' => 'statistics'))); new moodle_url('/mod/quiz/report.php', array('id' => $cm->id, 'mode' => 'statistics')));
$PAGE->navbar->add($thisquestion->name); $PAGE->navbar->add($thisquestion->name);
$this->print_header_and_tabs($cm, $course, $quiz, 'statistics'); $this->print_header_and_tabs($cm, $course, $quiz, 'statistics');

View file

@ -77,8 +77,7 @@
if ($attemptobj->is_preview_user() && $attemptobj->is_own_attempt()) { if ($attemptobj->is_preview_user() && $attemptobj->is_own_attempt()) {
// Normal blocks // Normal blocks
$strreviewtitle = get_string('reviewofpreview', 'quiz'); $strreviewtitle = get_string('reviewofpreview', 'quiz');
navigation_node::override_active_url($attemptobj->start_attempt_url());
$PAGE->settingsnav->override_active_url($attemptobj->start_attempt_url());
} else { } else {
$strreviewtitle = get_string('reviewofattempt', 'quiz', $attemptobj->get_attempt_number()); $strreviewtitle = get_string('reviewofattempt', 'quiz', $attemptobj->get_attempt_number());

View file

@ -30,7 +30,7 @@ if ($attemptobj->is_finished()) {
} }
if ($attemptobj->is_preview_user()) { if ($attemptobj->is_preview_user()) {
$PAGE->settingsnav->override_active_url($attemptobj->start_attempt_url()); navigation_node::override_active_url($attemptobj->start_attempt_url());
} }
/// Check access. /// Check access.