Remove get statements, fix module_render

This commit is contained in:
Vik Paruchuri
2013-02-04 18:27:25 -05:00
parent 009a8c5f63
commit 725f0c632c
2 changed files with 8 additions and 10 deletions

View File

@@ -259,8 +259,7 @@ class PeerGradingModule(XModule):
submission_key = get.get('submission_key')
rubric_scores = get.getlist('rubric_scores[]')
submission_flagged = get.get('submission_flagged')
log.debug("GET: {0}".format(get))
log.debug(rubric_scores)
try:
response = self.peer_gs.save_grade(location, grader_id, submission_id,
score, feedback, submission_key, rubric_scores, submission_flagged)

View File

@@ -140,13 +140,12 @@ def get_module(user, request, location, student_module_cache, course_id,
module. If there's an error, will try to return an instance of ErrorModule
if possible. If not possible, return None.
"""
#try:
location = Location(location)
descriptor = modulestore().get_instance(course_id, location, depth=depth)
return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id,
position=position, not_found_ok=not_found_ok,
wrap_xmodule_display=wrap_xmodule_display)
"""
try:
location = Location(location)
descriptor = modulestore().get_instance(course_id, location, depth=depth)
return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id,
position=position, not_found_ok=not_found_ok,
wrap_xmodule_display=wrap_xmodule_display)
except ItemNotFoundError:
if not not_found_ok:
log.exception("Error in get_module")
@@ -155,7 +154,7 @@ def get_module(user, request, location, student_module_cache, course_id,
# Something has gone terribly wrong, but still not letting it turn into a 500.
log.exception("Error in get_module")
return None
"""
def get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id,
position=None, not_found_ok=False, wrap_xmodule_display=True):