Commit 9f020e22 by Vik Paruchuri

Add in some dummy values

parent a8181912
......@@ -66,7 +66,11 @@ from cms.djangoapps.models.settings.course_metadata import CourseMetadata
log = logging.getLogger(__name__)
COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video', 'peergrading', 'combinedopenended']
COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video', 'combinedopenended', 'peergrading']
ADVANCED_COMPONENT_TYPES = {
'openended' : ['combinedopenended', 'peergrading']
}
# cdodge: these are categories which should not be parented, they are detached from the hierarchy
DETACHED_CATEGORIES = ['about', 'static_tab', 'course_info']
......@@ -285,7 +289,14 @@ def edit_unit(request, location):
log.debug(templates)
for template in templates:
if template.location.category in COMPONENT_TYPES:
component_templates[template.location.category].append((
#This is a hack to create categories for different xmodules
category = template.location.category
for key in ADVANCED_COMPONENT_TYPES:
if template.location.category in ADVANCED_COMPONENT_TYPES[key]:
category = key
break
component_templates[category].append((
template.display_name,
template.location.url(),
'markdown' in template.metadata,
......
......@@ -254,6 +254,14 @@
background: url(../img/html-icon.png) center no-repeat;
}
.large-openended-icon {
display: inline-block;
width: 100px;
height: 60px;
margin-right: 5px;
background: url(../img/large-problem-icon.png) center no-repeat;
}
.large-textbook-icon {
display: inline-block;
width: 100px;
......
......@@ -456,6 +456,7 @@ class PeerGradingModule(XModule):
try:
problem_list_json = self.peer_gs.get_problem_list(self.system.course_id, self.system.anonymous_student_id)
problem_list_dict = problem_list_json
log.debug(problem_list_dict)
success = problem_list_dict['success']
if 'error' in problem_list_dict:
error_text = problem_list_dict['error']
......@@ -471,6 +472,9 @@ class PeerGradingModule(XModule):
#This is a student_facing_error
error_text = "Could not get list of problems to peer grade. Please notify course staff."
success = False
except:
log.exception("Could not contact peer grading service.")
success = False
def _find_corresponding_module_for_location(location):
......
......@@ -5,12 +5,12 @@ metadata:
showanswer: never
weight: ""
attempts: 10
max_score: 2
max_score: 1
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">
<combinedopenended attempts="10" max_score="1" display_name = "Open Ended Response" is_graded="True" version="1">
<rubric>
<rubric>
<category>
......@@ -22,15 +22,6 @@ data: |
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>
......
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