summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail.html30
-rw-r--r--yaksh/templates/yaksh/grade_user.html11
-rw-r--r--yaksh/templates/yaksh/user_data.html4
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html4
4 files changed, 39 insertions, 10 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index d8aeb2e..93a7048 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -45,6 +45,27 @@
</div>
</div>
<div class="col-md-9 col-md-offset-2 main">
+ <form id="upload_users" action="{{ URL_ROOT }}/exam/manage/upload_users/{{course.id}}/"
+ method="POST" enctype="multipart/form-data">
+ {% csrf_token %}
+ <input type="file" name="csv_file" />
+ <button class="btn btn-primary" type=submit> Upload Users <span class="glyphicon glyphicon-open"/></button>
+ </form>
+ <div class="alert alert-info" role="alert">
+ <p>
+ - The uploaded csv should have headers exactly same as mentioned below:<br />
+ <b>firstname, lastname, email, username, password, institute, roll_no, department,
+ remove</b><br />
+ - Mandatory fields are <b> firstname, lastname and email. </b><br />
+ - Other fields are optional. <br />
+ - If username and password are not provided then
+ <b>Users created will have username and password same as their email</b>
+ </p>
+ <p>
+ <b> Click <a class="btn btn-success" href="{{ URL_ROOT }}/exam/manage/download_sample_csv/
+">here</a> to download a sample CSV, edit and upload it</b>
+ </p>
+ </div>
<div class="row">
{% if message %}
<div class="alert alert-warning" role="alert">
@@ -53,6 +74,14 @@
</center>
</div>
{% endif %}
+ {% if upload_details %}
+ <div class="alert alert-info" role="info">
+ {% for detail in upload_details %}
+ <strong> {{ detail }} </strong><br>
+ {% endfor %}
+ </div>
+ {% endif %}
+ <hr>
{% if state == 'mail' %}
<div id="enrolled-students">
<center><b><u>Send Mails to Students</u></b></center><br>
@@ -218,6 +247,7 @@
{% endif %}
</div>
</div>
+
<!-- Dialog to display error message -->
<div id="dialog" title="Alert">
<p id="error_msg"></p>
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 3339177..1fef026 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -8,7 +8,6 @@
{% block content %}
{% block script %}
-<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
@@ -107,10 +106,10 @@ End time: {{ paper.end_time }} <br/>
{%if paper.percent%}
Percentage obtained: {{paper.percent}}% <br/>
{% endif %}
-{% 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>
{% if paper.answers.count %}
@@ -230,7 +229,7 @@ Status : <b style="color: green;"> Passed </b><br/>
</tr>
</table>
{% endif %}
- <table class="table table-bordered" width="100%" id="output">
+ <table class="table table-bordered" width="100%" id="output" style="table-layout: fixed">
<col width="10%">
<col width="40%">
<col width="40%">
@@ -268,7 +267,7 @@ Status : <b style="color: green;"> Passed </b><br/>
{% endif %}
<p> <b>The following error took place: </b></p>
<div class="well well-sm">
- <table class="table table-bordered" width="100%">
+ <table class="table table-bordered" width="100%" style="table-layout: fixed">
<col width="30%">
<tr class = "active">
<td><b>Exception Name: </b></td>
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index a0219dd..73157ff 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -150,7 +150,7 @@ User IP address: {{ paper.user_ip }}
</tr>
</table>
{% endif %}
- <table class="table table-bordered" width="100%" id="output">
+ <table class="table table-bordered" width="100%" id="output" style="table-layout: fixed">
<col width="10%">
<col width="40%">
<col width="40%">
@@ -188,7 +188,7 @@ User IP address: {{ paper.user_ip }}
{% endif %}
<p> <b>The following error took place: </b></p>
<div class="well well-sm">
- <table class="table table-bordered" width="100%">
+ <table class="table table-bordered" width="100%" style="table-layout: fixed">
<col width="30%">
<tr class = "active">
<td><b>Exception Name: </b></td>
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index fa16a08..b433ad5 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -143,7 +143,7 @@
</tr>
</table>
{% endif %}
- <table class="table table-bordered" width="100%" id="output">
+ <table class="table table-bordered" width="100%" id="output" style="table-layout: fixed">
<col width="10%">
<col width="40%">
<col width="40%">
@@ -181,7 +181,7 @@
{% endif %}
<p> <b>The following error took place: </b></p>
<div class="well well-sm">
- <table class="table table-bordered" width="100%">
+ <table class="table table-bordered" width="100%" style="table-layout: fixed">
<col width="30%">
<tr class = "active">
<td><b>Exception Name: </b></td>