diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index a23d0ef1f0..5b1a57f20b 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -26,6 +26,7 @@ V1_SETTINGS_ATTRIBUTES = [ "max_to_calibrate", "peer_grader_count", "required_peer_grading", + "peer_grade_finished_submissions_when_none_pending", ] V1_STUDENT_ATTRIBUTES = [ @@ -303,6 +304,14 @@ class CombinedOpenEndedFields(object): scope=Scope.settings, values={"min": 1, "step": "1", "max": 5} ) + peer_grade_finished_submissions_when_none_pending = Boolean( + display_name='Allow "overgrading" of peer submissions', + help=("Allow students to peer grade submissions that already have the requisite number of graders, " + "but ONLY WHEN all submissions they are eligible to grade already have enough graders. " + "This is intended for use when settings for `Required Peer Grading` > `Peer Graders per Response`"), + default=False, + scope=Scope.settings, + ) markdown = String( help="Markdown source of this module", default=textwrap.dedent("""\ 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 083998b323..45a5379683 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 @@ -127,6 +127,9 @@ class CombinedOpenEndedV1Module(): self.peer_grader_count = instance_state.get('peer_grader_count', 3) self.min_to_calibrate = instance_state.get('min_to_calibrate', 3) self.max_to_calibrate = instance_state.get('max_to_calibrate', 6) + self.peer_grade_finished_submissions_when_none_pending = instance_state.get( + 'peer_grade_finished_submissions_when_none_pending', False + ) due_date = instance_state.get('due', None) @@ -158,6 +161,9 @@ class CombinedOpenEndedV1Module(): 'peer_grader_count': self.peer_grader_count, 'min_to_calibrate': self.min_to_calibrate, 'max_to_calibrate': self.max_to_calibrate, + 'peer_grade_finished_submissions_when_none_pending': ( + self.peer_grade_finished_submissions_when_none_pending + ), } } diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index 5944910bab..5d11a4924f 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -74,6 +74,7 @@ class OpenEndedChildTest(unittest.TestCase): 'peer_grader_count': 1, 'min_to_calibrate': 3, 'max_to_calibrate': 6, + 'peer_grade_finished_submissions_when_none_pending': False, } } definition = Mock() @@ -197,6 +198,7 @@ class OpenEndedModuleTest(unittest.TestCase): 'peer_grader_count': 1, 'min_to_calibrate': 3, 'max_to_calibrate': 6, + 'peer_grade_finished_submissions_when_none_pending': False, } } diff --git a/common/lib/xmodule/xmodule/tests/test_self_assessment.py b/common/lib/xmodule/xmodule/tests/test_self_assessment.py index 2dec24daa1..d18d82a089 100644 --- a/common/lib/xmodule/xmodule/tests/test_self_assessment.py +++ b/common/lib/xmodule/xmodule/tests/test_self_assessment.py @@ -55,6 +55,7 @@ class SelfAssessmentTest(unittest.TestCase): 'peer_grader_count': 1, 'min_to_calibrate': 3, 'max_to_calibrate': 6, + 'peer_grade_finished_submissions_when_none_pending': False, } } diff --git a/lms/templates/peer_grading/peer_grading.html b/lms/templates/peer_grading/peer_grading.html index b0dffe8f9d..101e6341f5 100644 --- a/lms/templates/peer_grading/peer_grading.html +++ b/lms/templates/peer_grading/peer_grading.html @@ -1,4 +1,17 @@ <%! from django.utils.translation import ugettext as _ %> +<% +nothing_to_grade_message = _( +""" +{p_tag}You currently do not having any peer grading to do. In order to have peer grading to do: +{ul_tag} +{li_tag}You need to have submitted a response to a peer grading problem.{end_li_tag} +{li_tag}The instructor needs to score the essays that are used to help you better understand the grading +criteria.{end_li_tag} +{li_tag}There must be submissions that are waiting for grading.{end_li_tag} +{end_ul_tag} +{end_p_tag} +""").format(p_tag="
", end_p_tag="
", ul_tag="