MDL-3054 quiz : cleaned whitespaces.

This commit is contained in:
Aparup Banerjee
2012-01-16 13:41:12 +08:00
parent 8e9e623e79
commit c5fd16826a
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ if (empty($slots)) {
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);
}
+1 -1
View File
@@ -601,7 +601,7 @@ class quiz_attempt {
public function get_userid() {
return $this->attempt->userid;
}
/** @return int the current page of the attempt. */
public function get_currentpage() {
return $this->attempt->currentpage;
+3 -3
View File
@@ -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);
}
+2 -2
View File
@@ -82,7 +82,7 @@ $lastattempt = end($attempts);
if ($lastattempt && !$lastattempt->timefinish) {
$currentattemptid = $lastattempt->id;
$messages = $accessmanager->prevent_access();
if ($page == -1) {
$page = $lastattempt->currentpage;
}
@@ -101,7 +101,7 @@ if ($lastattempt && !$lastattempt->timefinish) {
$accessmanager->prevent_new_attempt(count($attempts), $lastattempt);
if ($page == -1) {
$page = 0;
$page = 0;
}
}