Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 02dd938

Browse files
committed
Change: Complete is now Finished
* **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.
1 parent 1593ac2 commit 02dd938

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

controllers/assignments.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,8 @@ def update_submit():
572572
# keep this clause for backward compatibility
573573
if is_submit is None:
574574
if grade.is_submit == "In Progress":
575-
is_submit = "Complete"
576-
elif grade.is_submit == "Complete":
575+
is_submit = "Finished"
576+
elif grade.is_submit == "Finished":
577577
is_submit = "Not Started"
578578
else:
579579
is_submit = "In Progress"
@@ -852,7 +852,7 @@ def doAssignment():
852852
db.grades.update_or_insert(
853853
auth_user=auth.user.id,
854854
assignment=assignment_id,
855-
is_submit="Not Started", # set is_submit variable to incomplete
855+
is_submit="", # set is_submit variable to incomplete
856856
)
857857
grade = (
858858
db(
@@ -965,7 +965,7 @@ def chooseAssignment():
965965
else:
966966
score.append("Not Graded")
967967

968-
if deadline <= datetime.datetime.utcnow() and grade.is_submit != "Complete":
968+
if deadline <= datetime.datetime.utcnow() and grade.is_submit != "Finished":
969969
ontime.append(False)
970970
else:
971971
ontime.append(True)
@@ -975,11 +975,11 @@ def chooseAssignment():
975975
elif timestamp > deadline and assignment.enforce_due:
976976
status.append("Past Due")
977977
else:
978-
status.append("Not Started")
978+
status.append("")
979979
elif timestamp > deadline and assignment.enforce_due:
980980
status.append("Past Due")
981981
else:
982-
status.append("Not Started")
982+
status.append("")
983983

984984
# Convert the duedate for current assignment to string
985985
duedates.append(date2String(deadline))

views/assignments/chooseAssignment.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ <h1>Assignments</h1><h2></h2>
99
<table class="table table-striped">
1010
<tr><th>Name</th><th>My Progress</th><th>Due</th><th>Score<th>Description</th></tr>
1111
{{i=0}}
12+
<style>
13+
select:invalid { color: gray; }
14+
</style>
1215
{{for assignment in assignments:}}
1316
<tr>
1417
<td><a href="doAssignment?assignment_id={{=assignment['id']}}">{{=assignment['name']}}</a></td>
1518
<th>
16-
<select onchange="updateAssignmentProgress(this.value, {{=assignment['id']}})">
17-
{{for option in ["Not Started", "In Progress", "Complete"]:}}
19+
<select required onchange="updateAssignmentProgress(this.value, {{=assignment['id']}})">
20+
<option disabled selected value="">Track my Progress</option>
21+
{{for option in ["Not Started", "In Progress", "Finished"]:}}
1822
<option
1923
{{ if status[i] == option: }}
2024
selected
@@ -38,3 +42,5 @@ <h1>Assignments</h1><h2></h2>
3842
</tr>
3943
{{pass}}
4044
</table>
45+
46+
<p><strong>Hint: </strong>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.</p>

views/assignments/doAssignment.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ <h2 style='margin-left:1cm;'>Due: {{=assignment['duedate']}}</h2>
2222
<p style='margin-left:0.5cm; margin-right:0.5cm;'>Description: {{=assignment['description']}}</p>
2323
</div>
2424
<div>
25-
{{if is_submit == "Complete" or is_graded or enforce_pastdue:}}
25+
{{if is_submit == "Finished": }}
2626
<div style='background-color:rgb(146, 207, 165); margin-left:2cm; margin-right:2cm;'>
27-
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment Complete. Click to mark it <button onclick="updateAssignmentProgress('In Progress', assignmentId)" class="btn btn-info">In Progress</button></p>
27+
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment Finished. Click to mark it <button onclick="updateAssignmentProgress('In Progress', assignmentId)" class="btn btn-info">In Progress</button></p>
2828
</div>
2929
{{elif is_submit == "In Progress":}}
3030
<div style='background-color:rgb(247, 238, 158); margin-left:2cm; margin-right:2cm;'>
31-
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment as In Progress. Click to mark it as <button onclick="updateAssignmentProgress('Complete', assignmentId)" class="btn btn-info">Complete</button></p>
31+
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment as In Progress. Click to mark it as <button onclick="updateAssignmentProgress('Finished', assignmentId)" class="btn btn-info">Finished</button></p>
3232
</div>
3333
{{else:}}
3434
<div style='background-color:rgb(236, 189, 189); margin-left:2cm; margin-right:2cm;'>
@@ -123,9 +123,9 @@ <h5 style='text-align:center;'>Not yet graded</h5>
123123
{{pass}}
124124
</div>
125125
<div>
126-
{{if is_submit == "Complete" or is_graded or enforce_pastdue:}}
126+
{{if is_submit == "Finished":}}
127127
<div style='background-color:rgb(146, 207, 165); margin-left:2cm; margin-right:2cm;'>
128-
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment Complete. Click to mark it <button onclick="updateAssignmentProgress('In Progress', assignmentId)" class="btn btn-info">In Progress</button></p>
128+
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment Finished. Click to mark it <button onclick="updateAssignmentProgress('In Progress', assignmentId)" class="btn btn-info">In Progress</button></p>
129129
</div>
130130
{{if is_graded:}}
131131
<div style='background-color:powderblue; margin-left:2cm; margin-right:2cm;'>
@@ -141,7 +141,7 @@ <h5 style='text-align:center;'>Not yet graded</h5>
141141
{{pass}}
142142
{{elif is_submit == "In Progress":}}
143143
<div style='background-color:rgb(247, 238, 158); margin-left:2cm; margin-right:2cm;'>
144-
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment as In Progress. Click to mark it as <button onclick="updateAssignmentProgress('Complete', assignmentId)" class="btn btn-info">Complete</button></p>
144+
<p style='margin-left:0.5cm; margin-right:0.5cm;'>You have marked this assignment as In Progress. Click to mark it as <button onclick="updateAssignmentProgress('Finished', assignmentId)" class="btn btn-info">Finished</button></p>
145145
</div>
146146
{{else:}}
147147
<div style='background-color:rgb(236, 189, 189); margin-left:2cm; margin-right:2cm;'>
@@ -166,7 +166,7 @@ <h5 style='text-align:center;'>Not yet graded</h5>
166166
{{if is_submit == "Not Started":}}
167167
Mark In Progress
168168
{{elif is_submit == "In Progress":}}
169-
Mark Complete
169+
Mark Finished
170170
{{else:}}
171171
Mark Incomplete
172172
{{pass}}

0 commit comments

Comments
 (0)