summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-09-22 18:17:10 +0530
committerGitHub2017-09-22 18:17:10 +0530
commit347cfa08bf8c0200fb088ac374bc9c58a66d9673 (patch)
tree597c58bb0083fd1c3be72a1dbc083d7dd1144a8e
parent7419e3b3f4e14f86f21f9464843f9263638fe7a2 (diff)
parentd8ef3fe1f52fae93dfaa27591661b7871dd0a179 (diff)
downloadonline_test-347cfa08bf8c0200fb088ac374bc9c58a66d9673.tar.gz
online_test-347cfa08bf8c0200fb088ac374bc9c58a66d9673.tar.bz2
online_test-347cfa08bf8c0200fb088ac374bc9c58a66d9673.zip
Merge pull request #331 from maheshgudi/fix_change_password
Fix change password and other bug fixes.
-rw-r--r--yaksh/templates/manage.html2
-rw-r--r--yaksh/views.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html
index c9025d2..d87076d 100644
--- a/yaksh/templates/manage.html
+++ b/yaksh/templates/manage.html
@@ -17,7 +17,7 @@
<li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li>
<li><a href="{{ URL_ROOT }}/exam/manage/courses">Courses</a></li>
<li><a href="{{ URL_ROOT }}/exam/viewprofile">My Profile</a></li>
- <li><a href="{{ URL_ROOT }}/exam/changepassword">Change Password</a></li>
+ <li><a href="{{ URL_ROOT }}/exam/reset/changepassword">Change Password</a></li>
<li><a href="{{ URL_ROOT }}/exam/manage/grader"> Grader </a></li>
<li><a style='cursor:pointer' onClick='location.replace("{{URL_ROOT}}/exam/logout/");'>Log out</a></li>
</ul>
diff --git a/yaksh/views.py b/yaksh/views.py
index 3f9f622..e6da2fc 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -488,7 +488,8 @@ def show_question(request, question, paper, error_message=None, notification=Non
answers = paper.get_previous_answers(question)
if answers:
last_attempt = answers[0].answer
- context['last_attempt'] = last_attempt.encode('unicode-escape')
+ if last_attempt:
+ context['last_attempt'] = last_attempt.encode('unicode-escape')
ci = RequestContext(request)
return my_render_to_response('yaksh/question.html', context,
context_instance=ci)