Commit a59deaca by Eric Fischer

Criterion Names are poorly defined

parent 33eaf4ba
......@@ -27,40 +27,6 @@
}
},
"duplicate_criteria_names": {
"rubric": {
"prompts": [{"description": "Test Prompt 1."}, {"description": "Test Prompt 2."}],
"criteria": [
{
"order_num": 0,
"name": "Test criterion",
"prompt": "Test criterion prompt",
"options": [
{
"order_num": 0,
"points": 1,
"name": "No",
"explanation": "No explanation"
}
]
},
{
"order_num": 0,
"name": "Test criterion",
"prompt": "Test criterion prompt",
"options": [
{
"order_num": 0,
"points": 1,
"name": "Yes",
"explanation": "Yes explanation"
}
]
}
]
}
},
"duplicate_option_names": {
"rubric": {
"prompts": [{"description": "Test Prompt 1."}, {"description": "Test Prompt 2."}],
......
......@@ -199,14 +199,6 @@ def validate_rubric(rubric_dict, current_rubric, is_released, is_example_based,
except InvalidRubric:
return False, _(u'This rubric definition is not valid.')
# No duplicate criteria names
duplicates = _duplicates([criterion['name'] for criterion in rubric_dict['criteria']])
if len(duplicates) > 0:
msg = _(u"Criteria duplicate name(s): {duplicates}").format(
duplicates=", ".join(duplicates)
)
return False, msg
for criterion in rubric_dict['criteria']:
# No duplicate option names within a criterion
duplicates = _duplicates([option['name'] for option in criterion['options']])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment