summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_modules.html166
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html35
-rw-r--r--yaksh/templates/yaksh/view_profile.html4
3 files changed, 113 insertions, 92 deletions
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html
index fad1be0..afbae75 100644
--- a/yaksh/templates/yaksh/course_modules.html
+++ b/yaksh/templates/yaksh/course_modules.html
@@ -18,102 +18,100 @@
</div>
{% endif %}
{% if learning_modules %}
- {% for module in learning_modules %}
- <div class="row well">
- <table class="table">
- <tr>
- <td>
- <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}">
- {{module.name|title}}</a>
- </td>
- <td>
- <span class="glyphicon glyphicon-chevron-down" id="learning_units{{module.id}}{{course.id}}_down">
- </span>
- <span class="glyphicon glyphicon-chevron-up" id="learning_units{{module.id}}{{course.id}}_up" style="display: none;"></span>
- <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');">
- View Lessons/Quizzes/Exercises</a>
- </td>
- <td>
- {% get_module_status user module course as module_status %}
- Status:
- {% if module_status == "completed" %}
- <span class="label label-success">
- {{module_status|title}}
- </span>
- {% elif module_status == "inprogress" %}
- <span class="label label-info">
- {{module_status|title}}
- </span>
- {% else %}
- <span class="label label-warning">
- {{module_status|title}}
- </span>
- {% endif %}
- </td>
- </tr>
- </table>
- </div>
- <div id="learning_units{{module.id}}{{course.id}}" class="collapse">
- <table class="table">
- <tr>
- <th>Lesson/Quiz/Exercise</th>
- <th>Status</th>
- <th>Type</th>
- <th>View AnswerPaper</th>
- </tr>
- {% for unit in module.get_learning_units %}
+ <table class="table">
+ {% for module in learning_modules %}
<tr>
- <ul class="inputs-list">
<td>
- {% if unit.type == "quiz" %}
- {{unit.quiz.description}}
- {% else %}
- {{unit.lesson.name}}
- {% endif %}
+ <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}">
+ {{module.name|title}}</a>
</td>
<td>
- {% get_unit_status course module unit user as status %}
- {% if status == "completed" %}
- <span class="label label-success">{{status|title}}
+ <span class="glyphicon glyphicon-chevron-down" id="learning_units{{module.id}}{{course.id}}_down">
</span>
- {% elif status == "inprogress" %}
- <span class="label label-info">{{status|title}}
+ <span class="glyphicon glyphicon-chevron-up" id="learning_units{{module.id}}{{course.id}}_up" style="display: none;">
</span>
- {% else %}
- <span class="label label-warning">{{status|title}}
- </span>
- {% endif %}
- </td>
- <td>
- {% if unit.type == "quiz" %}
- {% if unit.quiz.is_exercise %}
- Exercise
- {% else %}
- Quiz
- {% endif %}
- {% else %}
- Lesson
- {% endif %}
+ <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');">
+ View Lessons/Quizzes/Exercises</a>
+ <div id="learning_units{{module.id}}{{course.id}}" class="collapse">
+ <table class="table">
+ <tr>
+ <th>Lesson/Quiz/Exercise</th>
+ <th>Status</th>
+ <th>Type</th>
+ <th>View AnswerPaper</th>
+ </tr>
+ {% for unit in module.get_learning_units %}
+ <tr>
+ <td>
+ {% if unit.type == "quiz" %}
+ {{unit.quiz.description}}
+ {% else %}
+ {{unit.lesson.name}}
+ {% endif %}
+ </td>
+ <td>
+ {% get_unit_status course module unit user as status %}
+ {% if status == "completed" %}
+ <span class="label label-success">{{status|title}}
+ </span>
+ {% elif status == "inprogress" %}
+ <span class="label label-info">{{status|title}}
+ </span>
+ {% else %}
+ <span class="label label-warning">{{status|title}}
+ </span>
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.is_exercise %}
+ Exercise
+ {% else %}
+ Quiz
+ {% endif %}
+ {% else %}
+ Lesson
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.view_answerpaper %}
+ <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ unit.quiz.questionpaper_set.get.id }}/{{course.id}}">
+ <i class="fa fa-eye" aria-hidden="true"></i> Can View </a>
+ {% else %}
+ <a>
+ <i class="fa fa-eye-slash" aria-hidden="true">
+ </i> Cannot view now </a>
+ {% endif %}
+ {% else %}
+ ------
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
</td>
<td>
- {% if unit.type == "quiz" %}
- {% if unit.quiz.view_answerpaper %}
- <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ unit.quiz.questionpaper_set.get.id }}/{{course.id}}"><i class="fa fa-eye" aria-hidden="true"></i> Can View </a>
+ {% get_module_status user module course as module_status %}
+ Status:
+ {% if module_status == "completed" %}
+ <span class="label label-success">
+ {{module_status|title}}
+ </span>
+ {% elif module_status == "inprogress" %}
+ <span class="label label-info">
+ {{module_status|title}}
+ </span>
{% else %}
- <a>
- <i class="fa fa-eye-slash" aria-hidden="true">
- </i> Cannot view now </a>
+ <span class="label label-warning">
+ {{module_status|title}}
+ </span>
{% endif %}
- {% else %}
- ------
- {% endif %}
</td>
- </ul>
</tr>
- {% endfor %}
- </table>
- </div>
- {% endfor %}
+ {% endfor %}
+ </table>
{% else %}
<h3> No lectures found </h3>
{% endif %}
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index cf08752..49f8d2d 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -39,25 +39,44 @@ No Courses to display
</b></h4>
</div>
<div class="col-md-4">
- {% if not course.active %}
- <span class="label label-danger">Closed</span>
- {% endif %}
{% if user in course.requests.all %} <span class="label label-warning">Request Pending </span>
{% elif user in course.rejected.all %}<span class="label label-danger">Request Rejected</span>
{% elif user in course.students.all %}<span class="label label-info">Enrolled</span>
{% else %}
- {% if course.is_active_enrollment %}
- {% if course.is_self_enroll %}
- <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.id }}">Enroll</a>
+ {% if course.active %}
+ {% if course.is_active_enrollment %}
+ {% if course.is_self_enroll %}
+ <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.id }}">Enroll</a>
+ {% else %}
+ <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.id }}">Enroll</a>
+ {% endif %}
{% else %}
- <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.id }}">Enroll</a>
+ <span class="label label-danger" style="font-size: 15px">
+ Enrollment Closed
+ </span>
{% endif %}
{% else %}
- <span class="label label-danger">Enrollment Closed</span>
+ <span class="label label-danger" style="font-size: 15px">
+ Course is not activated
+ </span>
{% endif %}
{% endif %}
</div>
+ <div class="col-md-4">
+ {% if course.days_before_start != 0 %}
+ <span class="label label-info" style="font-size: 15px">
+ {{course.days_before_start}} day(s) to start
+ </span>
+ {% endif %}
+ </div>
</div>
+ {% if course.is_active_enrollment %}
+ <div class="alert alert-info">
+ Start Date&nbsp;: {{course.start_enroll_time}}
+ <br>
+ End Date&nbsp;&nbsp;: {{course.end_enroll_time}}
+ </div>
+ {% endif %}
{% if course.instructions %}
<div class="row">
diff --git a/yaksh/templates/yaksh/view_profile.html b/yaksh/templates/yaksh/view_profile.html
index 5f06135..ce95226 100644
--- a/yaksh/templates/yaksh/view_profile.html
+++ b/yaksh/templates/yaksh/view_profile.html
@@ -31,6 +31,10 @@
<th><label for="id_position"><h5>Position:</h5></label></th>
<th><label for="id_position"><h5>{{ user.profile.position }}</h5></label></th>
</tr>
+ <tr>
+ <th><label for="id_position"><h5>Timezone:</h5></label></th>
+ <th><label for="id_position"><h5>{{ user.profile.timezone }}</h5></label></th>
+ </tr>
</table>
<a class="btn btn-primary pull-right" href="{{ URL_ROOT }}/exam/editprofile/">Edit Profile</a>
{% endblock %}