mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
More on Bug 427_ on second thoughts it's better this way, now at least
the true/false entries get updated every time the question is updated.
This commit is contained in:
parent
a6ccb416f1
commit
4d01ada343
@ -1618,7 +1618,7 @@ function quiz_save_question_options($question) {
|
||||
}
|
||||
|
||||
if ($true = array_shift($oldanswers)) { // Existing answer, so reuse it
|
||||
$true->answer = ""; // We will display this in the user's language later
|
||||
$true->answer = get_string("true", "quiz");
|
||||
$true->fraction = $question->answer;
|
||||
$true->feedback = $question->feedbacktrue;
|
||||
if (!update_record("quiz_answers", $true)) {
|
||||
@ -1627,7 +1627,7 @@ function quiz_save_question_options($question) {
|
||||
}
|
||||
} else {
|
||||
unset($true);
|
||||
$true->answer = ""; // We will display this in the user's language later
|
||||
$true->answer = get_string("true", "quiz");
|
||||
$true->question = $question->id;
|
||||
$true->fraction = $question->answer;
|
||||
$true->feedback = $question->feedbacktrue;
|
||||
@ -1638,7 +1638,7 @@ function quiz_save_question_options($question) {
|
||||
}
|
||||
|
||||
if ($false = array_shift($oldanswers)) { // Existing answer, so reuse it
|
||||
$false->answer = ""; // We will display this in the user's language later
|
||||
$false->answer = get_string("false", "quiz");
|
||||
$false->fraction = 1 - (int)$question->answer;
|
||||
$false->feedback = $question->feedbackfalse;
|
||||
if (!update_record("quiz_answers", $false)) {
|
||||
@ -1647,7 +1647,7 @@ function quiz_save_question_options($question) {
|
||||
}
|
||||
} else {
|
||||
unset($false);
|
||||
$false->answer = ""; // We will display this in the user's language later
|
||||
$false->answer = get_string("false", "quiz");
|
||||
$false->question = $question->id;
|
||||
$false->fraction = 1 - (int)$question->answer;
|
||||
$false->feedback = $question->feedbackfalse;
|
||||
|
Loading…
x
Reference in New Issue
Block a user