@@ -153,9 +153,11 @@ class @CombinedOpenEnded
|
||||
@rub = new Rubric(@coe)
|
||||
@rub.initialize(@location)
|
||||
@is_ctrl = false
|
||||
|
||||
#Setup reset
|
||||
@reset_button = @$(@reset_button_sel)
|
||||
@reset_button.click @reset
|
||||
@reset_button.click @confirm_reset
|
||||
|
||||
#Setup next problem
|
||||
@next_problem_button = @$(@next_step_sel)
|
||||
@next_problem_button.click @next_problem
|
||||
@@ -291,7 +293,7 @@ class @CombinedOpenEnded
|
||||
else if @child_state == 'initial'
|
||||
@answer_area.attr("disabled", false)
|
||||
@submit_button.prop('value', 'Submit')
|
||||
@submit_button.click @save_answer
|
||||
@submit_button.click @confirm_save_answer
|
||||
@setup_file_upload()
|
||||
else if @child_state == 'assessing'
|
||||
@answer_area.attr("disabled", true)
|
||||
@@ -304,7 +306,7 @@ class @CombinedOpenEnded
|
||||
@submit_button.hide()
|
||||
@queueing()
|
||||
@grader_status = @$(@grader_status_sel)
|
||||
@grader_status.html("<span class='grading'>Your response has been submitted. Please check back later for your grade.</span> ")
|
||||
@grader_status.html("<span class='grading'>Your response has been submitted. Please check back later for your grade.</span>")
|
||||
else if @child_type == "selfassessment"
|
||||
@setup_score_selection()
|
||||
else if @child_state == 'post_assessment'
|
||||
@@ -354,6 +356,9 @@ class @CombinedOpenEnded
|
||||
@can_upload_files = pre_can_upload_files
|
||||
@gentle_alert response.error
|
||||
|
||||
confirm_save_answer: (event) =>
|
||||
@save_answer(event) if confirm('Please confirm that you wish to submit your work. You will not be able to make any changes after submitting.')
|
||||
|
||||
save_answer: (event) =>
|
||||
@submit_button.attr("disabled",true)
|
||||
@submit_button.hide()
|
||||
@@ -453,6 +458,9 @@ class @CombinedOpenEnded
|
||||
else
|
||||
@errors_area.html(@out_of_sync_message)
|
||||
|
||||
confirm_reset: (event) =>
|
||||
@reset(event) if confirm('Are you sure you want to remove your previous response to this question?')
|
||||
|
||||
reset: (event) =>
|
||||
event.preventDefault()
|
||||
if @child_state == 'done' or @allow_reset=="True"
|
||||
|
||||
@@ -27,7 +27,7 @@ class @PeerGradingProblemBackend
|
||||
else
|
||||
# if this post request fails, the error callback will catch it
|
||||
$.post(@ajax_url + cmd, data, callback)
|
||||
.error => callback({success: false, error: "Error occured while performing this operation"})
|
||||
.error => callback({success: false, error: "Error occurred while performing this operation"})
|
||||
|
||||
mock: (cmd, data) ->
|
||||
if cmd == 'is_student_calibrated'
|
||||
@@ -460,8 +460,8 @@ class @PeerGradingProblem
|
||||
@flag_student_container.hide()
|
||||
@answer_unknown_container.hide()
|
||||
|
||||
@feedback_area.val("")
|
||||
|
||||
@feedback_area.val("Once you are done with training and are grading real student essays, you will be asked to share feedback with them in addition to grading their rubric.")
|
||||
@feedback_area.attr('disabled', true)
|
||||
@submit_button.show()
|
||||
@submit_button.unbind('click')
|
||||
@submit_button.click @submit_calibration_essay
|
||||
@@ -499,6 +499,7 @@ class @PeerGradingProblem
|
||||
@change_tracker.rebindTracker()
|
||||
else
|
||||
@feedback_area.val("")
|
||||
@feedback_area.attr('disabled', false)
|
||||
@answer_unknown_checkbox.removeAttr("checked")
|
||||
@flag_student_checkbox.removeAttr("checked")
|
||||
@submit_button.show()
|
||||
@@ -509,7 +510,7 @@ class @PeerGradingProblem
|
||||
else if response.error
|
||||
@render_error(response.error)
|
||||
else
|
||||
@render_error("An error occured when retrieving the next submission.")
|
||||
@render_error("An error occurred when retrieving the next submission.")
|
||||
|
||||
make_paragraphs: (text) ->
|
||||
paragraph_split = text.split(/\n\s*\n/)
|
||||
|
||||
@@ -70,8 +70,8 @@ ALERT_DICT = {
|
||||
'Flagged Submissions': "Submissions have been flagged for review"
|
||||
}
|
||||
|
||||
STUDENT_ERROR_MESSAGE = "Error occured while contacting the grading service. Please notify course staff."
|
||||
STAFF_ERROR_MESSAGE = "Error occured while contacting the grading service. Please notify the development team. If you do not have a point of contact, please email Vik at vik@edx.org"
|
||||
STUDENT_ERROR_MESSAGE = "Error occurred while contacting the grading service. Please notify course staff."
|
||||
STAFF_ERROR_MESSAGE = "Error occurred while contacting the grading service. Please notify the development team. If you do not have a point of contact, please email Vik at vik@edx.org"
|
||||
|
||||
|
||||
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
|
||||
|
||||
@@ -41,7 +41,7 @@ class OpenEnded
|
||||
post: (cmd, data, callback) ->
|
||||
# if this post request fails, the error callback will catch it
|
||||
$.post(@ajax_url + cmd, data, callback)
|
||||
.error => callback({success: false, error: "Error occured while performing javascript ajax post."})
|
||||
.error => callback({success: false, error: "Error occurred while performing javascript ajax post."})
|
||||
|
||||
after_action_wrapper: (target, action_type) ->
|
||||
tr_parent = target.parent().parent()
|
||||
|
||||
@@ -142,7 +142,7 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t
|
||||
else
|
||||
# TODO: replace with postWithPrefix when that's loaded
|
||||
$.post(@ajax_url + cmd, data, callback)
|
||||
.error => callback({success: false, error: "Error occured while performing javascript AJAX post."})
|
||||
.error => callback({success: false, error: "Error occurred while performing javascript AJAX post."})
|
||||
|
||||
|
||||
class @StaffGrading
|
||||
|
||||
Reference in New Issue
Block a user