Skip to content

Commit

Permalink
MDL-49075 mod_assign: Keep unreleased assign grades out of gradebook
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyjbutler committed Feb 26, 2015
1 parent dba564c commit 251d85c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions mod/assign/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -7087,16 +7087,19 @@ public function get_user_grades_for_gradebook($userid) {
$where, $params);

foreach ($graderesults as $result) {
$gradebookgrade = clone $result;
// Now get the feedback.
if ($gradebookplugin) {
$grade = $this->get_user_grade($result->userid, false);
if ($grade) {
$gradebookgrade->feedback = $gradebookplugin->text_for_gradebook($grade);
$gradebookgrade->feedbackformat = $gradebookplugin->format_for_gradebook($grade);
$gradingstatus = $this->get_grading_status($result->userid);
if (!$this->get_instance()->markingworkflow || $gradingstatus == ASSIGN_MARKING_WORKFLOW_STATE_RELEASED) {
$gradebookgrade = clone $result;
// Now get the feedback.
if ($gradebookplugin) {
$grade = $this->get_user_grade($result->userid, false);
if ($grade) {
$gradebookgrade->feedback = $gradebookplugin->text_for_gradebook($grade);
$gradebookgrade->feedbackformat = $gradebookplugin->format_for_gradebook($grade);
}
}
$grades[$gradebookgrade->userid] = $gradebookgrade;
}
$grades[$gradebookgrade->userid] = $gradebookgrade;
}

$graderesults->close();
Expand Down

0 comments on commit 251d85c

Please sign in to comment.