Skip to content

Conversation

Anas12091101
Copy link
Contributor

@Anas12091101 Anas12091101 commented Sep 29, 2025

Supporting tickets

Proposal: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5150769174/Proposal+Add+option+to+show+overall+assessment+results+after+due+date+but+hide+individual+assessment+results
openedx/platform-roadmap#460

Internal ticket: https://github.com/mitodl/hq/issues/3859

Description

This PR introduces a new visibility option for assignment scores:

“Never show individual assessment results, but show overall assessment results after the due date.”

With this option, learners cannot see question-level correctness or scores at any time. However, once the due date has passed, they can view their overall score in the total grades section on the Progress page.

Additionally, for visibility settings that depend on the due date, this PR adds a banner on the Progress page indicating that grades are not yet released, along with the relevant due date information.

edx-platfom and authoring MFE changes are required to test this PR.
edx-platform PR: openedx/edx-platform#37399
authoring MFE PR: openedx/frontend-app-authoring#2489

Screenshots

Screenshot 2025-09-29 at 10 05 05 PM Screenshot 2025-09-29 at 10 09 03 PM

Testing Instructions

  1. Use this course tarball for testing: course._4j9qu3f.tar.gz

  2. Verify that with the new visibility option:

    • Grades are included in the final course score after the due date passes.
    • Grades are not displayed in the Grade Summary table or Detailed Grades table.
  3. Confirm that subsections with the new visibility option are not listed in the Detailed Grades table.

  4. In the Grade Summary table, check two cases:

    • Mixed visibility: If some grades of an assignment type are hidden and some are visible, the visible grades appear with a “+ hidden grades” label (e.g., Lab exam in the screenshot).
    • Fully hidden: If all grades of an assignment type are hidden, a Lock icon is displayed (e.g., Final exam in the screenshot).
  • For assignments where grades are held until after the due date, verify that a warning banner is displayed. The banner should indicate the latest due date when all grades will be released.
Screenshot 2025-09-29 at 10 20 27 PM

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

openedx-webhooks commented Sep 29, 2025

Thanks for the pull request, @Anas12091101!

This repository is currently maintained by @openedx/committers-frontend-app-learning.

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.


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.

Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.92%. Comparing base (e83813d) to head (2acc837).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1797      +/-   ##
==========================================
+ Coverage   90.83%   90.92%   +0.08%     
==========================================
  Files         344      344              
  Lines        5794     5849      +55     
  Branches     1374     1392      +18     
==========================================
+ Hits         5263     5318      +55     
- Misses        512      514       +2     
+ Partials       19       17       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Anas12091101 Anas12091101 marked this pull request as draft September 29, 2025 17:59
@Anas12091101 Anas12091101 force-pushed the anas/add-new-grade-visisbility-option branch from 819f1af to d99c306 Compare September 29, 2025 18:06
@Anas12091101 Anas12091101 changed the title feat: add new subsection visibility option to not show score but include grade in final calculation in the progress page feat: add subsection visibility option to hide scores but include in final grade Sep 29, 2025
@Anas12091101 Anas12091101 marked this pull request as ready for review September 30, 2025 07:44
@Anas12091101 Anas12091101 moved this from Needs Triage to Ready for Review in Contributions Sep 30, 2025
@itsjeyd
Copy link

itsjeyd commented Sep 30, 2025

@Anas12091101 Thank you for this contribution! Since it includes user-facing changes, you'll have to get approval on the product proposal before engineering review can start.

I'll tag the team of product managers for you here.

@openedx/openedx-product-managers Could you please have a look at this PR and the corresponding product proposal, and guide @Anas12091101 on next steps?

This work might qualify as a fast-track change but I'm not completely sure. So if you could check what the right product review track would be as a first step, that would be great.

--

CC @mphilbrick211 for openedx/edx-platform#37399 and openedx/frontend-app-authoring#2489

@itsjeyd itsjeyd added the product review PR requires product review before merging label Sep 30, 2025
@itsjeyd itsjeyd moved this from Ready for Review to Product Review in Contributions Sep 30, 2025
@sarina
Copy link
Contributor

sarina commented Sep 30, 2025

@sarina
Copy link
Contributor

sarina commented Sep 30, 2025

@pdpinch remind me, did you create a Product Roadmap ticket for this? I think @itsjeyd is looking for the actual GitHub product roadmap ticket, not just the product proposal.

@sarina
Copy link
Contributor

sarina commented Sep 30, 2025

Found it. @itsjeyd openedx/platform-roadmap#460

@sarina sarina removed the product review PR requires product review before merging label Sep 30, 2025
@sarina sarina moved this from Product Review to Ready for Review in Contributions Sep 30, 2025
@pdpinch
Copy link

pdpinch commented Oct 2, 2025

@Anas12091101 can you add some screenshots for the lower part of the progress page? We'd like to see how a hidden grade is handled there versus a non-hidden one. Along with that, it would be helpful to have more explanation of how the timing is handled differently between the old "never show assessment results" and this new "... but show overall assessment results after due date"

