Skip to content

Commit

Permalink
MDL-20636 updates to code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Lennard authored and timhunt committed May 9, 2011
1 parent cbe8754 commit 8d47043
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/attempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
$PAGE->requires->js_init_call('M.mod_quiz.init_attempt_form', null, false, quiz_get_js_module());

// Arrange for the navigation to be displayed.
$navbc = $attemptobj->get_navigation_panel('quiz_attempt_nav_panel', $page);
$navbc = $attemptobj->get_navigation_panel($output, 'quiz_attempt_nav_panel', $page);
$firstregion = reset($PAGE->blocks->get_regions());
$PAGE->blocks->add_fake_block($navbc, $firstregion);

Expand Down
4 changes: 3 additions & 1 deletion mod/quiz/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ private function summary_page_controls($attemptobj) {
}

private function summary_get_timer($attemptobj) {
return $attemptobj->get_timer_html();
return html_writer::tag('div', get_string('timeleft', 'quiz') .
html_writer::tag('span', '', array('id' => 'quiz-time-left')),
array('id' => 'quiz-timer'));
}

/*
Expand Down
19 changes: 13 additions & 6 deletions mod/quiz/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,26 @@
$viewobj->canattempt = $canattempt;
$viewobj->canpreview = $canpreview;
$viewobj->canreviewmine = $canreviewmine;
$viewobj->attemptcolumn = $attemptcolumn;
$viewobj->markcolumn = $markcolumn;
$viewobj->gradecolumn = $gradecolumn;
$viewobj->feedbackcolumn = $feedbackcolumn;
if ($attempts) {
$viewobj->attemptcolumn = $attemptcolumn;
$viewobj->gradecolumn = $gradecolumn;
$viewobj->markcolumn = $markcolumn;
$viewobj->feedbackcolumn = $feedbackcolumn;
$viewobj->overallstats = $overallstats;
} else {
$viewobj->attemptcolumn = 1;
//$viewobj->gradecolumn = 1;
//$viewobj->markcolumn = 1;
//$viewobj->feedbackcolumn = 1;
//$viewobj->overallstats = 1;
}
$viewobj->timenow = $timenow;
$viewobj->overallstats = $overallstats;
$viewobj->numattempts = $numattempts;
$viewobj->mygrade = $mygrade;
$viewobj->moreattempts = $moreattempts;
$viewobj->numattempts = $numattempts;
$viewobj->mygradeoverridden = $mygradeoverridden;
$viewobj->gradebookfeedback = $gradebookfeedback;
$viewobj->feedbackcolumn = $feedbackcolumn;
$viewobj->unfinished = $unfinished;
$viewobj->lastfinishedattempt = $lastfinishedattempt;

Expand Down

0 comments on commit 8d47043

Please sign in to comment.