Permalink
Browse files

MDL-20636 updates to code

  • Loading branch information...
1 parent cbe8754 commit 8d47043feee834b2bf6a7496d0a82c3e6a4a1e1c Dean Lennard committed with timhunt May 4, 2011
Showing with 17 additions and 8 deletions.
  1. +1 −1 mod/quiz/attempt.php
  2. +3 −1 mod/quiz/renderer.php
  3. +13 −6 mod/quiz/view.php
@@ -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);
@@ -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'));
}
/*
View
@@ -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;

0 comments on commit 8d47043

Please sign in to comment.