Skip to content
Snippets Groups Projects
Commit 4d01a736 authored by Jason Myatt's avatar Jason Myatt
Browse files

Check for none on subsection due date

parent 61b20d3f
No related branches found
Tags release-2020-11-25-04.25
No related merge requests found
......@@ -285,11 +285,11 @@ def dates_banner_should_display(course_key, request):
if missed_deadlines:
break
for subsection_key in block_data.get_children(section_key):
if (
subsection_due_date = block_data.get_xblock_field(subsection_key, 'due', None)
if subsection_due_date and (
not block_data.get_xblock_field(subsection_key, 'complete', False)
and block_data.get_xblock_field(subsection_key, 'graded', False)
and block_data.get_xblock_field(
subsection_key, 'due', timezone.now() + timedelta(1)) < timezone.now()
and subsection_due_date < timezone.now()
):
missed_deadlines = True
break
......
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