Skip to content
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

Import exam grades: ignore no score rows #4759

Merged
merged 2 commits into from
Jan 22, 2021

Conversation

annagav
Copy link
Contributor

@annagav annagav commented Jan 19, 2021

What are the relevant tickets?

Fix #4756

What's this PR do?

Update the management command to ignore records that do not have a score.

How should this be manually tested?

Run the management command:
./manage.py import_edx_exam_grades <file>

@odlbot odlbot temporarily deployed to micromasters-ci-pr-4759 January 19, 2021 23:37 Inactive
@codecov-io
Copy link

codecov-io commented Jan 19, 2021

Codecov Report

Merging #4759 (36a42bf) into master (4b4830a) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4759      +/-   ##
==========================================
- Coverage   94.41%   94.39%   -0.03%     
==========================================
  Files         512      512              
  Lines       23344    23349       +5     
  Branches      967      967              
==========================================
  Hits        22040    22040              
- Misses       1201     1206       +5     
  Partials      103      103              
Impacted Files Coverage Δ
...xams/management/commands/import_edx_exam_grades.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b4830a...4341de1. Read the comment docs.

@arslanashraf7 arslanashraf7 self-assigned this Jan 22, 2021
@arslanashraf7 arslanashraf7 self-requested a review January 22, 2021 11:58
Copy link
Contributor

@arslanashraf7 arslanashraf7 left a comment

Choose a reason for hiding this comment

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

Looks good 👍 , Just a small change suggested. Feel free to merge on your ease.

FYI, Since i didn't have the sample file, i was able to test it after generating my own csv file with required columns.

'grade': row['grade'],
'percentage_grade': float(row['score']) / 100.0 if row['score'] else 0,
'percentage_grade': score / 100.0 if row['score'] else 0,
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
'percentage_grade': score / 100.0 if row['score'] else 0,
'percentage_grade': score / 100.0 if score else 0,

@annagav annagav merged commit 67627ec into master Jan 22, 2021
@annagav annagav deleted the ag/import_edx_grades_no_record branch January 22, 2021 15:39
@odlbot odlbot mentioned this pull request Jan 28, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Exam Grades: handle case where users attempt doesn't count
4 participants