From d94f28984782e2fd14f7730dff29a078cf6976c0 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 21 Apr 2020 17:31:26 +0530 Subject: Replace students list of names with a drop down --- yaksh/templates/yaksh/grade_user.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 7206525..14666e1 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -87,16 +87,17 @@ $(document).ready(function()
{% if status == "grade" %} {% if users %} -
- +
+
+ +
{% else %}
@@ -110,7 +111,8 @@ $(document).ready(function() {% endif %} {% endif %} -
+
+
{% if has_quiz_assignments %}  Download All Assignments -- cgit From d5cdfe91335af6c79231d41453991af29a39e96e Mon Sep 17 00:00:00 2001 From: adityacp Date: Sat, 25 Apr 2020 10:57:51 +0530 Subject: Add a search bar to search users --- yaksh/templates/yaksh/grade_user.html | 36 ++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 14666e1..f4c7d67 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -15,7 +15,24 @@ $(document).ready(function() { $("#marks_table").tablesorter({sortList: [[2,1]]}); }); +function searchNames() { + var input, filter, ul, li, a, i, txtValue; + input = document.getElementById('myInput'); + filter = input.value.toUpperCase(); + $("#myUL").toggle(); + ul = document.getElementById("myUL"); + li = ul.getElementsByTagName('li'); + for (i = 0; i < li.length; i++) { + a = li[i].getElementsByTagName("a")[0]; + txtValue = a.textContent || a.innerText; + if (txtValue.toUpperCase().indexOf(filter) > -1) { + li[i].style.display = ""; + } else { + li[i].style.display = "none"; + } + } +} {% endblock script %} @@ -92,8 +109,8 @@ $(document).ready(function() @@ -112,7 +129,6 @@ $(document).ready(function() {% endif %} {% endfor %} {% endif %} + {% if status == "grade" and users %} + + + {% endif %} {% if data %} +
Student Details -- cgit