noscript action for live-coder questions

This commit is contained in:
Mark Moser 2016-08-11 17:20:08 -05:00
parent 356432724b
commit 33992d73c6
2 changed files with 28 additions and 24 deletions

View File

@ -11,20 +11,22 @@
<%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %> <%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %>
<div id="nojs<%= question.question_id %>" data-id="live-coder-finish-later"> <div id="nojs<%= question.question_id %>" data-id="live-coder-finish-later">
<p class="warning"> <noscript>
This is a question where you will be asked to write code, and it utilizes a JavaScript-enabled <p class="warning">
environment. It looks like JavaScript is not loaded. 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' %> <% unless params[:action] == 'summary' %>
Please check the box below to acknowledge that you agree to come back at a later time to finish <%= form.check_box(:answer, checkbox_html, true, '') %>
answering this question before you can submit the test. <%= form.label(option_id, 'I will come back later to finish this code question') %>
<% else %>
You will need to enable JavaScript and answer this question before you can submit the test.
<% end %> <% end %>
</p> </noscript>
<% unless params[:action] == 'summary' %>
<%= form.check_box(:answer, checkbox_html, true, '') %>
<%= form.label(option_id, 'I will come back later to finish this code question') %>
<% end %>
</div> </div>
<div id="answer<%= question.question_id %>" data-id="live-coder-answer" style="display: none;"> <div id="answer<%= question.question_id %>" data-id="live-coder-answer" style="display: none;">

View File

@ -11,20 +11,22 @@
<%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %> <%= render partial: "quiz/answer_errors", locals: {question: question, answer: answer} %>
<div id="nojs<%= question.question_id %>" data-id="live-coder-finish-later"> <div id="nojs<%= question.question_id %>" data-id="live-coder-finish-later">
<p class="warning"> <noscript>
This is a question where you will be asked to write code, and it utilizes a JavaScript-enabled <p class="warning">
environment. It looks like JavaScript is not loaded. 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' %> <% unless params[:action] == 'summary' %>
Please check the box below to acknowledge that you agree to come back at a later time to finish <%= form.check_box(:answer, checkbox_html, true, '') %>
answering this question before you can submit the test. <%= form.label(option_id, 'I will come back later to finish this code question') %>
<% else %>
You will need to enable JavaScript and answer this question before you can submit the test.
<% end %> <% end %>
</p> </noscript>
<% unless params[:action] == 'summary' %>
<%= form.check_box(:answer, checkbox_html, true, '') %>
<%= form.label(option_id, 'I will come back later to finish this code question') %>
<% end %>
</div> </div>
<div id="answer<%= question.question_id %>" data-id="live-coder-answer" style="display: none;"> <div id="answer<%= question.question_id %>" data-id="live-coder-answer" style="display: none;">