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
ccfa559c
Commit
ccfa559c
authored
Jun 23, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: validate duplicate point values for rubrics with example-based assessments
parent
357113c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
openassessment/xblock/test/test_validation.py
+1
-0
openassessment/xblock/validation.py
+8
-8
No files found.
openassessment/xblock/test/test_validation.py
View file @
ccfa559c
...
...
@@ -321,6 +321,7 @@ class ValidationIntegrationTest(TestCase):
# for a particular criterion.
# This should cause a validation error with example-based assessment.
mutated_rubric
=
copy
.
deepcopy
(
self
.
RUBRIC
)
mutated_rubric
[
'criteria'
][
0
][
'options'
]
=
copy
.
deepcopy
(
self
.
CRITERION_OPTIONS
)
for
option
in
mutated_rubric
[
'criteria'
][
0
][
'options'
]:
option
[
'points'
]
=
1
...
...
openassessment/xblock/validation.py
View file @
ccfa559c
...
...
@@ -186,14 +186,14 @@ def validate_rubric(rubric_dict, current_rubric, is_released, is_example_based):
)
return
(
False
,
msg
)
# Example-based assessments impose the additional restriction
# that the point values for options must be unique within
# a particular rubric criterion.
if
is_example_based
:
duplicates
=
_duplicates
([
option
[
'points'
]
for
option
in
criterion
[
'options'
]])
if
len
(
duplicates
)
>
0
:
msg
=
_
(
u"Example-based assessments cannot have duplicate point values."
)
return
(
False
,
msg
)
# Example-based assessments impose the additional restriction
# that the point values for options must be unique within
# a particular rubric criterion.
if
is_example_based
:
duplicates
=
_duplicates
([
option
[
'points'
]
for
option
in
criterion
[
'options'
]])
if
len
(
duplicates
)
>
0
:
msg
=
_
(
u"Example-based assessments cannot have duplicate point values."
)
return
(
False
,
msg
)
# After a problem is released, authors are allowed to change text,
# but nothing that would change the point value of a rubric.
...
...
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