summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2018-01-08 17:43:56 +0530
committeradityacp2018-01-08 18:36:21 +0530
commit08a4c0271535bfb24a82a07d6e881cd2b9bab470 (patch)
tree0c8fe8fd69e784054cfa34820c8fd86fa25fcedf
parentf98684da14deb2bbf76088323bc4cf8075026896 (diff)
downloadonline_test-08a4c0271535bfb24a82a07d6e881cd2b9bab470.tar.gz
online_test-08a4c0271535bfb24a82a07d6e881cd2b9bab470.tar.bz2
online_test-08a4c0271535bfb24a82a07d6e881cd2b9bab470.zip
Change in css and templates
- Allow horizontal scroll for sidebar in dashboard.css - Change templates to display all modules - Change error messages in course template
-rw-r--r--yaksh/static/yaksh/css/dashboard.css2
-rw-r--r--yaksh/templates/yaksh/complete.html4
-rw-r--r--yaksh/templates/yaksh/courses.html14
-rw-r--r--yaksh/templates/yaksh/question.html67
-rw-r--r--yaksh/templates/yaksh/show_video.html109
5 files changed, 124 insertions, 72 deletions
diff --git a/yaksh/static/yaksh/css/dashboard.css b/yaksh/static/yaksh/css/dashboard.css
index 20a0339..b5b3648 100644
--- a/yaksh/static/yaksh/css/dashboard.css
+++ b/yaksh/static/yaksh/css/dashboard.css
@@ -38,7 +38,7 @@ body {
z-index: 1000;
display: block;
padding: 20px;
- overflow-x: hidden;
+ overflow-x: auto;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: #f5f5f5;
border-right: 1px solid #eee;
diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html
index d0b7e4d..e4317fe 100644
--- a/yaksh/templates/yaksh/complete.html
+++ b/yaksh/templates/yaksh/complete.html
@@ -39,12 +39,12 @@ width="80" alt="YAKSH"></img>{% endblock %}
<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 Unit
+ <a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}/1" class="btn btn-info"> Next
<span class="glyphicon glyphicon-chevron-right">
</span>
</a>
{% else %}
- <a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}" class="btn btn-info"> Next Unit
+ <a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}" class="btn btn-info"> Next
<span class="glyphicon glyphicon-chevron-right">
</span>
</a>
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index b6b9f7e..a1fd48a 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -75,7 +75,7 @@
<span class="label label-danger">Closed</span>
{% endif %}
<br><br>
- <center><b><u>Teacher(s) Added to {{ course }}</u></b></center>
+ <center><b><u>Teacher(s) added to {{ course }}</u></b></center>
<br>
<form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post">
{% if course.get_teachers %}
@@ -93,7 +93,7 @@
<button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course">Remove Teachers</button>
</div>
{% else %}
- <center><b>No Teacher(s) Added</b></center>
+ <center><b>No Teacher(s) added</b></center>
{% endif %}
</form>
<br><br>
@@ -209,7 +209,7 @@
<center><b><u> Course Creator</u></b><br>
<h4>{{course.creator.get_full_name.title}}</h4>
</center><br>
- <center><b><u>Teacher(s) Added to {{ course }}</u></b></center>
+ <center><b><u>Teacher(s) added to {{ course }}</u></b></center>
<br>
<form action="{{URL_ROOT}}/exam/manage/remove_teachers/{{ course.id }}/" method="post">
{% if course.get_teachers %}
@@ -228,7 +228,7 @@
<button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course">Remove Teachers</button>
</div>
{% else %}
- <center><b>No Teacher(s) Added</b></center>
+ <center><b>No Teacher(s) added</b></center>
{% endif %}
</form>
<br><br>
@@ -326,7 +326,7 @@
<a href="{{URL_ROOT}}/exam/manage/addquiz/" class="btn btn-primary">Add New Quiz</a>
<a href="{{URL_ROOT}}/exam/manage/add_exercise/" class="btn btn-primary">Add New Exercise</a>
{% if not quizzes %}
- <center><h4> No new Quiz Added</h4></center>
+ <center><h4> No new Quiz added</h4></center>
<br><br>
{% else %}
<center><h3> Quizzes </h3></center>
@@ -380,7 +380,7 @@
{% if type == "lesson" %}
<a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/" class="btn btn-primary">Add new Lesson</a>
{% if not lessons %}
- <center><h4> No new Lessons Added</h4></center>
+ <center><h4> No new Lessons added</h4></center>
<br><br>
{% else %}
<center><h3> Lessons </h3></center>
@@ -414,7 +414,7 @@
<a href="{{URL_ROOT}}/exam/manage/courses/add_module/" class="btn btn-primary">
Add new Module</a>
{% if not learning_modules %}
- <center><h4> No new learning modules Added</h4></center>
+ <center><h4> No new learning modules added</h4></center>
<br><br>
{% else %}
<center><h3> Learning Modules </h3></center>
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index b7251ad..96c8e6e 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -110,37 +110,44 @@ question_type = "{{ question.type }}"
{% block onload %} onload="updateTime();" {% endblock %}
{% block learning_units %}
-<center><h3>Lessons/Quizzes</h3></center>
-<ul class="list">
-{% for unit in module.get_learning_units %}
-<span>
-<li>
-
-{% get_unit_status course module unit user as status %}
-
-{% if unit.quiz.id == paper.question_paper.quiz.id %}
- <span class=" glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on"></span>
-{% endif %}
+<center><h4>{{course.name}}</h4></center>
+ <br>
+ {% for learning_module in all_modules %}
+ {% if learning_module.id == module.id %}
+ <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on">
+ </span>
+ {% endif %}
+ <b><u><a href="{{URL_ROOT}}/exam/quizzes/view_module/{{learning_module.id}}/{{course.id}}">{{learning_module.name}}</u></b>
+ </a>
+ <ul class="list">
+ {% for unit in learning_module.get_learning_units %}
+ <span>
+ <li>
+ {% get_unit_status course learning_module unit user as status %}
-{% if unit.type == "quiz" %}
- <a href="{{ URL_ROOT }}/exam/start/{{unit.quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}">
- {{ unit.quiz.description }}
- </a>
-{% else %}
- <a href="{{ URL_ROOT }}/exam/show_lesson/{{unit.lesson.id}}/{{module.id}}/{{course.id}}">
- {{ unit.lesson.name }}
- </a>
-{% endif %}
-{% if status == "completed" %}
- <span class="glyphicon glyphicon-ok" style="color: #7CFC00;"></span>
-{% else %}
- <span class="glyphicon glyphicon-remove" style="color: #FF0000"></span>
-{% endif %}
-</li>
-</span>
-<br>
-{% endfor %}
-</ul>
+ {% if unit.quiz.id == paper.question_paper.quiz.id %}
+ <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on">
+ </span>
+ {% endif %}
+ {% if unit.type == "quiz" %}
+ <a href="{{ URL_ROOT }}/exam/start/{{unit.quiz.questionpaper_set.get.id}}/{{learning_module.id}}/{{course.id}}">
+ {{ unit.quiz.description }}
+ </a>
+ {% else %}
+ <a href="{{ URL_ROOT }}/exam/show_lesson/{{unit.lesson.id}}/{{learning_module.id}}/{{course.id}}">
+ {{ unit.lesson.name }}
+ </a>
+ {% endif %}
+ {% if status == "completed" %}
+ <span class="glyphicon glyphicon-ok" style="color: #7CFC00;"></span>
+ {% else %}
+ <span class="glyphicon glyphicon-remove" style="color: #FF0000"></span>
+ {% endif %}
+ </li>
+ </span>
+ {% endfor %}
+ </ul>
+ {% endfor %}
{% endblock %}
{% block main %}
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html
index 0490697..f4b59ac 100644
--- a/yaksh/templates/yaksh/show_video.html
+++ b/yaksh/templates/yaksh/show_video.html
@@ -1,42 +1,54 @@
{% extends "user.html" %}
{% load custom_filters %}
-{% block title %} {{ learning_module.name|title }} {% endblock %}
+{% block title %} {{ learning_module.name }} {% endblock %}
-{% block pagetitle %} {{ learning_module.name|title }} {% endblock %}
+{% block pagetitle %} {{ learning_module.name }}
+{% if state == "lesson" %}
+ : {{lesson.name}}
+{% endif %}
+{% endblock %}
{% block main %}
<div class="col-sm-3 col-md-2 sidebar">
- <center><h3>Lessons/Quizzes</h3></center>
- <ul class="list">
- {% for unit in learning_units %}
- <span>
- <li>
- {% get_unit_status course learning_module unit user as status %}
+ <center><h4>{{course.name}}</h4></center>
+ <br>
+ {% for module in all_modules %}
+ {% if module.id == learning_module.id %}
+ <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on">
+ </span>
+ {% endif %}
+ <b><u><a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}">{{module}}</u></b>
+ </a>
+ <ul class="list">
+ {% for unit in module.get_learning_units %}
+ <span>
+ <li>
+ {% get_unit_status course module unit user as status %}
- {% if unit.id == current_unit.id %}
- <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on">
+ {% if unit.id == current_unit.id %}
+ <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on">
+ </span>
+ {% endif %}
+ {% if unit.type == "quiz" %}
+ <a href="{{ URL_ROOT }}/exam/start/{{unit.quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}">
+ {{ unit.quiz.description }}
+ </a>
+ {% else %}
+ <a href="{{ URL_ROOT }}/exam/show_lesson/{{unit.lesson.id}}/{{module.id}}/{{course.id}}">
+ {{ unit.lesson.name }}
+ </a>
+ {% endif %}
+ {% if status == "completed" %}
+ <span class="glyphicon glyphicon-ok" style="color: #7CFC00;"></span>
+ {% else %}
+ <span class="glyphicon glyphicon-remove" style="color: #FF0000"></span>
+ {% endif %}
+ </li>
</span>
- {% endif %}
- {% if unit.type == "quiz" %}
- <a href="{{ URL_ROOT }}/exam/start/{{unit.quiz.questionpaper_set.get.id}}/{{learning_module.id}}/{{course.id}}">
- {{ unit.quiz.description }}
- </a>
- {% else %}
- <a href="{{ URL_ROOT }}/exam/show_lesson/{{unit.lesson.id}}/{{learning_module.id}}/{{course.id}}">
- {{ unit.lesson.name }}
- </a>
- {% endif %}
- {% if status == "completed" %}
- <span class="glyphicon glyphicon-ok" style="color: #7CFC00;"></span>
- {% else %}
- <span class="glyphicon glyphicon-remove" style="color: #FF0000"></span>
- {% endif %}
- </li>
- </span>
- <br>
+ {% endfor %}
+ </ul>
{% endfor %}
- </ul>
</div>
{% if msg %}
<center>
@@ -49,16 +61,49 @@
<div class="panel panel-default" style="border: none; box-shadow: none;">
<div class="panel-body">
{{learning_module.html_data|safe}}
+ {% if learning_module.html_data%}
+ <hr>
+ {% endif %}
+ <center><h4>Following are the units in this modules</h4></center>
+ <table class="table">
+ <tr>
+ <th>Unit Name</th>
+ <th>Unit Type</th>
+ </tr>
+ {% for unit in learning_module.get_learning_units %}
+ <tr>
+ <ul class="inputs-list">
+ <td>
+ {% if unit.type == "quiz" %}
+ {{unit.quiz.description}}
+ {% else %}
+ {{unit.lesson.name}}
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.is_exercise %}
+ Exercise
+ {% else %}
+ Quiz
+ {% endif %}
+ {% else %}
+ Lesson
+ {% endif %}
+ </td>
+ </ul>
+ </tr>
+ {% endfor %}
+ </table>
</div>
</div>
<div style="text-align: center;">
- <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{first_unit.id}}/1" class="btn btn-info">First Unit
+ <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{first_unit.id}}/1" class="btn btn-info">Start
<span class="glyphicon glyphicon-chevron-right">
</span>
</a>
</div>
{% else %}
-<center><h3>{{lesson.name}}</h3></center>
<div class="panel panel-default" style="border: none; box-shadow: none;">
<div class="panel-body">
{{lesson.html_data|safe}}
@@ -80,7 +125,7 @@
</div>
{% endif %}
<div style="text-align: center;">
- <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{current_unit.id}}" class="btn btn-info" style="display: inline-block;">Next Unit
+ <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}/{{current_unit.id}}" class="btn btn-info" style="display: inline-block;">Next
<span class="glyphicon glyphicon-chevron-right">
</span>
</a>