mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 14:15:11 +02:00
MDL-38359: assign - fix some issues with releasing grades
This commit is contained in:
parent
b6d1b761a4
commit
24835a1292
@ -4694,7 +4694,6 @@ class assign {
|
||||
}
|
||||
}
|
||||
|
||||
$this->update_grade($grade);
|
||||
if ($flags->workflowstate != $modified->workflowstate ||
|
||||
$flags->allocatedmarker != $modified->allocatedmarker) {
|
||||
|
||||
@ -4702,6 +4701,7 @@ class assign {
|
||||
$flags->allocatedmarker = $modified->allocatedmarker;
|
||||
$this->update_user_flags($flags);
|
||||
}
|
||||
$this->update_grade($grade);
|
||||
$this->notify_grade_modified($grade);
|
||||
|
||||
// Save outcomes.
|
||||
@ -5613,6 +5613,12 @@ class assign {
|
||||
|
||||
// Will not apply update if user does not have permission to assign this workflow state.
|
||||
if (!$gradingdisabled && $this->update_user_flags($flags)) {
|
||||
if ($state == ASSIGN_MARKING_WORKFLOW_STATE_RELEASED) {
|
||||
// Update Gradebook.
|
||||
$assign = clone $this->get_instance();
|
||||
$assign->cmidnumber = $this->get_course_module()->idnumber;
|
||||
assign_update_grades($assign, $userid);
|
||||
}
|
||||
|
||||
$user = $DB->get_record('user', array('id' => $userid), '*', MUST_EXIST);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user