Commit 112677ef by Stephen Sanchez

Merge pull request #535 from edx/sanchez/zero-option-examples

Update templates so zero option criteria do not render in examples
parents 0a972b41 e44daf56
......@@ -19,7 +19,9 @@
<h2>{% trans "Scored Rubric" %}</h2>
<ol class="openassessment_training_example_criteria_selections list-input settings-list">
{% for criterion in example.criteria %}
{% include "openassessmentblock/edit/oa_training_example_criterion.html" with criterion=criterion %}
{% if criterion.options %}
{% include "openassessmentblock/edit/oa_training_example_criterion.html" with criterion=criterion %}
{% endif %}
{% endfor %}
</ol>
</div>
......
......@@ -245,11 +245,11 @@ OpenAssessment.StudentTrainingListener.prototype = {
.children().first()
.clone()
.removeAttr('id')
.attr('data-criterion', data.name)
.attr('data-criterion', data.criterionName)
.toggleClass('is--hidden', false)
.appendTo(".openassessment_training_example_criteria_selections", view);
criterion.find(".openassessment_training_example_criterion_option").attr('data-criterion', data.name);
criterion.find(".openassessment_training_example_criterion_option").attr('data-criterion', data.criterionName);
criterion.find(".openassessment_training_example_criterion_name_wrapper").text(data.label);
}
......
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