Skip to content

Commit fecce07

Browse files
Change pointer style to hand pointer in result pages
1 parent e08a999 commit fecce07

13 files changed

Lines changed: 351 additions & 35 deletions

File tree

src/lab/exp1/results.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
</script>
6565

6666
<input type="button" value="Take the quiz again" name="B1"
67-
onClick="history.go(-1)"> <input type="button" value="View solution" name="B2"
68-
onClick="showsolution()"></p>
67+
onClick="history.go(-1)" onmouseover="" style="cursor: pointer;"> <input type="button" value="View solution" name="B2"
68+
onClick="showsolution()" onmouseover="" style="cursor: pointer;"></p>
6969
</center></div>
7070
</form>
7171

src/lab/exp10/results.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
</script>
6565

6666
<input type="button" value="Take the quiz again" name="B1"
67-
onClick="history.go(-1)"> <input type="button" value="View solution" name="B2"
68-
onClick="showsolution()"></p>
67+
onClick="history.go(-1)" onmouseover="" style="cursor: pointer;"> <input type="button" value="View solution" name="B2"
68+
onClick="showsolution()" onmouseover="" style="cursor: pointer;"></p>
6969
</center></div>
7070
</form>
7171

src/lab/exp2/results.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
</script>
6565

6666
<input type="button" value="Take the quiz again" name="B1"
67-
onClick="history.go(-1)"> <input type="button" value="View solution" name="B2"
68-
onClick="showsolution()"></p>
67+
onClick="history.go(-1)" onmouseover="" style="cursor: pointer;"> <input type="button" value="View solution" name="B2"
68+
onClick="showsolution()" onmouseover="" style="cursor: pointer;"></p>
6969
</center></div>
7070
</form>
7171

src/lab/exp3/Quizzes.html

Lines changed: 183 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<title>Welcome to Virtual Labs - A MHRD Govt of india Initiative</title>
1212

1313
<link rel="shortcut icon" href="../images/favicon.ico">
14-
14+
<script type="text/javascript" src = 'quiz.js'></script>
1515

1616
<link href="../css/bootstrap.min.css" rel="stylesheet">
1717

@@ -25,6 +25,37 @@
2525
<link href="../css/style.css" rel="stylesheet">
2626
<script type="text/javascript" src = 'tabs.js'></script>
2727
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-67020197-1', 'auto');ga('send', 'pageview');</script>
28+
29+
30+
<style>
31+
.qheader{
32+
font:bold 14px Arial;
33+
}
34+
35+
.qselections{
36+
font:normal 13px Arial;
37+
}
38+
</style>
39+
40+
<script src="quizconfig.js">
41+
</script>
42+
43+
<script>
44+
45+
/***********************************************
46+
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
47+
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
48+
* This notice and footnote must stay intact for use
49+
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
50+
***********************************************/
51+
52+
var actualchoices=new Array()
53+
document.cookie="ready=yes"
54+
</script>
55+
56+
57+
58+
2859
</head>
2960
<body id="page-top" class="index">
3061
<div id="top">
@@ -93,61 +124,195 @@ <h2 class="text-h2-lightblue" style=" margin-bottom: 20px; margin-top: 10px; "><
93124
<div class="row">
94125
<div class="col-md-2 sidebar-col-2">
95126
<!--edit1-->
96-
<a href="Introduction.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Introduction</h3></a><a href="Theory.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Theory</h3></a><a href="Objective.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Objective</h3></a><a href="Experiment.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Experiment</h3></a><a href="Manual.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Manual</h3></a><a href="Quizzes.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Quizzes</h3></a><a href="Procedure.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Procedure</h3></a><a href="Further Readings.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Further Readings</h3></a><a href="http://feedback.vlabs.ac.in/" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;"></h3></a> </div>
127+
<a href="Introduction.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Introduction</h3></a><a href="Theory.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Theory</h3></a><a href="Objective.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Objective</h3></a><a href="Experiment.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Experiment</h3></a><a href="Manual.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Manual</h3></a><a href="Quizzes.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Quizzes</h3></a><a href="http://feedback.vlabs.ac.in/" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;"></h3></a> </div>
97128

