summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorCruiseDevice2019-05-31 18:46:03 +0530
committerCruiseDevice2019-05-31 18:46:03 +0530
commitec55273fcc0c374dbaf213910f760660fb1419a6 (patch)
treee77b3d4d37b6c3508e6488dd0c2d554b76cf2387 /yaksh/templates
parent519cbb803c8020527578d2e9cc1b55a20f29c8ee (diff)
downloadonline_test-ec55273fcc0c374dbaf213910f760660fb1419a6.tar.gz
online_test-ec55273fcc0c374dbaf213910f760660fb1419a6.tar.bz2
online_test-ec55273fcc0c374dbaf213910f760660fb1419a6.zip
Add templates and more features
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/index.html20
-rw-r--r--yaksh/templates/yaksh/module.html33
-rw-r--r--yaksh/templates/yaksh/quiz.html73
-rw-r--r--yaksh/templates/yaksh/unit.html22
4 files changed, 122 insertions, 26 deletions
diff --git a/yaksh/templates/yaksh/index.html b/yaksh/templates/yaksh/index.html
index c89405d..9bd28d5 100644
--- a/yaksh/templates/yaksh/index.html
+++ b/yaksh/templates/yaksh/index.html
@@ -1,12 +1,15 @@
{% 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-3.3.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">
+<head>
+ <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">
+ <title>
+ {% block pagetitle %} {{course.name}} {% endblock %}
+ </title>
+</head>
+<body>
+<nav class="navbar bg-dark navbar-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">
@@ -56,4 +59,7 @@
<p align="center">Developed by FOSSEE group, IIT Bombay</p>
</div>
</footer>
+</body>
+<script src="static/js/jquery-3.3.1.min.js"></script>
+<script src="static/js/bootstrap.min.js"></script>
</html> \ No newline at end of file
diff --git a/yaksh/templates/yaksh/module.html b/yaksh/templates/yaksh/module.html
index 6109403..b062159 100644
--- a/yaksh/templates/yaksh/module.html
+++ b/yaksh/templates/yaksh/module.html
@@ -1,13 +1,14 @@
{% 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-3.3.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">
+<head>
+ <link rel="stylesheet" href="../static/css/bootstrap.min.css">
+ <link rel="stylesheet" href="../static/css/offline.css">
+ <title>
+ {% block pagetitle %} {{module.name}} {% endblock %}
+ </title>
+</head>
+<body>
+ <nav class="navbar bg-dark navbar-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">
@@ -34,10 +35,16 @@
<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}}
+ {% for unit in units %}
+ {% if unit.type == 'lesson' %}
+ <a href="{{unit.lesson.name|replace_spaces}}/{{unit.lesson.name|replace_spaces}}.html" target="_blank" class="list-group-item">
+ {{unit.lesson.name}}
+ </a>
+ {% else %}
+ <a href="{{unit.quiz.description|replace_spaces}}/{{unit.quiz.description|replace_spaces}}.html" target="_blank" class="list-group-item">
+ {{unit.quiz.description}}
</a>
+ {% endif %}
{% endfor %}
</ul>
</td>
@@ -53,4 +60,8 @@
<p align="center">Developed by FOSSEE group, IIT Bombay</p>
</div>
</footer>
+</body>
+<script src="../static/js/jquery-3.3.1.min.js"></script>
+<script src="../static/js/bootstrap.min.js"></script>
+<script src="https://vjs.zencdn.net/6.9.0/video.js"></script>
</html> \ No newline at end of file
diff --git a/yaksh/templates/yaksh/quiz.html b/yaksh/templates/yaksh/quiz.html
new file mode 100644
index 0000000..fd52e7d
--- /dev/null
+++ b/yaksh/templates/yaksh/quiz.html
@@ -0,0 +1,73 @@
+{% load custom_filters %}
+<html>
+<head>
+ <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">
+ <title>
+ {% block pagetitle %} {{course.name}} {% endblock %}
+ </title>
+</head>
+<body>
+<nav class="navbar bg-dark navbar-dark">
+ <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>
+ <div id="status"></div>
+ <hr>
+ <h3>{{unit.description}}</h3>
+ <a href="http://127.0.0.1:8000/exam/start/{{quiz.questionpaper_set.get.id}}/{{module.id}}/{{course.id}}" target="_blank">{{quiz.description}}</a>
+ <br>
+
+ {% if unit.type == 'lesson' %}
+ <a href="{{unit.lesson.name|replace_spaces}}/{{unit.lesson.name|replace_spaces}}.html" target="_blank" class="list-group-item">
+ {{unit.lesson.name}}
+ </a>
+ {% else %}
+ <a href="{{unit.quiz.description|replace_spaces}}/{{unit.quiz.description|replace_spaces}}.html" target="_blank" class="list-group-item">
+ {{unit.quiz.description}}
+ </a>
+ {% endif %}
+
+ {% endblock %}
+</div>
+<footer class="footer" id="footer_div">
+ <div class="container">
+ <p align="center">Developed by FOSSEE group, IIT Bombay</p>
+ </div>
+</footer>
+</body>
+<script src="../../static/js/jquery-3.3.1.min.js"></script>
+<script src="../../static/js/bootstrap.min.js"></script>
+<script src="../../static/js/video.js"></script>
+
+<script type="text/javascript">
+$(document).ready(function(){
+ var online = navigator.onLine;
+ if(online){
+ var status = document.getElementById("status").innerHTML = "<span class='badge badge-success'>User is online</span>";
+
+ }else{
+ document.getElementById("status").innerHTML = "<span class='badge badge-danger'>User is offline</span>";
+ }
+});
+</script>
+</html> \ No newline at end of file
diff --git a/yaksh/templates/yaksh/unit.html b/yaksh/templates/yaksh/unit.html
index 5bf11f1..c5bb1e5 100644
--- a/yaksh/templates/yaksh/unit.html
+++ b/yaksh/templates/yaksh/unit.html
@@ -1,13 +1,15 @@
{% 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-3.3.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">
+<head>
+ <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">
+ <title>
+ {% block pagetitle %} {{module.name}} {% endblock %}
+ </title>
+</head>
+<body>
+<nav class="navbar bg-dark navbar-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">
@@ -69,4 +71,8 @@
<p align="center">Developed by FOSSEE group, IIT Bombay</p>
</div>
</footer>
+</body>
+<script src="../../static/js/jquery-3.3.1.min.js"></script>
+<script src="../../static/js/bootstrap.min.js"></script>
+<script src="../../static/js/video.js"></script>
</html> \ No newline at end of file