Skip to content

[WIP] feat: add optional ordering param to exam query functions - #1324

Open
brianjbuck-wgu wants to merge 3 commits into
openedx:masterfrom
WGU-Open-edX:feat/optional-ordering-params
Open

brianjbuck-wgu wants to merge 3 commits into
openedx:masterfrom
WGU-Open-edX:feat/optional-ordering-params

Conversation

@brianjbuck-wgu

@brianjbuck-wgu brianjbuck-wgu commented May 13, 2026 •

Copy link
Copy Markdown

Description:

Fixes: #1320

JIRA:

XXX-XXXX

Pre-Merge Checklist:

  • Updated the version number in edx_proctoring/__init__.py and package.json if these changes are to be released.
  • Described your changes in CHANGELOG.rst
  • Confirmed Github reports all automated tests/checks are passing.
  • Approved by at least one additional reviewer.

Post-Merge:

  • Create a tag matching the new version number.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 13, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @brianjbuck-wgu!

This repository is currently maintained by @openedx/openedx-unmaintained.

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.

🔘 Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.


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.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions May 13, 2026
@brianjbuck-wgu
brianjbuck-wgu requested a review from Copilot May 13, 2026 21:40
@mphilbrick211 mphilbrick211 added the mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). label May 14, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions May 14, 2026
@mphilbrick211

Copy link
Copy Markdown

Hi @brianjbuck-wgu! Is this still in progress?

@brianjbuck-wgu

Copy link
Copy Markdown
Author

Hi @brianjbuck-wgu! Is this still in progress?

Hi @mphilbrick211, Yes, let me keep this one open and put it on the schedule next week to finish up.

@brianjbuck-wgu
brianjbuck-wgu force-pushed the feat/optional-ordering-params branch from 7758d54 to 3776a7e Compare October 27, 2026 22:28
@brianjbuck-wgu
brianjbuck-wgu marked this pull request as ready for review October 27, 2026 22:28
@brianjbuck-wgu

Copy link
Copy Markdown
Author

Hi @mphilbrick211, I've rebased this onto master. Who would be a good option to tag for review on this repo?

@mphilbrick211 mphilbrick211 moved this from Waiting on Author to Ready for Review in Contributions Oct 28, 2026
@mphilbrick211

Copy link
Copy Markdown

@openedx/axim-engineering would someone be able to take a look at this for us? Thanks!

@brianjbuck-wgu

Copy link
Copy Markdown
Author

@openedx/axim-engineering Can I get a review on this PR? 🙏

@mphilbrick211
mphilbrick211 requested a review from feanil November 4, 2026 15:15

@feanil feanil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A couple of small things and a rebase before we can land this. Also the PR title still say "WIP" is that still true?

Comment thread edx_proctoring/api.py


def get_allowances_for_course(course_id):
def get_allowances_for_course(course_id, ordering=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add ordering to the docstring here and on the other three functions? These are the public API so the argument should be documented where people look for it.

Comment thread edx_proctoring/api.py
Returns all the exam attempts for the course id.
"""
exam_attempts = ProctoredExamStudentAttempt.objects.get_all_exam_attempts(course_id)
if ordering:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

order_by takes any number of fields, and the platform side will get a list from DRF's ordering param, so I think this should accept an iterable and do order_by(*ordering). If you'd rather keep it a single string, say so in the docstring since it's a Django field expression (user__username), not the dotted path the dashboard uses today.

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: Ready for Review

Development

Successfully merging this pull request may close these issues.

Update Exam Functions to Allow Optional Ordering Params

4 participants