98-
<div class="col-md-10 lab-list-col-10">
129+
130+
131+
132+
133+
134+
<div class="col-md-10 lab-list-col-10">
99135

100136
<!--edit -->
101-
<h1 class="text-h2-lightblue">More on Numbers</h1><div class="content" id="experiment-article-section-6-content">
137+
<h1 class="text-h2-lightblue">More On Numbers</h1><div class="content" id="experiment-article-section-6-content">
102138
<p>
103-
<form action="quizresults.php" method="post" name="quiz" onsubmit='return window.confirm("You are submitting information to an external page. \nAre you sure?");' target="_blank">
139+
<!-- <form method="post" name="quiz" onsubmit='evaluate()' target="_blank">
104140
<ol>
105-
<li><b>The execution of a loop typically starts with: </b></li>
141+
<li><b>1. The execution of a loop typically starts with: </b></li>
106142
<input name="Q1" type="radio" value="1">initialization statements<br>
107143
<input name="Q1" type="radio" value="2">Loop body<br>
108144
<input name="Q1" type="radio" value="3">test condition<br>
109145
<input name="Q1" type="radio" value="4">update statements<br>
146+
110147
<br>
111-
<li><b>The break statement is used to exit from:</b> </li>
148+
<li><b>2. The break statement is used to exit from:</b> </li>
112149
<input name="Q2" type="radio" value="1">an if statement<br>
113150
<input name="Q2" type="radio" value="2">a for loop<br>
114151
<input name="Q2" type="radio" value="3">a program<br>
115152
<input name="Q2" type="radio" value="4">the main( ) function<br>
116153
<br>
117-
<li><b>A do-while loop is useful when we want that the statements within the loop must be executed</b></li>
154+
<li><b>3. A do-while loop is useful when we want that the statements within the loop must be executed</b></li>
118155
<input name="Q3" type="radio" value="1">Only once<br>
119156
<input name="Q3" type="radio" value="2">At Least Once<br>
120157
<input name="Q3" type="radio" value="3">More than once<br>
158+
121159
<input name="Q3" type="radio" value="4">None of the above<br>
122160
<br>
123-
<li><b>In what sequence the initialization, testing and execution of body is done in a do-while loop </b></li>
161+
<li><b>4. In what sequence the initialization, testing and execution of body is done in a do-while loop </b></li>
124162
<input name="Q4" type="radio" value="1">Initialization, execution of body, testing<br>
125163
<input name="Q4" type="radio" value="2">Execution of body, initialization, testing <br>
126164
<input name="Q4" type="radio" value="3">Initialization, testing, execution of body <br>
127165
<input name="Q4" type="radio" value="4">None of the above<br>
128166
<br>
129-
<li><b>Which of the following is not an infinite loop. </b></li>
130-
<input name="Q5" type="radio" value="1"><code>int i = 1 ;
167+
<li><b>5. Which of the following is not an infinite loop. </b></li>
168+
<input name="Q5" type="radio" value="1"><code>int i = 1 ;
131169
while ( 1 )
132170
{
133171
i++ ;
134172
}</code><br>
135173
<input name="Q5" type="radio" value="2">
136-
<code>for( int i =1; i&lt;10; i--)
137-
printf("Hello World");
174+
<code>for( int i =1; i &lt; 10 ; i--) printf("Hello World");
138175
</code><br>
139176
<input name="Q5" type="radio" value="3"><code>for(int i =1; i&lt;100; i++)
140177
printf("Hello World");
141178
</code><br>
142-
<input name="Q5" type="radio" value="4"><code>int i = 0;
179+
<input name="Q5" type="radio" value="4">
180+
<code>int i = 0;
143181
do{
144182
i--
145183
printf("%d ",i);
146184
}while(i&gt;0);
147-
</code><br>
185+
</code>
186+
</ol>
187+
<br>
148188
</br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></ol>
149-
<p> <input target="_blank" type="submit" value="Submit answers for evaluation"/></p>
189+
<br>
190+
<p> <button type="submit" onclick="evaluate()">Submit answers for evaluation</button></p>
191+
</br></form> -->
192+
193+
194+
195+
<form method="POST" name="myquiz">
196+
197+
<!-- <font face="Arial"><big><big>General Knowledge Quiz</big></big></font></p> -->
198+
199+
<div class="qheader">
200+
1. The execution of a loop typically starts with: </div>
201+
<div class="qselections">
202+
<input type="radio" value="a" name="question1">a) initialization statements<br>
203+
<input type="radio" value="b" name="question1">b) Loop body<br>
204+
<input type="radio" value="c" name="question1">c) test condition<br>
205+
<input type="radio" value="d" name="question1">d) update statements<br>
206+
</div>
207+
208+
<br>
209+
210+
<div class="qheader">
211+
2) The break statement is used to exit from:</div>
212+
<div class="qselections">
213+
<input type="radio" value="a" name="question2">a) an if statement<br>
214+
<input type="radio" value="b" name="question2">b) a for loop<br>
215+
<input type="radio" value="c" name="question2">c) a program<br>
216+
<input type="radio" value="d" name="question2">d) the main( ) function<br>
217+
</div>
218+
219+
<br>
220+
221+
<div class="qheader">
222+
3) A do-while loop is useful when we want that the statements within the loop must be executed</div>
223+
<div class="qselections">
224+
<input type="radio" value="a" name="question3">a) only once<br>
225+
<input type="radio" value="b" name="question3">b) At Least Once<br>
226+
<input type="radio" value="c" name="question3">c) More than once<br>
227+
<input type="radio" value="d" name="question3">d) None of the above<br>
228+
</div>
229+
230+
<br>
231+
232+
<div class="qheader">
233+
4) In what sequence the initialization, testing and execution of body is done in a do-while loop </div>
234+
<div class="qselections">
235+
<input type="radio" value="a" name="question4">a) Initialization, execution of body, testing<br>
236+
<input type="radio" value="b" name="question4">b) Execution of body, initialization, testing<br>
237+
<input type="radio" value="c" name="question4">c) Initialization, testing, execution of body<br>
238+
<input type="radio" value="d" name="question4">d) None of the above<br>
239+
</div>
240+
241+
<br>
242+
243+
<div class="qheader">
244+
5) Which looping process checks the test condition at the end of the loop?</div>
245+
<div class="qselections">
246+
<input type="radio" value="a" name="question5">a) for<br>
247+
<input type="radio" value="b" name="question5">b) while<br>
248+
<input type="radio" value="c" name="question5">c) do-while<br>
249+
<input type="radio" value="d" name="question5">d) No looping peocess check condition at the end<br>
250+
</div>
251+
252+
<br>
253+
254+
<div class="qheader">
255+
6) A continue statement causes execution to skip to: </div>
256+
<div class="qselections">
257+
<input type="radio" value="a" name="question6">a) the end of the program<br>
258+
<input type="radio" value="b" name="question6">b) the first statement after the loop<br>
259+
<input type="radio" value="c" name="question6">c) the statement following the continue statement<br>
260+
<input type="radio" value="d" name="question6">d) the next iteration of the loop<br>
261+
</div>
262+
263+
<br>
264+
265+
<div class="qheader">
266+
7) The statement i++; is equivalent to: </div>
267+
<div class="qselections">
268+
<input type="radio" value="a" name="question7">a) <code>i = i + i;</code><br>
269+
<input type="radio" value="b" name="question7">b) <code>i = i + 1;</code><br>
270+
<input type="radio" value="c" name="question7">c) <code>i = i - 1;</code><br>
271+
<input type="radio" value="d" name="question7">d) <code> i - - ;</code><br>
272+
</div>
273+
274+
<br>
275+
276+
<div class="qheader">
277+
8) Another word for "looping" is: </div>
278+
<div class="qselections">
279+
<input type="radio" value="a" name="question8">a) recapitulation <br>
280+
<input type="radio" value="b" name="question8">b) tintinabulation <br>
281+
<input type="radio" value="c" name="question8">c) iteration<br>
282+
<input type="radio" value="d" name="question8">d) reiteration<br>
283+
</div>
284+
285+
<br>
286+
287+
<div class="qheader">
288+
9) Which looping process is best used when the number of iterations is known?</div>
289+
<div class="qselections">
290+
<input type="radio" value="a" name="question9">a) for<br>
291+
<input type="radio" value="b" name="question9">b) while<br>
292+
<input type="radio" value="c" name="question9">c) do-while<br>
293+
<input type="radio" value="d" name="question9">d) all of the above<br>
294+
</div>
295+
296+
<br>
297+
298+
<div class="qheader">
299+
10) Which of the following is not an infinite loop.</div>
300+
<div class="qselections">
301+
<input type="radio" value="a" name="question10">a) <code>int i = 1 ; while ( 1 ) { i++ ;
302+
} </code><br>
303+
<input type="radio" value="b" name="question10">b) <code>for( int i =1; i &lt; 10 ; i--) printf("Hello World");</code><br>
304+
<input type="radio" value="c" name="question10">c) <code>for(int i =1; i&lt;100; i++) printf("Hello World");</code><br>
305+
<input type="radio" value="d" name="question10">d) <code>int i = 0; do{ i-- printf("%d ",i); }while(i&gt;0);</code><br>
306+
307+
</div>
308+
309+
</form>
310+
311+
<form>
312+
<div align="center">
313+
<input type="button" value="Grade Me!" name="B1" onClick="gradeit()"> <input type="button" value="Reset" name="B2" onClick="document.myquiz.reset()"></div>
150314
</form>
315+
151316
</p>
152317
</div> </div>
153318
</div>
@@ -204,6 +369,8 @@ <h2 class="text-h2-lightblue-small" style="font-weight: bold;margin-top: 0px;">
204369

