mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-74812 gradingform_rubric: Add radiogroup role properly
Do not add the radiogroup role to the rubric criterion when the rubric table is being displayed on edit or preview modes.
This commit is contained in:
parent
cf77cd6665
commit
767a1e74be
@ -120,7 +120,14 @@ class gradingform_rubric_renderer extends plugin_renderer_base {
|
||||
|
||||
// Levels table.
|
||||
$levelsrowparams = array('id' => '{NAME}-criteria-{CRITERION-id}-levels');
|
||||
if ($mode != gradingform_rubric_controller::DISPLAY_EDIT_FULL) {
|
||||
// Add radiogroup role only when not previewing or editing.
|
||||
$isradiogroup = !in_array($mode, [
|
||||
gradingform_rubric_controller::DISPLAY_EDIT_FULL,
|
||||
gradingform_rubric_controller::DISPLAY_EDIT_FROZEN,
|
||||
gradingform_rubric_controller::DISPLAY_PREVIEW,
|
||||
gradingform_rubric_controller::DISPLAY_PREVIEW_GRADED,
|
||||
]);
|
||||
if ($isradiogroup) {
|
||||
$levelsrowparams['role'] = 'radiogroup';
|
||||
}
|
||||
$levelsrow = html_writer::tag('tr', $levelsstr, $levelsrowparams);
|
||||
|
Loading…
x
Reference in New Issue
Block a user