fix: Date extensions tab still shows granted exentions even if reset#38394
Conversation
|
Thanks for the pull request, @brianjbuck-wgu! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
1dd5141 to
275da91
Compare
There was a problem hiding this comment.
Pull request overview
Fixes the instructor “Date Extensions” endpoint so that revoked/reset due date extensions no longer appear in the “Granted Extensions” list, aligning the backend results with the UI expectation from the linked issues.
Changes:
- Filter out “reset” extensions in
UnitExtensionsView.get_querysetwhen the override date isNoneor matches the original due date. - Add test coverage to ensure reset extensions are excluded while legitimate extensions remain visible.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lms/djangoapps/instructor/views/api_v2.py |
Adds server-side filtering to remove reset/reverted overrides from the returned extension list. |
lms/djangoapps/instructor/tests/test_api_v2.py |
Adds tests for reset-to-None, reset-to-original-date, and normal active extensions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
275da91 to
ceaee80
Compare
dwong2708
left a comment
There was a problem hiding this comment.
Overall, it looks good. Just a couple of suggestions
wgu-taylor-payne
left a comment
There was a problem hiding this comment.
Looks good overall. I've left a couple of small comments. Is this something that should ultimately be moved into edx-when though? In that case we might want to 1) look at making those changes or 2) adding an issue on edx-when and leaving a comment with the issue number where we do this filtering.
|
@wgu-taylor-payne, I did consider making the upstream change to edx-when, but I am not sure what the downstream affects would be especially this close to the cutoff for the verawood release. |
Yeah, that makes sense. Could you at least bring this up in an issue on edx-when so it can be investigated further at some point? |
8ca7d3b to
9576b56
Compare
|
tested on UI and works as expected 👍 |
|
recheck |
Previous commits: - fix: Date extensions tab still shows granted exentions even if reset - fix: Address Copilot feedback - fix: PR feedback - fix: Add TODO comment with link to edx-when repo issue
2f74d0a to
06b2dc1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
In the new Instructor Dashboard, when an instructor clicks "Reset Extensions" for a learner, the extension record remains visible in the "Granted Extensions" table on the Instructor Dashboard's Date Extensions tab. The table is intended to display only active extensions, but reset extensions still appear because the backend API returns them.
Fixes:
Other information