-
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
Fixed: Can set earlier due date as an individual due date extension and related bugs #4868
Conversation
@bradenmacdonald thanks for the contribution! I have run a build on your branch. I can take a pass through this later today. @carsongee or @chrisrossi would either of you be able to review this PR? |
@bradenmacdonald once you have a passing build, please click on the green check next to your commit to view the output of your build: From there, please view the "Diff Coverage" and "Diff Quality" reports: The goal is to have as close to 100% of lines covered on the diff coverage report (which measures which lines of code are covered by tests). Some lines are not possible or very hard to test, but please do check and add additional tests if appropriate. The "Diff Quality" report should always be 100%; there is no reason to have it be less. You can generate this report locally by running |
}) | ||
self.assertEqual(response.status_code, 400, response.content) | ||
self.assertEqual(None, | ||
get_extended_due(self.course, self.week3, self.user1)) |
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.
Style nit: splitting across lines should look like this:
self.assertEqual(
None,
get_extended_due(self.course, self.week3, self.user1)
)
@bradenmacdonald would you have the bandwidth to fix one more bug with this feature? When this is enabled and I click on the "Extensions" tab on the Instructor dashboard, I get jumped down to the |
Another bug I find is as follows: when a username is entered that is not a real username, nothing in the UI indicates this - nothing says there was a failure, no error message is displayed. Contrast this with the behavior of, eg, the student admin tab: These two bugs would be great follow-on tasks to this PR. I would not try to tackle these bugs in this same PR - we prefer to have many small PRs rather than one large one. 👍 on this current PR as-is, once my few comments are addressed. |
Thanks for the help, this one has been on my to do list for too long. I also agree with Sarina's additional issues. Fixing the weird anchor jump would be very nice. |
Thanks a lot for reviewing, @sarina and @carsongee . I can definitely fix those other two issues you've pointed out :) |
@bradenmacdonald you will need to perform a rebase on this PR as it has a conflict with master. |
8a7f052
to
b2be62c
Compare
Ok, I believe I have addressed all the comments made so far:
I also have fixes for the other two issues mentioned by @sarina - I will open separate pull requests for them. |
@bradenmacdonald did you figure out the issue you were having with your test? |
@sarina Yes, I did :) The test in question just needed this line: self.week1 = self.store.update_item(self.week1, self.user1.id) I put all the unit tests as the first commit in this branch so it's easy to checkout the tests without the fixes as a git detached head. I confirmed that this test (and the others I've added) does not pass without the fix included in this PR. |
This looks good to me. Thanks again |
LGTM as well. Thanks for the contribution! |
Fixed: Can set earlier due date as an individual due date extension and related bugs
This pull request fixes LMS-6563: Can enter in earlier date in Individual Extension, which was also mentioned in the individual due date extensions feature PR #2062.
Now an error will occur if the instructor attempts to set a due date that is earlier than the original due date.
I also fixed two related bugs that I noticed while working on this:
Unit tests are included.
This was done for OpenCraft ( cc @antoviaque ) and falls under their organization contributor agreement.