summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprathamesh2021-03-24 15:52:35 +0530
committerprathamesh2021-03-24 15:52:35 +0530
commit04684f6c636ed827a8ff029a8c0d9b7755096599 (patch)
tree3b15ae27d9c6e6599fe8025ebc95075fb253c58a
parent0d2046dfd7d9ce5e7da1d36b6cc26806001f49cc (diff)
downloadonline_test-04684f6c636ed827a8ff029a8c0d9b7755096599.tar.gz
online_test-04684f6c636ed827a8ff029a8c0d9b7755096599.tar.bz2
online_test-04684f6c636ed827a8ff029a8c0d9b7755096599.zip
Modify upload question UI and change NullBooleanField to BooleanField
-rw-r--r--yaksh/models.py2
-rw-r--r--yaksh/templates/yaksh/question.html44
2 files changed, 27 insertions, 19 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 9f34ade..8f9f051 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -2269,7 +2269,7 @@ class AnswerPaper(models.Model):
percent = models.FloatField(null=True, default=0.0)
# Result of the quiz, True if student passes the exam.
- passed = models.NullBooleanField()
+ passed = models.BooleanField(null=True)
# Status of the quiz attempt
status = models.CharField(
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 17305b6..f8f0c46 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -270,15 +270,6 @@ question_type = "{{ question.type }}";
<!-- Upload type question -->
{% if question.type == "upload" %}
- <p>Upload assignment file for the said question<p>
- <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">
@@ -290,15 +281,32 @@ question_type = "{{ question.type }}";
</ul>
</div>
{% endif %}
- <br>
- {% if qrcode %}
- <img src="{{ qrcode.image.url }}" width="200" height="200">
- {% else %}
- <br>
- <a class="active btn btn-outline-primary " href="{% url 'yaksh:generate_qrcode' paper.id question.id module.id %}" data-toggle="tooltip"
- title="Upload from any device using the QR Code">Generate QR Code</a>
- {% endif %}
- <p></p>
+ <br />
+ <div class="row">
+ <div class="col-md-8">
+ <p>Upload assignment file for the said question.
+ <br>
+ <span class="badge badge-primary">
+ </u> <strong>You can upload using the file browser below or via the QR code.</strong></u>
+ </span>
+ </p>
+ <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>
+ </div>
+ <div class="col-md-4">
+ {% if qrcode %}
+ <img src="{{ qrcode.image.url }}" width="200" height="200">
+ {% else %}
+ <a class="active btn btn-outline-primary " href="{% url 'yaksh:generate_qrcode' paper.id question.id module.id %}" data-toggle="tooltip"
+ title="Upload from any device using the QR Code">Generate QR Code</a>
+ {% endif %}
+ </div>
+ </div>
{% endif %}
<!-- Arrange type question -->