diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index 6437742aac..4463c1ca85 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -25,9 +25,26 @@ class PeerGradingProblemBackend success: true submission_id: 1 submission_key: 'abcd' - student_response: 'I am a fake calibration response' - prompt: 'Answer this question' - rubric: 'This is a rubric.' + student_response: ''' + Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. + +The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. + ''' + prompt: ''' +
Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.
+* Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?
+This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.
+ ''' + rubric: ''' +Please score your response according to how many of the above components you identified:
+ ''' max_score: 4 else if cmd == 'get_next_submission' response = @@ -80,6 +97,7 @@ class PeerGradingProblem @feedback_area = $('.feedback-area') @score_selection_container = $('.score-selection-container') + @score = null @submit_button = $('.submit-button') @action_button = $('.action-button') @@ -90,7 +108,7 @@ class PeerGradingProblem @calibration_feedback_button.click => @calibration_feedback_panel.hide() @grading_wrapper.show() - @is_calibrated_check + @is_calibrated_check() @is_calibrated_check() @@ -111,7 +129,7 @@ class PeerGradingProblem construct_data: () -> data = - score: $('input[name="score-selection"]:checked').val() + score: @score location: @location submission_id: @essay_id_input.val() submission_key: @submission_key_input.val() @@ -149,11 +167,7 @@ class PeerGradingProblem calibration_callback: (response) => if response.success - # display correct grade - @grading_wrapper.hide() - @calibration_feedback_panel.show() - @calibration_feedback_panel.prepend("The correct grade is: #{response.correct_score}
") - + @render_calibration_feedback(response) else if response.error @render_error(response.error) @@ -167,6 +181,7 @@ class PeerGradingProblem @render_error("Error occurred while submitting grade") graded_callback: (event) => + @score = event.target.value @show_submit_button() @@ -246,6 +261,20 @@ class PeerGradingProblem @calibration_feedback_panel.hide() + render_calibration_feedback: (response) => + # display correct grade + #@grading_wrapper.hide() + @calibration_feedback_panel.show() + calibration_wrapper = $('.calibration-feedback-wrapper') + calibration_wrapper.html("The score you gave was: #{@score}. The correct score is: #{response.correct_score}
") + score = parseInt(@score) + correct_score = parseInt(response.correct_score) + + if score == correct_score + calibration_wrapper.append("Congratulations! Your score matches the correct one!
") + else + calibration_wrapper.append("Please try to understand the grading critera better so that you will be more accurate next time.
") + render_error: (error_message) => @error_container.show() diff --git a/lms/static/sass/course/_staff_grading.scss b/lms/static/sass/course/_staff_grading.scss index 06a83651d7..39868ecd22 100644 --- a/lms/static/sass/course/_staff_grading.scss +++ b/lms/static/sass/course/_staff_grading.scss @@ -38,6 +38,7 @@ div.peer-grading{ .prompt-information-container, .rubric-wrapper, + .calibration-feedback-wrapper, .grading-container { border: 1px solid gray; @@ -51,6 +52,14 @@ div.peer-grading{ } .submission-wrapper { + h3 + { + margin-bottom: 15px; + } + p + { + margin-left:10px; + } padding: 15px; } .meta-info-wrapper @@ -119,6 +128,17 @@ div.peer-grading{ } } + + .collapsible + { + margin-left: 0px; + header + { + margin-top:20px; + margin-bottom:20px; + font-size: 1.2em; + } + } padding: 40px; } diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index 08fd33be66..31e8efe290 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -45,7 +45,7 @@