Skip to content

Commit

Permalink
Merge branch 'MDL-83127-404' of https://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_404_STABLE
  • Loading branch information
junpataleta committed Sep 16, 2024
2 parents 8069aee + 37f5141 commit 54b01d1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions question/type/ordering/classes/question_hint_ordering.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ public static function load_from_record($row): question_hint_ordering {
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);
}

Expand Down

0 comments on commit 54b01d1

Please sign in to comment.