add counter site
This commit is contained in:
parent
3338a037be
commit
91daf51471
5 changed files with 519 additions and 1 deletions
135
counter/index.html
Normal file
135
counter/index.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="index.css">
|
||||
<style>
|
||||
.deadline {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.late {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Grades when</h1>
|
||||
<h2>AS</h2>
|
||||
<p>
|
||||
The examination of AS was at 2023-05-30.</br>
|
||||
The grade deadline <span class="deadline" data-deadline="2023-06-19"></span>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The resit of AS will be at 2023-08-04.</br>
|
||||
The grade deadline before the resit <span class="deadline" data-deadline="2023-07-21"></span>.
|
||||
</p>
|
||||
|
||||
<h2>OT</h2>
|
||||
<p>
|
||||
The hand-in of the OT report was at 2023-06-04.</br>
|
||||
The grade deadline <span class="deadline" data-deadline="2023-06-22"></span>.
|
||||
</p>
|
||||
|
||||
<h2>RP2</h2>
|
||||
<p>
|
||||
The hand-in of the RP2 report was at 2023-07-14.</br>
|
||||
The final date of re-enrolment <span class="deadline" data-deadline="2023-08-31"></span>.
|
||||
</p>
|
||||
|
||||
<h1>References</h2>
|
||||
OER-A (<a href="https://beeldbank.uva.nl/m/4ae52bce4e5d86a8/original/OER-2022-2023-FNWI-MSc-EN.pdf">link</a>):
|
||||
<ul>
|
||||
<li>The resit for an examination must not take place within ten working days of the announcement of the result of the examination being resat.</li>
|
||||
<li>The examiner determines the result (= mark) of a written examination as soon as possible, but at the latest within fifteen working days.</li>
|
||||
</ul>
|
||||
|
||||
<!--
|
||||
OER-A 2022 - 2023:
|
||||
The resit for an examination must not take place within ten working days of the announcement of the result of the examination being resat.
|
||||
The examiner determines the result (= mark) of a written examination as soon as possible, but at the latest within fifteen working days.
|
||||
|
||||
AS
|
||||
Exam date 30th May
|
||||
Deadline grade 19th June
|
||||
Retake date 4th August
|
||||
Deadline grade for resit 21st July
|
||||
|
||||
OT
|
||||
OT deadline date 4th June
|
||||
OT grade deadline 22th June
|
||||
|
||||
RP2
|
||||
RP2 handin date 14th July
|
||||
Final re-enrollment date 31th August
|
||||
-->
|
||||
<script>
|
||||
function set_deadlines() {
|
||||
const minute = 60;
|
||||
const hour = 60 * minute;
|
||||
const day = 24 * hour;
|
||||
const now = Date.now();
|
||||
const deadlines = document.getElementsByClassName('deadline');
|
||||
for (let i = 0; i < deadlines.length; ++i) {
|
||||
const deadline = deadlines[i];
|
||||
const dl_date = Date.parse(deadline.dataset.deadline);
|
||||
|
||||
var str = "";
|
||||
|
||||
str += dl_date > now ? "is at " : "was at ";
|
||||
var time_added = false;
|
||||
|
||||
str += deadline.dataset.deadline;
|
||||
str += " (";
|
||||
str += "<span";
|
||||
str += dl_date < now ? ' class="late">' : ">";
|
||||
|
||||
var timediff = Math.round((now - dl_date) / 1000);
|
||||
timediff = timediff < 0 ? -timediff : timediff
|
||||
|
||||
if (timediff >= day) {
|
||||
const days = Math.floor(timediff / day);
|
||||
str += days + " days";
|
||||
time_added = true;
|
||||
timediff -= days * day;
|
||||
}
|
||||
|
||||
if (timediff >= hour) {
|
||||
const hours = Math.floor(timediff / hour);
|
||||
if (time_added) {
|
||||
str += ", ";
|
||||
}
|
||||
str += hours + " hours";
|
||||
time_added = true;
|
||||
timediff -= hours * hour;
|
||||
}
|
||||
|
||||
if (timediff >= minute) {
|
||||
const minutes = Math.floor(timediff / minute);
|
||||
if (time_added) {
|
||||
str += ", ";
|
||||
}
|
||||
str += minutes + " minutes";
|
||||
time_added = true;
|
||||
timediff -= minutes * minute;
|
||||
}
|
||||
|
||||
if (time_added) {
|
||||
str += " and ";
|
||||
}
|
||||
str += timediff + " seconds";
|
||||
time_added = true;
|
||||
|
||||
str += dl_date > now ? " from now" : " ago";
|
||||
str += "</span>" ;
|
||||
str += ")";
|
||||
|
||||
deadline.innerHTML = str;
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(set_deadlines, 1000);
|
||||
set_deadlines();
|
||||
</script>
|
||||
</body>
|
||||
</html
|
Reference in a new issue