Skip to content

refactor: remove enhanced_staff_grader waffle flag and demo code - #2483

Draft
SujalRatnaTamrakar wants to merge 2 commits into
openedx:masterfrom
SujalRatnaTamrakar:remove-enhanced-staff-grader-flag
Draft

SujalRatnaTamrakar wants to merge 2 commits into
openedx:masterfrom
SujalRatnaTamrakar:remove-enhanced-staff-grader-flag

Conversation

@SujalRatnaTamrakar

@SujalRatnaTamrakar SujalRatnaTamrakar commented Nov 10, 2026 •

Copy link
Copy Markdown

TL;DR

Removes the openresponseassessment.enhanced_staff_grader waffle flag and the "Demo the new Grading Experience" code path it gated, making the enhanced staff grader the default staff grading experience, per the DEPR in #2250. The legacy staff grader remains available for team assignments, which the enhanced grader does not support.

JIRA

None. This implements the removal proposed in GitHub issue #2250: #2250

What changed?

  • openassessment/xblock/config_mixin.py: removed the ENHANCED_STAFF_GRADER constant, its FEATURE_TOGGLES_BY_FLAG_NAME registry entry, and the is_enhanced_staff_grader_enabled property.
  • openassessment/xblock/staff_area_mixin.py: removed the flag from the staff-area context (resolving the AU-617 TODO); the enhanced_staff_grader_url context value is unchanged.
  • openassessment/xblock/openassessmentblock.py: no longer passes ENHANCED_STAFF_GRADER in the listing view's JS context.
  • templates/legacy/staff_area/oa_staff_area.html: the enhanced "Grade Available Responses" link now renders whenever the grading URL is set and the assignment is not a team assignment; the demo link block is deleted.
  • xblock/static/js/src/lms/oa_course_items_listing.js: the course-items link label is always "View and grade responses"; StaffCell.shouldShowLink now depends only on the team-assignment check.
  • Tests updated to match: test_config_mixin.py (the flag toggle test removed), test_staff_area.py, test_openassessment.py (the listing-view test now asserts ENHANCED_STAFF_GRADER is absent from the JS context), the JS spec oa_listing.js, and the JS fixtures templates.json.

Testing Instructions

Verified locally (Python 3.12 virtualenv, dependencies installed from the repo's pyproject test group, tests run with the repo's pytest.ini):

  • Baseline on unmodified master: the three flag-related suites pass 241 tests (test_config_mixin.py 108; test_staff_area.py and test_openassessment.py 133).
  • With this change: the same three suites pass 212 tests; the difference is exactly the 29 deleted flag-parameterized test cases.
  • Full Python suite, compared against unmodified master via git stash: 408 failed / 1,406 passed on master vs 408 failed / 1,377 passed with this change — an identical pre-existing failure set (environment issues, mostly data/CSV tests) and zero new failures.
  • A tree-wide search confirms no remaining references to enhanced_staff_grader / ENHANCED_STAFF_GRADER in source, templates, JS, specs, or fixtures. The compiled dist/ bundle also contains the flag but is a build artifact and was not hand-edited.
  • Limitation: the Karma JS suite could not run in my environment; both edited JS files pass node --check, and the JS spec was updated to cover the single surviving behavior.

Developer Checklist

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

AI assistance disclosure

This change was prepared with AI assistance: an AI coding assistant helped with the reference sweep, the edits, and the test updates. All changes were reviewed and verified by me, including the before/after test comparisons reported above.

Fixes #2250

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

Copy link
Copy Markdown

Thanks for the pull request, @SujalRatnaTamrakar!

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
🔘 Submit a signed contributor agreement (CLA)

⚠️ We ask all contributors to the Open edX project to submit a signed contributor agreement or indicate their institutional affiliation.
Please see the CONTRIBUTING file for more information.

If you've signed an agreement in the past, you may need to re-sign.
See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed.
After this time, you can re-run the CLA check by adding a comment below that you have signed it.
If the CLA check continues to fail, you can tag the @openedx/cla-problems team in a comment for further assistance.

🔘 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.

@itsjeyd

itsjeyd commented Nov 19, 2026

Copy link
Copy Markdown

Hey @SujalRatnaTamrakar, thank you for this contribution!

The next step will be for you to submit a signed CLA. See this comment for details.

@itsjeyd itsjeyd moved this from Needs Triage to Needs Tests Run or CLA Signed in Contributions Nov 19, 2026
@itsjeyd itsjeyd added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.

Projects

Status: Needs Tests Run or CLA Signed

Development

Successfully merging this pull request may close these issues.

[DEPR]: Remove enhanced staff grader demo code

3 participants