Commit 34dc6e63 by Vik Paruchuri

Fix some issues with peer grading service

parent 7984c4df
......@@ -25,7 +25,7 @@ class PeerGradingService(GradingService):
"""
def __init__(self, config, system):
config['system'] = system
super(StaffGradingService, self).__init__(config)
super(PeerGradingService, self).__init__(config)
self.get_next_submission_url = self.url + '/get_next_submission/'
self.save_grade_url = self.url + '/save_grade/'
self.is_student_calibrated_url = self.url + '/is_student_calibrated/'
......
<peergrading display_name = "Peer Grading" use_for_single_location="False" is_graded="False"/>
......@@ -142,7 +142,8 @@ class TestPeerGradingService(ct.PageLoader):
self.mock_service = peer_grading_service.MockPeerGradingService()
self.system = ModuleSystem(None, None, None, render_to_string, None)
self.descriptor = peer_grading_module.PeerGradingDescriptor()
self.peer_module = peer_grading_module.PeerGradingModule(self.system,"","<peergrading/>",self.descriptor)
location = "i4x://edX/toy/peergrading/init"
self.peer_module = peer_grading_module.PeerGradingModule(self.system,location,"<peergrading/>",self.descriptor)
self.peer_module.peer_gs = self.mock_service
self.logout()
......
......@@ -118,7 +118,7 @@ def student_problem_list(request, course_id):
problem_list = []
base_course_url = reverse('courses')
try:
#try:
problem_list_json = controller_qs.get_grading_status_list(course_id, unique_id_for_user(request.user))
problem_list_dict = json.loads(problem_list_json)
success = problem_list_dict['success']
......@@ -140,6 +140,7 @@ def student_problem_list(request, course_id):
problem_list[i].update({'actual_url' : problem_url})
"""
except GradingServiceError:
error_text = "Error occured while contacting the grading service"
success = False
......@@ -147,6 +148,7 @@ def student_problem_list(request, course_id):
except ValueError:
error_text = "Could not get problem list"
success = False
"""
ajax_url = _reverse_with_slash('open_ended_problems', course_id)
......@@ -193,8 +195,7 @@ def flagged_problem_list(request, course_id):
success = False
ajax_url = _reverse_with_slash('open_ended_flagged_problems', course_id)
return render_to_response('open_ended_problems/open_ended_flagged_problems.html', {
context = {
'course': course,
'course_id': course_id,
'ajax_url': ajax_url,
......@@ -202,7 +203,9 @@ def flagged_problem_list(request, course_id):
'problem_list': problem_list,
'error_text': error_text,
# Checked above
'staff_access': True, })
'staff_access': True,
}
return render_to_response('open_ended_problems/open_ended_flagged_problems.html', context)
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
def combined_notifications(request, course_id):
......
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