summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail.html99
-rw-r--r--yaksh/templates/yaksh/register.html3
2 files changed, 95 insertions, 7 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index cf0ab18..a5d10a7 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -1,5 +1,5 @@
{% extends "manage.html" %}
-
+{% load custom_filters %}
{% block title %} Course Details {% endblock title %}
<div class="col-md-9 col-md-offset-2 main">
@@ -10,6 +10,7 @@
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script>
<script type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/tinymce/js/tinymce/tinymce.min.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-ui.js"></script>
+<script src="{{ URL_ROOT }}/static/yaksh/js/jquery.tablesorter.min.js"></script>
{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/jquery-ui/jquery-ui.css">
@@ -20,7 +21,7 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
- {% if state == 'mail'%}
+ {% if state == 'mail' or state == 'course_status' %}
<li><a href="{{URL_ROOT}}/exam/manage/course_detail/{{course.id}}/">
Go to Course Details</a></li>
{% else %}
@@ -35,6 +36,10 @@
<a href="{{URL_ROOT}}/exam/manage/send_mail/{{ course.id }}/">
Send Mail</a>
</li>
+ <li>
+ <a href="{{URL_ROOT}}/exam/manage/course_status/{{ course.id }}/">
+ View Course Status</a>
+ </li>
</ul>
</div>
</div>
@@ -84,7 +89,8 @@
<div id="reject">
<form action="{{URL_ROOT}}/exam/manage/send_mail/{{ course.id }}/" method="post" id="send_mail_form">
{% csrf_token %}
- <table class="table table-striped">
+ <table id="mail_table" class="tablesorter table table-striped" data-sortlist="[1,0]">
+ <thead>
<th></th>
<th></th>
<th>Full Name</th>
@@ -92,6 +98,8 @@
<th>Roll Number</th>
<th>Institute</th>
<th>Department</th>
+ </thead>
+ <tbody>
{% for enrolled in course.get_enrolled %}
<tr>
<td><input type="checkbox" name="check" value="{{ enrolled.id }}"></td>
@@ -103,6 +111,7 @@
<td> {{enrolled.profile.department}}</td>
</tr>
{% endfor %}
+ </tbody>
</table>
<br>
<textarea name="subject" id="subject" placeholder="Email Subject" cols="50"></textarea>
@@ -116,7 +125,72 @@
{% endif %}
</form>
</div>
+ {% elif state == "course_status" %}
+ <div class="course_data">
+ <input type="hidden" id="course_name" value="{{course.name}}">
+ <a href="#" class="btn btn-info" id="export">Export to CSV</a>
+ <center><h2>Course Status</h2></center>
+ <table class="tablesorter table table-bordered" id="course_table" data-sortlist="[0,0]">
+ <thead>
+ <tr>
+ <th>Sr No.</th>
+ <th>Students</th>
+ <th>Total</th>
+ <th colspan="{{modules|length}}">Modules</th>
+ </tr>
+ <tr>
+ <th scope="row"></th>
+ <th></th>
+ <th></th>
+ {% if modules %}
+ {% for module in modules %}
+ <th>
+ {{module.name}}
+ <br>
+ ({{module.get_learning_units|length}} Units)
+ <br>
+ <a data-target="tooltip" title="{% for unit in module.get_learning_units %}{% if unit.type == 'quiz' %}{{unit.quiz.description}}{% else %}{{unit.lesson.name}}{% endif %} / {% endfor %}" id="unit_status{{module.id}}" onmouseover="view_status('#unit_status{{module.id}}')">
+ View Units</a>
+ </th>
+ {% endfor %}
+ {% else %}
+ <th></th>
+ {% endif %}
+ </tr>
+ </thead>
+ <tbody>
+ {% for student in students %}
+ <tr>
+ <td width="5%">
+ {{forloop.counter}}.
+ </td>
+ <td>
+ {{ student.get_full_name|title }}
+ </td>
+ <td>
+ {% course_completion_percent course student as c_percent %}
+ {{c_percent}} %
+ </td>
+ {% if modules %}
+ {% for module in modules %}
+ <td>
+ {% module_completion_percent course module student as m_percent %}
+ {{m_percent}} %
+ <br>
+ <a data-target="tooltip" title="{% for unit in module.get_learning_units %}{% if unit.type == 'quiz' %}{{unit.quiz.description}}{% else %}{{unit.lesson.name}}{% endif %} - {% get_unit_status course module unit student as status %}{{status|title}} / {% endfor %}" id="unit_status{{module.id}}{{student.id}}" onmouseover="view_status('#unit_status{{module.id}}{{student.id}}')">
+ View Unit Status</a>
+ </td>
+ {% endfor %}
+ {% else %}
+ <td>-------</td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
{% else %}
+ <div id="students_enrollment">
<div id="student-requests">
<center><b><u>Requests</u></b></center><br>
{% if course.get_requests %}
@@ -124,7 +198,8 @@
<div id="enroll-all">
<form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post">
{% csrf_token %}
- <table class="table table-striped">
+ <table id="requested_table" class="tablesorter table table-striped" data-sortlist="[1,0]">
+ <thead>
<th></th>
<th></th>
<th>Full Name</th>
@@ -133,6 +208,8 @@
<th>Institute</th>
<th>Department</th>
<th>Enroll/Reject</th>
+ </thead>
+ <tbody>
{% for request in course.get_requests %}
<tr>
<td><input type="checkbox" name="check" value="{{ request.id }}"></td>
@@ -152,6 +229,7 @@
</td>
</tr>
{% endfor %}
+ </tbody>
</table>
<button class="btn btn-success" type="submit" name='enroll' value='enroll'>Enroll Selected</button>
</div>
@@ -166,7 +244,8 @@
<div id="reject">
<form action="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/" method="post" id="reject-form">
{% csrf_token %}
- <table class="table table-striped">
+ <table id="enrolled_table" class="tablesorter table table-striped" data-sortlist="[1,0]">
+ <thead>
<th></th>
<th></th>
<th>Full Name</th>
@@ -175,6 +254,8 @@
<th>Institute</th>
<th>Department</th>
<th>Reject</th>
+ </thead>
+ <tbody>
{% for enrolled in course.get_enrolled %}
<tr>
<td><input type="checkbox" name="check" value="{{ enrolled.id }}"></td>
@@ -190,6 +271,7 @@
</td>
</tr>
{% endfor %}
+ </tbody>
</table>
<button class="btn btn-danger" type="submit" name='reject' value='reject'>
Reject Selected</button>
@@ -205,7 +287,8 @@
<div id="enroll">
<form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post">
{% csrf_token %}
- <table class="table table-striped">
+ <table id="rejected_table" class="tablesorter table table-striped" data-sortlist="[1,0]">
+ <thead>
<th></th>
<th></th>
<th>Full Name</th>
@@ -214,6 +297,8 @@
<th>Institute</th>
<th>Department</th>
<th>Enroll</th>
+ </thead>
+ <tbody>
{% for rejected in course.get_rejected %}
<tr>
<td><input type="checkbox" name="check" value="{{ rejected.id }}"></td>
@@ -230,6 +315,7 @@
</td>
</tr>
{% endfor %}
+ </tbody>
</table>
<br>
<button class="btn btn-success" type="submit" name='enroll' value='enroll'>
@@ -238,6 +324,7 @@
{% endif %}
</form>
</div>
+ </div>
{% endif %}
</div>
</div>
diff --git a/yaksh/templates/yaksh/register.html b/yaksh/templates/yaksh/register.html
index 7cf15a6..13cd248 100644
--- a/yaksh/templates/yaksh/register.html
+++ b/yaksh/templates/yaksh/register.html
@@ -12,7 +12,8 @@
<table class="table">
{{ form.as_table }}
</table></center>
- <center><button class="btn btn-primary" type="submit">Register</button>&nbsp;&nbsp;<button class="btn btn-primary" type="reset">Cancel</button></center>
+ <center><button class="btn btn-primary" type="submit">Register</button>&nbsp;&nbsp;
+ <a href="{{URL_ROOT}}/exam" class="btn btn-danger">Cancel</a></center>
</form>
{% endblock content %}