From 28c4036a1c112f3e0e1bce2e1c0a0663aae21d11 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 28 Feb 2017 11:46:01 +0530 Subject: Show remaining time of students in monitor --- yaksh/templates/yaksh/monitor.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index b84f050..fbcca9c 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -12,6 +12,14 @@ $(document).ready(function() { $("#result-table").tablesorter({sortList: [[5,1]]}); + var papers_length = "{{papers|length}}" + for (var i=0; i < papers_length; i++){ + var time_left = $("#time_left"+[i]); + var date = new Date(null); + date.setSeconds(time_left.text()); + var result = date.toISOString().substr(11, 8); + time_left.text(result) + } }); @@ -60,7 +68,7 @@ $(document).ready(function()

Question Statisitics

Download CSV

- +
@@ -70,7 +78,7 @@ $(document).ready(function() - + @@ -80,10 +88,11 @@ $(document).ready(function() - + - + + {% endfor %} -- cgit
Name Questions answered Marks obtained Attempts Status Time Remaining
{{ paper.user.username }} {{ paper.user.profile.roll_number }} {{ paper.user.profile.institute }} {{ paper.get_answered_str }} {{ paper.get_answered_str }} {{ paper.marks_obtained }} {{ paper.answers.count }} {{ paper.status }} {{ paper.time_left }}