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:
@@ -208,6 +208,9 @@ abstract class qbehaviour_renderer extends plugin_renderer_base {
|
||||
* @return string HTML fragment.
|
||||
*/
|
||||
protected function submit_button(question_attempt $qa, question_display_options $options) {
|
||||
if (!$qa->get_state()->is_active()) {
|
||||
return '';
|
||||
}
|
||||
$attributes = array(
|
||||
'type' => 'submit',
|
||||
'id' => $qa->get_behaviour_field_name('submit'),
|
||||
|
||||
Reference in New Issue
Block a user