skill-assessment-app/app/views/quiz/_live_code.html.erb

38 lines
1.4 KiB
Plaintext
Raw Normal View History

2016-08-01 15:16:20 -05:00
<%
option_id = "#{question.question_id}_finish-later"
checkbox_html = {class: 'checkbox',
id: "answer_#{option_id}",
2016-08-04 21:20:01 -05:00
name: "answer[#{question.input_type}][later]",
2016-08-01 15:16:20 -05:00
checked: Array(question.answer).include?('finish-later')
}
%>
2016-08-04 18:03:23 -05:00
<!-- <div class="js-error">
2016-07-27 22:16:12 -05:00
Please revisit this page with JavaScript enabled to modify your answer.
2016-08-04 18:03:23 -05:00
</div> -->
2016-07-27 22:16:12 -05:00
<%= render partial: "quiz/answer_errors", locals: {question: question, answer: @answer} %>
2016-08-05 13:10:10 -05:00
2016-08-04 22:28:20 -05:00
<div data-id="live-coder-finish-later">
<p class="warning">
This is a question where you will be asked to write code, and it utilizes a JavaScript-enabled
environment. It looks like JavaScript is not loaded.
<% unless params[:action] == 'summary' %>
Please check the box below to acknowledge that you agree to come back at a later time to finish
answering this question before you can submit the test.
<% else %>
You will need to enable JavaScript and answer this question before you can submit the test.
<% end %>
</p>
<% unless params[:action] == 'summary' %>
2016-08-01 15:16:20 -05:00
<%= form.check_box(:answer, checkbox_html, true, '') %>
2016-08-04 18:03:23 -05:00
<%= form.label(option_id, 'I will come back later to finish this code question') %>
2016-08-04 22:28:20 -05:00
<% end %>
</div>
2016-07-27 22:16:12 -05:00
<div data-id="live-coder-answer">
2016-07-29 11:00:04 -05:00
<% # answers inserted dynamically via jQuery .load()
# to check for JS capability/enabled
2016-07-27 22:16:12 -05:00
%>
</div>