/
classlist.php
180 lines (163 loc) · 6.58 KB
/
classlist.php
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
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns= "http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>View Class List</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom styles for this template -->
<link rel="stylesheet" href="/css/cssAddWords.css" />
</head>
<body>
<!-- Add Nav Bar part-->
<?php include "teacher-topbar-header.php";
?>
<!-- Start main html-->
<main class="col-sm-9 col-md-10 pt-3" role="main">
<!--small modal content-->
<div id ="confirm" class="modal fade">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirm</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" id ="modalclosesmall"class="btn btn-secondary" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
<!--response modal content-->
<div id ="sure" class="modal fade">
<div class="modal-dialog" role="dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Result</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" id="modalsave" class="btn btn-danger">OverWrite</button>
<button type="button" id ="modalclose "class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="importModal" role="dialog">
<div class="modal-dialog">
<!-- Modal import content-->
<div class="modal-content">
<div class="modal-header" style="padding:15px 40px;">
<H5>Import List</H5>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body" style="padding:20px 50px;">
<form method="POST" action="#" enctype="multipart/form-data" id="fileForm">
<div class="form-group">
<label for="InputFile">Import CSV</label>
<input type="file" accept=".csv" class="form-control-file" id="InputFile" name= "InputFile" aria-describedby="fileHelp">
<small id="fileHelp" class="form-text text-muted">Add a list of CSV Info in the FORM OF: Name, Email, Password, Class, Grade Level , School ID.</small>
<button type="submit" class="btn btn-primary" id="fileup">Upload</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exportModal" role="dialog">
<div class="modal-dialog">
<!-- Modal import content-->
<div class="modal-content">
<div class="modal-header" style="padding:15px 40px;">
<H5>Export List</H5>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body" style="padding:20px 50px;">
<form method="POST" action="#" id="exportForm">
<div class="form-group">
<div class="col-sm-6"><label >Export CSV</label><br><br>
<small id="downloadHelp" class="form-text text-muted">Click Download To Export Class List to CSV</small>
<button type="submit" class="btn btn-primary" id="exportbutton" download="classlist">Download</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="card mb-3">
<div class="card-header boardModule">
<h5 id ='listHeader' class="card-title text-white"> Class Lists For <?php echo $_SESSION['user']?></h5>
</div>
<div class="card-body">
<div id = "topTable" class="table-responsive">
<table id="sort_table" class="table table-bordered">
<tbody id = "sort_body"></tbody>
</table>
</div>
<div class="btn-group float-right " role="group" aria-label="Basic example">
<a class="btn btn-secondary btn-sm" id="classListImportSelect" href="#">Import Class List</a>
<a class="btn btn-secondary btn-sm" id="classListExportSelect" href="#">Export Class List</a>
<a class="btn btn-secondary btn-sm" id="deleteStudent" href="#">Delete Mode</a>
</div>
<div class="table-responsive">
<table class="table table-bordered" id="classListTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Password Set</th>
<th>Grade Level</th>
<th>Class</th>
<th>School</th>
<th id ="editHead" hidden></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</main>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS Code from bootstrap site -->
<script
src="http://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/qunit/qunit-2.4.1.js"></script>
<script>
if (typeof ($.fn.modal) === 'undefined') {
document.write('<script src="/js/bootstrap.min.js"><\/script>')
}
</script>
<script>
window.jQuery || document.write('<script src="/js/jquery-3.2.1.min.js"><\/script>');
</script>
<div id="bootstrapCssTest" class="hidden"></div>
<script>
$(function () {
if ($('#bootstrapCssTest').is(':visible')) {
$("head").prepend('<link rel="stylesheet" href="/css/bootstrap.min.css">');
}
});
</script>
<script src="/js/dashboard.js"></script>
</body>
</html>