mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-67335 qtype_calculatedmulti: Fix upgrade query.
This commit is contained in:
parent
79494ac32d
commit
1fdd34a08f
@ -38,10 +38,14 @@ function xmldb_qtype_calculatedmulti_upgrade($oldversion) {
|
||||
// From this version on, answer options may use HTML, so the answerformat does now have a
|
||||
// meaning. For backwards compatibility, all existing answer options for this question
|
||||
// type must have their answerformat set to FORMAT_PLAIN.
|
||||
$DB->execute("UPDATE {question_answers} AS answers, {question} AS questions
|
||||
SET answerformat = '" . FORMAT_PLAIN . "'
|
||||
WHERE answers.question = questions.id
|
||||
AND questions.qtype = 'calculatedmulti'");
|
||||
$DB->execute("UPDATE {question_answers}
|
||||
SET answerformat = '" . FORMAT_PLAIN . "'
|
||||
WHERE question IN (
|
||||
SELECT id
|
||||
FROM {question}
|
||||
WHERE qtype = 'calculatedmulti'
|
||||
)"
|
||||
);
|
||||
|
||||
// Calculatedmulti savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2024011700, 'qtype', 'calculatedmulti');
|
||||
|
Loading…
x
Reference in New Issue
Block a user