edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

feat: warn when relative dates are past due and can't be shifted

Open DanielVZ96 opened this issue 1 year ago • 1 comments

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:

  • Which edX user roles will this change impact?: Learner

Testing instructions

  1. Add the following Waffle Flags (with Everyone: Yes):

    1. studio.custom_relative_dates
    2. course_experience.relative_dates
    3. course_experience.relative_dates_disable_reset
  2. Go to Course_Date_Signals -> Self paced relative dates configs and add a config with Enabled: Yes.

  3. Create a new course in Studio.

  4. Go to Settings -> Schedule & Details and set the pacing to Self-Paced. Click "Save Changes".

  5. Set a past Course Start Date. Click "Save Changes".

  6. Create a new subsection in the course. Mark it as graded as "Homework" and set "Due in" to 1 week.

  7. Create a Problem Block (e.g., Checkboxes) in the subsection and publish it.

  8. Log in as an audit user and enroll yourself in a course.

  9. As an admin, go to Schedules -> Schedules and find the schedule for the audit user in this new course. Change the Start date to a year ago and Save.

  10. 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 the Submit button can no longer be enabled, and that should be a "Past due" pill near the due date above this Problem.

  11. You should also see these deadlines on the Course Outline page.

  12. Set the course_experience.relative_dates_disable_reset to No

  13. 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: image

course_experience.relative_dates_disable_reset set to true (old behavior, but still good to check): image

Not past due date: image

Private-ref: BB-8542

DanielVZ96 avatar Mar 14 '24 01:03 DanielVZ96

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

openedx-webhooks avatar Mar 14 '24 01:03 openedx-webhooks

Tests failed with: Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

DanielVZ96 avatar Jun 10 '24 03:06 DanielVZ96

@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.

openedx-webhooks avatar Jun 10 '24 20:06 openedx-webhooks

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot avatar Jun 10 '24 22:06 edx-pipeline-bot

2U Release Notice: This PR has been deployed to the edX production environment.

edx-pipeline-bot avatar Jun 10 '24 22:06 edx-pipeline-bot