-
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: add Waffle Flag to disable resetting self-paced deadlines by learners #32148
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. |
self.assert_no_events_were_emitted() | ||
|
||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test wasn't working correctly before. The course wasn't self-paced, so the schedule was never modified.
@@ -25,17 +27,22 @@ def setUp(self): # pylint: disable=arguments-differ | |||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed days to 1000
because of this check.
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: 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-secure
repository.
@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_reset
flag to disable this behavior. This way, self-paced courses can have real deadlines.Testing instructions (the order is important)
Everyone: Yes
):studio.custom_relative_dates
course_experience.relative_dates
course_experience.relative_dates_disable_reset
Enabled: Yes
.Settings -> Schedule & Details
and set the pacing toSelf-Paced
. Click "Save Changes".Course Start Date
. Click "Save Changes".audit
user and enroll yourself in a course.Submit
button is enabled when you select the input fields.audit
user in this new course. Change theStart date
to a year ago andSave
.audit
user, revisit the Problem (refresh the page) and check that theSubmit
button 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