diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index 9ab75833ca..a5faef1011 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -73,14 +73,16 @@ def combined_notifications(course, user): img_path= "" try: - notifications = json.loads(controller_qs.get_notifications(course.id,student_id, user_is_staff, last_time_viewed)) + controller_response = controller_qs.check_combined_notifications(course.id,student_id, user_is_staff, last_time_viewed) + log.debug(controller_response) + notifications = json.loads(controller_response) if notifications['success']: if notifications['overall_need_to_check']: pending_grading=True except: #Non catastrophic error, so no real action notifications = {} - log.info("Problem with getting notifications from controller query service.") + log.exception("Problem with getting notifications from controller query service.") if pending_grading: img_path = "/static/images/slider-handle.png" diff --git a/lms/djangoapps/open_ended_grading/open_ended_util.py b/lms/djangoapps/open_ended_grading/open_ended_util.py index 772e3cd08e..07744d7d2c 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_util.py +++ b/lms/djangoapps/open_ended_grading/open_ended_util.py @@ -7,6 +7,6 @@ def get_controller_url(): peer_grading_url = settings.PEER_GRADING_INTERFACE['url'] split_url = peer_grading_url.split("/") controller_url = "http://" + split_url[2] + "/grading_controller" - controller_settings=settings.PEER_GRADING_INTERFACE + controller_settings=settings.PEER_GRADING_INTERFACE.copy() controller_settings['url'] = controller_url return controller_settings diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index c617eaac3f..bfa7d89337 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -168,10 +168,10 @@ def combined_notifications(request, course_id): course = get_course_with_access(request.user, course_id, 'load') user = request.user notifications = open_ended_notifications.combined_notifications(course, user) + log.debug(notifications) response = notifications['response'] notification_tuples=open_ended_notifications.NOTIFICATION_TYPES - notification_list = [] for response_num in xrange(0,len(notification_tuples)): tag=notification_tuples[response_num][0] @@ -190,12 +190,17 @@ def combined_notifications(request, course_id): } notification_list.append(notification_item) + ajax_url = _reverse_with_slash('open_ended_notifications', course_id) combined_dict = { 'error_text' : "", 'notification_list' : notification_list, 'course' : course, + 'success' : True, + 'ajax_url' : ajax_url, } + log.debug(combined_dict) + return render_to_response('open_ended_problems/combined_notifications.html', combined_dict ) diff --git a/lms/templates/open_ended_problems/combined_notifications.html b/lms/templates/open_ended_problems/combined_notifications.html index 9fdedb2555..d14b2b9d9c 100644 --- a/lms/templates/open_ended_problems/combined_notifications.html +++ b/lms/templates/open_ended_problems/combined_notifications.html @@ -18,24 +18,24 @@

Instructions

Here are items that could potentially need your attention.

% if success: - % if len(notification_list) == 0: -
- No items require attention at the moment. -
- %else: - - %endif + % if len(notification_list) == 0: +
+ No items require attention at the moment. +
+ %else: + + %endif %endif \ No newline at end of file