forked from gymdb/speechday
-
Notifications
You must be signed in to change notification settings - Fork 1
/
teacher.php
163 lines (140 loc) · 6.82 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
151
152
153
154
155
156
157
158
159
160
161
162
163
<?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='#timetableview'>
Mein Terminplan
</a>
</h4>
</div>
<div id='timetableview' 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>
<input type='hidden' id='schoolUrl' value="<?php echo(escape($config->getConfig('school')['url'])); ?>" >
<button class="btn btn-primary" onclick="PrintElem('#timeTable', '<?php echo escape(getActiveSpeechdayText()); ?>')">
<span class='glyphicon glyphicon-print'></span> Zeitplan ausdrucken
</button>
<form method="post" action="controller.php?action=downloadICS" class="inline-form" >
<button type='submit' class='btn btn-primary btn-ics-download' id='btn-ics-download' >
<span class='glyphicon glyphicon-calendar'></span> Zeitplan als ics Datei
</button>
</form>
<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='#attendancemanagement'>
Anwesenheit
</a>
</h4>
</div>
<div id='attendancemanagement' class='panel-collapse collapse in'>
<div class='panel-body'>
<h4>
Aktuelle Anwesenheit
</h4>
<p id='attendance'>
<?php
$viewController = ViewController::getInstance();
$attendance = $viewController->action_attendance();
?>
</p>
<?php if ($attendance != null && isBookingtimeForActiveSpeechday()): ?>
<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>
<div class='form-group'>
<label for='inputAbsent'>Abwesend</label>
<input type='checkBox' class='form-control' id='inputAbsent' name='absent' placeholder='abwesend'>
</div>
<button type='submit' class='btn btn-primary' id='btn-change-attendance'>
Anwesenheit ändern
</button>
</form>
<div class='message-attendance' id='message-attendance'></div>
<?php else: ?>
<h2>
Die Anmeldungen laufen bereits!
</h2>
<p>
Um zu vermeiden, dass gebuchte Termine "gelöscht" werden, ist eine Änderung nicht mehr möglich.
</p><p>
Dies kann nur noch durch den Administrator erfolgen.
</p><p>
Als "Workaround" können Sie nicht gebuchte Termine als "Pause" markieren.
</p>
<?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='#pausemanagement'>
Pausen
</a>
</h4>
</div>
<div id='pausemanagement' class='panel-collapse collapse'>
<div class='panel-body'>
<div id='SlotsTablePauses'></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='#roommanagement'>
Raum
</a>
</h4>
</div>
<div id='roommanagement' class='panel-collapse collapse'>
<div class='panel-body'>
<div id='RoomEditForm'></div>
<div class='message-room' id='message-room'></div>
</div>
</div>
</div>
</div>
</div>
<?php include_once 'inc/footer.php'; ?>