Commit a3c1f7c9 by Vik Paruchuri

Feedback submission moved

parent b83df64f
...@@ -20,6 +20,8 @@ class @CombinedOpenEnded ...@@ -20,6 +20,8 @@ class @CombinedOpenEnded
@next_problem_button.click @next_problem @next_problem_button.click @next_problem
# valid states: 'initial', 'assessing', 'post_assessment', 'done' # valid states: 'initial', 'assessing', 'post_assessment', 'done'
Collapsible.setCollapsibles(@el) Collapsible.setCollapsibles(@el)
@submit_evaluation_button = $('.submit-evaluation-button')
@submit_evaluation_button.click @message_post
# Where to put the rubric once we load it # Where to put the rubric once we load it
@el = $(element).find('section.open-ended-child') @el = $(element).find('section.open-ended-child')
...@@ -30,8 +32,6 @@ class @CombinedOpenEnded ...@@ -30,8 +32,6 @@ class @CombinedOpenEnded
@hint_wrapper = @$('.hint-wrapper') @hint_wrapper = @$('.hint-wrapper')
@message_wrapper = @$('.message-wrapper') @message_wrapper = @$('.message-wrapper')
@submit_button = @$('.submit-button') @submit_button = @$('.submit-button')
@submit_evaluation_button = @$('.submit-evaluation-button')
@submit_evaluation_button.click @message_post
@child_state = @el.data('state') @child_state = @el.data('state')
@child_type = @el.data('child-type') @child_type = @el.data('child-type')
if @child_type=="openended" if @child_type=="openended"
...@@ -207,7 +207,7 @@ class @CombinedOpenEnded ...@@ -207,7 +207,7 @@ class @CombinedOpenEnded
Logger.log 'message_post', @answers Logger.log 'message_post', @answers
fd = new FormData() fd = new FormData()
feedback = @$('section.evaluation textarea.feedback-on-feedback')[0].value feedback = $('section.evaluation textarea.feedback-on-feedback')[0].value
submission_id = $('div.external-grader-message div.submission_id')[0].innerHTML submission_id = $('div.external-grader-message div.submission_id')[0].innerHTML
grader_id = $('div.external-grader-message div.grader_id')[0].innerHTML grader_id = $('div.external-grader-message div.grader_id')[0].innerHTML
score = $(".evaluation-scoring input:radio[name='evaluation-score']:checked").val() score = $(".evaluation-scoring input:radio[name='evaluation-score']:checked").val()
......
...@@ -405,7 +405,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): ...@@ -405,7 +405,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
return correct return correct
def format_feedback_with_evaluation(self,feedback): def format_feedback_with_evaluation(self,feedback):
context={'msg' : feedback, id : "1", rows : 30, cols : 30} context={'msg' : feedback, 'id' : "1", 'rows' : 30, 'cols' : 30}
html= render_to_string('open_ended_evaluation.html', context) html= render_to_string('open_ended_evaluation.html', context)
return html return html
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</div> </div>
<p>Additional comments:</p> <p>Additional comments:</p>
<textarea rows="${rows}" cols="${cols}" name="feedback_${id}" class="feedback-on-feedback" id="feedback_${id}"></textarea> <textarea rows="${rows}" cols="${cols}" name="feedback_${id}" class="feedback-on-feedback" id="feedback_${id}"></textarea>
<input type="button" value="Submit Feedback" class="submit-evaluation-button" name="reset"/>
</section> </section>
</div> </div>
</div> </div>
\ No newline at end of file
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