Skip to content

Commit

Permalink
SAK-49907 Assignments non-electronic show feedback and grade once ret…
Browse files Browse the repository at this point in the history
  • Loading branch information
ern authored Sep 11, 2024
1 parent 2870614 commit 680c0f4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6257,18 +6257,18 @@ public void doView_submission(RunData data) {
state.setAttribute(ATTACHMENTS, referenceList);
} else {
// student can't submit
if (submission != null
&& (submission.getUserSubmission() || submission.getReturned())
&& assignment.getTypeOfSubmission() != Assignment.SubmissionType.NON_ELECTRONIC_ASSIGNMENT_SUBMISSION) {
// if returned, send to grade view
if (submission != null && (submission.getUserSubmission() || submission.getReturned())) {
// if submission is by student or it has been returned
if (assignment.getIsGroup() && !rangeAndGroups.validateUserGroups(state, user.getId(), assignment)) {
// group project and groups are invalid
mode = MODE_STUDENT_VIEW_GROUP_ERROR;
} else {
// otherwise, send to grade view
state.setAttribute(VIEW_GRADE_SUBMISSION_ID, AssignmentReferenceReckoner.reckoner().submission(submission).reckon().getReference());
mode = MODE_STUDENT_VIEW_GRADE;
}
} else {
// send to assignment view
// no submission send to assignment view
state.setAttribute(VIEW_ASSIGNMENT_ID, assignmentReference);
mode = MODE_STUDENT_VIEW_ASSIGNMENT;
}
Expand Down

0 comments on commit 680c0f4

Please sign in to comment.