1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-23 09:23:09 +02:00

Merge branch 'MDL-83127-main' of https://github.com/lucaboesch/moodle

This commit is contained in:
Jun Pataleta 2024-09-16 15:58:57 +08:00
commit 2ea8adc589
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7

@ -54,9 +54,16 @@ class question_hint_ordering extends question_hint_with_parts {
global $DB;
// Initialize with the old questions.
if (is_null($row->options) || is_null($row->shownumcorrect)) {
$row->options = 1;
$row->shownumcorrect = 1;
if (is_null($row->options) || is_null($row->shownumcorrect) || is_null($row->clearwrong)) {
if (is_null($row->options)) {
$row->options = 1;
}
if (is_null($row->shownumcorrect)) {
$row->shownumcorrect = 1;
}
if (is_null($row->clearwrong)) {
$row->clearwrong = 1;
}
$DB->update_record('question_hints', $row);
}