summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorprathamesh2016-12-07 17:34:15 +0530
committerprathamesh2016-12-07 17:34:15 +0530
commit6f472a2237edfc64e2e112600219768c92367feb (patch)
tree6e71408bcf2e97017a9d6a5e78d26f2bb8cf2d1f /yaksh/templates
parentcb9d4c01d6287ab1288d0755d4f93d5320eb1d3a (diff)
downloadonline_test-6f472a2237edfc64e2e112600219768c92367feb.tar.gz
online_test-6f472a2237edfc64e2e112600219768c92367feb.tar.bz2
online_test-6f472a2237edfc64e2e112600219768c92367feb.zip
new question template
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/new_question.html86
1 files changed, 86 insertions, 0 deletions
diff --git a/yaksh/templates/yaksh/new_question.html b/yaksh/templates/yaksh/new_question.html
new file mode 100644
index 0000000..9e6f239
--- /dev/null
+++ b/yaksh/templates/yaksh/new_question.html
@@ -0,0 +1,86 @@
+{% extends "manage.html" %}
+
+{% block pagetitle %} Add Question {% endblock pagetitle %}
+
+{% block css %}
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/autotaggit.css" />
+{% endblock %}
+
+{% block script %}
+<script src="{{ URL_ROOT }}/static/yaksh/js/add_question.js"></script>
+{% endblock %}
+
+{% block onload %} onload='javascript:textareaformat();' {% endblock %}
+
+{% block content %}
+<form action="{{ URL_ROOT }}/exam/manage/newquestion/{{ question.id }}/" method="post" name="frm" onSubmit="return autosubmit();" enctype="multipart/form-data">
+ {% csrf_token %}
+ {{ qform.as_p}}
+ {% if uploaded_files %}<br><b>Uploaded files:</b><br>Check on delete to delete files,
+ extract to extract files and hide to hide files from student(if required)<br>
+ {% for file in uploaded_files %}
+ <input type="checkbox" name="clear" value="{{file.id}}">&nbsp;delete</input>&nbsp;
+ <input type="checkbox" name="extract" value="{{file.id}}" >{% if file.extract %} dont extract{% else %}
+ extract{% endif %}</input>&nbsp;&nbsp;
+ <input type="checkbox" name="hide" value="{{file.id}}" >{% if file.hide %} show{% else %}
+ hide{% endif %}</input><br>
+ <a href="{{file.file.url}}">{{ file.file.name }}</a>
+ <br>
+ {% endfor %}{% endif %}
+ <div class="form-group">
+ {{ standardformset.management_form }}
+
+ {% for stdform in standardformset %}
+ <div class="link-formset">
+ {{ stdform }}
+ </div>
+ {% endfor %}
+
+ </div>
+ <br \>
+ <div class="form-group">
+ {{ stdioformset.management_form }}
+ {% for ioform in stdioformset %}
+ <div class="link-formset">
+ {{ ioform }}
+ </div>
+ {% endfor %}
+
+ </div>
+ <br \>
+ <div class="form-group">
+ {{ mcqformset.management_form }}
+
+ {% for mcqform in mcqformset %}
+ <div class="link-formset">
+ {{ mcqform }}
+ </div>
+ {% endfor %}
+ <br \>
+ </div>
+ <div class="form-group">
+ {{ hookformset.management_form }}
+
+ {% for hookform in hookformset %}
+ <div class="link-formset">
+ {{ hookform }}
+ </div>
+ {% endfor %}
+ <br \>
+ </div>
+ <p><label for="case_type">Add Test Case:</label> <select id="case_type" name="case_type" onchange="frm.submit()">
+ <option value="" selected="selected">---------</option>
+ <option value="standardtestcase">Standard </option>
+ <option value="stdiobasedtestcase">StdIO </option>
+ <option value="mcqtestcase">MCQ/MCC </option>
+ <option value="hooktestcase">Hook </option>
+ </select></p>
+
+ </table></center>
+ <center>
+ <button class="btn" type="submit" name="save_question">Save</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Back to Questions</button>
+ <button class="btn" type="submit" name="delete_files">Delete Selected Files</button>
+ </center>
+</form>
+{% endblock %}