From 3457b86bd023c30325cf9790372ea9eb7b39177b Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 7 Feb 2013 12:36:57 -0500 Subject: [PATCH] Fix JS, style student response box --- .../js/src/peergrading/peer_grading_problem.coffee | 13 +++++++++++++ lms/static/sass/course/_staff_grading.scss | 3 +++ 2 files changed, 16 insertions(+) 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 06a24193d4..69bd99d54a 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 @@ -180,6 +180,9 @@ class @PeerGradingProblem @content_panel = $('.content-panel') @grading_message = $('.grading-message') @grading_message.hide() + @question_header = $('.question-header') + @question_header + @question_header.click @collapse_question @grading_wrapper =$('.grading-wrapper') @calibration_feedback_panel = $('.calibration-feedback') @@ -268,6 +271,7 @@ class @PeerGradingProblem if response.calibrated and (@calibration == null or @calibration == false) @calibration = false @fetch_submission_essay() + @collapse_question() # If we were calibrating before and no longer need to, # show the interstitial page else if response.calibrated and @calibration == true @@ -433,3 +437,12 @@ class @PeerGradingProblem setup_score_selection: (max_score) => # And now hook up an event handler again $("input[class='score-selection']").change @graded_callback + + collapse_question: () => + @prompt_container.slideToggle() + @prompt_container.toggleClass('open') + if @question_header.text() == "(Hide)" + new_text = "(Show)" + else + new_text = "(Hide)" + @question_header.text(new_text) diff --git a/lms/static/sass/course/_staff_grading.scss b/lms/static/sass/course/_staff_grading.scss index acca3327e3..bd6cb10192 100644 --- a/lms/static/sass/course/_staff_grading.scss +++ b/lms/static/sass/course/_staff_grading.scss @@ -33,6 +33,9 @@ div.peer-grading{ &.submission-container{ overflow-y: auto; height: 200px; + background: #F6F6F6; + border: 1px solid #ddd; + @include clearfix; } }