Skip to content
Snippets Groups Projects
Unverified Commit 628954d5 authored by Michael Roytman's avatar Michael Roytman Committed by GitHub
Browse files

Merge pull request #18587 from edx/mroytman/course-validation-fix-end-date

add condition for existence of course end date to graded_only option
parents 91e0c427 14b59d64
Branches
Tags
No related merge requests found
......@@ -139,15 +139,23 @@ class CourseValidationView(DeveloperErrorViewMixin, GenericAPIView):
if a.due and a.graded
]
assignments_with_dates_before_start = [
{'id': unicode(a.location), 'display_name': a.display_name}
for a in assignments_with_dates if a.due < course.start
]
assignments_with_dates_before_start = (
[
{'id': unicode(a.location), 'display_name': a.display_name}
for a in assignments_with_dates if a.due < course.start
]
if self._has_start_date(course)
else []
)
assignments_with_dates_after_end = [
{'id': unicode(a.location), 'display_name': a.display_name}
for a in assignments_with_dates if a.due > course.end
]
assignments_with_dates_after_end = (
[
{'id': unicode(a.location), 'display_name': a.display_name}
for a in assignments_with_dates if a.due > course.end
]
if course.end
else []
)
return dict(
total_number=len(assignments),
......
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