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