-
Notifications
You must be signed in to change notification settings - Fork 6
/
teacher.php
150 lines (125 loc) · 5.97 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
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
<?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 class='panel panel-default'>
<div class='panel-heading'>
<h4 class='panel-title'>
<a data-toggle='collapse' data-parent='#accordion' href='#collapse3'>
Raum
</a>
</h4>
</div>
<div id='collapse3' class='panel-collapse collapse'>
<div class='panel-body'>
<p id="room">
<?php
$viewController = ViewController::getInstance();
$room = $viewController->action_room();
?> <br></P>
<h4>
Raum ändern
</h4>
<form id='changeRoomForm'>
<input type='hidden' name='userId' value='<?php echo(escape($user->getId())) ?>'>
<input type='hidden' name='eventId' value='<?php echo(escape($room['eventId'])) ?>'>
<div class='form-group'>
<label for='inputRoomNumber'>Raum Nummer</label>
<br><input type="text" class="form-control" name="roomNumber"/>
</div>
<div class='form-group'>
<label for='inputToTime'>Raum Name - kann auch ein Link zu einem virtuellen Raum sein.</label>
<br><input type="text" class="form-control" name="roomName"/>
</div>
<button type='submit' class='btn btn-primary' id='btn-change-room'>
Raum ändern
</button>
</form>
<div class='message' id='messageRoom'></div>
</div>
</div>
</div>
</div>
</div>
<?php include_once 'inc/footer.php'; ?>