Skip to content

Conversation

@holaontiveros
Copy link
Contributor

@holaontiveros holaontiveros commented Dec 17, 2025

Description

  • Adds a new endpoint to get the unit_extensions for a course that will be used on the new instructor dashboard
  • Modifies an utility function that needed to ignore values to unpack
  • Updates edx-when from 3.0.0 to 3.1.0 that has the data required for the new endpoint to import

Supporting information

fixes #37664

Testing instructions

  • Make sure you have a valid course blocks that can be considered for an extension
  • Use the example curl request to test

example curl to test, make sure you have the right cookies and update the right IDs and details

curl --location --request GET 'http://local.openedx.io:8000/api/instructor/v2/courses/course-v1:OEXCOM+101+2025_T1/unit_extensions' \
--header 'Accept: application/json, text/javascript, */*; q=0.01' \
--header 'Referer: http://local.openedx.io:8000/courses/course-v1:OEXCOM+101+2025_T1/instructor' \
--header 'Content-Type: application/json' \
--data-raw '{
    "block_id": "block-v1:OEXCOM+101+2025_T1+type@sequential+block@c3ccd3d1f91b42dfb2bff8185dba4d3b",
    "email_or_username": "javier",
    "due_datetime": "12/12/2025 12:12",
    "reason": "Just because"
}'

a possible valid example of response of the query looks like:

{
    "next": null,
    "previous": null,
    "count": 2,
    "num_pages": 1,
    "current_page": 1,
    "start": 0,
    "results": [
        {
            "username": "armando",
            "full_name": "",
            "email": "armando.ontiveros@wgu.edu",
            "unit_title": "Subsection",
            "unit_location": "block-v1:OEXCOM+101+2025_T1+type@sequential+block@c3ccd3d1f91b42dfb2bff8185dba4d3b",
            "extended_due_date": "2026-12-28T00:00:00Z"
        },
        {
            "username": "javier",
            "full_name": "",
            "email": "javier.ontiveros@wgu.edu",
            "unit_title": "Subsection",
            "unit_location": "block-v1:OEXCOM+101+2025_T1+type@sequential+block@c3ccd3d1f91b42dfb2bff8185dba4d3b",
            "extended_due_date": "2025-12-12T12:12:00Z"
        }
    ]
}

Deadline

None

Other information

Include anything else that will help reviewers and consumers understand the change.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 17, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Dec 17, 2025

Thanks for the pull request, @holaontiveros!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where 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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@mphilbrick211 mphilbrick211 added the mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). label Dec 19, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Dec 19, 2025
@holaontiveros holaontiveros force-pushed the feature/unit_extensions_v2 branch from b4b3387 to 55eef0e Compare January 12, 2026 15:24
@holaontiveros holaontiveros marked this pull request as ready for review January 12, 2026 16:31
@holaontiveros holaontiveros changed the title [WIP] Unit extensions API v2 for instructors dashboard Unit extensions API v2 for instructors dashboard Jan 12, 2026
- Adjust tests for more consistent behavior
- Add UnitDueDateExtension as a data interface
- Reduce code duplication
@dwong2708
Copy link
Contributor

@wgu-taylor-payne I believe I’ve addressed all the comments. Could you please take another look?

@mphilbrick211 mphilbrick211 moved this from Waiting on Author to In Eng Review in Contributions Jan 22, 2026
Copy link
Contributor

@wgu-taylor-payne wgu-taylor-payne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is one more suggestion I have.

Copy link
Contributor

@wgu-taylor-payne wgu-taylor-payne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, I think that brings more clarity to the code. Could you please address these remaining items of feedback #37783 and #37783.

@dwong2708 dwong2708 force-pushed the feature/unit_extensions_v2 branch from 47a2097 to 511e8eb Compare January 26, 2026 23:44
@dwong2708 dwong2708 force-pushed the feature/unit_extensions_v2 branch from e55a4b7 to 90896c4 Compare January 27, 2026 00:27
Copy link
Contributor

@wgu-taylor-payne wgu-taylor-payne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks @holaontiveros for the initial implementation and @dwong2708 for the feedback and improvements.

@feanil Were you wanting to give this one a look over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). open-source-contribution PR author is not from Axim or 2U

Projects

Status: In Eng Review

Development

Successfully merging this pull request may close these issues.

Date extensions - GET /api/instructor/v2/courses/<course_id>/unit_extensions?=blockId&

6 participants