Add collapse action into staff grading view
This commit is contained in:
@@ -181,7 +181,6 @@ class @PeerGradingProblem
|
|||||||
@grading_message = $('.grading-message')
|
@grading_message = $('.grading-message')
|
||||||
@grading_message.hide()
|
@grading_message.hide()
|
||||||
@question_header = $('.question-header')
|
@question_header = $('.question-header')
|
||||||
@question_header
|
|
||||||
@question_header.click @collapse_question
|
@question_header.click @collapse_question
|
||||||
|
|
||||||
@grading_wrapper =$('.grading-wrapper')
|
@grading_wrapper =$('.grading-wrapper')
|
||||||
|
|||||||
@@ -181,6 +181,9 @@ class @StaffGrading
|
|||||||
|
|
||||||
@breadcrumbs = $('.breadcrumbs')
|
@breadcrumbs = $('.breadcrumbs')
|
||||||
|
|
||||||
|
@question_header = $('.question-header')
|
||||||
|
@question_header.click @collapse_question
|
||||||
|
|
||||||
# model state
|
# model state
|
||||||
@state = state_no_data
|
@state = state_no_data
|
||||||
@submission_id = null
|
@submission_id = null
|
||||||
@@ -429,6 +432,16 @@ class @StaffGrading
|
|||||||
else
|
else
|
||||||
@error('System got into invalid state for submission: ' + @state)
|
@error('System got into invalid state for submission: ' + @state)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# for now, just create an instance and load it...
|
# for now, just create an instance and load it...
|
||||||
mock_backend = false
|
mock_backend = false
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="prompt-information-container">
|
<div class="prompt-information-container">
|
||||||
<h3>Question</h3>
|
<h3>Question <a href="#" class="question-header">(Hide)</a> </h3>
|
||||||
<div class="prompt-container">
|
<div class="prompt-container">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user