summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/manage.html2
-rw-r--r--yaksh/templates/yaksh/add_lesson.html28
-rw-r--r--yaksh/templates/yaksh/courses.html10
-rw-r--r--yaksh/templates/yaksh/index.html69
-rw-r--r--yaksh/templates/yaksh/module.html74
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html6
-rw-r--r--yaksh/templates/yaksh/show_video.html18
-rw-r--r--yaksh/templates/yaksh/unit.html82
8 files changed, 268 insertions, 21 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;">&nbsp;
</div>
diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html
index d9bc1e7..9feaf30 100644
--- a/yaksh/templates/yaksh/add_lesson.html
+++ b/yaksh/templates/yaksh/add_lesson.html
@@ -13,6 +13,11 @@
{% 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 +27,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}}">&nbsp;Delete</input>&nbsp;
- <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..77e1859 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -140,6 +140,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 in html format" data-placement="top">Download Course
+ </a>
+ </li>
</ul>
</td>
<td>
@@ -276,6 +281,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 in html format" data-placement="top">Download Course
+ </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..9a2c395
--- /dev/null
+++ b/yaksh/templates/yaksh/index.html
@@ -0,0 +1,69 @@
+{% load custom_filters %}
+<html>
+<link rel="stylesheet" href="static/css/bootstrap.css">
+<link rel="stylesheet" href="static/css/bootstrap.min.css">
+<script src="static/js/jquery-1.9.1.min.js"></script>
+<script src="static/js/bootstrap.min.js"></script>
+<style>
+.footer {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ background-color: #D3D3D3;
+ color: black;
+ text-align: center;
+}
+</style>
+{% 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..a2a2c96
--- /dev/null
+++ b/yaksh/templates/yaksh/module.html
@@ -0,0 +1,74 @@
+{% load custom_filters %}
+<html>
+<link rel="stylesheet" href="../static/css/bootstrap.css">
+<link rel="stylesheet" href="../static/css/bootstrap.min.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>
+<style>
+.footer {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ background-color: #D3D3D3;
+ color: black;
+ text-align: center;
+}
+table {
+ border: none;
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+table tr td:nth-child(2) {
+ border-left: 1px solid #D3D3D3;
+}
+</style>
+{% 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">
+ <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 %}&nbsp;&nbsp;&nbsp;<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..3ffc399
--- /dev/null
+++ b/yaksh/templates/yaksh/unit.html
@@ -0,0 +1,82 @@
+{% 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/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>
+<style>
+.footer {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ background-color: #D3D3D3;
+ color: black;
+ text-align: center;
+}
+</style>
+<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