diff options
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/showquestions.html | 31 | ||||
-rw-r--r-- | yaksh/templates/yaksh/unit.html | 72 |
9 files changed, 262 insertions, 24 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/showquestions.html b/yaksh/templates/yaksh/showquestions.html index 4240b2e..ff7a627 100644 --- a/yaksh/templates/yaksh/showquestions.html +++ b/yaksh/templates/yaksh/showquestions.html @@ -15,13 +15,40 @@ <div class="col-sm-3 col-md-2 sidebar"> <ul class="nav nav-sidebar nav-stacked"> <li class="active"><a href="#show" data-toggle="pill" > Show all Questions</a></li> - <li><a href="#updown" data-toggle="pill" > Upload and Download Questions</a></li> + <li><a href="#updown" data-toggle="pill" > Upload Questions</a></li> </ul> </div> <div class="tab-content col-md-9 col-md-offset-2 main"> <!-- Upload Questions --> + <div id="updown" class="tab-pane fade"> -<a class="btn btn-primary" href="{{URL_ROOT}}/exam/manage/courses/download_yaml_template/"> Download Template</a> +<div class="alert alert-info" role="alert"> + <p>You can upload question files the following ways - + <li><b><u>Yaml File</u></b> + <p>One can upload Yaml file with extensions .yaml or .yml. Please note + that you cannot upload files associated to a question. Yaml file can + have any name. + </p> + </li> + <li><b><u>Zip File</u></b> + <p> One can also upload zip with the following zip structure - + <pre> + .zip + |-- .yaml or .yml + |-- .yaml or .yml + |-- folder1 + | |-- Files required by questions + |-- folder2 + | |-- Files required by questions + </pre> + </li> + </p> + + <p> + <b> Click <a class="btn btn-success" href="{{URL_ROOT}}/exam/manage/courses/download_yaml_template/" +>here</a> to download a sample YAML, edit and upload it</b> + </p> + </div> <br/> <h4> Or </h4> <form action="" method="post" enctype="multipart/form-data"> 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 |