summaryrefslogtreecommitdiff
path: root/testapp/templates
diff options
context:
space:
mode:
authorHardik Ghaghada2013-04-29 11:05:39 +0530
committerHardik Ghaghada2013-04-29 11:05:39 +0530
commit216031440bfe304ad51013950f49e88258ed9fde (patch)
tree907b89d2c37ffcf1ba0d832a2fe2c6e12cef11cf /testapp/templates
parent5c7f66806e4be50985655b7c12bf3190ee91ae46 (diff)
downloadonline_test-216031440bfe304ad51013950f49e88258ed9fde.tar.gz
online_test-216031440bfe304ad51013950f49e88258ed9fde.tar.bz2
online_test-216031440bfe304ad51013950f49e88258ed9fde.zip
Added a separate textarea for non-editable code for snippet feature
Diffstat (limited to 'testapp/templates')
-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..3506c93 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="7" style="width:750px;margin-bottom:15px;" readonly=yes name="snippet" id="snippet" 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="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" %} #!/bin/bash{% else %}{% endif %}{% endif %}</textarea>
<br>
<script type="text/javascript">
- createTextAreaWithLines('answer');
+ createTextAreaWithLines2('answer');
</script>
+ <script>createTextAreaWithLines('snippet');</Script>
{% endif %}
{% if question.type == "mcq" %}