From ce995e06e3509a1340061c51dfa08a65c69eef66 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 14 Aug 2017 12:10:42 +0530 Subject: Front-end modification for improved code server Added JQuery to handle request. Sends ajax request and gets json as response. json contains token i.e uid which is answer id. Using uid, an ajax request is sent after every 2 secs till the server gives the desire result. If the code result has error then html is written on the document. If the result has correct answer then next question is displayed. *includes function for string will not work for older browers. Will substitute with a different function in next commit. --- yaksh/urls.py | 1 + 1 file changed, 1 insertion(+) (limited to 'yaksh/urls.py') diff --git a/yaksh/urls.py b/yaksh/urls.py index 5270068..6daaf46 100644 --- a/yaksh/urls.py +++ b/yaksh/urls.py @@ -20,6 +20,7 @@ urlpatterns = [ views.complete), url(r'^register/$', views.user_register, name="register"), url(r'^(?P\d+)/check/$', views.check), + url(r'^get_results/(?P\d+)/$', views.get_results), url(r'^(?P\d+)/check/(?P\d+)/(?P\d+)/$',\ views.check), url(r'^(?P\d+)/skip/(?P\d+)/(?P\d+)/$', -- cgit From ad020f9039e33fc6c29e9f0e1de8fd56c2f78406 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Fri, 8 Sep 2017 13:41:40 +0530 Subject: Modification as per comments on the PR --- yaksh/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/urls.py') diff --git a/yaksh/urls.py b/yaksh/urls.py index 3a15f99..c236640 100644 --- a/yaksh/urls.py +++ b/yaksh/urls.py @@ -20,7 +20,7 @@ urlpatterns = [ views.complete), url(r'^register/$', views.user_register, name="register"), url(r'^(?P\d+)/check/$', views.check), - url(r'^get_results/(?P\d+)/$', views.get_results), + url(r'^get_result/(?P\d+)/$', views.get_result), url(r'^(?P\d+)/check/(?P\d+)/(?P\d+)/$',\ views.check), url(r'^(?P\d+)/skip/(?P\d+)/(?P\d+)/$', -- cgit