Merge branch 'mdl-7133-401' of https://github.com/juancs/moodle into MOODLE_401_STABLE

This commit is contained in:
Ilya Tregubov 2023-07-13 10:31:28 +08:00
commit e0dc36f27e
No known key found for this signature in database
GPG Key ID: 0F58186F748E55C1

View File

@ -7968,9 +7968,12 @@ class assign {
$gradingstatus = $this->get_grading_status($userid);
if ($gradingstatus != ASSIGN_MARKING_WORKFLOW_STATE_RELEASED) {
if ($grade->grade && $grade->grade != -1) {
$assigngradestring = html_writer::span(
make_grades_menu($settings->grade)[grade_floatval($grade->grade)], 'currentgrade'
);
if ($settings->grade > 0) {
$assigngradestring = format_float($grade->grade, $this->get_grade_item()->get_decimals());
} else {
$assigngradestring = make_grades_menu($settings->grade)[grade_floatval($grade->grade)];
}
$assigngradestring = html_writer::span($assigngradestring, 'currentgrade');
$label = get_string('currentassigngrade', 'assign');
$mform->addElement('static', 'currentassigngrade', $label, $assigngradestring);
}