From e521e0db25e4cd8c8f18da38893fb20220edcd3d Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Fri, 8 May 2020 11:10:33 -0400 Subject: [PATCH] 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 --- openedx/core/djangoapps/course_date_signals/handlers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/course_date_signals/handlers.py b/openedx/core/djangoapps/course_date_signals/handlers.py index 2639f097aa..61514a571c 100644 --- a/openedx/core/djangoapps/course_date_signals/handlers.py +++ b/openedx/core/djangoapps/course_date_signals/handlers.py @@ -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 = []