Grading test now tries a weighted problem.

This commit is contained in:
Bridger Maxwell
2012-09-20 17:38:07 -04:00
parent dfa977dbfa
commit 997c0ee1c6
2 changed files with 10 additions and 3 deletions

View File

@@ -19,7 +19,11 @@
"graded": true,
"format": "Homework"
},
"problem/H2P1": {
"weight": 4
},
"videosequence/Homework3": {
"display_name": "Homework 3",
"graded": true,

View File

@@ -754,13 +754,16 @@ class TestCourseGrader(PageLoader):
# On the second homework, we only answer half of the questions.
# Then it will be dropped when homework three becomes the higher percent
# This problem is also weighted to be 4 points (instead of default of 2)
# If the problem was unweighted the percent would have been 0.38 so we
# know it works.
self.submit_question_answer('H2P1', ['Correct', 'Correct'])
self.check_grade_percent(0.38)
self.check_grade_percent(0.42)
# Third homework
self.submit_question_answer('H3P1', ['Correct', 'Correct'])
self.check_grade_percent(0.38) # Score didn't change
self.check_grade_percent(0.42) # Score didn't change
self.submit_question_answer('H3P2', ['Correct', 'Correct'])
self.check_grade_percent(0.5) # Now homework2 dropped. Score changes