@Anas12091101 Anas12091101 force-pushed the anas/add-new-grade-visisbility-option branch from b37a834 to c183e89 Compare October 7, 2025 10:30
Copy link
Contributor

@asadali145 asadali145 left a comment

Choose a reason for hiding this comment

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

Overall looks good—just a minor enhancement and a few message updates.

courseGradeFooterDueDateNotice: {
id: 'progress.courseGrade.footer.dueDateNotice',
defaultMessage: 'Some assignment scores are not yet included in your total grade. These grades will be released by {dueDate}.',
description: 'This shown when there are pending assignments with due date in the future',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: 'This shown when there are pending assignments with due date in the future',
description: 'This is shown when there are pending assignments with a due date in the future',

hiddenScoreLockInfoText: {
id: 'progress.hiddenScoreLockInfoText',
defaultMessage: 'Shown when scores for an assignment type are hidden yet still counted toward the course grade.',
description: 'Information text about hidden score label when learner have limited access to grades feature',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: 'Information text about hidden score label when learner have limited access to grades feature',
description: 'Information text about hidden score label when learners have limited access to grades feature',

},
hiddenScoreLockInfoText: {
id: 'progress.hiddenScoreLockInfoText',
defaultMessage: 'Shown when scores for an assignment type are hidden yet still counted toward the course grade.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultMessage: 'Shown when scores for an assignment type are hidden yet still counted toward the course grade.',
defaultMessage: 'Scores for an assignment type are hidden but still counted toward the course grade.',

}, []);

// Returns True if this subsection is "hidden"
const isSubsectionHidden = (sub) => sub.showGrades && sub.showCorrectness === 'never_but_include_grade';
Copy link
Contributor

Choose a reason for hiding this comment

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

ShowGrades is false when due date is not passed. It results in 0% instead of a lock icon.

@itsjeyd itsjeyd added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. product review complete PR has gone through product review labels Oct 8, 2025
@itsjeyd itsjeyd moved this from Ready for Review to In Eng Review in Contributions Oct 8, 2025
@Anas12091101
Copy link
Contributor Author

Anas12091101 commented Oct 8, 2025

@Anas12091101 can you add some screenshots for the lower part of the progress page? We'd like to see how a hidden grade is handled there versus a non-hidden one.

@pdpinch, In the Detailed Grades section on the MFE progress page, we’re only displaying grades for those subsections whose scores are visible.

In my test course, there are two sections, each with five subsections, configured with different visibility settings:

  • Section 1 includes subsections with “Never,” “Never but include in grade,” two “Always,” and “Always but past due” visibility.
  • Section 2 includes three “Never but include in grade” subsections and two “Always” subsections.

The learner will only see the visible subsection scores in the table, as shown in the screenshot below.

Screenshot 2025-10-08 at 3 55 26 PM

Along with that, it would be helpful to have more explanation of how the timing is handled differently between the old "never show assessment results" and this new "... but show overall assessment results after due date"

In the "Never show assessment results" option, the due date is not considered because those grades are excluded from the final results. In contrast, with the new option, the scores remain hidden from learners but are included in the final grades once the due date has passed.

@Anas12091101 Anas12091101 added waiting for eng review PR is ready for review. Review and merge it, or suggest changes. and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Oct 8, 2025
Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

The code itself seems generally fine, but as noted in the inline comment, I'm trying to understand whether the premise is being addressed properly.

Comment on lines +21 to +37
// Scores for visible grades (exclude never_but_include_grade)
const visibleScores = points.filter(
(_, idx) => visibilities[idx] !== 'never_but_include_grade',
);

// Average all scores (for totalWeightedGrade)
const overallAverage = parseFloat(
(points.reduce((a, b) => a + b, 0) / points.length).toFixed(4),
);
totalWeightedGrade = overallAverage * assignmentWeight;
if (visibleScores.length) {
const visibleAverage = parseFloat(
(visibleScores.reduce((a, b) => a + b, 0) / points.length).toFixed(4),
);
averageGrade = visibleAverage;
weightedGrade = averageGrade * assignmentWeight;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

First: I'm always leery of manipulating critical data (such as a learner's grade) in the frontend. This here seems like a pretty heavy lift. And while I'm not an expert on how grading works in the backend, I expect this is duplicating backend logic. Yes, I realize that this kind of calculation is already being done in this very file - which is unfortunate - but this is not all.

If I understand correctly from the proposal, the point of hiding scores is to prevent answer sharing. However - correct me if I'm wrong - I deduce from this that the individual scores are actually being sent to the client, so that a crafty user could in fact find out the correspondence between all answers and scores.

If the whole premise is to prevent cheating, shouldn't we avoid passing all the individual grades to the frontend in the first place?

CC @pdpinch

Copy link

Choose a reason for hiding this comment

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

Oh, yes, you are correct @arbrandes. We should be hiding these grades in the API.

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 product review complete PR has gone through product review waiting for eng review PR is ready for review. Review and merge it, or suggest changes.

Projects

Status: In Eng Review

Development

Successfully merging this pull request may close these issues.

7 participants