diff options
author | ankitjavalkar | 2018-09-28 17:09:45 +0530 |
---|---|---|
committer | ankitjavalkar | 2018-09-28 17:09:45 +0530 |
commit | bdd20668da9631396866e8a1942bcb8b2e623396 (patch) | |
tree | 3816593d89da275bf7fd05dae805e03103242390 | |
parent | cb907831ace6a4ecf37c7a6149c6ebef21ffd772 (diff) | |
download | online_test-bdd20668da9631396866e8a1942bcb8b2e623396.tar.gz online_test-bdd20668da9631396866e8a1942bcb8b2e623396.tar.bz2 online_test-bdd20668da9631396866e8a1942bcb8b2e623396.zip |
Fix errors and test cases
-rw-r--r-- | yaksh/templates/yaksh/show_video.html | 19 | ||||
-rw-r--r-- | yaksh/templatetags/custom_filters.py | 5 | ||||
-rw-r--r-- | yaksh/views.py | 4 |
3 files changed, 7 insertions, 21 deletions
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index dfb2f6f..575c296 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -6,25 +6,6 @@ {% block main %} -<div class="col-sm-3 col-md-2 sidebar"> - <center> - <a href="{{URL_ROOT}}/exam/course_modules/{{course.id}}"> - <h4>{{course.name}}</h4> - </a> - </center> - <br> - {% for module in all_modules %} - {% if module.id == learning_module.id %} - <span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Currently on"> - </span> - {% endif %} - <b><u><a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}">{{module}}</u></b> - </a> - <ul class="list"> - {% for unit in module.get_learning_units %} - <span> - <li> - {% get_unit_status course module unit user as status %} <div class="row"> diff --git a/yaksh/templatetags/custom_filters.py b/yaksh/templatetags/custom_filters.py index fae0382..b4b189a 100644 --- a/yaksh/templatetags/custom_filters.py +++ b/yaksh/templatetags/custom_filters.py @@ -92,3 +92,8 @@ def replace_spaces(name): @register.simple_tag def get_questions_by_type(all_questions, question_type): return [question for question in all_questions if question.type == question_type] + + +@register.simple_tag +def course_grade(course, user): + return course.get_grade(user) diff --git a/yaksh/views.py b/yaksh/views.py index 5c3ba93..de6a1a2 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -2895,9 +2895,9 @@ def download_course(request, course_id): course_name = course.name.replace(" ", "_") # Static files required for styling in html template - static_files = {"js": ["bootstrap.js", "bootstrap.min.js", + static_files = {"js": ["bootstrap.min.js", "jquery-1.9.1.min.js", "video.js"], - "css": ["bootstrap.css", "bootstrap.min.css", + "css": ["bootstrap.min.css", "video-js.css", "offline.css"], "images": ["yaksh_banner.png"]} zip_file = course.create_zip(current_dir, static_files) |