summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjayparikh1112012-02-28 18:14:17 +0530
committerjayparikh1112012-02-28 18:14:17 +0530
commit7660073c5c83534a869f685b27c0fe0152b9983c (patch)
treef649b3f6a9b7a6740d05cb07c28d12bb752c3cba
parentb7ad768a6cc4fe5c8a05e20b1968f13a678c22cc (diff)
downloadonline_test-7660073c5c83534a869f685b27c0fe0152b9983c.tar.gz
online_test-7660073c5c83534a869f685b27c0fe0152b9983c.tar.bz2
online_test-7660073c5c83534a869f685b27c0fe0152b9983c.zip
Minor changes for displaying question details in grade_user and licensing in css
-rw-r--r--testapp/static/exam/css/base.css20
-rw-r--r--testapp/static/exam/css/gradeuser.css32
-rw-r--r--testapp/templates/exam/grade_user.html37
3 files changed, 85 insertions, 4 deletions
diff --git a/testapp/static/exam/css/base.css b/testapp/static/exam/css/base.css
index d2b227f..b7a9fbb 100644
--- a/testapp/static/exam/css/base.css
+++ b/testapp/static/exam/css/base.css
@@ -1,3 +1,23 @@
+/*!
+Copyright 2012 Twitter, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+
+ * Bootstrap v1.4.0
+ *
+ * Copyright 2011 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ * Date: Sun Dec 25 20:18:31 PST 2011
+ */
+/* Reset.less
+ * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
+ * For Online Test Application, this CSS was changed as per the requirements wherever required. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
+
html, body {
background-color: #eee;
margin: 0;
diff --git a/testapp/static/exam/css/gradeuser.css b/testapp/static/exam/css/gradeuser.css
index e50ab4e..3f7baf9 100644
--- a/testapp/static/exam/css/gradeuser.css
+++ b/testapp/static/exam/css/gradeuser.css
@@ -4,3 +4,35 @@ width : 550px;
height : 200px;
}
+
+#headerDiv, #contentDiv {
+float: left;
+width: 510px;
+}
+#titleText {
+float: left;
+font-size: 1.1em;
+font-weight: bold;
+margin: 5px;
+}
+#myHeader {
+font-size: 1.1em;
+font-weight: bold;
+margin: 5px;
+}
+#headerDiv {
+background-color: #0037DB;
+color: #9EB6FF;
+}
+#contentDiv {
+background-color:#F0F8FF;
+}
+#myContent {
+margin: 5px 10px;
+}
+#headerDiv a {
+float: right;
+margin: 10px 10px 5px 5px;
+}
+#headerDiv a:hover {
+color: #FFFFFF;
diff --git a/testapp/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html
index fccdaaa..5d3aa58 100644
--- a/testapp/templates/exam/grade_user.html
+++ b/testapp/templates/exam/grade_user.html
@@ -8,6 +8,22 @@
<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/gradeuser.css" type="text/css" />
{% endblock %}
+{% block script %}
+<script type='text/javascript'>
+function hidedata(showHideDiv) {
+ var ele = document.getElementById(showHideDiv);
+ ele.style.display = "none";
+
+
+}
+function showdata(showHideDiv)
+{
+ var ele = document.getElementById(showHideDiv);
+ ele.style.display = "block";
+
+}
+</script>
+{% endblock %}
{% block manage %}
<p>
@@ -35,14 +51,25 @@ Start time: {{ paper.start_time }} <br/>
{% if paper.answers.count %}
<h3> Answers </h3><br>
-<form id="q{{ paper.quiz.id }}_form"
+<form name=frm id="q{{ paper.quiz.id }}_form"
action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/" method="post">
{% csrf_token %}
{% for question, answers in paper.get_question_answers.items %}
<p><strong>
- <!--a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}">
- Question: {{ question.id }}. {{ question.summary }} </a-->
- <a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}" rel="floatbox" rev="width:468 height:255 scrolling:no" text="{{question}}" title="{{ question.description }} Correct Answer : {{ question.test }}"> Question: {{ question.id }}. {{ question.summary }} </a>
+ <a id='myHeader' href="{{URL_ROOT}}/admin/exam/question/{{question.id}}" onMouseOver="javascript:showdata('myContent{{question.id}}','myHeader');" onMouseOut="javascript:hidedata('myContent{{question.id}}','myHeader');"> Question: {{ question.id }}. {{ question.summary }} </a>
+<div style="clear:both;"></div>
+<div id="contentDiv">
+ <div id="myContent{{question.id}}" style="display: none;">
+ <p> Description : {{ question.description }} </p>
+ <p> Points : {{ question.points }} </p>
+ <p> Test : {{ question.test }} </p>
+ <p> Options : {{ question.options }} </p>
+ <p> Type : {{ question.type }} </p>
+
+ </div>
+</div>
+
+
(Points: {{ question.points }})</strong> </p>
{% if question.type == "mcq" %}
<p> Choices:
@@ -62,6 +89,8 @@ Marks: <input id="q{{ question.id }}" type="text"
value="{{ answer.marks }}"><br><br>
{% endwith %}
{% endfor %} {# for question, answers ... #}
+
+
<h3>Teacher comments: </h3>
<textarea id="comments_{{paper.quiz.id}}" rows="10" cols="80"
name="comments_{{ paper.quiz.id }}">{{ paper.comments }}</textarea>