diff options
Diffstat (limited to 'contents/ui')
-rw-r--r-- | contents/ui/main.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contents/ui/main.qml b/contents/ui/main.qml index 6f14c65..ad62fd1 100644 --- a/contents/ui/main.qml +++ b/contents/ui/main.qml @@ -133,6 +133,10 @@ Item { callApi(`/courses/${course.id}/assignments`, 50, assignments => { assignments.forEach(assignment => { callApi(`/courses/${course.id}/assignments/${assignment.id}/submissions/${userId}`, 0, submission => { + const submitted = submission.workflow_state == "submitted" || + submission.workflow_state == "graded" + if (submitted && !showSubmittedAssignments) return // discard this + const info = { type: "assignment", activityId: assignment.id, @@ -140,7 +144,7 @@ Item { course: course.code, title: assignment.name, dueAt: assignment.due_at || "", // if null, use empty string to suppress errors - submitted: submission.workflow_state != "unsubmitted", // "graded" counts as submitted + submitted: submitted, url: assignment.html_url, important: plasmoid.configuration.importantAssignments.includes(assignment.id.toString()), finished: plasmoid.configuration.finishedAssignments.includes(assignment.id.toString()), |