Commit 9f7ffcaf by Sef Kloninger

Merge remote-tracking branch 'origin/giulio/peer-grading-style-release' into…

Merge remote-tracking branch 'origin/giulio/peer-grading-style-release' into edx-west/release-candidate-20130729
parents a6455099 9f6910c3
......@@ -1010,7 +1010,7 @@ class CapaModule(CapaFields, XModule):
self.system.track_function('save_problem_success', event_info)
msg = "Your answers have been saved"
if not self.max_attempts == 0:
msg += " but not graded. Hit 'Check' to grade them."
msg += " but not graded. Hit 'Submit' to grade them."
return {'success': True,
'msg': msg}
......
......@@ -92,6 +92,7 @@ class @CombinedOpenEnded
$(window).keydown @keydown_handler
$(window).keyup @keyup_handler
reinitialize: (element) ->
@wrapper=$(element).find('section.xmodule_CombinedOpenEndedModule')
@el = $(element).find('section.combined-open-ended')
......@@ -151,6 +152,8 @@ class @CombinedOpenEnded
@open_ended_child= @$('.open-ended-child')
@out_of_sync_message = 'The problem state got out of sync. Try reloading the page.'
@get_last_response(@answer_area)
# force show the prompt
@prompt_show()
......@@ -221,6 +224,12 @@ class @CombinedOpenEnded
@legend_container.after(response.html).remove()
@legend_container= $('.legend-container')
get_last_response: (@answer_area) =>
data = {}
$.postWithPrefix "#{@ajax_url}/get_last_response", data, (response) =>
if response.success
@answer_area.html(response.response).attr("disabled", true)
message_post: (event)=>
external_grader_message=$(event.target).parent().parent().parent()
evaluation_scoring = $(event.target).parent()
......@@ -267,6 +276,7 @@ class @CombinedOpenEnded
if @task_number==1 and @child_state=='assessing'
@prompt_hide()
if @child_state == 'done'
@rubric_wrapper.hide()
if @child_type=="openended"
......
......@@ -7,6 +7,7 @@ from xmodule.progress import Progress
from xmodule.stringify import stringify_children
import self_assessment_module
import open_ended_module
from functools import partial
from .combined_open_ended_rubric import CombinedOpenEndedRubric, GRADER_TYPE_IMAGE_DICT, HUMAN_GRADER_TYPE, LEGEND_LIST
log = logging.getLogger("mitx.courseware")
......@@ -465,6 +466,7 @@ class CombinedOpenEndedV1Module():
'feedback_dicts': feedback_dicts,
'grader_ids': grader_ids,
'submission_ids': submission_ids,
'success' : True
}
return last_response_dict
......@@ -615,6 +617,7 @@ class CombinedOpenEndedV1Module():
'get_combined_rubric': self.get_rubric,
'get_status': self.get_status_ajax,
'get_legend': self.get_legend,
'get_last_response': self.get_last_response_ajax,
}
if dispatch not in handlers:
......@@ -624,6 +627,9 @@ class CombinedOpenEndedV1Module():
d = handlers[dispatch](data)
return json.dumps(d, cls=ComplexEncoder)
def get_last_response_ajax(self,data):
return self.get_last_response(self.current_task_number)
def next_problem(self, _data):
"""
Called via ajax to advance to the next problem.
......
......@@ -19,14 +19,15 @@ class OpenEnded
@unflag_button.click @unflag
unflag: (event) =>
event.preventDefault()
parent_tr = $(event.target).parent().parent()
tr_children = parent_tr.children()
action_type = "unflag"
submission_id = parent_tr.data('submission-id')
student_id = parent_tr.data('student-id')
callback_func = @after_action_wrapper($(event.target), action_type)
@post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, callback_func)
if confirm "Are you sure you want to unflag this submission?"
event.preventDefault()
parent_tr = $(event.target).parent().parent()
tr_children = parent_tr.children()
action_type = "unflag"
submission_id = parent_tr.data('submission-id')
student_id = parent_tr.data('student-id')
callback_func = @after_action_wrapper($(event.target), action_type)
@post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, callback_func)
ban: (event) =>
event.preventDefault()
......
......@@ -4,7 +4,11 @@
${prompt|n}
</div>
<h4>Response</h4>
<textarea rows="${rows}" cols="${cols}" name="answer" class="answer short-form-response" id="input_${id}">${previous_answer|h}</textarea>
<textarea rows="${rows}" cols="${cols}" name="answer" class="answer short-form-response" id="input_${id}" placeholder="${previous_answer|h}">
% if state != 'initial':
${previous_answer|h}
% endif
</textarea>
<div class="message-wrapper"></div>
<div class="grader-status">
......
......@@ -56,4 +56,4 @@
%endif
%endif
</div>
</section>
</section>
\ No newline at end of file
......@@ -46,7 +46,7 @@
<p>Please include some written feedback as well.</p>
<textarea name="feedback" placeholder="Feedback for student"
class="feedback-area" cols="70" ></textarea>
<div class="flag-student-container"> This submission has explicit or pornographic content : <input type="checkbox" class="flag-checkbox" value="student_is_flagged"> </div>
<div class="flag-student-container"> This submission has explicit or offensive content : <input type="checkbox" class="flag-checkbox" value="student_is_flagged"> </div>
<div class="answer-unknown-container"> I am uncomfortable with my choices above : <input type="checkbox" class="answer-unknown-checkbox" value="answer_is_unknown"></div>
</div>
......@@ -86,9 +86,7 @@
<!-- Flag submission confirmation dialog -->
<section class="flag-submission-confirmation">
<h4> Are you sure that you want to flag this submission?</h4>
<p>
You are about to flag a submission. You should only flag a submission that contains explicit or offensive content. If the submission is not addressed to the question or is incorrect, you should give it a score of zero and accompanying feedback instead of flagging it.
</p>
<p>You are about to flag a submission. You should only flag a submission that contains explicit or offensive content. If the submission is not addressed to the question or is incorrect, you should give it a score of zero and accompanying feedback instead of flagging it.</p>
<div>
<input type="button" class="flag-submission-removal-button" value="Remove Flag" name="calibration-interstitial-page-button" />
<input type="button" class="flag-submission-confirmation-button" value="Keep Flag" name="calibration-interstitial-page-button" />
......
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