Updated footer, added question counters.

This commit is contained in:
Vivek Santayana 2021-12-04 21:25:43 +00:00
parent 0ad4ae38fa
commit 21a7eeea21
5 changed files with 54 additions and 30 deletions

View File

@ -1,2 +1,2 @@
<p>This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at the repository under an MIT License.</p> <p>This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at <a href="https://git.vsnt.uk/viveksantayana/ska-referee-test">Vivek&rsquo;s personal GIT repository</a> under an MIT License.</p>
<p>All questions in the test are &copy; The Scottish Korfball Association {{ now.year }}. All rights are reserved.</p> <p>All questions in the test are &copy; The Scottish Korfball Association {{ now.year }}. All rights are reserved.</p>

View File

@ -375,15 +375,32 @@ function render_question() {
$progress_skipped.attr('title', `Skipped: ${skipped}`); $progress_skipped.attr('title', `Skipped: ${skipped}`);
$progress_skipped.attr('aria-valuenow', skipped); $progress_skipped.attr('aria-valuenow', skipped);
$progress_skipped.css('width', `${skipped}%`); $progress_skipped.css('width', `${skipped}%`);
$skipped_count.text(`Skipped: ${skipped}`);
if (skipped < 1) {
$skipped_count.fadeOut()
} else {
$skipped_count.fadeIn()
}
$progress_flagged.attr('title', `Flagged: ${flagged}`); $progress_flagged.attr('title', `Flagged: ${flagged}`);
$progress_flagged.attr('aria-valuenow', flagged); $progress_flagged.attr('aria-valuenow', flagged);
$progress_flagged.css('width', `${flagged}%`); $progress_flagged.css('width', `${flagged}%`);
$flagged_count.text(`Flagged: ${flagged}`);
if (flagged < 1) {
$flagged_count.fadeOut()
} else {
$flagged_count.fadeIn()
}
$progress_answered.attr('title', `Answered: ${answered}`); $progress_answered.attr('title', `Answered: ${answered}`);
$progress_answered.attr('aria-valuenow', answered); $progress_answered.attr('aria-valuenow', answered);
$progress_answered.css('width', `10%`); $progress_answered.css('width', `${answered}%`);
console.log(`Answered: ${answered}, Skipped: ${skipped}, Flagged: ${flagged}`); $answered_count.text(`Answered: ${answered}`);
if (answered < 1) {
$answered_count.fadeOut()
} else {
$answered_count.fadeIn()
}
$question_title.focus(); $question_title.focus();
$(window).scrollTop(0); $(window).scrollTop(0);
@ -610,13 +627,14 @@ const $question_header = $("#quiz-question-header");
const $question_text = $("#quiz-question-text"); const $question_text = $("#quiz-question-text");
const $question_options = $("#quiz-question-options"); const $question_options = $("#quiz-question-options");
const $progress_skipped = $("#skipped"); const $progress_skipped = $("#skipped-bar");
const $progress_answered = $("#answered"); const $progress_answered = $("#answered-bar");
const $progress_flagged = $("#flagged"); const $progress_flagged = $("#flagged-bar");
const $skipped_count = $("#skipped-count");
const $answered_count = $("#answered-count");
const $flagged_count = $("#flagged-count");
// Execution on Load // Execution on Load
apply_settings(display_settings); apply_settings(display_settings);
check_started(); check_started();
console.log($progress_answered);

View File

@ -224,9 +224,14 @@
</h1> </h1>
<div class="container question-container"> <div class="container question-container">
<div class="progress"> <div class="progress">
<div id="answered" class="progress-bar bg-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> <div id="answered-bar" class="progress-bar bg-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
<div id="flagged" class="progress-bar bg-warning" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> <div id="flagged-bar" class="progress-bar bg-warning" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
<div id="skipped" class="progress-bar progress-bar-striped bg-danger" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> <div id="skipped-bar" class="progress-bar progress-bar-striped bg-danger" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="counters">
<div id="answered-count" class="badge rounded-pill bg-success" style="display: none;">Answered: 0</div>
<div id="flagged-count" class="badge rounded-pill bg-warning"style="display: none;">Flagged: 0</div>
<div id="skipped-count" class="badge rounded-pill bg-danger progress-bar-striped"style="display: none;">Skipped: 0</div>
</div> </div>
<h4 class="question-title" id="quiz-question-title" tabindex="-1"> <h4 class="question-title" id="quiz-question-title" tabindex="-1">
Question x. Question x.

View File

@ -1,3 +1,3 @@
<p>This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at the repository under an MIT License.</p> <p>This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at <a href="https://git.vsnt.uk/viveksantayana/ska-referee-test">Vivek&rsquo;s personal GIT repository</a> under an MIT License.</p>
<p>All questions in the test are &copy; The Scottish Korfball Association {{ now.year }}. All rights are reserved.</p> <p>All questions in the test are &copy; The Scottish Korfball Association {{ now.year }}. All rights are reserved.</p>
<p>OpenDyslexic 3 is an open source typeface created by Abbie Gonzalez, licensed under a <a href="https://scripts.sil.org/OFL">SIL-OFL</a>. More information about OpenDyslexic is available <a href="https://opendyslexic.org/">on the project web site</a>.</p> <p>OpenDyslexic 3 is an open source typeface created by Abbie Gonzalez, licensed under a <a href="https://scripts.sil.org/OFL">SIL-OFL</a>. More information about OpenDyslexic is available <a href="https://opendyslexic.org/">on the project web site</a>.</p>

View File

@ -3,23 +3,24 @@
{% block content %} {% block content %}
<h1>Privacy Policy</h1> <h1>Privacy Policy</h1>
This web app stores data using cookies. The web site only stores the minimum information it needs to function.
<h5>Site Administrators</h5>
<ul> <ul>
<li>This web app stores data using cookies. The web site only stores the minimum information it needs to function.</li> <li>For site administrators, this web site uses encrypted cookies to store data from your log-in session.</li>
<li>Site Administrators</li>
<ul>
<li>For site administrators, this web site uses encrypted cookies to store data from your log-in session,</li>
<li>User information for administrators is encrypted and stored in a secure database, and are expunged when an account is deleted.</li> <li>User information for administrators is encrypted and stored in a secure database, and are expunged when an account is deleted.</li>
</ul> </ul>
<li>Test Candidates</li>
<h5>Test Candidates</h5>
<ul> <ul>
<li>The web site will not be trackin your log in, and all information about your test attempt will be stored on your device until you submit it to the server.</li> <li>The web site will not be trackin your log in, and all information about your test attempt will be stored on your device until you submit it to the server.</li>
<li>Data from your test, including identifying information such as your name and email address, will be recorded by the Scottish Korfball Association in order to oversee the training and qualification of referees.</li> <li>Data from your test, including identifying information such as your name and email address, will be recorded by the Scottish Korfball Association in order to oversee the training and qualification of referees.</li>
<li>These records will be kept for HOW MANY?? years and will be expunged securely thereafter.</li> <li>These records will be kept for three years or until the expiration of the theory exam qualification (whichever is later), and will be expunged securely thereafter.</li>
<li>All identifying information about candidates will be encrypted and stored in a secure database.</li> <li>All identifying information about candidates will be encrypted and stored in a secure database.</li>
</ul> </ul>
<li>Requests to Delete Data</li>
<h5>Requests to Delete Data</h5>
<ul> <ul>
<li>You can request to have any of your data that is held here deleted by emailing WHOM?</li> <li>You can request to have any of your data that is held here deleted by emailing <a href="mailto:refereeing@scotlandkorfball.co.uk">refereeing@scotlandkorfball.co.uk</a>.</li>
</ul>
</ul> </ul>
{% endblock %} {% endblock %}