Commit 725f0c63 by Vik Paruchuri

Remove get statements, fix module_render

parent 009a8c5f
...@@ -259,8 +259,7 @@ class PeerGradingModule(XModule): ...@@ -259,8 +259,7 @@ class PeerGradingModule(XModule):
submission_key = get.get('submission_key') submission_key = get.get('submission_key')
rubric_scores = get.getlist('rubric_scores[]') rubric_scores = get.getlist('rubric_scores[]')
submission_flagged = get.get('submission_flagged') submission_flagged = get.get('submission_flagged')
log.debug("GET: {0}".format(get))
log.debug(rubric_scores)
try: try:
response = self.peer_gs.save_grade(location, grader_id, submission_id, response = self.peer_gs.save_grade(location, grader_id, submission_id,
score, feedback, submission_key, rubric_scores, submission_flagged) score, feedback, submission_key, rubric_scores, submission_flagged)
......
...@@ -140,13 +140,12 @@ def get_module(user, request, location, student_module_cache, course_id, ...@@ -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 module. If there's an error, will try to return an instance of ErrorModule
if possible. If not possible, return None. if possible. If not possible, return None.
""" """
#try: try:
location = Location(location) location = Location(location)
descriptor = modulestore().get_instance(course_id, location, depth=depth) descriptor = modulestore().get_instance(course_id, location, depth=depth)
return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id,
position=position, not_found_ok=not_found_ok, position=position, not_found_ok=not_found_ok,
wrap_xmodule_display=wrap_xmodule_display) wrap_xmodule_display=wrap_xmodule_display)
"""
except ItemNotFoundError: except ItemNotFoundError:
if not not_found_ok: if not not_found_ok:
log.exception("Error in get_module") log.exception("Error in get_module")
...@@ -155,7 +154,7 @@ def get_module(user, request, location, student_module_cache, course_id, ...@@ -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. # Something has gone terribly wrong, but still not letting it turn into a 500.
log.exception("Error in get_module") log.exception("Error in get_module")
return None return None
"""
def get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, def get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id,
position=None, not_found_ok=False, wrap_xmodule_display=True): position=None, not_found_ok=False, wrap_xmodule_display=True):
......
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