Commit ad63c492 by Diana Huang

Minor updates to the page to handle showing Calibration feedback.

Also, allow for the hiding of the Prompt and the Rubric.
parent d2228205
......@@ -497,6 +497,7 @@ PIPELINE_JS = {
for pth in sorted(glob2.glob(PROJECT_ROOT / 'static/coffee/src/**/*.coffee'))\
if (pth not in courseware_only_js and
pth not in discussion_js and
pth not in peer_grading_js and
pth not in staff_grading_js)
] + [
'js/form.ext.js',
......
......@@ -16,7 +16,7 @@ class PeerGradingProblemBackend
# change to test each version
response =
success: true
calibrated: true
calibrated: false
else if cmd == 'show_calibration_essay'
#response =
# success: false
......@@ -41,6 +41,7 @@ class PeerGradingProblemBackend
else if cmd == 'save_calibration_essay'
response =
success: true
correct_score: 2
else if cmd == 'save_grade'
response =
success: true
......@@ -70,6 +71,7 @@ class PeerGradingProblem
@content_panel = $('.content-panel')
@grading_wrapper =$('.grading-wrapper')
@calibration_feedback_panel = $('.calibration-feedback')
@error_container = $('.error-container')
......@@ -81,8 +83,14 @@ class PeerGradingProblem
@submit_button = $('.submit-button')
@action_button = $('.action-button')
@calibration_feedback_button = $('.calibration-feedback-button')
Collapsible.setCollapsibles(@content_panel)
@action_button.click -> document.location.reload(true)
@calibration_feedback_button.click =>
@calibration_feedback_panel.hide()
@grading_wrapper.show()
@is_calibrated_check
@is_calibrated_check()
......@@ -113,7 +121,7 @@ class PeerGradingProblem
submit_calibration_essay: ()=>
data = @construct_data()
@backend.post('save_calibration_essay', data, @submission_callback)
@backend.post('save_calibration_essay', data, @calibration_callback)
submit_grade: () =>
data = @construct_data()
......@@ -143,6 +151,8 @@ class PeerGradingProblem
if response.success
# display correct grade
@grading_wrapper.hide()
@calibration_feedback_panel.show()
@calibration_feedback_panel.prepend("<p>The correct grade is: #{response.correct_score}</p>")
else if response.error
@render_error(response.error)
......@@ -233,6 +243,7 @@ class PeerGradingProblem
@setup_score_selection(response.max_score)
@submit_button.hide()
@action_button.hide()
@calibration_feedback_panel.hide()
......@@ -263,7 +274,7 @@ class PeerGradingProblem
mock_backend = false
mock_backend = true
ajax_url = $('.peer-grading').data('ajax_url')
backend = new PeerGradingProblemBackend(ajax_url, mock_backend)
$(document).ready(() -> new PeerGradingProblem(backend))
......@@ -37,7 +37,6 @@ div.peer-grading{
}
.prompt-information-container,
.submission-wrapper,
.rubric-wrapper,
.grading-container
{
......@@ -50,6 +49,10 @@ div.peer-grading{
padding: 15px;
margin-left: 0px;
}
.submission-wrapper
{
padding: 15px;
}
.meta-info-wrapper
{
background-color: #eee;
......
......@@ -43,7 +43,11 @@
</div>
</div>
<section class="prompt-wrapper">
<div class="prompt-wrapper collapsible">
<header>
<a href="javascript:void(0);">Display problem information</a>
</header>
<section>
<div class="prompt-information-container">
<h3>Question</h3>
<div class="prompt-container">
......@@ -56,6 +60,7 @@
</div>
</section>
</div>
<section class="grading-wrapper">
......@@ -85,6 +90,7 @@
</section>
</section>
<div class="calibration-feedback"><input type="button" class="calibration-feedback-button" value="Next" name="calibration-feedback-button" /></div>
<input type="button" value="Reload page" class="action-button" name="reload" />
</div>
</section>
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