-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminQuizList.html
More file actions
92 lines (74 loc) · 2.79 KB
/
adminQuizList.html
File metadata and controls
92 lines (74 loc) · 2.79 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
<html ng-app="adminQuizList">
<head>
<title></title>
<meta content="">
<style></style>
<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="js/adminQuizList/app.js"></script>
<script type="text/javascript" src="js/adminQuizList/controllers.js"></script>
<script type="text/javascript" src="js/adminQuizList/services.js"></script>
<!-- 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">
</head>
<div ng-controller = "adminQuizCtrl" ng-init = "verifyAdmin()" >
<body onload="load()" ng-controller="adminQuizCtrl">
<script>
<!--SHOULD BE LEGIT LOGGED IN AS ADMIN-->
function load() {
if (sessionStorage.getItem('username') == null) {
alert("You're not logged in, redirecting to home");
window.location = "./login.html";
}
//oh my god update
}
</script>
<button id="Back" onclick="window.location='adminPage.html'" class="btn btn-link">Back</button>
<br>
<div ng-init="getQuizzes()">
<script>
function gotoResults() {
window.location = "./results.html";
}
function logout() {
sessionStorage.removeItem("username");
sessionStorage.removeItem("password");
sessionStorage.clear();
window.location = "./login.html";
}
</script>
<h1 style="margin-left:200px;">Available Courses</h1>
<table style="width:80%; border:1px solid gray;" align="center" class="table table-striped">
<tr>
<thead>
<th>Course Code</th>
<th>Quiz Name</th>
<th></th>
<th></th>
</thead>
</tr>
<tr ng-repeat="quiz in quizzes track by $index">
<td>{{quiz.courseCode}} </td>
<td>{{quiz.name}}</td>
<td><button ng-click="editQuiz(quiz.name);" class="btn btn-sm btn-info">Edit</button></td>
<td><button ng-click="deleteQuiz(quiz.name);" class="btn btn-sm btn-warning">Delete</button></td>
<!-- <td><a onclick="deleteQuiz({{quiz.name}});">Delete</a></td> -->
<!-- <td><a href="javascript:deleteQuiz({{quiz.name}});">Delete</a></td> -->
</tr>
</table>
</div>
</div>
</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>