summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2018-02-08 11:48:34 +0530
committeradityacp2018-02-08 11:48:34 +0530
commite1f4ffc3ab43d02115e6c496bf08bea1e52af2ef (patch)
treeb6586cc46fbf38c36850238ba359561dca77cc4e
parent440c18f4e0565e0824d432b01bc2be7b8847e122 (diff)
downloadonline_test-e1f4ffc3ab43d02115e6c496bf08bea1e52af2ef.tar.gz
online_test-e1f4ffc3ab43d02115e6c496bf08bea1e52af2ef.tar.bz2
online_test-e1f4ffc3ab43d02115e6c496bf08bea1e52af2ef.zip
Change in templates
- Show error messages properly in 404.html - Show Lesson and LearningModule active/deactive status in courses.html - Disable home button for student - Add proper redirections and form submissions to edit/view question paper
-rw-r--r--yaksh/templates/404.html8
-rw-r--r--yaksh/templates/yaksh/complete.html3
-rw-r--r--yaksh/templates/yaksh/courses.html10
-rw-r--r--yaksh/templates/yaksh/design_questionpaper.html9
4 files changed, 26 insertions, 4 deletions
diff --git a/yaksh/templates/404.html b/yaksh/templates/404.html
index e9d99de..d4777f2 100644
--- a/yaksh/templates/404.html
+++ b/yaksh/templates/404.html
@@ -1,7 +1,13 @@
{% extends "base.html" %}
+{% block pagetitle %} <h2>Yaksh</h2> {% endblock %}
+
{% block content %}
+<center>
It seems that you have encountered an error
-Type of Error - {{ exception }}
+<br>
Please contact your administrator
+<br><br>
+<div class="alert alert-danger">Error Message:- {{exception}}</div>
+</center>
{% endblock %}
diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html
index e4317fe..39f60c2 100644
--- a/yaksh/templates/yaksh/complete.html
+++ b/yaksh/templates/yaksh/complete.html
@@ -36,7 +36,6 @@ width="80" alt="YAKSH"></img>{% endblock %}
{% if not module_id %}
<br><center><h4>You may now close the browser.</h4></center><br>
{% endif %}
- <a href="{{URL_ROOT}}/exam/" id="home" class="btn btn-success"> Home </a>
{% if module_id and not user == "moderator" %}
{% if first_unit %}
<a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}/1" class="btn btn-info"> Next
@@ -49,6 +48,8 @@ width="80" alt="YAKSH"></img>{% endblock %}
</span>
</a>
{% endif %}
+ {% else %}
+ <a href="{{URL_ROOT}}/exam/" id="home" class="btn btn-success"> Home </a>
{% endif %}
</center>
{% endblock content %}
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index a1fd48a..bc96bf5 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -397,6 +397,11 @@
<ul class="list-group">
<a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{lesson.id}}/">
{{ lesson.name }}</a>
+ {% if lesson.active %}
+ <span class="label label-success">Active</span>
+ {% else %}
+ <span class="label label-danger">Closed</span>
+ {% endif %}
</ul>
</td>
{% endfor %} <!-- end for lessons -->
@@ -431,6 +436,11 @@
<td>
<a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/">
{{ module.name }}</a>
+ {% if module.active %}
+ <span class="label label-success">Active</span>
+ {% else %}
+ <span class="label label-danger">Closed</span>
+ {% endif %}
</td>
<td>
<a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}">
diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html
index 829e27f..1656e2b 100644
--- a/yaksh/templates/yaksh/design_questionpaper.html
+++ b/yaksh/templates/yaksh/design_questionpaper.html
@@ -23,8 +23,13 @@ select
{% block content %}
<input type=hidden id="url_root" value={{ URL_ROOT }}>
-<form action="{{ URL_ROOT }}/exam/manage/designquestionpaper/{{ qpaper.quiz.id }}/{{ qpaper.id }}/" method="POST" id="design_q">
-<input class ="btn primary small" type="submit" name="back" id="back" value="Cancel">
+{% if course_id %}
+ <form action="{{ URL_ROOT }}/exam/manage/designquestionpaper/{{ qpaper.quiz.id }}/{{ qpaper.id }}/{{course_id}}/" method="POST" id="design_q">
+ <a href="{{URL_ROOT}}/exam/manage/courses" class="btn btn-danger">Cancel</a>
+{% else %}
+ <form action="{{ URL_ROOT }}/exam/manage/designquestionpaper/{{ qpaper.quiz.id }}/{{ qpaper.id }}/" method="POST" id="design_q">
+ <a href="{{URL_ROOT}}/exam/manage/courses/all_quizzes" class="btn btn-danger">Cancel</a>
+{% endif %}
{% csrf_token %}
<input type=hidden name="is_active" id="is_active" value="{{ state }}">
<center><b>Manual mode to design the {{lang}} Question Paper</center><br>