205370
</div> <!-- top div -->
206371

372+
373+
207374
</body>
208375

209376

src/lab/exp3/quizconfig.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/***********************************************
2+
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
3+
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
4+
* This notice and footnote must stay intact for use
5+
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
6+
***********************************************/
7+
8+
//Enter total number of questions:
9+
var totalquestions=10
10+
11+
//Enter the solutions corresponding to each question:
12+
var correctchoices=new Array()
13+
correctchoices[1]='a' //question 1 solution
14+
correctchoices[2]='b' //question 2 solution, and so on.
15+
correctchoices[3]='b'
16+
correctchoices[4]='a'
17+
correctchoices[5]='c'
18+
correctchoices[6]='d'
19+
correctchoices[7]='b'
20+
correctchoices[8]='c'
21+
correctchoices[9]='a'
22+
correctchoices[10]='c'
23+
24+
/////Don't edit beyond here//////////////////////////
25+
26+
function gradeit(){
27+
var incorrect=null
28+
for (q=1;q<=totalquestions;q++){
29+
var thequestion=eval("document.myquiz.question"+q)
30+
for (c=0;c<thequestion.length;c++){
31+
if (thequestion[c].checked==true)
32+
actualchoices[q]=thequestion[c].value
33+
}
34+
35+
if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
36+
if (incorrect==null)
37+
incorrect=q
38+
else
39+
incorrect+="/"+q
40+
}
41+
}
42+
43+
if (incorrect==null)
44+
incorrect="a/b"
45+
document.cookie='q='+incorrect
46+
if (document.cookie=='')
47+
alert("Your browser does not accept cookies. Please adjust your browser settings.")
48+
else
49+
window.location="results.htm"
50+
}
51+
52+
53+
function showsolution(){
54+
var win2=window.open("","win2","width=200,height=350, scrollbars")
55+
win2.focus()
56+
win2.document.open()
57+
win2.document.write('<title>Solution</title>')
58+
win2.document.write('<body bgcolor="#FFFFFF">')
59+
win2.document.write('<center><h3>Solution to Quiz</h3></center>')
60+
win2.document.write('<center><font face="Arial">')
61+
for (i=1;i<=totalquestions;i++){
62+
for (temp=0;temp<incorrect.length;temp++){
63+
if (i==incorrect[temp])
64+
wrong=1
65+
}
66+
if (wrong==1){
67+
win2.document.write("Question "+i+"="+correctchoices[i].fontcolor("red")+"<br>")
68+
wrong=0
69+
}
70+
else
71+
win2.document.write("Question "+i+"="+correctchoices[i]+"<br>")
72+
}
73+
win2.document.write('</center></font>')
74+
win2.document.write("<h5>Note: The solutions in red are the ones to the questions you had incorrectly answered.</h5>")
75+
win2.document.close()
76+
}

0 commit comments

Comments
 (0)