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

Commit 3acc0c1

Browse files
committed
Update totlal points on save and load.
1 parent 581a671 commit 3acc0c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,7 @@ def get_assignment():
14011401
session.flash = 'Error assignment ID is undefined'
14021402
return redirect(URL('assignments','index'))
14031403

1404+
_set_assignment_max_points(assignment_id)
14041405
assignment_data = {}
14051406
assignment_row = db(db.assignments.id == assignment_id).select().first()
14061407
assignment_data['assignment_points'] = assignment_row.points
@@ -1486,9 +1487,11 @@ def save_assignment():
14861487
logger.error("Bad Date format for assignment: {}".format(d_str))
14871488
due = datetime.datetime.utcnow() + datetime.timedelta(7)
14881489
try:
1490+
total = _set_assignment_max_points(assignment_id)
14891491
db(db.assignments.id == assignment_id).update(
14901492
course=auth.user.course_id,
14911493
description=request.vars['description'],
1494+
points=total,
14921495
duedate=due,
14931496
visible=request.vars['visible']
14941497
)

0 commit comments

Comments
 (0)