MDL-53304 question behaviour: don't show useless Check buttons

Previously, the Check button was often shown disabled when it
could not be used (e.g. when the question was finished, or when an
interactive question was in the try-again state). Eventually we
realised it was better usability to hide it in these cases.

Note that when a teacher reviews an in-progress quiz attempt, they will
see a disabled Check button if the student doing the quiz can see the
button.
This commit is contained in:
Tim Hunt
2016-03-04 14:06:19 +00:00
parent 7adc7ef14f
commit 81e47a35e8
19 changed files with 92 additions and 60 deletions
@@ -87,7 +87,7 @@ class qbehaviour_interactivecountback_walkthrough_test extends qbehaviour_walkth
$this->get_contains_select_expectation('sub1', $choices, $orderforchoice[1], false),
$this->get_contains_select_expectation('sub2', $choices, $orderforchoice[1], false),
$this->get_contains_select_expectation('sub3', $choices, $orderforchoice[1], false),
$this->get_contains_submit_button_expectation(false),
$this->get_does_not_contain_submit_button_expectation(),
$this->get_contains_try_again_button_expectation(true),
$this->get_does_not_contain_correctness_expectation(),
new question_pattern_expectation('/Tries remaining: 2/'),
@@ -139,7 +139,7 @@ class qbehaviour_interactivecountback_walkthrough_test extends qbehaviour_walkth
$this->get_contains_select_expectation('sub1', $choices, $orderforchoice[2], false),
$this->get_contains_select_expectation('sub2', $choices, $orderforchoice[2], false),
$this->get_contains_select_expectation('sub3', $choices, $orderforchoice[1], false),
$this->get_contains_submit_button_expectation(false),
$this->get_does_not_contain_submit_button_expectation(),
$this->get_does_not_contain_try_again_button_expectation(),
$this->get_contains_correct_expectation(),
$this->get_contains_standard_correct_combined_feedback_expectation(),