diff options
author | adityacp | 2020-01-20 19:11:19 +0530 |
---|---|---|
committer | adityacp | 2020-01-20 19:11:19 +0530 |
commit | e828d40b75181a2356fb9223280a1e6860a7ec49 (patch) | |
tree | 3a5f55d16a9773255b019957ee1b2cffb7a964d6 /yaksh/templates | |
parent | f988c72e19b689227d671b6774242bb3e784a5e2 (diff) | |
download | online_test-e828d40b75181a2356fb9223280a1e6860a7ec49.tar.gz online_test-e828d40b75181a2356fb9223280a1e6860a7ec49.tar.bz2 online_test-e828d40b75181a2356fb9223280a1e6860a7ec49.zip |
Change views, urls, forms, templates, static
- Change course, quiz, module, lesson forms
- Add messages for success and warning
- Add proper redirections to the specifc urls
- Remove unnecessary custom css
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_course.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_lesson.html | 206 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_module.html | 119 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_quiz.html | 149 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_added_modules.html | 10 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 25 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_progress.html | 70 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_students.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_teachers.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 3 | ||||
-rw-r--r-- | yaksh/templates/yaksh/design_course_session.html | 7 | ||||
-rw-r--r-- | yaksh/templates/yaksh/moderator_dashboard.html | 4 |
12 files changed, 378 insertions, 221 deletions
diff --git a/yaksh/templates/yaksh/add_course.html b/yaksh/templates/yaksh/add_course.html index 6276425..11a6497 100644 --- a/yaksh/templates/yaksh/add_course.html +++ b/yaksh/templates/yaksh/add_course.html @@ -67,7 +67,7 @@ <center> <button class="btn btn-success btn-lg" type="submit" id="submit" name="course"> - Save + <i class="fa fa-save"></i> Save </button> <a class="btn btn-danger btn-lg" name="button" href="{% url 'yaksh:courses' %}"> Cancel diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 87fb8d0..cbef893 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -1,85 +1,161 @@ {% extends "manage.html" %} {% load custom_filters %} +{% load static %} {% block title %}Create/Edit Lesson{% endblock %} {% block script %} -<script src="{{ URL_ROOT }}/static/yaksh/js/lesson.js"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-ui-1.12.1.js"></script> +<script type="text/javascript" src="{% static 'yaksh/js/lesson.js' %}"> +</script> +<script type="text/javascript" src="{% static 'yaksh/js/jquery-ui.js' %}"> +</script> {% endblock %} {% block css %} -<link rel="stylesheet" href="{{URL_ROOT}}/static/yaksh/css/jquery-ui/jquery-ui-1.12.1.css"> -<link rel="stylesheet" href="{{URL_ROOT}}/static/yaksh/css/lesson.css"> +<link rel="stylesheet" href="{% static 'yaksh/css/lesson.css' %}" type="text/css" /> +<link rel="stylesheet" href="{% static 'yaksh/css/jquery-ui/jquery-ui.css' %}" type="text/css" /> {% endblock %} {% block content %} -<div class="yakshwell container"> +<div class="container"> {% if error %} <div class="alert alert-danger"> {{error}} </div> {% endif %} -<form name=frm id=frm action="" method="post" enctype="multipart/form-data"> - {% csrf_token %} - <center> - <table class="table table-bordered table-responsive-sm"> - {{ lesson_form.as_table }} - {{ lesson_file_form.as_table }} - </table> - </center> - <br><br> - {% if lesson_files %} - <center> - <div class="alert alert-success col-md-8 animated flash"> - <h4>Files added to this lesson</h4> - </div> - </center> - {% for f in lesson_files %} - <li class="list-group-item"> - <h4> - <input type="checkbox" name="delete_files" value="{{f.id}}"> - </input> - <a href="{{f.file.url}}">{{ f.file.name|file_title }}</a> - </h4> - </li> - {% endfor %} - {% else %} - - <center> - <div class="alert alert-warning col-md-8 animated flash"> - <h4 class="alert-warning">No Files added to this lesson</h4> - </div> - </center> - {% endif %} - <br><br> - <center> - <button class="btn btn-success" type="submit" id="submit" name="Save"> Save - </button> - {% if lesson_files %} - <button class="btn btn-danger" type="submit" id="submit" name="Delete"> Delete Files - </button> - {% endif %} - {% if course_id %} - <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> - {% else %} - <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/all_lessons/");'>Cancel</button> - {% endif %} - </form> - <button class="btn btn-outline-primary" type="button" name="button" id="preview">Preview Lesson Description - </button> - <button class="btn btn-outline-primary" type="button" name="button" id="embed"> - Embed Video link - </button> - </center> - <hr> - <div class="card" id="preview_text_div" style="display: none;"> - <div class="card-heading"> - <center> - <h3>Description Preview</h3> - </center> - </div> - <div class="card-body" id="description_body"> +<div class="container"> + <div class="row justify-content-center form-group"> + <div class="col-md-9 col-md-offset-4"> + {% if course_id %} + <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}"> + <i class="fa fa-arrow-left"></i> + Back + </a> + {% else %} + <a class="btn btn-primary" href="{% url 'yaksh:show_all_lessons' %}"> + <i class="fa fa-arrow-left"></i> + Back + </a> + {% endif %} + <br> + {% if messages %} + <br> + {% for message in messages %} + <div class="alert alert-dismissible alert-{{ message.tags }}"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ message }}</strong> + </div> + {% endfor %} + {% endif %} + <br> + <form name=frm id=frm action="" method="post" enctype="multipart/form-data"> + <fieldset> + {% csrf_token %} + {% if lesson_form.errors %} + {% for field in lesson_form %} + {% for error in field.errors %} + <div class="alert alert-dismissible alert-danger"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ error|escape }}</strong> + </div> + {% endfor %} + {% endfor %} + {% for error in form.non_field_errors %} + <div class="alert alert-dismissible alert-danger"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ error|escape }}</strong> + </div> + {% endfor %} + {% endif %} + {{lesson_form.name}} + <br> + {{lesson_form.description}} + <br> + Active: {{lesson_form.active}} + <br><br> + Video File: + <span class="badge badge-info"> + {{lesson_form.video_file.help_text}} + </span> + <div class="input-group mb-3"> + <div class="custom-file"> + {{lesson_form.video_file}} + <label class="custom-file-label" for="id_video_file"> + Choose file + </label> + </div> + </div> + <br> + Lesson Files: + <div class="input-group mb-3"> + <div class="custom-file"> + {{lesson_file_form.Lesson_files}} + <label class="custom-file-label" for="id_video_file"> + Choose file + </label> + </div> + </div> + <br> + {% if lesson_files %} + <center> + <div class="alert alert-info"> + <h4>Files added to this lesson</h4> + </div> + </center> + {% for f in lesson_files %} + <li class="list-group-item"> + <h4> + <input type="checkbox" name="delete_files" value="{{f.id}}"> + </input> + <a href="{{f.file.url}}">{{ f.file.name|file_title }}</a> + </h4> + </li> + {% endfor %} + <br> + {% else %} + <center> + <div class="alert alert-warning"> + <h4 class="alert-warning">No Files added to this lesson</h4> + </div> + </center> + {% endif %} + <center> + <button class="btn btn-success btn-lg" type="submit" id="submit" name="Save"> + <i class="fa fa-save"></i> + Save + </button> + {% if lesson_files %} + <button class="btn btn-danger btn-lg" type="submit" id="submit" name="Delete"> <i class="fa fa-trash"></i> Delete Files + </button> + {% endif %} + <button class="btn btn-outline-primary btn-lg" type="button" name="button" id="preview"> + <i class="fa fa-eye"></i> + Preview Description + </button> + <button class="btn btn-outline-primary btn-lg" type="button" name="button" id="embed"> + <i class="fa fa-angle-left"></i> <i class="fa fa-angle-right"></i> + Embed Video link + </button> + </center> + </form> + <hr> + <div class="card" id="preview_text_div" style="display: none;"> + <div class="card-heading"> + <center> + <h3>Description Preview</h3> + </center> + </div> + <div class="card-body" id="description_body"> + </div> + </div> + </fieldset> + </form> </div> </div> </div> diff --git a/yaksh/templates/yaksh/add_module.html b/yaksh/templates/yaksh/add_module.html index 55dd8b8..d659ff2 100644 --- a/yaksh/templates/yaksh/add_module.html +++ b/yaksh/templates/yaksh/add_module.html @@ -2,8 +2,6 @@ {% load static %} {% block title %}Create/Edit Learning Module{% endblock %} -{% block pagetitle %}<h4>Design Learning Module</h4>{% endblock %} - {% block script %} <script type="text/javascript" src="{% static 'yaksh/js/jquery-3.3.1.min.js' %}"> </script> @@ -22,18 +20,6 @@ {% block content %} <div class="container"> -{% if course_id %} - <a href="{% url 'yaksh:get_course_modules' course_id %}" class="btn btn-primary"> - <i class="fa fa-arrow-left"></i> - Back to Courses - </a> -{% else %} - <a href="{% url 'yaksh:show_all_modules' %}" class="btn btn-primary"> - <i class="fa fa-arrow-left"></i> - Back to Learning Modules - </a> -{% endif %} -<br><br> {% if messages %} {% for message in messages %} <div class="alert alert-dismissible alert-{{ message.tags }}"> @@ -44,41 +30,86 @@ </div> {% endfor %} {% endif %} +{% if course_id %} + <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}"> + <i class="fa fa-arrow-left"></i> + Back + </a> +{% else %} + <a class="btn btn-primary" href="{% url 'yaksh:show_all_lessons' %}"> + <i class="fa fa-arrow-left"></i> + Back + </a> +{% endif %} +</div> +<br> {% if status == "add" %} -<form name=frm id=frm action="" method="post"> - {% csrf_token %} - <br> - <center> - <table class="table table-bordered table-responsive-sm"> - {{ module_form.as_table }} - </table> - </center> - <br><br> - <center> - <button class="btn btn-success btn-lg" type="submit" id="submit" name="Save"> - Save - </button> - <button class="btn btn-outline-primary btn-lg" type="button" name="button" id="preview"> - Preview Description - </button> - <button class="btn btn-outline-primary btn-lg" type="button" name="button" id="embed"> - Embed Video link - </button> - </center> -</form> -<hr> -<div class="card" id="preview_text_div" style="display: none;"> - <div class="card-heading"> - <center> - <h3>Description Preview</h3> - </center> - </div> - <div class="card-body" id="description_body"> +<div class="container"> + <div class="row justify-content-center form-group"> + <div class="col-md-9 col-md-offset-4"> + <form name=frm id=frm action="" method="post"> + <fieldset> + {% csrf_token %} + {% if module_form.errors %} + {% for field in module_form %} + {% for error in field.errors %} + <div class="alert alert-dismissible alert-danger"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ error|escape }}</strong> + </div> + {% endfor %} + {% endfor %} + {% for error in form.non_field_errors %} + <div class="alert alert-dismissible alert-danger"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ error|escape }}</strong> + </div> + {% endfor %} + {% endif %} + {{module_form.name}} + <br> + {{module_form.description}} + <br> + Active: {{module_form.active}} + <br> + <center> + <button class="btn btn-success btn-lg" type="submit" id="submit" name="Save"> + <i class="fa fa-save"></i> + Save + </button> + <button class="btn btn-outline-primary btn-lg" type="button" name="button" id="preview"> + <i class="fa fa-eye"></i> + Preview Description + </button> + <button class="btn btn-outline-primary btn-lg" type="button" name="button" id="embed"> + <i class="fa fa-angle-left"></i> <i class="fa fa-angle-right"></i> + Embed Video link + </button> + </center> + </form> + <hr> + <div class="card" id="preview_text_div" style="display: none;"> + <div class="card-heading"> + <center> + <h3>Description Preview</h3> + </center> + </div> + <div class="card-body" id="description_body"> + </div> + </div> + </fieldset> + </form> + </div> </div> </div> {% endif %} <!-- Add learning Units --> {% if status == "design" %} +<div class="container"> <center><h3><u>Add/Edit Learning Units</h3></u></center> {% if course_id %} <form action="{% url 'yaksh:design_module' module_id course_id %}" method="POST" id="design_course_form"> @@ -177,7 +208,7 @@ <br> <center> <button id="Remove" name="Remove" class="btn btn-danger" type="submit"> <i class="fa fa-minus-square"></i> Remove from Module</button> - <button id="Change" name="Change" class="btn btn-info" type="submit"> Change Order</button> + <button id="Change" name="Change" class="btn btn-info" type="submit"><i class="fa fa-reorder"></i> Change Order</button> <button id="Change" name="Change_prerequisite" class="btn btn-primary" type="submit"> Change Prerequisite</button> </center> </div> diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index 48d64ce..cc5a961 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -1,73 +1,104 @@ {% extends "manage.html" %} +{% load static %} +{% block title %}Add/Edit Quiz{% endblock %} -{% block subtitle %}Add Quiz{% endblock %} +{% block subtitle %}Add/Edit Quiz{% endblock %} {% block css %} -<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/jquery.datetimepicker.css" type="text/css" /> + +<link rel="stylesheet" href="{% static 'yaksh/css/jquery.datetimepicker.css' %}" type="text/css" /> {% endblock %} {% block script %} -<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-3.3.1.min.js"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/add_quiz.js"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/jquery.datetimepicker.full.min.js"></script> + +<script src="{% static 'yaksh/js/jquery-3.3.1.min.js' %}"></script> +<script src="{% static 'yaksh/js/add_quiz.js' %}"></script> +<script src="{% static 'yaksh/js/jquery.datetimepicker.full.min.js' %}"></script> + {% endblock %} {% block onload %} onload="javascript:test();" {% endblock %} {% block content %} -<div class="yakshwell container"> -<form name=frm id=frm action="" method="post" > - {% csrf_token %} - <center> - <table class="span1 table table-responsive-sm"> - {{ form.as_table }} - </table> - <script type="text/javascript"> - $("#id_start_date_time").datetimepicker({format: 'Y-m-d H:i:s'}); - $("#id_end_date_time").datetimepicker({format: 'Y-m-d H:i:s'}); - </script> - <br/><br/> - </center> - - <center><button class="btn btn-success" type="submit" id="submit" name="questionpaper"> Save - </button> - - <button class="btn btn-danger" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> - -</form> -<br> -{% if quiz and course_id %} - {% if quiz.questionpaper_set.get.id %} - <center> - <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/{{course_id}}" class="btn btn-primary">Edit Question Paper</a> - <a href="{{URL_ROOT}}/exam/manage/preview_questionpaper/{{quiz.questionpaper_set.get.id}}" class="btn btn-primary" target="_blank"> - Preview Question Paper +<div class="container"> + {% if messages %} + {% for message in messages %} + <div class="alert alert-dismissible alert-{{ message.tags }}"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ message }}</strong> + </div> + {% endfor %} + {% endif %} + {% if course_id %} + <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}"> + <i class="fa fa-arrow-left"></i> + Back + </a> + {% else %} + <a class="btn btn-primary" href="{% url 'yaksh:show_all_lessons' %}"> + <i class="fa fa-arrow-left"></i> + Back </a> - <br> - <br> - <h4>You can check the quiz by attempting it in the following modes:</h4> - <button class="btn btn-outline-info" type="button" name="button" onClick='usermode("{{URL_ROOT}}/exam/manage/usermode/{{quiz.id}}/{{course_id}}/");'>User Mode</button> + {% endif %} + <br><br> + <form name=frm id=frm action="" method="post" > + {% csrf_token %} + <center> + <table class="table"> + {{ form.as_table }} + </table> + <script type="text/javascript"> + $("#id_start_date_time").datetimepicker({format: 'Y-m-d H:i:s'}); + $("#id_end_date_time").datetimepicker({format: 'Y-m-d H:i:s'}); + </script> + <br/> + <button class="btn btn-success btn-lg" id="submit" name="questionpaper"> + <i class="fa fa-save"> Save</i> + </button> + </center> + </form> + <br> + {% if quiz and course_id %} + {% if quiz.questionpaper_set.get.id %} + <center> + <a href="{% url 'yaksh:designquestionpaper' quiz.id quiz.questionpaper_set.get.id course_id %}" class="btn btn-primary"> + <i class="fa fa-edit"></i> Edit Question Paper + </a> + <a href="{% url 'yaksh:preview_questionpaper' quiz.questionpaper_set.get.id %}" class="btn btn-info" target="_blank"> + <i class="fa fa-eye"></i> Preview Question Paper + </a> + <br> + <br> + <h4>You can check the quiz by attempting it in the following modes:</h4> + <a class="btn btn-outline-info" name="button" href="{% url 'yaksh:test_quiz' 'usermode' quiz.id course_id %}" target="blank"> + User Mode + </a> - <button class="btn btn-outline-info" 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=" text-info"><i class="fa fa-info-circle"></i> 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 %} -<style type="text/css"> - #rendered_text{ - width: 550px; - } -</style> + <a class="btn btn-outline-info" name="button" href="{% url 'yaksh:test_quiz' 'godmode' quiz.id course_id %}" target="blank"> + God Mode + </a> + <a data-toggle="collapse" data-target="#help"> + <span class=" text-info"><i class="fa fa-info-circle"></i> Help</span></a> + <div id="help" class="collapse"> + <br> + <div class="card border-primary"> + <div class="card-body"> + <b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - + <ul class="list-group list-group-flush"> + <li class="list-group-item">Quiz will have the same duration as that of the original quiz.</li> + <li class="list-group-item">Quiz won't start if the course is inactive or the quiz time has expired.</li> + <li class="list-group-item">You will be notified about quiz prerequisites.(You can still attempt the quiz though)</li> + </ul> + <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints. + </div> + </div> + </div> + {% endif %} + {% endif %} + <style type="text/css"> + #rendered_text{ + width: 550px; + } + </style> </div> {% endblock %} diff --git a/yaksh/templates/yaksh/course_added_modules.html b/yaksh/templates/yaksh/course_added_modules.html index 99f5dda..c70eb7a 100644 --- a/yaksh/templates/yaksh/course_added_modules.html +++ b/yaksh/templates/yaksh/course_added_modules.html @@ -10,11 +10,11 @@ {% for module in modules %} <tr> <td> - <a href="{{URL_ROOT}}/exam/manage/courses/add_module/{{module.id}}/{{course.id}}"> + <a href="{% url 'yaksh:edit_module' module.id course.id %}"> {{module.name}}</a> </td> <td> - <a href="{{URL_ROOT}}/exam/manage/courses/designmodule/{{module.id}}/{{course.id}}/"> + <a href="{% url 'yaksh:design_module' module.id course.id %}"> Add Quizzes/Lessons for {{module.name}} </a> </td> @@ -24,14 +24,14 @@ <li> {% if unit.type == "quiz" %} {% if unit.quiz.is_exercise %} - <a href="{{URL_ROOT}}/exam/manage/add_exercise/{{unit.quiz.id}}/{{course.id}}"> + <a href="{% url 'yaksh:edit_exercise' unit.quiz.id course.id %}"> {{unit.quiz.description}}</a> {% else %} - <a href="{{URL_ROOT}}/exam/manage/addquiz/{{unit.quiz.id}}/{{course.id}}"> + <a href="{% url 'yaksh:edit_quiz' unit.quiz.id course.id %}"> {{unit.quiz.description}}</a> {% endif %} {% else %} - <a href="{{URL_ROOT}}/exam/manage/courses/edit_lesson/{{unit.lesson.id}}/{{course.id}}"> + <a href="{% url 'yaksh:edit_lesson' unit.lesson.id course.id %}"> {{unit.lesson.name}}</a> {% endif %} </li> diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 2caf109..2617c61 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -62,12 +62,29 @@ {% include "yaksh/course_teachers.html" %} {% else %} <div class="jumbotron"> - <h1 class="display-3">Hello, world!</h1> - <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> + <h1 class="display-4">Manage Course</h1> <hr class="my-4"> - <p>It uses utility classes for typography and spacing to space content out within the larger container.</p> + <p> + <ul> + <li> + Students enrollments + </li> + <li> + Add and View Modules, Lessons and Quizzes + </li> + <li> + Send mail to the students + </li> + <li> + View Students course progress + </li> + <li> + Add and View Teachers/TAs + </li> + </ul> + </p> <p class="lead"> - <a class="btn btn-primary btn-lg" href="#" role="button"> + <a class="btn btn-primary btn-lg" href="https://yaksh.readthedocs.io/en/latest/moderator_docs/creating_course.html" role="button" target="blank"> <i class="fa fa-info-circle"></i> Learn more </a> diff --git a/yaksh/templates/yaksh/course_progress.html b/yaksh/templates/yaksh/course_progress.html index d7bb1c5..800a975 100644 --- a/yaksh/templates/yaksh/course_progress.html +++ b/yaksh/templates/yaksh/course_progress.html @@ -5,54 +5,58 @@ <div class="text-center"> <h3>Course Progress</h3> <div class="col"> - Number Of Students: {{ student_details | length }} + Number Of Students: {{ students_no }} </div> </div> + {% include "yaksh/paginator.html" %} <table class="tablesorter table table-bordered table-responsive-sm" id="course_table" data-sortlist="[0,0]"> <thead> <tr> - <th>Roll No.</th> - <th>Name</th> - <th>Current Unit</th> - <th>Completion Percentage</th> - <th>Grade</th> + <th>Sr. No</th> + <th>Roll No.</th> + <th>Name</th> + <th>Current Unit</th> + <th>Completion Percentage</th> + <th>Grade</th> </tr> </thead> <tbody> {% for student, grade, percent, unit in student_details %} <tr> - <td> - {{ student.profile.roll_number}} - </td> - <td width="50%"> - <a class="user_data" data-item-id="{{course.id}}+{{student.id}}" data-toggle="tooltip" title="Click to view Overall Course progress" data-placement="top"> - {{ student.get_full_name|title}} - <i class="fa fa-caret-down"></i> - </a> - <div id="show_status_{{course.id}}_{{student.id}}" style="display: None;"> - </div> - </td> - <td> - {% if unit %} - {% if unit.type == 'quiz' %} - {{unit.quiz.description}} + <td>{{forloop.counter}}</td> + <td> + {{ student.profile.roll_number}} + </td> + <td width="50%"> + <a class="user_data" data-item-id="{{course.id}}+{{student.id}}" data-toggle="tooltip" title="Click to view Overall Course progress" data-placement="top"> + {{ student.get_full_name|title}} + <i class="fa fa-caret-down"></i> + </a> + <div id="show_status_{{course.id}}_{{student.id}}" style="display: None;"> + </div> + </td> + <td> + {% if unit %} + {% if unit.type == 'quiz' %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} {% else %} - {{unit.lesson.name}} - {% endif %} - {% else %} - NA - {% endif%} - </td> - <td> - {{ percent }} % - </td> - <td> - {{ grade }} - </td> + NA + {% endif%} + </td> + <td> + {{ percent }} % + </td> + <td> + {{ grade }} + </td> </tr> {% endfor %} </tbody> </table> + {% include "yaksh/paginator.html" %} {% else %} <center> <span class="badge badge-warning"> diff --git a/yaksh/templates/yaksh/course_students.html b/yaksh/templates/yaksh/course_students.html index 9d14d98..ae35251 100644 --- a/yaksh/templates/yaksh/course_students.html +++ b/yaksh/templates/yaksh/course_students.html @@ -19,7 +19,7 @@ <div class="input-group-append"> <button class="btn btn-outline-primary" type=submit> <i class="fa fa-upload"></i> - Upload Users + Upload </button> </div> </div> diff --git a/yaksh/templates/yaksh/course_teachers.html b/yaksh/templates/yaksh/course_teachers.html index 1f241d0..1b1af87 100644 --- a/yaksh/templates/yaksh/course_teachers.html +++ b/yaksh/templates/yaksh/course_teachers.html @@ -19,7 +19,7 @@ <table> </div> <br> - <button class="btn btn-danger btn-lg" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course"> + <button class="btn btn-danger" type="submit" data-toggle="tooltip" title="Remove Selected Teachers from this course"> <i class="fa fa-minus-square"></i> Remove Teachers </button> diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index d811cf7..c8897aa 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -56,9 +56,6 @@ <center> <h2> No Courses Found </h2> <br> - <a href="{% url 'yaksh:add_course' %}" class="btn btn-success btn-lg"> - <span class=" fa fa-plus-circle"></span> Add Course - </a> </center> {% else %} <div class="container"> diff --git a/yaksh/templates/yaksh/design_course_session.html b/yaksh/templates/yaksh/design_course_session.html index 52895ed..a15f4b1 100644 --- a/yaksh/templates/yaksh/design_course_session.html +++ b/yaksh/templates/yaksh/design_course_session.html @@ -51,7 +51,8 @@ </div> <br> <center> - <button id="Add" name="Add" class="btn btn-success" type="submit">Add to course</button> + <button id="Add" name="Add" class="btn btn-success" type="submit"> + <i class="fa fa-plus-square"></i> Add to course</button> </center> <br><br> </div> @@ -126,8 +127,8 @@ </div> <br> <center> - <button id="Remove" name="Remove" class="btn btn-danger" type="submit">Remove from course</button> - <button id="Change" name="Change" class="btn btn-info" type="submit"> Change Order</button> + <button id="Remove" name="Remove" class="btn btn-danger" type="submit"><i class="fa fa-minus-square"></i> Remove from course</button> + <button id="Change" name="Change" class="btn btn-info" type="submit"><i class="fa fa-reorder"></i> Change Order</button> <button id="Change" name="change_prerequisite_completion" class="btn btn-primary" type="submit"> Change Prerequisite Completion</button> <button id="Change_prereq_passing" name="change_prerequisite_passing" class="btn btn-primary" type="submit"> Change Prerequisite Passing</button> diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html index 24be7b5..e9a6985 100644 --- a/yaksh/templates/yaksh/moderator_dashboard.html +++ b/yaksh/templates/yaksh/moderator_dashboard.html @@ -62,13 +62,13 @@ {% endif %} </div> <div class="col-md-3"> - <a href="{% url 'yaksh:course_detail' course.id %}" class="btn btn-primary btn-lg"> + <a href="{% url 'yaksh:course_detail' course.id %}" class="btn btn-primary"> <i class="fa fa-tasks"></i> Manage Course </a> </div> <div class="col-md"> - <a class="card-link btn btn-info btn-lg" data-toggle="collapse" href="#collapse{{course.id}}"> + <a class="card-link btn btn-info" data-toggle="collapse" href="#collapse{{course.id}}"> Details <i class="fa fa-toggle-down" id="toggle_course_{{course.id}}"></i> </a> |