diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 7d299b5f68..dc6cd57730 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -250,6 +250,9 @@ class @CombinedOpenEnded @hide_rubrics() @$(@previous_rubric_sel).click @previous_rubric @$(@next_rubric_sel).click @next_rubric + if response.hide_reset + @reset_button.hide() + show_status_current: () => data = {} diff --git a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py index 54cfda514c..19c9aeb6df 100644 --- a/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_modulev1.py @@ -506,10 +506,13 @@ class CombinedOpenEndedV1Module(): student_id = self.system.anonymous_student_id success = False allowed_to_submit = True - error_string = ("You need to peer grade {0} more in order to make another submission. " - "You have graded {1}, and {2} are required. You have made {3} successful peer grading submissions.") + error_string = ("
You need to peer grade {0} more submissions in order to see your feedback.
" + "You have graded responses from {1} students, and {2} students have graded your submissions.
" + "You have made {3} submissions.
") try: - response = self.peer_gs.get_data_for_location(self.location, student_id) + response = self.peer_gs.get_data_for_location(self.location.url(), student_id) + log.info(response) count_graded = response['count_graded'] count_required = response['count_required'] student_sub_count = response['student_sub_count'] @@ -539,7 +542,7 @@ class CombinedOpenEndedV1Module(): all_responses = [] success, can_see_rubric, error = self.check_if_student_has_done_needed_grading() if not can_see_rubric: - return {'html' : error, 'success' : False} + return {'html' : self.system.render_template('{0}/combined_open_ended_hidden_results.html'.format(self.TEMPLATE_DIR), {'error' : error}), 'success' : True, 'hide_reset' : True} loop_up_to_task = self.current_task_number + 1 contexts = [] @@ -565,7 +568,7 @@ class CombinedOpenEndedV1Module(): 'results': contexts, } html = self.system.render_template('{0}/combined_open_ended_results.html'.format(self.TEMPLATE_DIR), context) - return {'html': html, 'success': True} + return {'html': html, 'success': True, 'hide_reset' : False} def get_legend(self, _data): """ diff --git a/lms/templates/combinedopenended/combined_open_ended_hidden_results.html b/lms/templates/combinedopenended/combined_open_ended_hidden_results.html new file mode 100644 index 0000000000..396a657273 --- /dev/null +++ b/lms/templates/combinedopenended/combined_open_ended_hidden_results.html @@ -0,0 +1,10 @@ +