diff options
author | King | 2018-07-12 07:00:27 -0700 |
---|---|---|
committer | GitHub | 2018-07-12 07:00:27 -0700 |
commit | 550d41f4ead0a7142e99f57096caef9555006fc0 (patch) | |
tree | 8ca9e928517964f74536deb1fc304114e19c5b6b /yaksh/templates | |
parent | a850749942d163f9aedb19a1d19c4b8d7016745d (diff) | |
parent | 7b268a2daf288fec1163d7f2322c4eb7575da78d (diff) | |
download | online_test-550d41f4ead0a7142e99f57096caef9555006fc0.tar.gz online_test-550d41f4ead0a7142e99f57096caef9555006fc0.tar.bz2 online_test-550d41f4ead0a7142e99f57096caef9555006fc0.zip |
Merge pull request #487 from adityacp/video_lessons_download
Download course content for offline view
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/manage.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_lesson.html | 31 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 11 | ||||
-rw-r--r-- | yaksh/templates/yaksh/index.html | 59 | ||||
-rw-r--r-- | yaksh/templates/yaksh/module.html | 56 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 6 | ||||
-rw-r--r-- | yaksh/templates/yaksh/show_video.html | 18 | ||||
-rw-r--r-- | yaksh/templates/yaksh/unit.html | 72 |
8 files changed, 233 insertions, 22 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html index c1f9da3..2889905 100644 --- a/yaksh/templates/manage.html +++ b/yaksh/templates/manage.html @@ -30,7 +30,7 @@ <!-- iframe div for video embed --> <div id="iframe_div" style="display: none;"> <div style="width: 640px; height: 480px; position: relative;"> - <iframe id="video_frame" width="800" height="500" frameborder="0" allowfullscreen> + <iframe id="video_frame" width="640" height="480" frameborder="0" allowfullscreen> </iframe> <div style="width: 80px; height: 80px; position: absolute; opacity: 0; right: 0px; top: 0px;"> </div> diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index d9bc1e7..ebc3ed7 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -9,10 +9,16 @@ {% endblock %} {% block css %} -<link rel="stylesheet" href="https://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"> +<link rel="stylesheet" href="{{URL_ROOT}}/static/yaksh/css/jquery-ui.css"> +<link rel="stylesheet" href="{{URL_ROOT}}/static/yaksh/css/lesson.css"> {% endblock %} {% block content %} +{% 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> @@ -22,24 +28,29 @@ </table> </center> <br><br> - <center> {% if lesson_files %} <div class="alert alert-success"> - <h4>Files added to this lesson</h4> + <center><h4>Files added to this lesson</h4></center> </div> + <ul class="list-group"> + <strong> + Select checkbox and click Delete Files button to delete files + </strong> {% for f in lesson_files %} - <h4><input type="checkbox" name="delete_files" value="{{f.id}}"> Delete</input> - <a href="{{f.file.url}}">{{ f.file.name|file_title }}</a> - ({{f.file.url}}) - </h4><br> + <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 %} <div class="alert alert-warning"> - <h4 class="alert-warning">No Files added to this lesson</h4> + <center><h4 class="alert-warning">No Files added to this lesson + </h4></center> </div> {% endif %} - - </center> <br><br> <center> <button class="btn" type="submit" id="submit" name="Save"> Save diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index ba09c6d..3a98792 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -140,6 +140,12 @@ <a class="test" href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/" data-toggle="tooltip" title="Creates Copy of selected Course as well as its Modules, Lessons/Quizzes" data-placement="top"> Clone Course</a> </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content for offline view" data-placement="top"> + Download course offline + </a> + </li> </ul> </td> <td> @@ -276,6 +282,11 @@ <a class="test" href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/" data-toggle="tooltip" title="Creates Copy of selected Course as well as its Modules, Lessons/Quizzes" data-placement="top"> Clone Course</a> </li> + <br> + <li> + <a href="{{URL_ROOT}}/exam/manage/courses/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content for offline view" data-placement="top">Download course offline + </a> + </li> </ul> </td> <td> diff --git a/yaksh/templates/yaksh/index.html b/yaksh/templates/yaksh/index.html new file mode 100644 index 0000000..a90cf4c --- /dev/null +++ b/yaksh/templates/yaksh/index.html @@ -0,0 +1,59 @@ +{% load custom_filters %} +<html> +<link rel="stylesheet" href="static/css/bootstrap.css"> +<link rel="stylesheet" href="static/css/bootstrap.min.css"> +<link rel="stylesheet" href="static/css/offline.css"> +<script src="static/js/jquery-1.9.1.min.js"></script> +<script src="static/js/bootstrap.min.js"></script> +{% block pagetitle %} {{course.name}} {% endblock %} +<nav class="navbar navbar-inverse navbar-fixed-top"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="#"> + <img src="static/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> + </div> + </div> +</nav> +<div class="container" style="margin-top:50px"> + <h1> + <center> + {% block subtitle %} + {{course.name}} + {% endblock %} + </center> + </h1> + {% block content %} + <table class="table"> + {% for module in modules %} + <tr> + <td> + {{module.name}} + <div id="{{module.id}}" class="collapse"> + <ul class="list"> + {% for lesson in module.get_lesson_units %} + <li>{{lesson.name}}</li> + {% endfor %} + </ul> + </div> + </td> + <td> + <button class="btn btn-info" data-toggle="collapse" data-target="#{{module.id}}"> + View Lessons + </button> + </td> + <td> + <a href="{{module.name|replace_spaces}}/{{module.name|replace_spaces}}.html" target="_blank" class="btn btn-primary">Go to Module</a> + </td> + </tr> + {% endfor %} + </table> + {% endblock %} +</div> +<footer class="footer" id="footer_div"> + <div class="container"> + <p align="center">Developed by FOSSEE group, IIT Bombay</p> + </div> +</footer> +</html>
\ No newline at end of file diff --git a/yaksh/templates/yaksh/module.html b/yaksh/templates/yaksh/module.html new file mode 100644 index 0000000..2ce5442 --- /dev/null +++ b/yaksh/templates/yaksh/module.html @@ -0,0 +1,56 @@ +{% load custom_filters %} +<html> +<link rel="stylesheet" href="../static/css/bootstrap.css"> +<link rel="stylesheet" href="../static/css/bootstrap.min.css"> +<link rel="stylesheet" href="../static/css/offline.css"> +<script src="../static/js/jquery-1.9.1.min.js"></script> +<script src="../static/js/bootstrap.min.js"></script> +<script src="https://vjs.zencdn.net/6.9.0/video.js"></script> +{% block pagetitle %} {{module.name}} {% endblock %} +<nav class="navbar navbar-inverse navbar-fixed-top"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="#"> + <img src="../static/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> + </div> + </div> +</nav> +<div class="container" style="margin-top:50px"> + <h1> + <center> + {% block subtitle %} + {{course.name}} + {% endblock %} + </center> + </h1> +<hr> +{% block content %} + <center><h2>{{module.name}}</h2></center> + <table class="table module"> + <tr> + <td> + <h4><strong>Lessons (Click on lesson name to open lesson) + </strong></h4> + <ul class="list-group"> + {% for lesson in lessons %} + <a href="{{lesson.name|replace_spaces}}/{{lesson.name|replace_spaces}}.html" target="_blank" class="list-group-item"> + {{lesson.name}} + </a> + {% endfor %} + </ul> + </td> + <td> + {{module.html_data|safe}} + </td> + </tr> + </table> +{% endblock %} +</div> +<footer class="footer" id="footer_div"> + <div class="container"> + <p align="center">Developed by FOSSEE group, IIT Bombay</p> + </div> +</footer> +</html>
\ No newline at end of file diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index 49f8d2d..78cdc48 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -42,6 +42,10 @@ No Courses to display {% if user in course.requests.all %} <span class="label label-warning">Request Pending </span> {% elif user in course.rejected.all %}<span class="label label-danger">Request Rejected</span> {% elif user in course.students.all %}<span class="label label-info">Enrolled</span> + {% if course.has_lessons %} <a href="{{URL_ROOT}}/exam/download_course/{{course.id}}" data-toggle="tooltip" title="Download course content" class="btn btn-primary"> + Download Course + </a> + {% endif %} {% else %} {% if course.active %} {% if course.is_active_enrollment %} @@ -57,7 +61,7 @@ No Courses to display {% endif %} {% else %} <span class="label label-danger" style="font-size: 15px"> - Course is not activated + Course Closed </span> {% endif %} {% endif %} diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html index eae3762..045eb87 100644 --- a/yaksh/templates/yaksh/show_video.html +++ b/yaksh/templates/yaksh/show_video.html @@ -125,18 +125,16 @@ </div> </div> {% if lesson.get_files %} - <div class="panel" style="border-width: 10px;"> - <center> - <div class="alert alert-success"> - <h4>Files for this lesson</h4> - </div> + <div class="panel-body" style="border-width: 10px;"> + <h4><strong>Lesson Files (Click on file to download) + </strong></h4> + <ul class="list-group"> {% for f in lesson.get_files %} - <h4> - <b>{{forloop.counter}}.</b> - <a href="{{f.file.url}}">{{ f.file.name|file_title }}</a> - </h4><br> + <a class="list-group-item" href="{{f.file.url}}"> + {{ f.file.name|file_title }} + </a> {% endfor %} - </center> + </ul> </div> {% endif %} <div style="text-align: center;"> diff --git a/yaksh/templates/yaksh/unit.html b/yaksh/templates/yaksh/unit.html new file mode 100644 index 0000000..bd34b32 --- /dev/null +++ b/yaksh/templates/yaksh/unit.html @@ -0,0 +1,72 @@ +{% load custom_filters %} +<html> +<link rel="stylesheet" href="../../static/css/bootstrap.css"> +<link rel="stylesheet" href="../../static/css/bootstrap.min.css"> +<link rel="stylesheet" href="../../static/css/offline.css"> +<link rel="stylesheet" href="../../static/css/video-js.css"> +<script src="../../static/js/jquery-1.9.1.min.js"></script> +<script src="../../static/js/bootstrap.min.js"></script> +<script src="../../static/js/video.js"></script> +<nav class="navbar navbar-inverse navbar-fixed-top"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="#"> + <img src="../../static/images/yaksh_banner.png" alt="YAKSH"> + </img> + </a> + </div> + </div> +</nav> +<div class="container" style="margin-top:50px"> + <center> + <h1> + {% block subtitle %} + {{course.name}} + {% endblock %} + </h1> + <hr> + </center> + {% block content %} + <center><h2>{{module.name}}</h2></center> + <hr> + <h3>{{lesson.name}}</h3> + {% if lesson.video_file %} + <video id="lesson_video" height="500" class="video-js" controls preload="auto" data-setup='{"playbackRates": [0.5, 1, 1.5, 2]}'> + <source src="{{lesson.video_file.name|file_title}}"> + </video> + {% endif %} + <br> + <table class="table"> + <tr> + <td> + {{lesson.html_data|safe}} + </td> + <td> + {% if lesson_files %} + <h4><strong>Lesson Files (Click on lesson file to download) + </strong></h4> + <ul class="list-group"> + {% for file in lesson_files %} + <a href="{{file.file.name|file_title}}" class="list-group-item"> + {{file.file.name|file_title}} + </a> + {% endfor %} + </ul> + {% else %} + <ul class="list-group"> + <li class="list-group-item"> + <h4>No files for {{lesson.name}}</h4> + </li> + </ul> + {% endif %} + </td> + </tr> + </table> + {% endblock %} +</div> +<footer class="footer" id="footer_div"> + <div class="container"> + <p align="center">Developed by FOSSEE group, IIT Bombay</p> + </div> +</footer> +</html>
\ No newline at end of file |