diff --git a/mod/assign/lang/en/assign.php b/mod/assign/lang/en/assign.php index e5033dc1066..01888a344e8 100644 --- a/mod/assign/lang/en/assign.php +++ b/mod/assign/lang/en/assign.php @@ -131,6 +131,7 @@ $string['couldnotcreatecoursemodule'] = 'Could not create course module.'; $string['couldnotcreatenewassignmentinstance'] = 'Could not create new assignment instance.'; $string['couldnotfindassignmenttoupgrade'] = 'Could not find old assignment instance to upgrade.'; $string['crontask'] = 'Background processing for assignment module'; +$string['currentassigngrade'] = 'Current grade in assignment'; $string['currentgrade'] = 'Current grade in gradebook'; $string['currentattempt'] = 'This is attempt {$a}.'; $string['currentattemptof'] = 'This is attempt {$a->attemptnumber} ( {$a->maxattempts} attempts allowed ).'; diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index bef787c7c01..bb0843defa9 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -7586,6 +7586,14 @@ class assign { $options = array('' => get_string('markingworkflowstatenotmarked', 'assign')) + $states; $mform->addElement('select', 'workflowstate', get_string('markingworkflowstate', 'assign'), $options); $mform->addHelpButton('workflowstate', 'markingworkflowstate', 'assign'); + $gradingstatus = $this->get_grading_status($userid); + if ($gradingstatus != ASSIGN_MARKING_WORKFLOW_STATE_RELEASED) { + if ($grade->grade && $grade->grade != -1) { + $assigngradestring = html_writer::span(grade_floatval($grade->grade), 'currentgrade'); + $label = get_string('currentassigngrade', 'assign'); + $mform->addElement('static', 'currentassigngrade', $label, $assigngradestring); + } + } } if ($this->get_instance()->markingworkflow && @@ -7607,6 +7615,7 @@ class assign { $mform->disabledIf('allocatedmarker', 'workflowstate', 'eq', ASSIGN_MARKING_WORKFLOW_STATE_READYFORRELEASE); $mform->disabledIf('allocatedmarker', 'workflowstate', 'eq', ASSIGN_MARKING_WORKFLOW_STATE_RELEASED); } + $gradestring = '' . $gradestring . ''; $mform->addElement('static', 'currentgrade', get_string('currentgrade', 'assign'), $gradestring);