Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20d8912
)
MDL-24140 Each attempt builds on last setting was being ingored in one place.
author
Tim Hunt
<T.J.Hunt@open.ac.uk>
Tue, 2 Nov 2010 19:12:21 +0000
(19:12 +0000)
committer
Tim Hunt
<T.J.Hunt@open.ac.uk>
Tue, 2 Nov 2010 19:12:21 +0000
(19:12 +0000)
The code was behaving as if it was always true.
mod/quiz/startattempt.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/quiz/startattempt.php
b/mod/quiz/startattempt.php
index
c6f54c7
..
145ed5f
100644
(file)
--- a/
mod/quiz/startattempt.php
+++ b/
mod/quiz/startattempt.php
@@
-114,6
+114,9
@@
$quizobj->preload_questions();
$quizobj->load_questions();
/// Create initial states for all questions in this quiz.
+if (!$quiz->attemptonlast) {
+ $lastattemptid = false;
+}
if (!$states = get_question_states($quizobj->get_questions(), $quizobj->get_quiz(), $attempt, $lastattemptid)) {
print_error('cannotrestore', 'quiz');
}