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

25 lines
951 B
Plaintext
Raw Normal View History

2016-07-27 22:16:12 -05:00
<%
content_for :title, "Skills Assessment"
content_for :category, @question.category
content_for :footer_title, "Skills Assessment"
content_for :progress, @status.progress.to_s
2016-07-27 22:16:12 -05:00
%>
2016-07-28 08:22:05 -05:00
2016-08-01 17:06:24 -05:00
<%= form_for(@answer, url: post_answer_path(@answer.id), html:{method: :post, id: 'answer-form', data: {qid: @question.question_id}}) do |form| %>
2016-08-02 16:20:59 -05:00
2017-03-20 10:57:50 -05:00
<div><%= @question.question %></div>
<%= image_tag @question.attachment if @question.attachment.present? %>
2016-08-03 08:55:30 -05:00
2017-03-20 10:57:50 -05:00
<%= render partial: @question.input_type, locals: {question: @question, form: form, answer: @answer } %>
2016-07-27 22:16:12 -05:00
2017-03-20 10:57:50 -05:00
<% if @status.on_summary %>
<button type="submit" name="submit">Save and return to summary</button>
<% else %>
<button type="submit" name="save">Save</button>
<button type="submit" name="submit">Next &rarr;</button>
<% end %>
2016-07-27 22:16:12 -05:00
2017-03-20 10:57:50 -05:00
<%= hidden_field_tag 'answer[question_id]', @question.question_id %>
<%= hidden_field_tag 'answer[answer_id]', @question.answer_id %>
2016-07-28 08:47:34 -05:00
<% end %>