Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
a170e699
Commit
a170e699
authored
Aug 06, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #595 from edx/will/ora-780
Fix 500 error on progress page with rubric that has 0 points
parents
90e542d2
ff2ee77c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
openassessment/xblock/lms_mixin.py
+1
-0
openassessment/xblock/test/data/zero_points.xml
+14
-0
openassessment/xblock/test/test_lms.py
+4
-0
No files found.
openassessment/xblock/lms_mixin.py
View file @
a170e699
...
...
@@ -73,5 +73,6 @@ class LmsCompatibilityMixin(object):
"""
return
sum
(
max
(
option
[
"points"
]
for
option
in
criterion
[
"options"
])
if
len
(
criterion
[
"options"
])
>
0
else
0
for
criterion
in
self
.
rubric_criteria
)
openassessment/xblock/test/data/zero_points.xml
0 → 100644
View file @
a170e699
<openassessment>
<title>
Feedback only criterion
</title>
<prompt>
Test prompt
</prompt>
<rubric>
<prompt>
Test rubric prompt
</prompt>
<criterion
feedback=
"required"
>
<name>
𝖋𝖊𝖊𝖉𝖇𝖆𝖈𝖐 𝖔𝖓𝖑𝖞
</name>
<prompt>
This criterion accepts only written feedback, so it has no options
</prompt>
</criterion>
</rubric>
<assessments>
<assessment
name=
"self-assessment"
/>
</assessments>
</openassessment>
openassessment/xblock/test/test_lms.py
View file @
a170e699
...
...
@@ -18,3 +18,7 @@ class LmsMixinTest(XBlockHandlerTestCase):
@scenario
(
'data/basic_scenario.xml'
)
def
test_max_score
(
self
,
xblock
):
self
.
assertEqual
(
xblock
.
max_score
(),
20
)
@scenario
(
'data/zero_points.xml'
)
def
test_max_score_zero_option_criteria
(
self
,
xblock
):
self
.
assertEqual
(
xblock
.
max_score
(),
0
)
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