forked from gymdb/speechday
-
Notifications
You must be signed in to change notification settings - Fork 0
/
teacher.php
106 lines (88 loc) · 4.08 KB
/
teacher.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
<?php
require_once('code/dao/EventDAO.php');
require_once('code/ViewController.php');
require_once('code/AuthenticationManager.php');
AuthenticationManager::checkPrivilege('teacher');
include_once 'inc/header.php';
?>
<script type='text/javascript' src='js/teacher.js'></script>
<p id='pageName' hidden>Teacher</p>
<div class='container'>
<h1>Meine Übersicht</h1>
<div class='panel-group' id='accordion'>
<div class='panel panel-default'>
<div class='panel-heading'>
<h4 class='panel-title'>
<a data-toggle='collapse' data-parent='#accordion' href='#collapse1'>
Mein Terminplan
</a>
</h4>
</div>
<div id='collapse1' class='panel-collapse collapse in'>
<div class='panel-body'>
<form id='chooseMySlotsForm'>
<div class='form-group'>
<label for='selectType'>Darstellungstyp</label>
<select class='form-control' id='selectType' name='type'>
<option value='1'>Kompakt</option>
<option value='2'>Vollständig</option>
</select>
</div>
</form>
<button class="btn btn-primary" onclick="window.print()">
<span class='glyphicon glyphicon-print'></span> Zeitplan ausdrucken
</button>
<div id='timeTable' class="section-to-print"></div>
</div>
</div>
</div>
<div class='panel panel-default'>
<div class='panel-heading'>
<h4 class='panel-title'>
<a data-toggle='collapse' data-parent='#accordion' href='#collapse2'>
Anwesenheit
</a>
</h4>
</div>
<div id='collapse2' class='panel-collapse collapse'>
<div class='panel-body'>
<h4>
Aktuelle Anwesenheit
</h4>
<p id='attendance'>
<?php
$viewController = ViewController::getInstance();
$attendance = $viewController->action_attendance();
?>
</p>
<?php if ($attendance != null): ?>
<h4>
Anwesenheit ändern
</h4>
<form id='changeAttendanceForm'>
<input type='hidden' name='userId' value='<?php echo(escape($user->getId())) ?>'>
<input type='hidden' name='eventId' value='<?php echo(escape($attendance['eventId'])) ?>'>
<div class='form-group'>
<label for='inputFromTime'>Von</label>
<select class='form-control' id='inputSlotDuration' name='inputFromTime'>
<?php echo(getDateOptions($attendance, true)); ?>
</select>
</div>
<div class='form-group'>
<label for='inputToTime'>Bis</label>
<select class='form-control' id='inputSlotDuration' name='inputToTime'>
<?php echo(getDateOptions($attendance, false)); ?>
</select>
</div>
<button type='submit' class='btn btn-primary' id='btn-change-attendance'>
Anwesenheit ändern
</button>
</form>
<div class='message' id='message'></div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php include_once 'inc/footer.php'; ?>