Commit a8181912 by Vik Paruchuri

Prelim support for combinedopenended and peergrading types

parent c24ba23e
......@@ -66,7 +66,7 @@ from cms.djangoapps.models.settings.course_metadata import CourseMetadata
log = logging.getLogger(__name__)
COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video']
COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video', 'peergrading', 'combinedopenended']
# cdodge: these are categories which should not be parented, they are detached from the hierarchy
DETACHED_CATEGORIES = ['about', 'static_tab', 'course_info']
......@@ -282,6 +282,7 @@ def edit_unit(request, location):
component_templates = defaultdict(list)
templates = modulestore().get_items(Location('i4x', 'edx', 'templates'))
log.debug(templates)
for template in templates:
if template.location.category in COMPONENT_TYPES:
component_templates[template.location.category].append((
......
---
metadata:
display_name: Open Ended Response
rerandomize: never
showanswer: never
weight: ""
attempts: 10
max_score: 2
is_graded: False
version: 1
display_name: Test Question
data: |
<combinedopenended attempts="10" max_score="2" display_name = "Test Question" is_graded="True" version="1">
<rubric>
<rubric>
<category>
<description>Category 1</description>
<option>
The response does not incorporate what is needed for a one response.
</option>
<option>
The response is correct for category 1.
</option>
</category>
<category>
<description> Hydrophobia </description>
<option>
The response does not incorporate what is needed for a one response.
</option>
<option>
The response is correct for category 2.
</option>
</category>
</rubric>
</rubric>
<prompt>
<p>Why is the sky blue?</p>
</prompt>
<task>
<selfassessment/>
</task>
<task>
<openended min_score_to_attempt="1" max_score_to_attempt="2">
<openendedparam>
<initial_display>Enter essay here.</initial_display>
<answer_display>This is the answer.</answer_display>
<grader_payload>{"grader_settings" : "peer_grading.conf", "problem_id" : "700x/Demo"}</grader_payload>
</openendedparam>
</openended>
</task>
</combinedopenended>
children: []
---
metadata:
display_name: Peer Grading Interface
rerandomize: never
showanswer: never
weight: ""
attempts: ""
data: |
<peergrading use_for_single_location="False" is_graded="False" display_name = "Peer Grading Panel">
</peergrading>
children: []
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