From a64d57ae1d12cc898feb8fc7d2ac7f9efd4ffba5 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 10 Apr 2013 16:01:56 -0400 Subject: [PATCH] Add popup when flag box is checked --- .../js/src/peergrading/peer_grading_problem.coffee | 9 +++++++++ .../peer_grading/peer_grading_problem.html | 14 +++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee index 4574ec3c93..6785ab0541 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee @@ -184,6 +184,7 @@ class @PeerGradingProblem @grading_message.hide() @question_header = $('.question-header') @question_header.click @collapse_question + @flag_submission_confirmation = $('.flag-submission-confirmation') @grading_wrapper =$('.grading-wrapper') @calibration_feedback_panel = $('.calibration-feedback') @@ -235,9 +236,13 @@ class @PeerGradingProblem @calibration_interstitial_page.hide() @is_calibrated_check() + @flag_student_checkbox.click => + @flag_box_checked() + @calibration_feedback_button.hide() @calibration_feedback_panel.hide() @error_container.hide() + @flag_submission_confirmation.hide() @is_calibrated_check() @@ -285,6 +290,10 @@ class @PeerGradingProblem # ########## + flag_box_checked: () => + if @flag_student_checkbox.is(':checked') + $( ".flag-submission-confirmation" ).dialog() + # called after we perform an is_student_calibrated check calibration_check_callback: (response) => if response.success diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index 87559ec877..aa74fd9a6b 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -43,8 +43,8 @@

Please include some written feedback as well.

-
Flag this submission for review by course staff (use if the submission contains inappropriate content)
-
I do not know how to grade this question
+
This submission has explicit or pornographic content :
+
I do not know how to grade this question :
@@ -82,6 +82,14 @@ - + +
+

Are you sure that you want to flag this submission?

+
+ Please only flag explicit or pornographic content. +
+ + +