Commit a4659c17 authored by SANCHIT JAIN's avatar SANCHIT JAIN

corrected some bugs in take test

parent d7e2edbd
......@@ -74,12 +74,11 @@ var x = setInterval(function() {
<div align="center" style="margin-top:30px">
<img src = "{% static "" %}{{ image.0 }}" width="35%" height="35%" >
<p style="margin-top:5px">{{image.1}}</p>
</div>
{%endif%}
</div>
{% endfor %}
{% for option in data.options %}
<input type="checkbox" name = "{{option.0}}" value= "{{option.1}}" > {{ option.2 }} </br>
{% endfor %}
......
......@@ -303,10 +303,10 @@ def loadStudentTest(request):
questionsJSON[option.q_ID.question_text]['images'].append(
[str(image.image)[16:],image.imageDesc])
else:
questionsJSON[option.q_ID.question_text] = {}
questionsJSON[option.q_ID.question_text]['images'] = {}
questionsJSON[option.q_ID.question_text]['images'] = [[str(image.image)[16:],
image.imageDesc]]
# print questionsJSON
args['questions'] = questionsJSON
args['testName'] = testName
args['testID'] = test_ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment