diff options
author | ankitjavalkar | 2019-01-09 15:18:30 +0530 |
---|---|---|
committer | ankitjavalkar | 2019-01-09 15:18:30 +0530 |
commit | c04f586f8ac85bf0fd0290b97c8d727e4e21274c (patch) | |
tree | 417958a7a6fe540bd9bee728553d963e0f170aa9 /yaksh | |
parent | 83949a7cc5e4fe1f8697d0873015466ec8e96110 (diff) | |
download | online_test-c04f586f8ac85bf0fd0290b97c8d727e4e21274c.tar.gz online_test-c04f586f8ac85bf0fd0290b97c8d727e4e21274c.tar.bz2 online_test-c04f586f8ac85bf0fd0290b97c8d727e4e21274c.zip |
Multiple changes in new UI:
- Deprecate usage of 'course_completion_percent' custom template tag
- Replace old code in course_detail.html
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 66 | ||||
-rw-r--r-- | yaksh/templatetags/custom_filters.py | 5 |
2 files changed, 26 insertions, 45 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 0fee438..54af854 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -141,61 +141,47 @@ <thead> <tr class="yakshlight"> <th>Sr No.</th> - <th>Students</th> - <th>Total</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 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 %} + </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/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) |