summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yaksh/static/yaksh/js/add_quiz.js6
-rw-r--r--yaksh/templates/yaksh/add_quiz.html10
2 files changed, 15 insertions, 1 deletions
diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js
index 3da4d5c..a026ec0 100644
--- a/yaksh/static/yaksh/js/add_quiz.js
+++ b/yaksh/static/yaksh/js/add_quiz.js
@@ -7,6 +7,12 @@ function test()
{
document.getElementById("submit").innerHTML = "Save";
}
+ var template = "<p id='rendered_text'></p>"
+ $(template).insertBefore("#id_instructions");
+ $('#id_instructions').bind('keypress', function (event){
+ document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ;
+ });
+ document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ;
}
String.prototype.beginsWith = function (string) {
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html
index 2df97a2..b3b49ae 100644
--- a/yaksh/templates/yaksh/add_quiz.html
+++ b/yaksh/templates/yaksh/add_quiz.html
@@ -20,14 +20,17 @@
<center>
<table class=span1>
{{ form.as_table }}
+ </table>
<script type="text/javascript">
$("#id_start_date_time").datetimepicker({format: 'Y-m-d H:i:s'});
$("#id_end_date_time").datetimepicker({format: 'Y-m-d H:i:s'});
</script>
</table>
+ <br/><br/>
</center>
- <center><button class="btn" type="submit" id="submit" name="questionpaper"> Save </button>
+ <center><button class="btn" type="submit" id="submit" name="questionpaper"> Save
+ </button>
<button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center>
@@ -55,4 +58,9 @@
<a href="" onclick="$('#help').hide(); return false"> Close </a>
</div>
{% endif %}
+ <style type="text/css">
+ #rendered_text{
+ width: 550px;
+ }
+ </style>
{% endblock %}