-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Use configured DEFAULT_GRADE_DESIGNATIONS #1227
Conversation
Thanks for the pull request, @xitij2000! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
f96bc89
to
519ee38
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1227 +/- ##
==========================================
+ Coverage 93.16% 93.24% +0.07%
==========================================
Files 1054 1052 -2
Lines 20467 20450 -17
Branches 4358 4289 -69
==========================================
Hits 19068 19068
+ Misses 1339 1322 -17
Partials 60 60 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires fixing.
@@ -81,7 +81,7 @@ | |||
.grading-scale-segment-content { | |||
display: flex; | |||
flex-direction: column; | |||
margin-right: 1.25rem; | |||
//margin-right: 1.25rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it?
<input | ||
className="grading-scale-segment-content-title m-0" | ||
data-testid="grading-scale-segment-input" | ||
value={getLettersOnLongScale(idx, letters, gradingSegments)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xitij2000 I think the description of the getLettersOnShortScale
and it's long alternatives are wrong.
@@ -156,6 +160,7 @@ const GradingSettings = ({ intl, courseId }) => { | |||
resetDataRef={resetDataRef} | |||
setOverrideInternetConnectionAlert={setOverrideInternetConnectionAlert} | |||
setEligibleGrade={setEligibleGrade} | |||
defaultGradeDesignations={gradingSettings.defaultGradeDesignations} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xitij2000 When trying to test the changes locally I'm getting an error on this line, since gradingSettings
doesn't seem to be defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprisingly I never faced this issue, but I can understand why it'd happen. Hopefully the latest commits fix this.
👍 Please update the PR description by adding the testing instructions. After that can be merged.
|
e468f2b
to
0c1d685
Compare
@@ -9,6 +9,7 @@ | |||
height: 3.125rem; | |||
width: 100%; | |||
border: 1px solid $black; | |||
overflow: hidden; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is added because the text elements in the segment can overflow and interfere with the add segment button.
if (prevSegments.length >= 5) { | ||
const segSize = MAXIMUM_SCALE_LENGTH / (prevSegments.length + 1); | ||
return Array.from({ length: prevSegments.length + 1 }).map((_, i) => ( | ||
{ | ||
current: 100 - i * segSize, | ||
previous: 100 - (i + 1) * segSize, | ||
} | ||
)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the number of segments is more than 5 this will switch to just splitting the segments evenly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of the return statement here the "showSavePrompt" below is not triggered I am investigating a bit more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@farhaanbukhsh Thanks for identifying an fixing this! I'll incorporate your fix into my pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this in hosted devstack and it looks good to me!
@xitij2000 Please have a look at open-craft#73 something that should be included in the PR, we can just cherry-pick the commit :) |
7930f89
to
dabfc0b
Compare
Support was recently added to edx-platform to add customisised default grade designations, this change adds support for them to this MFE as well to bring it to partiy with the edx-platform UI It also refactors the grading-settings page to use React Query and updates the logic used when partitioning grades by default to make it work better when there are more than 5 partitions. Co-authored-by: Farhaan Bukhsh <[email protected]>
dabfc0b
to
53519db
Compare
Description
Support was recently added to edx-platform to add customized default grade designations, this change adds support for them to this MFE as well to bring it to parity with the edx-platform UI.
It also refactors the grading-settings page to use React Query and updates the logic used when partitioning grades by default to make it work better when there are more than 5 partitions.
The original logic was to subdivide each segment as half of the previous segment, so when you go from Pass/Fail to A, B, F, it will keep F at 50% and split Pass into A and B of 25% each. Adding another segment will then split B into B and C each getting 12% roughly, adding another segment would now split C into C and D of roughly 6% each. Adding yet another segment at this point would then cause the splits of 3% and make the segment too small to be usable.
This change will update this to switch to making even splits when you go beyond 5 segments so that all grades get equal space. Author's can then choose to readjust as needed.
Testing instructions
DEFAULT_GRADE_DESIGNATIONS
in cms's settingsDEFAULT_GRADE_DESIGNATIONS
will be ignoredDEFAULT_GRADE_DESIGNATIONS
.Other information
Screencast_20240830_144834.webm
Screencast_20240830_144909.webm