Permalink
Browse files

Merge branch 'MDL-61045_34' of git://github.com/timhunt/moodle into M…

…OODLE_34_STABLE
  • Loading branch information...
dmonllao committed Dec 19, 2017
2 parents b844baf + 3093cc2 commit fb8b9479639d1a499ef14b620fd5dbf32ff61628
Showing with 24 additions and 0 deletions.
  1. +3 −0 mod/quiz/mod_form.php
  2. +21 −0 mod/quiz/tests/behat/settings_form_fields_disableif.feature
@@ -242,6 +242,9 @@ protected function definition() {
'neq', 'wontmatch');
$mform->disabledIf('overallfeedbackduring', 'preferredbehaviour',
'neq', 'wontmatch');
foreach (self::$reviewfields as $field => $notused) {
$mform->disabledIf($field . 'closed', 'timeclose[enabled]');
}
// -------------------------------------------------------------------------------
$mform->addElement('header', 'display', get_string('appearance'));
@@ -95,3 +95,24 @@ Feature: Settings form fields disabled if not required
And the "Each attempt builds on the last" "field" should be enabled
And the "id_delay1_enabled" "field" should be enabled
And the "id_delay2_enabled" "field" should be enabled
@javascript
Scenario: Depending on whether there is a close date, some review options are disabled.
When I add a "Quiz" to section "1"
And I expand all fieldsets
And I set the field "Name" to "Test quiz"
Then the "id_attemptclosed" "checkbox" should be disabled
Then the "id_correctnessclosed" "checkbox" should be disabled
Then the "id_marksclosed" "checkbox" should be disabled
Then the "id_specificfeedbackclosed" "checkbox" should be disabled
Then the "id_generalfeedbackclosed" "checkbox" should be disabled
Then the "id_rightanswerclosed" "checkbox" should be disabled
Then the "id_overallfeedbackclosed" "checkbox" should be disabled
And I set the field "id_timeclose_enabled" to "1"
Then the "id_attemptclosed" "checkbox" should be enabled
Then the "id_correctnessclosed" "checkbox" should be enabled
Then the "id_marksclosed" "checkbox" should be enabled
Then the "id_specificfeedbackclosed" "checkbox" should be enabled
Then the "id_generalfeedbackclosed" "checkbox" should be enabled
Then the "id_rightanswerclosed" "checkbox" should be enabled
Then the "id_overallfeedbackclosed" "checkbox" should be enabled

0 comments on commit fb8b947

Please sign in to comment.