Only set due dates on graded content

When a self paced course was published and we were configured to
automatically space out due dates among its sections, we were
accidentally setting due dates on ungraded content. Which limited
access to it.

AA-162
This commit is contained in:
Michael Terry
2020-05-08 11:10:33 -04:00
parent b13f207e1f
commit e521e0db25

View File

@@ -58,9 +58,10 @@ def extract_dates_from_course(course):
items = [section]
while items:
next_item = items.pop()
# TODO: Once studio can manually set relative dates,
# we would need to manually check for them here
date_items.append((next_item.location, {'due': time_per_week * (idx + 1)}))
if next_item.graded:
# TODO: Once studio can manually set relative dates,
# we would need to manually check for them here
date_items.append((next_item.location, {'due': time_per_week * (idx + 1)}))
items.extend(next_item.get_children())
else:
date_items = []