MDL-3054 quiz : cleaned whitespaces.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user