dynamically load question ID
This commit is contained in:
parent
69ad750f88
commit
58c4661607
@ -113,7 +113,7 @@ $(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
// If JavaScript is enabled, display the livecoder section dynamically
|
// If JavaScript is enabled, display the livecoder section dynamically
|
||||||
var qid = 257208768;
|
var qid = $('form#answer-form').data('qid');
|
||||||
$("[data-id='live-coder-answer']").load("/live-coder-entry/" + qid, function(){
|
$("[data-id='live-coder-answer']").load("/live-coder-entry/" + qid, function(){
|
||||||
// if it loads in, and hide "finish later" checkbox
|
// if it loads in, and hide "finish later" checkbox
|
||||||
$("[data-id='live-coder-finish-later']").addClass("hidden");
|
$("[data-id='live-coder-finish-later']").addClass("hidden");
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
content_for :footer_title, "Skills Assessment"
|
content_for :footer_title, "Skills Assessment"
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<%= form_tag(post_question_path) do %>
|
<%= form_tag post_question_path, id: 'answer-form', data: {qid: @question.question_id} do %>
|
||||||
<main class="questions_tpl">
|
<main class="questions_tpl">
|
||||||
<h2 class="question-text"><%= @question.question %></h2>
|
<h2 class="question-text"><%= @question.question %></h2>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user