From 02dd93846672e92959ad1f5551ffd2205241b7ad Mon Sep 17 00:00:00 2001 From: Brad Miller Date: Wed, 14 Dec 2022 08:08:20 -0600 Subject: [PATCH] Change: Complete is now Finished MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * **WARNING** - This is a breaking change for the assignment progress, you will need to run a query to update the grades table changing ‘Complete’ to ‘Finished’ in the is_submit column. --- controllers/assignments.py | 12 ++++++------ views/assignments/chooseAssignment.html | 10 ++++++++-- views/assignments/doAssignment.html | 14 +++++++------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/controllers/assignments.py b/controllers/assignments.py index b74602642..6f10e4634 100644 --- a/controllers/assignments.py +++ b/controllers/assignments.py @@ -572,8 +572,8 @@ def update_submit(): # keep this clause for backward compatibility if is_submit is None: if grade.is_submit == "In Progress": - is_submit = "Complete" - elif grade.is_submit == "Complete": + is_submit = "Finished" + elif grade.is_submit == "Finished": is_submit = "Not Started" else: is_submit = "In Progress" @@ -852,7 +852,7 @@ def doAssignment(): db.grades.update_or_insert( auth_user=auth.user.id, assignment=assignment_id, - is_submit="Not Started", # set is_submit variable to incomplete + is_submit="", # set is_submit variable to incomplete ) grade = ( db( @@ -965,7 +965,7 @@ def chooseAssignment(): else: score.append("Not Graded") - if deadline <= datetime.datetime.utcnow() and grade.is_submit != "Complete": + if deadline <= datetime.datetime.utcnow() and grade.is_submit != "Finished": ontime.append(False) else: ontime.append(True) @@ -975,11 +975,11 @@ def chooseAssignment(): elif timestamp > deadline and assignment.enforce_due: status.append("Past Due") else: - status.append("Not Started") + status.append("") elif timestamp > deadline and assignment.enforce_due: status.append("Past Due") else: - status.append("Not Started") + status.append("") # Convert the duedate for current assignment to string duedates.append(date2String(deadline)) diff --git a/views/assignments/chooseAssignment.html b/views/assignments/chooseAssignment.html index fb35320c7..537bcc0d7 100644 --- a/views/assignments/chooseAssignment.html +++ b/views/assignments/chooseAssignment.html @@ -9,12 +9,16 @@

Assignments

{{i=0}} + {{for assignment in assignments:}} {{pass}}
NameMy ProgressDueScoreDescription
{{=assignment['name']}} - + + {{for option in ["Not Started", "In Progress", "Finished"]:}}
+ +

Hint: You can help yourself stay organized by tracking your progress on an assignment. Use the dropdown menu to quickly mark your assignment as Not Started, In Progress, or Complete. When your instructor grades the assignment it will be graded regardless of the value in the dropdown menu. You can also get a preliminary score by clicking on the "Compute Score for Assignment" button on the assignment page.

diff --git a/views/assignments/doAssignment.html b/views/assignments/doAssignment.html index 3ca1bbebf..21167fd62 100644 --- a/views/assignments/doAssignment.html +++ b/views/assignments/doAssignment.html @@ -22,13 +22,13 @@

Due: {{=assignment['duedate']}}

Description: {{=assignment['description']}}

- {{if is_submit == "Complete" or is_graded or enforce_pastdue:}} + {{if is_submit == "Finished": }}
-

You have marked this assignment Complete. Click to mark it

+

You have marked this assignment Finished. Click to mark it

{{elif is_submit == "In Progress":}}
-

You have marked this assignment as In Progress. Click to mark it as

+

You have marked this assignment as In Progress. Click to mark it as

{{else:}}
@@ -123,9 +123,9 @@
Not yet graded
{{pass}}
- {{if is_submit == "Complete" or is_graded or enforce_pastdue:}} + {{if is_submit == "Finished":}}
-

You have marked this assignment Complete. Click to mark it

+

You have marked this assignment Finished. Click to mark it

{{if is_graded:}}
@@ -141,7 +141,7 @@
Not yet graded
{{pass}} {{elif is_submit == "In Progress":}}
-

You have marked this assignment as In Progress. Click to mark it as

+

You have marked this assignment as In Progress. Click to mark it as

{{else:}}
@@ -166,7 +166,7 @@
Not yet graded
{{if is_submit == "Not Started":}} Mark In Progress {{elif is_submit == "In Progress":}} - Mark Complete + Mark Finished {{else:}} Mark Incomplete {{pass}}