-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fixed weight ignore issue on grade calculation #97
Fixed weight ignore issue on grade calculation #97
Conversation
555726d
to
50a771c
Compare
@@ -13,7 +13,7 @@ | |||
<p>No file has been uploaded.</p> | |||
<% } %> | |||
<% if (graded) { %> | |||
<p>Your score is <%= graded.score %> / <%= max_score %><br/> | |||
<p>Your score is <%= (graded.score / max_score) * weight %> / <%= weight %><br/> |
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.
@pdpinch @carsongee If weight is Zero (0), it will show grade 0 / 0 is this ok?
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.
@sfrucht do you know what standard edX behavior is for a problem with a weight of 0 ?
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.
@pdpinch A problem with weight of 0 is ungraded and does not show in the problem. See attached.
This looks good to me, it's ready to merge. Shall I hold off merging for Shira's review? |
I was wrong, there is still an outstanding issue. PeterP commented that score should only be displayed when |
Issue fixed @pwilkins |
a203592
to
fdd006b
Compare
@bdero Correct. This is what we want Shira to review. |
Shira took a look at this. It's working in the student view (courseware), but not in the progress page. It's probably not working in grade export either, although that wasn't tested. I think we have to look at how we're using the submissions_api to record student scores and see if we need to pass the weight. See https://github.com/amir-qayyum-khan/edx-sga/blob/mx_score_weight_fix/edx_sga/sga.py#L548 Hmm. Looking at http://edx-submissions-api.readthedocs.org/en/latest/api.html#submissions.api.set_score I don't see a way to pass the weight. This may require a posting to edx-code. |
@pdpinch instead of sending score and max score pair (https://github.com/amir-qayyum-khan/edx-sga/blob/mx_score_weight_fix/edx_sga/sga.py#L548) |
I spoke with Dave Ormsbee who explained that the weight is not passed to the submission_api. Instead weight is a field set on the xblock. When the progress page is rendered it uses the weight to calculate grades. I think the next step is to take a look at the progress page code and try to determine why it isn't using the correct weight. |
75d584d
to
43bbfbf
Compare
Weight ignorance issue in courseware/grade.py
If we remove grade fetch from cache i.e disable lines https://github.com/edx/edx-platform/blob/master/lms/djangoapps/courseware/grades.py#L438-440
@pdpinch @pwilkins There is issue on edX platform side which is still present. |
@amir-qayyum-khan I spoke again with Dave Ormsbee at edX and he confirmed the bug you've discovered. It should be fixed in https://github.com/edx/edx-platform/pull/7288 which hasn't merged yet. |
@amir-qayyum-khan can you take a look at the changes in https://github.com/edx/edx-platform/blob/ormsbee/grade_query_caching/lms/djangoapps/courseware/grades.py and see if it fixes the weight caching issue? |
@pdpinch it is not fix for SGA see lines.
|
@amir-qayyum-khan Since David Ormsbee's PR won't fix this, what do you propose as a next step? |
If the current state of the PR is limited to the student view (i.e. courseware) then we can merge it. The fix to the progress page will require fixes at edX. For what it's worth, ORA2 problems (peer assessment) have the same problem as SGA currently. |
When I grade a submitted file for an SGA with no weight, I do not see the grade I entered after I submit it. The instructor sees a blank space in the "Grade" column of the "Grade Submissions" panel. The student does not see any mention of a grade, only the comment that the instructor made. |
I'd like to go ahead and merge this as it fixes half of the problem -- displaying the grade/weight in the courseware view. We can open a new issue about the progress page issue.
|
I think this is consistent with other XBlocks The thinking is that if the problem is worth 0 points, we shouldn't be telling the learner how many points they got. Also, it looks odd to display something like "49 / 0"
|
43bbfbf
to
804d1c2
Compare
804d1c2
to
7273cd5
Compare
Codecov Report
@@ Coverage Diff @@
## master #97 +/- ##
==========================================
+ Coverage 92.58% 92.59% +0.01%
==========================================
Files 16 16
Lines 1550 1553 +3
Branches 94 94
==========================================
+ Hits 1435 1438 +3
Misses 106 106
Partials 9 9
Continue to review full report at Codecov.
|
close in favour of #242 |
close in favour of #242 |
HI
Background:
Done in this PR
In this PR i am using weight to calculate grade percentage. Applied this logic on two points. Images are attached to demonstrate.
Issue: #95
@pdpinch @carsongee