feat: add Waffle Flag to disable resetting self-paced deadlines by learners#32148
Conversation
|
Thanks for the pull request, @Agrendalath! As a core committer in this repo, you can merge this once the pull request is approved per the core committer reviewer requirements and according to the agreement with your edX Champion. |
| # Test correct post body | ||
| response = self.client.post(reverse('course-experience-reset-course-deadlines'), {'course_key': self.course.id}) | ||
| assert response.status_code == 200 | ||
| assert enrollment.schedule.start_date < Schedule.objects.get(id=enrollment.schedule.id).start_date |
There was a problem hiding this comment.
This test wasn't working correctly before. The course wasn't self-paced, so the schedule was never modified.
| # Need to supply tracker name for the EventTestMixin. Also, EventTestMixin needs to come | ||
| # first in class inheritance so the setUp call here appropriately works | ||
| super().setUp('openedx.features.course_experience.api.v1.views.tracker') | ||
| self.course = CourseFactory.create(self_paced=True, start=timezone.now() - datetime.timedelta(days=1000)) |
There was a problem hiding this comment.
I changed days to 1000 because of this check.
farhaanbukhsh
left a comment
There was a problem hiding this comment.
👍
- ✅ I tested this: on master devstack following the instructions
- ✅ I read through the code
- ❌ I checked for accessibility issues
- ✅ Includes documentation
- ❌ I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository.
|
@Agrendalath 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
1 similar comment
|
EdX Release Notice: This PR has been deployed to the production environment. |
Description
Currently, relative dates in self-paced courses cannot be enforced. When an assignment's due date is in the past, a learner can click a button to reset these deadlines.
This adds a
course_experience.relative_dates_disable_resetflag to disable this behavior. This way, self-paced courses can have real deadlines.Testing instructions (the order is important)
Everyone: Yes):studio.custom_relative_datescourse_experience.relative_datescourse_experience.relative_dates_disable_resetEnabled: Yes.Settings -> Schedule & Detailsand set the pacing toSelf-Paced. Click "Save Changes".Course Start Date. Click "Save Changes".audituser and enroll yourself in a course.Submitbutton is enabled when you select the input fields.audituser in this new course. Change theStart dateto a year ago andSave.audituser, revisit the Problem (refresh the page) and check that theSubmitbutton can no longer be enabled. That should be a "Past due" pill near the due date above this Problem.Deadline
"None"
Other information
Private-ref: BB-7349