Merge branch 'MDL-83550-main' of https://github.com/andrewgos/moodle

This commit is contained in:
Sara Arjona 2025-04-14 17:54:16 +02:00
commit cecf53b937
No known key found for this signature in database

View File

@ -115,6 +115,16 @@ class gradingform_rubric_renderer extends plugin_renderer_base {
$descriptiontdparams['aria-label'] = get_string('criterion', 'gradingform_rubric', s($criterion['description']));
}
// Default value for criterion ids.
// Edge case: submitting empty grade when remark field is disabled.
// Reason: we need the criteria keys for the clear_attempt to clear the rubric fillings.
if ($mode == gradingform_rubric_controller::DISPLAY_EVAL) {
$criteriontemplate .= html_writer::empty_tag('input', [
'type' => 'hidden',
'name' => '{NAME}[criteria][{CRITERION-id}][]',
]);
}
// Description cell.
$criteriontemplate .= html_writer::tag('td', $description, $descriptiontdparams);