summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2018-07-03 11:36:25 +0530
committeradityacp2018-07-03 11:36:25 +0530
commit637a75a5ea8fcae1e00c0200d52c471d50c8729a (patch)
tree9a2f13aaf80573fa44465031ccc6f895e7fdda0b /yaksh/templates
parent02705e4c676750291b6a5c4ea14e2947f29cb6c7 (diff)
parente3ad85ace916354ab96b23c1359ee72a6c2a740b (diff)
downloadonline_test-637a75a5ea8fcae1e00c0200d52c471d50c8729a.tar.gz
online_test-637a75a5ea8fcae1e00c0200d52c471d50c8729a.tar.bz2
online_test-637a75a5ea8fcae1e00c0200d52c471d50c8729a.zip
Update to latest changes
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/manage.html2
-rw-r--r--yaksh/templates/yaksh/add_question.html1
-rw-r--r--yaksh/templates/yaksh/complete.html12
-rw-r--r--yaksh/templates/yaksh/course_detail.html77
-rw-r--r--yaksh/templates/yaksh/course_modules.html203
-rw-r--r--yaksh/templates/yaksh/courses.html23
-rw-r--r--yaksh/templates/yaksh/design_course_session.html4
-rw-r--r--yaksh/templates/yaksh/design_questionpaper.html8
-rw-r--r--yaksh/templates/yaksh/error_template.html2
-rw-r--r--yaksh/templates/yaksh/grade_user.html19
-rw-r--r--yaksh/templates/yaksh/preview_questionpaper.html42
-rw-r--r--yaksh/templates/yaksh/question.html37
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html35
-rw-r--r--yaksh/templates/yaksh/show_video.html6
-rw-r--r--yaksh/templates/yaksh/user_data.html21
-rw-r--r--yaksh/templates/yaksh/user_status.html44
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html26
-rw-r--r--yaksh/templates/yaksh/view_profile.html4
18 files changed, 398 insertions, 168 deletions
diff --git a/yaksh/templates/manage.html b/yaksh/templates/manage.html
index 17ce23e..c1f9da3 100644
--- a/yaksh/templates/manage.html
+++ b/yaksh/templates/manage.html
@@ -18,7 +18,7 @@
<li><a href="{{ URL_ROOT }}/exam/manage/courses">Courses</a></li>
<li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li>
<li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li>
- <li><a href="{{ URL_ROOT }}/exam/manage/grader"> Grader </a></li>
+ <li><a href="{{ url_root }}/exam/manage/grader"> Regrade </a></li>
<li><a href="{{ URL_ROOT }}/exam/reset/changepassword">Change Password</a></li>
<li><a href="{{ URL_ROOT }}/exam/viewprofile"> {{ user.get_full_name.title }} </a></li>
<li><a href="{{URL_ROOT}}/exam/logout/" id="logout">Logout</a></li>
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html
index ed69657..79c132c 100644
--- a/yaksh/templates/yaksh/add_question.html
+++ b/yaksh/templates/yaksh/add_question.html
@@ -64,6 +64,7 @@
<option value="integertestcase">Integer </option>
<option value="stringtestcase"> String </option>
<option value="floattestcase"> Float </option>
+ <option value="arrangetestcase">Arrange options </option>
</select></p>
<center>
<button class="btn" type="submit" name="save_question">Save</button>
diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html
index 3d6cadc..a3627d0 100644
--- a/yaksh/templates/yaksh/complete.html
+++ b/yaksh/templates/yaksh/complete.html
@@ -3,6 +3,13 @@
{% block pagetitle %}<img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_text.png"
width="80" alt="YAKSH"></img>{% endblock %}
{% block content %}
+{% if module_id and not paper.question_paper.quiz.is_trial %}
+<center>
+ <div class="alert alert-info">
+ Note:- Please Click on the Next button to submit the quiz. Please do not close the browser without clicking Next.
+ </div>
+</center>
+{% endif %}
{% csrf_token %}
{% if paper.questions_answered.all or paper.questions_unanswered.all %}
<center><table class="table table-bordered" >
@@ -33,10 +40,7 @@ width="80" alt="YAKSH"></img>{% endblock %}
<center><h3>{{message}}</h3></center>
<center>
<br>
- {% if not module_id %}
- <br><center><h4>You may now close the browser.</h4></center><br>
- {% endif %}
- {% if module_id and not user == "moderator" %}
+ {% if module_id and not paper.question_paper.quiz.is_trial %}
{% if first_unit %}
<a href="{{URL_ROOT}}/exam/next_unit/{{course_id}}/{{module_id}}/{{learning_unit.id}}/1" class="btn btn-info" id="Next"> Next
<span class="glyphicon glyphicon-chevron-right">
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index a5d10a7..2bf725c 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -2,7 +2,7 @@
{% load custom_filters %}
{% block title %} Course Details {% endblock title %}
-<div class="col-md-9 col-md-offset-2 main">
+<div class="col-md-9 col-md-offset-6 main">
{% block pagetitle %} Course Details for {{ course.name|title }} {% endblock %}
</div>
@@ -14,6 +14,12 @@
{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/jquery-ui/jquery-ui.css">
+<style>
+ .user_data + .tooltip.top > .tooltip-inner {
+ padding: 12px;
+ font-size: 10px;
+ }
+</style>
{% endblock %}
{% block content %}
<br/>
@@ -128,62 +134,51 @@
{% elif state == "course_status" %}
<div class="course_data">
<input type="hidden" id="course_name" value="{{course.name}}">
- <a href="#" class="btn btn-info" id="export">Export to CSV</a>
<center><h2>Course Status</h2></center>
<table class="tablesorter table table-bordered" id="course_table" data-sortlist="[0,0]">
<thead>
<tr>
<th>Sr No.</th>
- <th>Students</th>
- <th>Total</th>
- <th colspan="{{modules|length}}">Modules</th>
- </tr>
- <tr>
- <th scope="row"></th>
- <th></th>
- <th></th>
- {% if modules %}
- {% for module in modules %}
- <th>
- {{module.name}}
- <br>
- ({{module.get_learning_units|length}} Units)
- <br>
- <a data-target="tooltip" title="{% for unit in module.get_learning_units %}{% if unit.type == 'quiz' %}{{unit.quiz.description}}{% else %}{{unit.lesson.name}}{% endif %} / {% endfor %}" id="unit_status{{module.id}}" onmouseover="view_status('#unit_status{{module.id}}')">
- View Units</a>
- </th>
- {% endfor %}
- {% else %}
- <th></th>
- {% endif %}
+ <th>Email</th>
+ <th>Current Unit</th>
+ <th>Course Completion Percentage</th>
+ <th>Grade</th>
</tr>
</thead>
<tbody>
- {% for student in students %}
+ {% for student, grade, percent, unit in student_details %}
<tr>
<td width="5%">
{{forloop.counter}}.
</td>
+ <td width="50%">
+ <a class="user_data" data-item-id="{{course.id}}+{{student.id}}" data-toggle="tooltip" title="Click to view Overall Course progress" data-placement="top">
+ {% if student.email %}
+ {{ student.email }}
+ {% else %}
+ {{ student.get_full_name|title}}
+ {% endif %}
+ </a>
+ <div id="show_status_{{course.id}}_{{student.id}}" style="display: None;">
+ </div>
+ </td>
<td>
- {{ student.get_full_name|title }}
+ {% if unit %}
+ {% if unit.type == 'quiz' %}
+ {{unit.quiz.description}}
+ {% else %}
+ {{unit.lesson.name}}
+ {% endif %}
+ {% else %}
+ NA
+ {% endif%}
</td>
<td>
- {% course_completion_percent course student as c_percent %}
- {{c_percent}} %
+ {{percent}}%
+ </td>
+ <td>
+ {{grade}}
</td>
- {% if modules %}
- {% for module in modules %}
- <td>
- {% module_completion_percent course module student as m_percent %}
- {{m_percent}} %
- <br>
- <a data-target="tooltip" title="{% for unit in module.get_learning_units %}{% if unit.type == 'quiz' %}{{unit.quiz.description}}{% else %}{{unit.lesson.name}}{% endif %} - {% get_unit_status course module unit student as status %}{{status|title}} / {% endfor %}" id="unit_status{{module.id}}{{student.id}}" onmouseover="view_status('#unit_status{{module.id}}{{student.id}}')">
- View Unit Status</a>
- </td>
- {% endfor %}
- {% else %}
- <td>-------</td>
- {% endif %}
</tr>
{% endfor %}
</tbody>
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html
index fad1be0..5baa781 100644
--- a/yaksh/templates/yaksh/course_modules.html
+++ b/yaksh/templates/yaksh/course_modules.html
@@ -17,103 +17,118 @@
<center>{{ msg }}</center>
</div>
{% endif %}
-{% if learning_modules %}
- {% for module in learning_modules %}
- <div class="row well">
+<b>Grade: {% if grade %} {{ grade }} {% else %} Will be available once the course is complete {% endif %}</b>
+{% if modules %}
+ <br><br>
+ <strong>Overall Course Progress</strong>
+ <div class="progress">
+ {% if course_percentage <= 50 %}
+ <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="40"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{course_percentage}}%">
+ {% elif course_percentage <= 75 %}
+ <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="40"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{course_percentage}}%">
+ {% else %}
+ <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{course_percentage}}%">
+ {% endif %}
+ <b style="color: black;">{{course_percentage}}% Completed</b>
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel panel-body">
<table class="table">
- <tr>
- <td>
- <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}">
- {{module.name|title}}</a>
- </td>
- <td>
- <span class="glyphicon glyphicon-chevron-down" id="learning_units{{module.id}}{{course.id}}_down">
- </span>
- <span class="glyphicon glyphicon-chevron-up" id="learning_units{{module.id}}{{course.id}}_up" style="display: none;"></span>
- <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');">
- View Lessons/Quizzes/Exercises</a>
- </td>
- <td>
- {% get_module_status user module course as module_status %}
- Status:
- {% if module_status == "completed" %}
- <span class="label label-success">
- {{module_status|title}}
- </span>
- {% elif module_status == "inprogress" %}
- <span class="label label-info">
- {{module_status|title}}
- </span>
- {% else %}
- <span class="label label-warning">
- {{module_status|title}}
- </span>
- {% endif %}
- </td>
- </tr>
+ {% for module, percent in modules %}
+ <tr>
+ <td width="25%">
+ <a href="{{URL_ROOT}}/exam/quizzes/view_module/{{module.id}}/{{course.id}}">
+ {{module.name|title}}</a>
+ </td>
+ <td>
+ <span class="glyphicon glyphicon-chevron-down" id="learning_units{{module.id}}{{course.id}}_down">
+ </span>
+ <span class="glyphicon glyphicon-chevron-up" id="learning_units{{module.id}}{{course.id}}_up" style="display: none;">
+ </span>
+ <a data-toggle="collapse" data-target="#learning_units{{module.id}}{{course.id}}" onclick="view_unit('learning_units{{module.id}}{{course.id}}');">
+ View Lessons/Quizzes/Exercises</a>
+ <div id="learning_units{{module.id}}{{course.id}}" class="collapse">
+ <table class="table table-bordered">
+ <tr>
+ <th>Lesson/Quiz/Exercise</th>
+ <th>Status</th>
+ <th>Type</th>
+ <th>View AnswerPaper</th>
+ </tr>
+ {% for unit in module.get_learning_units %}
+ <tr>
+ <td>
+ {% if unit.type == "quiz" %}
+ {{unit.quiz.description}}
+ {% else %}
+ {{unit.lesson.name}}
+ {% endif %}
+ </td>
+ <td>
+ {% get_unit_status course module unit user as status %}
+ {% if status == "completed" %}
+ <span class="label label-success">{{status|title}}
+ </span>
+ {% elif status == "inprogress" %}
+ <span class="label label-info">{{status|title}}
+ </span>
+ {% else %}
+ <span class="label label-warning">{{status|title}}
+ </span>
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.is_exercise %}
+ Exercise
+ {% else %}
+ Quiz
+ {% endif %}
+ {% else %}
+ Lesson
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.view_answerpaper %}
+ <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ unit.quiz.questionpaper_set.get.id }}/{{course.id}}">
+ <i class="fa fa-eye" aria-hidden="true"></i> Can View </a>
+ {% else %}
+ <a>
+ <i class="fa fa-eye-slash" aria-hidden="true">
+ </i> Cannot view now </a>
+ {% endif %}
+ {% else %}
+ ------
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ </td>
+ <td>
+ <div class="progress">
+ {% if percent <= 50 %}
+ <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%">
+ {% elif percent <= 75 %}
+ <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%">
+ {% else %}
+ <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%">
+ {% endif %}
+ <b style="color: black;">{{percent}}% Completed</b>
+ </div>
+ </div>
+ </td>
+ </tr>
+ {% endfor %}
</table>
</div>
- <div id="learning_units{{module.id}}{{course.id}}" class="collapse">
- <table class="table">
- <tr>
- <th>Lesson/Quiz/Exercise</th>
- <th>Status</th>
- <th>Type</th>
- <th>View AnswerPaper</th>
- </tr>
- {% for unit in module.get_learning_units %}
- <tr>
- <ul class="inputs-list">
- <td>
- {% if unit.type == "quiz" %}
- {{unit.quiz.description}}
- {% else %}
- {{unit.lesson.name}}
- {% endif %}
- </td>
- <td>
- {% get_unit_status course module unit user as status %}
- {% if status == "completed" %}
- <span class="label label-success">{{status|title}}
- </span>
- {% elif status == "inprogress" %}
- <span class="label label-info">{{status|title}}
- </span>
- {% else %}
- <span class="label label-warning">{{status|title}}
- </span>
- {% endif %}
- </td>
- <td>
- {% if unit.type == "quiz" %}
- {% if unit.quiz.is_exercise %}
- Exercise
- {% else %}
- Quiz
- {% endif %}
- {% else %}
- Lesson
- {% endif %}
- </td>
- <td>
- {% if unit.type == "quiz" %}
- {% if unit.quiz.view_answerpaper %}
- <a href="{{ URL_ROOT }}/exam/view_answerpaper/{{ unit.quiz.questionpaper_set.get.id }}/{{course.id}}"><i class="fa fa-eye" aria-hidden="true"></i> Can View </a>
- {% else %}
- <a>
- <i class="fa fa-eye-slash" aria-hidden="true">
- </i> Cannot view now </a>
- {% endif %}
- {% else %}
- ------
- {% endif %}
- </td>
- </ul>
- </tr>
- {% endfor %}
- </table>
- </div>
- {% endfor %}
+ </div>
{% else %}
<h3> No lectures found </h3>
{% endif %}
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index bc96bf5..ba09c6d 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -4,6 +4,7 @@
{% block script %}
<script>
$(document).ready(function(){
+ $('[data-toggle="tooltip"]').tooltip();
$("#created_courses").toggle();
$("#link_created_courses").click(function() {
if ($("#allotted_courses").is(":visible")){
@@ -24,6 +25,14 @@
});
</script>
{% endblock %}
+{% block css %}
+<style>
+ .test + .tooltip.top > .tooltip-inner {
+ padding: 15px;
+ font-size: 12px;
+ }
+</style>
+{% endblock %}
{% block content %}
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
@@ -47,6 +56,10 @@
<a href="{{URL_ROOT}}/exam/manage/courses/all_learning_module">
Add/View Modules</a>
</li>
+ <li>
+ <a href="{% url 'grades:grading_systems'%}">
+ Add/View Grading Systems </a>
+ </li>
</ul>
</div>
</div>
@@ -99,7 +112,8 @@
<br><br>
<ul>
<li>
- <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/">Design Course
+ <a href="{{URL_ROOT}}/exam/manage/courses/designcourse/{{course.id}}/" data-toggle="tooltip" title="Add/Remove/Change course modules" data-placement="top">
+ Design Course
</a>
</li>
<br>
@@ -123,7 +137,7 @@
</li>
<br>
<li>
- <a href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/">
+ <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>
</ul>
@@ -259,7 +273,7 @@
</li>
<br>
<li>
- <a href="{{URL_ROOT}}/exam/manage/duplicate_course/{{ course.id }}/">
+ <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>
</ul>
@@ -358,6 +372,9 @@
{% if quiz.questionpaper_set.get %}
<a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/">
Question Paper for {{ quiz.description }}</a>
+ <a href="{{URL_ROOT}}/exam/manage/preview_questionpaper/{{quiz.questionpaper_set.get.id}}" class="btn btn-primary active btn-xs" target="_blank">
+ View
+ </a>
<br>
{% else %}
<p>No Question Paper
diff --git a/yaksh/templates/yaksh/design_course_session.html b/yaksh/templates/yaksh/design_course_session.html
index ee530e0..6542e3c 100644
--- a/yaksh/templates/yaksh/design_course_session.html
+++ b/yaksh/templates/yaksh/design_course_session.html
@@ -23,7 +23,7 @@
<div class="row">
<div class="col-md-8 col-md-offset-2 available-list">
<div id="fixed-available-wrapper">
- <p><u><b>Available Lessons and quizzes: (Add Lessons and Quizzes)</b></u></p>
+ <p><u><b>Available Modules:</b></u></p>
<div id="fixed-available">
<table id="course-details" class="table table-bordered">
<tr>
@@ -64,7 +64,7 @@
</div>
<div class="col-md-8 col-md-offset-2">
<div id="fixed-added-wrapper">
- <p><u><b>Choosen Lessons and quizzes:</b></u></p>
+ <p><u><b>Choosen Modules:</b></u></p>
<div id="fixed-added">
<table id="course-details" class="table table-bordered">
<tr>
diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html
index c56a955..7e6d5c0 100644
--- a/yaksh/templates/yaksh/design_questionpaper.html
+++ b/yaksh/templates/yaksh/design_questionpaper.html
@@ -220,10 +220,14 @@ select
<div class="tab-pane" id="finish">
<center>
- <h5>Almost finished creating your question paper</h5>
+ <h5><u>Almost finished creating your question paper</u></h5>
<label style="float: none;">
{{ qpaper_form.shuffle_questions }}
- <span>Auto shuffle.</span>
+ <span>Shuffle questions' order for each student</span>
+ </label> <br><br>
+ <label style="float: none;">
+ {{ qpaper_form.shuffle_testcases }}
+ <span>Shuffle MCQ/MCC options for each student</span>
</label> <br><br>
<input class ="btn primary large" type="submit" name="save" id="save" value="Save question paper">
<br>
diff --git a/yaksh/templates/yaksh/error_template.html b/yaksh/templates/yaksh/error_template.html
index 61657ae..301020e 100644
--- a/yaksh/templates/yaksh/error_template.html
+++ b/yaksh/templates/yaksh/error_template.html
@@ -3,7 +3,6 @@
{% endblock %}
{% load custom_filters %}
-
{% if error_message %}
{% for error in error_message %}
@@ -35,6 +34,7 @@
</tr>
<tr>
{% if error.traceback %}
+ <input type="hidden" id="err_lineno" value="{{error.line_no}}">
<td><b>Full Traceback: </b></td>
<td><pre>{{error.traceback}}</pre></td>
{% endif %}
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 93f00e0..8430e91 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -167,7 +167,7 @@ Status : <b style="color: red;"> Failed </b><br/>
{% endif %}
{% endfor %}
- {% elif question.type == "integer" or "string" or "float" %}
+ {% elif question.type == "integer" or question.type == "string" or question.type == "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
<strong>{{ testcase.correct|safe }}</strong>
@@ -175,6 +175,14 @@ Status : <b style="color: red;"> Failed </b><br/>
<strong>{{ testcase.error_margin|safe }}</strong>
{% endif %}
{% endfor %}
+ {% elif question.type == "arrange" %}
+ <h5> <u>Correct Order:</u></h5>
+ <div class="list-group" >
+ {% for testcase in question.get_test_cases %}
+ <li class="list-group-item"><strong>{{ testcase.options|safe }}</strong></li>
+ {% endfor %}
+ </div>
+
{% else %}
<h5> <u>Test cases: </u></h5>
{% for testcase in question.get_test_cases %}
@@ -307,6 +315,15 @@ Status : <b style="color: red;"> Failed </b><br/>
{% endif %}
{% endfor %}
</div>
+
+ {% elif question.type == "arrange"%}
+ <div class="well well-sm">
+ {% get_answer_for_arrange_options ans.answer.answer question as tc_list %}
+ {% for testcases in tc_list %}
+ <li>{{ testcases.options.strip|safe }}</li>
+ {% endfor %}
+ </div>
+
{% else %}
<div class="well well-sm">
{{ ans.answer.answer.strip|safe }}
diff --git a/yaksh/templates/yaksh/preview_questionpaper.html b/yaksh/templates/yaksh/preview_questionpaper.html
new file mode 100644
index 0000000..123218f
--- /dev/null
+++ b/yaksh/templates/yaksh/preview_questionpaper.html
@@ -0,0 +1,42 @@
+{% extends "base.html" %}
+
+{% block pagetitle %} Quiz: {{ paper.quiz.description }} {% endblock pagetitle %}
+
+{% block content %}
+<div class="well">
+ <div class="col-md-12">
+ <div class="col-md-6">Maximum Mark(s): {{ paper.total_marks }}</div>
+ <div class="col-md-6"><span class="pull-right">Total Time: {{ paper.quiz.duration }} minutes</span></div>
+ </div>
+</div>
+<div class="panel panel-default">
+ <div class="panel-heading">Instructions</div>
+ <div class="panel-body" id="instructions">
+ {{ paper.quiz.instructions|safe }}
+ </div>
+</div>
+{% for question in questions %}
+ <div class="panel panel-info">
+ <div class="panel-heading">
+ <strong> {{forloop.counter}}. {{ question.summary }}
+ <span class="marks pull-right"> Mark(s): {{ question.points }} </span>
+ </strong>
+ </div>
+ <div class="panel-body">
+ <h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong>
+ <br/><b>Answer:</b><br/>
+ {% if question.type == "code" %}
+ <div class="well">{{ question.snippet }}<br/></div>
+ {% endif %}
+ {% if question.type == "mcq" or question.type == "mcc" %}
+ <h5> <u>Choices:</u></h5>
+ {% for testcase in question.get_test_cases %}
+ <br/><strong>
+ {{ forloop.counter }}. {{ testcase.options|safe }}</strong>
+ {% endfor %}
+ {% endif %}
+
+ </div>
+ </div>
+{% endfor %}
+{% endblock %}
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 9d6ce48..ebfe066 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -11,6 +11,10 @@
.CodeMirror{
border-style: groove;
}
+ .activeline {
+ background: #FBC2C4 !important;
+ color: #8a1f11 !important;
+ }
</style>
{% endblock %}
@@ -21,6 +25,7 @@
<script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/clike/clike.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/codemirror/mode/shell/shell.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/mathjax/MathJax.js?config=TeX-MML-AM_CHTML"></script>
+<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-sortable.js"></script>
<script>
init_val = '{{ last_attempt|escape_quotes|safe }}';
lang = "{{ question.language }}"
@@ -175,10 +180,12 @@ question_type = "{{ question.type }}"
{% else %}
<h5>(CASE SENSITIVE)</h5>
{% endif %}
-
{% elif question.type == "float" %}
(FILL IN THE BLANKS WITH FLOAT ANSWER)
+ {% elif question.type == "arrange" %}
+ (ARRANGE THE OPTIONS IN CORRECT ORDER)
{% endif %}
+
</u>
<font class=pull-right>(Marks : {{ question.points }}) </font>
</h4>
@@ -218,7 +225,7 @@ question_type = "{{ question.type }}"
{% if question.type == "integer" %}
Enter Integer:<br/>
- <input autofocus name="answer" type="number" id="integer" value={{ last_attempt|safe }} />
+ <input autofocus name="answer" type="number" id="integer" value="{{ last_attempt|safe }}" />
<br/><br/>
{% endif %}
@@ -230,7 +237,7 @@ question_type = "{{ question.type }}"
{% if question.type == "float" %}
Enter Decimal Value :<br/>
- <input autofocus name="answer" type="number" step="any" id="float" value={{ last_attempt|safe }} />
+ <input autofocus name="answer" type="number" step="any" id="float" value="{{ last_attempt|safe }}" />
<br/><br/>
{% endif %}
@@ -251,6 +258,27 @@ question_type = "{{ question.type }}"
<input type=file id="assignment" name="assignment" multiple="">
<hr>
{% endif %}
+
+ {% if question.type == "arrange" %}
+ {% if last_attempt %}
+ {% get_answer_for_arrange_options last_attempt question as test_cases %}
+ {% endif %}
+ <input name="answer" type="hidden" id='arrange_order'/>
+ <div class="list-group">
+ <ol class="arrange">
+ {% for test_case in test_cases %}
+ <li class="list-group-item" id={{test_case.id}}>{{test_case.options| safe }}</li>
+ {% endfor %}
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ var arrange = $("ol.arrange");
+ var order_array = $(arrange).sortable(['serialize']);
+ </script>
+ {% endif %}
+
+
{% if question.type == "code" %}
<div class="row">
<div class="col-md-9">
@@ -269,6 +297,9 @@ question_type = "{{ question.type }}"
<br><button class="btn btn-primary" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
{% elif question.type == "upload" %}
<br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button>&nbsp;&nbsp;
+ {% elif question.type == "arrange" %}
+ <br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return user_arranged_options();">Submit Answer</button>&nbsp;&nbsp;
+
{% else %}
{% if question in paper.get_questions_unanswered or quiz.is_exercise %}
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index cf08752..49f8d2d 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -39,25 +39,44 @@ No Courses to display
</b></h4>
</div>
<div class="col-md-4">
- {% if not course.active %}
- <span class="label label-danger">Closed</span>
- {% endif %}
{% 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>
{% else %}
- {% if course.is_active_enrollment %}
- {% if course.is_self_enroll %}
- <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.id }}">Enroll</a>
+ {% if course.active %}
+ {% if course.is_active_enrollment %}
+ {% if course.is_self_enroll %}
+ <a class="btn btn-success" href="{{ URL_ROOT }}/exam/self_enroll/{{ course.id }}">Enroll</a>
+ {% else %}
+ <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.id }}">Enroll</a>
+ {% endif %}
{% else %}
- <a class="btn btn-success" href="{{ URL_ROOT }}/exam/enroll_request/{{ course.id }}">Enroll</a>
+ <span class="label label-danger" style="font-size: 15px">
+ Enrollment Closed
+ </span>
{% endif %}
{% else %}
- <span class="label label-danger">Enrollment Closed</span>
+ <span class="label label-danger" style="font-size: 15px">
+ Course is not activated
+ </span>
{% endif %}
{% endif %}
</div>
+ <div class="col-md-4">
+ {% if course.days_before_start != 0 %}
+ <span class="label label-info" style="font-size: 15px">
+ {{course.days_before_start}} day(s) to start
+ </span>
+ {% endif %}
+ </div>
</div>
+ {% if course.is_active_enrollment %}
+ <div class="alert alert-info">
+ Start Date&nbsp;: {{course.start_enroll_time}}
+ <br>
+ End Date&nbsp;&nbsp;: {{course.end_enroll_time}}
+ </div>
+ {% endif %}
{% if course.instructions %}
<div class="row">
diff --git a/yaksh/templates/yaksh/show_video.html b/yaksh/templates/yaksh/show_video.html
index 17f9d86..eae3762 100644
--- a/yaksh/templates/yaksh/show_video.html
+++ b/yaksh/templates/yaksh/show_video.html
@@ -11,7 +11,11 @@
{% block main %}
<div class="col-sm-3 col-md-2 sidebar">
- <center><h4>{{course.name}}</h4></center>
+ <center>
+ <a href="{{URL_ROOT}}/exam/course_modules/{{course.id}}">
+ <h4>{{course.name}}</h4>
+ </a>
+ </center>
<br>
{% for module in all_modules %}
{% if module.id == learning_module.id %}
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 45867d2..9449fcc 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -74,13 +74,19 @@ User IP address: {{ paper.user_ip }}
{% endif %}
{% endfor %}
- {% elif question.type == "integer" or question.type == "string"
- or question.type == "float" %}
+ {% elif question.type == "integer" or question.type == "string" or question.type == "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
<strong>{{ testcase.correct|safe }}</strong>
{% endfor %}
+ {% elif question.type == "arrange" %}
+ <h5> <u>Correct Order:</u></h5>
+ <div class="list-group" >
+ {% for testcase in question.get_test_cases %}
+ <li class="list-group-item"><strong>{{ testcase.options|safe }}</strong></li>
+ {% endfor %}
+ </div>
{% else %}
<h5> <u>Test cases: </u></h5>
@@ -100,6 +106,7 @@ User IP address: {{ paper.user_ip }}
{% endif %}
<div class="panel-body">
<h5><u>Student answer:</u></h5>
+
{% if question.type == "mcc"%}
<div class="well well-sm">
{% for testcases in question.get_test_cases %}
@@ -108,6 +115,7 @@ User IP address: {{ paper.user_ip }}
{% endif %}
{% endfor %}
</div>
+
{% elif question.type == "mcq"%}
<div class="well well-sm">
{% for testcases in question.get_test_cases %}
@@ -116,6 +124,15 @@ User IP address: {{ paper.user_ip }}
{% endif %}
{% endfor %}
</div>
+
+ {% elif question.type == "arrange"%}
+ <div class="well well-sm">
+ {% get_answer_for_arrange_options answers.0.answer question as tc_list %}
+ {% for testcases in tc_list %}
+ <li>{{ testcases.options.strip|safe }}</li>
+ {% endfor %}
+ </div>
+
{%else%}
<div class="well well-sm">
{{ answers.0.answer|safe }}
diff --git a/yaksh/templates/yaksh/user_status.html b/yaksh/templates/yaksh/user_status.html
new file mode 100644
index 0000000..5f006c9
--- /dev/null
+++ b/yaksh/templates/yaksh/user_status.html
@@ -0,0 +1,44 @@
+{% if status %}
+ <strong>Student Name: {{student.get_full_name|title}}</strong>
+ <br>
+ <strong>Overall Course Progress:</strong>
+ <div class="progress">
+ {% if course_percentage <= 50 %}
+ <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="40"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{course_percentage}}%">
+ {% elif course_percentage <= 75 %}
+ <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="40"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{course_percentage}}%">
+ {% else %}
+ <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
+ aria-valuemin="0" aria-valuemax="100" style="width:{{course_percentage}}%">
+ {% endif %}
+ <b style="color: black;">{{course_percentage}}% Completed</b>
+ </div>
+ </div>
+ <br>
+ <strong>Per Module Progress:</strong>
+ <br>
+ <table class="table">
+ {% for module, percent in modules %}
+ <tr>
+ <td width="30%">{{ module.name }}</td>
+ <td>
+ <div class="progress">
+ {% if percent <= 50 %}
+ <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%">
+ {% elif percent <= 75 %}
+ <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%">
+ {% else %}
+ <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{percent}}%">
+ {% endif %}
+ <b style="color: black;">{{percent}}% Completed</b>
+ </div>
+ </div>
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+{% else %}
+ {{ msg }}
+{% endif %} \ No newline at end of file
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 410b578..7cbec91 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -34,10 +34,10 @@
Start time: {{ paper.start_time }} <br/>
End time : {{ paper.end_time }} <br/>
Percentage obtained: {{ paper.percent }}% <br/>
- {% if paper.passed == 0 %}
- Status : <b style="color: red;"> Failed </b><br/>
- {% else %}
+ {% if paper.passed %}
Status : <b style="color: green;"> Passed </b><br/>
+ {% else %}
+ Status : <b style="color: red;"> Failed </b><br/>
{% endif %}
</p>
@@ -55,7 +55,8 @@
<h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong>
{% if question.type == "mcq" or question.type == "mcc" %}
<h5> <u>Choices:</u></h5>
- {% for testcase in question.get_test_cases %}
+ {% get_ordered_testcases question paper as testcases %}
+ {% for testcase in testcases %}
{% if testcase.correct %}
<br/>
<strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>
@@ -66,12 +67,20 @@
{% endif %}
{% endfor %}
- {% elif question.type == "integer" or "string" or "float" %}
+ {% elif question.type == "integer" or question.type == "string" or question.type == "float" %}
<h5> <u>Correct Answer:</u></h5>
{% for testcase in question.get_test_cases %}
<strong>{{ testcase.correct|safe }}</strong>
{% endfor %}
+ {% elif question.type == "arrange" %}
+ <h5> <u>Correct Order:</u></h5>
+ <div class="list-group">
+ {% for testcase in question.get_test_cases %}
+ <li class="list-group-item"><strong>{{ testcase.options|safe }}</strong></li>
+ {% endfor %}
+ </div>
+
{% else %}
<h5> <u>Test cases: </u></h5>
{% for testcase in question.get_test_cases %}
@@ -107,6 +116,13 @@
{% endif %}
{% endfor %}
</div>
+ {% elif question.type == "arrange"%}
+ <div class="well well-sm">
+ {% get_answer_for_arrange_options answers.0.answer question as tc_list %}
+ {% for testcases in tc_list %}
+ <li>{{ testcases.options.strip|safe }}</li>
+ {% endfor %}
+ </div>
{% elif question.type == "upload" and has_user_assignment %}
<a href="{{URL_ROOT}}/exam/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}">
<div class="well well-sm">
diff --git a/yaksh/templates/yaksh/view_profile.html b/yaksh/templates/yaksh/view_profile.html
index 5f06135..ce95226 100644
--- a/yaksh/templates/yaksh/view_profile.html
+++ b/yaksh/templates/yaksh/view_profile.html
@@ -31,6 +31,10 @@
<th><label for="id_position"><h5>Position:</h5></label></th>
<th><label for="id_position"><h5>{{ user.profile.position }}</h5></label></th>
</tr>
+ <tr>
+ <th><label for="id_position"><h5>Timezone:</h5></label></th>
+ <th><label for="id_position"><h5>{{ user.profile.timezone }}</h5></label></th>
+ </tr>
</table>
<a class="btn btn-primary pull-right" href="{{ URL_ROOT }}/exam/editprofile/">Edit Profile</a>
{% endblock %}