roughed in quiz GET views
This commit is contained in:
53
app/views/candidate/question.html.erb
Normal file
53
app/views/candidate/question.html.erb
Normal 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 }
|
||||
?>
|
||||
-->
|
8
app/views/candidate/saved.html.erb
Normal file
8
app/views/candidate/saved.html.erb
Normal 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>
|
2
app/views/candidate/summary.html.erb
Normal file
2
app/views/candidate/summary.html.erb
Normal file
@ -0,0 +1,2 @@
|
||||
<h1>Candidate#summary</h1>
|
||||
<p>Find me in app/views/candidate/summary.html.erb</p>
|
5
app/views/candidate/thankyou.html.erb
Normal file
5
app/views/candidate/thankyou.html.erb
Normal 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>
|
||||
|
43
app/views/candidate/welcome.html.erb
Normal file
43
app/views/candidate/welcome.html.erb
Normal 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—it's totally okay to say
|
||||
"I don't know"!—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>
|
Reference in New Issue
Block a user