summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/question.html
diff options
context:
space:
mode:
authorPrabhu Ramachandran2013-07-01 13:33:40 -0700
committerPrabhu Ramachandran2013-07-01 13:33:40 -0700
commitfe868c043487af8ea390165325309ad29daacc8e (patch)
treee4a0f69d84ccdc23ed99fa81b15e20d442fad531 /testapp/templates/exam/question.html
parent2e2123067d2477602d5e05fab02b7d36396f2d1f (diff)
parentb045c38d01685a9bb2183cd7a1a3b59cc410a0b4 (diff)
downloadonline_test-fe868c043487af8ea390165325309ad29daacc8e.tar.gz
online_test-fe868c043487af8ea390165325309ad29daacc8e.tar.bz2
online_test-fe868c043487af8ea390165325309ad29daacc8e.zip
Merge pull request #11 from hardythe1/fresh_snippet_feature
Fresh snippet feature
Diffstat (limited to 'testapp/templates/exam/question.html')
-rw-r--r--testapp/templates/exam/question.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index 4f65b64..1d801b0 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -87,12 +87,15 @@ function update_time()
{% endfor %}
{% else %}
- <textarea tabindex=1 rows="15" style="width:750px;margin-bottom:10px;" name="answer" id="answer" wrap="off" onkeydown="return catchTab(this,event)">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %} #!/bin/bash{% else %}{{ question.snippet }}{% endif %}{% endif %}</textarea>
+ <textarea tabindex=1 rows="3" style="width:750px;margin-bottom:15px;height:auto;" readonly=yes name="snippet" id="snippet" wrap="off">{% if last_attempt %}{% else %}{% if question.type == "bash" %} #!/bin/bash{% else %} #To avoid errors use tabs for indentation for Python questions &#13;&#10; {{ question.snippet }}{% endif %}{% endif %}</textarea>
+
+ <textarea tabindex=1 rows="10" style="width:750px;margin-bottom:10px;" name="answer" id="answer" wrap="off" onkeydown="return catchTab(this,event)">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %}{% else %}{% endif %}{% endif %}</textarea>
<br>
<script type="text/javascript">
- createTextAreaWithLines('answer');
+ addLineNumbers('answer');
</script>
+ <script>addLineNumbers('snippet');</Script>
{% endif %}
{% if question.type == "mcq" %}