Browse files

MDL-3054 quiz : cleaned whitespaces.

  • Loading branch information...
1 parent 8e9e623 commit c5fd16826abdcfd287664082d5bb8abd6bc85d3d @nebgor nebgor committed Jan 16, 2012
Showing with 7 additions and 7 deletions.
  1. +1 −1 mod/quiz/attempt.php
  2. +1 −1 mod/quiz/attemptlib.php
  3. +3 −3 mod/quiz/db/upgrade.php
  4. +2 −2 mod/quiz/startattempt.php
View
2 mod/quiz/attempt.php
@@ -96,7 +96,7 @@
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'noquestionsfound');
}
-// Update attempt page
+// Update attempt page
if ($attemptobj->get_currentpage() != $page) {
$DB->set_field('quiz_attempts', 'currentpage', $page);
}
View
2 mod/quiz/attemptlib.php
@@ -601,7 +601,7 @@ public function get_attempt_number() {
public function get_userid() {
return $this->attempt->userid;
}
-
+
/** @return int the current page of the attempt. */
public function get_currentpage() {
return $this->attempt->currentpage;
View
6 mod/quiz/db/upgrade.php
@@ -69,13 +69,13 @@ function xmldb_quiz_upgrade($oldversion) {
// quiz savepoint reached
upgrade_mod_savepoint(true, 2011120701, 'quiz');
}
-
+
if ($oldversion < 2011120703) {
// Track page of quiz attempts
$table = new xmldb_table('quiz_attempts');
-
+
$field = new xmldb_field('currentpage', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0);
-
+
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
View
4 mod/quiz/startattempt.php
@@ -82,7 +82,7 @@
if ($lastattempt && !$lastattempt->timefinish) {
$currentattemptid = $lastattempt->id;
$messages = $accessmanager->prevent_access();
-
+
if ($page == -1) {
$page = $lastattempt->currentpage;
}
@@ -101,7 +101,7 @@
$accessmanager->prevent_new_attempt(count($attempts), $lastattempt);
if ($page == -1) {
- $page = 0;
+ $page = 0;
}
}

0 comments on commit c5fd168

Please sign in to comment.