From e1f4ffc3ab43d02115e6c496bf08bea1e52af2ef Mon Sep 17 00:00:00 2001
From: adityacp
Date: Thu, 8 Feb 2018 11:48:34 +0530
Subject: 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
---
yaksh/templates/404.html | 8 +++++++-
yaksh/templates/yaksh/complete.html | 3 ++-
yaksh/templates/yaksh/courses.html | 10 ++++++++++
yaksh/templates/yaksh/design_questionpaper.html | 9 +++++++--
4 files changed, 26 insertions(+), 4 deletions(-)
(limited to 'yaksh/templates')
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 %}
Yaksh
{% endblock %}
+
{% block content %}
+
It seems that you have encountered an error
-Type of Error - {{ exception }}
+
Please contact your administrator
+
+Error Message:- {{exception}}
+
{% 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">{% endblock %}
{% if not module_id %}
You may now close the browser.
{% endif %}
- Home
{% if module_id and not user == "moderator" %}
{% if first_unit %}
Next
@@ -49,6 +48,8 @@ width="80" alt="YAKSH">{% endblock %}
{% endif %}
+ {% else %}
+ Home
{% endif %}
{% 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 @@
{{ lesson.name }}
+ {% if lesson.active %}
+ Active
+ {% else %}
+ Closed
+ {% endif %}
{% endfor %}
@@ -431,6 +436,11 @@
{{ module.name }}
+ {% if module.active %}
+ Active
+ {% else %}
+ Closed
+ {% endif %}
|
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 %}
- |