summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2021-03-24 10:13:27 +0530
committerGitHub2021-03-24 10:13:27 +0530
commitf44cbc461f4c23c08d655749ccb525d99f2e7dbc (patch)
tree7a7f0b29a23685734d45265773db916bedad380f /yaksh/templates
parent6fda19daaa06482b8eb52eeb62f9b0a15d0a3da6 (diff)
parent8192bf7a17070f2202d9282a4873795127a17447 (diff)
downloadonline_test-f44cbc461f4c23c08d655749ccb525d99f2e7dbc.tar.gz
online_test-f44cbc461f4c23c08d655749ccb525d99f2e7dbc.tar.bz2
online_test-f44cbc461f4c23c08d655749ccb525d99f2e7dbc.zip
Merge pull request #823 from adityacp/s3_file_upload
Add AWS support for file upload
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/add_quiz.html4
-rw-r--r--yaksh/templates/yaksh/complete.html100
-rw-r--r--yaksh/templates/yaksh/question.html23
-rw-r--r--yaksh/templates/yaksh/quit.html1
4 files changed, 72 insertions, 56 deletions
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html
index 1609639..d43c1c6 100644
--- a/yaksh/templates/yaksh/add_quiz.html
+++ b/yaksh/templates/yaksh/add_quiz.html
@@ -65,11 +65,11 @@
<br>
<br>
<h4>You can check the quiz by attempting it in the following modes:</h4>
- <a class="btn btn-outline-info" name="button" href="{% url 'yaksh:test_quiz' 'usermode' quiz.id course_id %}" target="blank">
+ <a class="btn btn-outline-info" name="button" href="{% url 'yaksh:test_quiz' 'usermode' quiz.id course_id %}" target="_blank">
Try as student
</a>
- <a class="btn btn-outline-primary" name="button" href="{% url 'yaksh:test_quiz' 'godmode' quiz.id course_id %}" target="blank">
+ <a class="btn btn-outline-primary" name="button" href="{% url 'yaksh:test_quiz' 'godmode' quiz.id course_id %}" target="_blank">
Try as teacher
</a>
<a data-toggle="modal" data-target="#help">
diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html
index 4d921e1..79a1392 100644
--- a/yaksh/templates/yaksh/complete.html
+++ b/yaksh/templates/yaksh/complete.html
@@ -20,58 +20,58 @@
</div>
</center>
{% endif %}
-{% csrf_token %}
- {% if paper.questions_answered.all or paper.questions_unanswered.all %}
- <center>
- <div class="col-md-8">
- <h3>Submission Status</h3>
- <table class="table table-dark table-responsive-sm" >
- <thead class="thead-dark">
+{% if paper.questions_answered.all or paper.questions_unanswered.all %}
+ <center>
+ <div class="col-md-8">
+ <h3>Submission Status</h3>
+ <table class="table table-dark table-responsive-sm" >
+ <thead class="thead-dark">
+ <tr>
+ <th> Question</th>
+ <th> Status </th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ {% for question in paper.questions.all %}
+ {% if question in paper.questions_answered.all %}
<tr>
- <th> Question</th>
- <th> Status </th>
- </tr>
- </thead>
- <tbody class="list">
- {% for question in paper.questions.all %}
- {% if question in paper.questions_answered.all %}
- <tr>
- <td> {{ question.summary }} </td>
- <td> <span class="badge badge-success">Attempted</span> </td>
- {% else %}
- <tr>
- <td> {{ question }} </td>
- <td> <span class="badge badge-warning">Not Attempted</span> </td>
- {% endif %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </center>
- {% endif %}
- <br><br>
- <center class="container">
- <h5>
- <span class="alert alert-success">{{message}}</span>
- </h5>
+ <td> {{ question.summary }} </td>
+ <td> <span class="badge badge-success">Attempted</span> </td>
+ {% else %}
+ <tr>
+ <td> {{ question }} </td>
+ <td> <span class="badge badge-warning">Not Attempted</span> </td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
</center>
- <center>
- <br>
- {% if module_id and not paper.course.is_trial %}
- {% if first_unit %}
- <a href="{% url 'yaksh:next_unit' course_id module_id learning_unit.id '1' %}" class="btn btn-info btn-lg" id="Next"> Next
- <span class="fa fa-step-forward">
- </span>
- </a>
- {% else %}
- <a href="{% url 'yaksh:next_unit' course_id module_id learning_unit.id %}" class="btn btn-info btn-lg" id="Next"> Next
- <span class="fa fa-step-forward">
- </span>
- </a>
- {% endif %}
+{% endif %}
+<br><br>
+<center class="container">
+ <h5>
+ <span class="alert alert-success">{{message}}</span>
+ </h5>
+</center>
+<center>
+<br>
+{% if module_id and not paper.course.is_trial %}
+ {% if first_unit %}
+ <a href="{% url 'yaksh:next_unit' course_id module_id learning_unit.id '1' %}" class="btn btn-info btn-lg" id="Next"> Next
+ <span class="fa fa-step-forward">
+ </span>
+ </a>
{% else %}
- <a href="{% url 'yaksh:index' %}" id="home" class="btn btn-primary btn-lg"> Home </a>
+ <a href="{% url 'yaksh:next_unit' course_id module_id learning_unit.id %}" class="btn btn-info btn-lg" id="Next"> Next
+ <span class="fa fa-step-forward">
+ </span>
+ </a>
{% endif %}
- </center>
+{% else %}
+ <a href="{% url 'yaksh:index' %}" id="home" class="btn btn-primary btn-lg"> Home </a>
+{% endif %}
+</center>
+<br><br>
{% endblock content %}
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 56edcf3..2779db2 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -7,6 +7,8 @@
<link rel="stylesheet" href="{% static 'yaksh/css/question.css' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'yaksh/css/codemirror/lib/codemirror.css' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'yaksh/css/exam.css' %}" type="text/css" />
+<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.8.1/dropzone.min.css">
+<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.8.1/basic.min.css">
<style>
.CodeMirror{
border-style: groove;
@@ -21,6 +23,7 @@
{% block script %}
+<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.8.1/min/dropzone.min.js"></script>
<script src="{% static 'yaksh/js/requesthandler.js' %}"></script>
<script src="{% static 'yaksh/js/codemirror/lib/codemirror.js' %}"></script>
<script src="{% static 'yaksh/js/codemirror/mode/python/python.js' %}"></script>
@@ -29,6 +32,7 @@
<script src="{% static 'yaksh/js/codemirror/mode/r/r.js' %}"></script>
<script type="text/javascript" src="{% static 'yaksh/js/mathjax/MathJax.js' %}?config=TeX-MML-AM_CHTML"></script>
<script src="{% static 'yaksh/js/jquery-sortable.js' %}"></script>
+
<script>
init_val = '{{ last_attempt|escape_quotes|safe }}';
lang = "{{ question.language }}"
@@ -142,7 +146,6 @@ question_type = "{{ question.type }}";
</div>
{% endif %}
</center>
- </div>
<form id="code" action="{% url 'yaksh:check' question.id paper.attempt_number module.id paper.question_paper.id course.id %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type=hidden name="question_id" id="question_id" value="{{ question.id }}"></input>
@@ -174,6 +177,9 @@ question_type = "{{ question.type }}";
<small><strong>Marks: {{ question.points }}</strong></small>
</span>
</div>
+ <div class="badge badge-warning">
+ Last submitted answer is considered for evaluation
+ </div>
</div>
</div>
<div class="card-body">
@@ -181,10 +187,10 @@ question_type = "{{ question.type }}";
{{ question.description|safe }}
</div>
{% if files %}
- <div class="col-md-5">
+ <div class="col-md-8">
<div class="card">
<div class="card-header">
- <span> Files to download for this question </span>
+ <span class="badge badge-info"> Files to download for this question </span>
</div>
<div class="card-body">
{% for f_name in files %}
@@ -265,8 +271,16 @@ question_type = "{{ question.type }}";
<!-- Upload type question -->
{% if question.type == "upload" %}
<p>Upload assignment file for the said question<p>
- <input type=file id="assignment" name="assignment" multiple="">
+ <div class="dropzone needsclick dz-clickable" id="dropzone_file">
+ <div class="dz-message needsclick">
+ <button type="button" class="dz-button">
+ Drop files here or click to upload.
+ </button>
+ </div>
+ </div>
+ <br>
{% if assignment_files %}
+ <div>
<ul class="list-group">
{% for as_file in assignment_files %}
<li class="list-group-item">
@@ -274,6 +288,7 @@ question_type = "{{ question.type }}";
</li>
{% endfor %}
</ul>
+ </div>
{% endif %}
{% endif %}
diff --git a/yaksh/templates/yaksh/quit.html b/yaksh/templates/yaksh/quit.html
index 828ad60..e829b3c 100644
--- a/yaksh/templates/yaksh/quit.html
+++ b/yaksh/templates/yaksh/quit.html
@@ -57,4 +57,5 @@
{% endif %}
</center>
</form>
+ <br><br>
{% endblock content %}