Merge branch 'MDL-55821-master' of git://github.com/damyon/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2019-06-19 18:05:10 +02:00
commit b3bbf6adf8
2 changed files with 10 additions and 0 deletions

View File

@ -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 ).';

View File

@ -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 = '<span class="currentgrade">' . $gradestring . '</span>';
$mform->addElement('static', 'currentgrade', get_string('currentgrade', 'assign'), $gradestring);