Skip to content

Commit

Permalink
Merge branch 'MDL-70049-310_count_submissions' of https://github.com/…
Browse files Browse the repository at this point in the history
…agrowe/moodle into MOODLE_310_STABLE
  • Loading branch information
stronk7 committed May 6, 2021
2 parents 0656fb0 + 1611b30 commit 1b22f24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/assign/lib.php
Expand Up @@ -1552,8 +1552,8 @@ function mod_assign_core_calendar_provide_event_action(calendar_event $event,
'id' => $cm->id,
'action' => 'grader'
]);
$itemcount = $assign->count_submissions_need_grading();
$actionable = $assign->can_grade($userid) && (time() >= $assign->get_instance()->allowsubmissionsfromdate);
$itemcount = $actionable ? $assign->count_submissions_need_grading() : 0;
} else {
$usersubmission = $assign->get_user_submission($userid, false);
if ($usersubmission && $usersubmission->status === ASSIGN_SUBMISSION_STATUS_SUBMITTED) {
Expand Down

0 comments on commit 1b22f24

Please sign in to comment.