summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authoraditya palaparthy2017-02-16 12:22:25 +0530
committeraditya palaparthy2017-02-16 12:22:25 +0530
commit7433f472fd8909211d962eb24a4fd7dc12a6e88f (patch)
treeb7329ef9a65e37f3056d44830e5fb0a2571d76c6 /yaksh
parent3fc351255d48f769641195d0f7b8fb7454992185 (diff)
downloadonline_test-7433f472fd8909211d962eb24a4fd7dc12a6e88f.tar.gz
online_test-7433f472fd8909211d962eb24a4fd7dc12a6e88f.tar.bz2
online_test-7433f472fd8909211d962eb24a4fd7dc12a6e88f.zip
Display students info in course
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templates/yaksh/addteacher.html6
-rw-r--r--yaksh/templates/yaksh/course_detail.html312
2 files changed, 127 insertions, 191 deletions
diff --git a/yaksh/templates/yaksh/addteacher.html b/yaksh/templates/yaksh/addteacher.html
index 755ba20..86f5806 100644
--- a/yaksh/templates/yaksh/addteacher.html
+++ b/yaksh/templates/yaksh/addteacher.html
@@ -5,6 +5,11 @@
{% block css %}
<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/course.css" />
+<style>
+table, th, td{
+ border: 1px solid black;
+}
+</style>
{% endblock %}
{% block content %}
@@ -51,6 +56,7 @@
{% endif %}
{% endfor %}
</table>
+ </br>
<button class="btn" type="submit">Add Selected</button>
{% endif %}
{% endif %}
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index 5fb92f9..0cccb60 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -7,202 +7,132 @@
{% block script %}
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script>
{% endblock %}
+{% block css %}
+<style>
+table, th, td { border: 1px solid black;}
+</style>
+{% endblock %}
{% block content %}
<br/>
-<div class="pull-right">
- <a class="btn btn-primary" href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/">{% if course.active %}Deactivate Course {% else %} Activate Course {% endif %}</a>
+<br>
+<div class="row">
+ <div class="col-sm-3 col-md-2 sidebar">
+ <ul class="nav nav-sidebar">
+ <li><a href="#student-requests" id="request"> Requested Students </a></li>
+ <li><a href="#enrolled-students" id="enroll-students"> Enrolled Students </a></li>
+ <li><a href="#rejected-students" id="reject-students"> Rejected Students </a></li>
+ <li>
+ <a href="{{URL_ROOT}}/exam/manage/toggle_status/{{ course.id }}/">{% if course.active %}Deactivate Course {% else %} Activate Course {% endif %}</a>
+ </li>
+ </ul>
</div>
-<br/>
+<div class="col-sm-8 col-sm-offset-3 col-md-9 col-md-offset-2 main">
<div class="row">
- <div class="col-md-6">
- <center><b><u>Requests</u></b></center><br>
- {% if course.get_requests %}
- <input type="checkbox" class="checkall"/>&nbsp;<font size="2">Select all</font>
- <div id="enroll-all">
- <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post">
- {% csrf_token %}
- {% for request in course.get_requests %}
- <div class="well">
- <div class="row">
- <div class="col-md-3" style="padding-top:10px">
- <input type="checkbox" name="check" value="{{ request.id }}">&nbsp;
- <a href="#" data-toggle="modal" data-target="#request_detail_{{forloop.counter}}">
- {{ request.username }}</a>
- <div class="modal fade" id="request_detail_{{forloop.counter}}" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">&times;</button>
- <h4 class="modal-title">Information for {{ request.username }} </h4>
- </div>
- <div class="modal-body">
- <table>
- <tr>
- <td><strong>Full Name :</strong></td>
- <td> {{request.get_full_name}}</td>
- </tr>
- <tr>
- <td><strong>Email ID :</strong></td>
- <td> {{request.email}}</td>
- </tr>
- <tr>
- <td><strong>Roll Number :</strong></td>
- <td> {{request.profile.roll_number}}</td>
- </tr>
- <tr>
- <td><strong>Institute :</strong></td>
- <td> {{request.profile.institute}}</td>
- </tr>
- <tr>
- <td><strong>Department :</strong></td>
- <td> {{request.profile.department}}</td>
- </tr>
- <tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <a class="btn btn-success" href="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/{{ request.id }}/"> Enroll </a> <a class="btn btn-danger" href="{{URL_ROOT}}/exam/manage/reject/{{ course.id }}/{{ request.id }}/"> Reject </a>
- </div>
- </div>
- {% endfor %}
- <button class="btn success" type="submit" name='enroll' value='enroll'>Enroll Selected</button>
- </div>
- {% endif %}
- </form>
- </div>
- <div class="col-md-6">
- <center><b><u>Rejected</u></b></center><br>
- {% if course.get_rejected %}
- <input type="checkbox" class="enroll"/>&nbsp;<font size="2">Select all</font>
- <div id="enroll">
- {% for rejected in course.get_rejected %}
- <form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post">
- {% csrf_token %}
- <div class="well">
- <div class="row">
- <div class="col-md-4" style="padding-top:10px">
- <input type="checkbox" name="check" value="{{ rejected.id }}">&nbsp;
- <a href="#" data-toggle="modal" data-target="#reject_detail_{{forloop.counter}}">
- {{ rejected.username }}</a>
- <div class="modal fade" id="reject_detail_{{forloop.counter}}" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">&times;</button>
- <h4 class="modal-title">Information for {{ rejected.username }} </h4>
- </div>
- <div class="modal-body">
- <table>
- <tr>
- <td><strong>Full Name :</strong></td>
- <td> {{rejected.get_full_name}}</td>
- </tr>
- <tr>
- <td><strong>Email ID :</strong></td>
- <td> {{rejected.email}}</td>
- </tr>
- <tr>
- <td><strong>Roll Number :</strong></td>
- <td> {{rejected.profile.roll_number}}</td>
- </tr>
- <tr>
- <td><strong>Institute :</strong></td>
- <td> {{rejected.profile.institute}}</td>
- </tr>
- <tr>
- <td><strong>Department :</strong></td>
- <td> {{rejected.profile.department}}</td>
- </tr>
- <tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <a class="btn btn-success" href="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/{{ rejected.id }}/"> Enroll </a>
- </div>
- </div>
- {% endfor %}
- <button class="btn btn-success" type="submit" name='enroll' value='enroll'>Enroll Selected</button>
- </div>
- {% endif %}
- </form>
- </div>
+<div id="student-requests">
+<center><b><u>Requests</u></b></center><br>
+{% if course.get_requests %}
+<input type="checkbox" class="checkall"/>&nbsp;<font size="2">Select all</font>
+<div id="enroll-all">
+<table>
+ <th></th>
+ <th>Full Name</th>
+ <th>Email</th>
+ <th>Roll Number</th>
+ <th>Institute</th>
+ <th>Department</th>
+ <th>Enroll/Reject</th>
+<form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post">
+{% csrf_token %}
+{% for request in course.get_requests %}
+ <tr>
+ <td><input type="checkbox" name="check" value="{{ request.id }}"></td>
+ <td>{{request.get_full_name}}</td>
+ <td> {{request.email}}</td>
+ <td> {{request.profile.roll_number}}</td>
+ <td> {{request.profile.institute}}</td>
+ <td> {{request.profile.department}}</td>
+ <td>
+ <a class="btn btn-success" href="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/{{ request.id }}/"> Enroll </a> <a class="btn btn-danger" href="{{URL_ROOT}}/exam/manage/reject/{{ course.id }}/{{ request.id }}/"> Reject </a>
+ </td>
+{% endfor %}
+</table>
+<button class="btn btn-success" type="submit" name='enroll' value='enroll'>Enroll Selected</button>
+</div>
+{% endif %}
+</form>
</div>
<br>
-<div class="row">
- <div class="col-md-6">
- <center><b><u>Enrolled</u></b></center><br>
- {% if course.get_enrolled %}
- <input type="checkbox" class="reject"/>&nbsp;<font size="2">Select all</font>
- <div id="reject">
- {% for enrolled in course.get_enrolled %}
- <form action="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/" method="post">
- {% csrf_token %}
- <div class="well">
- <div class="row">
- <div class="col-md-4" style="padding-top:10px">
- <input type="checkbox" name="check" value="{{ enrolled.id }}">&nbsp;
- <a href="#" data-toggle="modal" data-target="#enroll_detail_{{forloop.counter}}">
- {{ enrolled.username }}</a>
- <div class="modal fade" id="enroll_detail_{{forloop.counter}}" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">&times;</button>
- <h4 class="modal-title">Information for {{ enrolled.username }} </h4>
- </div>
- <div class="modal-body">
- <table>
- <tr>
- <td><strong>Full Name :</strong></td>
- <td> {{enrolled.get_full_name}}</td>
- </tr>
- <tr>
- <td><strong>Email ID :</strong></td>
- <td> {{enrolled.email}}</td>
- </tr>
- <tr>
- <td><strong>Roll Number :</strong></td>
- <td> {{enrolled.profile.roll_number}}</td>
- </tr>
- <tr>
- <td><strong>Institute :</strong></td>
- <td> {{enrolled.profile.institute}}</td>
- </tr>
- <tr>
- <td><strong>Department :</strong></td>
- <td> {{enrolled.profile.department}}</td>
- </tr>
- <tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <a class="btn btn-danger" href="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/{{ enrolled.id }}/"> Reject </a>
- </div>
- </div>
- {% endfor %}
- <button class="btn btn-danger" type="submit" name='reject' value='reject'>Reject Selected</button>
- </div>
- {% endif %}
- </form>
- </div>
+<div id="enrolled-students">
+<center><b><u>Enrolled</u></b></center><br>
+{% if course.get_enrolled %}
+<input type="checkbox" class="reject"/>&nbsp;<font size="2">Select all</font>
+<div id="reject">
+<table>
+ <th></th>
+ <th>Full Name</th>
+ <th>Email</th>
+ <th>Roll Number</th>
+ <th>Institute</th>
+ <th>Department</th>
+ <th>Reject</th>
+ {% for enrolled in course.get_enrolled %}
+ <form action="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/" method="post">
+ {% csrf_token %}
+ <tr>
+ <td><input type="checkbox" name="check" value="{{ enrolled.id }}"></td>
+ <td> {{ enrolled.get_full_name|title }} </td>
+ <td> {{enrolled.email}}</td>
+ <td> {{enrolled.profile.roll_number}}</td>
+ <td> {{enrolled.profile.institute}}</td>
+ <td> {{enrolled.profile.department}}</td>
+ <td><a class="btn btn-danger" href="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/{{ enrolled.id }}/"> Reject </a>
+ </td>
+ </tr>
+ {% endfor %}
+</table>
+<button class="btn btn-danger" type="submit" name='reject' value='reject'>Reject Selected</button>
+</div>
+{% endif %}
+</form>
+</div>
+<br>
+<div id="rejected-students">
+<center><b><u>Rejected</u></b></center><br>
+{% if course.get_rejected %}
+<input type="checkbox" class="enroll"/>&nbsp;<font size="2">Select all</font>
+<div id="enroll">
+<table>
+ <th></th>
+ <th>Full Name</th>
+ <th>Email</th>
+ <th>Roll Number</th>
+ <th>Institute</th>
+ <th>Department</th>
+ <th>Enroll</th>
+{% for rejected in course.get_rejected %}
+<form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post">
+{% csrf_token %}
+ <tr>
+ <td><input type="checkbox" name="check" value="{{ rejected.id }}"></td>
+ <td>{{rejected.get_full_name|title}}</td>
+ <td> {{rejected.email}}</td>
+ <td> {{rejected.profile.roll_number}}</td>
+ <td> {{rejected.profile.institute}}</td>
+ <td> {{rejected.profile.department}}</td>
+ <td>
+ <a class="btn btn-success" href="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/{{ rejected.id }}/"> Enroll </a>
+ </td>
+ </tr>
+{% endfor %}
+</table>
+<br>
+<button class="btn btn-success" type="submit" name='enroll' value='enroll'>
+Enroll Selected</button>
+</div>
+{% endif %}
+</form>
+</div>
+</div>
+</div>
</div>
-
{% endblock %}