skill-assessment-app/app/views/candidate/question.html.erb
2016-07-27 22:24:24 -05:00

54 lines
1.4 KiB
Plaintext

<%
content_for :title, "Skills Assessment"
content_for :category, @question.category
content_for :footer_title, "Skills Assessment"
%>
<form method="post" action="/question">
<main class="questions_tpl">
<h2 class="question-text"><%= @question.question %></h2>
<%= render partial: "questions/#{@question.input_type}" %>
<% if @status.on_summary %>
<div class="btn-container-summary">
<input type="submit" name="update" value="Save and return to summary">
</div>
<% else %>
<div class="btn-container-left">
<input type="submit" name="save" value="Save">
</div>
<div class="btn-container-right">
<input type="submit" name="submit" value="Next">
</div>
<% end %>
</main>
</form>
<!--
<?php
$TotalQuestions;
$progressBarValue;
//Get Total Number of Questions
$TotalQuestions = "SELECT * FROM questions";
$result = $link->query($TotalQuestions);
$TotalQuestions = $result->num_rows + 1;
$progressBarValue = round($questionId/$TotalQuestions * 100);
$_SESSION['pBarValue'] = $progressBarValue;
$pValue = $_SESSION['pBarValue'];
if(!isset($_GET['qid'])) { ?>
<div class="progress ignore-margin">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $pValue; ?>"
aria-valuemin="0" aria-valuemax="100" style="width:<?php echo $pValue; ?>%">
<span><?php echo $pValue; ?>%</span>
</div>
</div>
<?php }
?>
-->