Commit c91fe2c7 authored by Joan Denise Nocos's avatar Joan Denise Nocos

chore: populated image field in Assignment model

parent e54f958a
...@@ -17,6 +17,10 @@ def details(request, assignment_id): ...@@ -17,6 +17,10 @@ def details(request, assignment_id):
assignment = Assignment.objects.get(pk=assignment_id) assignment = Assignment.objects.get(pk=assignment_id)
except Assignment.DoesNotExist: except Assignment.DoesNotExist:
raise Http404("Assignment does not exist!") raise Http404("Assignment does not exist!")
score = assignment.max_points
assignment.passing_score = (score*60) // 100
context = { context = {
"assignment" : assignment, "assignment" : assignment,
"course" : assignment.course, "course" : assignment.course,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment