Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
79ffd725
Commit
79ffd725
authored
Apr 16, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests for new weighting method.
parent
e3b39787
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
22 deletions
+6
-22
djangoapps/courseware/grades.py
+0
-1
djangoapps/courseware/tests.py
+6
-21
No files found.
djangoapps/courseware/grades.py
View file @
79ffd725
...
...
@@ -331,7 +331,6 @@ def grade_sheet(student):
response_by_id
[
response
.
module_id
]
=
response
totaled_scores
=
{}
chapters
=
[]
for
c
in
xmlChapters
:
...
...
djangoapps/courseware/tests.py
View file @
79ffd725
...
...
@@ -66,33 +66,18 @@ class GradesheetTest(unittest.TestCase):
scores
.
append
(
Score
(
earned
=
0
,
possible
=
5
,
graded
=
False
,
section
=
"summary"
))
all
,
graded
=
aggregate_scores
(
scores
)
self
.
assertEqual
(
all
,
Score
(
earned
=
0
,
possible
=
1
,
graded
=
False
,
section
=
"summary"
))
self
.
assertEqual
(
all
,
Score
(
earned
=
0
,
possible
=
5
,
graded
=
False
,
section
=
"summary"
))
self
.
assertEqual
(
graded
,
Score
(
earned
=
0
,
possible
=
0
,
graded
=
True
,
section
=
"summary"
))
scores
.
append
(
Score
(
earned
=
3
,
possible
=
5
,
graded
=
True
,
section
=
"summary"
))
all
,
graded
=
aggregate_scores
(
scores
)
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
3
.0
/
5
,
possible
=
2
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
3
.0
/
5
,
possible
=
1
,
graded
=
True
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
3
,
possible
=
10
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
3
,
possible
=
5
,
graded
=
True
,
section
=
"summary"
))
scores
.
append
(
Score
(
earned
=
2
,
possible
=
5
,
weight
=
2
,
graded
=
True
,
section
=
"summary"
))
scores
.
append
(
Score
(
earned
=
2
,
possible
=
5
,
graded
=
True
,
section
=
"summary"
))
all
,
graded
=
aggregate_scores
(
scores
)
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
7.0
/
5
,
possible
=
4
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
7.0
/
5
,
possible
=
3
,
graded
=
True
,
section
=
"summary"
))
scores
.
append
(
Score
(
earned
=
2
,
possible
=
5
,
weight
=
0
,
graded
=
True
,
section
=
"summary"
))
all
,
graded
=
aggregate_scores
(
scores
)
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
7.0
/
5
,
possible
=
4
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
7.0
/
5
,
possible
=
3
,
graded
=
True
,
section
=
"summary"
))
scores
.
append
(
Score
(
earned
=
2
,
possible
=
5
,
weight
=
3
,
graded
=
False
,
section
=
"summary"
))
all
,
graded
=
aggregate_scores
(
scores
)
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
13.0
/
5
,
possible
=
7
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
7.0
/
5
,
possible
=
3
,
graded
=
True
,
section
=
"summary"
))
scores
.
append
(
Score
(
earned
=
2
,
possible
=
5
,
weight
=.
5
,
graded
=
True
,
section
=
"summary"
))
all
,
graded
=
aggregate_scores
(
scores
)
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
14.0
/
5
,
possible
=
7.5
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
8.0
/
5
,
possible
=
3.5
,
graded
=
True
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
all
,
Score
(
earned
=
5
,
possible
=
15
,
graded
=
False
,
section
=
"summary"
))
self
.
assertAlmostEqual
(
graded
,
Score
(
earned
=
5
,
possible
=
10
,
graded
=
True
,
section
=
"summary"
))
class
GraderTest
(
unittest
.
TestCase
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment