Commit 3457b86b by Vik Paruchuri

Fix JS, style student response box

parent c195fe65
...@@ -180,6 +180,9 @@ class @PeerGradingProblem ...@@ -180,6 +180,9 @@ class @PeerGradingProblem
@content_panel = $('.content-panel') @content_panel = $('.content-panel')
@grading_message = $('.grading-message') @grading_message = $('.grading-message')
@grading_message.hide() @grading_message.hide()
@question_header = $('.question-header')
@question_header
@question_header.click @collapse_question
@grading_wrapper =$('.grading-wrapper') @grading_wrapper =$('.grading-wrapper')
@calibration_feedback_panel = $('.calibration-feedback') @calibration_feedback_panel = $('.calibration-feedback')
...@@ -268,6 +271,7 @@ class @PeerGradingProblem ...@@ -268,6 +271,7 @@ class @PeerGradingProblem
if response.calibrated and (@calibration == null or @calibration == false) if response.calibrated and (@calibration == null or @calibration == false)
@calibration = false @calibration = false
@fetch_submission_essay() @fetch_submission_essay()
@collapse_question()
# If we were calibrating before and no longer need to, # If we were calibrating before and no longer need to,
# show the interstitial page # show the interstitial page
else if response.calibrated and @calibration == true else if response.calibrated and @calibration == true
...@@ -433,3 +437,12 @@ class @PeerGradingProblem ...@@ -433,3 +437,12 @@ class @PeerGradingProblem
setup_score_selection: (max_score) => setup_score_selection: (max_score) =>
# And now hook up an event handler again # And now hook up an event handler again
$("input[class='score-selection']").change @graded_callback $("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)
...@@ -33,6 +33,9 @@ div.peer-grading{ ...@@ -33,6 +33,9 @@ div.peer-grading{
&.submission-container{ &.submission-container{
overflow-y: auto; overflow-y: auto;
height: 200px; height: 200px;
background: #F6F6F6;
border: 1px solid #ddd;
@include clearfix;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment