diff options
-rw-r--r-- | yaksh/templates/manage.html | 1 | ||||
-rw-r--r-- | yaksh/templates/user.html | 1 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 71 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_modules.html | 23 | ||||
-rw-r--r-- | yaksh/templatetags/custom_filters.py | 5 |
5 files changed, 36 insertions, 65 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index 5b11a84..1dee595 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -31,7 +31,6 @@ <a class="dropdown-item" href="{{ URL_ROOT }}/exam/reset/changepassword/"><i class="fa fa-key"></i> Change Password</a> <div class="dropdown-divider"></div> <a class="dropdown-item" id="user_logout" href="{{URL_ROOT}}/exam/logout/"><i class="fa fa-sign-out"></i> Logout</a> - <div class="dropdown-divider"></div> </div> </li> </ul> diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html index db65195..4ded0a3 100644 --- a/yaksh/templates/user.html +++ b/yaksh/templates/user.html @@ -28,7 +28,6 @@ <a class="dropdown-item" href="{{ URL_ROOT }}/exam/reset/changepassword/"><i class="fa fa-key"></i> Change Password</a> <div class="dropdown-divider"></div> <a id="user_logout" class="dropdown-item" href="{{URL_ROOT}}/exam/logout/"><i class="fa fa-sign-out"></i> Logout</a> - </div> </li> </ul> diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 0fee438..a0a6ed2 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -141,61 +141,52 @@ <thead> <tr class="yakshlight"> <th>Sr No.</th> - <th>Students</th> - <th>Total</th> + <th>Roll No.</th> + <th>Email</th> + <th>Current Unit</th> + <th>Course Completion Percentage</th> <th>Grade</th> - <th colspan="{{modules|length}}">Modules</th> - </tr> - <tr> - <th scope="row"></th> - <th></th> - <th></th> - <th></th> - {% if modules %} - {% for module in modules %} - <th> - {{module.name}} - ({{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}}')" class="text-info"> <i class="fa fa-info-circle"></i> - View Units</a> - </th> - {% endfor %} - {% else %} - <th></th> - {% endif %} </tr> </thead> <tbody> - {% for student in students %} + {% for student, grade, percent, unit in student_details %} <tr> <td width="5%"> {{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"> + {% if student.email %} + {{ student.email }} + {% else %} + {{ student.get_full_name|title}} + {% endif %} + <i class="fa fa-caret-down"></i> + </a> + <div id="show_status_{{course.id}}_{{student.id}}" style="display: None;"> + </div> + </td> + <td> {{ student.get_full_name|title }} + {% if unit %} + {% if unit.type == 'quiz' %} + {{unit.quiz.description}} + {% else %} + {{unit.lesson.name}} + {% endif %} + {% else %} + NA + {% endif%} </td> <td> - {% course_completion_percent course student as c_percent %} - {{c_percent}} % + {{ percent }} % </td> <td> - {% course_grade course student as grade %} - {{grade}} + {{ grade }} </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}}')" class="text-info"> <i class="fa fa-info-circle"></i> - View Unit Status</a> - </td> - {% endfor %} - {% else %} - <td>-------</td> - {% endif %} </tr> {% endfor %} </tbody> diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html index 9d936d6..917f78c 100644 --- a/yaksh/templates/yaksh/course_modules.html +++ b/yaksh/templates/yaksh/course_modules.html @@ -18,7 +18,7 @@ <div class="row justify-content-md-center yakshwell "> <div class="col-md-10 bg-light card"> <div class="row align-items-center"> - <div class="col h4"> {{course}} </div> + <div class="col h4"> {{ course.name }} </div> <div class="col-md-3 ml-auto yakshwell"> <div class="row align-items-center"> <div class="col-sm-6"> Overall @@ -26,7 +26,7 @@ </div> <div class="col-sm-5"> <span class="progress"> - <span class="progress-bar bg-warning " role="progressbar" style="width: 50%; color: black;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50% completed</span> + <span class="progress-bar bg-warning " role="progressbar" style="width: {{ course_percentage }}%; color: black;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">{{ course_percentage }} % completed</span> </span> </div> </div> @@ -110,15 +110,15 @@ {% get_module_status user module course as module_status %} {% if module_status == "completed" %} <div class="progress"> - <div class="progress-bar bg-success" role="progressbar" style="width: 100%; color: black;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100% completed</div> + <div class="progress-bar bg-success" role="progressbar" style="width: 100%; color: black;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">{{ percent }} % completed</div> </div> {% elif module_status == "inprogress" %} <div class="progress"> - <div class="progress-bar bg-warning " role="progressbar" style="width: 50%; color: black;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50% completed</div> + <div class="progress-bar bg-warning " role="progressbar" style="width: 50%; color: black;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">{{ percent }} % completed</div> </div> {% else %} <div class="progress"> - <div class="progress-bar bg-danger" role="progressbar" style="width: 1%; color: black;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0% completed</div> + <div class="progress-bar bg-danger" role="progressbar" style="width: 1%; color: black;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">{{ percent }} % completed</div> </div> {% endif %} </div> @@ -176,19 +176,6 @@ ------ {% endif %} </td> - <td> - <div class="progress"> - {% if percent <= 50 %} - <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> - {% elif percent <= 75 %} - <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> - {% else %} - <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%"> - {% endif %} - <b style="color: black;">{{percent}}% Completed</b> - </div> - </div> - </td> </tr> {% endfor %} </table> diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py index b4b189a..dcae7f9 100644 --- a/yaksh/templatetags/custom_filters.py +++ b/yaksh/templatetags/custom_filters.py @@ -61,11 +61,6 @@ def module_completion_percent(course, module, user): @register.simple_tag -def course_completion_percent(course, user): - return course.percent_completed(user) - - -@register.simple_tag def get_ordered_testcases(question, answerpaper): return question.get_ordered_test_cases(answerpaper) |