progress bar logic

This commit is contained in:
Mark Moser
2016-07-27 22:53:14 -05:00
parent 5207b6b8fd
commit 79e1797295
4 changed files with 35 additions and 46 deletions

View File

@ -27,27 +27,11 @@
</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>
<% unless @status.on_summary %>
<div class="progress ignore-margin">
<div class="progress-bar" role="progressbar" aria-valuenow="<%= @status.progress %>"
aria-valuemin="0" aria-valuemax="100" style="width: <%= @status.progress %>%">
<span><%= @status.progress %>%</span>
</div>
<?php }
?>
-->
</div>
<% end %>