Skip to content

Commit

Permalink
Merge branch 'MDL-53778_37' of https://github.com/anieminen/moodle in…
Browse files Browse the repository at this point in the history
…to MOODLE_37_STABLE
  • Loading branch information
stronk7 committed Jun 26, 2019
2 parents 798dc31 + d80d0b4 commit 0a77242
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 8 additions & 0 deletions mod/quiz/lib.php
Expand Up @@ -1128,6 +1128,14 @@ function quiz_process_options($quiz) {
$quiz->reviewoverallfeedback = quiz_review_option_form_to_db($quiz, 'overallfeedback');
$quiz->reviewattempt |= mod_quiz_display_options::DURING;
$quiz->reviewoverallfeedback &= ~mod_quiz_display_options::DURING;

// Ensure that disabled checkboxes in completion settings are set to 0.
if (empty($quiz->completionusegrade)) {
$quiz->completionpass = 0;
}
if (empty($quiz->completionpass)) {
$quiz->completionattemptsexhausted = 0;
}
}

/**
Expand Down
5 changes: 0 additions & 5 deletions mod/quiz/mod_form.php
Expand Up @@ -517,11 +517,6 @@ public function data_preprocessing(&$toform) {
$toform[$name] = $value;
}
}

// Completion settings check.
if (empty($toform['completionusegrade'])) {
$toform['completionpass'] = 0; // Forced unchecked.
}
}

public function validation($data, $files) {
Expand Down

0 comments on commit 0a77242

Please sign in to comment.