feat: warn when relative dates are past due and can't be shifted#34366
feat: warn when relative dates are past due and can't be shifted#34366Agrendalath merged 1 commit intoopenedx:masterfrom
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
There was a problem hiding this comment.
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.
openedx/features/personalized_learner_schedules/call_to_action.py
Outdated
Show resolved
Hide resolved
40bfce2 to
392b42f
Compare
Agrendalath
left a comment
There was a problem hiding this comment.
👍
- 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_resetflag 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_datescourse_experience.relative_datescourse_experience.relative_dates_disable_resetGo 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 & Detailsand 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
audituser and enroll yourself in a course.As an admin, go to Schedules -> Schedules and find the schedule for the
audituser in this new course. Change theStart dateto a year ago andSave.As an
audituser, visit the Problem and check that there's a warning about not being able to shift the relative dates (see screenshot bellow), that theSubmitbutton 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_resettoNoRevisit the Problem with the
audituser. Check that the warning now lets you shift the relative dates. (second screenshot)Screenshots
course_experience.relative_dates_disable_resetset to false:course_experience.relative_dates_disable_resetset to true (old behavior, but still good to check):Not past due date:

Private-ref: BB-8542