Inline response to feedback
This commit is contained in:
@@ -213,8 +213,11 @@ class CombinedOpenEndedModule(XModule):
|
||||
last_response=task.latest_answer()
|
||||
last_score = task.latest_score()
|
||||
last_post_assessment = task.latest_post_assessment()
|
||||
last_post_feedback=""
|
||||
if task_type=="openended":
|
||||
last_post_assessment = task.latest_post_assessment(short_feedback=True)
|
||||
last_post_evaluation = task.format_feedback_with_evaluation(last_post_assessment)
|
||||
last_post_assessment = last_post_evaluation
|
||||
max_score = task.max_score()
|
||||
state = task.state
|
||||
last_response_dict={'response' : last_response, 'score' : last_score,
|
||||
|
||||
@@ -30,6 +30,8 @@ class @CombinedOpenEnded
|
||||
@hint_wrapper = @$('.hint-wrapper')
|
||||
@message_wrapper = @$('.message-wrapper')
|
||||
@submit_button = @$('.submit-button')
|
||||
@submit_evaluation_button = @$('.submit-evaluation-button')
|
||||
@submit_evaluation_button.click @message_post
|
||||
@child_state = @el.data('state')
|
||||
@child_type = @el.data('child-type')
|
||||
if @child_type=="openended"
|
||||
@@ -134,7 +136,6 @@ class @CombinedOpenEnded
|
||||
else
|
||||
@errors_area.html('Problem state got out of sync. Try reloading the page.')
|
||||
|
||||
|
||||
save_hint: (event) =>
|
||||
event.preventDefault()
|
||||
if @child_state == 'post_assessment'
|
||||
|
||||
@@ -404,6 +404,11 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
|
||||
correct = (score_ratio >= 0.66)
|
||||
return correct
|
||||
|
||||
def format_feedback_with_evaluation(self,feedback):
|
||||
context={'msg' : feedback, id : "1", rows : 30, cols : 30}
|
||||
html= render_to_string('open_ended_evaluation.html', context)
|
||||
return html
|
||||
|
||||
def handle_ajax(self, dispatch, get, system):
|
||||
'''
|
||||
This is called by courseware.module_render, to handle an AJAX call.
|
||||
|
||||
Reference in New Issue
Block a user