diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_exercise.html | 46 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_quiz.html | 43 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 99 | ||||
-rw-r--r-- | yaksh/templates/yaksh/register.html | 3 | ||||
-rw-r--r-- | yaksh/templates/yaksh/show_video.html | 19 |
5 files changed, 168 insertions, 42 deletions
diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html index dac35d4..77e3ee8 100644 --- a/yaksh/templates/yaksh/add_exercise.html +++ b/yaksh/templates/yaksh/add_exercise.html @@ -14,17 +14,41 @@ {% block content %} <form name=frm id=frm action="" method="post" > - {% csrf_token %} - <center> - <table class="span1 table"> - {{ form.as_table }} - </table> - <br/><br/> - </center> + {% csrf_token %} + <center> + <table class="span1 table"> + {{ form.as_table }} + </table> + <br/><br/> + </center> + <center><button class="btn" type="submit" id="submit" name="save_exercise"> Save + </button> - <center><button class="btn" type="submit" id="submit" name="questionpaper"> Save - </button> - - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> </form> +{% if exercise and course_id %} + {% if exercise.questionpaper_set.get.id %} + <center> + <h4>You can check the quiz by attempting it in the following modes:</h4> + <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ exercise.id }}/{{exercise.questionpaper_set.get.id}}/{{course_id}}" class="btn btn-primary">View Question Paper</a> + <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{exercise.id}}/{{course_id}}/");'>User Mode</button> + + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{exercise.id}}/{{course_id}}/");'> + God Mode</button> + <a data-toggle="collapse" data-target="#help"> + <span class="glyphicon glyphicon-info-sign">Help</span></a> + <div id="help" class="collapse"> + <br/> + <ul> + <li><b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - + <ul> + <li><i>Quiz will have the same duration as that of the original quiz.</li> + <li>Quiz won't start if the course is inactive or the quiz time has expired.</li> + <li>You will be notified about quiz prerequisites.(You can still attempt the quiz though)</i></li> + </ul> + </p> + <li> <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints.</p> + </div> + {% endif %} +{% endif %} {% endblock %} diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index d3705e3..684f804 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -35,31 +35,34 @@ </form> <br> -{% if quiz_id and course_id %} +{% if quiz and course_id %} + {% if quiz.questionpaper_set.get.id %} <center> <h4>You can check the quiz by attempting it in the following modes:</h4> - <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz_id}}/{{course_id}}/");'>User Mode</button> - - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{quiz_id}}/{{course_id}}/");'> - God Mode</button> + <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/{{course_id}}" class="btn btn-primary">View Question Paper</a> + <button class="btn" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz.id}}/{{course_id}}/");'>User Mode</button> + + <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/godmode/{{quiz.id}}/{{course_id}}/");'> + God Mode</button> <a data-toggle="collapse" data-target="#help"> <span class="glyphicon glyphicon-info-sign">Help</span></a> - <div id="help" class="collapse"> - <br/> - <ul> - <li><b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - - <ul> - <li><i>Quiz will have the same duration as that of the original quiz.</li> - <li>Quiz won't start if the course is inactive or the quiz time has expired.</li> - <li>You will be notified about quiz prerequisites.(You can still attempt the quiz though)</i></li> - </ul> - </p> - <li> <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints.</p> - </div> - {% endif %} - <style type="text/css"> + <div id="help" class="collapse"> + <br/> + <ul> + <li><b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - + <ul> + <li><i>Quiz will have the same duration as that of the original quiz.</li> + <li>Quiz won't start if the course is inactive or the quiz time has expired.</li> + <li>You will be notified about quiz prerequisites.(You can still attempt the quiz though)</i></li> + </ul> + </p> + <li> <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints.</p> + </div> + {% endif %} +{% endif %} +<style type="text/css"> #rendered_text{ width: 550px; } - </style> +</style> {% endblock %} 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> <button class="btn btn-primary" type="reset">Cancel</button></center> + <center><button class="btn btn-primary" type="submit">Register</button> + <a href="{{URL_ROOT}}/exam" class="btn btn-danger">Cancel</a></center> </form> {% endblock content %} diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index f4b59ac..17f9d86 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -64,6 +64,7 @@ {% if learning_module.html_data%} <hr> {% endif %} + {% if learning_module.get_learning_units %} <center><h4>Following are the units in this modules</h4></center> <table class="table"> <tr> @@ -95,13 +96,23 @@ </tr> {% endfor %} </table> + {% else %} + <center><h3>No Lessons/Quizzes Found</h3></center> + {% endif %} </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">Start - <span class="glyphicon glyphicon-chevron-right"> - </span> - </a> + {% if 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> + {% else %} + <a href="{{ URL_ROOT }}/exam/next_unit/{{course.id}}/{{learning_module.id}}" class="btn btn-info">Next + <span class="glyphicon glyphicon-chevron-right"> + </span> + </a> + {% endif %} </div> {% else %} <div class="panel panel-default" style="border: none; box-shadow: none;"> |