-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: warn when relative dates are past due and can't be shifted #34366
Conversation
Thanks for the pull request, @DanielVZ96! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
68a296a
to
b55444e
Compare
@@ -164,3 +178,22 @@ def _make_reset_deadlines_cta(cls, xblock, category, is_learning_mfe=False): | |||
} | |||
|
|||
return cta_data | |||
|
|||
@classmethod | |||
def _make_warn_deadlines_cta(cls, xblock, category, is_learning_mfe=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use any of these attributes. Technically, we could return this right after checking if RELATIVE_DATES_DISABLE_RESET_FLAG.is_enabled(course_key):
instead of making separate helper functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea!
openedx/features/personalized_learner_schedules/call_to_action.py
Outdated
Show resolved
Hide resolved
40bfce2
to
392b42f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
- I tested this: checked that the warning is displayed correctly
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- Added to the Code Drift project board (for backports)
dae1ef9
to
5400e12
Compare
Tests failed with: |
5400e12
to
acf95d5
Compare
@DanielVZ96 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
When the
course_experience.relative_dates_disable_reset
flag is set to true in self paced courses, warnings that otherwise allowed learners to shift deadlines don't appear. This PRs shows warnings in this case, with the sole difference of not allowing to shift dates.Useful information to include:
Testing instructions
Add the following Waffle Flags (with
Everyone: Yes
):studio.custom_relative_dates
course_experience.relative_dates
course_experience.relative_dates_disable_reset
Go to Course_Date_Signals -> Self paced relative dates configs and add a config with
Enabled: Yes
.Create a new course in Studio.
Go to
Settings -> Schedule & Details
and set the pacing toSelf-Paced
. Click "Save Changes".Set a past
Course Start Date
. Click "Save Changes".Create a new subsection in the course. Mark it as graded as "Homework" and set "Due in" to 1 week.
Create a Problem Block (e.g., Checkboxes) in the subsection and publish it.
Log in as an
audit
user and enroll yourself in a course.As an admin, go to Schedules -> Schedules and find the schedule for the
audit
user in this new course. Change theStart date
to a year ago andSave
.As an
audit
user, visit the Problem and check that there's a warning about not being able to shift the relative dates (see screenshot bellow), that theSubmit
button can no longer be enabled, and that should be a "Past due" pill near the due date above this Problem.You should also see these deadlines on the Course Outline page.
Set the
course_experience.relative_dates_disable_reset
toNo
Revisit the Problem with the
audit
user. Check that the warning now lets you shift the relative dates. (second screenshot)Screenshots
course_experience.relative_dates_disable_reset
set to false:course_experience.relative_dates_disable_reset
set to true (old behavior, but still good to check):Not past due date:
Private-ref: BB-8542