summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorCruiseDevice2019-07-26 12:46:37 +0530
committerCruiseDevice2019-07-26 12:46:37 +0530
commitedb32a53fbb27b3a913ba371a6f53732f0505fe9 (patch)
tree1a32983673a78de33e8c0ebc8b57e3b66b4296ec /yaksh/templates
parent323e34a6755e794c0177afdb36cd931d25db3d77 (diff)
downloadonline_test-edb32a53fbb27b3a913ba371a6f53732f0505fe9.tar.gz
online_test-edb32a53fbb27b3a913ba371a6f53732f0505fe9.tar.bz2
online_test-edb32a53fbb27b3a913ba371a6f53732f0505fe9.zip
Move Download Course button on first page under "Enrolled Courses"
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_modules.html10
-rw-r--r--yaksh/templates/yaksh/index.html4
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html82
3 files changed, 47 insertions, 49 deletions
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html
index e1fdc51..8440d51 100644
--- a/yaksh/templates/yaksh/course_modules.html
+++ b/yaksh/templates/yaksh/course_modules.html
@@ -62,7 +62,7 @@
<b style="color: black;">{{course_percentage}}% Completed</b>
</div>
</div>
-
+
{% for module, percent in modules %}
<div class="yakshwell">
<div class="row yakshlabel align-items-center">
@@ -72,14 +72,14 @@
<div class="col-md-1">
<a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');">
- <div class="btn yakshred">
+ <div class="btn yakshred">
<span class="fa fa-caret-down fa-2x" id="learning_units{{module.id}}{{course.id}}_down" >
</span>
<span class="fa fa-caret-right fa-2x" id="learning_units{{module.id}}{{course.id}}_up" style="display: none; ">
</span>
</div>
</a>
-
+
</div>
<div class="col-md-5 ml-auto">
<div class="row align-items-center justify-content-md-end">
@@ -122,7 +122,7 @@
</div>
<div id="learning_units{{module.id}}{{course.id}}" class="collapse">
<table class="table yakshwell">
-
+
{% for unit in module.get_learning_units %}
<tr>
<td>
@@ -143,7 +143,7 @@
{{unit.lesson.name}}
{% endif %}
</td>
-
+
<td>
{% get_unit_status course module unit user as status %}
{% if status == "completed" %}
diff --git a/yaksh/templates/yaksh/index.html b/yaksh/templates/yaksh/index.html
index cf5f35c..90a05fe 100644
--- a/yaksh/templates/yaksh/index.html
+++ b/yaksh/templates/yaksh/index.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="static/css/offline.css">
<title>
{% block pagetitle %} {{course.name}} {% endblock %}
- </title>
+ </title>
</head>
<body>
<nav class="navbar bg-dark navbar-dark">
@@ -56,7 +56,7 @@
</div>
<br>
{% endfor %}
- {% endblock %}
+ {% endblock %}
</div>
</div>
</div>
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index ee5b684..eb3705e 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -14,7 +14,7 @@
{% endif %}
{% block navtab %}
- {% if 'Enrolled Courses' not in title%}
+ {% if 'Enrolled Courses' not in title%}
<div class="container">
<div class="nav nav-tabs yakshnavtab">
<li class="nav-item" >
@@ -25,13 +25,13 @@
</li>
</div>
</div>
- <div class="row justify-content-center yakshwell">
+ <div class="row justify-content-center yakshwell">
<div class="col-md-6">
<div class="yakshwell">
<form action="{{ URL_ROOT }}/exam/quizzes/" method="post" id="custom-search-form" >
{% csrf_token %}
<div class="col-md-12">
- <div class="input-group">
+ <div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Search Course</span>
</div>
@@ -63,7 +63,7 @@
{% if not courses %}
<center><div class="col-md-8 alert alert-warning animated flash" role="alert">
No Courses to display
- </div></center>
+ </div></center>
{% endif %}
<div class="row justify-content-md-center align-items-center" >
@@ -89,46 +89,44 @@
{{course.data.days_before_start}} day(s) to start
</span>
{% endif %}
-
+
</div>
- <div class="container col-sm-4 offset-sm-2">
- <span class="row align-items-center">
- <span class="col-sm-4" >
- <a class="btn btn-primary" data-toggle="collapse" href="#collapsedetails{{course.data.id}}" role="button" aria-expanded="false" aria-controls="#collapsedetails{{course.data.id}}">DETAILS</a>
- </span>
-
- <span class="col-sm-auto">
- {% if user in course.data.requests.all %} <span class="badge badge-warning">Request Pending </span>
- {% elif user in course.data.rejected.all %}<span class="badge badge-danger">Request Rejected</span>
- {% elif user in course.data.students.all %}
- <a class="btn btn-success" href="{{URL_ROOT}}/exam/course_modules/{{course.data.id}}" >
- {% if course.completion_percentage > 0 %}
- CONTINUE
+ <div class="container-fluid">
+ <a class="btn btn-primary" data-toggle="collapse" href="#collapsedetails{{course.data.id}}" role="button" aria-expanded="false" aria-controls="#collapsedetails{{course.data.id}}">DETAILS</a>
+ {% if user in course.data.requests.all %} <span class="badge badge-warning">Request Pending </span>
+ {% elif user in course.data.rejected.all %}<span class="badge badge-danger">Request Rejected</span>
+ {% elif user in course.data.students.all %}
+ {% if course.data.has_lessons %}
+ <a href="{% url 'yaksh:download_course' course.data.id %}" data-toggle="tooltip" title="Download course content" class="btn btn-primary">
+ Download Course
+ </a>
+ {% endif %}
+ <a class="btn btn-success" href="{{URL_ROOT}}/exam/course_modules/{{course.data.id}}" >
+ {% if course.completion_percentage > 0 %}
+ CONTINUE
+ {% else %}
+ START
+ {% endif %}
+ </a>
+ {% else %}
+ {% if course.data.active %}
+ {% if course.data.is_active_enrollment %}
+ {% if course.data.is_self_enroll %}
+ <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.data.id }}">ENROLL</a>
{% else %}
- START
+ <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.data.id }}">ENROLL</a>
{% endif %}
- </a>
{% else %}
- {% if course.data.active %}
- {% if course.data.is_active_enrollment %}
- {% if course.data.is_self_enroll %}
- <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.data.id }}">ENROLL</a>
- {% else %}
- <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.data.id }}">ENROLL</a>
- {% endif %}
- {% else %}
- <span class="btn btn-danger disabled" style="font-size: 15px">
- Enrollment Closed
- </span>
- {% endif %}
- {% else %}
- <span class="badge badge-danger" style="font-size: 15px">
- Inactive Course
- </span>
- {% endif %}
+ <span class="btn btn-danger disabled" style="font-size: 15px">
+ Enrollment Closed
+ </span>
{% endif %}
- </span>
- </span>
+ {% else %}
+ <span class="badge badge-danger" style="font-size: 15px">
+ Inactive Course
+ </span>
+ {% endif %}
+ {% endif %}
</div>
<!-- About course-->
<div class="collapse container-fluid" id="collapsedetails{{course.data.id}}">
@@ -147,7 +145,7 @@
{% for module in course.data.get_learning_modules %}
<li>{{module.name|title}}</li>
{% endfor %}
- </ul>
+ </ul>
</p>
{% endif %}
<p> <span class="yakshred yakshheading">Instructor</span><br>
@@ -178,8 +176,8 @@
</div>
<div class="row my-3">
<div class="progress-bar bg-success" role="progressbar" style="width:{{course.completion_percentage}}%"; color: black;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">{{course.completion_percentage}} % completed
- </div>
- </div>
+ </div>
+ </div>
</div>
</div>
</div>