From 8d9b3a10e8980284bf70298e44018766ec05de79 Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 30 Jan 2020 15:51:35 +0530 Subject: Change in js, templates - Replace manual django url pattern in course progress and course js - Add overflow horizontal scroll in quiz side bar - Use bootstrap input text style in quiz --- yaksh/static/yaksh/js/course.js | 7 +++---- yaksh/templates/base.html | 2 +- yaksh/templates/exam.html | 12 ++++++------ yaksh/templates/yaksh/course_progress.html | 1 + yaksh/templates/yaksh/question.html | 13 +++++++------ 5 files changed, 18 insertions(+), 17 deletions(-) (limited to 'yaksh') diff --git a/yaksh/static/yaksh/js/course.js b/yaksh/static/yaksh/js/course.js index 7b3c5d9..a4b5579 100644 --- a/yaksh/static/yaksh/js/course.js +++ b/yaksh/static/yaksh/js/course.js @@ -90,8 +90,7 @@ $(document).ready(function(){ student_id = data.split("+")[1]; var status_div = $("#show_status_"+course_id+"_"+student_id); if(!status_div.is(":visible")){ - var get_url = window.location.protocol + "//" + window.location.host + - "/exam/manage/get_user_status/" + course_id + "/" + student_id; + var get_url = $("#url-"+student_id).attr("data-url"); $.ajax({ url: get_url, timeout: 8000, @@ -99,8 +98,8 @@ $(document).ready(function(){ dataType: "json", contentType: 'application/json; charset=utf-8', success: function(data) { - status_div.toggle(); - status_div.html(data.user_data); + status_div.toggle(); + status_div.html(data.user_data); }, error: function(jqXHR, textStatus) { alert("Unable to get user data. Please Try again later."); diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html index 0cfe8a3..c70c265 100644 --- a/yaksh/templates/base.html +++ b/yaksh/templates/base.html @@ -49,7 +49,7 @@
- Checking... + Checking...
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 6480cce..d59674c 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -13,8 +13,8 @@