Commit 157e55ef authored by Rahul-chunduru's avatar Rahul-chunduru

improved create_question

parent f7db8450
......@@ -75,7 +75,7 @@ function prevTab(elem) {
var check = document.createElement("input");
var check_ans = document.createElement("label");
check_ans.for = "c" + x ;
check_ans.innerHTML = "Is this an / the answer?"
check_ans.innerHTML = "Is this an / the answer?" ;
check.type="checkbox";
check.className = "form-control" ;
check.name="c" + x ;
......@@ -110,8 +110,8 @@ function prevTab(elem) {
var qtext = document.getElementById('qtext').value ;
question_data['subject_ID'] = subject.value ;
question_data['question_text'] = qtext ;
console.log(question_data['question_text']) ;
console.log(question_data['subject_ID']) ;
question_data['difficulty_set'] = document.getElementById('diff').value;
console.log(question_data) ;
document.getElementById('l2').click() ;
}
......@@ -228,7 +228,7 @@ Create Question
{%endblock%}
{%block body%}
<h3 style="text-align:center"> You CAN CREATE A QUESTION HERE prof {{username}}</h3>
<h3 style="text-align:center"> Create a question here</h3>
<div class="container" title="this is title">
<div class="row">
<section>
......@@ -288,6 +288,10 @@ Create Question
<label>Question Text</label>
<textarea class="form-control" rows="6" id= "qtext"></textarea>
</div>
<div class="form-group col-lg-4">
<label style="margin-right:20px">Specify question difficulty</label>
<input type="number" name="quantity" min="1" max="10" placeholder="5" value="5" id="diff">
</div>
</div>
<div class="tab-pane" role="tabpanel" id="step2">
<h3>Step 2 - Add some options</h3>
......@@ -308,7 +312,7 @@ Create Question
<p> Drop images in the order you want to display</p>
<ul class="list-inline pull-right">
<li><button type="button" class="btn btn-default prev-step" onclick="document.getElementById('l2').click() ; ">Previous</button></li>
<li><button type="button" class="btn btn-default next-step" onclick="document.getElementById('l4').click() ;">Skip</button></li>
<!-- <li><button type="button" class="btn btn-default next-step" onclick="document.getElementById('l4').click() ;">Skip</button></li> -->
<li><button align="left" type="button" class="btn btn-primary" id="addsubjectiveque" onclick="intend_to_add_img() ; post()" >Add an image</button></li>
<li><button type="button" class="btn btn-primary btn-info-full next-step" onclick="post()">Post Question</button></li>
</ul>
......
......@@ -17,9 +17,11 @@ My Tests
<ul class="list-group">
{% for t in activeTests %}
<div class="row" style="margin-bottom: 10px; margin-top: 5px">
<div style="float: left; margin-left: 20px">
<p><i>Test Id</i> <b> {{t.test_ID}}</b></p>
<p><i> Test Name</i> <b>{{t.test_name}}</b> </p>
</div>
</div>
<div style="float:right">
<form method="POST" action="loadStudentTest">
{% csrf_token %}
......
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