-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz.tpl
98 lines (73 loc) · 1.62 KB
/
quiz.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<script type="text/javascript"
src="/static/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</script>
<script src = "/static/jquery/jquery-1.7.2.min.js"></script>
<head>
<title>QuizMe</title>
<link rel="stylesheet" type="text/css" href="/static/bootstrap/css/bootstrap.css">
</head>
<body>
%number = 1
%length = len(questions)
%for question in questions:
<! -This starts the question>
<div class="container-fluid">
<div class = "row-fluid">
<div class = "span12">
<h1>Standard {{questions[number-1][6]}}</h1>
</div>
</div>
<div class = "row-fluid">
<div class = "span12">
<hr>
<h1>Question {{number}} of {{length}}</h1>
</div>
</div>
%if(questions[number-1][2]!=''):
<div class="row-fluid">
<div class="span5">
<img src = "{{questions[number-1][2]}}">
</div>
<div class="span7">
<div class = "hero-unit" >
<h3>{{! questions[number-1][0]}}</h3>
%if(showAnswers==True):
<p class = "text-error">Answer: {{! questions[number-1][1]}}</p>
%end
<div>
</div>
</div>
</div>
%else:
<div class="row-fluid">
<div class="span12">
<div class = "hero-unit" >
<h3>{{! questions[number-1][0]}}</h3>
%if(showAnswers==True):
<p class = "text-error">Answer: {{! questions[number-1][1]}}</p>
%end
<div>
</div>
</div>
</div>
%end
<! - This ends the question unit >
%number +=1
%end
</div>
</body>
</html>
<script>
$(document).ready(function(){
/*
$('body').hide();
var pwd = prompt('Enter the password for the quiz');
if(pwd == 'bday'){
$('body').fadeToggle();
}
*/
});
</script>