-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminPage.html
More file actions
181 lines (149 loc) · 5.54 KB
/
adminPage.html
File metadata and controls
181 lines (149 loc) · 5.54 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<html ng-app="admin">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<!-- Bootstrap core CSS -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="theme.css" rel="stylesheet">
<style type="text/css" id="holderjs-style"></style></head>
<title></title>
<meta content="">
</head>
<body>
<div ng-controller = "adminCtrl" ng-init = "getAllResults()" >
<button id="logoutBtn" onclick="logout()" class="btn btn-lg btn-link">Log Out</button>
<button id="toQuizInsertPage" onclick="toQuizInsertPage()" class="btn btn-lg btn-link">Quiz Creator</button>
<button id="toQuizListPage" onclick="window.location='adminQuizList.html'" class="btn btn-lg btn-link">Quiz List</button>
<button id="toQuizList" onclick="window.location='courseList.html'" class="btn btn-lg btn-link">Go to Quizzes</button>
<button id="toPasswordSystem" onclick="window.location='resetPassword.html'" class="btn btn-lg btn-link">Password Manager</button>
<h1>Results Query</h1>
<br>
<div style="border:1px solid gray;">
<div class="jumbotron">
<div>
<label>First Name</label> <input id="fnameinput" type="text">
</div>
<div>
<label>Last Name</label> <input id="lnameinput" type="text">
</div>
<div>
<label>Quiz</label> <input id="quizinput" type="text" >
</div>
<div>
<label>Course Code</label> <input id="courseinput" type="text">
</div>
<button id="submit" ng-click="getQueryResults()" class="btn btn-sm btn-success" style="margin-left:175px">Query</button>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Results</h3>
</div>
<div class="panel-body">
<table style="width:100%" border="1" class="table table-bordered">
<tr>
<th><b>First Name</b></th>
<th><b>Last Name</b></th>
<th><b>Quiz</b></th>
<th><b>Course Code</b></th>
<th><b>Score</b></th>
<th><b>Time Taken</b></th>
<th><b>Date Taken</b></th>
</tr>
<tr ng-repeat="result in results track by $index">
<td>{{result.fname}}</td>
<td>{{result.lname}}</td>
<td>{{result.quizname}}</td>
<td>{{result.coursecode}}</td>
<td>{{result.score}}</td>
<td>{{result.timetaken}}</td>
<td>{{result.datetaken}}</td>
</tr>
</table>
</div>
</div>
</div>
<br>
<div style="border:1px solid gray;">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Quiz Averages</h3>
</div>
<div class="panel-body">
<table style="width:100%" border="1" ng-init="getQuizAverages()" class="table table-bordered">
<tr>
<td><b>Quiz</b></td>
<td><b>Course Code</b></td>
<td><b>Average Score</b></td>
<td><b>Number of attempts</b></td>
</tr>
<tr ng-repeat="quizavg in quizavgs">
<td>{{quizavg.quizname}}</td>
<td>{{quizavg.coursecode}}</td>
<td>{{quizavg.average_score}}</td>
<td>{{quizavg.number_taken}}</td>
</tr>
</table>
</div>
</div>
</div>
<br>
<div style="border:1px solid gray;">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Student Averages</h3>
</div>
<div class="panel-body">
<table style="width:100%" border="1" ng-init="getStudentAverages()" class="table table-bordered">
<tr>
<td><b>First Name</b></td>
<td><b>Last Name</b></td>
<td><b>Email</b></td>
<td><b>Average Score</b></td>
<td><b>Number of attempts</b></td>
</tr>
<tr ng-repeat="studentavg in studentavgs">
<td>{{studentavg.fname}}</td>
<td>{{studentavg.lname}}</td>
<td>{{studentavg.emailaddress}}</td>
<td>{{studentavg.average_score}}</td>
<td>{{studentavg.number_taken}}</td>
</tr>
</table>
</div>
</div>
</div>
<script>
function logout() {
sessionStorage.removeItem("username");
sessionStorage.removeItem("password");
sessionStorage.clear();
window.location = "./login.html";
}
function toQuizInsertPage() {
sessionStorage.removeItem("quizname");
window.location = "./quizEditor.html";
}
</script>
</div>
<script type="text/javascript" src="js/libraries/angular/angular.js"></script>
<script type="text/javascript" src="jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="question.js"></script>
<script type="text/javascript" src="js/admin/app.js"></script>
<script type="text/javascript" src="js/admin/controllers.js"></script>
<script type="text/javascript" src="js/admin/services.js"></script>
</body>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="bootsrap/js/bootstrap.min.js"></script>
<script src="bootstrap/js/docs.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="bootstrap/js/ie10-viewport-bug-workaround.js"></script>
</html>