roughed in quiz GET views

This commit is contained in:
Mark Moser
2016-07-27 22:16:12 -05:00
parent 0d5ab42158
commit 5207b6b8fd
17 changed files with 288 additions and 7 deletions

View File

@ -0,0 +1,53 @@
<%
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 }
?>
-->

View File

@ -0,0 +1,8 @@
<p>
Your test results have been saved. You can visit again later with your candidate ID to complete
the test starting from where you left off.
</p>
<div class="btn-return">
<a class="btn primary-btn" href="<%= root_path %>">Return to Test</a>
</div>

View File

@ -0,0 +1,2 @@
<h1>Candidate#summary</h1>
<p>Find me in app/views/candidate/summary.html.erb</p>

View File

@ -0,0 +1,5 @@
<p>
Your answers have been submitted. We will review and your recruiter
will contact you if we would like to set up an interview.
</p>

View File

@ -0,0 +1,43 @@
<% content_for :title, "Skills Assessment" %>
<!-- if (isset($_SESSION['candidateId'])) { ?> -->
<main class="intro_tpl">
<h1 class="prft-heading">Oops!</h1>
<p>
Looks like you hit the browser's Back button. You can't go backwards in the test,
but you'll have a chance at the end to review your answers and make changes.
</p>
<a href="questions"><button>Continue Test</button></a>
</main>
<!-- <?php } else { ?> -->
<main class="intro_tpl">
<h1 class="prft-heading">Let's Get Started</h1>
<p>
This is a skills assessment test. It's the first step in the process of interviewing
for a Front-End Development position with Perficient Digital.
</p>
<p>
The questions will test your knowledge in the areas of HTML, CSS, and JavaScript.
Please note that you can <strong>only move forward through the test</strong>, not back,
and you <strong>must attempt to answer the question</strong> before moving to the
next one. You'll have an opportunity at the end of the test to review and update your
answers if need be. At any time, you may save your progress and log back in to continue
taking the test from where you left off.
</p>
<p>
Please answer to the best of your ability&mdash;it's totally okay to say
"I don't know"!&mdash;and above all, relax and have fun! Once you submit your
answers, we will review your assessment and your recruiter will be in touch.
</p>
<form method="POST" action="assets/validate_candidate.php">
<div class="form-group">
<label for="userid">What's your User ID?</label>
<input type="text" id="userId" name="userId" required/>
</div>
<button type="submit">Begin</button>
</form>
</main>