forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow disabling spaced out sections in self paced courses
In self paced courses, if relative due dates are enabled via SelfPacedRelativeDatesConfig, all graded content would be assigned relative due dates which are evenly spaced out over an estimated duration of a course (aka. Personal Learner Schedule or PLS). If CUSTOM_RELATIVE_DATES are enabled, custom set relative due dates would (sometimes) override the "spaced out" ones. However, there are some usecases, when custom relative due dates are desired, without the PLS. For this usecase we are adding a DISABLE_SPACED_OUT_SECTIONS CourseWaffleFlag. None of the existing behaviour is changed unwillingly. When the flag is enabled, the relative due dates will only be applied to the subsections that have custom relative due dates set, or when a similar setting is set in Advanced Settings of a course.
- Loading branch information
1 parent
9ade4ea
commit 45000e8
Showing
3 changed files
with
144 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
This module contains various configuration settings via waffle switches for | ||
course date signals. | ||
""" | ||
|
||
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag | ||
|
||
WAFFLE_FLAG_NAMESPACE = "course_date_signals" | ||
|
||
# .. toggle_name: course_date_signals.disable_spaced_out_sections | ||
# .. toggle_implementation: CourseWaffleFlag | ||
# .. toggle_default: False | ||
# .. toggle_description: Waffle flag to disable spaced out sections for self paced courses. | ||
# .. toggle_use_cases: open_edx | ||
# .. toggle_creation_date: 2024-09-02 | ||
# .. toggle_target_removal_date: None | ||
DISABLE_SPACED_OUT_SECTIONS = CourseWaffleFlag( | ||
f"{WAFFLE_FLAG_NAMESPACE}.disable_spaced_out_sections", __name__ | ||
) |