Skip to content
Snippets Groups Projects
Commit dda5eded authored by Matthew Piatetsky's avatar Matthew Piatetsky Committed by Matthew Piatetsky
Browse files

fix bug with banner deadline logic

parent d3d0d0a2
No related merge requests found
......@@ -139,8 +139,9 @@ def register_course_expired_message(request, course):
if upgrade_deadline is None:
return
now = timezone.now()
if now < upgrade_deadline:
upgrade_deadline = enrollment.course_upgrade_deadline
course_upgrade_deadline = enrollment.course_upgrade_deadline
if now > upgrade_deadline:
upgrade_deadline = course_upgrade_deadline
expiration_message = _('{strong_open}Audit Access Expires {expiration_date}{strong_close}'
'{line_break}You lose all access to this course, including your progress, on '
......@@ -149,7 +150,7 @@ def register_course_expired_message(request, course):
'as long as it exists on the site. {a_open}Upgrade now{sronly_span_open} to '
'retain access past {expiration_date}{span_close}{a_close}')
full_message = expiration_message
if now < upgrade_deadline:
if now < course_upgrade_deadline:
full_message += upgrade_deadline_message
PageLevelMessages.register_info_message(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment