mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 06:54:04 +00:00
Compare commits
1637
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f4482cff4 | ||
|
|
96a373682a | ||
|
|
ebb0042881 | ||
|
|
4e7a3b22fe | ||
|
|
9e2cc68531 | ||
|
|
45647f0cec | ||
|
|
50a518ea7a | ||
|
|
2b44b421dc | ||
|
|
70a93cc093 | ||
|
|
0c4d102850 | ||
|
|
2e15f2c5ab | ||
|
|
4768fbda15 | ||
|
|
d8959d9776 | ||
|
|
9e2a818eab | ||
|
|
27bd463109 | ||
|
|
784e5693b4 | ||
|
|
88b49b70e9 | ||
|
|
3214ae3101 | ||
|
|
1f570f8495 | ||
|
|
67a33f2ceb | ||
|
|
4549c92d50 | ||
|
|
751445c199 | ||
|
|
916f5dd68e | ||
|
|
efc8fa1eeb | ||
|
|
5313693651 | ||
|
|
0239977d21 | ||
|
|
d58edff92d | ||
|
|
ca4043833e | ||
|
|
643929a0c6 | ||
|
|
a5aa4c8466 | ||
|
|
8db60c67f8 | ||
|
|
b97dec7343 | ||
|
|
8b58c82385 | ||
|
|
4ba2869632 | ||
|
|
293bb77179 | ||
|
|
3fe10d715d | ||
|
|
3034615455 | ||
|
|
36064afbba | ||
|
|
65c931ea2d | ||
|
|
5aa007f49c | ||
|
|
f3d031ab16 | ||
|
|
762fd1cadd | ||
|
|
9feb442a07 | ||
|
|
e24a66a454 | ||
|
|
3d8c4fa4d0 | ||
|
|
272014bd78 | ||
|
|
76a8e00edf | ||
|
|
af978e1312 | ||
|
|
a53c4fd623 | ||
|
|
ce62713790 | ||
|
|
34761db664 | ||
|
|
c7131ed775 | ||
|
|
b57e1984a8 | ||
|
|
59c5100a86 | ||
|
|
cf6e747def | ||
|
|
22500a96c1 | ||
|
|
03af6bfda5 | ||
|
|
0fafb95bd8 | ||
|
|
1d838f8116 | ||
|
|
9605227139 | ||
|
|
a64219dd25 | ||
|
|
e06d5fbdc1 | ||
|
|
d30595bbfb | ||
|
|
43d5068cda | ||
|
|
eebe2d6aec | ||
|
|
d5fa13d644 | ||
|
|
9ae2c91677 | ||
|
|
e369a8c03f | ||
|
|
98175c5976 | ||
|
|
94992f40bd | ||
|
|
1e2dbeac10 | ||
|
|
153717b187 | ||
|
|
dd15b37f0f | ||
|
|
2fc2d12d65 | ||
|
|
0279813ba9 | ||
|
|
1c4c90ffba | ||
|
|
acedc11be8 | ||
|
|
c79f664f9e | ||
|
|
f817527ab9 | ||
|
|
754e619e30 | ||
|
|
fb0a92a636 | ||
|
|
03858b12b9 | ||
|
|
342dede1b0 | ||
|
|
6e1c0fe623 | ||
|
|
fece3f7477 | ||
|
|
ab2333f708 | ||
|
|
c4e79ffdf9 | ||
|
|
15c1da74a2 | ||
|
|
4d2a6589b4 | ||
|
|
191a81058c | ||
|
|
dd25c7af75 | ||
|
|
ef996273a7 | ||
|
|
eb164f5f69 | ||
|
|
d33b45d7cb | ||
|
|
adce19e651 | ||
|
|
b3b6d847a7 | ||
|
|
80365de28c | ||
|
|
2d74522a4f | ||
|
|
d00aef66e1 | ||
|
|
241eec3ef2 | ||
|
|
2050f5ae65 | ||
|
|
587e523990 | ||
|
|
5ec1a1c54c | ||
|
|
2c65ccc8da | ||
|
|
787308aad4 | ||
|
|
8b44e4475b | ||
|
|
d251987850 | ||
|
|
e7127ae624 | ||
|
|
842ad77092 | ||
|
|
96104fd93a | ||
|
|
c34a74c040 | ||
|
|
ba92eea7eb | ||
|
|
ff33ea943d | ||
|
|
43b849e787 | ||
|
|
a4f8154662 | ||
|
|
33d3983a97 | ||
|
|
50951dfdcf | ||
|
|
a9f84eda42 | ||
|
|
be7527e994 | ||
|
|
3f3e94bdc9 | ||
|
|
72e7b215ef | ||
|
|
d5c1721ab1 | ||
|
|
8eb27b194f | ||
|
|
9bd3e7b1bc | ||
|
|
45595ab1fd | ||
|
|
3f056babac | ||
|
|
faad2c4a9a | ||
|
|
1a81f4a541 | ||
|
|
326e8c651c | ||
|
|
dfaaabfc2a | ||
|
|
f07f37ec35 | ||
|
|
1357ed5d3d | ||
|
|
579a55a00d | ||
|
|
0a00caa1e4 | ||
|
|
224cef7fad | ||
|
|
c53040ed5c | ||
|
|
f7465047cb | ||
|
|
0dadaece08 | ||
|
|
dafff1620d | ||
|
|
fc89a25d3a | ||
|
|
aaf8dd16ef | ||
|
|
fba5953b59 | ||
|
|
7ea80395a8 | ||
|
|
2d7458eefe | ||
|
|
9a45efd558 | ||
|
|
205b217854 | ||
|
|
e5ec9177e3 | ||
|
|
19c4cd70b8 | ||
|
|
75c341d983 | ||
|
|
f73f36ea6f | ||
|
|
6faf1cbcc2 | ||
|
|
87bd3975b8 | ||
|
|
5dc34ac0d0 | ||
|
|
09f18d9039 | ||
|
|
2ffaf36270 | ||
|
|
ec8b9a4c0a | ||
|
|
69fd223358 | ||
|
|
9c43374267 | ||
|
|
80e17e264a | ||
|
|
99445d2372 | ||
|
|
0ab6e3d00d | ||
|
|
ea7c0cccde | ||
|
|
385b262be8 | ||
|
|
b4206e1e48 | ||
|
|
e09555908a | ||
|
|
38060c60fb | ||
|
|
40516b34a2 | ||
|
|
ea97e3a192 | ||
|
|
f34481ae60 | ||
|
|
fcf3cbac6c | ||
|
|
6dfe292776 | ||
|
|
40b28b88b9 | ||
|
|
c90f7a31bb | ||
|
|
c8c7d1566c | ||
|
|
073160dde4 | ||
|
|
56fe8c9d09 | ||
|
|
9a3532265f | ||
|
|
11f2f0ad75 | ||
|
|
4abe6f0d24 | ||
|
|
4ecf1845d4 | ||
|
|
9fbbd6b855 | ||
|
|
60b2c89c66 | ||
|
|
59b4b2bac9 | ||
|
|
5f546fca2a | ||
|
|
9d4218bf38 | ||
|
|
67f30c7765 | ||
|
|
1bf2b707ef | ||
|
|
f74b885253 | ||
|
|
3ab402adef | ||
|
|
52f24645fb | ||
|
|
4ac108174b | ||
|
|
6378b80d87 | ||
|
|
07d04d5701 | ||
|
|
3c373aac25 | ||
|
|
4e2254dfc7 | ||
|
|
a765de11ef | ||
|
|
658c8d6bd4 | ||
|
|
fe65dc60c4 | ||
|
|
e976c825c9 | ||
|
|
88b5a0af46 | ||
|
|
bf29faa5a7 | ||
|
|
2ada167557 | ||
|
|
a53551b462 | ||
|
|
f15349029f | ||
|
|
989ce6d707 | ||
|
|
018169b06a | ||
|
|
cc9d1f983e | ||
|
|
7275d6e897 | ||
|
|
0416a2ce7d | ||
|
|
dde95c8e01 | ||
|
|
349a0641cd | ||
|
|
304870f18c | ||
|
|
71e3cdb78d | ||
|
|
7260a0a00e | ||
|
|
5cfa398ea6 | ||
|
|
05375955d6 | ||
|
|
5fff45e302 | ||
|
|
a0ea54d0c0 | ||
|
|
de627171d5 | ||
|
|
57c48f2c4a | ||
|
|
e32691994c | ||
|
|
6f3c0fb174 | ||
|
|
6d641bbd06 | ||
|
|
3455aed3f5 | ||
|
|
76130bbf2c | ||
|
|
f84d12277d | ||
|
|
9bf5bc2ad9 | ||
|
|
90bce8d3d5 | ||
|
|
0ce4acc71b | ||
|
|
364b506220 | ||
|
|
33038f409a | ||
|
|
1b4297a9bf | ||
|
|
1bbea69139 | ||
|
|
f8cea9036c | ||
|
|
916dab2584 | ||
|
|
67d53126c3 | ||
|
|
d639ec5e70 | ||
|
|
c6b1d518cf | ||
|
|
27765606e3 | ||
|
|
708ffac47e | ||
|
|
aff83fae49 | ||
|
|
90d8f5f2cc | ||
|
|
4e3ddad8c1 | ||
|
|
c2cb3f5b7a | ||
|
|
75d2cabdbe | ||
|
|
778bed969d | ||
|
|
cff5fa6d7b | ||
|
|
c24b6e6b32 | ||
|
|
e7b4a512ca | ||
|
|
cabda4cc35 | ||
|
|
a5d4629f07 | ||
|
|
16166db31a | ||
|
|
37d9ef66ed | ||
|
|
b2213bff62 | ||
|
|
411d2192cb | ||
|
|
391bf296d7 | ||
|
|
bae9d6d9a0 | ||
|
|
43d6a882ce | ||
|
|
7f3b4100ab | ||
|
|
9f54ecce54 | ||
|
|
7af0f4a478 | ||
|
|
0f843db33d | ||
|
|
3e59648d5b | ||
|
|
5923991848 | ||
|
|
55a6ec9d0d | ||
|
|
78505589c8 | ||
|
|
ab854067eb | ||
|
|
0e985113ec | ||
|
|
8d9113d5c8 | ||
|
|
7ce81ad4bd | ||
|
|
ea56ec8daa | ||
|
|
9e9990dd6e | ||
|
|
b80805e09c | ||
|
|
d22ed099bb | ||
|
|
84c99d23cd | ||
|
|
bf5ee2f64b | ||
|
|
55d6d90fa6 | ||
|
|
6adc55a843 | ||
|
|
52c1fba17b | ||
|
|
5e15d4b219 | ||
|
|
00954f680b | ||
|
|
36a302f20f | ||
|
|
92d27fc242 | ||
|
|
f6bb27cdb0 | ||
|
|
558963cd74 | ||
|
|
9a592047a0 | ||
|
|
e6947a3246 | ||
|
|
5cd0897348 | ||
|
|
a973a50576 | ||
|
|
7121b46bf9 | ||
|
|
00f07ba6f0 | ||
|
|
0b5c0f27a5 | ||
|
|
f846bb221a | ||
|
|
4c1d3ceedf | ||
|
|
f674546df8 | ||
|
|
7910cf3055 | ||
|
|
ab1c8e63ee | ||
|
|
67bbe9c105 | ||
|
|
d8355ba3f5 | ||
|
|
afb8011347 | ||
|
|
4d01b60808 | ||
|
|
46f8d0d07d | ||
|
|
6d5a4531e1 | ||
|
|
d85a3cb08f | ||
|
|
b2af8587c2 | ||
|
|
409c0d7fb4 | ||
|
|
15beaa9be8 | ||
|
|
574057da88 | ||
|
|
c81b5338de | ||
|
|
c433ff5c3a | ||
|
|
ab2a0e93ed | ||
|
|
9274743df3 | ||
|
|
d139c4ed66 | ||
|
|
dd410a74ba | ||
|
|
a5797a0bde | ||
|
|
5c69ede19e | ||
|
|
a5257eb934 | ||
|
|
97be497fda | ||
|
|
317da29376 | ||
|
|
772b8c603c | ||
|
|
37d5f2da5d | ||
|
|
27c39cfdca | ||
|
|
30c4e565dd | ||
|
|
d66fe72cc9 | ||
|
|
684d4f890a | ||
|
|
10218305db | ||
|
|
31bae9b693 | ||
|
|
59ac56374e | ||
|
|
a397460e0e | ||
|
|
c3c23d28bb | ||
|
|
9f0b387ab6 | ||
|
|
3a97f20122 | ||
|
|
046a552f34 | ||
|
|
e8a534f0fe | ||
|
|
1f21ed7364 | ||
|
|
774a1b81c4 | ||
|
|
f566ea1ac3 | ||
|
|
108f91ea1a | ||
|
|
4a92511b9b | ||
|
|
e1e228eae2 | ||
|
|
dc5a846c10 | ||
|
|
364477f0e9 | ||
|
|
d2ca33e757 | ||
|
|
1ece31fa7a | ||
|
|
b27d2a6b62 | ||
|
|
475b6210e0 | ||
|
|
8bfd90e159 | ||
|
|
8d8a4e8ca6 | ||
|
|
06895510e0 | ||
|
|
83b06b6c50 | ||
|
|
42fc89a944 | ||
|
|
9a951c499b | ||
|
|
86b06db9ff | ||
|
|
4e67d7b765 | ||
|
|
d710b4a9e4 | ||
|
|
bd99f3f927 | ||
|
|
eeb1529b64 | ||
|
|
98c3707802 | ||
|
|
e4c52701b7 | ||
|
|
43e9dad17d | ||
|
|
a27fa50e42 | ||
|
|
3c9f46941c | ||
|
|
196e9be728 | ||
|
|
a00f6363d9 | ||
|
|
a65b0d693f | ||
|
|
736e897928 | ||
|
|
21f8bb39b5 | ||
|
|
cd87ecc2d9 | ||
|
|
a3ae14b3f5 | ||
|
|
6cf4458dcd | ||
|
|
59b8d195c1 | ||
|
|
7926a2b201 | ||
|
|
b59c962f60 | ||
|
|
b6aa459b98 | ||
|
|
0d5c898106 | ||
|
|
c9c92f82d3 | ||
|
|
53a9fab70b | ||
|
|
5182f13bdb | ||
|
|
804dfc9327 | ||
|
|
74e2d1dcc5 | ||
|
|
e5c8807f17 | ||
|
|
d57985b90a | ||
|
|
af9e34a8ae | ||
|
|
10a97a80de | ||
|
|
56fcb23275 | ||
|
|
abd2f831f2 | ||
|
|
9d7f48f52c | ||
|
|
dd1a5064e4 | ||
|
|
a3ca578b3d | ||
|
|
e37321eeff | ||
|
|
505c71b18c | ||
|
|
efde2e9601 | ||
|
|
8f34142599 | ||
|
|
6570cc1fd7 | ||
|
|
fed0afd426 | ||
|
|
2c2c6efc5e | ||
|
|
0419286557 | ||
|
|
08f6bee2e4 | ||
|
|
cfa4dd8b8a | ||
|
|
dba199b531 | ||
|
|
ab637ded26 | ||
|
|
4c072aa819 | ||
|
|
f693f9d17c | ||
|
|
193dd166c3 | ||
|
|
2f86a1b017 | ||
|
|
75ddbdf7c1 | ||
|
|
d824334538 | ||
|
|
13515b2522 | ||
|
|
0a46bf52dd | ||
|
|
ecfe648bf5 | ||
|
|
bddd7b5d65 | ||
|
|
2686aee158 | ||
|
|
b7a2198057 | ||
|
|
bf6b588675 | ||
|
|
b427788e04 | ||
|
|
e7e561a4ba | ||
|
|
d9972c0d32 | ||
|
|
6c03110442 | ||
|
|
f717fb462f | ||
|
|
640a7285e1 | ||
|
|
e9fc0629f5 | ||
|
|
6f0279d451 | ||
|
|
2d73f97a25 | ||
|
|
dcd6163198 | ||
|
|
9f68fe6b3b | ||
|
|
7c9f6d89d6 | ||
|
|
ea3d01d23b | ||
|
|
c4ffc7283d | ||
|
|
0fa663145d | ||
|
|
b49831cae8 | ||
|
|
c616e9d450 | ||
|
|
9b0607ca74 | ||
|
|
3d728fd884 | ||
|
|
431e0bb341 | ||
|
|
2b4aef5633 | ||
|
|
dca30dccf3 | ||
|
|
b9d4aefd5e | ||
|
|
69048f8f48 | ||
|
|
beb54c1bc5 | ||
|
|
1afc4c9a29 | ||
|
|
96b4210d21 | ||
|
|
85fcecdcf6 | ||
|
|
55dc2b26d2 | ||
|
|
9c7a85826b | ||
|
|
36fe0a0f3c | ||
|
|
c5e296d557 | ||
|
|
d1ca6eb988 | ||
|
|
be4db980ad | ||
|
|
0ef905c6f2 | ||
|
|
21f0b18af4 | ||
|
|
6a786df198 | ||
|
|
4e16220da1 | ||
|
|
5ce02d747c | ||
|
|
9c31b27339 | ||
|
|
aa52c32d40 | ||
|
|
02a97fb0e2 | ||
|
|
2107c0839f | ||
|
|
b277725cc3 | ||
|
|
aade60179d | ||
|
|
e029b09add | ||
|
|
47b9e6c086 | ||
|
|
2fa8fd1703 | ||
|
|
89ea4187fa | ||
|
|
4e6a2d5218 | ||
|
|
0e099b2752 | ||
|
|
273f00a9c4 | ||
|
|
e876b9e4ab | ||
|
|
d7f383b969 | ||
|
|
a22a8acf83 | ||
|
|
32de4aac6b | ||
|
|
5c7df11ff3 | ||
|
|
c83674fc41 | ||
|
|
dcd17bb34f | ||
|
|
ed1925b517 | ||
|
|
5d024b3a71 | ||
|
|
507b47e9ea | ||
|
|
e7d2d3502b | ||
|
|
54168c86b4 | ||
|
|
a8dd995195 | ||
|
|
f46a3c1f68 | ||
|
|
a83fe561b9 | ||
|
|
d40040efd8 | ||
|
|
ae56a4f2ed | ||
|
|
22b1f2822a | ||
|
|
1fd15e14d5 | ||
|
|
1ae02d8ed8 | ||
|
|
7cda22f807 | ||
|
|
68292b60af | ||
|
|
542590b470 | ||
|
|
eb460fdc0a | ||
|
|
65e76e951a | ||
|
|
43d69a5683 | ||
|
|
6c25a3b262 | ||
|
|
1f6c9e865b | ||
|
|
1abfbccb3e | ||
|
|
362d1c8bb0 | ||
|
|
25a61a56b7 | ||
|
|
afb210b0c2 | ||
|
|
c84146fcbd | ||
|
|
35decf476c | ||
|
|
0471f838b9 | ||
|
|
1c9d9d1ce5 | ||
|
|
379a99cb14 | ||
|
|
0d29a9ba32 | ||
|
|
ed44732eef | ||
|
|
6cfc4b0973 | ||
|
|
6296b87ea5 | ||
|
|
576a44838f | ||
|
|
c00e7a182c | ||
|
|
fd1b5daf9c | ||
|
|
c0b5f2f748 | ||
|
|
d391d1f09c | ||
|
|
a36ed55390 | ||
|
|
b0f317951b | ||
|
|
f65135be1e | ||
|
|
b8d86ba628 | ||
|
|
e9312dfbb3 | ||
|
|
b21900d006 | ||
|
|
11cfa670d6 | ||
|
|
a94fbeba14 | ||
|
|
e01b816ee8 | ||
|
|
52c90111cc | ||
|
|
012571d070 | ||
|
|
a2d10ae09d | ||
|
|
96bf45ceb0 | ||
|
|
c233902fe2 | ||
|
|
fd8de88abb | ||
|
|
0ec2c8c543 | ||
|
|
29738b6690 | ||
|
|
c5c29df6cc | ||
|
|
b217681ee5 | ||
|
|
7841a73fc0 | ||
|
|
0b1d0fbe4c | ||
|
|
2064008f9e | ||
|
|
19b9906c86 | ||
|
|
85807f5b8c | ||
|
|
a1950d179b | ||
|
|
2c3913a763 | ||
|
|
9111edf442 | ||
|
|
b1c47da3c3 | ||
|
|
67eb238876 | ||
|
|
66e400013a | ||
|
|
a139cc8d2e | ||
|
|
35ecbdefa8 | ||
|
|
3f95bfd82f | ||
|
|
d4929c8e22 | ||
|
|
194b74e390 | ||
|
|
ee70e43bfb | ||
|
|
fc4b191dea | ||
|
|
cad23ef1ad | ||
|
|
5f0b1ace51 | ||
|
|
b891d8baa5 | ||
|
|
5dbcf9ce70 | ||
|
|
f8d8d501ca | ||
|
|
7e6d670d82 | ||
|
|
0e10702fad | ||
|
|
0012e23bf6 | ||
|
|
f3a3bfcab6 | ||
|
|
d134509c90 | ||
|
|
4424c7d748 | ||
|
|
d436d8cb20 | ||
|
|
86c06e4756 | ||
|
|
c26db6cc40 | ||
|
|
3689c64b7b | ||
|
|
26ddd404c0 | ||
|
|
8548b93ddc | ||
|
|
bdc4782e9d | ||
|
|
0583990870 | ||
|
|
2801b9baf2 | ||
|
|
5dd07525dc | ||
|
|
2e33722674 | ||
|
|
b5e65cf072 | ||
|
|
5972764731 | ||
|
|
d7cb61e5fc | ||
|
|
38447e2217 | ||
|
|
9629345473 | ||
|
|
4d72b0047a | ||
|
|
2933a525c1 | ||
|
|
5694ba7325 | ||
|
|
bbec7de8de | ||
|
|
1d14e58d8f | ||
|
|
db2beeb51f | ||
|
|
e4f43cc820 | ||
|
|
8adc1c8bcc | ||
|
|
b991bbd9a5 | ||
|
|
fe195f4080 | ||
|
|
5bed848aae | ||
|
|
c69bb9ccaa | ||
|
|
4889299dd9 | ||
|
|
8f427344d0 | ||
|
|
0d6867799c | ||
|
|
5602c7091a | ||
|
|
f3b617d339 | ||
|
|
a4c5f9946f | ||
|
|
0be3505163 | ||
|
|
81f0b7a4bf | ||
|
|
6c550372a3 | ||
|
|
6a16fb7515 | ||
|
|
c86d6f4bf3 | ||
|
|
33b05e9df5 | ||
|
|
ac2a1147cc | ||
|
|
8d7fdb0254 | ||
|
|
0fd938e85c | ||
|
|
759aad047b | ||
|
|
db7f46a874 | ||
|
|
b57fe4839b | ||
|
|
335753be8c | ||
|
|
fd0262f708 | ||
|
|
a06d7bbfec | ||
|
|
16689f4d6e | ||
|
|
d1adc160ca | ||
|
|
0bd75716f2 | ||
|
|
a70ef78ead | ||
|
|
9782fe5459 | ||
|
|
5e509f7f19 | ||
|
|
3f257af006 | ||
|
|
7fac6062e5 | ||
|
|
7ba74143df | ||
|
|
c59b24ab4a | ||
|
|
c194e94b5c | ||
|
|
6d23f2b9fa | ||
|
|
0b70153da0 | ||
|
|
190d797d31 | ||
|
|
fb1c7f8e90 | ||
|
|
6428fccc48 | ||
|
|
044e29f557 | ||
|
|
e110e8fa57 | ||
|
|
d018ab18f8 | ||
|
|
f5cdb0a2fb | ||
|
|
dc22ac6b06 | ||
|
|
093e3d5c97 | ||
|
|
9bc9e57deb | ||
|
|
483d8f733f | ||
|
|
eb885bfea7 | ||
|
|
d405296a14 | ||
|
|
787e5d0ee4 | ||
|
|
be5aad7c33 | ||
|
|
b7940a5cce | ||
|
|
f9b3939d09 | ||
|
|
69b19562f4 | ||
|
|
9948060ed8 | ||
|
|
06ec020c1c | ||
|
|
01f2099c28 | ||
|
|
9cb5d0895d | ||
|
|
086b271480 | ||
|
|
6264006728 | ||
|
|
03b2d3d1a4 | ||
|
|
0007460428 | ||
|
|
ff38731077 | ||
|
|
8cc0462712 | ||
|
|
4162305ac6 | ||
|
|
8abb028f55 | ||
|
|
5399375bc1 | ||
|
|
48798a9cee | ||
|
|
3e8445304c | ||
|
|
b047b95505 | ||
|
|
3e48401a04 | ||
|
|
48f07eb3ca | ||
|
|
6508301526 | ||
|
|
db5339e4a5 | ||
|
|
4ed87b5c2b | ||
|
|
a8f472ca6c | ||
|
|
76b9c6781d | ||
|
|
856706bc1c | ||
|
|
d680c3aa2b | ||
|
|
d98bdb9745 | ||
|
|
0411befe8d | ||
|
|
138c80c97a | ||
|
|
97a88d1d0d | ||
|
|
a23d079001 | ||
|
|
90907d4276 | ||
|
|
f13f6ff0cc | ||
|
|
8bf18b0d37 | ||
|
|
a595daa9b4 | ||
|
|
4a283ebf5d | ||
|
|
e27e64414a | ||
|
|
c47ac926d2 | ||
|
|
f751df55b6 | ||
|
|
ecd6588ead | ||
|
|
e7c133586b | ||
|
|
d54747c4df | ||
|
|
7e141f73d3 | ||
|
|
d5ee6f9cc2 | ||
|
|
da3b329772 | ||
|
|
7f9dcc43ad | ||
|
|
274262262a | ||
|
|
a721c1d14d | ||
|
|
79c0f31ddc | ||
|
|
49d61342c2 | ||
|
|
b662fa5fd3 | ||
|
|
be0943f1ba | ||
|
|
41d40102f3 | ||
|
|
95e63f865c | ||
|
|
3094772150 | ||
|
|
f0afcdd1c5 | ||
|
|
70368525e0 | ||
|
|
715c9f77b8 | ||
|
|
3401afed94 | ||
|
|
21886e30a3 | ||
|
|
2ab2176795 | ||
|
|
464cfb9efc | ||
|
|
e3aa36cae0 | ||
|
|
0a232828c8 | ||
|
|
90b8788c93 | ||
|
|
c125130dcb | ||
|
|
1496045c40 | ||
|
|
e2dadcd208 | ||
|
|
164c11e10a | ||
|
|
df2f142f37 | ||
|
|
eb9c882fe9 | ||
|
|
c7bac03429 | ||
|
|
07d3b32279 | ||
|
|
245d0d3369 | ||
|
|
d3d04c5a77 | ||
|
|
f4cc311806 | ||
|
|
0687ef72ce | ||
|
|
ff58f7a102 | ||
|
|
c0ed296ba7 | ||
|
|
2692806d4f | ||
|
|
a59f6085fe | ||
|
|
2170d3e14a | ||
|
|
9180b9bd63 | ||
|
|
2b06de8ecb | ||
|
|
df46b8ebdd | ||
|
|
cce1c50495 | ||
|
|
263b04e67f | ||
|
|
070ac1e878 | ||
|
|
168fb00023 | ||
|
|
7c594bc4f9 | ||
|
|
3f99a2ce81 | ||
|
|
f5d81e4a93 | ||
|
|
b0f3fa0c46 | ||
|
|
6d89e95afa | ||
|
|
e574998897 | ||
|
|
765884b0dc | ||
|
|
fe8cf9bc83 | ||
|
|
4474a24ee2 | ||
|
|
f59e5a20ea | ||
|
|
c9fe633706 | ||
|
|
3ced1966f4 | ||
|
|
07bb0ddffd | ||
|
|
538223752b | ||
|
|
c9011fd6ed | ||
|
|
f0f9becc1f | ||
|
|
34c210a2a7 | ||
|
|
df8c58f5df | ||
|
|
7abd35d11b | ||
|
|
d2c97d0238 | ||
|
|
1d0ca15bcb | ||
|
|
0bb81b23e5 | ||
|
|
8862f050e8 | ||
|
|
e088b529f0 | ||
|
|
61349c7ca3 | ||
|
|
c75e1f9416 | ||
|
|
b3ae1b74ab | ||
|
|
bf4b8348d2 | ||
|
|
f45782aeef | ||
|
|
c2faff5a03 | ||
|
|
1cff18112b | ||
|
|
66e1e6ad8a | ||
|
|
195b99e588 | ||
|
|
d0d590ff89 | ||
|
|
0410c95447 | ||
|
|
60e36bb4b9 | ||
|
|
2f90112e4d | ||
|
|
774eb90bcc | ||
|
|
1def930147 | ||
|
|
30b8a406a5 | ||
|
|
093842274e | ||
|
|
63ff8dd4c4 | ||
|
|
6019489ef1 | ||
|
|
9ec876fc27 | ||
|
|
cac3df195e | ||
|
|
ae71517ceb | ||
|
|
9f462fe3d6 | ||
|
|
004bcc43c3 | ||
|
|
6d79288f33 | ||
|
|
fc79f92796 | ||
|
|
fd2f4187fa | ||
|
|
22228478ad | ||
|
|
8e569a9ccd | ||
|
|
d7b2964e4e | ||
|
|
2eb2c36d5b | ||
|
|
23b1e98a7a | ||
|
|
1d5b915717 | ||
|
|
eb281f3bc3 | ||
|
|
aeebc2a81a | ||
|
|
b2bebb7fa3 | ||
|
|
e32cce57fe | ||
|
|
22eed92c86 | ||
|
|
fa91e204f0 | ||
|
|
366edb7e90 | ||
|
|
ac6aa28680 | ||
|
|
f6f58642f5 | ||
|
|
9430135592 | ||
|
|
57eec98604 | ||
|
|
1561aa55b7 | ||
|
|
23506430b1 | ||
|
|
fa58635a22 | ||
|
|
35f4d23308 | ||
|
|
97e7e5b641 | ||
|
|
199b62d13f | ||
|
|
bb366e4117 | ||
|
|
178c854941 | ||
|
|
7f630f24d5 | ||
|
|
3483146c1a | ||
|
|
ca712781dc | ||
|
|
0ed56ca067 | ||
|
|
557e43e19c | ||
|
|
b0fc5a3618 | ||
|
|
b0f90cafb6 | ||
|
|
c0c57ba378 | ||
|
|
790568e1e0 | ||
|
|
a704ce215b | ||
|
|
0cc628a8e3 | ||
|
|
cf506a7b1e | ||
|
|
b9670f3f09 | ||
|
|
870c36e76b | ||
|
|
dfc3096587 | ||
|
|
b9c045382d | ||
|
|
6e599908cd | ||
|
|
c099eec7a7 | ||
|
|
0962e62e69 | ||
|
|
dcd6cfd74b | ||
|
|
b1be5a4ba4 | ||
|
|
5caab182b2 | ||
|
|
baaf941f25 | ||
|
|
2e5e7afb4d | ||
|
|
71f68da90b | ||
|
|
2c4626fd1a | ||
|
|
178638c006 | ||
|
|
981c97173e | ||
|
|
c11fd03362 | ||
|
|
49d5c46133 | ||
|
|
9fb00f6cbd | ||
|
|
e59bd51333 | ||
|
|
239eaa90e9 | ||
|
|
ec1422a136 | ||
|
|
d56d1bc2bd | ||
|
|
45eca862ac | ||
|
|
89e98056e6 | ||
|
|
9f738f4871 | ||
|
|
3533a3fd4b | ||
|
|
4e5bf94a15 | ||
|
|
ec4a04d63b | ||
|
|
5cf14aa886 | ||
|
|
7d3096c2e8 | ||
|
|
ef2f9630a9 | ||
|
|
4d3c73c78f | ||
|
|
9ee6a0a01a | ||
|
|
1e226f4515 | ||
|
|
ca8fe5bd19 | ||
|
|
e2497e1958 | ||
|
|
6d26ec2ab7 | ||
|
|
672acfe8fe | ||
|
|
95f09e9114 | ||
|
|
a3dd5a188b | ||
|
|
6a4db90897 | ||
|
|
c0192e9e00 | ||
|
|
d4e170037b | ||
|
|
449537ef77 | ||
|
|
82587a70be | ||
|
|
d16120f650 | ||
|
|
0326a01585 | ||
|
|
7aba7aefb9 | ||
|
|
0a18fcf732 | ||
|
|
d0ef9ca96c | ||
|
|
12d8c8447b | ||
|
|
905cd46942 | ||
|
|
e5ae400686 | ||
|
|
625ffe12ce | ||
|
|
0a4906c5ac | ||
|
|
c468d350f3 | ||
|
|
cb7a0f7669 | ||
|
|
68d97a5e97 | ||
|
|
d27071528f | ||
|
|
17772c3738 | ||
|
|
89814d1db2 | ||
|
|
29f9b226ab | ||
|
|
a5d5d42ba3 | ||
|
|
e08b731cb5 | ||
|
|
15441a46f7 | ||
|
|
a9a56bb1e9 | ||
|
|
e840be84eb | ||
|
|
0b40455e3c | ||
|
|
1b822fc8f8 | ||
|
|
368eded1fd | ||
|
|
d9ea5a95af | ||
|
|
d1a4cfd5df | ||
|
|
23502d4fab | ||
|
|
dbcacdddd6 | ||
|
|
772f35c6ba | ||
|
|
8b2ef4e832 | ||
|
|
4b22f939b5 | ||
|
|
6fedb4b108 | ||
|
|
7b46a15752 | ||
|
|
a7cc07fe15 | ||
|
|
e91f8e5ca4 | ||
|
|
905c69c384 | ||
|
|
c765c3c40a | ||
|
|
bf3d6275d4 | ||
|
|
9b823dbaa1 | ||
|
|
6fa0a7c102 | ||
|
|
7320dc448e | ||
|
|
ede9323224 | ||
|
|
3dcf72d679 | ||
|
|
dd2fd6421b | ||
|
|
3b99a14b47 | ||
|
|
1d3d067b44 | ||
|
|
398e3aa139 | ||
|
|
37b70861d1 | ||
|
|
d3ceed32c6 | ||
|
|
780890fbdd | ||
|
|
72aed76857 | ||
|
|
150d54eeda | ||
|
|
3690babf62 | ||
|
|
229882e8d8 | ||
|
|
1e184d36fc | ||
|
|
553a33aa42 | ||
|
|
68b26a1091 | ||
|
|
9ca7ff73f4 | ||
|
|
c56064d189 | ||
|
|
5c371a20d2 | ||
|
|
424495c636 | ||
|
|
9c7e98f1cb | ||
|
|
d42157c5f8 | ||
|
|
502851856b | ||
|
|
23edcf3aa7 | ||
|
|
90e933de00 | ||
|
|
8ce67a4726 | ||
|
|
bcfdf1e05c | ||
|
|
cb744799bd | ||
|
|
05e9d948ea | ||
|
|
a5d343268f | ||
|
|
90ebee25fe | ||
|
|
14372a6fce | ||
|
|
bbb4f8a01c | ||
|
|
3e8ed231a6 | ||
|
|
4c67b9d267 | ||
|
|
c16cf342cb | ||
|
|
d843f05922 | ||
|
|
44e9b4dff1 | ||
|
|
80306dadf7 | ||
|
|
9e061de9bd | ||
|
|
bda42ab347 | ||
|
|
b5b69878b8 | ||
|
|
6f17ddbbdf | ||
|
|
adba14f6e7 | ||
|
|
d0adf2dfc3 | ||
|
|
57e901be27 | ||
|
|
d38641e312 | ||
|
|
40a0f6a7e9 | ||
|
|
b6e1bb06f3 | ||
|
|
ef1347c7d5 | ||
|
|
bf5ab6b7dd | ||
|
|
fdbb93a5c5 | ||
|
|
b7e48633ab | ||
|
|
04dc1eb07b | ||
|
|
50b229090b | ||
|
|
ca19306b72 | ||
|
|
86dc002fa6 | ||
|
|
2d27a998c4 | ||
|
|
090e535466 | ||
|
|
c4d35181db | ||
|
|
66c0c14748 | ||
|
|
453fc209b8 | ||
|
|
0ac6ef4599 | ||
|
|
7f13c128f1 | ||
|
|
cffa493984 | ||
|
|
9030cdcc76 | ||
|
|
c3ef487a6f | ||
|
|
ac0eddf4c7 | ||
|
|
e373e797f4 | ||
|
|
382244035b | ||
|
|
b9c8c71274 | ||
|
|
cb60ddcc94 | ||
|
|
bd4ced9559 | ||
|
|
a04d2acb86 | ||
|
|
de2aabf00b | ||
|
|
685fc69e5d | ||
|
|
d1fa5f64c4 | ||
|
|
58a921b500 | ||
|
|
af8814468f | ||
|
|
c8a6e2f7cd | ||
|
|
2227c3ecf1 | ||
|
|
c7526bd0d9 | ||
|
|
791f69b509 | ||
|
|
f51d0f72c6 | ||
|
|
21eb95bb23 | ||
|
|
b57836c2af | ||
|
|
e80ee03365 | ||
|
|
5592b69dc0 | ||
|
|
fc1303affd | ||
|
|
96b2d88d39 | ||
|
|
474fc1fc57 | ||
|
|
3825e2fb38 | ||
|
|
c62c3c23f6 | ||
|
|
863aaf62ec | ||
|
|
293352ac3c | ||
|
|
b22375bd21 | ||
|
|
f9550c99bb | ||
|
|
df369c7149 | ||
|
|
b16194701c | ||
|
|
736e91224e | ||
|
|
9bc564dbf9 | ||
|
|
6d0ab0d4aa | ||
|
|
1fe742d9c7 | ||
|
|
b18ce08578 | ||
|
|
7ae34e0640 | ||
|
|
e9b5438a24 | ||
|
|
51be318edc | ||
|
|
ca79b0c4d8 | ||
|
|
dfe05cbfa8 | ||
|
|
e856c8ad6b | ||
|
|
9109ead81c | ||
|
|
746f8bc736 | ||
|
|
9c03b89ab5 | ||
|
|
5798e960a2 | ||
|
|
98730ce612 | ||
|
|
552faefa51 | ||
|
|
5aded99999 | ||
|
|
f780553773 | ||
|
|
2723d6a741 | ||
|
|
e5e22931a9 | ||
|
|
804716edb2 | ||
|
|
332a47475e | ||
|
|
132edce701 | ||
|
|
6ce0cf6209 | ||
|
|
868599a7fe | ||
|
|
21ea277aaf | ||
|
|
53bce69c6f | ||
|
|
20c68d675c | ||
|
|
dfc8fdf44f | ||
|
|
2c0badf67c | ||
|
|
4a26d7a89a | ||
|
|
5e72161ab0 | ||
|
|
16f57a1bce | ||
|
|
1cf3c18841 | ||
|
|
1dd9ff0daf | ||
|
|
e86e7f0bd8 | ||
|
|
011e93720e | ||
|
|
331381c94d | ||
|
|
478b23825c | ||
|
|
ff876afbb3 | ||
|
|
dd13c73415 | ||
|
|
e89ab9b92f | ||
|
|
4e59173d6c | ||
|
|
df28d7331b | ||
|
|
2d0a2f3024 | ||
|
|
781e145721 | ||
|
|
e984425e36 | ||
|
|
2eb58e3346 | ||
|
|
ab4039dbbd | ||
|
|
2c1702a20b | ||
|
|
72a5f35b0e | ||
|
|
076ae15abd | ||
|
|
fbc5f95340 | ||
|
|
ff3a25a5ec | ||
|
|
2dd5a95232 | ||
|
|
2a21bbf062 | ||
|
|
d9a80e5ef7 | ||
|
|
2cadee1599 | ||
|
|
6c26fde210 | ||
|
|
bc908b7fe9 | ||
|
|
26d468aa6f | ||
|
|
954397f028 | ||
|
|
80faa61c91 | ||
|
|
961ede66a9 | ||
|
|
0f7188a347 | ||
|
|
3e832f9526 | ||
|
|
392cfbdc4e | ||
|
|
0751aa5a0f | ||
|
|
e57846566e | ||
|
|
6c818e5c30 | ||
|
|
20f043abc6 | ||
|
|
416451eb0b | ||
|
|
3ab7a61a47 | ||
|
|
5571353464 | ||
|
|
95d85c7f5b | ||
|
|
d7e509979a | ||
|
|
91a5b2d4fc | ||
|
|
6fec8382b5 | ||
|
|
c36f259571 | ||
|
|
4eb076d115 | ||
|
|
5171a7b7b3 | ||
|
|
7427aa87ea | ||
|
|
85043e57db | ||
|
|
501bae585a | ||
|
|
b41c8acddd | ||
|
|
06bc1ebcd4 | ||
|
|
999827b3ec | ||
|
|
2c72f704d0 | ||
|
|
194de7b4e7 | ||
|
|
5beddbccb4 | ||
|
|
c03609142b | ||
|
|
38ea481177 | ||
|
|
dbf945dfe5 | ||
|
|
21065a3c95 | ||
|
|
79b5defb63 | ||
|
|
e2ae9b88c8 | ||
|
|
ca3abf9154 | ||
|
|
956b201757 | ||
|
|
b90dabeb2c | ||
|
|
2f1edfeeab | ||
|
|
fac320bfce | ||
|
|
6c2820f900 | ||
|
|
9a113e2993 | ||
|
|
89e0326435 | ||
|
|
f863c6d728 | ||
|
|
1a37273a9e | ||
|
|
d14b9e2ab5 | ||
|
|
5374f71732 | ||
|
|
d926e4165b | ||
|
|
8c88ae401b | ||
|
|
92a2053b42 | ||
|
|
e5015f348b | ||
|
|
6792002c19 | ||
|
|
9890f6aade | ||
|
|
536e66eed9 | ||
|
|
c53d451000 | ||
|
|
6e103480cc | ||
|
|
6a53c9fae4 | ||
|
|
28d65ac114 | ||
|
|
239577e9cf | ||
|
|
a8fb45adc6 | ||
|
|
9316016d24 | ||
|
|
8d815d40b6 | ||
|
|
33b5c370b1 | ||
|
|
cdf63840b0 | ||
|
|
cf14501311 | ||
|
|
187b4a6e4b | ||
|
|
4ab9056700 | ||
|
|
9a281dfa71 | ||
|
|
0b3f7d1fe3 | ||
|
|
a9d82de25c | ||
|
|
414d8bd383 | ||
|
|
903f3b99b3 | ||
|
|
eb8b4986d7 | ||
|
|
70602be54e | ||
|
|
dac71f597a | ||
|
|
f6747713a1 | ||
|
|
3a646ffe77 | ||
|
|
59ddf175ed | ||
|
|
6cc09969dd | ||
|
|
ccd8d5f871 | ||
|
|
1a813e52ce | ||
|
|
bd47ad2b8c | ||
|
|
afa765c4ba | ||
|
|
26db4a5e7a | ||
|
|
e90019cdd8 | ||
|
|
16b238124a | ||
|
|
df9edc36e0 | ||
|
|
4def45907b | ||
|
|
202e6e88d2 | ||
|
|
3b2473039f | ||
|
|
59d1ca3409 | ||
|
|
1d26303333 | ||
|
|
8f73489073 | ||
|
|
98a10a2f55 | ||
|
|
e48b94b858 | ||
|
|
ff08ca140c | ||
|
|
61a9feb8fd | ||
|
|
21fdf31518 | ||
|
|
3af9397689 | ||
|
|
fef756f508 | ||
|
|
131edf1293 | ||
|
|
39f1716ae2 | ||
|
|
6787b9b553 | ||
|
|
1c2491385f | ||
|
|
97baaf6797 | ||
|
|
4e88765a83 | ||
|
|
aac26f6720 | ||
|
|
3b3e75003f | ||
|
|
ab699aafdc | ||
|
|
98bdb8c526 | ||
|
|
c7b25e6632 | ||
|
|
94f742187e | ||
|
|
70ebe34f1f | ||
|
|
992cb6b310 | ||
|
|
917a9ee707 | ||
|
|
d577ac6d54 | ||
|
|
5b5f6ac0b9 | ||
|
|
2aecc6e0f2 | ||
|
|
695f3455e6 | ||
|
|
13e8a1a9f6 | ||
|
|
0ff29ba6af | ||
|
|
be508c99ea | ||
|
|
4b064f566a | ||
|
|
ba543448ae | ||
|
|
2a86a70386 | ||
|
|
f121f9b5a2 | ||
|
|
8ab83eaf41 | ||
|
|
262b170244 | ||
|
|
e21f35b880 | ||
|
|
24c8a1c501 | ||
|
|
cfe6e3c805 | ||
|
|
88b22f5490 | ||
|
|
4b7ee9abe1 | ||
|
|
d3b62daea0 | ||
|
|
35355b28c0 | ||
|
|
88c82a41ba | ||
|
|
910e960e4f | ||
|
|
d499619cf3 | ||
|
|
f489153ff3 | ||
|
|
9b79a07fa2 | ||
|
|
354e1ccdf4 | ||
|
|
6ce14a25d7 | ||
|
|
c701d92779 | ||
|
|
73e03ba901 | ||
|
|
d1911f0f96 | ||
|
|
1339077b57 | ||
|
|
cdc279b5da | ||
|
|
d003bfa7f1 | ||
|
|
95a7797ae9 | ||
|
|
343a82b89c | ||
|
|
09a5515121 | ||
|
|
cc23fb0f39 | ||
|
|
7edddd0566 | ||
|
|
ebafc4576f | ||
|
|
328fe4256e | ||
|
|
c240eb4a4e | ||
|
|
38d9d91945 | ||
|
|
4669598dd9 | ||
|
|
3ce3eff022 | ||
|
|
7daaf79fcc | ||
|
|
d68fa8ce95 | ||
|
|
d61ee51d79 | ||
|
|
a6f81006be | ||
|
|
5fa374259e | ||
|
|
9fd033b30e | ||
|
|
21d80905a2 | ||
|
|
e98ed3c74f | ||
|
|
ebe76821e4 | ||
|
|
3858e38a02 | ||
|
|
510c35e077 | ||
|
|
a8f680810f | ||
|
|
f1c3c8296f | ||
|
|
3a91b12f31 | ||
|
|
6c90ccfbaa | ||
|
|
ea0a249612 | ||
|
|
843894405e | ||
|
|
3aebccbb9d | ||
|
|
653a320e6c | ||
|
|
8fddbc3a32 | ||
|
|
6868e68145 | ||
|
|
ee6f28c06d | ||
|
|
fdb037da96 | ||
|
|
71a77fc576 | ||
|
|
57e7ad6903 | ||
|
|
290564fd2f | ||
|
|
b9207b5efb | ||
|
|
c58715d95b | ||
|
|
5c6a8b9966 | ||
|
|
44e43d9479 | ||
|
|
49cbbfc50c | ||
|
|
4f8e98f5d5 | ||
|
|
a028297da6 | ||
|
|
dd713a26db | ||
|
|
fad293fbbf | ||
|
|
5a1b94f45b | ||
|
|
e9e614aa52 | ||
|
|
344c68bf08 | ||
|
|
f06e59b362 | ||
|
|
8ca5849b14 | ||
|
|
ac44b36b59 | ||
|
|
01e6a1061c | ||
|
|
b2538075ee | ||
|
|
5c463c0866 | ||
|
|
423bbd95a6 | ||
|
|
7eb888d2e3 | ||
|
|
26f67b6798 | ||
|
|
4c0635be7c | ||
|
|
e6eed4be4e | ||
|
|
386cc779bf | ||
|
|
4d9ff395e9 | ||
|
|
08c6d58a50 | ||
|
|
3f53c5feba | ||
|
|
67b863f9db | ||
|
|
114a50ad4e | ||
|
|
298dbbf400 | ||
|
|
7628ebc9ca | ||
|
|
2c057aad58 | ||
|
|
50af6694d0 | ||
|
|
deb6dad7ad | ||
|
|
218f434e01 | ||
|
|
8a53c438e3 | ||
|
|
077f052112 | ||
|
|
3fe15a302c | ||
|
|
e7f57c9ddd | ||
|
|
dec83bbd21 | ||
|
|
2354746d4f | ||
|
|
d421b1ccb8 | ||
|
|
095e2bf581 | ||
|
|
25345a0522 | ||
|
|
e2b5201b5a | ||
|
|
5c80a382bf | ||
|
|
aa940683d6 | ||
|
|
5dbddb4beb | ||
|
|
b20613f5d7 | ||
|
|
00e019d6fe | ||
|
|
c2ce831bca | ||
|
|
21c1f13b28 | ||
|
|
e0079bb812 | ||
|
|
966d1d10f6 | ||
|
|
76936ad74f | ||
|
|
5b0c115b10 | ||
|
|
6fbb09eb6e | ||
|
|
d37fac0ff7 | ||
|
|
91d656ff60 | ||
|
|
cfe1307018 | ||
|
|
5139c3e44e | ||
|
|
843c65d52b | ||
|
|
627a52e3d1 | ||
|
|
e26f4262df | ||
|
|
1951cd6fa8 | ||
|
|
079a8e3ec1 | ||
|
|
e3093bdf3f | ||
|
|
b11d8d056a | ||
|
|
3a4015eced | ||
|
|
aeb5d40840 | ||
|
|
49c712a5b6 | ||
|
|
46817b846a | ||
|
|
8c75608eaf | ||
|
|
2720ed9ffb | ||
|
|
8487694b37 | ||
|
|
2fc392c084 | ||
|
|
ca630e94ae | ||
|
|
9cff50fa3b | ||
|
|
3d7a6b1ad3 | ||
|
|
f15fd40636 | ||
|
|
dde586e004 | ||
|
|
506c23ae89 | ||
|
|
054cf2f258 | ||
|
|
dc067a619b | ||
|
|
2a762fa4ab | ||
|
|
ccade6ae0e | ||
|
|
6971aed030 | ||
|
|
60e556b2a8 | ||
|
|
42fbbc5257 | ||
|
|
d01dedb79c | ||
|
|
1972b461e7 | ||
|
|
e957926a4d | ||
|
|
bac2c13da3 | ||
|
|
6ddb064c9e | ||
|
|
b90c26412a | ||
|
|
65c7ad2aac | ||
|
|
9b8b1b2532 | ||
|
|
126a2d3b7b | ||
|
|
60734f708e | ||
|
|
0621564be7 | ||
|
|
9e6c15a10d | ||
|
|
f1714db09e | ||
|
|
aba4bc2909 | ||
|
|
14a8e2f001 | ||
|
|
7603f8f12b | ||
|
|
e90e03e0cc | ||
|
|
059b13938e | ||
|
|
a4f2502fe6 | ||
|
|
7c1762d467 | ||
|
|
335671b46a | ||
|
|
19b8c16057 | ||
|
|
70b025da30 | ||
|
|
87dd858358 | ||
|
|
9fd73ca34d | ||
|
|
51f3edcd72 | ||
|
|
e7f626bd72 | ||
|
|
dea3aac222 | ||
|
|
17f94aabdf | ||
|
|
5d7281e470 | ||
|
|
96745525f1 | ||
|
|
f6d2b55f75 | ||
|
|
c49e32c4ac | ||
|
|
8d6e04ea77 | ||
|
|
d9e5acb52c | ||
|
|
6ec32b0ca3 | ||
|
|
4778bb82c3 | ||
|
|
36beb927f1 | ||
|
|
ee41b2b68d | ||
|
|
e20ff52f5b | ||
|
|
df05af98d2 | ||
|
|
a7d925a177 | ||
|
|
df124db84a | ||
|
|
29a4b4aadc | ||
|
|
4ef4a06a7e | ||
|
|
2682ea75ab | ||
|
|
b3a63a60e9 | ||
|
|
a54dfaf0c7 | ||
|
|
595538d6bb | ||
|
|
a5329e5bba | ||
|
|
37a79c4589 | ||
|
|
5ef1dccfc9 | ||
|
|
29515491a2 | ||
|
|
dd760f8210 | ||
|
|
6d28b8986d | ||
|
|
dd87e893ba | ||
|
|
b43f1ec920 | ||
|
|
6cb8d0a9d1 | ||
|
|
c3d20bb181 | ||
|
|
c0b685c77b | ||
|
|
2c4574d93b | ||
|
|
a4b1104abf | ||
|
|
4b767d4a57 | ||
|
|
127ce312ea | ||
|
|
2fde630971 | ||
|
|
5d461a72f6 | ||
|
|
2237e9f1b7 | ||
|
|
fce5ee7a16 | ||
|
|
8ccb9cd892 | ||
|
|
9b4fa132dc | ||
|
|
daf332a102 | ||
|
|
d1af44bcdc | ||
|
|
5a6d20f817 | ||
|
|
6b816def31 | ||
|
|
5fbcf588ed | ||
|
|
942b4512fe | ||
|
|
3778b27574 | ||
|
|
15b340db56 | ||
|
|
7f91e20d03 | ||
|
|
fc4e79c1f5 | ||
|
|
41b2a6d1d4 | ||
|
|
ce5da22180 | ||
|
|
05b2c3c42b | ||
|
|
e054f1222b | ||
|
|
56a6aa993e | ||
|
|
db75cd2f62 | ||
|
|
c57eb1b8de | ||
|
|
2dd732b924 | ||
|
|
f3986688f2 | ||
|
|
233a6e8b89 | ||
|
|
f1dbc6ab7d | ||
|
|
c127c0900e | ||
|
|
d1015956d1 | ||
|
|
726fce9fac | ||
|
|
fc01fa045e | ||
|
|
3578e01838 | ||
|
|
2681a85fa5 | ||
|
|
9a0716af44 | ||
|
|
dc642cfbe7 | ||
|
|
b98e831300 | ||
|
|
0d73824727 | ||
|
|
f068b56083 | ||
|
|
fa7a125727 | ||
|
|
110f73e622 | ||
|
|
bb0d118284 | ||
|
|
701ccadff3 | ||
|
|
bb23679683 | ||
|
|
34555504df | ||
|
|
1a0a5c652b | ||
|
|
d1f5220925 | ||
|
|
decd514b22 | ||
|
|
6cf7093293 | ||
|
|
17f11fa871 | ||
|
|
96812868a4 | ||
|
|
40c79158f7 | ||
|
|
f4f645b103 | ||
|
|
37395b70f6 | ||
|
|
a65cb3b03c | ||
|
|
054663ee00 | ||
|
|
779641e8e7 | ||
|
|
81eee814e9 | ||
|
|
390a3c0d5a | ||
|
|
695dd655c0 | ||
|
|
27a91de5f6 | ||
|
|
7ccc26c878 | ||
|
|
9ebc847e8e | ||
|
|
a5188ce24a | ||
|
|
511b04c1f8 | ||
|
|
ec90d35e02 | ||
|
|
05838cc477 | ||
|
|
c34ffedb42 | ||
|
|
96e02c9911 | ||
|
|
248fceb4b5 | ||
|
|
e26387a75a | ||
|
|
b5382b1bdf | ||
|
|
519cbc7601 | ||
|
|
c56d323cd3 | ||
|
|
92697d9468 | ||
|
|
d1ec9c92eb | ||
|
|
ac4cdb44de | ||
|
|
ab63bf9d74 | ||
|
|
39a96885d2 | ||
|
|
4f104523ff | ||
|
|
96dbec3218 | ||
|
|
4b29e7bf8d | ||
|
|
02153e469f | ||
|
|
957da460a6 | ||
|
|
c664c14afc | ||
|
|
8f9f447acf | ||
|
|
2cee36d7b5 | ||
|
|
454cf5ea64 | ||
|
|
60f128b314 | ||
|
|
cc0a89c924 | ||
|
|
4563533e67 | ||
|
|
ed69bd74ed | ||
|
|
8f974e8902 | ||
|
|
f0641ddd6d | ||
|
|
a91fe05395 | ||
|
|
640e719eda | ||
|
|
d9cdeb9773 | ||
|
|
0de033e428 | ||
|
|
aece2b1d90 | ||
|
|
6c2a2e4665 | ||
|
|
1ab9635039 | ||
|
|
43925e3088 | ||
|
|
5e929df966 | ||
|
|
1c236cce02 | ||
|
|
38e8f91fdf | ||
|
|
4956a517ca | ||
|
|
cb13655ecd | ||
|
|
9b3b6cec8f | ||
|
|
3ca1a1f1c7 | ||
|
|
a7210208d6 | ||
|
|
eaad23ff69 | ||
|
|
c7ddf0a2a9 | ||
|
|
455e0533fe | ||
|
|
e7fdbe13d0 | ||
|
|
a8c4fc7607 | ||
|
|
00477528cc | ||
|
|
b129ef873b | ||
|
|
4c6d645cc6 | ||
|
|
d927426d70 | ||
|
|
d9c7df736c | ||
|
|
a26bdfe385 | ||
|
|
9ced137ded | ||
|
|
73244df019 | ||
|
|
91d24ebae8 | ||
|
|
6861e26ed6 | ||
|
|
a89da50e0a | ||
|
|
9256046b6c | ||
|
|
fd95dd8023 | ||
|
|
cda2b84939 | ||
|
|
34242e12ea | ||
|
|
efc67d14a5 | ||
|
|
d893fe63e7 | ||
|
|
5aedf85982 | ||
|
|
55ab79c004 | ||
|
|
7c7a72600d | ||
|
|
bd67e41aa6 | ||
|
|
df63b8c1b7 | ||
|
|
01357654c0 | ||
|
|
cd5900481b | ||
|
|
601c6c53e7 | ||
|
|
b7ba740a3a | ||
|
|
ddef97d49f | ||
|
|
707d00b280 | ||
|
|
9c79d728e8 | ||
|
|
9c8a1f564e | ||
|
|
47b0449f22 | ||
|
|
0193460678 | ||
|
|
e02b3e78d2 | ||
|
|
a6167583a3 | ||
|
|
c91e0a6b74 | ||
|
|
c6852a9514 | ||
|
|
04b5240615 | ||
|
|
9183c4f04c | ||
|
|
483547cd9c | ||
|
|
345413cd1f | ||
|
|
f57dc6785b | ||
|
|
046a60b89c | ||
|
|
da725e3ab1 | ||
|
|
edd34941cc | ||
|
|
c65686ef42 | ||
|
|
c7729f85df | ||
|
|
97126553f0 | ||
|
|
53b187c9b6 | ||
|
|
7bc18e41b1 | ||
|
|
8bc17eded5 | ||
|
|
9adeb1c63a | ||
|
|
091ed0dacd | ||
|
|
4014083238 | ||
|
|
da03e11071 | ||
|
|
ba6224bc78 | ||
|
|
f69016883c | ||
|
|
1e68eb0b90 | ||
|
|
332efd4106 | ||
|
|
cf0a47cab7 | ||
|
|
bb7b24346a | ||
|
|
f303191c54 | ||
|
|
a68e2e798b | ||
|
|
bd49f3c420 | ||
|
|
3c1d67267d | ||
|
|
d6c7f16ceb | ||
|
|
61e1933a5b | ||
|
|
f1912fe739 | ||
|
|
25c443098c | ||
|
|
cf59bcff12 | ||
|
|
c10baca137 | ||
|
|
2f7fe05d21 | ||
|
|
ee4b61f549 | ||
|
|
352c6e1d68 | ||
|
|
0e2444d7ce | ||
|
|
c4390819a2 | ||
|
|
51104268d8 | ||
|
|
cb5d43ab21 | ||
|
|
08de5cd377 | ||
|
|
274fa63658 | ||
|
|
81b2ed6551 | ||
|
|
d9c6c3947b | ||
|
|
2d6dbbdb16 | ||
|
|
b60faa1cab | ||
|
|
fd19953864 | ||
|
|
927bafd93a | ||
|
|
60e403a28b | ||
|
|
d93b21f0af | ||
|
|
511a4256bc | ||
|
|
3c9db86df2 | ||
|
|
367204a1ee | ||
|
|
6a8f6fa05a | ||
|
|
7f997c9411 | ||
|
|
2e3f98deb0 | ||
|
|
a5feb656e0 | ||
|
|
9329955328 | ||
|
|
5b99dd2685 | ||
|
|
19288fc8f5 | ||
|
|
9f97de5952 | ||
|
|
c476f7339c | ||
|
|
3dc1cf520a | ||
|
|
616c335a3b | ||
|
|
bbe55a75ea | ||
|
|
e58bf3a8cf | ||
|
|
1f2f866c61 | ||
|
|
6ccbc95697 | ||
|
|
52d9e0a195 | ||
|
|
6a3982347b | ||
|
|
fe7feeb74e | ||
|
|
6495f741b9 | ||
|
|
b2419beca6 | ||
|
|
b752b475d9 | ||
|
|
658fe79ad7 | ||
|
|
5bbf05ac8a | ||
|
|
d3210f0d3d | ||
|
|
92a08cebad | ||
|
|
1dba4be23f | ||
|
|
a0dce925d4 | ||
|
|
738c819272 | ||
|
|
d542cf7720 | ||
|
|
ed39127f31 |
@@ -1,5 +1,6 @@
|
||||
documents/
|
||||
vendor/
|
||||
public/vendor
|
||||
|
||||
/nbproject/
|
||||
.vscode
|
||||
|
||||
@@ -23,6 +23,15 @@ Events::on('loadRenderers', function ($renderers) {
|
||||
);
|
||||
});
|
||||
|
||||
Events::on('loadRenderers', function ($renderers) {
|
||||
$fhc_core_renderers =& $renderers();
|
||||
$fhc_core_renderers["slot_room"] = array(
|
||||
'modalTitle' => APP_ROOT.'public/js/components/Cis/Renderer/Slot/roomModalTitle.js',
|
||||
'modalContent' => APP_ROOT.'public/js/components/Cis/Renderer/Slot/roomModalContent.js',
|
||||
'calendarEventStyles' => APP_ROOT.'public/css/Cis4/CoreCalendarEvents.css'
|
||||
);
|
||||
});
|
||||
|
||||
Events::on('loadRenderers', function ($renderers) {
|
||||
$fhc_core_renderers =& $renderers();
|
||||
$fhc_core_renderers["ferien"] = array(
|
||||
|
||||
@@ -29,7 +29,7 @@ $config['ALLOWED_NOTEN_ABGABETOOL'] = [10, 14]; // tbl_note pk
|
||||
// benotete projektarbeiten sperren weitere terminanlage & bearbeitung, diese noten sind ausnahmen dieser Regel
|
||||
// wie zB "Nicht beurteilt" & "Noch nicht eingetragen"
|
||||
$config['NONFINAL_NOTEN_ABGABETOOL'] = [9];
|
||||
$config['beurteilung_link_fallback'] = 'addons/fhtw/content/projektbeurteilung/projektbeurteilungDocumentExport.php?projektarbeit_id=?&betreuerart_kurzbz=?&person_id=?';
|
||||
$config['beurteilung_link_fallback'] = 'cis/private/lehre/projektbeurteilungDocumentExport.php?projektarbeit_id=?&betreuerart_kurzbz=?&person_id=?';
|
||||
|
||||
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ERSTBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ZWEITBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
|
||||
@@ -38,8 +38,19 @@ $config['SIGNATUR_CHECK_PAABGABETYPEN'] = ['end'];
|
||||
|
||||
// to be used as "https://moodle.technikum-wien.at/course/view.php?idnumber=dl{$stg_kz}" for stg specific moodle routing
|
||||
$config['STG_MOODLE_LINK'] = 'https://moodle.technikum-wien.at/course/view.php?idnumber=dl';
|
||||
// TODO: check if these links change if the file changes and how to better retrieve the link?
|
||||
$config['SIGNATUR_INFO_LINK_GERMAN'] = 'https://cis.technikum-wien.at/cms/dms.php?id=214779';
|
||||
$config['SIGNATUR_INFO_LINK_ENGLISH'] = 'https://cis.technikum-wien.at/cms/dms.php?id=264256';
|
||||
|
||||
$config['ASSISTENZ_SAMMELMAIL_BUTTON_STUDENT'] = true;
|
||||
$config['ASSISTENZ_SAMMELMAIL_BUTTON_BETREUER'] = true;
|
||||
|
||||
$config['BETREUER_SAMMELMAIL_BUTTON_STUDENT'] = true;
|
||||
|
||||
$config['MULTIEDIT_TABLE'] = true;
|
||||
|
||||
$config['STUDENT_EDIT_PROJEKTARBEIT_TITLE'] = true;
|
||||
|
||||
$config['CONFETTI_ON_ENDUPLOAD'] = true;
|
||||
|
||||
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['infocenter_studiengang_kz'] = '10021, 10027, 10002';
|
||||
$config['infocenter_qualifikationskurs_kz'] = '10002';
|
||||
|
||||
@@ -8,4 +8,15 @@ $config['lvverwaltung_tags'] = [
|
||||
];
|
||||
*/
|
||||
|
||||
$config['lvverwaltung_tags'] = [];
|
||||
$config['lvverwaltung_tags'] = [];
|
||||
|
||||
# Additional columns:
|
||||
/*
|
||||
$config["list_columns"] = [
|
||||
'fieldname' => [
|
||||
'js' => 'path/to/snippet.js', // tabulator config snippet (eg: return { name: 'Name', field: 'fieldname' }; )
|
||||
// NOTE: 'default' & 'joins' like in stv.php config are currently not available here
|
||||
]
|
||||
];
|
||||
*/
|
||||
|
||||
|
||||
@@ -170,6 +170,13 @@ $config['navigation_header'] = array(
|
||||
'expand' => true,
|
||||
'sort' => 51,
|
||||
'requiredPermissions' => 'vertrag/mitarbeiter:r'
|
||||
),
|
||||
'studierendenverwaltung' => array(
|
||||
'link' => site_url('studentenverwaltung'),
|
||||
'description' => 'Studierendenverwaltung',
|
||||
'expand' => true,
|
||||
'sort' => 52,
|
||||
'requiredPermissions' => ['admin:r', 'assistenz:r']
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -208,7 +215,14 @@ $config['navigation_header'] = array(
|
||||
'expand' => true,
|
||||
'sort' => 30,
|
||||
'requiredPermissions' => 'lehre/anrechnungszeitfenster:rw'
|
||||
)
|
||||
),
|
||||
'dashboardadmin' => array(
|
||||
'link' => site_url('dashboard/Admin'),
|
||||
'description' => 'Dashboard Admin',
|
||||
'expand' => true,
|
||||
'sort' => 40,
|
||||
'requiredPermissions' => 'dashboard/admin:r'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -371,7 +385,7 @@ $config['navigation_menu']['apps'] = [
|
||||
],
|
||||
'lav' => [
|
||||
'link' => site_url('lehre/lehrauftrag/Lehrauftrag/Dashboard'),
|
||||
'description' => 'Lehraufträge',
|
||||
'description' => 'Lehrauftragsverwaltung',
|
||||
#'icon' => 'person-chalkboard',
|
||||
'requiredPermissions' => array('lehre/lehrauftrag_bestellen:r', 'lehre/lehrauftrag_erteilen:r')
|
||||
]
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// Noten die keinen Prüfungsantritt verbrauchen. Fallback-PKs; massgeblich sind die per Bezeichnung
|
||||
// aufgelösten Noten (NOTEN_OHNE_ANTRITT_BEZEICHNUNGEN), da die PKs je Installation abweichen.
|
||||
$config['NOTEN_OHNE_ANTRITT'] = [9, 17]; // tbl_note pk
|
||||
|
||||
// 'Nicht beurteilt' ist eine Altlast: formal eine Note, inhaltlich keine Leistungsfeststellung.
|
||||
// Wird weiterhin häufig vergeben und darf daher keinen Antritt kosten.
|
||||
$config['NOTEN_OHNE_ANTRITT_BEZEICHNUNGEN'] = ['Noch nicht eingetragen', 'entschuldigt', 'Nicht beurteilt'];
|
||||
|
||||
// Anrechnungsnoten: die Leistung wurde vorab anerkannt, der/die Studierende ist zwar Teil der
|
||||
// Lehrveranstaltung, tritt aber zu keiner Prüfung an. Solange die ZEUGNISNOTE eine davon ist, sind
|
||||
// für diese Lehrveranstaltung keine Prüfungen möglich. Auflösung wie oben über die Bezeichnung,
|
||||
// die PKs sind nur Fallback.
|
||||
$config['NOTEN_ANRECHNUNG_BEZEICHNUNGEN'] = ['angerechnet', 'intern angerechnet'];
|
||||
$config['NOTEN_ANRECHNUNG'] = [6, 16]; // tbl_note pk
|
||||
|
||||
$config['NOTEN_OCCURANCE_LIMIT_MAP'] = [17 => 1]; // über alle Antritte hinweg nur ein entschuldigt
|
||||
|
||||
// tbl_note pk of the 'entschuldigt' note. An entschuldigt Termin is preserved as its own dated
|
||||
// entry when a new pruefung of the same type is created (instead of being overwritten).
|
||||
$config['NOTE_ENTSCHULDIGT'] = 17;
|
||||
|
||||
// The maximum number of attempts that count, the first attempt and the kommissionelle attempt
|
||||
// included. null derives the number from the old flags:
|
||||
// 1 (the original assessment) + TERMIN2 + TERMIN3 + KOMMPRUEF
|
||||
// The examination rules permit three attempts. With TERMIN2 and KOMMPRUEF the formula gives 3.
|
||||
// An installation with TERMIN3 gets 4, which is one more attempt in the same chain.
|
||||
$config['CIS_GESAMTNOTE_MAX_ANTRITTE'] = null;
|
||||
|
||||
// The exam types that take place before a commission.
|
||||
$config['PRUEFUNG_KOMMISSIONELL_TYPEN'] = ['kommPruef', 'zusKommPruef'];
|
||||
|
||||
// The type that the tool writes for the last attempt. The last attempt is always kommissionell.
|
||||
$config['PRUEFUNG_TYP_KOMMISSIONELL'] = 'kommPruef';
|
||||
|
||||
// Exam types that never use an attempt. A zusKommPruef repeats a kommissionelle Prüfung that had
|
||||
// a procedural fault. It stands outside the attempt chain, and the student administration enters
|
||||
// it. The examination rules do not describe it.
|
||||
$config['PRUEFUNG_TYPEN_OHNE_ANTRITT'] = ['zusKommPruef'];
|
||||
|
||||
// Spaltenaufteilung der Prüfungen in der Notentabelle:
|
||||
// 'antritt' - eine Spalte je Antrittsnummer, Datum steht in der Zelle (robust bei Einzelterminen)
|
||||
// 'datum' - eine Spalte je Prüfungsdatum (kompakt, wenn ganze Jahrgänge am selben Tag antreten)
|
||||
// Nur die Vorgabe; im Tool umschaltbar und pro Benutzer gespeichert.
|
||||
$config['CIS_GESAMTNOTE_PRUEFUNGSSPALTEN'] = 'antritt';
|
||||
|
||||
// Bei der Notenübernahme durch die Assistenz den ersten Antritt als eigene Prüfung anlegen.
|
||||
$config['CIS_GESAMTNOTE_ERSTANTRITT_BEI_UEBERNAHME'] = true;
|
||||
|
||||
// availability of the two Benotungstool import flows. When both are true they are shown as
|
||||
// separate buttons/dialogs.
|
||||
$config['CIS_GESAMTNOTE_PRUEFUNGSIMPORT'] = true; // dated import that creates a pruefung per row
|
||||
$config['CIS_GESAMTNOTE_NOTENIMPORT'] = false; // classic note-only import (uid + note, no date)
|
||||
|
||||
// Noteneintragungsfrist (Prüfungsordnung §1): grade/pruefung entry is only permitted up to this
|
||||
// deadline. The month/day below is applied to the studiensemester's year:
|
||||
// Sommersemester (SSyyyy) -> deadline in the SAME calendar year (default 15th November)
|
||||
// Wintersemester (WSyyyy) -> deadline in the FOLLOWING calendar year (default 15th May)
|
||||
$config['CIS_GESAMTNOTE_NOTENEINTRAGUNGSFRIST'] = false; // switch to use the window enforcement
|
||||
$config['NOTENEINTRAGUNGSFRIST_SS'] = ['month' => 11, 'day' => 15]; // Sommersemester deadline (same year)
|
||||
$config['NOTENEINTRAGUNGSFRIST_WS'] = ['month' => 5, 'day' => 15]; // Wintersemester deadline (following year)
|
||||
@@ -61,9 +61,29 @@ $route['api/v1/organisation/[O|o]rganisationseinheit/(:any)'] = 'api/v1/organisa
|
||||
$route['api/v1/ressource/[B|b]etriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1';
|
||||
$route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
|
||||
|
||||
// Legacy CMS news routes
|
||||
$route['api/frontend/v1/Cms/getNewsItem/(:num)'] = 'api/frontend/v1/NewsAdministrationAPI/getNewsItem/$1';
|
||||
$route['api/frontend/v1/Cms/storeNewsItem'] = 'api/frontend/v1/NewsAdministrationAPI/storeNewsItem';
|
||||
$route['api/frontend/v1/Cms/updateNewsItem/(:num)'] = 'api/frontend/v1/NewsAdministrationAPI/updateNewsItem/$1';
|
||||
$route['api/frontend/v1/Cms/deleteNewsItem/(:num)'] = 'api/frontend/v1/NewsAdministrationAPI/deleteNewsItem/$1';
|
||||
|
||||
// Keep legacy uppercase URLs refreshable while using the canonical controller method casing
|
||||
$route['CisVue/Cms/NewsAdministration'] = 'CisVue/Cms/newsAdministration';
|
||||
|
||||
$route['Cis/LvPlan/.*'] = 'Cis/LvPlan/index/$1';
|
||||
$route['Cis/MyLvPlan/.*'] = 'Cis/MyLvPlan/index/$1';
|
||||
$route['Cis/MyLv/.*'] = 'Cis/MyLv/index/$1';
|
||||
$route['Cis/OtherLvPlan/.*'] = 'Cis/OtherLvPlan/index/$1';
|
||||
//Route for LV Plan Stg/Semester/Verband/Gruppe
|
||||
$route['Cis/StgOrgLvPlan/.*'] = 'Cis/StgOrgLvPlan/index/$1';
|
||||
$route['Cis/Benotungstool/.*'] = 'Cis/Benotungstool/index/$1';
|
||||
|
||||
$route['Cis/MyReservation'] = 'Cis/MyReservation/index/$1';
|
||||
|
||||
//Route for Zeitsperrenma
|
||||
$route['Cis/Zeitsperrenma/.*'] = 'Cis/Zeitsperrenma/index/$1';
|
||||
//Route für Zeitsperren
|
||||
$route['Cis/Zeitsperren/.*'] = 'Cis/Zeitsperren/index/$1';
|
||||
|
||||
$route['Abgabetool/Assistenz'] = 'Cis/Abgabetool/Assistenz';
|
||||
$route['Abgabetool/Assistenz/(:any)'] = 'Cis/Abgabetool/Assistenz/$1';
|
||||
@@ -72,52 +92,73 @@ $route['Abgabetool/Student'] = 'Cis/Abgabetool/Student';
|
||||
$route['Abgabetool/Student/(:any)'] = 'Cis/Abgabetool/Student/$1';
|
||||
$route['Abgabetool/Deadlines'] = 'Cis/Abgabetool/Deadlines';
|
||||
|
||||
// Studierendenverwaltung App Routes
|
||||
$route['studvw'] = 'studentenverwaltung/index';
|
||||
$route['studvw/.*'] = 'studentenverwaltung/index';
|
||||
// Old routes
|
||||
$route['studentenverwaltung'] = 'redirect/301/studvw';
|
||||
$route['studentenverwaltung/(:any)'] = 'redirect/301/studvw/stdsem/$1';
|
||||
$route['studentenverwaltung/(:any)/(prestudent|student|person|search)/(:any)'] = 'redirect/301/studvw/stdsem/$1/$2/$3';
|
||||
$route['studentenverwaltung/(:any)/prestudent/(:any)/tab/:any'] = 'redirect/301/studvw/stdsem/$1/prestudent/$2';
|
||||
$route['studentenverwaltung/(:any)/search/(:any)/(:any)'] = 'redirect/301/studvw/stdsem/$1/search/$2/$3';
|
||||
$route['studentenverwaltung/(:any)/(:any)'] = 'redirect/301/studvw/stdsem/$1/stg/$2';
|
||||
|
||||
// Studierendenverwaltung List Routes
|
||||
$route['api/frontend/v1/stv/[sS]tudents/inout'] = 'api/frontend/v1/stv/Students/index';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})'] = 'api/frontend/v1/stv/Students/index';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/inout/1/incoming/1'] = 'api/frontend/v1/stv/students/getIncoming/$1';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/inout/1/outgoing/1'] = 'api/frontend/v1/stv/students/getOutgoing/$1';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/inout/1/shared_studies/1'] = 'api/frontend/v1/stv/students/getGemeinsamestudien/$1';
|
||||
|
||||
// (studiensemester_kurzbz)/inout[/(incoming|outgoing|gemeinsamestudien)]
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/inout'] = 'api/frontend/v1/stv/Students/index';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/inout/incoming'] = 'api/frontend/v1/stv/Students/getIncoming/$1';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/inout/outgoing'] = 'api/frontend/v1/stv/Students/getOutgoing/$1';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/inout/gemeinsamestudien'] = 'api/frontend/v1/stv/Students/getGemeinsamestudien/$1';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/prestudent/1/stdsem/(:any)/:any/1/:any/1/(:any)/1'] = 'api/frontend/v1/stv/students/getPrestudents/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/prestudent/1/stdsem/(:any)/:any/1/(:any)/1'] = 'api/frontend/v1/stv/students/getPrestudents/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/prestudent/1/stdsem/(:any)/(:any)/1'] = 'api/frontend/v1/stv/students/getPrestudents/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/prestudent/1/stdsem/(:any)'] = 'api/frontend/v1/stv/students/getPrestudents/$1/$2';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/prestudent/1'] = 'api/frontend/v1/stv/students/getPrestudents/$1';
|
||||
|
||||
// (studiengang_kz)/prestudent[/(studiensemester_kurzbz)[/(filter)[/(otherfilter)]]]
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/prestudent'] = 'api/frontend/v1/stv/Students/getPrestudents/$1';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/prestudent/([WS]S[0-9]{4})'] = 'api/frontend/v1/stv/Students/getPrestudents/$1/$2';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/prestudent/([WS]S[0-9]{4})/(:any)'] = 'api/frontend/v1/stv/Students/getPrestudents/$1/$2/$3';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/prestudent/([WS]S[0-9]{4})/(:any)/(:any)'] = 'api/frontend/v1/stv/Students/getPrestudents/$1/$2/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/orgform/(:any)/prestudent/1/stdsem/(:any)/:any/1/:any/1/(:any)/1'] = 'api/frontend/v1/stv/students/getPrestudentsOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/orgform/(:any)/prestudent/1/stdsem/(:any)/:any/1/(:any)/1'] = 'api/frontend/v1/stv/students/getPrestudentsOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/orgform/(:any)/prestudent/1/stdsem/(:any)/(:any)/1'] = 'api/frontend/v1/stv/students/getPrestudentsOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/orgform/(:any)/prestudent/1/stdsem/(:any)'] = 'api/frontend/v1/stv/students/getPrestudentsOrgform/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/:any/stg/(:any)/orgform/(:any)/prestudent/1'] = 'api/frontend/v1/stv/students/getPrestudentsOrgform/$1/$2';
|
||||
|
||||
// (studiengang_kz)/(orgform)/prestudent[/(studiensemester_kurzbz)[/(filter)[/(otherfilter)]]]
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/([A-Z]{2,3})/prestudent'] = 'api/frontend/v1/stv/Students/getPrestudentsOrgform/$1/$2';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/([A-Z]{2,3})/prestudent/([WS]S[0-9]{4})'] = 'api/frontend/v1/stv/Students/getPrestudentsOrgform/$1/$2/$3';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/([A-Z]{2,3})/prestudent/([WS]S[0-9]{4})/(:any)'] = 'api/frontend/v1/stv/Students/getPrestudentsOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/(-?[0-9]+)/([A-Z]{2,3})/prestudent/([WS]S[0-9]{4})/(:any)/(:any)'] = 'api/frontend/v1/stv/Students/getPrestudentsOrgform/$1/$2/$3/$5';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/semester/(:any)/verband/(:any)/group/(:any)'] = 'api/frontend/v1/stv/students/getStudents/$1/$2/$3/$4/$5';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/semester/(:any)/verband/(:any)'] = 'api/frontend/v1/stv/students/getStudents/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/semester/(:any)'] = 'api/frontend/v1/stv/students/getStudents/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)'] = 'api/frontend/v1/stv/students/getStudents/$1/$2';
|
||||
|
||||
// (studiensemester_kurzbz)/(studiengang_kz)/(semester)/grp/(gruppe)
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/(:num)/grp/(:any)'] = 'api/frontend/v1/stv/Students/getStudentsSpezialgruppe/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/orgform/(:any)/semester/(:any)/verband/(:any)/group/(:any)'] = 'api/frontend/v1/stv/students/getStudentsOrgform/$1/$2/$3/$4/$5/$6';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/orgform/(:any)/semester/(:any)/verband/(:any)'] = 'api/frontend/v1/stv/students/getStudentsOrgform/$1/$2/$3/$4/$5';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/orgform/(:any)/semester/(:any)'] = 'api/frontend/v1/stv/students/getStudentsOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/orgform/(:any)'] = 'api/frontend/v1/stv/students/getStudentsOrgform/$1/$2/$3';
|
||||
|
||||
// (studiensemester_kurzbz)/(studiengang_kz)[/(semester)[/(verband)[/(gruppe)]]]
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)'] = 'api/frontend/v1/stv/Students/getStudents/$1/$2';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/(:num)'] = 'api/frontend/v1/stv/Students/getStudents/$1/$2/$3';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/(:num)/(:any)'] = 'api/frontend/v1/stv/Students/getStudents/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/(:num)/(:any)/(:any)'] = 'api/frontend/v1/stv/Students/getStudents/$1/$2/$3/$4/$5';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/semester/(:any)/group/(:any)'] = 'api/frontend/v1/stv/students/getStudentsSpezialgruppe/$1/$2/$3/$4';
|
||||
|
||||
// (studiensemester_kurzbz)/(studiengang_kz)/(orgform)/(semester)/grp/(gruppe)
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/([A-Z]{2,3})/(:num)/grp/(:any)'] = 'api/frontend/v1/stv/Students/getStudentsOrgformSpezialgruppe/$1/$2/$3/$4/$5';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/stg/(:any)/orgform/(:any)/semester/(:any)/group/(:any)'] = 'api/frontend/v1/stv/students/getStudentsOrgformSpezialgruppe/$1/$3/$2/$4/$5';
|
||||
|
||||
// (studiensemester_kurzbz)/(studiengang_kz)/(orgform)[/(semester)[/(verband)[/(gruppe)]]]
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/([A-Z]{2,3})'] = 'api/frontend/v1/stv/Students/getStudentsOrgform/$1/$2/$3';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/([A-Z]{2,3})/(:num)'] = 'api/frontend/v1/stv/Students/getStudentsOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/([A-Z]{2,3})/(:num)/(:any)'] = 'api/frontend/v1/stv/Students/getStudentsOrgform/$1/$2/$3/$4/$5';
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/(-?[0-9]+)/([A-Z]{2,3})/(:num)/(:any)/(:any)'] = 'api/frontend/v1/stv/Students/getStudentsOrgform/$1/$2/$3/$4/$5/$6';
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/prestudent/(:any)'] = 'api/frontend/v1/stv/students/getPrestudent/$1/$2';
|
||||
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/student/(:any)'] = 'api/frontend/v1/stv/students/getStudent/$1/$2';
|
||||
|
||||
$route['api/frontend/v1/treemenudata/stv/stdsem/(:any)/person/(:any)'] = 'api/frontend/v1/stv/students/getPerson/$1/$2';
|
||||
|
||||
$route['api/frontend/v1/treemenudata/stv/.*'] = 'api/frontend/v1/stv/students/index';
|
||||
|
||||
// Lvverwaltung List Routes
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByStg/$1/$2';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)/semester/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByStg/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)/semester/(:any)/.*'] = 'api/frontend/v1/Lehrveranstaltung/getByStg/$1/$2/$3';
|
||||
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)/orgform/(:any)/semester/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByStgOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)/orgform/(:any)/semester/(:any)/.*'] = 'api/frontend/v1/Lehrveranstaltung/getByStgOrgform/$1/$2/$3/$4';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)/orgform/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByStgOrgform/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/stg/(:any)/orgform/(:any)/.*'] = 'api/frontend/v1/Lehrveranstaltung/getByStgOrgform/$1/$2/$3';
|
||||
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/emp/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByEmp/$1/$2';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/emp/(:any)/stg/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByEmp/$1/$2/$3';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/emp/(:any)/stg/(:any)/.*'] = 'api/frontend/v1/Lehrveranstaltung/getByEmp/$1/$2/$3';
|
||||
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/le/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByLe/$1/$2';
|
||||
$route['api/frontend/v1/treemenudata/lvverwaltung/stdsem/(:any)/lv/(:any)'] = 'api/frontend/v1/Lehrveranstaltung/getByLv/$1/$2';
|
||||
|
||||
// // (studiensemester_kurzbz)/uid/(uid)
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/uid/(:any)'] = 'api/frontend/v1/stv/Students/getStudent/$1/$2';
|
||||
// // (studiensemester_kurzbz)/prestudent/(prestudent_id)
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/prestudent/(:num)'] = 'api/frontend/v1/stv/Students/getPrestudent/$1/$2';
|
||||
// // (studiensemester_kurzbz)/person/(person_id)
|
||||
$route['api/frontend/v1/stv/[sS]tudents/([WS]S[0-9]{4})/person/(:num)'] = 'api/frontend/v1/stv/Students/getPerson/$1/$2';
|
||||
|
||||
// load routes from extensions, also look for environment-specific configs
|
||||
$subdirs = ['application/config/extensions', 'application/config/' . ENVIRONMENT . '/extensions'];
|
||||
|
||||
@@ -22,8 +22,9 @@ unset($config['student']['searchfields']['email']);
|
||||
unset($config['student']['searchfields']['tel']);
|
||||
$config['student']['resultfields'] = [
|
||||
"s.student_uid AS uid",
|
||||
"s.matrikelnr",
|
||||
"s.matrikelnr AS personenkennzeichen",
|
||||
"p.person_id",
|
||||
"p.matr_nr AS matrikelnummer",
|
||||
"(p.vorname || ' ' || p.nachname) AS name",
|
||||
"ARRAY[s.student_uid || '@' || '" . DOMAIN . "'] AS email",
|
||||
"CASE
|
||||
|
||||
@@ -168,3 +168,40 @@ $config['stgkz_blacklist_wiederholung'] = [];
|
||||
* @var array An array of noten ids
|
||||
*/
|
||||
$config['note_blacklist_wiederholung'] = [];
|
||||
|
||||
/**
|
||||
* Enable/disable the Abmeldung StG process
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
$config['abmeldung_stg_enabled'] = true;
|
||||
|
||||
/**
|
||||
* Enable/disable the Abmeldung process
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
$config['abmeldung_enabled'] = true;
|
||||
|
||||
/**
|
||||
* Enable/disable the Unterbrecher process
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
$config['unterbrechung_enabled'] = true;
|
||||
|
||||
/**
|
||||
* Enable/disable the Wiederholer process
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
$config['wiederholung_enabled'] = true;
|
||||
|
||||
/**
|
||||
* Modal with Infotext of TLC
|
||||
* if true, there will be shown an info modal in the studentsView after the first button ABMELDUNG
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
$config['showInfoModalAbmeldung'] = true;
|
||||
|
||||
|
||||
@@ -1,6 +1,27 @@
|
||||
<?php
|
||||
|
||||
$config['number_displayed_past_studiensemester_default'] = 5;
|
||||
|
||||
# Additional columns:
|
||||
/*
|
||||
$config["list_columns"] = [
|
||||
'fieldname' => [
|
||||
'js' => 'path/to/snippet.js', // tabulator config snippet (eg: return { name: 'Name', field: 'fieldname' }; )
|
||||
'default' => "SQL SELECT statement for value",
|
||||
'joins' => [
|
||||
// additional joins needed for the SELECT statement above
|
||||
[
|
||||
'tablename',
|
||||
'join condition', // single fieldname for USING or full condition for ON
|
||||
'LEFT|RIGHT', // optional - join type
|
||||
'after_xxx|before_xxx|end' // optional - position in query
|
||||
]
|
||||
// ...
|
||||
]
|
||||
]
|
||||
];
|
||||
*/
|
||||
|
||||
$config['tabs'] =
|
||||
[
|
||||
'details' => [
|
||||
@@ -60,7 +81,13 @@ $config['tabs'] =
|
||||
],
|
||||
'notes' => [
|
||||
//if true, the count of Messages will be shown in the header of the Tab Messages
|
||||
'showCountNotes' => true
|
||||
'showCountNotes' => true,
|
||||
|
||||
//if true: section with following fields will be displayed: 'verfasser', 'bearbeiter', 'von', 'bis' and 'erledigt'
|
||||
'showErweitert' => false,
|
||||
|
||||
//notizlayout: choose of "classicFas", "twoColumnsFormLeft", twoColumnsFormRight, popupModal"
|
||||
'notizLayout' => 'popupModal'
|
||||
],
|
||||
'combinePeople' => [
|
||||
//multitab should only be shown with this length of selection
|
||||
@@ -133,13 +160,25 @@ $config['students_tab_order'] = [
|
||||
|
||||
$config['stv_prestudent_tags'] = [
|
||||
'prioone' => ['readonly' => false],
|
||||
'priotwo' => ['readonly' => true],
|
||||
'priotwo' => ['readonly' => false],
|
||||
'hinweis' => ['readonly' => false],
|
||||
'hinweis_assistenz' => ['readonly' => true],
|
||||
'hinweis_kf' => ['readonly' => true],
|
||||
'hinweis_assistenz' => ['readonly' => false],
|
||||
'hinweis_kf' => ['readonly' => false],
|
||||
'hinweis_lehrende' => ['readonly' => false],
|
||||
'hinweis_stg_kf' => ['readonly' => true],
|
||||
'finished_stg' => ['readonly' => true],
|
||||
'finished_kf' => ['readonly' => true],
|
||||
'inwork_kf' => ['readonly' => true],
|
||||
'hinweis_stg_kf' => ['readonly' => false],
|
||||
'finished_stg' => ['readonly' => false],
|
||||
'finished_kf' => ['readonly' => false],
|
||||
'inwork_kf' => ['readonly' => false],
|
||||
'dd_auto' => ['readonly' => true],
|
||||
'wh_auto' => ['readonly' => true],
|
||||
'prewh_auto' => ['readonly' => true],
|
||||
'out_auto' => ['readonly' => true],
|
||||
'zgv_auto' => ['readonly' => true],
|
||||
'unterbrecher_auto' => ['readonly' => true],
|
||||
'stbtr_erh_auto' => ['readonly' => true],
|
||||
'jgv_auto' => ['readonly' => true],
|
||||
'in_auto' => ['readonly' => true],
|
||||
'preabbr_auto' => ['readonly' => true],
|
||||
];
|
||||
|
||||
$config['userAutomatedTags'] = 'sftest';
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['stv'] = [
|
||||
"library" => "treemenu/StudVwLib",
|
||||
"permissions" => ["admin:r", "assistenz:r"]
|
||||
];
|
||||
$config['lvv'] = [
|
||||
"library" => "treemenu/LvVwLib",
|
||||
"permissions" => ["admin:r", "assistenz:r"]
|
||||
];
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['root'] = [
|
||||
'stg' => [
|
||||
'semester' => [
|
||||
'group',
|
||||
'verband' => [
|
||||
'group'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
$config['root']['stg']['orgform'] = $config['root']['stg'];
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['root'] = [
|
||||
'stg' => [
|
||||
'prestudent' => [
|
||||
'stdsem' => [
|
||||
'interessenten' => [
|
||||
'bewerbungnichtabgeschickt',
|
||||
'bewerbungabgeschickt',
|
||||
'zgv',
|
||||
'statusbestaetigt' => [
|
||||
'statusbestaetigtrtnichtangemeldet',
|
||||
'statusbestaetigtrtangemeldet'
|
||||
],
|
||||
'reihungstestnichtangemeldet',
|
||||
'reihungstestangemeldet'
|
||||
],
|
||||
'bewerber' => [
|
||||
'bewerberrtnichtangemeldet',
|
||||
'bewerberrtangemeldet' => [
|
||||
'bewerberrtangemeldetteilgenommen',
|
||||
'bewerberrtangemeldetnichtteilgenommen'
|
||||
]
|
||||
],
|
||||
'aufgenommen',
|
||||
'warteliste',
|
||||
'absage',
|
||||
'incoming'
|
||||
]
|
||||
],
|
||||
'semester' => [
|
||||
'group',
|
||||
'verband' => [
|
||||
'group'
|
||||
]
|
||||
]
|
||||
],
|
||||
'inout' => [
|
||||
'incoming',
|
||||
'outgoing',
|
||||
'shared_studies'
|
||||
]
|
||||
];
|
||||
|
||||
// copy stg tree into stg/orgforms
|
||||
$config['root']['stg']['orgform'] = $config['root']['stg'];
|
||||
@@ -31,12 +31,8 @@ class Abgabetool extends Auth_Controller
|
||||
{
|
||||
// TODO: routing from index based on berechtigung?
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Abgabetool']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Abgabetool']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'Abgabetool']);
|
||||
}
|
||||
@@ -44,12 +40,8 @@ class Abgabetool extends Auth_Controller
|
||||
|
||||
public function Student($student_uid_prop = '')
|
||||
{
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolStudent']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolStudent']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolStudent', 'student_uid_prop' => $student_uid_prop]);
|
||||
}
|
||||
@@ -57,12 +49,8 @@ class Abgabetool extends Auth_Controller
|
||||
|
||||
public function Mitarbeiter()
|
||||
{
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolMitarbeiter']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolMitarbeiter']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolMitarbeiter']);
|
||||
}
|
||||
@@ -70,13 +58,8 @@ class Abgabetool extends Auth_Controller
|
||||
|
||||
public function Assistenz($stg_kz_prop = '')
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolAssistenz']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolAssistenz']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolAssistenz', 'stg_kz_prop' => $stg_kz_prop]);
|
||||
}
|
||||
@@ -84,12 +67,8 @@ class Abgabetool extends Auth_Controller
|
||||
|
||||
public function Deadlines()
|
||||
{
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'DeadlinesOverview']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'DeadlinesOverview']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'DeadlinesOverview']);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class Auth extends FHC_Controller
|
||||
|
||||
if ($this->form_validation->run())
|
||||
{
|
||||
redirect($this->authlib->getLandingPage('/CisVue/Dashboard'));
|
||||
redirect($this->authlib->getLandingPage('/Cis4'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+9
-15
@@ -5,18 +5,18 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Dashboard extends Auth_Controller
|
||||
class Benotungstool extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'dashboard/benutzer:r'
|
||||
)
|
||||
);
|
||||
parent::__construct([
|
||||
'index' => array('lehre/benotungstool:rw', 'lehre/benotungstool_assistenz:rw')
|
||||
]);
|
||||
|
||||
$this->_ci =& get_instance();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -27,17 +27,11 @@ class Dashboard extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$this->load->model('person/Person_model','PersonModel');
|
||||
$personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
|
||||
|
||||
$viewData = array(
|
||||
'uid' => getAuthUID(),
|
||||
'name' => $personData->vorname,
|
||||
'person_id' => $personData->person_id
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData]);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Benotungstool']);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Compat extends Auth_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'ci' => ['basis/cis:r'],
|
||||
'legacy' => ['basis/cis:r'],
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
|
||||
/**
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ci()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['route' => 'Compat']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function legacy()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['route' => 'Compat']);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,12 +28,6 @@ class LvPlan extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
'timezone' => $this->config->item('timezone')
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'LvPlan']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'LvPlan']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,6 @@ class MyLv extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLv']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyLv']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,7 @@ class MyLvPlan extends Auth_Controller
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
'timezone' => $this->config->item('timezone')
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLvPlan']);
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyLvPlan']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class MyReservation extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r']
|
||||
]);
|
||||
|
||||
// Load Config
|
||||
$this->load->config('calendar');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyReservation']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OtherLvPlan extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/other_lv_plan:r']
|
||||
]);
|
||||
|
||||
// Load Config
|
||||
$this->load->config('calendar');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'OtherLvPlan']);
|
||||
}
|
||||
}
|
||||
@@ -55,15 +55,7 @@ class Profil extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$this->load->library('ProfilLib');
|
||||
$profil_data = $this->profillib->getView(getAuthUID());
|
||||
$profil_data = hasData($profil_data) ? getData($profil_data) : null;
|
||||
$viewData = array(
|
||||
'editable'=>true,
|
||||
'profil_data' => $profil_data,
|
||||
);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'profilIndex']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'profilIndex']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,23 +65,13 @@ class Profil extends Auth_Controller
|
||||
*/
|
||||
public function View($uid)
|
||||
{
|
||||
$this->load->library('ProfilLib');
|
||||
$profil_data = $this->profillib->getView($uid);
|
||||
$profil_data = hasData($profil_data) ? getData($profil_data) : null;
|
||||
$viewData = array (
|
||||
'uid' => $uid,
|
||||
'profil_data'=>$profil_data,
|
||||
);
|
||||
if($uid == getAuthUID()){
|
||||
$viewData['editable'] = true;
|
||||
}
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'profilViewUid']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'profilViewUid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* checks whether a specific userID is a mitarbeiter or not (foreword declaration of the function isMitarbeiter in Mitarbeiter_model.php)
|
||||
* checks whether a specific userID is a student or not (foreword declaration of the function isStudent in Student_model.php)
|
||||
* @access public
|
||||
* @param $uid the userID used to check if it is a mitarbeiter
|
||||
* @param $uid the userID used to check if it is a student
|
||||
* @return boolean
|
||||
*/
|
||||
public function isStudent($uid)
|
||||
@@ -119,7 +101,7 @@ class Profil extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the adressen that are marked as zustell from the currenlty logged in user
|
||||
* gets the adressen that are marked as zustell from the currently logged in user
|
||||
* @access public
|
||||
* @return array a list of adresse_id's
|
||||
*/
|
||||
@@ -262,23 +244,23 @@ class Profil extends Auth_Controller
|
||||
$this->GemeindeModel->addDistinct();
|
||||
$this->GemeindeModel->addSelect(["name"]);
|
||||
if ($nation == "A") {
|
||||
if (isset($zip) && $zip > 999 && $zip < 32000) {
|
||||
if (isset($zip) && $zip > 999 && $zip < 32000) {
|
||||
|
||||
$gemeinde_res = $this->GemeindeModel->loadWhere(['plz' => $zip]);
|
||||
if (isError($gemeinde_res)) {
|
||||
show_error("error while trying to query bis.tbl_gemeinde");
|
||||
}
|
||||
$gemeinde_res = hasData($gemeinde_res) ? getData($gemeinde_res) : null;
|
||||
$gemeinde_res = array_map(function ($obj) {
|
||||
return $obj->name;
|
||||
}, $gemeinde_res);
|
||||
echo json_encode($gemeinde_res);
|
||||
|
||||
} else {
|
||||
echo json_encode(error("ortschaftskennziffer code was not valid"));
|
||||
$gemeinde_res = $this->GemeindeModel->loadWhere(['plz' => $zip]);
|
||||
if (isError($gemeinde_res)) {
|
||||
show_error("error while trying to query bis.tbl_gemeinde");
|
||||
}
|
||||
$gemeinde_res = hasData($gemeinde_res) ? getData($gemeinde_res) : null;
|
||||
$gemeinde_res = array_map(function ($obj) {
|
||||
return $obj->name;
|
||||
}, $gemeinde_res);
|
||||
echo json_encode($gemeinde_res);
|
||||
|
||||
} else {
|
||||
echo json_encode(error("ortschaftskennziffer code was not valid"));
|
||||
}
|
||||
} else {
|
||||
echo json_encode(error("Nation was not 'A' (Austria)"));
|
||||
echo json_encode(error("Nation was not 'A' (Austria)"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,6 +732,4 @@ class Profil extends Auth_Controller
|
||||
$zutrittskarte_ausgegebenam = str_replace("-", ".", $zutrittskarte_ausgegebenam);
|
||||
return $zutrittskarte_ausgegebenam;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ProjektabgabeUebersicht extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r']
|
||||
]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'ProjektabgabeUebersicht']);
|
||||
}
|
||||
}
|
||||
@@ -25,11 +25,6 @@ class Raumsuche extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Raumsuche']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Raumsuche']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StgOrgLvPlan extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r']
|
||||
]);
|
||||
|
||||
// Load Config
|
||||
$this->load->config('calendar');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'StgOrgLvPlan']);
|
||||
}
|
||||
}
|
||||
@@ -29,10 +29,7 @@ class Studium extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$viewData = array(
|
||||
|
||||
);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'studium']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['route' => 'studium']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Zeitsperren extends Auth_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r'],
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* index loads the view Zeitsperren
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'zeitsperren']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Zeitsperrenma extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r']
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Zeitsperrenma']);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,9 +14,9 @@ class Cis4 extends Auth_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'basis/cis:r'
|
||||
)
|
||||
array(
|
||||
'index' => 'basis/cis:r'
|
||||
)
|
||||
);
|
||||
|
||||
// Load Config
|
||||
@@ -30,16 +31,6 @@ class Cis4 extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
|
||||
|
||||
$viewData = array(
|
||||
'uid' => getAuthUID(),
|
||||
'name' => $personData->vorname,
|
||||
'person_id' => $personData->person_id,
|
||||
'timezone' => $this->config->item('timezone')
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'FhcDashboard']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'FhcDashboard']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,15 @@ class Cms extends Auth_Controller
|
||||
array(
|
||||
'content' => 'basis/cis:r',
|
||||
'getNews' => 'basis/cis:r',
|
||||
'getNewsRowCount' => 'basis/cis:r',
|
||||
'getRoomInformation' => 'basis/cis:r',
|
||||
'news' => 'basis/cis:r'
|
||||
'news' => 'basis/cis:r',
|
||||
'newsAdministration' => ['basis/news:r'],
|
||||
)
|
||||
);
|
||||
|
||||
// Loads Libraries
|
||||
$this->load->library('CmsLib');
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
// Loads phrases system
|
||||
$this->loadPhrases([
|
||||
@@ -83,10 +84,18 @@ class Cms extends Auth_Controller
|
||||
*/
|
||||
public function news($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
|
||||
{
|
||||
$viewData = array();
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData'=>$viewData, 'route' => 'News']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', [
|
||||
'route' => 'News',
|
||||
]);
|
||||
}
|
||||
|
||||
public function newsAdministration()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', [
|
||||
'route' => 'NewsAdministration',
|
||||
]);
|
||||
}
|
||||
|
||||
public function getRoomInformation($ort_kurzbz)
|
||||
{
|
||||
// Load Config
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller redirects urls to another location. This is mainly used
|
||||
* with the $routes config
|
||||
*/
|
||||
class Redirect extends CI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function to handle all redirects.
|
||||
*
|
||||
* @param string $method - the redirect code (30x)
|
||||
* @param array $params - the url to redirect to
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function _remap($method, $params)
|
||||
{
|
||||
redirect($params, 'location', $method);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Benutzer extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getUserData' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getUserData()
|
||||
{
|
||||
$uid = $this->input->get("uid") ?? getAuthUID();
|
||||
$this->BenutzerModel->addSelect("uid, person_id, insertamum");
|
||||
$userResult = $this->BenutzerModel->load(["uid" => $uid]);
|
||||
$userData = $this->getDataOrTerminateWithError($userResult);
|
||||
$this->terminateWithSuccess($userData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
class Bookmark extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
@@ -28,111 +30,162 @@ class Bookmark extends FHCAPI_Controller
|
||||
{
|
||||
parent::__construct([
|
||||
'getBookmarks' => self::PERM_LOGGED,
|
||||
'delete' => self::PERM_LOGGED,
|
||||
'insert' => self::PERM_LOGGED,
|
||||
'delete' => self::PERM_LOGGED,
|
||||
'insert' => self::PERM_LOGGED,
|
||||
'update' => self::PERM_LOGGED,
|
||||
]);
|
||||
'changeOrder' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->load->model('dashboard/Bookmark_model', 'BookmarkModel');
|
||||
|
||||
$this->uid = getAuthUID();
|
||||
$this->pid = getAuthPersonID();
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
|
||||
/**
|
||||
* gets the bookmarks associated to a user
|
||||
/**
|
||||
* gets the bookmarks associated to a user
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getBookmarks()
|
||||
{
|
||||
$this->BookmarkModel->addOrder("bookmark_id");
|
||||
$this->BookmarkModel->addOrder("sort");
|
||||
$bookmarks = $this->BookmarkModel->loadWhere(["uid"=>$this->uid]);
|
||||
|
||||
$bookmarks = $this->getDataOrTerminateWithError($bookmarks);
|
||||
$bookmarks = $this->getDataOrTerminateWithError($bookmarks);
|
||||
|
||||
$this->terminateWithSuccess($bookmarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* deletes bookmark from associated user
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($bookmark_id)
|
||||
{
|
||||
$bookmark = $this->BookmarkModel->load($bookmark_id);
|
||||
|
||||
$bookmark = current($this->getDataOrTerminateWithError($bookmark));
|
||||
|
||||
// only delete bookmark if the user is the owner of the bookmark
|
||||
if($bookmark->uid == $this->uid || $this->permissionlib->isBerechtigt('admin')){
|
||||
|
||||
$delete_result = $this->BookmarkModel->delete($bookmark_id);
|
||||
|
||||
$delete_result = $this->getDataOrTerminateWithError($delete_result);
|
||||
|
||||
$this->terminateWithSuccess($delete_result);
|
||||
}else{
|
||||
$this->_outputAuthError(['delete' => ['admin:rw']]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* inserts new bookmark into the bookmark table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function insert()
|
||||
{
|
||||
// form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
|
||||
$this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$url = $this->input->post('url',true);
|
||||
$title = $this->input->post('title',true);
|
||||
$tag = $this->input->post('tag', true);
|
||||
|
||||
$insert_into_result = $this->BookmarkModel->insert(['uid'=>$this->uid, 'url'=>$url, 'title'=>$title,'tag'=>$tag, 'insertvon'=>$this->uid, 'updateamum'=>NULL, 'updatevon'=>NULL]);
|
||||
|
||||
$insert_into_result = $this->getDataOrTerminateWithError($insert_into_result);
|
||||
|
||||
$this->terminateWithSuccess($insert_into_result);
|
||||
|
||||
}
|
||||
$this->terminateWithSuccess($bookmarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* updates bookmark in the bookmark table
|
||||
* deletes bookmark from associated user
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function update($bookmark_id)
|
||||
public function delete($bookmark_id)
|
||||
{
|
||||
// form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
|
||||
$this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
$bookmark = $this->BookmarkModel->load($bookmark_id);
|
||||
|
||||
$url = $this->input->post('url',true);
|
||||
$title = $this->input->post('title',true);
|
||||
$bookmark = current($this->getDataOrTerminateWithError($bookmark));
|
||||
|
||||
// only delete bookmark if the user is the owner of the bookmark
|
||||
if ($bookmark->uid == $this->uid || $this->permissionlib->isBerechtigt('admin')) {
|
||||
$delete_result = $this->BookmarkModel->delete($bookmark_id);
|
||||
|
||||
$delete_result = $this->getDataOrTerminateWithError($delete_result);
|
||||
|
||||
$this->terminateWithSuccess($delete_result);
|
||||
} else {
|
||||
$this->_outputAuthError(['delete' => ['admin:rw']]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* inserts new bookmark into the bookmark table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function insert()
|
||||
{
|
||||
// form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
|
||||
$this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$url = $this->input->post('url', true);
|
||||
$title = $this->input->post('title', true);
|
||||
$tag = $this->input->post('tag', true);
|
||||
if (is_array($tag)) {
|
||||
$tag = json_encode($tag); // convert PHP array to JSON string
|
||||
}
|
||||
$sort = $this->input->post('sort', true);
|
||||
|
||||
$insert_into_result = $this->BookmarkModel->insert([
|
||||
'uid' => $this->uid,
|
||||
'url' => $url,
|
||||
'title' => $title,
|
||||
'tag' => $tag,
|
||||
'insertvon' => $this->uid,
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'sort' => $sort
|
||||
]);
|
||||
|
||||
$insert_into_result = $this->getDataOrTerminateWithError($insert_into_result);
|
||||
|
||||
$this->terminateWithSuccess($insert_into_result);
|
||||
}
|
||||
|
||||
/**
|
||||
* updates bookmark in the bookmark table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function update($bookmark_id)
|
||||
{
|
||||
// form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
|
||||
$this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$url = $this->input->post('url', true);
|
||||
$title = $this->input->post('title', true);
|
||||
$tag = $this->input->post('tag', true);
|
||||
if (is_array($tag)) {
|
||||
$tag = json_encode($tag);
|
||||
}
|
||||
|
||||
$now = new DateTime();
|
||||
$now = $now->format('Y-m-d H:i:s');
|
||||
|
||||
$update_result = $this->BookmarkModel->update($bookmark_id,['url'=>$url, 'title'=>$title,'updateamum'=>$now]);
|
||||
$update_result = $this->BookmarkModel->update($bookmark_id, [
|
||||
'url' => $url,
|
||||
'title' => $title,
|
||||
'tag' => $tag,
|
||||
'updateamum' => $now
|
||||
]);
|
||||
|
||||
$update_result = $this->getDataOrTerminateWithError($update_result);
|
||||
$update_result = $this->getDataOrTerminateWithError($update_result);
|
||||
|
||||
$this->terminateWithSuccess($update_result);
|
||||
$this->terminateWithSuccess($update_result);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* changes sort of two bookmarks in the bookmark table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function changeOrder($bookmark_id1, $bookmark_id2)
|
||||
{
|
||||
$update_result = [];
|
||||
|
||||
$result1 = $this->BookmarkModel->load($bookmark_id1);
|
||||
$data1 = $this->getDataOrTerminateWithError($result1);
|
||||
$sort1 = current($data1)->sort;
|
||||
|
||||
$result2 = $this->BookmarkModel->load(["bookmark_id"=>$bookmark_id2]);
|
||||
$data2 = $this->getDataOrTerminateWithError($result2);
|
||||
$sort2 = current($data2)->sort;
|
||||
|
||||
$update_result1 = $this->BookmarkModel->update($bookmark_id1, [
|
||||
'sort' => $sort2
|
||||
]);
|
||||
$update_result[] = $this->getDataOrTerminateWithError($update_result1);
|
||||
|
||||
$update_result2 = $this->BookmarkModel->update($bookmark_id2, [
|
||||
'sort' => $sort1
|
||||
]);
|
||||
$update_result[] = $this->getDataOrTerminateWithError($update_result2);
|
||||
|
||||
$this->terminateWithSuccess($update_result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class Cis4FhcApi extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getViewData' => self::PERM_LOGGED,
|
||||
'dashboardViewData' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
}
|
||||
@@ -36,17 +36,22 @@ class Cis4FhcApi extends FHCAPI_Controller
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* fetches ViewData
|
||||
*/
|
||||
public function getViewData()
|
||||
* retrieves view data for dashboard view
|
||||
* @access public
|
||||
* @param $uid the userID for which profile is being viewed, null or missing value implies one's own profile
|
||||
*/
|
||||
public function dashboardViewData()
|
||||
{
|
||||
$this->load->model('person/Person_model','PersonModel');
|
||||
$personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
|
||||
|
||||
$this->load->config('calendar');
|
||||
|
||||
$viewData = array(
|
||||
'uid' => getAuthUID(),
|
||||
'name' => $personData->vorname,
|
||||
'person_id' => $personData->person_id
|
||||
'person_id' => $personData->person_id,
|
||||
'timezone' => $this->config->item('timezone'),
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
|
||||
class CisMenu extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
@@ -31,28 +32,113 @@ class CisMenu extends FHCAPI_Controller
|
||||
'getMenu' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
/**
|
||||
* fetches the menu for CIS from the database based on the userLanguage
|
||||
*/
|
||||
public function getMenu()
|
||||
public function getMenu()
|
||||
{
|
||||
$this->load->model('content/Content_model', 'ContentModel');
|
||||
$this->load->config('cis');
|
||||
$cis4_content_id =$this->config->item('cis_menu_root_content_id');
|
||||
$result = $this->ContentModel->getMenu($cis4_content_id, getAuthUID(),getUserLanguage());
|
||||
$cis4_content_id = $this->config->item('cis_menu_root_content_id');
|
||||
$result = $this->ContentModel->getMenu($cis4_content_id, getAuthUID(), getUserLanguage());
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
$menu = $result->childs ?? [];
|
||||
$this->terminateWithSuccess($menu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$menu = $this->generateUrlsForMenuItems($menu);
|
||||
$this->terminateWithSuccess($menu);
|
||||
}
|
||||
|
||||
private function generateUrlsForMenuItems($menuItems)
|
||||
{
|
||||
return array_map(
|
||||
function ($menuItem) {
|
||||
return $this->generateUrlForMenuItem($menuItem);
|
||||
},
|
||||
$menuItems
|
||||
);
|
||||
}
|
||||
|
||||
private function generateUrlForMenuItem($menuItem)
|
||||
{
|
||||
if(!isset($menuItem->url))
|
||||
{
|
||||
$menuItem->url = $this->menuItemUrlHelper($menuItem);
|
||||
unset($menuItem->content);
|
||||
}
|
||||
|
||||
if ($menuItem->childs && count($menuItem->childs)) {
|
||||
$menuItem->childs = $this->generateUrlsForMenuItems($menuItem->childs);
|
||||
}
|
||||
|
||||
return $menuItem;
|
||||
}
|
||||
|
||||
private function menuItemUrlHelper($menuItem)
|
||||
{
|
||||
if ($menuItem->template_kurzbz !== 'redirect') {
|
||||
return site_url("/CisVue/Cms/content/" . $menuItem->content_id);
|
||||
}
|
||||
|
||||
if (!isset($menuItem->content) || !$menuItem->content || !mb_strlen($menuItem->content)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadXML($menuItem->content);
|
||||
$urlElem = $doc->getElementsByTagName('url')->item(0);
|
||||
|
||||
$this->menuItemUrlTargetHelper($menuItem, $doc);
|
||||
|
||||
if (!$urlElem) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$url = $urlElem->textContent;
|
||||
|
||||
if (strpos($url, '../cms/news.php') !== false) {
|
||||
$newsRegex = '/^\.\.\/cms\/news\.php/';
|
||||
$url = preg_replace($newsRegex, site_url("/CisVue/Cms/news"), $url);
|
||||
}
|
||||
|
||||
if (strpos($url, '../cms/content.php?') !== false) {
|
||||
$contentRegex = '/^\.\.\/cms\/content\.php\?content_id=([0-9]+)/';
|
||||
$matches = [];
|
||||
preg_match($contentRegex, $url, $matches);
|
||||
$url = site_url('/CisVue/Cms/content/' . $matches[1]);
|
||||
}
|
||||
|
||||
if (strpos($url, '../index.ci.php') !== false) {
|
||||
$indexRegex = '/^\.\.\/index\.ci\.php/';
|
||||
$url = preg_replace($indexRegex, site_url(), $url);
|
||||
}
|
||||
|
||||
if (strpos($url, '../') !== false) {
|
||||
$relativeRegex = '/^\.\.\//';
|
||||
$url = preg_replace($relativeRegex, base_url(), $url);
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
private function menuItemUrlTargetHelper($menuItem, $xmldoc)
|
||||
{
|
||||
if($menuItem->template_kurzbz === 'redirect')
|
||||
{
|
||||
$targetElem = $xmldoc->getElementsByTagName('target')->item(0);
|
||||
$target = ($targetElem) ? $targetElem->textContent : '';
|
||||
if(!in_array($target, array('_self', '_top', '_blank')))
|
||||
{
|
||||
$target = '_self';
|
||||
}
|
||||
$menuItem->target = $target;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,14 +36,15 @@ class Cms extends FHCAPI_Controller
|
||||
'ContentID' => self::PERM_LOGGED,
|
||||
'getOrtKurzbzContent' => self::PERM_LOGGED,
|
||||
'content' => self::PERM_LOGGED,
|
||||
'news' => self::PERM_LOGGED,
|
||||
'getNewsRowCount' => self::PERM_LOGGED,
|
||||
'newsForWidget' => self::PERM_LOGGED,
|
||||
'getNews' => self::PERM_LOGGED,
|
||||
|
||||
]);
|
||||
|
||||
$this->load->model('content/News_model', 'NewsModel');
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
// setting up the papgination_size
|
||||
$this->page_size = 10;
|
||||
|
||||
@@ -59,7 +60,6 @@ class Cms extends FHCAPI_Controller
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
@@ -106,7 +106,7 @@ class Cms extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($content_id);
|
||||
}
|
||||
|
||||
public function news()
|
||||
public function newsForWidget()
|
||||
{
|
||||
|
||||
// form validation
|
||||
@@ -118,7 +118,7 @@ class Cms extends FHCAPI_Controller
|
||||
$this->load->model('content/news_model', 'NewsModel');
|
||||
|
||||
$limit = $this->input->get('limit',TRUE);
|
||||
|
||||
|
||||
//query the news
|
||||
$news = $this->NewsModel->getAll($limit);
|
||||
|
||||
@@ -157,23 +157,7 @@ class Cms extends FHCAPI_Controller
|
||||
|
||||
}
|
||||
|
||||
public function getNewsRowCount($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $fachbereich_kurzbz = null, $maxalter = 0, $edit = false, $sichtbar = true, $page = 1, $page_size = 10)
|
||||
{
|
||||
list($studiengang_kz, $semester) = $this->cmslib->getStgAndSem($studiengang_kz, $semester);
|
||||
$all = $edit;
|
||||
|
||||
$this->load->model('content/News_model','NewsModel');
|
||||
|
||||
$num_rows = $this->NewsModel->countNewsWithContent(getSprache(), $studiengang_kz, $semester, $fachbereich_kurzbz, $sichtbar, $maxalter, $page, $page_size, $all, $mischen);
|
||||
|
||||
$num_rows = $this->getDataOrTerminateWithError($num_rows);
|
||||
|
||||
$this->terminateWithSuccess($num_rows);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
|
||||
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = false, $titel = '', $edit = false, $sichtbar = true)
|
||||
{
|
||||
//form validation
|
||||
$this->load->library('form_validation');
|
||||
@@ -193,15 +177,45 @@ class Cms extends FHCAPI_Controller
|
||||
|
||||
// default value for the page_size is 10
|
||||
$page_size = $page_size ?? 10;
|
||||
|
||||
$passedSichtbar = $this->input->get('published', true);
|
||||
if($passedSichtbar !== null)
|
||||
{
|
||||
$sichtbar = $passedSichtbar;
|
||||
}
|
||||
|
||||
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar, $page, $page_size, $sprache);
|
||||
$filterForDegreePrograms = false;
|
||||
$entitledDegreePrograms = [];
|
||||
$student = $this->StudentModel->loadWhere(['student_uid' => getAuthUID()]);
|
||||
if(isError($student))
|
||||
{
|
||||
$this->terminateWithError(getError($student));
|
||||
}
|
||||
if(hasData($student))
|
||||
{
|
||||
$student = current(getData($student));
|
||||
|
||||
$degreeProgramSemesterDataResult = $this->PrestudentModel->getStudiengaengAndAusbildungssemesterByStudentUid(getAuthUID());
|
||||
$degreeProgramSemesterData = $this->getDataOrTerminateWithError($degreeProgramSemesterDataResult)[0];
|
||||
if ($degreeProgramSemesterData) {
|
||||
$studiengang_kz = isset($degreeProgramSemesterData->studiengang_kz) ? $degreeProgramSemesterData->studiengang_kz : null;
|
||||
$semester = isset($degreeProgramSemesterData->ausbildungssemester) ? $degreeProgramSemesterData->ausbildungssemester : null;
|
||||
}
|
||||
|
||||
$mischen = true;
|
||||
} else {
|
||||
$filterForDegreePrograms = true;
|
||||
$entitledDegreePrograms = $this->permissionlib->getSTG_isEntitledFor("basis/news");
|
||||
array_push($entitledDegreePrograms, 0);
|
||||
}
|
||||
|
||||
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar, $page, $page_size, $sprache, $filterForDegreePrograms, $entitledDegreePrograms, true);
|
||||
$news = $this->getDataOrTerminateWithError($news);
|
||||
|
||||
$this->addMeta('phrases', json_decode($this->p->getJson()));
|
||||
$this->terminateWithSuccess($news);
|
||||
$this->addMeta('row_count', $news["row_count"] ?? 0);
|
||||
$this->terminateWithSuccess($news["content"]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,6 @@ class Documents extends FHCAPI_Controller
|
||||
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
||||
|
||||
$result = $this->VorlageModel->load($xsl);
|
||||
$this->addMeta("ress", $result);
|
||||
$vorlage = current($this->getDataOrTerminateWithError($result));
|
||||
if (!$vorlage)
|
||||
show_404();
|
||||
@@ -221,7 +220,7 @@ class Documents extends FHCAPI_Controller
|
||||
'gedruckt' => true,
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => getAuthUID(),
|
||||
'uid' => $this->input->post_get('uid') ?: '',
|
||||
'uid' => $this->input->post_get('uid') ?: null,
|
||||
'archiv' => true,
|
||||
'signiert' => !!$sign_user,
|
||||
'stud_selfservice' => $vorlage->stud_selfservice
|
||||
@@ -251,6 +250,9 @@ class Documents extends FHCAPI_Controller
|
||||
'studiensemester_kurzbz' => $ss,
|
||||
'student_uid' => $akteData['uid']
|
||||
]);
|
||||
|
||||
if (!hasData($result)) $this->terminateWithError($this->p->t("stv", "error_noLehrverbandAssigned"));
|
||||
|
||||
$res = current($this->getDataOrTerminateWithError($result));
|
||||
|
||||
$studiengang_kz = $res->studiengang_kz;
|
||||
@@ -332,6 +334,7 @@ class Documents extends FHCAPI_Controller
|
||||
if ($prestudent_id) {
|
||||
$this->load->model('crm/prestudent_model', 'PrestudentModel');
|
||||
$this->PrestudentModel->addJoin('public.tbl_studiengang', 'studiengang_kz', 'LEFT');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.*, UPPER(typ || kurzbz) AS kuerzel');
|
||||
$result = $this->PrestudentModel->load($prestudent_id);
|
||||
$prestudent = current($this->getDataOrTerminateWithError($result));
|
||||
|
||||
|
||||
+8
-8
@@ -20,8 +20,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about favorite verbände
|
||||
* Listens to ajax post calls to change the favorite verbände data
|
||||
* Provides data to the ajax get calls about favorite treemenu entries
|
||||
* Listens to ajax post calls to change the favorite treemenu entries
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Favorites extends FHCAPI_Controller
|
||||
@@ -29,7 +29,7 @@ class Favorites extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => self::PERM_LOGGED,
|
||||
'get' => self::PERM_LOGGED,
|
||||
'set' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
@@ -37,19 +37,19 @@ class Favorites extends FHCAPI_Controller
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
}
|
||||
|
||||
public function index()
|
||||
public function get($app)
|
||||
{
|
||||
$result = $this->VariableModel->getVariables(getAuthUID(), ['stv_favorites']);
|
||||
$result = $this->VariableModel->getVariables(getAuthUID(), [$app . '_favorites']);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$data)
|
||||
$this->terminateWithSuccess(null);
|
||||
else
|
||||
$this->terminateWithSuccess($data['stv_favorites'] ?? null);
|
||||
$this->terminateWithSuccess($data[$app . '_favorites'] ?? null);
|
||||
}
|
||||
|
||||
public function set()
|
||||
public function set($app)
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
@@ -60,7 +60,7 @@ class Favorites extends FHCAPI_Controller
|
||||
|
||||
$favorites = $this->input->post('favorites');
|
||||
|
||||
$result = $this->VariableModel->setVariable(getAuthUID(), 'stv_favorites', $favorites);
|
||||
$result = $this->VariableModel->setVariable(getAuthUID(), $app . '_favorites', $favorites);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
@@ -18,18 +18,9 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
//require_once('../../../include/studiengang.class.php');
|
||||
//require_once('../../../include/student.class.php');
|
||||
//require_once('../../../include/datum.class.php');
|
||||
//require_once('../../../include/mail.class.php');
|
||||
//require_once('../../../include/benutzerberechtigung.class.php');
|
||||
//require_once('../../../include/phrasen.class.php');
|
||||
//require_once('../../../include/projektarbeit.class.php');
|
||||
//require_once('../../../include/projektbetreuer.class.php');
|
||||
|
||||
class Lehre extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
@@ -38,39 +29,58 @@ class Lehre extends FHCAPI_Controller
|
||||
parent::__construct([
|
||||
'lvStudentenMail' => self::PERM_LOGGED,
|
||||
'LV' => self::PERM_LOGGED,
|
||||
'Pruefungen' => self::PERM_LOGGED
|
||||
'Pruefungen' => self::PERM_LOGGED,
|
||||
'semesterAverageGrade' => self::PERM_LOGGED,
|
||||
'getZugewieseneLv' => self::PERM_LOGGED,
|
||||
'getLeForLv' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
|
||||
$this->load->library('PhrasesLib');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'abgabetool'
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
require_once(FHCPATH . 'include/studiengang.class.php');
|
||||
require_once(FHCPATH . 'include/student.class.php');
|
||||
require_once(FHCPATH . 'include/projektarbeit.class.php');
|
||||
require_once(FHCPATH . 'include/projektbetreuer.class.php');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
/**
|
||||
* constructs the emails of the groups from a lehrveranstaltung
|
||||
*/
|
||||
public function lvStudentenMail()
|
||||
public function lvStudentenMail()
|
||||
{
|
||||
$lehreinheit_id = $this->input->get("lehreinheit_id",TRUE);
|
||||
|
||||
// return early if the required parameter is missing
|
||||
if(!isset($lehreinheit_id))
|
||||
{
|
||||
$this->terminateWithError('Missing required parameter', self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$lehreinheit_id = $this->input->get("lehreinheit_id",TRUE);
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$studentenMails = $this->LehreinheitModel->getStudentenMail($lehreinheit_id);
|
||||
// return early if the required parameter is missing
|
||||
if(!isset($lehreinheit_id))
|
||||
{
|
||||
$this->terminateWithError('Missing required parameter', self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$studentenMails = $this->getDataOrTerminateWithError($studentenMails);
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$studentenMails = $this->LehreinheitModel->getStudentenMail($lehreinheit_id);
|
||||
|
||||
$studentenMails = $this->getDataOrTerminateWithError($studentenMails);
|
||||
|
||||
//convert array of objects into array of strings
|
||||
$studentenMails = array_map(function($element){
|
||||
return $element->mail;
|
||||
}, $studentenMails);
|
||||
|
||||
$this->terminateWithSuccess($studentenMails);
|
||||
$this->terminateWithSuccess($studentenMails);
|
||||
}
|
||||
|
||||
public function LV($studiensemester_kurzbz, $lehrveranstaltung_id)
|
||||
@@ -80,13 +90,13 @@ class Lehre extends FHCAPI_Controller
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID(), $studiensemester_kurzbz, getUserLanguage(), $lehrveranstaltung_id);
|
||||
|
||||
$result = current($this->getDataOrTerminateWithError($result));
|
||||
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all Pruefungen of a student for a specific lehrveranstaltung
|
||||
* if the student passed the Pruefung on the first attempt, no information about the Pruefungen is stored in the database
|
||||
* if the student passed the Pruefung on the first attempt, no information about the Pruefungen is stored in the database
|
||||
* @param mixed $lehrveranstaltung_id
|
||||
* @return void
|
||||
*/
|
||||
@@ -100,5 +110,90 @@ class Lehre extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* calculates and returns the grade average and weighted average for a specific semester
|
||||
* @param string $studiensemester_kurzbz
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function semesterAverageGrade($studiensemester_kurzbz)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$semesterLvs = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID(), $studiensemester_kurzbz, getUserLanguage());
|
||||
|
||||
if (isError($semesterLvs))
|
||||
return $this->outputJsonError(getError($semesterLvs));
|
||||
|
||||
$semesterLvsData = getData($semesterLvs);
|
||||
|
||||
$doGradesExist = false;
|
||||
$sum = 0;
|
||||
$count = 0;
|
||||
$sumWeighted = 0;
|
||||
$sumEcts = 0;
|
||||
|
||||
foreach ($semesterLvsData as $lv) {
|
||||
if (!$lv->znote || $lv->znote < 1 || $lv->znote > 5)
|
||||
continue;
|
||||
|
||||
$doGradesExist = true;
|
||||
|
||||
$sum += $lv->znote;
|
||||
$count++;
|
||||
$sumWeighted += $lv->znote * floatval($lv->ects);
|
||||
$sumEcts += floatval($lv->ects);
|
||||
}
|
||||
|
||||
$averageGrade = null;
|
||||
$weightedAverageGrade = null;
|
||||
if ($doGradesExist) {
|
||||
$averageGrade = $sum/$count;
|
||||
$weightedAverageGrade = $sumWeighted/$sumEcts;
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(['average_grade' => $averageGrade, 'weighted_average_grade' => $weightedAverageGrade]);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all assigned lehrveranstaltungen of a mitarbeiter for a given semester
|
||||
* @param mixed $uid
|
||||
* @param mixed $sem_kurzbz
|
||||
* @return void
|
||||
*/
|
||||
public function getZugewieseneLv() {
|
||||
$uid = $this->input->get("uid",TRUE);
|
||||
$sem_kurzbz = $this->input->get("sem_kurzbz",TRUE);
|
||||
|
||||
// TODO: error messages
|
||||
|
||||
if(!isset($sem_kurzbz) || isEmptyString($sem_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if (!isset($uid) || isEmptyString($uid))
|
||||
$uid = getAuthUID();
|
||||
|
||||
// querying other ma_uids data requires admin permission
|
||||
if($uid !== getAuthUID()) {
|
||||
$this->load->library('PermissionLib');
|
||||
$isAdmin = $this->permissionlib->isBerechtigt('admin');
|
||||
if(!$isAdmin) $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'), 'general');
|
||||
}
|
||||
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$result = $this->LehrveranstaltungModel->getLvForLektorInSemester($sem_kurzbz, $uid);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLeForLv() {
|
||||
$lv_id = $this->input->get("lv_id",TRUE);
|
||||
$sem_kurzbz = $this->input->get("sem_kurzbz",TRUE);
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
// $this->terminateWithSuccess($this->LehreinheitModel->getLesForLv($lv_id, $sem_kurzbz));
|
||||
$this->terminateWithSuccess($this->LehreinheitModel->getAllLehreinheitenForLvaAndMaUid($lv_id, getAuthUID(), $sem_kurzbz));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,7 +28,10 @@ class Lehrveranstaltung extends FHCAPI_Controller
|
||||
{
|
||||
parent::__construct([
|
||||
'getByEmp' => ['admin:r', 'assistenz:r'],
|
||||
'getByLe' => ['admin:r', 'assistenz:r'],
|
||||
'getByLv' => ['admin:r', 'assistenz:r'],
|
||||
'getByStg' => ['admin:r', 'assistenz:r'],
|
||||
'getByStgOrgform' => ['admin:r', 'assistenz:r'],
|
||||
'loadByLV' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
@@ -56,7 +59,9 @@ class Lehrveranstaltung extends FHCAPI_Controller
|
||||
|
||||
$studiensemester_kurzbz = $this->getStudiensemesterKurzbz($studiensemester_kurzbz);
|
||||
|
||||
$lehrveranstaltungen = $this->_ci->LehreinheitModel->getLvsByEmployee($mitarbeiter_uid, $studiensemester_kurzbz, $stg_kz);
|
||||
$studiengang_kz = $this->getStudiengangKz($stg_kz);
|
||||
|
||||
$lehrveranstaltungen = $this->_ci->LehreinheitModel->getLvsByEmployee($mitarbeiter_uid, $studiensemester_kurzbz, $studiengang_kz);
|
||||
$lehrveranstaltungen_data = $this->getDataOrTerminateWithError($lehrveranstaltungen);
|
||||
|
||||
$tree = [];
|
||||
@@ -75,39 +80,117 @@ class Lehrveranstaltung extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($tree);
|
||||
}
|
||||
public function getByStg($studiensemester_kurzbz = null, $studiengang_kz = null, $semester = null)
|
||||
|
||||
public function getByLe($studiensemester_kurzbz = null, $lehreinheit_id = null)
|
||||
{
|
||||
if (is_null($studiengang_kz) || !preg_match("/^-?[1-9][0-9]*$/", (string)$studiengang_kz))
|
||||
if (is_null($lehreinheit_id))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$verband = null;
|
||||
if (!is_null($semester) && !is_numeric($semester))
|
||||
{
|
||||
$verband = $semester;
|
||||
$semester = null;
|
||||
}
|
||||
$studiensemester_kurzbz = $this->getStudiensemesterKurzbz($studiensemester_kurzbz);
|
||||
|
||||
$this->_ci->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
|
||||
$lehreinheiten = $this->_ci->LehreinheitModel->getByLeStudiensemester($lehreinheit_id, $studiensemester_kurzbz);
|
||||
$lehreinheiten_data = $this->getDataOrTerminateWithError($lehreinheiten);
|
||||
|
||||
$this->terminateWithSuccess($lehreinheiten_data);
|
||||
}
|
||||
|
||||
public function getByLv($studiensemester_kurzbz = null, $lehrveranstaltung_id = null)
|
||||
{
|
||||
if (is_null($lehrveranstaltung_id))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$studiensemester_kurzbz = $this->getStudiensemesterKurzbz($studiensemester_kurzbz);
|
||||
$studienplan_data = $this->_ci->StudienplanModel->getStudienplaeneBySemester($studiengang_kz, $studiensemester_kurzbz, $semester, $verband);
|
||||
|
||||
$studienplan_ids = array();
|
||||
$only_ids = array();
|
||||
$placeholders = array();
|
||||
$tree = [];
|
||||
|
||||
if (hasData($studienplan_data))
|
||||
$this->_ci->LehrveranstaltungModel->addSelect('studiengang_kz');
|
||||
$lv = $this->_ci->LehrveranstaltungModel->load($lehrveranstaltung_id);
|
||||
$lv = $this->getDataOrTerminateWithError($lv);
|
||||
|
||||
if (empty($lv))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$lehrveranstaltungen_data = array();
|
||||
foreach ($this->_loadLvRows(current($lv)->studiengang_kz, $studiensemester_kurzbz) as $row)
|
||||
{
|
||||
foreach (getData($studienplan_data) as $studienplan) {
|
||||
$placeholders[] = "(?, ?)";
|
||||
$studienplan_ids[] = $studienplan->studienplan_id;
|
||||
$studienplan_ids[] = $studienplan->semester;
|
||||
$only_ids[] = $studienplan->studienplan_id;
|
||||
if ((string)$row->lehrveranstaltung_id === (string)$lehrveranstaltung_id)
|
||||
{
|
||||
$lehrveranstaltungen_data[] = $row;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$lehrveranstaltungen_data = $this->_ci->LehrveranstaltungModel->getLvsByStudiengang($studienplan_ids, $placeholders, $only_ids, $studiengang_kz, $studiensemester_kurzbz, $semester, $verband);
|
||||
$lehrveranstaltungen_data = hasData($lehrveranstaltungen_data) ? getData($lehrveranstaltungen_data) : array();
|
||||
if (empty($lehrveranstaltungen_data))
|
||||
{
|
||||
|
||||
$this->_ci->LehrveranstaltungModel->addSelect('
|
||||
tbl_lehrveranstaltung.*,
|
||||
tbl_lehrveranstaltung.kurzbz as lv_kurzbz,
|
||||
lehrveranstaltung_id,
|
||||
lehrtyp_kurzbz,
|
||||
studiengang_kz as lv_studiengang_kz,
|
||||
UPPER(CONCAT(tbl_studiengang.typ, tbl_studiengang.kurzbz)) as studiengang,
|
||||
semester as semester,
|
||||
tbl_lehrveranstaltung.bezeichnung as lv_bezeichnung,
|
||||
ects as lv_ects,
|
||||
lehreverzeichnis as lv_lehreverzeichnis,
|
||||
planfaktor as lv_planfaktor,
|
||||
planlektoren as lv_planlektoren,
|
||||
planpersonalkosten as lv_planpersonalkosten,
|
||||
plankostenprolektor as lv_plankostenprolektor,
|
||||
tbl_lehrveranstaltung.orgform_kurzbz as orgform_kurzbz,
|
||||
tbl_lehrveranstaltung.sprache as sprache,
|
||||
lehrform_kurzbz as lv_lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.bezeichnung_english as lv_bezeichnung_english,
|
||||
semesterstunden as lv_semesterstunden,
|
||||
');
|
||||
$this->_ci->LehrveranstaltungModel->addJoin('public.tbl_studiengang', 'studiengang_kz');
|
||||
$lehrveranstaltungen = $this->_ci->LehrveranstaltungModel->load($lehrveranstaltung_id);
|
||||
$lehrveranstaltungen_data = $this->getDataOrTerminateWithError($lehrveranstaltungen);
|
||||
}
|
||||
|
||||
foreach ($lehrveranstaltungen_data as $lehrveranstaltung)
|
||||
{
|
||||
$lehreinheiten = $this->_ci->LehreinheitModel->getByLvidStudiensemester($lehrveranstaltung->lehrveranstaltung_id, $studiensemester_kurzbz);
|
||||
$lehreinheiten_data = $this->getDataOrTerminateWithError($lehreinheiten);
|
||||
|
||||
if (!isset($lehrveranstaltung->_children))
|
||||
{
|
||||
$lehrveranstaltung->_children = $lehreinheiten_data;
|
||||
}
|
||||
$tree[] = $lehrveranstaltung;
|
||||
}
|
||||
|
||||
$counter = 0;
|
||||
$this->assignUniqueIndex($tree, $counter);
|
||||
$this->terminateWithSuccess($tree);
|
||||
}
|
||||
|
||||
public function getByStg($studiensemester_kurzbz = null, $stg_kz = null, $semester = null)
|
||||
{
|
||||
$this->_getLvTree($studiensemester_kurzbz, $stg_kz, $semester, null);
|
||||
}
|
||||
|
||||
public function getByStgOrgform($studiensemester_kurzbz = null, $stg_kz = null, $orgform = null, $semester = null)
|
||||
{
|
||||
$orgform_kurzbz = $this->getOrgformKurzbz($orgform);
|
||||
$this->_getLvTree($studiensemester_kurzbz, $stg_kz, $semester, $orgform_kurzbz);
|
||||
}
|
||||
|
||||
private function _getLvTree($studiensemester_kurzbz, $stg_kz, $semester, $orgform_kurzbz)
|
||||
{
|
||||
$studiengang_kz = $this->getStudiengangKz($stg_kz);
|
||||
|
||||
if (is_null($studiengang_kz) || !preg_match("/^(-?[1-9][0-9]*|0)$/", (string)$studiengang_kz))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if (!is_null($semester) && !ctype_digit((string)$semester))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$studiensemester_kurzbz = $this->getStudiensemesterKurzbz($studiensemester_kurzbz);
|
||||
|
||||
$lehrveranstaltungen_data = $this->_loadLvRows($studiengang_kz, $studiensemester_kurzbz, $semester, $orgform_kurzbz);
|
||||
|
||||
$tree = [];
|
||||
foreach ($lehrveranstaltungen_data as $row)
|
||||
@@ -240,6 +323,31 @@ class Lehrveranstaltung extends FHCAPI_Controller
|
||||
|
||||
$this->LehreinheitModel->getLvsByFachbereich($fachbereich, $studiensemester_kurzbz, $mitarbeiter_uid);
|
||||
}*/
|
||||
|
||||
private function _loadLvRows($studiengang_kz, $studiensemester_kurzbz, $semester = null, $orgform_kurzbz = null)
|
||||
{
|
||||
$this->_ci->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
|
||||
$studienplan_data = $this->_ci->StudienplanModel->getStudienplaeneBySemester($studiengang_kz, $studiensemester_kurzbz, $semester, $orgform_kurzbz);
|
||||
|
||||
$studienplan_ids = array();
|
||||
$only_ids = array();
|
||||
$placeholders = array();
|
||||
|
||||
if (hasData($studienplan_data))
|
||||
{
|
||||
foreach (getData($studienplan_data) as $studienplan) {
|
||||
$placeholders[] = "(?, ?)";
|
||||
$studienplan_ids[] = $studienplan->studienplan_id;
|
||||
$studienplan_ids[] = $studienplan->semester;
|
||||
$only_ids[] = $studienplan->studienplan_id;
|
||||
}
|
||||
}
|
||||
|
||||
$lehrveranstaltungen_data = $this->_ci->LehrveranstaltungModel->getLvsByStudiengang($studienplan_ids, $placeholders, $only_ids, $studiengang_kz, $studiensemester_kurzbz, $semester, $orgform_kurzbz);
|
||||
return hasData($lehrveranstaltungen_data) ? getData($lehrveranstaltungen_data) : array();
|
||||
}
|
||||
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
@@ -260,18 +368,53 @@ class Lehrveranstaltung extends FHCAPI_Controller
|
||||
}
|
||||
}
|
||||
|
||||
protected function getStudiengangKz($studiengang_typ_kurzbz)
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$result = $this->StudiengangModel->loadWhere([
|
||||
'LOWER(CONCAT(typ, kurzbz)) =' => strtolower($studiengang_typ_kurzbz)
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$data)
|
||||
return null;
|
||||
|
||||
return current($data)->studiengang_kz;
|
||||
}
|
||||
|
||||
private function getStudiensemesterKurzbz($studiensemester_kurzbz = null)
|
||||
{
|
||||
if (!is_null($studiensemester_kurzbz))
|
||||
{
|
||||
$studiensemester_result = $this->_ci->StudiensemesterModel->load($studiensemester_kurzbz);
|
||||
$studiensemester_result = $this->_ci->StudiensemesterModel->loadWhere([
|
||||
'LOWER(studiensemester_kurzbz)' => strtolower($studiensemester_kurzbz)
|
||||
]);
|
||||
|
||||
if (isError($studiensemester_result) || !hasData($studiensemester_result))
|
||||
$this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
return getData($studiensemester_result)[0]->studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getOrgformKurzbz($orgform_kurzbz)
|
||||
{
|
||||
if ($orgform_kurzbz === null)
|
||||
return null;
|
||||
|
||||
$this->load->model('codex/Orgform_model', 'OrgformModel');
|
||||
$result = $this->OrgformModel->loadWhere([
|
||||
'LOWER(orgform_kurzbz) =' => strtolower($orgform_kurzbz)
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$data)
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
return current($data)->orgform_kurzbz;
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,8 @@ class LvMenu extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getLvMenu' => self::PERM_LOGGED
|
||||
'getLvMenu' => self::PERM_LOGGED,
|
||||
'getMultipleLvMenu' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->load->model("ressource/Mitarbeiter_model");
|
||||
@@ -61,24 +62,23 @@ class LvMenu extends FHCAPI_Controller
|
||||
|
||||
/**
|
||||
* alternative function to get multiple lvMenus with a single http request
|
||||
* not yet working as intended as the menu_lv.inc.php scripts called by the
|
||||
* lvMenuBuild event have logic coupled to require_once import which results in
|
||||
* a wrong logic after the first invocation -> faulty results for lvinfo, moodle
|
||||
* and several others
|
||||
*/
|
||||
public function getMultipleLvMenu($lvMenuOptionList){
|
||||
public function getMultipleLvMenu(){
|
||||
$lvMenuOptionList = $this->input->post('lvMenuOptionList', true);
|
||||
$result =[];
|
||||
foreach($lvMenuOptionList as $lvMenuOptions){
|
||||
$lvMenu = $this->getLvMenu($lvMenuOptions['lvid'],$lvMenuOptions['studiensemester_kurzbz']);
|
||||
if(isError($lvMenu)){
|
||||
// TODO: some lvMenu threw an error, handle error here
|
||||
}
|
||||
$lvMenu = $this->getLvMenuInternal($lvMenuOptions['lvid'],$lvMenuOptions['studiensemester_kurzbz']);
|
||||
|
||||
$result[$lvMenuOptions['lvid']]=$lvMenu;
|
||||
}
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getLvMenu($lvid, $studiensemester_kurzbz)
|
||||
{
|
||||
|
||||
private function getLvMenuInternal($lvid, $studiensemester_kurzbz) {
|
||||
|
||||
// return early if parameters are missing
|
||||
if(!isset($lvid) || !isset($studiensemester_kurzbz))
|
||||
@@ -89,14 +89,14 @@ class LvMenu extends FHCAPI_Controller
|
||||
|
||||
// get the user
|
||||
if (!$user=getAuthUID())
|
||||
$this->terminateWithError($this->p->t('global', 'nichtAngemeldet'));
|
||||
$this->terminateWithError($this->p->t('global', 'nichtAngemeldet'));
|
||||
|
||||
// check if is_lector
|
||||
$is_lector = false;
|
||||
$mares = $this->Mitarbeiter_model->isMitarbeiter($user);
|
||||
if(hasData($mares))
|
||||
{
|
||||
$is_lector = getData($mares);
|
||||
$is_lector = getData($mares);
|
||||
}
|
||||
|
||||
// definition of user_is_allowed_to_upload
|
||||
@@ -105,7 +105,7 @@ class LvMenu extends FHCAPI_Controller
|
||||
|
||||
// load lehrveranstaltung
|
||||
$lvres = $this->Lehrveranstaltung_model->load($lvid);
|
||||
if(!hasData($lvres))
|
||||
if(!hasData($lvres))
|
||||
{
|
||||
$this->terminateWithError('LV ' . $lvid . ' not found.');
|
||||
}
|
||||
@@ -124,7 +124,7 @@ class LvMenu extends FHCAPI_Controller
|
||||
$stgres = $this->Studiengang_model->load(strval($studiengang_kz));
|
||||
if(!hasData($stgres))
|
||||
{
|
||||
$this->terminateWithError('Stg ' . $lv->studiengang_kz . ' not found.');
|
||||
$this->terminateWithError('Stg ' . $lv->studiengang_kz . ' not found.');
|
||||
}
|
||||
$stg = (getData($stgres))[0];
|
||||
$kurzbz = strtoupper($stg->typ . $stg->kurzbz);
|
||||
@@ -139,7 +139,7 @@ class LvMenu extends FHCAPI_Controller
|
||||
$angemeldet = false;
|
||||
|
||||
$lesres = $this->Lehreinheit_model->getLehreinheitenForStudentAndStudienSemester(
|
||||
$lvid, $user, $angezeigtes_stsem
|
||||
$lvid, $user, $angezeigtes_stsem
|
||||
);
|
||||
|
||||
if(hasData($lesres) && count(getData($lesres)) > 0)
|
||||
@@ -148,7 +148,7 @@ class LvMenu extends FHCAPI_Controller
|
||||
|
||||
// lehrfach
|
||||
$lehrfach_id='';
|
||||
|
||||
|
||||
if(defined('CIS_LEHRVERANSTALTUNG_LEHRFACH_ANZEIGEN') && CIS_LEHRVERANSTALTUNG_LEHRFACH_ANZEIGEN)
|
||||
{
|
||||
// Wenn der eingeloggte User zu einer der Lehreinheiten zugeteilt ist
|
||||
@@ -211,8 +211,8 @@ class LvMenu extends FHCAPI_Controller
|
||||
foreach($fbs as $row)
|
||||
{
|
||||
$lehrfach_oe_kurzbz_arr[] = $row->oe_kurzbz;
|
||||
if($this->PermissionLib->isBerechtigt('lehre', null, $row->oe_kurzbz)
|
||||
|| $this->PermissionLib->isBerechtigt('assistenz', null, $stg->oe_kurzbz))
|
||||
if($this->PermissionLib->isBerechtigt('lehre', null, $row->oe_kurzbz)
|
||||
|| $this->PermissionLib->isBerechtigt('assistenz', null, $stg->oe_kurzbz))
|
||||
{
|
||||
$user_is_allowed_to_upload=true;
|
||||
}
|
||||
@@ -224,21 +224,21 @@ class LvMenu extends FHCAPI_Controller
|
||||
$menu = array();
|
||||
|
||||
$this->fhc_menu_lvinfo($menu, $lvid, $studiengang_kz, $lektor_der_lv, $is_lector, $lehrfach_oe_kurzbz_arr);
|
||||
|
||||
|
||||
$this->fhc_menu_feedback($menu, $angemeldet, $lvid);
|
||||
|
||||
|
||||
$this->fhc_menu_gesamtnote($menu, $angemeldet, $lvid, $lv, $is_lector, $angezeigtes_stsem);
|
||||
|
||||
|
||||
$this->fhc_menu_emailStudierende($menu, $user, $angemeldet, $lvid, $angezeigtes_stsem);
|
||||
|
||||
|
||||
$this->fhc_menu_abmeldung($menu, $user, $is_lector, $lvid, $angezeigtes_stsem);
|
||||
|
||||
|
||||
$this->fhc_menu_lehretools($menu, $lvid, $angezeigtes_stsem, $sprache);
|
||||
|
||||
|
||||
$this->fhc_menu_anrechnungStudent($menu, $lvid, $angezeigtes_stsem);
|
||||
|
||||
|
||||
$this->fhc_menu_anrechnungLector($menu, $angezeigtes_stsem);
|
||||
|
||||
|
||||
|
||||
// Addons Menu Logic
|
||||
// ##########################################################################################
|
||||
@@ -272,18 +272,18 @@ class LvMenu extends FHCAPI_Controller
|
||||
'permissionLib' => &$this->PermissionLib,
|
||||
'phrasesLib' => &$this->PhrasesLib
|
||||
];
|
||||
|
||||
Events::trigger('lvMenuBuild',
|
||||
// passing $menu per reference
|
||||
function & () use (&$menu) {
|
||||
return $menu;
|
||||
},
|
||||
$params
|
||||
|
||||
Events::trigger('lvMenuBuild',
|
||||
// passing $menu per reference
|
||||
function & () use (&$menu) {
|
||||
return $menu;
|
||||
},
|
||||
$params
|
||||
);
|
||||
|
||||
// Menu sortieren
|
||||
// ##########################################################################################
|
||||
|
||||
|
||||
foreach ($menu as $key => $row){
|
||||
|
||||
// removes menu points that are not needed in the c4 lvUebersicht
|
||||
@@ -291,7 +291,7 @@ class LvMenu extends FHCAPI_Controller
|
||||
unset($menu[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// fills pos array to sort the menu
|
||||
$pos[$key] = $row['position'];
|
||||
|
||||
@@ -299,11 +299,18 @@ class LvMenu extends FHCAPI_Controller
|
||||
|
||||
array_multisort($pos, SORT_ASC, SORT_NUMERIC, $menu);
|
||||
|
||||
// HTTP response
|
||||
// ##########################################################################################
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getLvMenu($lvid, $studiensemester_kurzbz)
|
||||
{
|
||||
$menu = $this->getLvMenuInternal($lvid, $studiensemester_kurzbz);
|
||||
|
||||
$this->terminateWithSuccess($menu);
|
||||
|
||||
}
|
||||
|
||||
private function fhc_menu_lvinfo(&$menu, $lvid, $studiengang_kz, $lektor_der_lv, $is_lector, $lehrfach_oe_kurzbz_arr){
|
||||
@@ -372,7 +379,8 @@ class LvMenu extends FHCAPI_Controller
|
||||
'name'=>$this->p->t('lehre', 'gesamtnote'),
|
||||
'phrase' => 'lehre/gesamtnote',
|
||||
'c4_icon'=> base_url('skin/images/button_endnote.png'),
|
||||
'c4_link'=> base_url('cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php?lvid='.urlencode($lvid).'&stsem='.urlencode($angezeigtes_stsem))
|
||||
'c4_link'=> site_url('Cis/Benotungstool/'.urlencode($lvid).'/'.urlencode($angezeigtes_stsem))
|
||||
//'c4_link'=> base_url('cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php?lvid='.urlencode($lvid).'&stsem='.urlencode($angezeigtes_stsem))
|
||||
//'c4_link'=> base_url('benotungstool/lvgesamtnoteverwalten.php?lvid='.urlencode($lvid).'&stsem='.urlencode($angezeigtes_stsem))
|
||||
);
|
||||
}
|
||||
@@ -541,4 +549,4 @@ class LvMenu extends FHCAPI_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
use CI3_Events as Events;
|
||||
use \DateTime as DateTime;
|
||||
@@ -33,19 +34,27 @@ class LvPlan extends FHCAPI_Controller
|
||||
|
||||
parent::__construct([
|
||||
'getRoomplan' => self::PERM_LOGGED,
|
||||
'Stunden' => self::PERM_LOGGED,
|
||||
'getReservierungen' => self::PERM_LOGGED,
|
||||
'Stunden' => self::PERM_LOGGED,
|
||||
'getReservierungen' => self::PERM_LOGGED,
|
||||
'LvPlanEvents' => self::PERM_LOGGED,
|
||||
'eventsPersonal' => self::PERM_LOGGED,
|
||||
'eventsLv' => self::PERM_LOGGED,
|
||||
'getLehreinheitStudiensemester' => self::PERM_LOGGED,
|
||||
'studiensemesterDateInterval' => self::PERM_LOGGED,
|
||||
'getLvPlanForStudiensemester' => self::PERM_LOGGED,
|
||||
'getLv' => self::PERM_LOGGED
|
||||
'getLv' => self::PERM_LOGGED,
|
||||
'eventsStgOrg' => self::PERM_LOGGED,
|
||||
'fetchFerienEvents' => self::PERM_LOGGED,
|
||||
'getStudiengaenge' => self::PERM_LOGGED,
|
||||
'getLehrverband' => self::PERM_LOGGED,
|
||||
'permissionOtherLvPlan' => self::PERM_LOGGED,
|
||||
'compactibleEventTypes' => self::PERM_LOGGED,
|
||||
'getLeEvents' => self::PERM_LOGGED,
|
||||
'getLvEvents' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->library('LogLib');
|
||||
$this->loglib->setConfigs(array(
|
||||
$this->load->library('LogLib');
|
||||
$this->loglib->setConfigs(array(
|
||||
'classIndex' => 5,
|
||||
'functionIndex' => 5,
|
||||
'lineIndex' => 4,
|
||||
@@ -54,16 +63,22 @@ class LvPlan extends FHCAPI_Controller
|
||||
));
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('PhrasesLib');
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* fetches LvPlan and Moodle events together
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
* fetches LvPlan and Moodle events together
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
public function LvPlanEvents()
|
||||
{
|
||||
$hasLv = $this->input->post('lv_id');
|
||||
@@ -83,24 +98,31 @@ class LvPlan extends FHCAPI_Controller
|
||||
// form validation
|
||||
$this->form_validation->set_rules('start_date', "start_date", "required");
|
||||
$this->form_validation->set_rules('end_date', "end_date", "required");
|
||||
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
// storing the post parameter in local variables
|
||||
$start_date = $this->input->post('start_date', true);
|
||||
$end_date = $this->input->post('end_date', true);
|
||||
$uid = $this->input->post('uid', true);
|
||||
|
||||
// disallow accessing other user's events if missing permission
|
||||
if ($uid && $uid !== getAuthUID() && !$this->permissionlib->isBerechtigt('basis/other_lv_plan')) {
|
||||
$this->terminateWithError("Missing permission to view other users' timetables!");
|
||||
}
|
||||
|
||||
// fetching lvplan events
|
||||
$result = $this->stundenplanlib->getEventsUser($start_date, $end_date);
|
||||
$result = $this->stundenplanlib->getEventsUser($start_date, $end_date, $uid);
|
||||
|
||||
$lvplanEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
// fetching moodle events
|
||||
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date);
|
||||
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date, $uid);
|
||||
|
||||
// fetching ferien events
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date);
|
||||
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date, $uid);
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array_merge(
|
||||
$lvplanEvents,
|
||||
@@ -109,6 +131,45 @@ class LvPlan extends FHCAPI_Controller
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches LvPlan for studiengang / semester / verband / gruppe
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function eventsStgOrg()
|
||||
{
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
// form validation
|
||||
$this->form_validation->set_rules('start_date', "start_date", "required");
|
||||
$this->form_validation->set_rules('end_date', "end_date", "required");
|
||||
//$this->form_validation->set_rules('stg_kz', "stg_kz", "required"); //no validation show empty calendar
|
||||
|
||||
if (!$this->form_validation->run()) {
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
$stgOrgEvents = [];
|
||||
$ferienEvents = [];
|
||||
} else {
|
||||
$start_date = $this->input->post('start_date', true);
|
||||
$end_date = $this->input->post('end_date', true);
|
||||
$stg_kz = $this->input->post('stg_kz', true);
|
||||
$sem = $this->input->post('sem', true);
|
||||
$verband = $this->input->post('verband', true);
|
||||
$gruppe = $this->input->post('gruppe', true);
|
||||
|
||||
$result = $this->stundenplanlib->getEventsStgOrg($start_date, $end_date, $stg_kz, $sem, $verband, $gruppe);
|
||||
$stgOrgEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->stundenplanlib->fetchFerienTageEvents($start_date, $end_date, $stg_kz);
|
||||
$ferienEvents = $this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(array_merge(
|
||||
$stgOrgEvents,
|
||||
$ferienEvents
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches LvPlan and Ferien events together for the lv
|
||||
*
|
||||
@@ -122,7 +183,7 @@ class LvPlan extends FHCAPI_Controller
|
||||
$this->form_validation->set_rules('start_date', "start_date", "required");
|
||||
$this->form_validation->set_rules('end_date', "end_date", "required");
|
||||
$this->form_validation->set_rules('lv_id', "lv_id", "required|integer");
|
||||
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
@@ -137,7 +198,6 @@ class LvPlan extends FHCAPI_Controller
|
||||
|
||||
// fetching ferien events
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date);
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array_merge(
|
||||
$lvplanEvents,
|
||||
@@ -145,41 +205,75 @@ class LvPlan extends FHCAPI_Controller
|
||||
));
|
||||
}
|
||||
|
||||
public function getLeEvents($le_id = null, $start_date = null, $end_date = null, $stundenplan = 'stundenplandev')
|
||||
{
|
||||
|
||||
if (is_null($le_id) || is_null($start_date) || is_null($end_date))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if ($stundenplan !== 'stundenplandev' && $stundenplan !== 'stundenplan')
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$result = $this->stundenplanlib->getEventsByLE($le_id, $start_date, $end_date, $stundenplan);
|
||||
$lvplanEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($lvplanEvents);
|
||||
}
|
||||
|
||||
public function getLvEvents($lv_id = null, $start_date = null, $end_date = null, $stundenplan = 'stundenplandev')
|
||||
{
|
||||
if (is_null($lv_id) || is_null($start_date) || is_null($end_date))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if ($stundenplan !== 'stundenplandev' && $stundenplan !== 'stundenplan')
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$result = $this->stundenplanlib->getEventsByLV($lv_id, $start_date, $end_date, $stundenplan);
|
||||
|
||||
$this->terminateWithSuccess(hasData($result) ? getData($result) : []);
|
||||
}
|
||||
|
||||
//TODO: delete this function if we don't use the old calendar export endpoints anymore
|
||||
public function studiensemesterDateInterval($date){
|
||||
$this->load->model('organisation/Studiensemester_model','StudiensemesterModel');
|
||||
$studiensemester =$this->StudiensemesterModel->getByDate(date_format(date_create($date),'Y-m-d'));
|
||||
$studiensemester =current($this->getDataOrTerminateWithError($studiensemester));
|
||||
public function studiensemesterDateInterval($date)
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$studiensemester = $this->StudiensemesterModel->getByDate(date_format(date_create($date), 'Y-m-d'));
|
||||
$studiensemester = current($this->getDataOrTerminateWithError($studiensemester));
|
||||
$this->terminateWithSuccess($studiensemester);
|
||||
}
|
||||
|
||||
public function getLvPlanForStudiensemester($studiensemester,$lvid){
|
||||
public function getLvPlanForStudiensemester($studiensemester, $lvid)
|
||||
{
|
||||
$this->load->library('StundenplanLib');
|
||||
$this->load->model('organisation/Studiensemester_model','StudiensemesterModel');
|
||||
|
||||
$studiensemester_result = $this->StudiensemesterModel->loadWhere(["studiensemester_kurzbz"=>$studiensemester]);
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$studiensemester_result = $this->StudiensemesterModel->loadWhere(["studiensemester_kurzbz" => $studiensemester]);
|
||||
$studiensemester_result = current($this->getDataOrTerminateWithError($studiensemester_result));
|
||||
$timespan_start = new DateTime($studiensemester_result->start);
|
||||
$timespan_ende = new DateTime($studiensemester_result->ende);
|
||||
$lvplan = $this->stundenplanlib->getStundenplan(date_format($timespan_start, 'Y-m-d'),date_format($timespan_ende, 'Y-m-d'), $lvid);
|
||||
$lvplan = $this->stundenplanlib->getStundenplan(date_format($timespan_start, 'Y-m-d'), date_format($timespan_ende, 'Y-m-d'), $lvid);
|
||||
$this->terminateWithSuccess($lvplan);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* fetches Stunden layout from database
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
public function Stunden()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* fetches Stunden layout from database
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
public function Stunden()
|
||||
{
|
||||
$this->load->model('ressource/Stunde_model', 'StundeModel');
|
||||
|
||||
$this->StundeModel->addOrder('stunde', 'ASC');
|
||||
$stunden = $this->StundeModel->load();
|
||||
|
||||
$stunden = $this->getDataOrTerminateWithError($stunden);
|
||||
$stunden = $this->getDataOrTerminateWithError($stunden);
|
||||
|
||||
$this->terminateWithSuccess($stunden);
|
||||
}
|
||||
@@ -210,10 +304,10 @@ class LvPlan extends FHCAPI_Controller
|
||||
$roomplan_data = $this->stundenplanlib->getRoomplan($ort_kurzbz, $start_date, $end_date);
|
||||
|
||||
$roomplan_data = $this->getDataOrTerminateWithError($roomplan_data);
|
||||
|
||||
|
||||
$this->terminateWithSuccess($roomplan_data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gets the reservierungen of a room if the ort_kurzbz parameter is
|
||||
* supplied otherwise gets the reservierungen of the lvplan of a student
|
||||
@@ -226,25 +320,32 @@ class LvPlan extends FHCAPI_Controller
|
||||
{
|
||||
$this->form_validation->set_rules('start_date', "StartDate", "required");
|
||||
$this->form_validation->set_rules('end_date', "EndDate", "required");
|
||||
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
// storing the post parameter in local variables
|
||||
$start_date = $this->input->post('start_date', true);
|
||||
$end_date = $this->input->post('end_date', true);
|
||||
$uid = $this->input->post('uid', true);
|
||||
|
||||
// disallow accessing other user's reservierungen if missing permission
|
||||
if ($uid && $uid !== getAuthUID() && !$this->permissionlib->isBerechtigt('basis/other_lv_plan')) {
|
||||
$this->terminateWithError("Missing permission to view other users' timetables!");
|
||||
}
|
||||
|
||||
// get data
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$result = $this->stundenplanlib->getReservierungen($start_date, $end_date, $ort_kurzbz);
|
||||
$result = $this->stundenplanlib->getReservierungen($start_date, $end_date, $ort_kurzbz, $uid);
|
||||
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function getLehreinheitStudiensemester($lehreinheit_id){
|
||||
public function getLehreinheitStudiensemester($lehreinheit_id)
|
||||
{
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
$this->LehreinheitModel->addSelect(["studiensemester_kurzbz"]);
|
||||
$result = $this->LehreinheitModel->load($lehreinheit_id);
|
||||
@@ -287,6 +388,68 @@ class LvPlan extends FHCAPI_Controller
|
||||
return $this->terminateWithSuccess(current($result));
|
||||
}
|
||||
|
||||
public function getStudiengaenge()
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$this->StudiengangModel->addOrder('typ');
|
||||
$this->StudiengangModel->addOrder('kurzbz');
|
||||
$result = $this->StudiengangModel->loadWhere([
|
||||
'aktiv' => true
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLehrverband($studiengang_kz, $semester = null, $verband = null)
|
||||
{
|
||||
$this->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
|
||||
|
||||
$where = [
|
||||
'aktiv' => true,
|
||||
'studiengang_kz' => $studiengang_kz,
|
||||
];
|
||||
|
||||
if ($semester !== null && $semester !== 'null' && $semester !== 'undefined') {
|
||||
$where['semester'] = $semester;
|
||||
}
|
||||
if ($verband !== null && $verband !== 'null' && $verband !== 'undefined') {
|
||||
$where['verband'] = $verband;
|
||||
}
|
||||
|
||||
$this->LehrverbandModel->addOrder('studiengang_kz');
|
||||
$this->LehrverbandModel->addOrder('semester');
|
||||
$this->LehrverbandModel->addOrder('verband');
|
||||
$this->LehrverbandModel->addOrder('gruppe');
|
||||
$result = $this->LehrverbandModel->loadWhere($where);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user has permission to view other users' timetables
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function permissionOtherLvPlan()
|
||||
{
|
||||
$this->terminateWithSuccess($this->permissionlib->isBerechtigt('basis/other_lv_plan'));
|
||||
}
|
||||
|
||||
/**
|
||||
* get event types which can be compacted in lv plan display
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function compactibleEventTypes()
|
||||
{
|
||||
$this->terminateWithSuccess(["lehreinheit", "reservierung", "ferien", "moodle"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch moodle events
|
||||
*
|
||||
@@ -294,30 +457,34 @@ class LvPlan extends FHCAPI_Controller
|
||||
* @param string $end_date
|
||||
* @return array
|
||||
*/
|
||||
private function fetchMoodleEvents($start_date, $end_date)
|
||||
private function fetchMoodleEvents($start_date, $end_date, $uid = null)
|
||||
{
|
||||
if ($uid && $uid !== getAuthUID()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$this->load->config('calendar');
|
||||
|
||||
$tz = new DateTimeZone($this->config->item('timezone'));
|
||||
|
||||
|
||||
$start = new DateTime($start_date);
|
||||
$start->setTimezone($tz);
|
||||
|
||||
|
||||
$end = new DateTime($end_date);
|
||||
$end->setTimezone($tz);
|
||||
$end->modify('+1 day -1 second');
|
||||
|
||||
|
||||
$moodle_events = [];
|
||||
|
||||
|
||||
Events::trigger(
|
||||
'moodleCalendarEvents',
|
||||
function & () use (&$moodle_events) {
|
||||
function &() use (&$moodle_events) {
|
||||
return $moodle_events;
|
||||
},
|
||||
[
|
||||
'start_date' => $start->format('c'),
|
||||
'end_date' => $end->format('c'),
|
||||
'username' => getAuthUID()
|
||||
'username' => $uid ?? getAuthUID()
|
||||
]
|
||||
);
|
||||
|
||||
@@ -331,23 +498,23 @@ class LvPlan extends FHCAPI_Controller
|
||||
* @param string $end_date
|
||||
* @return array
|
||||
*/
|
||||
private function fetchFerienEvents($start_date, $end_date)
|
||||
private function fetchFerienEvents($start_date, $end_date, $uid = null)
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$this->load->model('education/Studentlehrverband_model', 'StudentLehrverbandModel');
|
||||
|
||||
$currentStudiensemester = $this->StudiensemesterModel->getByDate($start_date);
|
||||
$currentStudiensemester = $this->getDataOrTerminateWithError($currentStudiensemester);
|
||||
|
||||
|
||||
if ($currentStudiensemester) {
|
||||
$studentsemester_kurzbz = current($currentStudiensemester)->studiensemester_kurzbz;
|
||||
|
||||
$studiengang = $this->StudentLehrverbandModel->loadWhere([
|
||||
"student_uid" => getAuthUID(),
|
||||
"student_uid" => $uid ?? getAuthUID(),
|
||||
"studiensemester_kurzbz" => $studentsemester_kurzbz
|
||||
]);
|
||||
$studiengang = $this->getDataOrTerminateWithError($studiengang);
|
||||
|
||||
|
||||
if ($studiengang)
|
||||
$studiengang_kz = current($studiengang)->studiengang_kz;
|
||||
else
|
||||
@@ -357,7 +524,7 @@ class LvPlan extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
$ferienEvents = $this->stundenplanlib->fetchFerienTageEvents($start_date, $end_date, $studiengang_kz);
|
||||
|
||||
|
||||
return $this->getDataOrTerminateWithError($ferienEvents);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class MaZeitsperren extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getAllActiveZeitsperren' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getAllZeitsperrenFixeMa' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getAllZeitsperrenLector' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getAllZeitsperrenOes' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getZeitsperrenAss' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getStgLectors' => self::PERM_LOGGED,
|
||||
'loadZeitsperrenLectorStg' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'loadZeitsperrenMa' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getDetailsMa' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui',
|
||||
'person',
|
||||
'zeitsperren'
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('ressource/Zeitsperre_model', 'ZeitsperreModel');
|
||||
}
|
||||
|
||||
//only user with zeitsperren
|
||||
public function getAllActiveZeitsperren($days)
|
||||
{
|
||||
$result = $this->ZeitsperreModel->getZeitsperrenForNextDays($days);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
//TODO: check query: more results after join with hr-table
|
||||
//all fixe Ma
|
||||
public function getAllZeitsperrenFixeMa($days)
|
||||
{
|
||||
$von = date('Y-m-d');
|
||||
$bis = date('Y-m-d', strtotime("+{$days} days"));
|
||||
$result = $this->ZeitsperreModel->getMitarbeiterWithZeitsperren($von, $bis, true, false, null, false);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAllZeitsperrenLector($days)
|
||||
{
|
||||
$von = date('Y-m-d');
|
||||
$bis = date('Y-m-d', strtotime("+{$days} days"));
|
||||
$result = $this->ZeitsperreModel->getMitarbeiterWithZeitsperren($von, $bis, false, true, null, false);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getZeitsperrenAss($days)
|
||||
{
|
||||
$von = date('Y-m-d');
|
||||
$bis = date('Y-m-d', strtotime("+{$days} days"));
|
||||
$result = $this->ZeitsperreModel->getMitarbeiterWithZeitsperren($von, $bis, false, false, null, true);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAllZeitsperrenOes($days, $oe)
|
||||
{
|
||||
if(!$oe)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'OE Kurzbezeichnung']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$von = date('Y-m-d');
|
||||
$bis = date('Y-m-d', strtotime("+{$days} days"));
|
||||
$result = $this->ZeitsperreModel->getMitarbeiterWithZeitsperren($von, $bis, false, false, $oe, false);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function loadZeitsperrenLectorStg($days, $stg)
|
||||
{
|
||||
if(!$stg)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Studiengangskennzahl']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if(!is_numeric($stg))
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_paramNoNumber', ['param'=> 'Studiengangskennzahl']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$von = date('Y-m-d');
|
||||
$bis = date('Y-m-d', strtotime("+{$days} days"));
|
||||
$result = $this->ZeitsperreModel->getMitarbeiterWithZeitsperren($von, $bis, false, true, false, false, $stg);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getStgLectors()
|
||||
{
|
||||
$sql = "
|
||||
select
|
||||
studiengang_kz,
|
||||
kurzbz,
|
||||
kurzbzlang,
|
||||
typ,
|
||||
bezeichnung,
|
||||
kurzbzlang || ' (' || bezeichnung || ')' AS label,
|
||||
aktiv
|
||||
from
|
||||
public.tbl_studiengang
|
||||
where
|
||||
typ in ('b','m')
|
||||
order by typ asc, kurzbz Asc
|
||||
";
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$result = $this->StudiengangModel->execReadOnlyQuery($sql);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function loadZeitsperrenMa($days, $uid)
|
||||
{
|
||||
if ($uid === null || $uid === '')
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Mitarbeiter UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$result = $this->ZeitsperreModel->getZeitsperrenForNextDays($days, $uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getDetailsMa($uid)
|
||||
{
|
||||
if ($uid === null || $uid === '')
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Mitarbeiter UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$result = $this->PersonModel->getFullName($uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,948 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class NewsAdministrationAPI extends FHCAPI_Controller
|
||||
{
|
||||
/**
|
||||
* News API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getNews' => 'basis/news:r',
|
||||
'getNewsItem' => 'basis/news:r',
|
||||
'storeNewsItem' => 'basis/news:w',
|
||||
'updateNewsItem' => 'basis/news:w',
|
||||
'deleteNewsItem' => 'basis/news:w'
|
||||
]);
|
||||
|
||||
$this->load->model('content/Content_model', 'ContentModel');
|
||||
$this->load->model('content/Contentsprache_model', 'ContentspracheModel');
|
||||
$this->load->model('content/News_model', 'NewsModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->load->model('system/Sprache_model', 'SpracheModel');
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
|
||||
$this->loadPhrases([
|
||||
'global'
|
||||
]);
|
||||
|
||||
$this->load->library('CmsLib');
|
||||
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $titel = '', $active = true, $sichtbar = true)
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_data($_GET);
|
||||
$this->form_validation->set_rules('page','Page','required|is_natural');
|
||||
$this->form_validation->set_rules('page_size', 'PageSize', 'is_natural');
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$page = intval($this->input->get('page', true));
|
||||
$page_size = intval($this->input->get('page_size', true));
|
||||
$sprache = $this->input->get('sprache', true);
|
||||
if(!$sprache)
|
||||
{
|
||||
$sprache = getUserLanguage();
|
||||
}
|
||||
|
||||
// default value for the page_size is 10
|
||||
$page_size = $page_size ?? 10;
|
||||
|
||||
$passedSichtbar = $this->input->get('published', true);
|
||||
if($passedSichtbar !== null)
|
||||
{
|
||||
$sichtbar = $passedSichtbar;
|
||||
}
|
||||
|
||||
$passedIsActive = $this->input->get('isActive', true);
|
||||
if ($passedIsActive !== null)
|
||||
{
|
||||
$isActive = filter_var(
|
||||
$passedIsActive,
|
||||
FILTER_VALIDATE_BOOLEAN,
|
||||
FILTER_NULL_ON_FAILURE
|
||||
);
|
||||
if ($isActive !== null)
|
||||
{
|
||||
$active = $isActive;
|
||||
}
|
||||
}
|
||||
|
||||
$degreeProgramShortCode = $this->input->get('degreeProgramShortCode', true);
|
||||
if ($degreeProgramShortCode !== null && $degreeProgramShortCode !== '')
|
||||
{
|
||||
if (!ctype_digit((string)$degreeProgramShortCode))
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'degreeProgramShortCode' => 'A valid degree program is required'
|
||||
]);
|
||||
}
|
||||
$studiengang_kz = $degreeProgramShortCode;
|
||||
}
|
||||
|
||||
$passedSemester = $this->input->get('semester', true);
|
||||
if ($passedSemester !== null && $passedSemester !== '')
|
||||
{
|
||||
if (
|
||||
!ctype_digit((string)$passedSemester)
|
||||
|| (int)$passedSemester < 1
|
||||
|| (int)$passedSemester > 8
|
||||
)
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'semester' => 'A valid semester is required'
|
||||
]);
|
||||
}
|
||||
$semester = filter_var($passedSemester, FILTER_VALIDATE_INT);
|
||||
}
|
||||
|
||||
$entitledDegreePrograms = $this->permissionlib->getSTG_isEntitledFor("basis/news");
|
||||
|
||||
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, false, $titel, true, $sichtbar, $page, $page_size, $sprache, true, $entitledDegreePrograms, $active);
|
||||
$news = $this->getDataOrTerminateWithError($news);
|
||||
|
||||
$this->addMeta('row_count', $news["row_count"] ?? 0);
|
||||
$this->terminateWithSuccess($news["content"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one news entry with all available language versions for editing.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getNewsItem($newsId)
|
||||
{
|
||||
if (!is_numeric($newsId) || (int)$newsId < 1)
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'newsId' => 'A valid news ID is required'
|
||||
]);
|
||||
}
|
||||
|
||||
$newsId = (int)$newsId;
|
||||
$newsResult = $this->NewsModel->load($newsId);
|
||||
|
||||
if (isError($newsResult))
|
||||
{
|
||||
$this->terminateWithError(getError($newsResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if (!hasData($newsResult))
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'newsId' => 'The requested news entry does not exist'
|
||||
]);
|
||||
}
|
||||
|
||||
$news = current(getData($newsResult));
|
||||
$entitledDegreePrograms = $this->permissionlib->getSTG_isEntitledFor("basis/news");
|
||||
|
||||
if (!in_array($news->studiengang_kz, $entitledDegreePrograms)) {
|
||||
$this->terminateWithError('You are not entitled to access this news entry', self::ERROR_TYPE_PERMISSION);
|
||||
}
|
||||
$translationsResult = $this->ContentspracheModel->loadWhere([
|
||||
'content_id' => $news->content_id
|
||||
]);
|
||||
|
||||
if (isError($translationsResult))
|
||||
{
|
||||
$this->terminateWithError(getError($translationsResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$languages = [];
|
||||
|
||||
foreach ((array)getData($translationsResult) as $translation)
|
||||
{
|
||||
$languages[$translation->sprache] = true;
|
||||
}
|
||||
|
||||
$translations = [];
|
||||
|
||||
foreach (array_keys($languages) as $language)
|
||||
{
|
||||
$contentResult = $this->ContentModel->getContent(
|
||||
$news->content_id,
|
||||
$language,
|
||||
null,
|
||||
null,
|
||||
false
|
||||
);
|
||||
|
||||
if (isError($contentResult))
|
||||
{
|
||||
$this->terminateWithError(getError($contentResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$content = getData($contentResult);
|
||||
$document = new DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
if ($content->content !== '' && $document->loadXML($content->content) === false)
|
||||
{
|
||||
$this->terminateWithError(
|
||||
'The stored news content is invalid',
|
||||
self::ERROR_TYPE_GENERAL
|
||||
);
|
||||
}
|
||||
|
||||
$author = $document->getElementsByTagName('verfasser')->item(0);
|
||||
$title = $document->getElementsByTagName('betreff')->item(0);
|
||||
$text = $document->getElementsByTagName('text')->item(0);
|
||||
|
||||
$translations[] = [
|
||||
'language' => $language,
|
||||
'author' => $author ? $author->nodeValue : '',
|
||||
'title' => $title ? $title->nodeValue : '',
|
||||
'text' => $text ? str_replace('dms.php', APP_ROOT . 'cms/dms.php', $text->nodeValue) : '',
|
||||
'isPublished' => (bool)$content->sichtbar
|
||||
];
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess([
|
||||
'newsId' => (int)$news->news_id,
|
||||
'visibleFrom' => $news->datum,
|
||||
'visibleTo' => $news->datum_bis,
|
||||
'degreeProgramShortCode' => $news->studiengang_kz,
|
||||
'semester' => $news->semester,
|
||||
'translations' => $translations
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a news entry and all supplied translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function storeNewsItem()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
$postData = $this->input->post(null, true);
|
||||
$this->form_validation->set_data(is_array($postData) ? $postData : []);
|
||||
$this->form_validation->set_rules('visibleFrom', 'Visible from', 'required|is_valid_date');
|
||||
$this->form_validation->set_rules('visibleTo', 'Visible to', 'is_valid_date');
|
||||
$this->form_validation->set_rules(
|
||||
'degreeProgramShortCode',
|
||||
'Degree program',
|
||||
'required|is_natural'
|
||||
);
|
||||
$this->form_validation->set_rules(
|
||||
'semester',
|
||||
'Semester',
|
||||
'is_natural_no_zero|less_than_equal_to[8]'
|
||||
);
|
||||
|
||||
$errors = $this->form_validation->run() === false
|
||||
? $this->form_validation->error_array()
|
||||
: [];
|
||||
$visibleFrom = $this->input->post('visibleFrom', true);
|
||||
$visibleTo = $this->input->post('visibleTo', true);
|
||||
$translations = $this->input->post('translations', true);
|
||||
|
||||
if (
|
||||
is_string($visibleFrom)
|
||||
&& is_string($visibleTo)
|
||||
&& $visibleTo !== ''
|
||||
&& is_valid_date($visibleFrom)
|
||||
&& is_valid_date($visibleTo)
|
||||
&& new DateTime($visibleTo) < new DateTime($visibleFrom)
|
||||
)
|
||||
{
|
||||
$errors['visibleTo'] = 'Visible to must not be before Visible from';
|
||||
}
|
||||
|
||||
if (!is_array($translations) || count($translations) === 0)
|
||||
{
|
||||
$errors['translations'] = 'At least one translation is required';
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($translations as $index => $translation)
|
||||
{
|
||||
if (!is_array($translation))
|
||||
{
|
||||
$errors['translations.' . $index] = 'Each translation must be an object';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($errors) > 0)
|
||||
{
|
||||
$this->terminateWithValidationErrors($errors);
|
||||
}
|
||||
|
||||
|
||||
$this->_ensureUserIsEntitledForDegreeProgram($this->input->post('degreeProgramShortCode', true));
|
||||
|
||||
$degreeProgramShortCode = $this->input->post('degreeProgramShortCode', true);
|
||||
$semester = $this->input->post('semester', true);
|
||||
$semester = $semester === '' ? null : $semester;
|
||||
$visibleTo = $visibleTo === '' ? null : $visibleTo;
|
||||
|
||||
$studiengang = $this->_getStudiengang($degreeProgramShortCode);
|
||||
|
||||
$data = [
|
||||
'studiengang_kz' => $degreeProgramShortCode,
|
||||
'semester' => $semester,
|
||||
'datum' => $visibleFrom,
|
||||
'datum_bis' => $visibleTo,
|
||||
'translations' => []
|
||||
];
|
||||
|
||||
foreach ($translations as $index => $translation)
|
||||
{
|
||||
$data['translations'][$index] = [
|
||||
'sprache' => $translation['language'] ?? '',
|
||||
'verfasser' => $translation['author'] ?? '',
|
||||
'betreff' => $translation['title'] ?? '',
|
||||
'text' => $translation['text'] ?? '',
|
||||
'sichtbar' => isset($translation['isPublished']) ? (bool)$translation['isPublished'] : false
|
||||
];
|
||||
}
|
||||
|
||||
$this->_validateLanguages($data['translations']);
|
||||
|
||||
foreach ($data['translations'] as $index => $translation)
|
||||
{
|
||||
$data['translations'][$index]['content'] = $this->_buildNewsXml($translation);
|
||||
}
|
||||
|
||||
$uid = getAuthUID();
|
||||
$now = date('Y-m-d H:i:s');
|
||||
|
||||
if ($this->db->trans_begin() === false)
|
||||
{
|
||||
$this->terminateWithError($this->db->error(), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$contentResult = $this->ContentModel->insert([
|
||||
'template_kurzbz' => 'news',
|
||||
'oe_kurzbz' => $studiengang->oe_kurzbz,
|
||||
'aktiv' => true,
|
||||
'menu_open' => false,
|
||||
'insertamum' => $now,
|
||||
'insertvon' => $uid
|
||||
]);
|
||||
$contentId = (int)$this->_getInsertedIdOrRollback($contentResult);
|
||||
|
||||
$newsResult = $this->NewsModel->insert([
|
||||
'uid' => $uid,
|
||||
'studiengang_kz' => $data['studiengang_kz'],
|
||||
'semester' => $data['semester'],
|
||||
'datum' => $data['datum'],
|
||||
'datum_bis' => $data['datum_bis'],
|
||||
'content_id' => $contentId,
|
||||
'insertamum' => $now,
|
||||
'insertvon' => $uid,
|
||||
'updateamum' => $now,
|
||||
'updatevon' => $uid
|
||||
]);
|
||||
$newsId = (int)$this->_getInsertedIdOrRollback($newsResult);
|
||||
|
||||
foreach ($data['translations'] as $translation)
|
||||
{
|
||||
$translation['content'] = $this->formatContentURLsToRelative($translation['content']);
|
||||
|
||||
$translationResult = $this->ContentspracheModel->insert([
|
||||
'sprache' => $translation['sprache'],
|
||||
'content_id' => $contentId,
|
||||
'version' => 1,
|
||||
'sichtbar' => $translation['sichtbar'],
|
||||
'content' => $translation['content'],
|
||||
'titel' => $translation['betreff'],
|
||||
'insertamum' => $now,
|
||||
'insertvon' => $uid,
|
||||
'updateamum' => $now,
|
||||
'updatevon' => $uid
|
||||
]);
|
||||
|
||||
$this->_getInsertedIdOrRollback($translationResult);
|
||||
}
|
||||
|
||||
$newsItemResult = $this->NewsModel->load($newsId);
|
||||
$newsItem = $this->getDataOrTerminateWithError($newsItemResult);
|
||||
$newsItem = $newsItem[0];
|
||||
|
||||
$this->_sendNewsItemTranslationRequiredMail(
|
||||
$newsItem
|
||||
);
|
||||
|
||||
if ($this->db->trans_status() === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if ($this->db->trans_commit() === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($newsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a news entry and its supplied translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function updateNewsItem($newsId)
|
||||
{
|
||||
if (!is_numeric($newsId) || (int)$newsId < 1)
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'newsId' => 'A valid news ID is required'
|
||||
]);
|
||||
}
|
||||
|
||||
$newsId = (int)$newsId;
|
||||
$existingNewsResult = $this->NewsModel->load($newsId);
|
||||
|
||||
if (isError($existingNewsResult))
|
||||
{
|
||||
$this->terminateWithError(getError($existingNewsResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if (!hasData($existingNewsResult))
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'newsId' => 'The requested news entry does not exist'
|
||||
]);
|
||||
}
|
||||
|
||||
$existingNews = current(getData($existingNewsResult));
|
||||
|
||||
$this->_ensureUserIsEntitledForDegreeProgram($existingNews->studiengang_kz);
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$postData = $this->input->post(null, true);
|
||||
$this->form_validation->set_data(is_array($postData) ? $postData : []);
|
||||
$this->form_validation->set_rules('visibleFrom', 'Visible from', 'required|is_valid_date');
|
||||
$this->form_validation->set_rules('visibleTo', 'Visible to', 'is_valid_date');
|
||||
$this->form_validation->set_rules(
|
||||
'degreeProgramShortCode',
|
||||
'Degree program',
|
||||
'required|is_natural'
|
||||
);
|
||||
$this->form_validation->set_rules(
|
||||
'semester',
|
||||
'Semester',
|
||||
'is_natural_no_zero|less_than_equal_to[8]'
|
||||
);
|
||||
|
||||
$errors = $this->form_validation->run() === false
|
||||
? $this->form_validation->error_array()
|
||||
: [];
|
||||
$visibleFrom = $this->input->post('visibleFrom', true);
|
||||
$visibleTo = $this->input->post('visibleTo', true);
|
||||
$translations = $this->input->post('translations', true);
|
||||
|
||||
if (
|
||||
is_string($visibleFrom)
|
||||
&& is_string($visibleTo)
|
||||
&& $visibleTo !== ''
|
||||
&& is_valid_date($visibleFrom)
|
||||
&& is_valid_date($visibleTo)
|
||||
&& new DateTime($visibleTo) < new DateTime($visibleFrom)
|
||||
)
|
||||
{
|
||||
$errors['visibleTo'] = 'Visible to must not be before Visible from';
|
||||
}
|
||||
|
||||
if (!is_array($translations) || count($translations) === 0)
|
||||
{
|
||||
$errors['translations'] = 'At least one translation is required';
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($translations as $index => $translation)
|
||||
{
|
||||
if (!is_array($translation))
|
||||
{
|
||||
$errors['translations.' . $index] = 'Each translation must be an object';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($errors) > 0)
|
||||
{
|
||||
$this->terminateWithValidationErrors($errors);
|
||||
}
|
||||
|
||||
$degreeProgramShortCode = $this->input->post('degreeProgramShortCode', true);
|
||||
$semester = $this->input->post('semester', true);
|
||||
$semester = $semester === '' ? null : $semester;
|
||||
$visibleTo = $visibleTo === '' ? null : $visibleTo;
|
||||
|
||||
$studiengang = $this->_getStudiengang($degreeProgramShortCode);
|
||||
|
||||
$data = [
|
||||
'studiengang_kz' => $degreeProgramShortCode,
|
||||
'semester' => $semester,
|
||||
'datum' => $visibleFrom,
|
||||
'datum_bis' => $visibleTo,
|
||||
'translations' => []
|
||||
];
|
||||
|
||||
foreach ($translations as $index => $translation)
|
||||
{
|
||||
$data['translations'][$index] = [
|
||||
'sprache' => $translation['language'] ?? '',
|
||||
'verfasser' => $translation['author'] ?? '',
|
||||
'betreff' => $translation['title'] ?? '',
|
||||
'text' => $translation['text'] ?? '',
|
||||
'sichtbar' => isset($translation['isPublished']) ? (bool)$translation['isPublished'] : false
|
||||
];
|
||||
}
|
||||
|
||||
$this->_validateLanguages($data['translations']);
|
||||
|
||||
foreach ($data['translations'] as $index => $translation)
|
||||
{
|
||||
$data['translations'][$index]['content'] = $this->_buildNewsXml($translation);
|
||||
}
|
||||
|
||||
$uid = getAuthUID();
|
||||
$now = date('Y-m-d H:i:s');
|
||||
|
||||
if ($this->db->trans_begin() === false)
|
||||
{
|
||||
$this->terminateWithError($this->db->error(), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$contentResult = $this->ContentModel->update($existingNews->content_id, [
|
||||
'oe_kurzbz' => $studiengang->oe_kurzbz,
|
||||
'updateamum' => $now,
|
||||
'updatevon' => $uid
|
||||
]);
|
||||
|
||||
if (isError($contentResult))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError(getError($contentResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$newsResult = $this->NewsModel->update($newsId, [
|
||||
'studiengang_kz' => $data['studiengang_kz'],
|
||||
'semester' => $data['semester'],
|
||||
'datum' => $data['datum'],
|
||||
'datum_bis' => $data['datum_bis'],
|
||||
'updateamum' => $now,
|
||||
'updatevon' => $uid
|
||||
]);
|
||||
|
||||
if (isError($newsResult))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError(getError($newsResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$existingTranslationsResult = $this->ContentspracheModel->loadWhere([
|
||||
'content_id' => $existingNews->content_id
|
||||
]);
|
||||
|
||||
if (isError($existingTranslationsResult))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError(getError($existingTranslationsResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$existingTranslations = [];
|
||||
|
||||
foreach ((array)getData($existingTranslationsResult) as $existingTranslation)
|
||||
{
|
||||
$language = $existingTranslation->sprache;
|
||||
|
||||
if (
|
||||
!isset($existingTranslations[$language])
|
||||
|| (int)$existingTranslation->version > (int)$existingTranslations[$language]->version
|
||||
)
|
||||
{
|
||||
$existingTranslations[$language] = $existingTranslation;
|
||||
}
|
||||
}
|
||||
|
||||
$submittedLanguages = array_column($data['translations'], 'sprache');
|
||||
$this->db->where('content_id', $existingNews->content_id);
|
||||
$this->db->where_not_in('sprache', $submittedLanguages);
|
||||
|
||||
if ($this->db->delete('campus.tbl_contentsprache') === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
foreach ($data['translations'] as $translation)
|
||||
{
|
||||
$translation['content'] = $this->formatContentURLsToRelative($translation['content']);
|
||||
$translationData = [
|
||||
'sichtbar' => $translation['sichtbar'],
|
||||
'content' => $translation['content'],
|
||||
'titel' => $translation['betreff'],
|
||||
'updateamum' => $now,
|
||||
'updatevon' => $uid
|
||||
];
|
||||
|
||||
$existingTranslation = $existingTranslations[$translation['sprache']] ?? null;
|
||||
|
||||
if ($existingTranslation)
|
||||
{
|
||||
$translationResult = $this->ContentspracheModel->update(
|
||||
$existingTranslation->contentsprache_id,
|
||||
$translationData
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$translationResult = $this->ContentspracheModel->insert([
|
||||
'sprache' => $translation['sprache'],
|
||||
'content_id' => $existingNews->content_id,
|
||||
'version' => 1,
|
||||
'insertamum' => $now,
|
||||
'insertvon' => $uid
|
||||
] + $translationData);
|
||||
}
|
||||
|
||||
$this->_getInsertedIdOrRollback($translationResult);
|
||||
}
|
||||
|
||||
if ($this->db->trans_status() === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if ($this->db->trans_commit() === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($newsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes one news entry and its linked content.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function deleteNewsItem($newsId)
|
||||
{
|
||||
if (!is_numeric($newsId) || (int)$newsId < 1)
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'newsId' => 'A valid news ID is required'
|
||||
]);
|
||||
}
|
||||
|
||||
$newsId = (int)$newsId;
|
||||
$newsResult = $this->NewsModel->load($newsId);
|
||||
|
||||
if (isError($newsResult))
|
||||
{
|
||||
$this->terminateWithError(getError($newsResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if (!hasData($newsResult))
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'newsId' => 'The requested news entry does not exist'
|
||||
]);
|
||||
}
|
||||
|
||||
$news = current(getData($newsResult));
|
||||
|
||||
|
||||
$this->_ensureUserIsEntitledForDegreeProgram($news->studiengang_kz);
|
||||
|
||||
if ($this->db->trans_begin() === false)
|
||||
{
|
||||
$this->terminateWithError($this->db->error(), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$newsDeleteResult = $this->NewsModel->delete($newsId);
|
||||
|
||||
if (isError($newsDeleteResult))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError(getError($newsDeleteResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->db->where('content_id', $news->content_id);
|
||||
|
||||
if ($this->db->delete('campus.tbl_contentsprache') === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$contentDeleteResult = $this->ContentModel->delete($news->content_id);
|
||||
|
||||
if (isError($contentDeleteResult))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError(getError($contentDeleteResult), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if ($this->db->trans_status() === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if ($this->db->trans_commit() === false)
|
||||
{
|
||||
$error = $this->db->error();
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError($error, self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($newsId);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Loads the requested Studiengang or reports a validation error.
|
||||
*
|
||||
* @param integer $studiengangKz
|
||||
* @return stdClass
|
||||
*/
|
||||
private function _getStudiengang($studiengangKz)
|
||||
{
|
||||
$result = $this->StudiengangModel->load($studiengangKz);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->terminateWithValidationErrors([
|
||||
'studiengang_kz' => 'The requested Studiengang does not exist'
|
||||
]);
|
||||
}
|
||||
|
||||
$studiengaenge = getData($result);
|
||||
|
||||
return current($studiengaenge);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that all supplied languages exist in tbl_sprache.
|
||||
*
|
||||
* @param array $translations
|
||||
* @return void
|
||||
*/
|
||||
private function _validateLanguages($translations)
|
||||
{
|
||||
$languages = [];
|
||||
|
||||
foreach ($translations as $translation)
|
||||
{
|
||||
$languages[] = $translation['sprache'];
|
||||
}
|
||||
|
||||
$result = $this->SpracheModel->loadMultiple($languages);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$existingLanguages = [];
|
||||
|
||||
foreach ((array)getData($result) as $language)
|
||||
{
|
||||
$existingLanguages[$language->sprache] = true;
|
||||
}
|
||||
|
||||
$errors = [];
|
||||
|
||||
foreach ($translations as $index => $translation)
|
||||
{
|
||||
if (!isset($existingLanguages[$translation['sprache']]))
|
||||
{
|
||||
$errors['translations.' . $index . '.sprache'] = 'The requested language does not exist';
|
||||
}
|
||||
}
|
||||
|
||||
if (count($errors) > 0)
|
||||
{
|
||||
$this->terminateWithValidationErrors($errors);
|
||||
}
|
||||
}
|
||||
|
||||
private function _ensureUserIsEntitledForDegreeProgram($degreeProgramShortCode)
|
||||
{
|
||||
$entitledDegreePrograms = $this->permissionlib->getSTG_isEntitledFor("basis/news:w");
|
||||
if (!is_array($entitledDegreePrograms))
|
||||
{
|
||||
$this->terminateWithError('Failed to retrieve entitled degree programs for the user', self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if (!in_array($degreeProgramShortCode, $entitledDegreePrograms)) {
|
||||
$this->terminateWithError("User is not entitled for the specified degree program");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns an inserted identifier or rolls the transaction back on error.
|
||||
*
|
||||
* @param stdClass $result
|
||||
* @return mixed
|
||||
*/
|
||||
private function _getInsertedIdOrRollback($result)
|
||||
{
|
||||
if (isError($result))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
return getData($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the XML format consumed by existing news readers.
|
||||
*
|
||||
* @param array $translation
|
||||
* @return string
|
||||
*/
|
||||
private function _buildNewsXml($translation)
|
||||
{
|
||||
$document = new DOMDocument('1.0', 'UTF-8');
|
||||
$news = $document->createElement('news');
|
||||
$document->appendChild($news);
|
||||
|
||||
$this->_appendCdataElement($document, $news, 'verfasser', $translation['verfasser']);
|
||||
$this->_appendCdataElement($document, $news, 'betreff', $translation['betreff']);
|
||||
$this->_appendCdataElement($document, $news, 'text', $translation['text']);
|
||||
|
||||
return $document->saveXML($news);
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a CDATA element and safely preserves CDATA terminators.
|
||||
*
|
||||
* @param DOMDocument $document
|
||||
* @param DOMElement $parent
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
private function _appendCdataElement($document, $parent, $name, $value)
|
||||
{
|
||||
$element = $document->createElement($name);
|
||||
$parts = explode(']]>', $value);
|
||||
$lastIndex = count($parts) - 1;
|
||||
|
||||
foreach ($parts as $index => $part)
|
||||
{
|
||||
if ($index > 0)
|
||||
{
|
||||
$part = '>' . $part;
|
||||
}
|
||||
|
||||
if ($index < $lastIndex)
|
||||
{
|
||||
$part .= ']]';
|
||||
}
|
||||
|
||||
$element->appendChild($document->createCDATASection($part));
|
||||
}
|
||||
|
||||
$parent->appendChild($element);
|
||||
}
|
||||
|
||||
private function _sendNewsItemTranslationRequiredMail($newsItem)
|
||||
{
|
||||
$translatorsResult = $this->BenutzerfunktionModel->getBenutzerFunktionen("translate", $newsItem->studiengang_kz);
|
||||
$translators = $this->getDataOrTerminateWithError($translatorsResult);
|
||||
|
||||
$newsItemContentResult = $this->ContentspracheModel->loadWhere([
|
||||
'content_id' => $newsItem->content_id,
|
||||
'sprache' => 'German'
|
||||
]);
|
||||
$newsItemContentEntry = getData($newsItemContentResult)[0] ?? null;
|
||||
if ($newsItemContentEntry) {
|
||||
$newsItem->sichtbar = $newsItemContentEntry->sichtbar ?? false;
|
||||
$newsItem->content = $newsItemContentEntry->content;
|
||||
}
|
||||
$content = getData(
|
||||
$this->cmslib->createNewsContent(
|
||||
$this->cmslib->createNewsWrapper($newsItem, true),
|
||||
false,
|
||||
""
|
||||
)
|
||||
);
|
||||
|
||||
foreach ($translators as $translator) {
|
||||
sendSanchoMail(
|
||||
"Sancho_Mail_News_Translation_Req",
|
||||
[
|
||||
"newsItemUrl" => APP_ROOT . "cis.php/CisVue/Cms/newsAdministration?newsId=" . $newsItem->news_id,
|
||||
"newsItemAuthor" => $newsItem->verfasser,
|
||||
"newsItemSubject" => $newsItem->betreff,
|
||||
"newsItemContent" => $content
|
||||
],
|
||||
$translator->uid . "@" . DOMAIN,
|
||||
"Übersetzung erforderlich / Translation required"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function formatContentURLsToRelative($content)
|
||||
{
|
||||
$content = preg_replace(
|
||||
'#https?://[^"\'>\s]*/(dms\.php(?:\?[^"\'>\s]*)?)#i',
|
||||
'$1',
|
||||
$content
|
||||
);
|
||||
|
||||
$content = preg_replace(
|
||||
'#(?:\.\./)+[^"\'>\s]*/(dms\.php(?:\?[^"\'>\s]*)?)#i',
|
||||
'$1',
|
||||
$content
|
||||
);
|
||||
|
||||
$content = preg_replace(
|
||||
'#/[^"\'>\s]*/(dms\.php(?:\?[^"\'>\s]*)?)#i',
|
||||
'$1',
|
||||
$content
|
||||
);
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,8 @@ class Ort extends FHCAPI_Controller
|
||||
'ContentID' => self::PERM_LOGGED,
|
||||
'getOrtKurzbzContent' => self::PERM_LOGGED,
|
||||
'getRooms' => self::PERM_LOGGED,
|
||||
'getTypes' => self::PERM_LOGGED
|
||||
'getTypes' => self::PERM_LOGGED,
|
||||
'getRoomInfo' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->load->model('ressource/Ort_model', 'OrtModel');
|
||||
@@ -74,6 +75,8 @@ class Ort extends FHCAPI_Controller
|
||||
$vonStunde = getData($this->StundeModel->getStundeForTime($von))[0]->stunde;
|
||||
$bisStunde = getData($this->StundeModel->getStundeForTime($bis))[0]->stunde;
|
||||
|
||||
$this->load->model('ressource/Ort_model', 'OrtModel');
|
||||
|
||||
$params = array();
|
||||
$qry = "SELECT DISTINCT tbl_ort.*
|
||||
FROM public.tbl_ort JOIN public.tbl_ortraumtyp USING(ort_kurzbz)
|
||||
@@ -174,5 +177,16 @@ class Ort extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($content);
|
||||
}
|
||||
|
||||
public function getRoomInfo()
|
||||
{
|
||||
$ortKurzbz = $this->input->get("ortKurzbz");
|
||||
|
||||
$roomResult = $this->OrtModel->getRoomInfo($ortKurzbz);
|
||||
$roomData = $this->getDataOrTerminateWithError($roomResult);
|
||||
$room = count($roomData) ? $roomData[0] : null;
|
||||
|
||||
$this->terminateWithSuccess($room);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class OtherLvPlan extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'otherLvPlanViewData' => ['basis/other_lv_plan:r'],
|
||||
]);
|
||||
|
||||
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||
$this->load->library('ProfilLib');
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* retrieves viewData for other lv plan view
|
||||
* @access public
|
||||
* @param $uid the userID for which the other lv plan is being viewed
|
||||
*/
|
||||
public function otherLvPlanViewData($uid)
|
||||
{
|
||||
$isMitarbeiterResult = $this->MitarbeiterModel->isMitarbeiter($uid);
|
||||
$isMitarbeiter = getData($isMitarbeiterResult);
|
||||
$isStudent = !$isMitarbeiter;
|
||||
|
||||
$resProfileData = $this->profillib->getView($uid);
|
||||
$profileData = hasData($resProfileData) ? getData($resProfileData) : null;
|
||||
|
||||
$viewData = [
|
||||
"user_data" => [
|
||||
"username" => $uid,
|
||||
"is_student" => $isStudent,
|
||||
"is_mitarbeiter" => $isMitarbeiter,
|
||||
"foto" => $profileData->data->foto,
|
||||
"vorname" => $profileData->data->vorname,
|
||||
"nachname" => $profileData->data->nachname,
|
||||
"titel" => $profileData->data->titel,
|
||||
"postnomen" => $profileData->data->postnomen,
|
||||
],
|
||||
];
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Permission extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getPermissions' => self::PERM_LOGGED,
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* retrieves permissions for auth user
|
||||
* @access public
|
||||
*/
|
||||
public function getPermissions()
|
||||
{
|
||||
$permissionsParam = $this->input->post("permissions");
|
||||
if (!$permissionsParam || !is_array($permissionsParam)) {
|
||||
$this->terminateWithError("Invalid parameter!");
|
||||
}
|
||||
|
||||
$permissions = [];
|
||||
foreach ($permissionsParam as $permission) {
|
||||
$permissions[$permission] = $this->permissionlib->isBerechtigt($permission);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($permissions);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ class Phrasen extends FHCAPI_Controller
|
||||
'setLanguage' => self::PERM_ANONYMOUS,
|
||||
'getLanguage' => self::PERM_ANONYMOUS,
|
||||
'getAllLanguages' => self::PERM_ANONYMOUS,
|
||||
'getPhrases' => self::PERM_ANONYMOUS,
|
||||
'getTabulatorPhrases' => self::PERM_ANONYMOUS,
|
||||
]);
|
||||
|
||||
$this->load->helper('hlp_language');
|
||||
@@ -92,4 +94,59 @@ class Phrasen extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($langs);
|
||||
}
|
||||
|
||||
public function getPhrases()
|
||||
{
|
||||
$postParams = $this->getPostJSON();
|
||||
|
||||
$languages = $postParams->languages;
|
||||
if (!$languages || !count($languages)) {
|
||||
$this->load->model('system/Sprache_model', 'sprachenModel');
|
||||
$activeLanguages = $this->sprachenModel->loadWhere(array('content' => true));
|
||||
$activeLanguagesData = $this->getDataOrTerminateWithError($activeLanguages);
|
||||
$languages = array_map(
|
||||
function ($languageData) {
|
||||
return $languageData->sprache;
|
||||
},
|
||||
$activeLanguagesData
|
||||
);
|
||||
}
|
||||
|
||||
$this->load->model('system/Phrase_model', 'phraseModel');
|
||||
$phrasesGroupedByCategory = $postParams->phrasesGroupedByCategory;
|
||||
$result = [];
|
||||
foreach ($languages as $language) {
|
||||
$phrases = $this->phraseModel->getPhrasesByCategoryAndPhrasesAndLanguage($phrasesGroupedByCategory, $language);
|
||||
$result[$language] = $this->getDataOrTerminateWithError($phrases);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function getTabulatorPhrases()
|
||||
{
|
||||
$languages = json_decode($this->input->get('languages'));
|
||||
if (!$languages || !count($languages)) {
|
||||
$this->load->model('system/Sprache_model', 'sprachenModel');
|
||||
$activeLanguages = $this->sprachenModel->loadWhere(array('content' => true));
|
||||
$activeLanguagesData = $this->getDataOrTerminateWithError($activeLanguages);
|
||||
$languages = array_map(
|
||||
function ($languageData) {
|
||||
return $languageData->sprache;
|
||||
},
|
||||
$activeLanguagesData
|
||||
);
|
||||
}
|
||||
|
||||
$this->load->model('system/Phrase_model', 'phraseModel');
|
||||
$result = [];
|
||||
foreach ($languages as $language) {
|
||||
$tabulatorPhrases = $this->phraseModel->getPhrasesByCategoryAndLanguage(['tabulator'], $language);
|
||||
$result[$language] = $this->getDataOrTerminateWithError($tabulatorPhrases);
|
||||
}
|
||||
|
||||
header('Pragma: private');
|
||||
header('Cache-Control: private, max-age=' . (60 * 60 * 24 * 30));
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,7 +16,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Profil extends FHCAPI_Controller
|
||||
{
|
||||
@@ -27,13 +28,13 @@ class Profil extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'fotoSperre' => self::PERM_LOGGED,
|
||||
'fotoSperre' => self::PERM_LOGGED,
|
||||
'getGemeinden' => self::PERM_LOGGED,
|
||||
'getAllNationen' => self::PERM_LOGGED,
|
||||
'isMitarbeiter' => self::PERM_LOGGED,
|
||||
'profilViewData' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
|
||||
@@ -48,28 +49,37 @@ class Profil extends FHCAPI_Controller
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
public function profilViewData($uid=null){
|
||||
|
||||
/**
|
||||
* retrieves view data for profile view
|
||||
* @access public
|
||||
* @param $uid the userID for which profile is being viewed, null or missing value implies one's own profile
|
||||
*/
|
||||
public function profilViewData($uid = null)
|
||||
{
|
||||
$authUid = getAuthUID();
|
||||
$isProfilOfAuthUser = !$uid || $uid === $authUid;
|
||||
|
||||
$this->load->library('ProfilLib');
|
||||
$editable = false;
|
||||
if(isset($uid) && $uid != null){
|
||||
$profil_data = $this->profillib->getView($uid);
|
||||
if($uid == getAuthUID()){
|
||||
$editable = true;
|
||||
}
|
||||
}else{
|
||||
$editable = true;
|
||||
$profil_data = $this->profillib->getView(getAuthUID());
|
||||
$profileData = $this->profillib->getView($uid ?? $authUid);
|
||||
$profileData = hasData($profileData) ? getData($profileData) : null;
|
||||
|
||||
$viewData = [
|
||||
'editable' => $isProfilOfAuthUser,
|
||||
'profil_data' => $profileData,
|
||||
'permissions' => [
|
||||
'basis/other_lv_plan' => $this->permissionlib->isBerechtigt(('basis/other_lv_plan'))
|
||||
]
|
||||
];
|
||||
|
||||
if ($isProfilOfAuthUser) {
|
||||
$viewData['calendar_sync_urls'] = $this->getCalendarSyncUrlData();
|
||||
}
|
||||
|
||||
$profil_data = hasData($profil_data) ? getData($profil_data) : null;
|
||||
$viewData = array(
|
||||
'editable'=>$editable,
|
||||
'profil_data' => $profil_data,
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* update column foto_sperre in public.tbl_person
|
||||
* @access public
|
||||
* @param boolean $value new value for the column
|
||||
@@ -77,9 +87,9 @@ class Profil extends FHCAPI_Controller
|
||||
*/
|
||||
public function fotoSperre($value)
|
||||
{
|
||||
if(!isset($value)){
|
||||
$this->terminateWithError("Missing parameter", self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if (!isset($value)) {
|
||||
$this->terminateWithError("Missing parameter", self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$res = $this->PersonModel->update($this->pid, ["foto_sperre" => $value]);
|
||||
if (isError($res)) {
|
||||
@@ -87,10 +97,10 @@ class Profil extends FHCAPI_Controller
|
||||
}
|
||||
$this->PersonModel->addSelect("foto_sperre");
|
||||
$res = $this->PersonModel->load($this->pid);
|
||||
|
||||
$res = $this->getDataOrTerminateWithError($res);
|
||||
|
||||
$this->terminateWithSuccess(current($res));
|
||||
|
||||
$res = $this->getDataOrTerminateWithError($res);
|
||||
|
||||
$this->terminateWithSuccess(current($res));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,7 +119,7 @@ class Profil extends FHCAPI_Controller
|
||||
if (isError($nation_res)) {
|
||||
$this->terminateWithError("error while trying to query table codex.tbl_nation", self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
|
||||
$nation_res = $this->getDataOrTerminateWithError($nation_res);
|
||||
|
||||
$this->terminateWithSuccess($nation_res);
|
||||
@@ -117,30 +127,30 @@ class Profil extends FHCAPI_Controller
|
||||
|
||||
public function getGemeinden($nation, $zip)
|
||||
{
|
||||
if(!isset($nation) || !isset($zip)){
|
||||
if (!isset($nation) || !isset($zip)) {
|
||||
echo json_encode(error("Missing parameters"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->load->model('codex/Gemeinde_model', "GemeindeModel");
|
||||
|
||||
|
||||
|
||||
$gemeinde_res = $this->GemeindeModel->getGemeindeByPlz($zip);
|
||||
|
||||
|
||||
if (isError($gemeinde_res)) {
|
||||
$this->terminateWithError(getError($gemeinde_res),self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError(getError($gemeinde_res), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$gemeinde_res = $this->getDataOrTerminateWithError($gemeinde_res);
|
||||
|
||||
|
||||
/* $gemeinde_res = array_map(function ($obj) {
|
||||
return $obj->ortschaftsname;
|
||||
}, $gemeinde_res); */
|
||||
|
||||
$this->terminateWithSuccess($gemeinde_res);
|
||||
|
||||
$this->terminateWithSuccess($gemeinde_res);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* checks whether a specific userID is a mitarbeiter or not (foreword declaration of the function isMitarbeiter in Mitarbeiter_model.php)
|
||||
* @access public
|
||||
@@ -150,23 +160,48 @@ class Profil extends FHCAPI_Controller
|
||||
public function isMitarbeiter($uid)
|
||||
{
|
||||
|
||||
if(!$uid) $this->terminateWithError("No uid provided", self::ERROR_TYPE_GENERAL);
|
||||
|
||||
|
||||
if (!$uid)
|
||||
$this->terminateWithError("No uid provided", self::ERROR_TYPE_GENERAL);
|
||||
|
||||
|
||||
$result = $this->MitarbeiterModel->isMitarbeiter($uid);
|
||||
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError("error when calling Mitarbeiter_model function isMitarbeiter with uid " . $uid, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
|
||||
/**
|
||||
* gets the identifier, phrase, and url for each calendar sync option
|
||||
* @access private
|
||||
* @return array array of arrays, where each child array is a sync option
|
||||
*/
|
||||
private function getCalendarSyncUrlData()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"identifier" => "cal_dav",
|
||||
"labelPhrase" => "profil/calendar_sync_cal_dav",
|
||||
"url" => APP_ROOT . "webdav/lvplan.php/calendars/" . $this->uid . "/LVPlan-" . $this->uid,
|
||||
],
|
||||
[
|
||||
"identifier" => "cal_dav_principal",
|
||||
"labelPhrase" => "profil/calendar_sync_cal_dav_principal",
|
||||
"url" => APP_ROOT . "webdav/lvplan.php/principals/" . $this->uid,
|
||||
],
|
||||
[
|
||||
"identifier" => "i_cal",
|
||||
"labelPhrase" => "profil/calendar_sync_i_cal",
|
||||
"url" => APP_ROOT . "webdav/google.php?cal=" . encryptData($this->uid, LVPLAN_CYPHER_KEY) . "&" . microtime(true),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Reservierung extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getMyReservation' => 'basis/cis:r',
|
||||
'deleteReservation' => 'lehre/reservierung:rw'
|
||||
]);
|
||||
|
||||
$this->load->model('ressource/Reservierung_model', 'ReservierungModel');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all reservations from lehre.vw_reservation of the logged in user
|
||||
*/
|
||||
public function getMyReservation()
|
||||
{
|
||||
$result = $this->ReservierungModel->getMyReservation();
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* deletes a reservation by ID
|
||||
*/
|
||||
public function deleteReservation()
|
||||
{
|
||||
$reservierung_id = $this->input->post('reservierung_id');
|
||||
|
||||
|
||||
if ($reservierung_id === NULL || trim((string)$reservierung_id) === '') {
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
|
||||
$result = $this->ReservierungModel->deleteReservation($reservierung_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class StgOrgLvPlan extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'stgOrgLvPlanViewData' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* fetches view data for stg org lv plan
|
||||
* @access public
|
||||
*/
|
||||
public function stgOrgLvPlanViewData()
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$this->StudiengangModel->addOrder('typ');
|
||||
$this->StudiengangModel->addOrder('kurzbz');
|
||||
$result = $this->StudiengangModel->loadWhere([
|
||||
'aktiv' => true
|
||||
]);
|
||||
$studiengaenge = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$viewData = array(
|
||||
'studiengaenge' => $studiengaenge,
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class Studgang extends FHCAPI_Controller
|
||||
{
|
||||
parent::__construct([
|
||||
'getStudiengangInfo'=> self::PERM_LOGGED,
|
||||
|
||||
'getDegreePrograms'=> self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
@@ -43,15 +43,46 @@ class Studgang extends FHCAPI_Controller
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getStudiengangInfo(){
|
||||
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
|
||||
$isMitarbeiter = $this->getDataOrTerminateWithError($isMitarbeiter);
|
||||
if($isMitarbeiter) {
|
||||
$this->terminateWithSuccess(null);
|
||||
public function getDegreePrograms() {
|
||||
$entitledDegreePrograms = $this->permissionlib->getSTG_isEntitledFor("basis/news");
|
||||
if (!$entitledDegreePrograms) {
|
||||
$this->terminateWithError("User is not entitled for any degree program");
|
||||
}
|
||||
|
||||
|
||||
$activeDegreePrograms = $this->StudiengangModel->getDegreePrograms();
|
||||
$activeDegreePrograms= $this->getDataOrTerminateWithError($activeDegreePrograms);
|
||||
|
||||
$activeDegreePrograms = array_values(array_filter($activeDegreePrograms, function($degreeProgram) use ($entitledDegreePrograms) {
|
||||
return in_array($degreeProgram->studiengang_kz, $entitledDegreePrograms);
|
||||
}));
|
||||
|
||||
$this->terminateWithSuccess($activeDegreePrograms);
|
||||
}
|
||||
|
||||
public function getStudiengangInfo(){
|
||||
$studiengang_kz = $this->input->get('studiengang_kz', true);
|
||||
$semester = $this->input->get('semester', true);
|
||||
|
||||
// without a Studiengang the info of the logged in Student is returned
|
||||
if (!is_numeric($studiengang_kz))
|
||||
{
|
||||
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
|
||||
$isMitarbeiter = $this->getDataOrTerminateWithError($isMitarbeiter);
|
||||
if($isMitarbeiter) {
|
||||
$this->terminateWithSuccess(null);
|
||||
}
|
||||
|
||||
$studiengang_kz = null;
|
||||
$semester = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$studiengang_kz = (int)$studiengang_kz;
|
||||
$semester = is_numeric($semester) ? (int)$semester : null;
|
||||
}
|
||||
|
||||
// fetches the Studiengang Information which is used next to the news
|
||||
$studiengangInfo = $this->StudiengangModel->getStudiengangInfoForNews();
|
||||
$studiengangInfo = $this->StudiengangModel->getStudiengangInfoForNews($studiengang_kz, $semester);
|
||||
$studiengangInfo= $this->getDataOrTerminateWithError($studiengangInfo);
|
||||
$this->terminateWithSuccess($studiengangInfo);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Studiensemester extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
private $_ci;
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getStudiensemester'=> self::PERM_LOGGED,
|
||||
|
||||
]);
|
||||
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* GET METHOD
|
||||
* returns List of all studiensemester as well as current one
|
||||
*/
|
||||
public function getStudiensemester()
|
||||
{
|
||||
$this->_ci->StudiensemesterModel->addOrder("start", "DESC");
|
||||
$result = $this->_ci->StudiensemesterModel->load();
|
||||
|
||||
$studiensemester = getData($result);
|
||||
$result = $this->_ci->StudiensemesterModel->getAkt();
|
||||
$aktuell = getData($result);
|
||||
|
||||
$this->terminateWithSuccess(array($studiensemester, $aktuell));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -62,21 +62,36 @@ class Studium extends FHCAPI_Controller
|
||||
|
||||
if($this->getDataOrTerminateWithError($this->StudentModel->isStudent(getAuthUID()))){
|
||||
$studentLehrverband =$this->StudentlehrverbandModel->loadWhere(["student_uid" => getAuthUID(), "studiensemester_kurzbz" => $aktuelles_studiensemester->studiensemester_kurzbz]);
|
||||
$studentLehrverband = current($this->getDataOrTerminateWithError($studentLehrverband));
|
||||
|
||||
$student_studiensemester = $studentLehrverband->studiensemester_kurzbz;
|
||||
$student_studiengang = $studentLehrverband->studiengang_kz;
|
||||
$student_semester = $studentLehrverband->semester;
|
||||
|
||||
//TODO(Manu) check if use Fallback or just comment out all paramschecks?
|
||||
//add Fallback: if no LehrverbandData of actual semester, get Data of previous one
|
||||
if(!hasData($studentLehrverband))
|
||||
{
|
||||
$result= $this->StudiensemesterModel->getPreviousFrom($aktuelles_studiensemester->studiensemester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$vorheriges_studiensemester = current($data)->studiensemester_kurzbz;
|
||||
$studentLehrverband =$this->StudentlehrverbandModel->loadWhere(["student_uid" => getAuthUID(), "studiensemester_kurzbz" => $vorheriges_studiensemester]);
|
||||
}
|
||||
$studentLehrverband = current(getData($studentLehrverband));
|
||||
|
||||
$student_studienplan = $this->getStudienPlanFromPrestudentStatus(getAuthPersonId())->studienplan_id;
|
||||
|
||||
if(!isset($parameter_studiensemester))
|
||||
$parameter_studiensemester = $student_studiensemester;
|
||||
if(!isset($parameter_studiengang))
|
||||
$parameter_studiengang = $student_studiengang;
|
||||
if(!isset($parameter_semester))
|
||||
$parameter_semester = $student_semester;
|
||||
if(!isset($parameter_studiensemester)) {
|
||||
$student_studiensemester = $studentLehrverband->studiensemester_kurzbz;
|
||||
$parameter_studiensemester = $student_studiensemester;
|
||||
}
|
||||
if(!isset($parameter_studiengang)) {
|
||||
$student_studiengang = $studentLehrverband->studiengang_kz;
|
||||
$parameter_studiengang = $student_studiengang;
|
||||
}
|
||||
if(!isset($parameter_semester)) {
|
||||
$student_semester = $studentLehrverband->semester;
|
||||
$parameter_semester = $student_semester;
|
||||
}
|
||||
if(!isset($parameter_studienplan))
|
||||
$parameter_studienplan = $student_studienplan;
|
||||
$parameter_studienplan = $student_studienplan;
|
||||
|
||||
}
|
||||
|
||||
if(isset($parameter_studiensemester)){
|
||||
@@ -96,8 +111,7 @@ class Studium extends FHCAPI_Controller
|
||||
|
||||
// fetch studiensemester
|
||||
$allStudienSemester = $this->getDataOrTerminateWithError($this->StudiensemesterModel->load());
|
||||
|
||||
|
||||
|
||||
if(isset($parameter_studiensemester) && !empty(array_filter($allStudienSemester, function($studiensemester) use($parameter_studiensemester){
|
||||
return $studiensemester->studiensemester_kurzbz == $parameter_studiensemester->studiensemester_kurzbz;
|
||||
}))){
|
||||
@@ -153,7 +167,9 @@ class Studium extends FHCAPI_Controller
|
||||
if($aktuelles_studienplan){
|
||||
$lehrveranstaltungen = $this->computeStudienplanLehrveranstaltungen($aktuelles_studienplan->studienplan_id, $aktuelles_semester);
|
||||
foreach($lehrveranstaltungen as $lehrv){
|
||||
foreach($lehrv->lehrveranstaltungen as $lv){
|
||||
// a lehrveranstaltung without a modul has no children and gets its lektoren directly
|
||||
$lvs = isset($lehrv->lehrveranstaltungen) ? $lehrv->lehrveranstaltungen : [$lehrv];
|
||||
foreach($lvs as $lv){
|
||||
$lvLektoren =$this->computeLektorenFromLehrveranstaltung($lv->lehrveranstaltung_id,$aktuelles_semester, $aktuelles_studiengang->studiengang_kz, $aktuelles_studiensemester->studiensemester_kurzbz);
|
||||
$lv->lektoren = $lvLektoren;
|
||||
}
|
||||
@@ -216,6 +232,8 @@ class Studium extends FHCAPI_Controller
|
||||
$studienplaene = array_map(function($studienplan){
|
||||
$orgform = current($this->getDataOrTerminateWithError($this->OrgformModel->loadWhere(["orgform_kurzbz" => $studienplan->orgform_kurzbz])));
|
||||
$studienplan->orgform_bezeichnung = $orgform->bezeichnung;
|
||||
// bezeichnung_mehrsprachig
|
||||
$studienplan->orgform_bezeichnung_english = $orgform->bezeichnung_mehrsprachig[1];
|
||||
return $studienplan;
|
||||
},$studienplaene);
|
||||
return $studienplaene;
|
||||
@@ -270,6 +288,7 @@ SELECT tbl_lehrveranstaltung.*,
|
||||
$lehrveranstaltungen = $this->LehrveranstaltungModel->execReadOnlyQuery($query,[$studienplan_id, $semester]);
|
||||
|
||||
$lehrveranstaltungen = $this->getDataOrTerminateWithError($lehrveranstaltungen);
|
||||
|
||||
usort($lehrveranstaltungen, function($a, $b){
|
||||
if($a->lehrtyp_kurzbz == "modul"){
|
||||
return -1;
|
||||
@@ -286,12 +305,17 @@ SELECT tbl_lehrveranstaltung.*,
|
||||
}
|
||||
else{
|
||||
$parent =array_filter($carry, function($item)use($lehrv){
|
||||
return $item->studienplan_lehrveranstaltung_id == $lehrv->studienplan_lehrveranstaltung_id_parent;
|
||||
return isset($item->lehrveranstaltungen)
|
||||
&& $item->studienplan_lehrveranstaltung_id == $lehrv->studienplan_lehrveranstaltung_id_parent;
|
||||
});
|
||||
$parent = current($parent);
|
||||
if($parent){
|
||||
$parent->lehrveranstaltungen[] = $lehrv;
|
||||
}
|
||||
else{
|
||||
// lehrveranstaltung without a modul: keep it on the top level
|
||||
array_push($carry, $lehrv);
|
||||
}
|
||||
}
|
||||
return $carry;
|
||||
}, []);
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class StudstatusAntraege extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getTodos' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
//load models
|
||||
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* gets all todos of antraegen of the user with stg leitungsfunction
|
||||
* or list of open antraege for user with assistance function
|
||||
* @access public
|
||||
* @return array || []
|
||||
*/
|
||||
public function getTodos()
|
||||
{
|
||||
$uid = getAuthUID();
|
||||
|
||||
//at first get studiengang with leitungsfunktion
|
||||
$result = $this->BenutzerfunktionModel->getSTGLByUID($uid);
|
||||
|
||||
if(hasData($result))
|
||||
{
|
||||
$funktionen = getData($result);
|
||||
|
||||
$studiengaenge = [];
|
||||
|
||||
foreach ($funktionen as $funktion) {
|
||||
$studiengaenge[] = $funktion->studiengang_kz;
|
||||
}
|
||||
|
||||
$dataAntrage = [];
|
||||
|
||||
$result = $this->StudierendenantragModel->getOpenAntraegeForStgl($studiengaenge);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$dataAntrage[] = getData($result) ?: [];
|
||||
$statusRole = 1;
|
||||
|
||||
$this->terminateWithSuccess([count($dataAntrage) > 0 ? $dataAntrage[0] : $dataAntrage, $statusRole]);
|
||||
|
||||
}
|
||||
|
||||
//TODO delete after check if needed or not
|
||||
//get studiengaenge of assistance (regarding benutzerfunktion)
|
||||
//$result = $this->BenutzerfunktionModel->getSTGAssByUID($uid);
|
||||
/* if(hasData($result)) {
|
||||
$statusRole = 2;
|
||||
$funktionen = getData($result);
|
||||
|
||||
$studiengaenge = [];
|
||||
|
||||
foreach ($funktionen as $funktion) {
|
||||
$studiengaenge[] = $funktion->studiengang_kz;
|
||||
}
|
||||
|
||||
$ci->addMeta('stgAss', $studiengaenge);
|
||||
$dataAntrage = [];
|
||||
|
||||
foreach ($studiengaenge as $studiengang)
|
||||
{
|
||||
$result = $this->StudierendenantragModel->getOpenAntraegeForAss($studiengang);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if(hasData($result)) {
|
||||
$dataAntrage[] = getData($result);
|
||||
$statusRole = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$statusRole = 0;
|
||||
$dataAntrage = [];
|
||||
//$this->terminateWithSuccess([[], $statusRole]);
|
||||
}*/
|
||||
|
||||
//get studiengaenge of assistance (regarding rights)
|
||||
$stgAss = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
if(!is_array($stgAss))
|
||||
{
|
||||
$statusRole = 0;
|
||||
$this->terminateWithSuccess([[], $statusRole]);
|
||||
}
|
||||
else {
|
||||
$statusRole = 2;
|
||||
$studiengaenge = [];
|
||||
|
||||
foreach ($stgAss as $stg) {
|
||||
$studiengaenge[] = (int) $stg;
|
||||
}
|
||||
|
||||
$dataAntrage = [];
|
||||
$result = $this->StudierendenantragModel->getOpenAntraegeForAss($studiengaenge);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if(hasData($result)) {
|
||||
$dataAntrage[] = getData($result);
|
||||
$statusRole = 2;
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess([count($dataAntrage) > 0 ? $dataAntrage[0] : $dataAntrage, $statusRole]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the PhrasesLib (back-end)
|
||||
* Provides data to the ajax get calls about the Phrasen plugin
|
||||
* This controller works with JSON calls on the HTTP GET and the output is always JSON
|
||||
*/
|
||||
class TabulatorPresets extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getTabulatorPresets' => self::PERM_LOGGED,
|
||||
'createTabulatorPreset' => self::PERM_LOGGED,
|
||||
'updateTabulatorPreset' => self::PERM_LOGGED,
|
||||
'deleteTabulatorPreset' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->model('tabulator/Tabulator_preset_model', 'TabulatorPresetModel');
|
||||
|
||||
$this->loadPhrases([
|
||||
'global',
|
||||
'tabulator_presets'
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getTabulatorPresets()
|
||||
{
|
||||
$tableName = $this->input->get("tableName");
|
||||
if (!$tableName) {
|
||||
$this->terminateWithError(error($this->p->t("tabulator_presets", "invalid_params_err_msg")));
|
||||
}
|
||||
|
||||
$uid = getAuthUID();
|
||||
$presets = $this->TabulatorPresetModel->getTabulatorPresetsByUserAndTable($uid, $tableName);
|
||||
$presetsData = $this->getDataOrTerminateWithError($presets) ?? [];
|
||||
|
||||
$this->terminateWithSuccess($presetsData);
|
||||
}
|
||||
|
||||
public function createTabulatorPreset()
|
||||
{
|
||||
$tableName = $this->input->post("tableName");
|
||||
$presetName = $this->input->post("presetName");
|
||||
$preset = $this->input->post("preset");
|
||||
|
||||
if (!$tableName || !$presetName || !$preset) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "invalid_params_err_msg"), "general", 400);
|
||||
}
|
||||
|
||||
$uid = getAuthUID();
|
||||
|
||||
$existingPresetsResult = $this->TabulatorPresetModel->getTabulatorPresetsByUserAndTable($uid, $tableName);
|
||||
$existingPresets = $this->getDataOrTerminateWithError($existingPresetsResult) ?? [];
|
||||
|
||||
if (count($existingPresets) > 19) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "max_presets_count_err_msg"), "general", 409);
|
||||
}
|
||||
|
||||
$existingPresetNames = array_map(function($presetInfo) {
|
||||
return $presetInfo->preset_name;
|
||||
}, $existingPresets);
|
||||
|
||||
if (in_array($presetName, $existingPresetNames)) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "preset_name_duplicate_err_msg"), "general", 409);
|
||||
}
|
||||
|
||||
$presetCreationResult = $this->TabulatorPresetModel->createTabulatorPreset($uid, $tableName, $presetName, $preset);
|
||||
|
||||
if (isError($presetCreationResult)) {
|
||||
$this->terminateWithError($presetCreationResult->retval);
|
||||
}
|
||||
|
||||
$newPresetData = $this->TabulatorPresetModel->getTabulatorPreset($presetCreationResult->retval);
|
||||
$newPresetArray = $this->getDataOrTerminateWithError($newPresetData) ?? [null];
|
||||
$newPreset = $newPresetArray[0];
|
||||
|
||||
$this->terminateWithSuccess($newPreset);
|
||||
}
|
||||
|
||||
public function updateTabulatorPreset()
|
||||
{
|
||||
$presetId = $this->input->post("presetId");
|
||||
$preset = $this->input->post("preset");
|
||||
|
||||
if (!$presetId || !$preset) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "invalid_params_err_msg"), "general", 400);
|
||||
}
|
||||
|
||||
$existingPresetData = $this->TabulatorPresetModel->getTabulatorPreset($presetId);
|
||||
$existingPresetArray = $this->getDataOrTerminateWithError($existingPresetData) ?? [null];
|
||||
$existingPreset = $existingPresetArray[0];
|
||||
if (!$existingPreset) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "preset_not_found_err_msg"), "general", 404);
|
||||
}
|
||||
|
||||
$uid = getAuthUID();
|
||||
if ($existingPreset->benutzer_uid !== $uid) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "preset_not_own_update_err_msg"), "general", 403);
|
||||
}
|
||||
|
||||
$presetUpdateResult = $this->TabulatorPresetModel->updateTabulatorPreset($presetId, $preset);
|
||||
if (isError($presetUpdateResult)) {
|
||||
$this->terminateWithError($presetUpdateResult->retval);
|
||||
}
|
||||
|
||||
$updatedPresetData = $this->TabulatorPresetModel->getTabulatorPreset($presetId);
|
||||
$updatedPresetArray = $this->getDataOrTerminateWithError($updatedPresetData) ?? [null];
|
||||
$updatedPreset = $updatedPresetArray[0];
|
||||
|
||||
$this->terminateWithSuccess($updatedPreset);
|
||||
}
|
||||
|
||||
public function deleteTabulatorPreset()
|
||||
{
|
||||
$presetId = $this->input->post("presetId");
|
||||
if (!$presetId) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "invalid_params_err_msg"), "general", 400);
|
||||
}
|
||||
|
||||
$presetData = $this->TabulatorPresetModel->getTabulatorPreset($presetId);
|
||||
$presetArray = $this->getDataOrTerminateWithError($presetData) ?? [null];
|
||||
$preset = $presetArray[0];
|
||||
if (!$preset) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "preset_not_found_err_msg"), "general", 404);
|
||||
}
|
||||
|
||||
$uid = getAuthUID();
|
||||
if ($preset->benutzer_uid !== $uid) {
|
||||
$this->terminateWithError($this->p->t("tabulator_presets", "preset_not_own_delete_err_msg"), "general", 403);
|
||||
}
|
||||
|
||||
$presetDeletionResult = $this->TabulatorPresetModel->deleteTabulatorPreset($presetId);
|
||||
if (isError($presetDeletionResult)) {
|
||||
$this->terminateWithError($presetDeletionResult->retval);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \ReflectionMethod as ReflectionMethod;
|
||||
use \ReflectionFunction as ReflectionFunction;
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about menues
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Treemenu extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// Load Router
|
||||
$router = load_class('Router');
|
||||
|
||||
// Load Config
|
||||
$config = load_class('Config');
|
||||
$config->load('treemenu');
|
||||
|
||||
// Get Treemenu name & config
|
||||
$name = $router->method;
|
||||
$conf = $config->item($name);
|
||||
|
||||
// Get Permissions from config
|
||||
$permissions = $conf['permissions'] ?? self::PERM_ANONYMOUS;
|
||||
|
||||
// Call constructor
|
||||
parent::__construct([
|
||||
$name => $permissions
|
||||
]);
|
||||
|
||||
// Load Library
|
||||
$libraryName = $conf['library'] ?? null;
|
||||
$this->load->library($libraryName, null, 'treemenulib');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $method
|
||||
* @param array $params (optional)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function _remap($method, $params = [])
|
||||
{
|
||||
if (!$this->treemenulib)
|
||||
show_404();
|
||||
|
||||
$this->addMeta('ci_method', $method);
|
||||
$this->addMeta('ci_params', $params);
|
||||
|
||||
$params = $this->uri->uri_to_assoc(6); // 6 = start of $params
|
||||
$config = $this->treemenulib->config;
|
||||
|
||||
foreach (array_keys($params) as $key) {
|
||||
if (!isset($config[$key]) || !$config[$key])
|
||||
show_404();
|
||||
|
||||
$config = $config[$key];
|
||||
}
|
||||
|
||||
// Prepare aliases
|
||||
$argumentaliases = [];
|
||||
if (property_exists($this->treemenulib, 'path_to_argument'))
|
||||
$argumentaliases = array_flip($this->treemenulib->path_to_argument);
|
||||
$methodaliases = [];
|
||||
if (property_exists($this->treemenulib, 'redirect_method'))
|
||||
$methodaliases = $this->treemenulib->redirect_method;
|
||||
|
||||
$items = [];
|
||||
foreach ($config as $uripart => $children) {
|
||||
if (!is_array($children)) {
|
||||
$uripart = $children;
|
||||
$children = [];
|
||||
}
|
||||
|
||||
$methodName = $uripart;
|
||||
if (isset($methodaliases[$methodName])) {
|
||||
$methodName = $methodaliases[$methodName];
|
||||
} elseif (strpbrk($methodName, ' _-') !== false) {
|
||||
$methodName = lcfirst(str_replace([' ', '_', '-'], '', ucwords($methodName, " \t\r\n\f\v_-")));
|
||||
}
|
||||
|
||||
// Prepare arguments
|
||||
if (is_callable($methodName, false, $name)) {
|
||||
if (is_string($methodName) && is_callable([$this->treemenulib, $methodName]))
|
||||
$callable = [$this->treemenulib, $methodName];
|
||||
else
|
||||
$callable = $methodName;
|
||||
} else {
|
||||
$callable = [$this->treemenulib, $methodName];
|
||||
}
|
||||
|
||||
if (is_array($callable))
|
||||
$reflection = new ReflectionMethod($callable[0], $callable[1]);
|
||||
elseif (is_string($callable) && strstr($callable, '::'))
|
||||
$reflection = new ReflectionMethod($callable);
|
||||
elseif ($name != 'Closure::__invoke' && strstr($name, '::__invoke'))
|
||||
$reflection = new ReflectionMethod($callable, '__invoke');
|
||||
else
|
||||
$reflection = new ReflectionFunction($callable);
|
||||
|
||||
$arguments = [];
|
||||
foreach ($reflection->getParameters() as $arg) {
|
||||
if ($arg->name == 'path_template') {
|
||||
$path = $params;
|
||||
$path[$uripart] = '%s';
|
||||
$arguments[] = $this->uri->assoc_to_uri($path);
|
||||
} elseif ($arg->name == 'has_children') {
|
||||
$arguments[] = $children;
|
||||
} elseif ($arg->name == 'original_method') {
|
||||
$arguments[] = $uripart;
|
||||
} elseif (isset($argumentaliases[$arg->name]) && isset($params[$argumentaliases[$arg->name]])) {
|
||||
$arguments[] = $params[$argumentaliases[$arg->name]];
|
||||
} elseif (isset($params[$arg->name])) {
|
||||
$arguments[] = $params[$arg->name];
|
||||
} else {
|
||||
$arguments[] = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Call function from lib
|
||||
$items = array_merge($items, call_user_func_array($callable, $arguments));
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($items);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Zeitsperren extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getZeitsperrenUser' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getTypenZeitsperren' => self::PERM_LOGGED,
|
||||
'getTypenErreichbarkeit' => self::PERM_LOGGED,
|
||||
'getStunden' => self::PERM_LOGGED,
|
||||
'loadZeitsperre' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'add' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'update' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'delete' => ['basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui',
|
||||
'person',
|
||||
'zeitsperren'
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('ressource/Zeitsperre_model', 'ZeitsperreModel');
|
||||
$this->load->model('ressource/Zeitsperretyp_model', 'ZeitsperretypModel');
|
||||
$this->load->model('ressource/Erreichbarkeit_model', 'ErreichbarkeitModel');
|
||||
$this->load->model('ressource/Stunde_model', 'StundeModel');
|
||||
$this->load->model('ressource/Zeitaufzeichnung_model', 'ZeitaufzeichnungModel');
|
||||
}
|
||||
|
||||
public function getZeitsperrenUser($uid)
|
||||
{
|
||||
//check if $uid is passedUser
|
||||
$loggedInUser = getAuthUID();
|
||||
if($loggedInUser != $uid) {
|
||||
$this->load->library('PermissionLib');
|
||||
$isAdmin = $this->permissionlib->isBerechtigt('admin');
|
||||
if(!$isAdmin) {
|
||||
$this->terminateWithError($this->p->t('ui', 'noAdmin'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->ZeitsperreModel->getZeitsperrenUser($uid);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function getTypenZeitsperren()
|
||||
{
|
||||
$excludedTypes = array('ZVerfueg');
|
||||
$result = $this->ZeitsperretypModel->getTypenZeitsperren($excludedTypes);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function getTypenErreichbarkeit()
|
||||
{
|
||||
$result = $this->ErreichbarkeitModel->load();
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function getStunden()
|
||||
{
|
||||
$this->StundeModel->addOrder('stunde', 'ASC');
|
||||
$result = $this->StundeModel->load();
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function loadZeitsperre($zeitsperre_id)
|
||||
{
|
||||
$this->ZeitsperreModel->addSelect(
|
||||
'campus.tbl_zeitsperre.*, typ.*,
|
||||
ma.person_id AS ma_person_id, ma.vorname AS ma_vorname, ma.nachname AS ma_nachname,
|
||||
ma.titelpre AS ma_titelpre, ma.titelpost AS ma_titelpost'
|
||||
);
|
||||
$this->ZeitsperreModel->addJoin('campus.tbl_zeitsperretyp typ', 'ON (typ.zeitsperretyp_kurzbz = campus.tbl_zeitsperre.zeitsperretyp_kurzbz)');
|
||||
$this->ZeitsperreModel->addJoin('public.tbl_benutzer ben', 'ON (ben.uid = campus.tbl_zeitsperre.vertretung_uid)', 'LEFT');
|
||||
$this->ZeitsperreModel->addJoin('public.tbl_person ma', 'ON (ma.person_id = ben.person_id)', 'LEFT');
|
||||
$result = $this->ZeitsperreModel->loadWhere(
|
||||
array('zeitsperre_id' => $zeitsperre_id)
|
||||
);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((current(getData($result)) ?: []));
|
||||
}
|
||||
|
||||
public function add($mitarbeiter_uid)
|
||||
{
|
||||
$loggedInUser = getAuthUID();
|
||||
|
||||
if($mitarbeiter_uid != $loggedInUser)
|
||||
$this->terminateWithError($this->p->t('ui', 'noPermission'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->form_validation->set_rules('zeitsperretyp_kurzbz', 'Grund Zeitsperre', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Grund Zeitsperre'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('vondatum', 'VonDatum', 'required|is_valid_date', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'VonDatum']),
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VonDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('bisdatum', 'BisDatum', 'required|is_valid_date|callback_check_von_bis_datum|callback_check_diff_intval', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'BisDatum']),
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'BisDatum']),
|
||||
'check_von_bis_datum' => $this->p->t('zeitsperre', 'error_VonDatumGroesserAlsBisDatum'),
|
||||
'check_diff_intval' => $this->p->t('zeitsperre', 'error_zeitraumAuffallendHoch')
|
||||
]);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$bezeichnung = $this->input->post('bezeichnung');
|
||||
$vondatum = $this->input->post('vondatum');
|
||||
$vonstunde = $this->input->post('vonstunde');
|
||||
$bisdatum = $this->input->post('bisdatum');
|
||||
$bisstunde = $this->input->post('bisstunde');
|
||||
//$vonIso = $this->input->post('vonISO'); //Timestamp für Stunde
|
||||
//$bisIso = $this->input->post('bisISO'); //Timestamp für Stunde
|
||||
$erreichbarkeit_kurzbz = $this->input->post('erreichbarkeit_kurzbz');
|
||||
$vertretung_uid = $this->input->post('vertretung_uid');
|
||||
$zeitsperretyp_kurzbz = $this->input->post('zeitsperretyp_kurzbz');
|
||||
|
||||
//check if existing zeitsperre
|
||||
$result = $this->ZeitsperreModel->getSperreByDate($mitarbeiter_uid, $vondatum, $vonstunde, true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(hasData($result))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('zeitsperren', 'error_existingZeitsperre', ['typ'=> current($data)->zeitsperretyp_kurzbz]), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//check if existing zeitaufzeichnung
|
||||
if(in_array($zeitsperretyp_kurzbz, Zeitsperre_model::BLOCKIERENDE_ZEITSPERREN))
|
||||
{
|
||||
$result = $this->ZeitsperreModel->existsZeitaufzeichnung($mitarbeiter_uid, $vondatum, $bisdatum);
|
||||
|
||||
if(hasData($result))
|
||||
$this->terminateWithError($this->p->t('zeitsperren', 'error_existingZeitaufzeichnung'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->ZeitsperreModel->insert(
|
||||
[
|
||||
'mitarbeiter_uid' => $mitarbeiter_uid,
|
||||
'bezeichnung' => $bezeichnung,
|
||||
'vondatum' => $vondatum,
|
||||
'vonstunde' => $vonstunde,
|
||||
'bisdatum' => $bisdatum,
|
||||
'bisstunde' => $bisstunde,
|
||||
'erreichbarkeit_kurzbz' => $erreichbarkeit_kurzbz,
|
||||
'zeitsperretyp_kurzbz' => $zeitsperretyp_kurzbz,
|
||||
'vertretung_uid' => $vertretung_uid,
|
||||
'insertvon' => $loggedInUser,
|
||||
'insertamum' => date('c'),
|
||||
]
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function update($zeitsperre_id)
|
||||
{
|
||||
//check if loggedin User is owner of the zeitsperre
|
||||
$loggedInUser = getAuthUID();
|
||||
$result = $this->ZeitsperreModel->load($zeitsperre_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$uid = current($data)->mitarbeiter_uid;
|
||||
|
||||
if($uid != $loggedInUser)
|
||||
$this->terminateWithError($this->p->t('ui', 'noPermission'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if(!$zeitsperre_id)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Zeitsperre_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
//get current params
|
||||
$array_update = [
|
||||
'bezeichnung',
|
||||
'vondatum',
|
||||
'vonstunde',
|
||||
'bisdatum',
|
||||
'bisstunde',
|
||||
// 'vonISO', //Timestamp für Stunde
|
||||
// 'bisISO', //Timestamp für Stunde
|
||||
'erreichbarkeit_kurzbz',
|
||||
'vertretung_uid',
|
||||
'zeitsperretyp_kurzbz',
|
||||
'mitarbeiter_uid',
|
||||
];
|
||||
$post = $this->input->post();
|
||||
$update = [];
|
||||
|
||||
foreach ($array_update as $prop)
|
||||
{
|
||||
if (array_key_exists($prop, $post))
|
||||
{
|
||||
$update[$prop] = $post[$prop];
|
||||
}
|
||||
}
|
||||
|
||||
// Validation
|
||||
$rulesDefined = false; //necessary, otherwise CI validation will always be triggered, even without rules
|
||||
foreach ($update as $key => $val) {
|
||||
switch ($key) {
|
||||
case 'zeitsperretyp_kurzbz':
|
||||
$this->form_validation->set_rules(
|
||||
$key,
|
||||
'Grund Zeitsperre',
|
||||
'required',
|
||||
['required' => $this->p->t('ui', 'error_fieldRequired', ['field'=>'Grund Zeitsperre'])]
|
||||
);
|
||||
$rulesDefined = true;
|
||||
break;
|
||||
case 'vondatum':
|
||||
$this->form_validation->set_rules(
|
||||
$key,
|
||||
'VonDatum',
|
||||
'required|is_valid_date',
|
||||
[
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field'=>'VonDatum']),
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field'=>'VonDatum'])
|
||||
]
|
||||
);
|
||||
$rulesDefined = true;
|
||||
break;
|
||||
case 'bisdatum':
|
||||
$rules = 'required|is_valid_date';
|
||||
if (array_key_exists('vondatum', $update)) {
|
||||
$rules .= '|callback_check_von_bis_datum|callback_check_diff_intval';
|
||||
}
|
||||
$this->form_validation->set_rules(
|
||||
$key,
|
||||
'BisDatum',
|
||||
$rules,
|
||||
[
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field'=>'BisDatum']),
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field'=>'BisDatum']),
|
||||
'check_von_bis_datum' => $this->p->t('zeitsperre', 'error_VonDatumGroesserAlsBisDatum'),
|
||||
'check_diff_intval' => $this->p->t('zeitsperre', 'error_zeitraumAuffallendHoch')
|
||||
]
|
||||
);
|
||||
$rulesDefined = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($rulesDefined && $this->form_validation->run() == false) {
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
if(array_key_exists('vondatum', $post) || array_key_exists('bisdatum', $post))
|
||||
{
|
||||
$result = $this->ZeitsperreModel->load($zeitsperre_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$data = current($data);
|
||||
|
||||
$mitarbeiter_uid = array_key_exists('mitarbeiter_uid', $post) ? $update['mitarbeiter_uid'] : $data->mitarbeiter_uid;
|
||||
$vondatum = array_key_exists('vondatum', $post) ? $update['vondatum'] : $data->vondatum;
|
||||
$bisdatum = array_key_exists('bisdatum', $post) ? $update['bisdatum'] : $data->bisdatum;
|
||||
$vonstunde = array_key_exists('vonstunde', $post) ? $update['vonstunde'] : $data->vonstunde;
|
||||
$zeitsperretyp_kurzbz = array_key_exists('zeitsperretyp_kurzbz', $post) ? $update['zeitsperretyp_kurzbz'] : $data->zeitsperretyp_kurzbz;
|
||||
|
||||
$result = $this->ZeitsperreModel->getSperreByDate($mitarbeiter_uid, $vondatum, $vonstunde, true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(hasData($result))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('zeitsperren', 'error_existingZeitsperre', ['typ'=> current($data)->zeitsperretyp_kurzbz]), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//check if existing zeitaufzeichnung
|
||||
if(in_array($zeitsperretyp_kurzbz, Zeitsperre_model::BLOCKIERENDE_ZEITSPERREN))
|
||||
{
|
||||
$result = $this->ZeitsperreModel->existsZeitaufzeichnung($mitarbeiter_uid, $vondatum, $bisdatum);
|
||||
|
||||
if(hasData($result))
|
||||
$this->terminateWithError($this->p->t('zeitsperren', 'error_existingZeitaufzeichnung'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($update)) {
|
||||
$update['updatevon'] = $loggedInUser;
|
||||
$update['updateamum'] = date('c');
|
||||
$result = $this->ZeitsperreModel->update($zeitsperre_id, $update);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
else
|
||||
$this->terminateWithSuccess("no update");
|
||||
}
|
||||
|
||||
public function delete($zeitsperre_id)
|
||||
{
|
||||
|
||||
if (!is_numeric($zeitsperre_id) || (int)$zeitsperre_id <= 0)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_missingId', ['id' => 'Zeitsperre_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//check if loggedin User is owner of the zeitsperre
|
||||
$loggedInUser = getAuthUID();
|
||||
$result = $this->ZeitsperreModel->load($zeitsperre_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$uid = current($data)->mitarbeiter_uid;
|
||||
|
||||
if($uid != $loggedInUser)
|
||||
$this->terminateWithError($this->p->t('ui', 'noPermission'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$result = $this->ZeitsperreModel->delete(
|
||||
array('zeitsperre_id' => $zeitsperre_id)
|
||||
);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function check_von_bis_datum($bisdatum)
|
||||
{
|
||||
$vondatum = $this->input->post('vondatum');
|
||||
|
||||
return $vondatum <= $bisdatum;
|
||||
}
|
||||
|
||||
public function check_diff_intval($bisdatum)
|
||||
{
|
||||
$vondatum = $this->input->post('vondatum');
|
||||
|
||||
// Intervall in days
|
||||
$vonTs = strtotime($vondatum);
|
||||
$bisTs = strtotime($bisdatum);
|
||||
|
||||
$tage = ($bisTs - $vonTs) / 86400;
|
||||
|
||||
// if intervall > 14
|
||||
return $tage <= 14;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -259,7 +259,7 @@ class BetriebsmittelP extends FHCAPI_Controller
|
||||
$kaution = $this->input->post('kaution');
|
||||
if($kaution) $kaution = str_replace(',', '.', $kaution);
|
||||
$ausgegebenam = $this->input->post('ausgegebenam');
|
||||
$retouram = $this->input->post('retouram');
|
||||
$retouram = $this->input->post('retouram') == "" ? null : $this->input->post('retouram');
|
||||
|
||||
// NOTE(chris): transform_kartennummer
|
||||
if ($betriebsmitteltyp == 'Zutrittskarte' && $nummer)
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class RoomPlan extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'addRoomReservation' => self::PERM_LOGGED,
|
||||
'deleteRoomReservation' => self::PERM_LOGGED,
|
||||
'getRoomCreationInfo' => self::PERM_LOGGED,
|
||||
'getGruppen' => self::PERM_LOGGED,
|
||||
'getLektor' => self::PERM_LOGGED,
|
||||
'getReservableMap' => self::PERM_LOGGED,
|
||||
'getGroupOptions' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->library('LogLib');
|
||||
$this->loglib->setConfigs(array(
|
||||
'classIndex' => 5,
|
||||
'functionIndex' => 5,
|
||||
'lineIndex' => 4,
|
||||
'dbLogType' => 'API',
|
||||
'dbExecuteUser' => 'RESTful API'
|
||||
));
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('PermissionLib');
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$this->loadPhrases(['ui']);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
|
||||
|
||||
public function addRoomReservation()
|
||||
{
|
||||
$this->form_validation->set_rules('selectedStart', "Start", "required");
|
||||
$this->form_validation->set_rules('selectedEnd', "End", "required");
|
||||
$this->form_validation->set_rules('title', "Title", "required|max_length[10]");
|
||||
$this->form_validation->set_rules('beschreibung', "Beschreibung", "required|max_length[32]");
|
||||
$this->form_validation->set_rules('ort_kurzbz', "Ort", "required|max_length[16]");
|
||||
$this->form_validation->set_rules('studiengang', 'Studiengang', 'numeric');
|
||||
$this->form_validation->set_rules('semester', 'Semester', 'integer|greater_than_equal_to[0]');
|
||||
$this->form_validation->set_rules('verband', 'Verband', 'trim');
|
||||
$this->form_validation->set_rules('gruppe', 'Gruppe', 'trim');
|
||||
$this->form_validation->set_rules('spezialgruppe', 'Spezialgruppe', 'max_length[32]');
|
||||
$this->form_validation->set_rules('lektoren', 'Lektoren');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$start = $this->input->post('selectedStart');
|
||||
$end = $this->input->post('selectedEnd');
|
||||
$title = $this->input->post('title');
|
||||
$beschreibung = $this->input->post('beschreibung');
|
||||
$ort_kurzbz = $this->input->post('ort_kurzbz');
|
||||
|
||||
$studiengang_kz = $this->input->post('studiengang');
|
||||
$semester = $this->input->post('semester');
|
||||
$verband = $this->input->post('verband');
|
||||
$gruppe = $this->input->post('gruppe');
|
||||
$spezialgruppe = $this->input->post('spezialgruppe');
|
||||
$lektoren = $this->input->post('lektoren');
|
||||
|
||||
|
||||
$result = $this->stundenplanlib->addReservation($start, $end, $title, $beschreibung, $ort_kurzbz, $lektoren, $studiengang_kz, $semester, $verband, $gruppe, $spezialgruppe);
|
||||
|
||||
if (isError($result))
|
||||
$this->terminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function deleteRoomReservation()
|
||||
{
|
||||
$reservierung_id = $this->input->post('reservierung_id');
|
||||
|
||||
$result = $this->stundenplanlib->deleteReservation($reservierung_id);
|
||||
|
||||
if (isError($result))
|
||||
$this->terminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function getRoomCreationInfo()
|
||||
{
|
||||
$return_array = array('berechtigt' => false, 'studiengaenge' => []);
|
||||
if (!$this->permissionlib->isBerechtigt('lehre/reservierung'))
|
||||
$this->terminateWithSuccess($return_array);
|
||||
|
||||
$stg_berechtigungen = $this->permissionlib->getSTG_isEntitledFor('lehre/reservierung');
|
||||
if (isEmptyArray($stg_berechtigungen))
|
||||
$this->terminateWithSuccess($return_array);
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$this->StudiengangModel->addSelect('studiengang_kz, UPPER(CONCAT(typ, kurzbz)) as kuerzel, kurzbzlang');
|
||||
$this->StudiengangModel->addOrder('typ, kurzbz');
|
||||
$this->StudiengangModel->db->where_in('studiengang_kz', $stg_berechtigungen);
|
||||
$studiengaenge = $this->StudiengangModel->loadWhere(array('aktiv' => true));
|
||||
|
||||
if (isError($studiengaenge))
|
||||
$this->terminateWithError($studiengaenge);
|
||||
|
||||
$return_array['studiengaenge'] = hasData($studiengaenge) ? getData($studiengaenge) : [];
|
||||
$return_array['berechtigt'] = true;
|
||||
|
||||
$this->terminateWithSuccess($return_array);
|
||||
}
|
||||
|
||||
public function getGruppen()
|
||||
{
|
||||
$query = $this->input->get('query');
|
||||
if (is_null($query))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$stg_berechtigungen = $this->permissionlib->getSTG_isEntitledFor('lehre/reservierung');
|
||||
|
||||
if (isEmptyArray($stg_berechtigungen))
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$this->load->model('organisation/gruppe_model', 'GruppeModel');
|
||||
|
||||
$query_words = explode(' ', urldecode($query));
|
||||
|
||||
$this->GruppeModel->addOrder('gruppe_kurzbz');
|
||||
$this->GruppeModel->db->group_start();
|
||||
foreach ($query_words as $word) {
|
||||
$this->GruppeModel->db->group_start();
|
||||
$this->GruppeModel->db->where('gruppe_kurzbz ILIKE', "%" . $word . "%");
|
||||
$this->GruppeModel->db->or_where('bezeichnung ILIKE', "%" . $word . "%");
|
||||
$this->GruppeModel->db->or_where('beschreibung ILIKE', "%" . $word . "%");
|
||||
$this->GruppeModel->db->or_where('orgform_kurzbz ILIKE', "%" . $word . "%");
|
||||
|
||||
if (is_numeric($word)) {
|
||||
$this->GruppeModel->db->or_where('studiengang_kz', $word);
|
||||
}
|
||||
$this->GruppeModel->db->group_end();
|
||||
}
|
||||
$this->GruppeModel->db->group_end();
|
||||
$this->GruppeModel->db->where_in('studiengang_kz', $stg_berechtigungen);
|
||||
$gruppen = $this->GruppeModel->loadWhere(array('sichtbar' => true, 'lehre' => true));
|
||||
if (isError($gruppen))
|
||||
$this->terminateWithError($gruppen);
|
||||
|
||||
$this->terminateWithSuccess(hasData($gruppen) ? getData($gruppen) : []);
|
||||
}
|
||||
|
||||
public function getLektor()
|
||||
{
|
||||
|
||||
$query = $this->input->get('query');
|
||||
if (is_null($query))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$stg_berechtigungen = $this->permissionlib->getSTG_isEntitledFor('lehre/reservierung');
|
||||
|
||||
if (isEmptyArray($stg_berechtigungen))
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$query_words = explode(' ', urldecode($query));
|
||||
|
||||
$this->MitarbeiterModel->addSelect('uid, person_id, vorname, nachname');
|
||||
$this->MitarbeiterModel->addJoin('public.tbl_benutzer', 'uid = mitarbeiter_uid');
|
||||
$this->MitarbeiterModel->addJoin('public.tbl_person', 'person_id');
|
||||
$this->MitarbeiterModel->db->where('public.tbl_benutzer.aktiv', true);
|
||||
$this->MitarbeiterModel->db->group_start();
|
||||
foreach ($query_words as $word) {
|
||||
$this->MitarbeiterModel->db->group_start();
|
||||
$this->MitarbeiterModel->db->where('tbl_person.vorname ILIKE', "%" . $word . "%");
|
||||
$this->MitarbeiterModel->db->or_where('tbl_person.nachname ILIKE', "%" . $word . "%");
|
||||
$this->MitarbeiterModel->db->or_where('uid ILIKE', "%" . $word . "%");
|
||||
$this->MitarbeiterModel->db->group_end();
|
||||
}
|
||||
$this->MitarbeiterModel->db->group_end();
|
||||
|
||||
$this->MitarbeiterModel->addOrder('nachname');
|
||||
$this->MitarbeiterModel->addOrder('vorname');
|
||||
$mitarbeiter = $this->MitarbeiterModel->load();
|
||||
if (isError($mitarbeiter))
|
||||
$this->terminateWithError($mitarbeiter);
|
||||
|
||||
$this->terminateWithSuccess(hasData($mitarbeiter) ? getData($mitarbeiter) : []);
|
||||
}
|
||||
|
||||
public function getReservableMap($ort_kurzbz = null)
|
||||
{
|
||||
$this->form_validation->set_rules('start_date', "StartDate", "required");
|
||||
$this->form_validation->set_rules('end_date', "EndDate", "required");
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
// storing the post parameter in local variables
|
||||
$start_date = $this->input->post('start_date', true);
|
||||
$end_date = $this->input->post('end_date', true);
|
||||
|
||||
$result = $this->stundenplanlib->getReservableMap($ort_kurzbz, $start_date, $end_date);
|
||||
|
||||
$this->terminateWithSuccess(array('reservierbarMap' => hasData($result) ? getData($result) : []));
|
||||
}
|
||||
|
||||
public function getGroupOptions()
|
||||
{
|
||||
$studiengangKz = $this->input->get('studiengangKz');
|
||||
|
||||
$this->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
|
||||
$this->LehrverbandModel->addSelect('semester, verband, gruppe');
|
||||
$this->LehrverbandModel->db->where('aktiv', true);
|
||||
$this->LehrverbandModel->db->where('studiengang_kz', $studiengangKz);
|
||||
$lehrverbandResult = $this->LehrverbandModel->load();
|
||||
|
||||
if (isError($lehrverbandResult))
|
||||
$this->terminateWithError($lehrverbandResult);
|
||||
|
||||
$lehrverbanden = hasData($lehrverbandResult) ? getData($lehrverbandResult) : [];
|
||||
|
||||
$grouppedValues = [];
|
||||
foreach ($lehrverbanden as $lehrverband) {
|
||||
if (isset($grouppedValues[$lehrverband->semester]) && $lehrverband->verband !== ' ') {
|
||||
$grouppedValues[$lehrverband->semester][] = $lehrverband;
|
||||
} else if (!isset($grouppedValues[$lehrverband->semester]) && $lehrverband->verband !== ' ') {
|
||||
$grouppedValues[$lehrverband->semester] = [$lehrverband];
|
||||
} else if (!isset($grouppedValues[$lehrverband->semester])) {
|
||||
$grouppedValues[$lehrverband->semester] = [];
|
||||
}
|
||||
}
|
||||
$grouppedValues = array_map(
|
||||
function ($semester) {
|
||||
$verbandGruppen = [];
|
||||
foreach ($semester as $lehrverband) {
|
||||
if (isset($verbandGruppen[$lehrverband->verband]) && $lehrverband->gruppe !== ' ') {
|
||||
$verbandGruppen[$lehrverband->verband][] = $lehrverband->gruppe;
|
||||
} else if (!isset($verbandGruppen[$lehrverband->verband]) && $lehrverband->gruppe !== ' ') {
|
||||
$verbandGruppen[$lehrverband->verband] = [$lehrverband->gruppe];
|
||||
} else if (!isset($verbandGruppen[$lehrverband->verband])) {
|
||||
$verbandGruppen[$lehrverband->verband] = [];
|
||||
}
|
||||
}
|
||||
return $verbandGruppen;
|
||||
},
|
||||
$grouppedValues
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($grouppedValues);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about addresses
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Board extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'list' => 'dashboard/admin:r',
|
||||
'create' => 'dashboard/admin:rw',
|
||||
'update' => 'dashboard/admin:rw',
|
||||
'delete' => 'dashboard/admin:rw'
|
||||
]);
|
||||
|
||||
// Models
|
||||
$this->load->model('dashboard/Dashboard_model', 'DashboardModel');
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->DashboardModel->addSelect('dashboard_id');
|
||||
$this->DashboardModel->addSelect('dashboard_kurzbz');
|
||||
$this->DashboardModel->addSelect('tbl_dashboard.beschreibung');
|
||||
$this->DashboardModel->addSelect("(
|
||||
SELECT json_agg(w.*)
|
||||
FROM dashboard.tbl_widget w
|
||||
JOIN dashboard.tbl_dashboard_widget dw
|
||||
USING(widget_id)
|
||||
WHERE dw.dashboard_id=tbl_dashboard.dashboard_id
|
||||
) AS \"widgetSetup\"");
|
||||
|
||||
$result = $this->DashboardModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$data = array_map(function ($dashboard) {
|
||||
$tmpSetups = json_decode($dashboard->widgetSetup);
|
||||
$tmpSetups = array_map(function ($widget) {
|
||||
$widget->setup->file = absoluteJsImportUrl($widget->setup->file);
|
||||
return $widget;
|
||||
}, $tmpSetups);
|
||||
$dashboard->widgetSetup = $tmpSetups;
|
||||
return $dashboard;
|
||||
}, $data);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$dashboard_kurzbz = $this->input->post('dashboard_kurzbz');
|
||||
|
||||
$result = $this->DashboardModel->insert([
|
||||
'dashboard_kurzbz' => $dashboard_kurzbz
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('dashboard_id', 'Dashboard ID', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$dashboard_id = $this->input->post('dashboard_id');
|
||||
$dashboard_kurzbz = $this->input->post('dashboard_kurzbz');
|
||||
$beschreibung = $this->input->post('beschreibung');
|
||||
|
||||
$result = $this->DashboardModel->update([
|
||||
'dashboard_id' => $dashboard_id
|
||||
], [
|
||||
'dashboard_kurzbz' => $dashboard_kurzbz,
|
||||
'beschreibung' => $beschreibung
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('dashboard_id', 'Dashboard ID', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$dashboard_id = $this->input->post('dashboard_id');
|
||||
|
||||
//delete all presets
|
||||
$this->load->model('dashboard/Dashboard_Preset_model', 'DashboardPresetModel');
|
||||
|
||||
$result = $this->DashboardPresetModel->delete([
|
||||
'dashboard_id' => $dashboard_id
|
||||
]);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
//delete all widgets
|
||||
$this->load->model('dashboard/Dashboard_Widget_model', 'DashboardWidgetModel');
|
||||
|
||||
$result = $this->DashboardWidgetModel->delete([
|
||||
'dashboard_id' => $dashboard_id
|
||||
]);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->DashboardModel->delete($dashboard_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about addresses
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Preset extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'list' => 'dashboard/admin:r',
|
||||
'getBatch' => 'dashboard/admin:r',
|
||||
'addWidget' => 'dashboard/admin:rw',
|
||||
'removeWidget' => 'dashboard/admin:rw'
|
||||
]);
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui'
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('dashboard/DashboardLib');
|
||||
|
||||
// Models
|
||||
$this->load->model('ressource/Funktion_model', 'FunktionModel');
|
||||
}
|
||||
|
||||
public function list($dashboard_kurzbz)
|
||||
{
|
||||
$sql = "
|
||||
WITH
|
||||
dashboard_presets AS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
dashboard.tbl_dashboard_preset dp
|
||||
JOIN
|
||||
dashboard.tbl_dashboard d ON d.dashboard_id = dp.dashboard_id
|
||||
WHERE
|
||||
d.dashboard_kurzbz = {$this->db->escape($dashboard_kurzbz)}
|
||||
),
|
||||
general AS (
|
||||
SELECT
|
||||
'general' AS funktion_kurzbz,
|
||||
'Allgemein' AS beschreibung
|
||||
)
|
||||
|
||||
(
|
||||
SELECT
|
||||
f.funktion_kurzbz,
|
||||
f.beschreibung,
|
||||
COUNT(p.preset_id) AS has_preset
|
||||
FROM
|
||||
general f
|
||||
LEFT JOIN
|
||||
dashboard_presets p ON p.funktion_kurzbz IS NULL
|
||||
GROUP BY
|
||||
f.funktion_kurzbz, f.beschreibung
|
||||
)
|
||||
UNION ALL
|
||||
(
|
||||
SELECT
|
||||
f.funktion_kurzbz,
|
||||
f.beschreibung,
|
||||
COUNT(p.preset_id) AS has_preset
|
||||
FROM
|
||||
public.tbl_funktion f
|
||||
LEFT JOIN
|
||||
dashboard_presets p ON p.funktion_kurzbz = f.funktion_kurzbz
|
||||
GROUP BY
|
||||
f.funktion_kurzbz, f.beschreibung
|
||||
ORDER BY
|
||||
f.beschreibung ASC
|
||||
)
|
||||
";
|
||||
|
||||
$result = $this->FunktionModel->execReadOnlyQuery($sql);
|
||||
|
||||
$funktionen = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($funktionen);
|
||||
}
|
||||
|
||||
public function getBatch()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('db', 'Dashboard', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$db = $this->input->post('db');
|
||||
$funktionen = $this->input->post('funktionen') ?: [];
|
||||
|
||||
$result = [];
|
||||
|
||||
foreach ($funktionen as $funktion) {
|
||||
$conf = $this->dashboardlib->getPreset($db, $funktion);
|
||||
if ($conf) {
|
||||
$preset = json_decode($conf->preset, true);
|
||||
$result[$funktion] = $preset;
|
||||
} else {
|
||||
$result[$funktion] = [];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function addWidget()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('dashboard', 'Dashboard', 'required');
|
||||
$this->form_validation->set_rules('funktion_kurzbz', 'Funktion', 'required');
|
||||
$this->form_validation->set_rules('widget[widget]', 'Widget', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$dashboard_kurzbz = $this->input->post('dashboard');
|
||||
$funktion_kurzbz = $this->input->post('funktion_kurzbz');
|
||||
$widget = $this->input->post('widget');
|
||||
|
||||
if (!isset($widget['widgetid']))
|
||||
$widget['widgetid'] = $this->dashboardlib->generateWidgetId($dashboard_kurzbz);
|
||||
|
||||
$preset = $this->dashboardlib->getPresetOrCreateEmptyPreset($dashboard_kurzbz, $funktion_kurzbz);
|
||||
|
||||
$preset_decoded = json_decode($preset->preset, true);
|
||||
|
||||
$preset_decoded[$widget['widgetid']] = $widget;
|
||||
|
||||
$preset->preset = json_encode($preset_decoded);
|
||||
|
||||
$result = $this->dashboardlib->insertOrUpdatePreset($preset);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($widget['widgetid']);
|
||||
}
|
||||
|
||||
public function removeWidget()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('db', 'Dashboard', 'required');
|
||||
$this->form_validation->set_rules('funktion_kurzbz', 'Funktion', 'required');
|
||||
$this->form_validation->set_rules('widgetid', 'Widget', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$dashboard_kurzbz = $this->input->post('db');
|
||||
$funktion_kurzbz = $this->input->post('funktion_kurzbz');
|
||||
$widgetid = $this->input->post('widgetid');
|
||||
|
||||
$preset = $this->dashboardlib->getPreset($dashboard_kurzbz, $funktion_kurzbz);
|
||||
if (!$preset)
|
||||
show_404();
|
||||
|
||||
$preset_decoded = json_decode($preset->preset, true);
|
||||
|
||||
if (!isset($preset_decoded[$widgetid]))
|
||||
show_404();
|
||||
|
||||
unset($preset_decoded[$widgetid]);
|
||||
|
||||
$preset->preset = json_encode($preset_decoded);
|
||||
|
||||
$result = $this->dashboardlib->insertOrUpdatePreset($preset);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(array('msg' => $this->p->t('dashboard', 'success_savePreset')));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about the users dashboard
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class User extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'get' => 'dashboard/benutzer:r',
|
||||
'addWidget' => 'dashboard/benutzer:rw',
|
||||
'removeWidget' => 'dashboard/benutzer:rw'
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('dashboard/DashboardLib');
|
||||
|
||||
// Models
|
||||
$this->load->model('ressource/Funktion_model', 'FunktionModel');
|
||||
}
|
||||
|
||||
public function get($dashboard_kurzbz)
|
||||
{
|
||||
$dashboard = $this->dashboardlib->getDashboardByKurzbz($dashboard_kurzbz);
|
||||
if (!$dashboard)
|
||||
show_404();
|
||||
|
||||
$uid = $this->authlib->getAuthObj()->username;
|
||||
|
||||
$mergedconfig = $this->dashboardlib->getMergedUserConfig($dashboard->dashboard_id, $uid);
|
||||
|
||||
$this->terminateWithSuccess($mergedconfig);
|
||||
}
|
||||
|
||||
public function addWidget()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('dashboard', 'Dashboard', 'required');
|
||||
$this->form_validation->set_rules('widget[widget]', 'Widget', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$widget = $this->input->post('widget');
|
||||
$dashboard_kurzbz = $this->input->post('dashboard');
|
||||
$uid = $this->authlib->getAuthObj()->username;
|
||||
|
||||
if (!isset($widget['widgetid']))
|
||||
$widget['widgetid'] = $this->dashboardlib->generateWidgetId($dashboard_kurzbz);
|
||||
|
||||
if (isset($widget['source']))
|
||||
unset($widget['source']);
|
||||
|
||||
$override = $this->dashboardlib->getOverrideOrCreateEmptyOverride($dashboard_kurzbz, $uid);
|
||||
|
||||
$override_decoded = json_decode($override->override, true);
|
||||
|
||||
$override_decoded[$widget['widgetid']] = $widget;
|
||||
|
||||
$override->override = json_encode($override_decoded);
|
||||
|
||||
$result = $this->dashboardlib->insertOrUpdateOverride($override);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($widget['widgetid']);
|
||||
}
|
||||
|
||||
public function removeWidget()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('dashboard', 'Dashboard', 'required');
|
||||
$this->form_validation->set_rules('widget', 'Widget', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$widget_id = $this->input->post('widget');
|
||||
$dashboard_kurzbz = $this->input->post('dashboard');
|
||||
$uid = $this->authlib->getAuthObj()->username;
|
||||
|
||||
$override = $this->dashboardlib->getOverride($dashboard_kurzbz, $uid);
|
||||
if (!$override)
|
||||
show_404();
|
||||
|
||||
$override_decoded = json_decode($override->override, true);
|
||||
|
||||
if (!isset($override_decoded[$widget_id]))
|
||||
show_404();
|
||||
|
||||
unset($override_decoded[$widget_id]);
|
||||
|
||||
$override->override = json_encode($override_decoded);
|
||||
|
||||
$result = $this->dashboardlib->insertOrUpdateOverride($override);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about the users dashboard
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Widget extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'get' => ['dashboard/benutzer:r', 'dashboard/admin:r'],
|
||||
'list' => 'dashboard/admin:r',
|
||||
'listAllowed' => ['dashboard/benutzer:rw', 'dashboard/admin:r'],
|
||||
'setAllowed' => 'dashboard/admin:rw'
|
||||
]);
|
||||
|
||||
// Libraries
|
||||
$this->load->library('dashboard/DashboardLib');
|
||||
|
||||
// Models
|
||||
$this->load->model('dashboard/Widget_model', 'WidgetModel');
|
||||
}
|
||||
|
||||
public function get($id)
|
||||
{
|
||||
$result = $this->WidgetModel->load($id);
|
||||
|
||||
$widget = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$widget)
|
||||
return $this->terminateWithSuccess([
|
||||
"widget_id" => 0,
|
||||
"widget_kurzbz" => "notfound",
|
||||
"arguments" => [
|
||||
"className" => 'alert-danger',
|
||||
"title" => 'Widget Not Found',
|
||||
"msg" => 'The widget with the id ' . $id . ' could not be found'
|
||||
],
|
||||
"setup" => [
|
||||
"name" => 'Widget Not Found',
|
||||
"file" => absoluteJsImportUrl('public/js/components/DashboardWidget/Default.js'),
|
||||
"width" => 1,
|
||||
"height" => 1
|
||||
]
|
||||
]);
|
||||
|
||||
$widget = current($widget);
|
||||
$widget->arguments = json_decode($widget->arguments);
|
||||
$tmpsetup = json_decode($widget->setup);
|
||||
$tmpsetup->file = absoluteJsImportUrl($tmpsetup->file);
|
||||
$widget->setup = $tmpsetup;
|
||||
|
||||
$this->terminateWithSuccess($widget);
|
||||
}
|
||||
|
||||
public function list($dashboard)
|
||||
{
|
||||
$result = $this->WidgetModel->getWithAllowedForDashboard($dashboard);
|
||||
|
||||
$widgets = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$widgets = array_map(function ($widget) {
|
||||
$widget->arguments = json_decode($widget->arguments);
|
||||
$tmpsetup = json_decode($widget->setup);
|
||||
$tmpsetup->file = absoluteJsImportUrl($tmpsetup->file);
|
||||
$widget->setup = $tmpsetup;
|
||||
return $widget;
|
||||
}, $widgets);
|
||||
|
||||
$this->terminateWithSuccess($widgets);
|
||||
}
|
||||
|
||||
public function listAllowed($dashboard)
|
||||
{
|
||||
$result = $this->WidgetModel->getForDashboard($dashboard);
|
||||
|
||||
$widgets = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$widgets = array_map(function ($widget) {
|
||||
$widget->arguments = json_decode($widget->arguments);
|
||||
$tmpsetup = json_decode($widget->setup);
|
||||
$tmpsetup->file = absoluteJsImportUrl($tmpsetup->file);
|
||||
$widget->setup = $tmpsetup;
|
||||
$widget->permitted = empty($widget->berechtigung_kurzbz)
|
||||
|| $this->permissionlib->isBerechtigt($widget->berechtigung_kurzbz);
|
||||
|
||||
return $widget;
|
||||
}, $widgets);
|
||||
|
||||
$this->terminateWithSuccess($widgets);
|
||||
}
|
||||
|
||||
public function setAllowed()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('dashboard_id', 'Dashboard', 'required');
|
||||
$this->form_validation->set_rules('widget_id', 'Widget', 'required');
|
||||
$this->form_validation->set_rules('allowed', 'Allowed', 'is_bool');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$data = [
|
||||
'dashboard_id' => $this->input->post('dashboard_id'),
|
||||
'widget_id' => $this->input->post('widget_id')
|
||||
];
|
||||
|
||||
$this->load->model('dashboard/Dashboard_Widget_model', 'DashboardWidgetModel');
|
||||
|
||||
if ($this->input->post('allowed'))
|
||||
$result = $this->DashboardWidgetModel->insert($data);
|
||||
else
|
||||
$result = $this->DashboardWidgetModel->delete($data);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,10 @@ class Detailheader extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getHeader' => ['vertrag/mitarbeiter:r'],
|
||||
'getPersonAbteilung' => ['vertrag/mitarbeiter:r'],
|
||||
'getLeitungOrg' => ['vertrag/mitarbeiter:r'],
|
||||
'getHeader' => ['vertrag/mitarbeiter:r', 'basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getPersonAbteilung' => ['vertrag/mitarbeiter:r', 'basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getLeitungOrg' => ['vertrag/mitarbeiter:r', 'basis/mitarbeiter:r', 'admin:r', 'assistenz:r'],
|
||||
'getSemesterStati' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -48,6 +49,17 @@ class Detailheader extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function getSemesterStati($prestudent_id)
|
||||
{
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
|
||||
$result = $this->PrestudentstatusModel->getAllPrestudentstatiWithStudiensemester($prestudent_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use CI3_Events as Events;
|
||||
|
||||
class PaabgabeUebersicht extends FHCAPI_Controller
|
||||
{
|
||||
const DOWNLOAD_PERMISSION = 'lehre/abgabetool:download';
|
||||
const ABGABE_TYPES = ['Bachelor', 'Diplom'];
|
||||
|
||||
/**
|
||||
* PaabgabeUebersicht API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'viewData' => self::PERM_LOGGED,
|
||||
'getPaAbgaben' => array('lehre/abgabetool:r'),
|
||||
'getStudiengaenge' => array('lehre/abgabetool:r'),
|
||||
'getTermine' => array('lehre/abgabetool:r'),
|
||||
'getPaAbgabetypen' => array('lehre/abgabetool:r'),
|
||||
'downloadZip' => array('lehre/abgabetool:r'),
|
||||
//'downloadProjektarbeit' => array('lehre/abgabetool:r')
|
||||
]);
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
// Load Phrases
|
||||
$this->loadPhrases([
|
||||
'abgabetool'
|
||||
]);
|
||||
}
|
||||
|
||||
public function viewData()
|
||||
{
|
||||
$viewData = [
|
||||
"uid" => getAuthUID(),
|
||||
// TODO create permission
|
||||
"showEdit" => true,
|
||||
];
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Projektabgaben for search criteria.
|
||||
*/
|
||||
public function getPaAbgaben()
|
||||
{
|
||||
$studiengang_kz = $this->input->get('studiengang_kz');
|
||||
$abgabetyp_kurzbz = $this->input->get('abgabetyp_kurzbz');
|
||||
$abgabedatum = $this->input->get('abgabedatum');
|
||||
$personSearchString = $this->input->get('personSearchString');
|
||||
|
||||
$result = $this->PaabgabeModel->getPaAbgaben(self::ABGABE_TYPES, $studiengang_kz, $abgabetyp_kurzbz, $abgabedatum, $personSearchString);
|
||||
|
||||
if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
|
||||
// check wether Abgabe is in visual library
|
||||
if (hasData($result))
|
||||
{
|
||||
Events::trigger('in_visual_library', getData($result));
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all Studiengänge for which user is entitled for
|
||||
*/
|
||||
public function getStudiengaenge()
|
||||
{
|
||||
$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::DOWNLOAD_PERMISSION);
|
||||
|
||||
if (!$studiengang_kz_arr) $this->terminateWithSuccess([]);
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$this->StudiengangModel->addSelect('tbl_studiengang.*, UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz) AS kuerzel', $studiengang_kz_arr);
|
||||
$this->StudiengangModel->db->where_in('studiengang_kz', $studiengang_kz_arr);
|
||||
$this->StudiengangModel->addOrder('typ, kurzbz');
|
||||
$result = $this->StudiengangModel->load();
|
||||
|
||||
if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get projekt work due dates, depending on search criteria.
|
||||
*/
|
||||
public function getTermine()
|
||||
{
|
||||
$studiengang_kz = $this->input->get('studiengang_kz');
|
||||
$abgabetyp_kurzbz = $this->input->get('abgabetyp_kurzbz');
|
||||
|
||||
$result = $this->PaabgabeModel->getTermine(self::ABGABE_TYPES, $studiengang_kz, $abgabetyp_kurzbz);
|
||||
|
||||
if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all submission types.
|
||||
*/
|
||||
public function getPaAbgabetypen()
|
||||
{
|
||||
// Load model PaabgabetypModel
|
||||
$this->load->model('education/Paabgabetyp_model', 'PaabgabetypModel');
|
||||
|
||||
$this->PaabgabetypModel->addOrder('bezeichnung');
|
||||
$result = $this->PaabgabetypModel->load();
|
||||
|
||||
if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
/**
|
||||
* Download zip files with project works matching submission search criteria.
|
||||
*/
|
||||
public function downloadZip()
|
||||
{
|
||||
$studiengang_kz = $this->input->get('studiengang_kz');
|
||||
$abgabetyp_kurzbz = $this->input->get('abgabetyp_kurzbz');
|
||||
$abgabedatum = $this->input->get('abgabedatum');
|
||||
$personSearchString = $this->input->get('personSearchString');
|
||||
|
||||
if (!isset($studiengang_kz) && !isset($abgabetyp_kurzbz) && !isset($abgabedatum) && !isset($personSearchString))
|
||||
$this->terminateWithFileOutput('text/plain', $this->p->t('abgabetool', 'nichtsAusgewaehlt'));
|
||||
|
||||
$this->load->library('zip');
|
||||
|
||||
$result = $this->PaabgabeModel->getPaAbgaben(self::ABGABE_TYPES, $studiengang_kz, $abgabetyp_kurzbz, $abgabedatum, $personSearchString);
|
||||
|
||||
if (isError($result)) $this->terminateWithFileOutput('text/plain', getError($result));
|
||||
|
||||
$fileExists = false;
|
||||
$studiengang_kuerzel = null;
|
||||
|
||||
if (!hasData($result)) $this->terminateWithFileOutput('text/plain', $this->p->t('abgabetool', 'keineDateienVorhanden'));
|
||||
|
||||
$abgaben = getData($result);
|
||||
|
||||
foreach ($abgaben as $abgabe)
|
||||
{
|
||||
$path = PAABGABE_PATH.$abgabe->paabgabe_id.'_'.$abgabe->uid.'.pdf';
|
||||
if (file_exists($path))
|
||||
{
|
||||
$fileExists = true;
|
||||
$studiengang_kuerzel = $abgabe->studiengang_kuerzel;
|
||||
$this->zip->read_file($path);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$fileExists) $this->terminateWithFileOutput('text/plain', $this->p->t('abgabetool', 'keineDateienVorhanden'));
|
||||
|
||||
$studiengang_kz = $this->input->get('studiengang_kz');
|
||||
$zipFileName = 'Abgabe'.(isset($studiengang_kz) && isset($studiengang_kuerzel) ? '_'.$studiengang_kuerzel : '').'.zip';
|
||||
$this->zip->download($zipFileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Download Projektarbeit document.
|
||||
*/
|
||||
//~ public function downloadProjektarbeit()
|
||||
//~ {
|
||||
//~ $paabgabe_id = $this->input->get('paabgabe_id');
|
||||
|
||||
//~ if (!is_numeric($paabgabe_id))
|
||||
//~ $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id' => 'Abgabe ID']), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
//~ //$abgabeRes = $this->PaabgabeModel->getEndabgabe($projektarbeit_id);
|
||||
//~ $this->PaabgabeModel->addSelect("paabgabe_id, student_uid, tbl_paabgabe.datum, tbl_paabgabe.abgabedatum, projekttyp_kurzbz, titel, titel_english,
|
||||
//~ paabgabe_id || '_' || student_uid || '.pdf' AS filename");
|
||||
//~ $this->PaabgabeModel->addJoin('lehre.tbl_projektarbeit', 'projektarbeit_id');
|
||||
//~ $abgabeRes = $this->PaabgabeModel->load($paabgabe_id);
|
||||
|
||||
//~ if (isError($abgabeRes))
|
||||
//~ show_error(getError($abgabeRes));
|
||||
|
||||
//~ if (hasData($abgabeRes))
|
||||
//~ {
|
||||
//~ $endabgabe = getData($abgabeRes)[0];
|
||||
//~ $filepath = PAABGABE_PATH.$endabgabe->filename;
|
||||
|
||||
//~ if (file_exists($filepath))
|
||||
//~ {
|
||||
//~ $this->output
|
||||
//~ ->set_status_header(200)
|
||||
//~ ->set_content_type('application/pdf', 'utf-8')
|
||||
//~ ->set_header('Content-Disposition: attachment; filename="'.$endabgabe->filename.'"')
|
||||
//~ ->set_output(file_get_contents($filepath))
|
||||
//~ ->_display();
|
||||
//~ }
|
||||
//~ else
|
||||
//~ {
|
||||
//~ show_error("File does not exist.");
|
||||
//~ }
|
||||
//~ }
|
||||
//~ }
|
||||
}
|
||||
@@ -12,9 +12,9 @@ class Funktionen extends FHCAPI_Controller
|
||||
parent::__construct(array(
|
||||
'getAllFunctions' => ['admin:r', 'assistenz:r'],
|
||||
'getAllUserFunctions' => ['admin:r', 'assistenz:r'],
|
||||
'getOrgHeads' => ['admin:r', 'assistenz:r'],
|
||||
'getOrgetsForCompany' => ['admin:r', 'assistenz:r'],
|
||||
'getAllOrgUnits' => ['admin:r', 'assistenz:r'],
|
||||
'getOrgHeads' => self::PERM_LOGGED,
|
||||
'getOrgetsForCompany' => self::PERM_LOGGED,
|
||||
'getAllOrgUnits' => self::PERM_LOGGED,
|
||||
'loadFunction' => ['admin:r', 'assistenz:r'],
|
||||
'insertFunction' => ['admin:rw', 'assistenz:rw'],
|
||||
'updateFunction' => ['admin:rw', 'assistenz:rw'],
|
||||
@@ -294,6 +294,10 @@ class Funktionen extends FHCAPI_Controller
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
if($datum_von == '')
|
||||
$datum_von = null;
|
||||
if($datum_bis == '')
|
||||
$datum_bis = null;
|
||||
|
||||
$result = $this->BenutzerfunktionModel->update(
|
||||
[
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Betreuungen extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getBetreuungen' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getBetreuungen()
|
||||
{
|
||||
$semester = $this->input->get("semester");
|
||||
if (!$semester) $this->terminateWithError("Missing parameters!");
|
||||
|
||||
$personId = getAuthPersonId();
|
||||
|
||||
$betreuungenQuery = "SELECT
|
||||
tbl_lehrveranstaltung.bezeichnung,
|
||||
tbl_projektarbeit.titel,
|
||||
(SELECT nachname || ' ' || (CASE WHEN wahlname IS NOT NULL THEN wahlname ELSE vorname END)
|
||||
FROM public.tbl_benutzer
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE uid=student_uid)
|
||||
as name,
|
||||
(SELECT uid
|
||||
FROM public.tbl_benutzer
|
||||
WHERE uid=student_uid)
|
||||
as uid,
|
||||
tbl_lehrveranstaltung.studiengang_kz,
|
||||
tbl_lehrveranstaltung.semester,
|
||||
tbl_studiengang.kurzbzlang as studiengang,
|
||||
tbl_studiengang.email,
|
||||
tbl_betreuerart.beschreibung AS beutreuerart_beschreibung,
|
||||
tbl_projektbetreuer.stunden
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung, lehre.tbl_projektarbeit, lehre.tbl_projektbetreuer, public.tbl_studiengang, lehre.tbl_betreuerart
|
||||
WHERE
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_projektarbeit.lehrveranstaltung_id AND
|
||||
tbl_projektarbeit.studiensemester_kurzbz = '$semester' AND
|
||||
tbl_projektarbeit.projektarbeit_id = tbl_projektbetreuer.projektarbeit_id AND
|
||||
tbl_lehrveranstaltung.studiengang_kz = tbl_studiengang.studiengang_kz AND
|
||||
tbl_projektbetreuer.betreuerart_kurzbz = tbl_betreuerart.betreuerart_kurzbz AND
|
||||
tbl_projektbetreuer.person_id = '$personId'";
|
||||
$this->addMeta("query", $betreuungenQuery);
|
||||
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$result = $this->LehrveranstaltungModel->execReadOnlyQuery($betreuungenQuery);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Config extends FHCAPI_Controller
|
||||
{
|
||||
private $_ci;
|
||||
private $_uid;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'get' => ['admin:r', 'assistenz:r'],
|
||||
'set' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
$this->_ci = &get_instance();
|
||||
$this->_setAuthUID();
|
||||
|
||||
$this->loadPhrases([
|
||||
'lehre'
|
||||
]);
|
||||
|
||||
$this->_ci->load->library('VariableLib', ['uid' => $this->_uid]);
|
||||
$this->_ci->load->library('PermissionLib');
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function get()
|
||||
{
|
||||
if (!($this->permissionlib->isBerechtigt('basis/tempus')) && !($this->permissionlib->isBerechtigt('lv-plan')))
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$ignore_kollision = $this->_ci->variablelib->getVar('ignore_kollision');
|
||||
$ignore_zeitsperre = $this->_ci->variablelib->getVar('ignore_zeitsperre');
|
||||
$ignore_reservierung = $this->_ci->variablelib->getVar('ignore_reservierung');
|
||||
|
||||
$config['ignore_kollision'] = [
|
||||
"type" => "checkbox",
|
||||
"label" => 'ignore_kollision',
|
||||
"value" => $ignore_kollision,
|
||||
];
|
||||
|
||||
$config['ignore_zeitsperre'] = [
|
||||
"type" => "checkbox",
|
||||
"label" => 'ignore_zeitsperre',
|
||||
"value" => $ignore_zeitsperre,
|
||||
];
|
||||
|
||||
$config['ignore_reservierung'] = [
|
||||
"type" => "checkbox",
|
||||
"label" => 'ignore_reservierung',
|
||||
"value" => $ignore_reservierung,
|
||||
];
|
||||
|
||||
$this->terminateWithSuccess($config);
|
||||
}
|
||||
public function set()
|
||||
{
|
||||
if (!($this->permissionlib->isBerechtigt('basis/tempus')) && !($this->permissionlib->isBerechtigt('lv-plan')))
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
|
||||
foreach (['ignore_kollision','ignore_zeitsperre','ignore_reservierung'] as $variable)
|
||||
{
|
||||
if ($this->_ci->input->post($variable) !== null)
|
||||
{
|
||||
$this->VariableModel->update(array('uid' => $this->_uid, 'name' => $variable), array('wert' => $this->input->post($variable)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
if (!$this->_uid)
|
||||
show_error('User authentification failed');
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Favorites extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => self::PERM_LOGGED,
|
||||
'set' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$result = $this->VariableModel->getVariables(getAuthUID(), ['lv_favorites']);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$data)
|
||||
$this->terminateWithSuccess(null);
|
||||
else
|
||||
$this->terminateWithSuccess(isset($data['lv_favorites']) ? $data['lv_favorites'] : null);
|
||||
}
|
||||
|
||||
public function set()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('favorites', 'Favorites', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$favorites = $this->input->post('favorites');
|
||||
|
||||
$result = $this->VariableModel->setVariable(getAuthUID(), 'lv_favorites', $favorites);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ class Gruppe extends FHCAPI_Controller
|
||||
'getBenutzerSearch' => ['admin:r', 'assistenz:r'],
|
||||
'getAllSearch' => ['admin:r', 'assistenz:r'],
|
||||
'getByLehreinheit' => ['admin:r', 'assistenz:r'],
|
||||
'getGruppe' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
$this->_ci = &get_instance();
|
||||
@@ -67,7 +68,7 @@ class Gruppe extends FHCAPI_Controller
|
||||
|
||||
$this->checkPermission($lehreinheit_id);
|
||||
|
||||
$result = $this->_ci->LehreinheitgruppeModel->addGroup($lehreinheit_id, $gid, !($lehrverband === 'false'));
|
||||
$result = $this->_ci->LehreinheitgruppeModel->addGroup($lehreinheit_id, $gid, $lehrverband === true || $lehrverband === 'true');
|
||||
|
||||
if (isError($result))
|
||||
$this->terminateWithError(getError($result));
|
||||
@@ -75,6 +76,71 @@ class Gruppe extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function getGruppe()
|
||||
{
|
||||
$lehrverband = $this->input->post('lehrverband');
|
||||
|
||||
$gruppen_result = array();
|
||||
|
||||
if ($lehrverband === false)
|
||||
{
|
||||
$gruppen_result = $this->_ci->GruppeModel->loadWhere(array(
|
||||
'studiengang_kz' => $this->input->post('stg_kz'),
|
||||
'gruppe_kurzbz' => $this->input->post('gruppe_kurzbz'),
|
||||
'aktiv' => true
|
||||
));
|
||||
}
|
||||
else if ($lehrverband === true)
|
||||
{
|
||||
|
||||
if (!isEmptyString($this->input->post('verband')))
|
||||
{
|
||||
$this->LehrverbandModel->db->where('verband', $this->input->post('verband'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->LehrverbandModel->db->group_start();
|
||||
$this->LehrverbandModel->db->where("trim(verband) = ''");
|
||||
$this->LehrverbandModel->db->or_where("verband IS NULL");
|
||||
$this->LehrverbandModel->db->group_end();
|
||||
}
|
||||
|
||||
if (!isEmptyString($this->input->post('gruppe')))
|
||||
{
|
||||
$this->LehrverbandModel->db->where('gruppe', $this->input->post('gruppe'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->LehrverbandModel->db->group_start();
|
||||
$this->LehrverbandModel->db->where("trim(gruppe) = ''");
|
||||
$this->LehrverbandModel->db->or_where("gruppe IS NULL");
|
||||
$this->LehrverbandModel->db->group_end();
|
||||
}
|
||||
|
||||
if (!isEmptyString((string)$this->input->post('semester')))
|
||||
{
|
||||
$this->LehrverbandModel->db->where('semester', $this->input->post('semester'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->LehrverbandModel->db->group_start();
|
||||
$this->LehrverbandModel->db->where("semester = ''");
|
||||
$this->LehrverbandModel->db->or_where("semester IS NULL");
|
||||
$this->LehrverbandModel->db->group_end();
|
||||
}
|
||||
|
||||
$gruppen_result = $this->LehrverbandModel->loadWhere(array('studiengang_kz' => $this->input->post('stg_kz'), 'aktiv' => true));
|
||||
}
|
||||
|
||||
if (!hasData($gruppen_result))
|
||||
return $this->terminateWithError('No group found');
|
||||
|
||||
$gruppen_array = getData($gruppen_result)[0];
|
||||
|
||||
$this->terminateWithSuccess($gruppen_array->gid);
|
||||
}
|
||||
|
||||
public function getByLehreinheit($lehreinheit_id = null)
|
||||
{
|
||||
if (is_null($lehreinheit_id) || !ctype_digit((string)$lehreinheit_id))
|
||||
|
||||
@@ -19,7 +19,8 @@ class Lehreinheit extends FHCAPI_Controller
|
||||
'getLehrfach' => ['admin:r', 'assistenz:r'],
|
||||
'getSprache' => ['admin:r', 'assistenz:r'],
|
||||
'getRaumtyp' => ['admin:r', 'assistenz:r'],
|
||||
'getLehrform' => ['admin:r', 'assistenz:r']
|
||||
'getLehrform' => ['admin:r', 'assistenz:r'],
|
||||
'getLehreinheitenBySemester' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->_ci = &get_instance();
|
||||
@@ -438,6 +439,27 @@ class Lehreinheit extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($this->p->t('global', 'gespeichert'));
|
||||
}
|
||||
|
||||
public function getLehreinheitenBySemester()
|
||||
{
|
||||
$semester = $this->input->get('semester');
|
||||
$lehreinheiten = $this->LehreinheitModel->getLehrenheitenBySemester(getAuthUID(), $semester);
|
||||
$lehreinheiten = $this->getDataOrTerminateWithError($lehreinheiten);
|
||||
|
||||
foreach ($lehreinheiten as $lehreinheit) {
|
||||
$groups = $this->LehreinheitModel->getGroupsByLehreinheit($lehreinheit->lehreinheit_id);
|
||||
$groups = $this->getDataOrTerminateWithError($groups);
|
||||
$stgKurzbz = $lehreinheit->stg_kurzbz;
|
||||
$lehreinheit->groups = array_map(
|
||||
function ($group) use ($stgKurzbz) {
|
||||
return $group->gruppe_kurzbz ?? $stgKurzbz . "-" . $group->semester . $group->verband . $group->gruppe;
|
||||
},
|
||||
$groups
|
||||
);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($lehreinheiten);
|
||||
}
|
||||
|
||||
|
||||
private function checkPermission($lehreinheit_id)
|
||||
{
|
||||
|
||||
@@ -134,9 +134,14 @@ class Lektor extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
if (isset($formData['semesterstunden']) && (!is_numeric($formData['semesterstunden']) || $formData['semesterstunden'] === ''))
|
||||
$nullable_fields = array('semesterstunden', 'stundensatz', 'planstunden');
|
||||
|
||||
foreach ($nullable_fields as $nullable_field)
|
||||
{
|
||||
$formData['semesterstunden'] = null;
|
||||
if (isset($formData[$nullable_field]) && (!is_numeric($formData[$nullable_field]) || $formData[$nullable_field] === ''))
|
||||
{
|
||||
$formData[$nullable_field] = null;
|
||||
}
|
||||
}
|
||||
|
||||
$lehreinheit_permission = $this->checkPermission($lehreinheit_id, array('admin', 'assistenz', 'lv-plan'));
|
||||
@@ -144,6 +149,9 @@ class Lektor extends FHCAPI_Controller
|
||||
if (!$lehreinheit_permission)
|
||||
$this->terminateWithError($this->p->t('ui', 'error_fieldWriteAccess'));
|
||||
|
||||
if (!is_null($this->getLektorVertrag($lehreinheit_id, $mitarbeiter_uid)) && (array_key_exists('mitarbeiter_uid', $formData) && $mitarbeiter_uid !== $formData['mitarbeiter_uid']))
|
||||
$this->terminateWithError($this->p->t('ui', 'error_fieldWriteAccess'));
|
||||
|
||||
$result = $this->_ci->lektorlib->updateLektorFromLehreinheit($lehreinheit_id, $mitarbeiter_uid, $formData);
|
||||
|
||||
if (isError($result)) $this->terminateWithError(getError($result));
|
||||
@@ -154,7 +162,7 @@ class Lektor extends FHCAPI_Controller
|
||||
{
|
||||
$value = str_replace(',', '.', $value);
|
||||
|
||||
if (!is_numeric($value))
|
||||
if (!is_numeric($value) && $value !== "")
|
||||
{
|
||||
$this->form_validation->set_message('_check_decimal', 'Das Feld {field} muss eine Zahl sein.');
|
||||
return false;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Noten extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getCertificate' => 'student/noten:r',
|
||||
'getTeacherProposal' => 'student/noten:r',
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
|
||||
// Load Phrases
|
||||
$this->loadPhrases([
|
||||
'stv',
|
||||
'person',
|
||||
'lehre'
|
||||
]);
|
||||
}
|
||||
|
||||
public function getCertificate($lv_id, $studiensemester_kurzbz = null)
|
||||
{
|
||||
if (is_null($lv_id) || !ctype_digit((string)$lv_id))
|
||||
$this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->model('education/lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->loadWhere([
|
||||
'lehrveranstaltung_id' => $lv_id
|
||||
]);
|
||||
|
||||
$lehrveranstaltung = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$lehrveranstaltung)
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
if ($studiensemester_kurzbz !== null && !$this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
|
||||
{
|
||||
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
|
||||
}
|
||||
|
||||
$result = $this->ZeugnisnoteModel->getZeugnisnoten(null, $studiensemester_kurzbz, $lehrveranstaltung[0]->lehrveranstaltung_id);
|
||||
|
||||
$grades = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($grades);
|
||||
}
|
||||
|
||||
public function getTeacherProposal($lv_id, $studiensemester_kurzbz = null)
|
||||
{
|
||||
if (is_null($lv_id) || !ctype_digit((string)$lv_id))
|
||||
$this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->model('education/lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->loadWhere([
|
||||
'lehrveranstaltung_id' => $lv_id
|
||||
]);
|
||||
|
||||
$lehrveranstaltung = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$lehrveranstaltung)
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
if ($studiensemester_kurzbz !== null && !$this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
|
||||
{
|
||||
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
|
||||
}
|
||||
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, null, $studiensemester_kurzbz);
|
||||
|
||||
$grades = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($grades);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,6 +19,8 @@
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
use CI3_Events as Events;
|
||||
|
||||
class Setup extends FHCAPI_Controller
|
||||
{
|
||||
private $_ci;
|
||||
@@ -27,7 +29,8 @@ class Setup extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getTabs' => ['admin:r', 'assistenz:r'],
|
||||
'getLETabs' => ['admin:r', 'assistenz:r'],
|
||||
'getLVTabs' => ['admin:r', 'assistenz:r'],
|
||||
'getStudiensemester' => ['admin:r', 'assistenz:r'],
|
||||
'getSprache' => ['admin:r', 'assistenz:r'],
|
||||
'getRaumtyp' => ['admin:r', 'assistenz:r'],
|
||||
@@ -41,9 +44,10 @@ class Setup extends FHCAPI_Controller
|
||||
$this->_ci->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$this->_ci->load->library('VariableLib', ['uid' => $this->_uid]);
|
||||
$this->_ci->load->helper('hlp_document');
|
||||
}
|
||||
|
||||
public function getTabs()
|
||||
public function getLETabs()
|
||||
{
|
||||
$tabs['details'] = array (
|
||||
'title' => 'Details',
|
||||
@@ -60,11 +64,43 @@ class Setup extends FHCAPI_Controller
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/Lektor.js'),
|
||||
'config' => []
|
||||
);
|
||||
$tabs['termine'] = array (
|
||||
'title' => 'Termine',
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/Termine.js'),
|
||||
'config' => []
|
||||
);
|
||||
$tabs['notiz'] = array (
|
||||
'title' => 'Notizen',
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/Notiz.js'),
|
||||
'config' => []
|
||||
);
|
||||
|
||||
Events::trigger('lvv_conf_tabs', function & () use (&$tabs) {
|
||||
return $tabs;
|
||||
});
|
||||
|
||||
$this->terminateWithSuccess($tabs);
|
||||
}
|
||||
|
||||
public function getLVTabs()
|
||||
{
|
||||
$tabs['termine'] = array (
|
||||
'title' => 'Termine',
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/LVTermine.js'),
|
||||
'config' => []
|
||||
);
|
||||
$tabs['noten'] = array (
|
||||
'title' => 'Noten',
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/Noten.js'),
|
||||
'config' => [
|
||||
'usePoints' => defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE,
|
||||
'edit' => 'both', // Possible values: both|header|inline
|
||||
'delete' => 'inline', // Possible values: both|header|inline
|
||||
'documents' => 'inline', // Possible values: both|header|inline
|
||||
'documentslist' => gradesDocumentsList(),
|
||||
'semesterSelect' => false
|
||||
]
|
||||
);
|
||||
$this->terminateWithSuccess($tabs);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class StgTree extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$permissions = [];
|
||||
$router = load_class('Router');
|
||||
$permissions[$router->method] = ['admin:r', 'assistenz:r'];
|
||||
parent::__construct($permissions);
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
}
|
||||
|
||||
public function _remap($method, $params = [])
|
||||
{
|
||||
if ($method == '' || $method == 'index')
|
||||
return $this->getBase();
|
||||
|
||||
if (!$this->permissionlib->isBerechtigt('assistenz', 's', $method)
|
||||
&& !$this->permissionlib->isBerechtigt('admin', 's', $method)
|
||||
) {
|
||||
return $this->_outputAuthError([$method => ['admin:r', 'assistenz:r']]);
|
||||
}
|
||||
|
||||
return $this->getStudiengang($method);
|
||||
show_404();
|
||||
}
|
||||
|
||||
protected function getBase()
|
||||
{
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("v.studiengang_kz AS link");
|
||||
$this->StudiengangModel->addSelect(
|
||||
"CONCAT(kurzbzlang, ' (', UPPER(CONCAT(typ, kurzbz)), ') - ', tbl_studiengang.bezeichnung) AS name",
|
||||
false
|
||||
);
|
||||
$this->StudiengangModel->addSelect('erhalter_kz');
|
||||
$this->StudiengangModel->addSelect('typ');
|
||||
$this->StudiengangModel->addSelect('kurzbz');
|
||||
$this->StudiengangModel->addSelect('studiengang_kz');
|
||||
$this->StudiengangModel->addSelect('studiengang_kz AS stg_kz');
|
||||
|
||||
$this->StudiengangModel->addOrder('erhalter_kz');
|
||||
$this->StudiengangModel->addOrder('typ');
|
||||
$this->StudiengangModel->addOrder('kurzbz');
|
||||
|
||||
$stgs = $this->permissionlib->getSTG_isEntitledFor('admin') ?: [];
|
||||
$stgs = array_merge($stgs, $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: []);
|
||||
|
||||
if (!$stgs)
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$this->StudiengangModel->db->where_in('studiengang_kz', $stgs);
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere(['v.aktiv' => true]);
|
||||
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
protected function getStudiengang($studiengang_kz)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", semester) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(UPPER(CONCAT(typ, kurzbz)), '-', semester, (SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END FROM public.tbl_lehrverband WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester ORDER BY verband, gruppe LIMIT 1)) AS name", false);
|
||||
$this->StudiengangModel->addSelect("TRUE AS leaf", false);
|
||||
|
||||
$this->StudiengangModel->addSelect('semester');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->StudiengangModel->addOrder('semester');
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere([
|
||||
'v.studiengang_kz' => $studiengang_kz,
|
||||
'v.aktiv' => true
|
||||
]);
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->StudiengangModel->load($studiengang_kz);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
if ($result)
|
||||
{
|
||||
if (current($result)->mischform)
|
||||
{
|
||||
$this->load->model('organisation/Studienordnung_model', 'StudienordnungModel');
|
||||
|
||||
$this->StudienordnungModel->addDistinct();
|
||||
$this->StudienordnungModel->addSelect("CONCAT(studiengang_kz, '/', p.orgform_kurzbz) AS link");
|
||||
$this->StudienordnungModel->addSelect("p.orgform_kurzbz AS name");
|
||||
$this->StudienordnungModel->addSelect("TRUE as leaf", false);
|
||||
|
||||
$this->StudienordnungModel->addJoin('lehre.tbl_studienplan p', 'studienordnung_id');
|
||||
|
||||
$result = $this->StudienordnungModel->loadWhere([
|
||||
'aktiv' => true,
|
||||
'studiengang_kz' => $studiengang_kz,
|
||||
'p.orgform_kurzbz !=' => 'DDP'
|
||||
]);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$list = array_merge($list, $result);
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
}
|
||||
@@ -42,14 +42,22 @@ class Messages extends FHCAPI_Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function getMessages($id, $type_id, $size, $page)
|
||||
public function getMessages($id, $type_id, $size=null, $page=null)
|
||||
{
|
||||
if($type_id != 'person_id'){
|
||||
$id = $this->_getPersonId($id, $type_id);
|
||||
}
|
||||
|
||||
$offset = $size * ($page - 1);
|
||||
$limit = $size;
|
||||
if(!(is_null($size) && is_null($page)))
|
||||
{
|
||||
$offset = $size * ($page - 1);
|
||||
$limit = $size;
|
||||
}
|
||||
else
|
||||
{
|
||||
$offset = null;
|
||||
$limit = null;
|
||||
}
|
||||
|
||||
$result = $this->MessageModel->getMessagesForTable($id, $offset, $limit);
|
||||
|
||||
|
||||
@@ -26,7 +26,10 @@ class Studiensemester extends FHCAPI_Controller
|
||||
'getAll' => self::PERM_LOGGED,
|
||||
'getAktNext' => self::PERM_LOGGED,
|
||||
'getStudienjahrByStudiensemester' => self::PERM_LOGGED,
|
||||
'getAllStudiensemesterAndAktOrNext' => self::PERM_LOGGED
|
||||
'getAllStudiensemesterAndAktOrNext' => self::PERM_LOGGED,
|
||||
'current' => self::PERM_LOGGED,
|
||||
'set' => self::PERM_LOGGED,
|
||||
'getContainingOrNearestByDateRange' => self::PERM_LOGGED,
|
||||
)
|
||||
);
|
||||
// Load model StudiensemesterModel
|
||||
@@ -166,4 +169,50 @@ class Studiensemester extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess(array($studiensemester, $aktuell));
|
||||
}
|
||||
|
||||
public function current()
|
||||
{
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$data)
|
||||
$this->terminateWithError('Kein Studiensemester aktiv');
|
||||
if (count($data) > 1)
|
||||
$this->terminateWithError('Mehrere Studiensemester aktiv');
|
||||
|
||||
$this->terminateWithSuccess(current($data)->studiensemester_kurzbz);
|
||||
}
|
||||
|
||||
public function set()
|
||||
{
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('studiensemester_kurzbz', 'Studiensemester', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$stdsem = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
|
||||
$result = $this->VariableModel->setVariable(getAuthUID(), 'semester_aktuell', $stdsem);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
|
||||
public function getContainingOrNearestByDateRange()
|
||||
{
|
||||
$from = $this->input->get("from");
|
||||
$to = $this->input->get("to");
|
||||
|
||||
$result = $this->StudiensemesterModel->getContainingOrNearestByDateRange($from, $to);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,12 +246,12 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
{
|
||||
$searchString = $this->input->get('searchString') ?? '';
|
||||
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
|
||||
$result = $this->MitarbeiterModel->searchMitarbeiter($searchString, 'ohneMaUid');
|
||||
$result = $this->PersonModel->searchPerson($searchString, 'mitMaUid');
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($result ?: []);
|
||||
@@ -371,6 +371,9 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$datum = $formData['datum'] == '' ? null : $formData['datum'];
|
||||
$sponsion = $formData['sponsion'] == '' ? null : $formData['sponsion'];
|
||||
|
||||
$result = $this->AbschlusspruefungModel->update(
|
||||
[
|
||||
'abschlusspruefung_id' => $abschlusspruefung_id
|
||||
@@ -382,8 +385,8 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
'vorsitz' => $vorsitz,
|
||||
'pruefungsantritt_kurzbz' => $formData['pruefungsantritt_kurzbz'],
|
||||
'abschlussbeurteilung_kurzbz' => $formData['abschlussbeurteilung_kurzbz'],
|
||||
'datum' => $formData['datum'],
|
||||
'sponsion' => $formData['sponsion'],
|
||||
'datum' => $datum,
|
||||
'sponsion' => $sponsion,
|
||||
'pruefer1' => $pruefer1,
|
||||
'pruefer2' => $pruefer2,
|
||||
'pruefer3' => $pruefer3,
|
||||
|
||||
@@ -301,6 +301,7 @@ class Config extends FHCAPI_Controller
|
||||
|
||||
public function student()
|
||||
{
|
||||
$this->load->helper('hlp_document');
|
||||
$result = [];
|
||||
$config = $this->config->item('tabs');
|
||||
|
||||
@@ -376,9 +377,9 @@ class Config extends FHCAPI_Controller
|
||||
'config' => [
|
||||
'usePoints' => defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE,
|
||||
'edit' => 'both', // Possible values: both|header|inline
|
||||
'delete' => 'both', // Possible values: both|header|inline
|
||||
'documents' => 'both', // Possible values: both|header|inline
|
||||
'documentslist' => $this->gradesDocumentsList()
|
||||
'delete' => 'inline', // Possible values: both|header|inline
|
||||
'documents' => 'inline', // Possible values: both|header|inline
|
||||
'documentslist' => gradesDocumentsList()
|
||||
]
|
||||
];
|
||||
|
||||
@@ -622,188 +623,6 @@ class Config extends FHCAPI_Controller
|
||||
] + $this->kontoColumns();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to generate the default documentslist config for the
|
||||
* grades tab.
|
||||
*
|
||||
* The resulting array consists of elements which are associative arrays
|
||||
* that can have the following entries:
|
||||
* title (required) on the first level this can be HTML code.
|
||||
* permissioncheck (optional) an URL to an FHCAPI endpoint which returns
|
||||
* true or false.
|
||||
* link (optional) an URL that will be called if "action" and
|
||||
* "children" are not defined.
|
||||
* action (optional) an associative array that describes an
|
||||
* POST action that will be called if "children" is
|
||||
* not defined.
|
||||
* It can have the following entries:
|
||||
* - url (required) an URL to an FHCAPI endpoint.
|
||||
* - post (optional) an associative array with the POST data to
|
||||
* be sent.
|
||||
* - response (optional) a string that will be displayed on success.
|
||||
* children (optional) an array of child elements
|
||||
*
|
||||
* All strings that start with { and end with } in the URLs and the
|
||||
* actions post parameter will be replaced with the corresponding
|
||||
* attribute of the current dataset (e.G: {uid} will be replaced with the
|
||||
* uid of the current dataset)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function gradesDocumentsList()
|
||||
{
|
||||
$permissioncheck = site_url("api/frontend/v1/documents/permissionAlternativeFormat/{studiengang_kz}");
|
||||
|
||||
$title_ger = $this->p->t("global", "deutsch");
|
||||
$title_eng = $this->p->t("global", "englisch");
|
||||
$title_ff = $this->p->t("stv", "document_certificate");
|
||||
$title_lv = $this->p->t("stv", "document_coursecertificate");
|
||||
|
||||
$link_ff = "documents/export/" .
|
||||
"zertifikat.rdf.php/" .
|
||||
"Zertifikat" .
|
||||
"?stg_kz={studiengang_kz_lv}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
$link_lv_ger = "documents/export/" .
|
||||
"lehrveranstaltungszeugnis.rdf.php/" .
|
||||
"LVZeugnis" .
|
||||
"?stg_kz={studiengang_kz}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
$link_lv_eng = "documents/export/" .
|
||||
"lehrveranstaltungszeugnis.rdf.php/" .
|
||||
"LVZeugnisEng" .
|
||||
"?stg_kz={studiengang_kz}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
|
||||
$archive_url = "api/frontend/v1/documents/archiveSigned";
|
||||
$archive_response = $this->p->t("stv", "document_signed_and_archived");
|
||||
$archive_post_ff = [
|
||||
"xml" => "zertifikat.rdf.php",
|
||||
"xsl" => "Zertifikat",
|
||||
"stg_kz" => "{studiengang_kz_lv}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
$archive_post_lv_ger = [
|
||||
"xml" => "lehrveranstaltungszeugnis.rdf.php",
|
||||
"xsl" => "LVZeugnis",
|
||||
"stg_kz" => "{studiengang_kz}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
$archive_post_lv_eng = [
|
||||
"xml" => "lehrveranstaltungszeugnis.rdf.php",
|
||||
"xsl" => "LVZeugnisEng",
|
||||
"stg_kz" => "{studiengang_kz}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
|
||||
$list = [
|
||||
[
|
||||
'title' => '<i class="fa fa-download" title="' . $this->p->t("stv", "document_download") . '"></i>',
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ff,
|
||||
'link' => site_url($link_ff)
|
||||
],
|
||||
[
|
||||
'title' => $title_lv,
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ger,
|
||||
'link' => site_url($link_lv_ger),
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'PDF',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger)
|
||||
],
|
||||
[
|
||||
'title' => 'DOC',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger . "&output=doc")
|
||||
],
|
||||
[
|
||||
'title' => 'ODT',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger . "&output=odt")
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_eng,
|
||||
'link' => site_url($link_lv_eng),
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'PDF',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng)
|
||||
],
|
||||
[
|
||||
'title' => 'DOC',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng . "&output=doc")
|
||||
],
|
||||
[
|
||||
'title' => 'ODT',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng . "&output=odt")
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '<i class="fas fa-archive" title="' . $this->p->t("stv", "document_archive") . '"></i>',
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ff,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_ff,
|
||||
'response' => $archive_response
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_lv,
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ger,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_lv_ger,
|
||||
'response' => $archive_response
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_eng,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_lv_eng,
|
||||
'response' => $archive_response
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort tab list
|
||||
*
|
||||
|
||||
@@ -78,52 +78,32 @@ class Dokumente extends FHCAPI_Controller
|
||||
$this->terminateWithError($this->p->t('ui', 'errorMissingValue', ['value' => 'Studiengang_kz']), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$resultPreDoc = $this->_getPrestudentDokumente($prestudent_id);
|
||||
|
||||
$arrayAccepted = [];
|
||||
$person_id = $this->_getPersonId($prestudent_id);
|
||||
|
||||
$docNames = array_map(function ($item) {
|
||||
return $item->dokument_kurzbz;
|
||||
}, $resultPreDoc);
|
||||
$mergedArray = [];
|
||||
|
||||
foreach($docNames as $doc)
|
||||
foreach ($resultPreDoc as $pre)
|
||||
{
|
||||
$result = $this->AkteModel->getAktenFAS($person_id, $doc, $studiengang_kz, $prestudent_id, true);
|
||||
$result = $this->AkteModel->getAktenFAS($person_id, $pre->dokument_kurzbz, $studiengang_kz, $prestudent_id, true);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$data = getData($result);
|
||||
foreach ($data as $value)
|
||||
foreach (getData($result) as $doc)
|
||||
{
|
||||
array_push($arrayAccepted, $value);
|
||||
$merged = clone $doc;
|
||||
$merged->docdatum = $pre->docdatum;
|
||||
$merged->insertvonma = $pre->insertvonma;
|
||||
$merged->bezeichnung = $pre->bezeichnung;
|
||||
$mergedArray[] = $merged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Mapping with document_kurzbz
|
||||
$preDocMap = [];
|
||||
foreach ($resultPreDoc as $pre) {
|
||||
$preDocMap[$pre->dokument_kurzbz] = $pre;
|
||||
}
|
||||
|
||||
$mergedArray = [];
|
||||
foreach ($arrayAccepted as $doc) {
|
||||
$merged = clone $doc;
|
||||
|
||||
if (isset($preDocMap[$doc->dokument_kurzbz])) {
|
||||
$merged->docdatum = $preDocMap[$doc->dokument_kurzbz]->docdatum;
|
||||
$merged->insertvonma = $preDocMap[$doc->dokument_kurzbz]->insertvonma;
|
||||
$merged->bezeichnung = $preDocMap[$doc->dokument_kurzbz]->bezeichnung;
|
||||
} else {
|
||||
$merged->akzeptiertdatum = null;
|
||||
$merged->akzeptiertvon = null;
|
||||
else
|
||||
{
|
||||
$mergedArray[] = $pre;
|
||||
}
|
||||
|
||||
$mergedArray[] = $merged;
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($mergedArray);
|
||||
@@ -190,6 +170,8 @@ class Dokumente extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$nachgereicht_am = $this->input->post('nachgereicht_am') == '' ? null : $this->input->post('nachgereicht_am');
|
||||
|
||||
$uid = getAuthUID();
|
||||
|
||||
$result = $this->AkteModel->update(
|
||||
@@ -200,7 +182,7 @@ class Dokumente extends FHCAPI_Controller
|
||||
'dokument_kurzbz' => $this->input->post('dokument_kurzbz'),
|
||||
'anmerkung_intern' => $this->input->post('anmerkung_intern'),
|
||||
'titel_intern' => $this->input->post('titel_intern'),
|
||||
'nachgereicht_am' => $this->input->post('nachgereicht_am'),
|
||||
'nachgereicht_am' => $nachgereicht_am,
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $uid,
|
||||
]
|
||||
|
||||
@@ -41,6 +41,9 @@ class Grades extends FHCAPI_Controller
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$this->load->library('PruefungsverlaufLib', null, 'VerlaufLib');
|
||||
|
||||
$this->load->config('noten');
|
||||
|
||||
// Load Phrases
|
||||
$this->loadPhrases([
|
||||
@@ -355,23 +358,24 @@ class Grades extends FHCAPI_Controller
|
||||
$data['lehrveranstaltung_id'] = $lehrveranstaltung_id;
|
||||
$data['student_uid'] = $student_uid;
|
||||
$data['studiensemester_kurzbz'] = $studiensemester_kurzbz;
|
||||
|
||||
$this->ZeugnisnoteModel->insert($data);
|
||||
|
||||
if (defined('FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN')
|
||||
&& FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN) {
|
||||
$result = $this->addTestsForGrade(
|
||||
$studiensemester_kurzbz,
|
||||
$student_uid,
|
||||
$lehrveranstaltung_id,
|
||||
$teacherGrade->note,
|
||||
$teacherGrade->punkte
|
||||
);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
$this->ZeugnisnoteModel->insert($data);
|
||||
}
|
||||
|
||||
// Der erste Antritt wird bereits bei der Übernahme als eigene Prüfung angelegt, damit der
|
||||
// Prüfungsverlauf von Anfang an vollständig ist und das Benotungstool ihn nicht erst beim
|
||||
// Anlegen einer Wiederholung nachtragen muss. Läuft bewusst in BEIDEN Zweigen (auch beim
|
||||
// Überschreiben einer bestehenden Zeugnisnote) und ist idempotent.
|
||||
if ($this->config->item('CIS_GESAMTNOTE_ERSTANTRITT_BEI_UEBERNAHME')) {
|
||||
$result = $this->addErstantrittForGrade(
|
||||
$studiensemester_kurzbz,
|
||||
$student_uid,
|
||||
$lehrveranstaltung_id,
|
||||
$teacherGrade
|
||||
);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
|
||||
|
||||
$this->terminateWithSuccess(true);
|
||||
}
|
||||
|
||||
@@ -491,20 +495,32 @@ class Grades extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that adds tests for a student
|
||||
* (Entries in lehre.tbl_pruefung)
|
||||
* Legt bei der Notenübernahme den ersten Prüfungsantritt als eigenen Datensatz an
|
||||
* (Eintrag in lehre.tbl_pruefung).
|
||||
*
|
||||
* @param string $studiensemester_kurzbz
|
||||
* @param string $student_uid
|
||||
* @param integer $lehrveranstaltung_id
|
||||
* @param integer $note
|
||||
* @param numeric $punkte
|
||||
* Idempotent: existiert für den Studenten in dieser LV bereits ein Termin, passiert nichts -
|
||||
* die Übernahme darf beliebig oft laufen, ohne den Verlauf zu verfälschen.
|
||||
*
|
||||
* Datiert auf das Freigabedatum der LV-Note: das ist der Zeitpunkt, zu dem die
|
||||
* Leistungsfeststellung verbindlich wurde. Das Benotungsdatum ändert sich bei jeder Korrektur,
|
||||
* der Übernahmezeitpunkt ist reine Verwaltungsarbeit - beide taugen nicht als Termindatum.
|
||||
*
|
||||
* @param string $studiensemester_kurzbz
|
||||
* @param string $student_uid
|
||||
* @param integer $lehrveranstaltung_id
|
||||
* @param stdClass $teacherGrade die übernommene LV-Gesamtnote
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
protected function addTestsForGrade($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id, $note, $punkte)
|
||||
protected function addErstantrittForGrade($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id, $teacherGrade)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('education/LePruefung_model', 'LePruefungModel');
|
||||
|
||||
// bereits ein Termin vorhanden -> der Verlauf beginnt schon, nichts nachzutragen
|
||||
$vorhanden = $this->VerlaufLib->getPruefungen($student_uid, $lehrveranstaltung_id, $studiensemester_kurzbz);
|
||||
if (count($vorhanden) > 0)
|
||||
return success(null);
|
||||
|
||||
// Get Lehreinheit
|
||||
$result = $this->LehrveranstaltungModel->getLeByStudent($student_uid, $studiensemester_kurzbz, $lehrveranstaltung_id);
|
||||
@@ -515,19 +531,24 @@ class Grades extends FHCAPI_Controller
|
||||
return error($this->p->t("stv", "grades_error_lehreinheit_id"));
|
||||
$le = current(getData($result));
|
||||
|
||||
$datum = $teacherGrade->freigabedatum ?: ($teacherGrade->benotungsdatum ?: date('Y-m-d'));
|
||||
$now = date('Y-m-d H:i:s');
|
||||
|
||||
// Prepare
|
||||
$this->load->model('education/LePruefung_model', 'LePruefungModel');
|
||||
$data = [
|
||||
"student_uid" => $student_uid,
|
||||
"lehreinheit_id" => $le->lehreinheit_id,
|
||||
"datum" => date('Y-m-d'),
|
||||
"pruefungstyp_kurzbz" => "Termin1",
|
||||
"note" => $note
|
||||
"mitarbeiter_uid" => $teacherGrade->mitarbeiter_uid,
|
||||
"datum" => $datum,
|
||||
"pruefungstyp_kurzbz" => $this->VerlaufLib->legacyTypFuerAntritt(1),
|
||||
"note" => $teacherGrade->note,
|
||||
"insertamum" => $now,
|
||||
"insertvon" => getAuthUID()
|
||||
];
|
||||
|
||||
if (defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE)
|
||||
$data["punkte"] = $punkte;
|
||||
|
||||
$data["punkte"] = $teacherGrade->punkte;
|
||||
|
||||
// Get Anwesenheit
|
||||
$this->load->model('education/Anwesenheit_model', 'AnwesenheitModel');
|
||||
$result = $this->AnwesenheitModel->loadAnwesenheitStudiensemester($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id);
|
||||
@@ -535,7 +556,8 @@ class Grades extends FHCAPI_Controller
|
||||
return $result;
|
||||
$anwesenheit = getData($result);
|
||||
|
||||
if ($anwesenheit && (float)current($anwesenheit)->prozent < FAS_ANWESENHEIT_ROT) {
|
||||
if (defined('FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN') && FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN
|
||||
&& $anwesenheit && (float)current($anwesenheit)->prozent < FAS_ANWESENHEIT_ROT) {
|
||||
// Get Anwesenheitsbefreiung
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$result = $this->BenutzerfunktionModel->getBenutzerFunktionByUidInStdsem($student_uid, $studiensemester_kurzbz, 'awbefreit');
|
||||
@@ -545,7 +567,10 @@ class Grades extends FHCAPI_Controller
|
||||
|
||||
$anwesenheitsbefreit = hasData($result);
|
||||
|
||||
// Wenn nicht Anwesenheitsbefreit und Anwesenheit unter einem bestimmten Prozentsatz fällt dann wird ein Pruefungsantritt abgezogen
|
||||
// Bei zu geringer Anwesenheit ohne Befreiung wird ein zusätzlicher Termin
|
||||
// 'Nicht beurteilt' vor dem eigentlichen Antritt festgehalten. ACHTUNG: diese Note
|
||||
// zählt nicht mehr als Antritt (NOTEN_OHNE_ANTRITT_BEZEICHNUNGEN) - der frühere
|
||||
// "Antritt abziehen"-Effekt entfällt damit, der Eintrag ist reine Dokumentation.
|
||||
if (!$anwesenheitsbefreit) {
|
||||
$data2 = $data;
|
||||
$data2["note"] = 7;
|
||||
@@ -556,8 +581,6 @@ class Grades extends FHCAPI_Controller
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
|
||||
$data["pruefungstyp_kurzbz"] = "Termin2";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -574,6 +574,19 @@ class Kontakt extends FHCAPI_Controller
|
||||
$person_id = $this->input->post('person_id');
|
||||
$standort_id = $this->input->post('standort_id');
|
||||
|
||||
//check person_id: allow editing only of persons who are no mitarbeiter
|
||||
if($person_id)
|
||||
{
|
||||
$this->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||
$this->BenutzerModel->addJoin('public.tbl_mitarbeiter ma', 'ON (ma.mitarbeiter_uid = public.tbl_benutzer.uid)');
|
||||
|
||||
$result = $this->BenutzerModel->loadWhere([
|
||||
'person_id' => $person_id
|
||||
]);
|
||||
if(hasData($result))
|
||||
return $this->terminateWithError($this->p->t('ui', 'editingMitarbeiterPVonly'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->KontaktModel->update(
|
||||
[
|
||||
'kontakt_id' => $kontakt_id
|
||||
|
||||
@@ -48,7 +48,8 @@ class Konto extends FHCAPI_Controller
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'konto'
|
||||
'konto',
|
||||
'lehre'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -112,7 +113,7 @@ class Konto extends FHCAPI_Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getBuchungstypen()
|
||||
public function getBuchungstypen($studiensemester_kurzbz = null)
|
||||
{
|
||||
$this->load->model('crm/Buchungstyp_model', 'BuchungstypModel');
|
||||
|
||||
@@ -122,6 +123,7 @@ class Konto extends FHCAPI_Controller
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->_getOEHBeitrag($data, $studiensemester_kurzbz);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
@@ -427,9 +429,12 @@ class Konto extends FHCAPI_Controller
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => getAuthUID()
|
||||
];
|
||||
|
||||
foreach ($allowed as $field)
|
||||
if ($this->input->post($field) !== null)
|
||||
$data[$field] = $this->input->post($field);
|
||||
if($data['buchungsdatum'] == '')
|
||||
$data['buchungsdatum'] = null;
|
||||
|
||||
$result = $this->KontoModel->update($id, $data);
|
||||
|
||||
@@ -494,4 +499,43 @@ class Konto extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
private function _getOEHBeitrag(&$data, $studiensemester_kurzbz = null)
|
||||
{
|
||||
if (is_null($studiensemester_kurzbz))
|
||||
{
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$studiensemester_akt = $this->variablelib->getVar('semester_aktuell');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
if ($this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
|
||||
$studiensemester_akt = $studiensemester_kurzbz;
|
||||
else
|
||||
$this->terminateWithError($this->p->t('lehre', 'error_noStudiensemester'));
|
||||
}
|
||||
|
||||
$this->load->model('codex/Oehbeitrag_model', 'OehbeitragModel');
|
||||
$oehBeitrag = $this->OehbeitragModel->getByStudiensemester($studiensemester_akt);
|
||||
|
||||
$oehStandardbetrag = null;
|
||||
if (hasData($oehBeitrag))
|
||||
{
|
||||
$oeh = getData($oehBeitrag)[0];
|
||||
$summe = ($oeh->studierendenbeitrag + $oeh->versicherung) * -1;
|
||||
$oehStandardbetrag = number_format((float)$summe, 2, '.', '');
|
||||
}
|
||||
|
||||
if ($oehStandardbetrag !== null)
|
||||
{
|
||||
$data = array_map(function ($buchungstyp) use ($oehStandardbetrag) {
|
||||
if (isset($buchungstyp->buchungstyp_kurzbz) && (strtolower($buchungstyp->buchungstyp_kurzbz) === 'oeh'))
|
||||
{
|
||||
$buchungstyp->standardbetrag = $oehStandardbetrag;
|
||||
}
|
||||
return $buchungstyp;
|
||||
}, $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class LvTermine extends FHCAPI_Controller
|
||||
|
||||
//TODO Build own lib or combine with Controller Stundenplan.php
|
||||
//here use of logic of Stundenplan.php, extended with parameters uid, grouping, and used dbTable
|
||||
public function getStundenplan($uid, $start_date = null, $end_date = null, $groupConsecutiveHours = false, $dbStundenplanTable = "stundenplan")
|
||||
public function getStundenplan($uid, $start_date = null, $end_date = null, $dbStundenplanTable = "stundenplan", $groupConsecutiveHours = false)
|
||||
{
|
||||
$student_uid = $uid;
|
||||
$semester_range = $this->studienSemesterErmitteln($start_date, $end_date);
|
||||
@@ -80,13 +80,6 @@ class LvTermine extends FHCAPI_Controller
|
||||
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
|
||||
$this->returnObj['$stundenplan_query'] = $stundenplan_query;
|
||||
$this->returnObj['$student_lehrverband'] = $student_lehrverband;
|
||||
$this->returnObj['$benutzer_gruppen'] = $benutzer_gruppen;
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
}
|
||||
|
||||
public function getStudiensemester()
|
||||
@@ -377,6 +370,7 @@ class LvTermine extends FHCAPI_Controller
|
||||
$result->semester = $item->semester;
|
||||
$result->verband = $item->verband;
|
||||
$result->gruppe = $item->gruppe;
|
||||
$result->studiensemester_kurzbz = $item->studiensemester_kurzbz;
|
||||
return $result;
|
||||
},
|
||||
$lehrverband_query_result));
|
||||
|
||||
@@ -237,8 +237,8 @@ class Mobility extends FHCAPI_Controller
|
||||
}
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$von = $formData['von'] ?? null;
|
||||
$bis = $formData['bis'] ?? null;
|
||||
$von = ($formData['von'] ?? '') ?: null;
|
||||
$bis = ($formData['bis'] ?? '') ?: null;
|
||||
$nation_code = $formData['nation_code'] ?? null;
|
||||
$mobilitaetsprogramm_code = $formData['mobilitaetsprogramm_code'] ?? null;
|
||||
$herkunftsland_code = $formData['herkunftsland_code'] ?? null;
|
||||
|
||||
@@ -193,7 +193,7 @@ class Prestudent extends FHCAPI_Controller
|
||||
}
|
||||
elseif (
|
||||
$val === ''
|
||||
&& in_array($prop, ['zgvnation', 'zgvmanation', 'zgvdoktornation', 'berufstaetigkeit_code', 'ausbildungcode'])
|
||||
&& in_array($prop, ['zgvnation', 'zgvmanation', 'zgvdoktornation', 'berufstaetigkeit_code', 'ausbildungcode', 'zgvdatum', 'zgvmadatum'])
|
||||
)
|
||||
{
|
||||
$val = null;
|
||||
|
||||
@@ -42,6 +42,8 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
$this->load->model('education/Note_model', 'NoteModel');
|
||||
$this->load->model('education/Projektbetreuer_model', 'BetreuerModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
|
||||
// load libraries
|
||||
$this->load->library('PermissionLib');
|
||||
@@ -90,21 +92,27 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
|
||||
if (!isset($projektarbeit_id) || !is_numeric($projektarbeit_id)) return $this->terminateWithError('Projektarbeit Id missing', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->ProjektarbeitModel->addSelect(
|
||||
'lehre.tbl_projektarbeit.projektarbeit_id, titel, titel_english, themenbereich, projekttyp_kurzbz, lehrveranstaltung_id, lehreinheit_id,
|
||||
firma_id, beginn, ende, gesperrtbis, note, final, freigegeben, tbl_projektarbeit.anmerkung, fa.name AS firma_name'
|
||||
);
|
||||
$this->ProjektarbeitModel->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id');
|
||||
$this->ProjektarbeitModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
$this->ProjektarbeitModel->addJoin('public.tbl_firma fa', 'firma_id', 'LEFT');
|
||||
$result = $this->ProjektarbeitModel->loadWhere(
|
||||
array('projektarbeit_id' => $projektarbeit_id)
|
||||
);
|
||||
$result = $this->fetchProjektarbeitByID($projektarbeit_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
private function fetchProjektarbeitById($projektarbeit_id) {
|
||||
$this->ProjektarbeitModel->resetQuery();
|
||||
$this->ProjektarbeitModel->addSelect(
|
||||
'lehre.tbl_projektarbeit.projektarbeit_id, titel, titel_english, themenbereich, projekttyp_kurzbz, lehrveranstaltung_id, lehreinheit_id,
|
||||
tbl_projektarbeit.studiensemester_kurzbz, firma_id, beginn, ende, gesperrtbis, note, final, freigegeben, tbl_projektarbeit.anmerkung, fa.name AS firma_name'
|
||||
);
|
||||
$this->ProjektarbeitModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
$this->ProjektarbeitModel->addJoin('public.tbl_firma fa', 'firma_id', 'LEFT');
|
||||
|
||||
|
||||
return $this->ProjektarbeitModel->loadWhere(
|
||||
array('projektarbeit_id' => $projektarbeit_id)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inwert a Projektarbeit.
|
||||
@@ -132,7 +140,8 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($this->fetchProjektarbeitById($data));
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
@@ -239,14 +248,38 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
$additional_lehrveranstaltung_id = $this->input->get('additional_lehrveranstaltung_id');
|
||||
|
||||
if (!isset($student_uid)) $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
|
||||
if (!isset($studiensemester_kurzbz)) $this->terminateWithError('Studiensemster missing', self::ERROR_TYPE_GENERAL);
|
||||
if (!isset($studiensemester_kurzbz)) $this->terminateWithError('Studiensemester missing', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
// get Lvs
|
||||
// get prestudent_id from student model
|
||||
$studentRes = $this->StudentModel->load(['student_uid' => $student_uid]);
|
||||
if(hasData($studentRes)) {
|
||||
$student = getData($studentRes);
|
||||
} else {
|
||||
$this->terminateWithError($studentRes, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
// to get prestudent_status history
|
||||
$historyRes = $this->PrestudentstatusModel->getHistoryPrestudent($student[0]->prestudent_id);
|
||||
if(hasData($historyRes)) {
|
||||
$history = getData($historyRes);
|
||||
} else {
|
||||
$this->terminateWithError($historyRes, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
// query for every lva of a studiengang that has projektarbeit flag true
|
||||
$lvsResult = $this->LehrveranstaltungModel->getLvsForProjektarbeit($student_uid, $studiengang_kz, $additional_lehrveranstaltung_id);
|
||||
|
||||
if (isError($lvsResult)) return $this->terminateWithError($lvsResult, self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$lvs = hasData($lvsResult) ? getData($lvsResult) : [];
|
||||
|
||||
$lvsIDs = array_column($lvs, 'lehrveranstaltung_id');
|
||||
|
||||
// get current studienplan_id from status history to find out which lva options are actually assigned to the students studienplan
|
||||
// important so the projektarbeit has the correct lva assigned to be able to find and print the thesis title on the degree documents!
|
||||
$currentStatus = $history[0];
|
||||
$lvByStudienPlanRes = $this->LehrveranstaltungModel->getLvsByStudienplanByLvaIDs($currentStatus->studienplan_id, $lvsIDs);
|
||||
if(hasData($lvByStudienPlanRes)) {
|
||||
$lvs = getData($lvByStudienPlanRes);
|
||||
}
|
||||
|
||||
foreach ($lvs as $lv)
|
||||
{
|
||||
@@ -280,10 +313,7 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
*/
|
||||
public function getNoten()
|
||||
{
|
||||
$this->NoteModel->addOrder('notenwert', 'ASC');
|
||||
$this->NoteModel->addOrder('bezeichnung', 'ASC');
|
||||
|
||||
$result = $this->NoteModel->load();
|
||||
$result = $this->NoteModel->getAllActive();
|
||||
|
||||
if (isError($result)) return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
@@ -316,11 +346,18 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Projekttyp'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'required|is_natural', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Lehreinheit']),
|
||||
$this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'is_natural', [
|
||||
'is_natural' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Lehreinheit'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehrveranstaltung_id', 'Lehrveranstaltung', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Lehrveranstaltung'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('studiensemester_kurzbz', 'Studiensemester', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Studiensemester'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('beginn', 'Beginn', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Beginn'])
|
||||
]);
|
||||
@@ -350,6 +387,8 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
'projekttyp_kurzbz' => $formData['projekttyp_kurzbz'],
|
||||
'firma_id' => $formData['firma_id'] ?? null,
|
||||
'lehreinheit_id' => $formData['lehreinheit_id'],
|
||||
'lehrveranstaltung_id' => $formData['lehrveranstaltung_id'],
|
||||
'studiensemester_kurzbz' => $formData['studiensemester_kurzbz'],
|
||||
'beginn' => isset($formData['beginn']) && !isEmptyString($formData['beginn']) ? $formData['beginn'] : null,
|
||||
'ende' => isset($formData['ende']) && !isEmptyString($formData['ende']) ? $formData['ende'] : null,
|
||||
'note' => $formData['note'] ?? null,
|
||||
|
||||
@@ -448,8 +448,10 @@ class Pruefung extends FHCAPI_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$datum = $this->input->post('datum') == '' ? null : $this->input->post('datum');
|
||||
if(intval($pruefung_id) > 0)
|
||||
{
|
||||
|
||||
$result = $this->PruefungModel->update(
|
||||
[
|
||||
'pruefung_id' => $pruefung_id
|
||||
@@ -459,7 +461,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'note' => $this->input->post('note'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'datum' => $datum,
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'updatevon' => $authUID,
|
||||
'updateamum' => date('c'),
|
||||
@@ -472,7 +474,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'datum' => $datum,
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'note' => $this->input->post('note'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
@@ -520,7 +522,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'note' => $this->input->post('note'),
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $this->input->post('datum'),
|
||||
'benotungsdatum' => $datum,
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
'punkte' => $this->input->post('punkte') ? str_replace(',', '.', $this->input->post('punkte')) : null
|
||||
@@ -555,7 +557,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
], [
|
||||
'note' => $this->input->post('note'),
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $this->input->post('datum'),
|
||||
'benotungsdatum' => $datum,
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $authUID,
|
||||
'punkte' => $this->input->post('punkte') ? str_replace(',', '.', $this->input->post('punkte')) : null
|
||||
|
||||
@@ -144,6 +144,7 @@ class Student extends FHCAPI_Controller
|
||||
. $this->PrestudentModel->escape($studiensemester_kurzbz)
|
||||
. ") AS statusofsemester"
|
||||
);
|
||||
$this->PrestudentModel->addSelect($this->PrestudentModel->escape($studiensemester_kurzbz) . ' as query_studiensemester_kurzbz');
|
||||
|
||||
$this->PrestudentModel->addJoin('public.tbl_student s', 'prestudent_id', 'LEFT');
|
||||
$this->PrestudentModel->addJoin('public.tbl_benutzer b', 'student_uid = uid', 'LEFT');
|
||||
@@ -296,6 +297,10 @@ class Student extends FHCAPI_Controller
|
||||
$fotoval = ($val == '') ? null : str_replace('data:image/jpeg;base64,', '', $val);
|
||||
$update_person[$prop] = $fotoval;
|
||||
}
|
||||
else if ($prop == 'gebdatum')
|
||||
{
|
||||
$update_person[$prop] = ($val == '') ? null : $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
$update_person[$prop] = $val;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,9 @@ class Tags extends Tag_Controller
|
||||
'addTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'updateTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'doneTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'deleteTag' => self::BERECHTIGUNG_KURZBZ
|
||||
'deleteTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'getAllTags' => self::BERECHTIGUNG_KURZBZ,
|
||||
'rebuildTagsForTypeId' => self::BERECHTIGUNG_KURZBZ,
|
||||
]);
|
||||
|
||||
$this->config->load('stv');
|
||||
@@ -45,4 +47,5 @@ class Tags extends Tag_Controller
|
||||
{
|
||||
parent::doneTag($this->config->item('stv_prestudent_tags'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,513 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about verbände
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Verband extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$permissions = [];
|
||||
$router = load_class('Router');
|
||||
$permissions[$router->method] = ['admin:r', 'assistenz:r'];
|
||||
parent::__construct($permissions);
|
||||
|
||||
// Load Models
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remap calls:
|
||||
* /
|
||||
* /(studiengang_kz) => getStudiengang
|
||||
* /(studiengang_kz)/(semester) => getSemester
|
||||
* /(studiengang_kz)/(semester)/(verband) => getVerband
|
||||
* /(studiengang_kz)/(org_form) => getStudiengang
|
||||
* /(studiengang_kz)/(org_form)/(semester) => getSemester
|
||||
* /(studiengang_kz)/(org_form)/(semester)/(verband) => getVerband
|
||||
*
|
||||
* @param string $method
|
||||
* @param array $params (optional)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function _remap($method, $params = [])
|
||||
{
|
||||
if ($method == '' || $method == 'index')
|
||||
return $this->getBase();
|
||||
|
||||
// NOTE(chris): Test if access is allowed ($method is the Studiengang)
|
||||
if (!$this->permissionlib->isBerechtigt('assistenz', 's', $method)
|
||||
&& !$this->permissionlib->isBerechtigt('admin', 's', $method)
|
||||
) {
|
||||
return $this->_outputAuthError([$method => ['admin:r', 'assistenz:r']]);
|
||||
}
|
||||
|
||||
$count = count($params);
|
||||
if (!$count)
|
||||
return $this->getStudiengang($method);
|
||||
|
||||
if ($count == 1) {
|
||||
if (is_numeric($params[0]))
|
||||
return $this->getSemester($method, $params[0]);
|
||||
elseif ($params[0] == 'prestudent')
|
||||
return $this->terminateWithSuccess($this->getStdSem($method . '/prestudent/', $method));
|
||||
else
|
||||
return $this->getStudiengang($method, $params[0]);
|
||||
}
|
||||
if ($count == 2) {
|
||||
if (is_numeric($params[0]))
|
||||
return $this->getVerband($method, $params[0], $params[1]);
|
||||
elseif ($params[1] == 'prestudent')
|
||||
return $this->terminateWithSuccess($this->getStdSem($method . '/' . $params[0] . '/prestudent/', $method));
|
||||
else
|
||||
return $this->getSemester($method, $params[1], $params[0]);
|
||||
}
|
||||
if ($count == 3 && !is_numeric($params[0]) && is_numeric($params[1]) && !is_numeric($params[2]))
|
||||
return $this->getVerband($method, $params[1], $params[2], $params[0]);
|
||||
|
||||
show_404();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function getBase()
|
||||
{
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("v.studiengang_kz AS link");
|
||||
$this->StudiengangModel->addSelect(
|
||||
"CONCAT(kurzbzlang, ' (', UPPER(CONCAT(typ, kurzbz)), ') - ', tbl_studiengang.bezeichnung) AS name",
|
||||
false
|
||||
);
|
||||
$this->StudiengangModel->addSelect('erhalter_kz');
|
||||
$this->StudiengangModel->addSelect('typ');
|
||||
$this->StudiengangModel->addSelect('kurzbz');
|
||||
$this->StudiengangModel->addSelect('studiengang_kz');
|
||||
$this->StudiengangModel->addSelect('studiengang_kz AS stg_kz');
|
||||
|
||||
$this->StudiengangModel->addOrder('erhalter_kz');
|
||||
$this->StudiengangModel->addOrder('typ');
|
||||
$this->StudiengangModel->addOrder('kurzbz');
|
||||
|
||||
$stgs = $this->permissionlib->getSTG_isEntitledFor('admin') ?: [];
|
||||
$stgs = array_merge($stgs, $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: []);
|
||||
|
||||
if (!$stgs)
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$this->StudiengangModel->db->where_in('studiengang_kz', $stgs);
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere(['v.aktiv' => true]);
|
||||
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if ($this->permissionlib->isBerechtigt('inout/uebersicht'))
|
||||
$list[] = [
|
||||
'name' => 'International',
|
||||
'link' => 'inout',
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Incoming',
|
||||
'link' => 'inout/incoming',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Outgoing',
|
||||
'link' => 'inout/outgoing',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Gemeinsame Studien',
|
||||
'link' => 'inout/gemeinsamestudien',
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
];
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $studiengang_kz
|
||||
* @param string $orgform (optional)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getStudiengang($studiengang_kz, $org_form = null)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
if ($org_form !== null)
|
||||
$link .= $org_form . '/';
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", semester) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(
|
||||
UPPER(CONCAT(typ, kurzbz)),
|
||||
'-',
|
||||
semester,
|
||||
(
|
||||
SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END
|
||||
FROM public.tbl_lehrverband
|
||||
WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester
|
||||
ORDER BY verband, gruppe LIMIT 1
|
||||
)
|
||||
) AS name", false);
|
||||
|
||||
$this->StudiengangModel->addSelect('semester');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->StudiengangModel->addOrder('semester');
|
||||
|
||||
if ($org_form !== null) {
|
||||
$this->StudiengangModel->addSelect("v.orgform_kurzbz");
|
||||
$this->StudiengangModel->db->group_start();
|
||||
$this->StudiengangModel->db->where('v.semester', 0);
|
||||
$this->StudiengangModel->db->or_where('v.orgform_kurzbz', $org_form);
|
||||
$this->StudiengangModel->db->group_end();
|
||||
}
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere([
|
||||
'v.studiengang_kz' => $studiengang_kz,
|
||||
'v.aktiv' => true
|
||||
]);
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
array_unshift($list, [
|
||||
'name' => 'PreStudent',
|
||||
'link' => $link . 'prestudent',
|
||||
'no_sem_reload' => true,
|
||||
'stg_kz' => (int)$studiengang_kz,
|
||||
'children' => $this->getStdSem($link . 'prestudent/', $studiengang_kz)
|
||||
]);
|
||||
|
||||
if ($org_form === null) {
|
||||
// NOTE(chris): if mischform show orgforms
|
||||
$result = $this->StudiengangModel->load($studiengang_kz);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
if ($result) {
|
||||
if (current($result)->mischform) {
|
||||
$this->load->model('organisation/Studienordnung_model', 'StudienordnungModel');
|
||||
|
||||
$this->StudienordnungModel->addDistinct();
|
||||
$this->StudienordnungModel->addSelect("CONCAT(studiengang_kz, '/', p.orgform_kurzbz) AS link");
|
||||
$this->StudienordnungModel->addSelect("p.orgform_kurzbz AS name");
|
||||
$this->StudienordnungModel->addSelect("studiengang_kz AS stg_kz");
|
||||
|
||||
$this->StudienordnungModel->addJoin('lehre.tbl_studienplan p', 'studienordnung_id');
|
||||
|
||||
$result = $this->StudienordnungModel->loadWhere([
|
||||
'aktiv' => true,
|
||||
'studiengang_kz' => $studiengang_kz,
|
||||
'p.orgform_kurzbz !=' => 'DDP'
|
||||
]);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$list = array_merge($list, $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $studiengang_kz
|
||||
* @param integer $semester
|
||||
* @param string $orgform
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getSemester($studiengang_kz, $semester, $org_form = null)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
if ($org_form !== null)
|
||||
$link .= $org_form . '/';
|
||||
$link .= $semester . '/';
|
||||
|
||||
|
||||
$this->load->model('organisation/Gruppe_model', 'GruppeModel');
|
||||
|
||||
$this->GruppeModel->addDistinct();
|
||||
$this->GruppeModel->addSelect("CONCAT(" . $this->GruppeModel->escape($link . 'grp/') . ", gruppe_kurzbz) AS link", false);
|
||||
$this->GruppeModel->addSelect("CONCAT(gruppe_kurzbz, ' (', bezeichnung, ')') AS name", false);
|
||||
$this->GruppeModel->addSelect("TRUE AS leaf", false);
|
||||
|
||||
$this->GruppeModel->addSelect('sort');
|
||||
$this->GruppeModel->addSelect('gruppe_kurzbz');
|
||||
$this->GruppeModel->addSelect($this->GruppeModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->GruppeModel->addOrder('sort');
|
||||
$this->GruppeModel->addOrder('gruppe_kurzbz');
|
||||
|
||||
$where = [
|
||||
'studiengang_kz' => $studiengang_kz,
|
||||
'semester' => $semester,
|
||||
'lehre' => true,
|
||||
'sichtbar' => true,
|
||||
'aktiv' => true,
|
||||
'direktinskription' => false
|
||||
];
|
||||
|
||||
if ($org_form !== null)
|
||||
$where['orgform_kurzbz'] = $org_form;
|
||||
|
||||
$result = $this->GruppeModel->loadWhere($where);
|
||||
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", verband) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(UPPER(CONCAT(typ, kurzbz)), '-', semester, verband, (SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END FROM public.tbl_lehrverband WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester AND verband=v.verband ORDER BY gruppe LIMIT 1)) AS name", false);
|
||||
$this->StudiengangModel->addSelect("CASE WHEN MAX(gruppe)='' OR MAX(gruppe)=' ' THEN TRUE ELSE FALSE END AS leaf");
|
||||
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($semester) . ' AS semester');
|
||||
$this->StudiengangModel->addSelect('verband');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->StudiengangModel->addOrder('verband');
|
||||
|
||||
$this->StudiengangModel->addGroupBy('link, name, verband');
|
||||
|
||||
$where = [
|
||||
'v.studiengang_kz' => $studiengang_kz,
|
||||
'v.semester' => $semester,
|
||||
'v.verband !=' => '',
|
||||
'v.aktiv' => true
|
||||
];
|
||||
|
||||
if ($org_form !== null && $semester) // NOTE(chris): on semester 0 show all?
|
||||
$where['v.orgform_kurzbz'] = $org_form;
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere($where);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$list = array_merge($list, $result);
|
||||
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $studiengang_kz
|
||||
* @param integer $semester
|
||||
* @param integer $verband
|
||||
* @param string $orgform
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getVerband($studiengang_kz, $semester, $verband, $org_form = null)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
if ($org_form !== null)
|
||||
$link .= $org_form . '/';
|
||||
$link .= $semester . '/'. $verband . '/';
|
||||
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", gruppe) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(UPPER(CONCAT(typ, kurzbz)), '-', semester, verband, gruppe, (SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END FROM public.tbl_lehrverband WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester AND verband=v.verband AND gruppe=v.gruppe ORDER BY gruppe LIMIT 1)) AS name", false);
|
||||
$this->StudiengangModel->addSelect("TRUE AS leaf", false);
|
||||
|
||||
$this->StudiengangModel->addSelect('v.semester');
|
||||
$this->StudiengangModel->addSelect('v.verband');
|
||||
$this->StudiengangModel->addSelect('gruppe');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->StudiengangModel->addOrder('gruppe');
|
||||
|
||||
$where = [
|
||||
'v.studiengang_kz' => $studiengang_kz,
|
||||
'v.semester' => $semester,
|
||||
'v.verband' => $verband,
|
||||
'v.gruppe !=' => '',
|
||||
'v.aktiv' => true
|
||||
];
|
||||
|
||||
if ($org_form !== null && $semester) // NOTE(chris): on semester 0 show all?
|
||||
$where['v.orgform_kurzbz'] = $org_form;
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere($where);
|
||||
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $link
|
||||
* @param integer $studiengang_kz
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getStdSem($link, $studiengang_kz)
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
$result = $this->VariableModel->getVariables(getAuthUID(), ['number_displayed_past_studiensemester']);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->load->config('stv');
|
||||
$number_displayed_past_studiensemester_default = $this->config->item('number_displayed_past_studiensemester_default');
|
||||
|
||||
$number_displayed_past_studiensemester = $data['number_displayed_past_studiensemester'] ?? $number_displayed_past_studiensemester_default;
|
||||
|
||||
$this->StudiensemesterModel->addPlusMinus(null, $number_displayed_past_studiensemester);
|
||||
$this->StudiensemesterModel->addOrder('ende');
|
||||
$result = $this->StudiensemesterModel->load();
|
||||
|
||||
$studiensemester = $this->getDataOrTerminateWithError($result);
|
||||
$result = [];
|
||||
|
||||
$studiengang_kz = (int)$studiengang_kz;
|
||||
|
||||
foreach ($studiensemester as $sem) {
|
||||
$semlink = $link . $sem->studiensemester_kurzbz;
|
||||
$intlink = $semlink . '/interessenten';
|
||||
$result[] = [
|
||||
'name' => $sem->studiensemester_kurzbz,
|
||||
'link' => $semlink,
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Interessenten',
|
||||
'link' => $intlink,
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Bewerbung nicht abgeschickt',
|
||||
'link' => $intlink . '/bewerbungnichtabgeschickt',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Bewerbung abgeschickt, Status unbestätigt',
|
||||
'link' => $intlink . '/bewerbungabgeschickt',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'ZGV erfüllt',
|
||||
'link' => $intlink . '/zgv',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Status bestätigt',
|
||||
'link' => $intlink . '/statusbestaetigt',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Nicht zum Reihungstest angemeldet',
|
||||
'link' => $intlink . '/statusbestaetigtrtnichtangemeldet',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Reihungstest angemeldet',
|
||||
'link' => $intlink . '/statusbestaetigtrtangemeldet',
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Nicht zum Reihungstest angemeldet',
|
||||
'link' => $intlink . '/reihungstestnichtangemeldet',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Reihungstest angemeldet',
|
||||
'link' => $intlink . '/reihungstestangemeldet',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Bewerber',
|
||||
'link' => $semlink . '/bewerber',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Nicht zum Reihungstest angemeldet',
|
||||
'link' => $intlink . '/bewerberrtnichtangemeldet',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Reihungstest angemeldet',
|
||||
'link' => $intlink . '/bewerberrtangemeldet',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Teilgenommen',
|
||||
'link' => $intlink . '/bewerberrtangemeldetteilgenommen',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Nicht teilgenommen',
|
||||
'link' => $intlink . '/bewerberrtangemeldetnichtteilgenommen',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Aufgenommen',
|
||||
'link' => $semlink . '/aufgenommen',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Warteliste',
|
||||
'link' => $semlink . '/warteliste',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Absage',
|
||||
'link' => $semlink . '/absage',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Incoming',
|
||||
'link' => $semlink . '/incoming',
|
||||
'stg_kz' => $studiengang_kz,
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ class Tag extends API_Controller
|
||||
|
||||
if (isset($tag))
|
||||
{
|
||||
$this->TagModel->addJoin('public.tbl_notiz_typ', 'typ_kurzbz', 'typ_kurzbz');
|
||||
$result = $this->TagModel->load($tag);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
|
||||
@@ -13,12 +13,13 @@ class Mylv extends Auth_Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct([
|
||||
'Student' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
|
||||
'Studiensemester' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
|
||||
'Lvs' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
|
||||
'Info' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
|
||||
'Pruefungen' => ['student/anrechnung_beantragen:r','user:r'] // TODO(chris): permissions?
|
||||
'Student' => self::PERM_LOGGED,
|
||||
'Studiensemester' => self::PERM_LOGGED,
|
||||
'Lvs' => self::PERM_LOGGED,
|
||||
'Info' => self::PERM_LOGGED,
|
||||
'Pruefungen' => self::PERM_LOGGED
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -44,13 +45,27 @@ class Mylv extends Auth_Controller
|
||||
public function Studiensemester()
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$result = $this->StudiensemesterModel->getWhereStudentHasLvs(getAuthUID());
|
||||
$isMitarbeiter = getData($this->MitarbeiterModel->isMitarbeiter(getAuthUID())) ?? false;
|
||||
if($isMitarbeiter) {
|
||||
$result = $this->StudiensemesterModel->getWhereMitarbeiterHasLvs(getAuthUID());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
} else if(getData($this->StudentModel->isStudent(getAuthUID())) ?? false) { // $isStudent
|
||||
$result = $this->StudiensemesterModel->getWhereStudentHasLvs(getAuthUID());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
} else {
|
||||
$this->outputJsonError('neither student or mitarbeiter');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,13 +73,27 @@ class Mylv extends Auth_Controller
|
||||
public function Lvs($studiensemester_kurzbz)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID(), $studiensemester_kurzbz, getUserLanguage());
|
||||
$isMitarbeiter = getData($this->MitarbeiterModel->isMitarbeiter(getAuthUID())) ?? false;
|
||||
if($isMitarbeiter) {
|
||||
$result = $this->LehrveranstaltungModel->getLvsByMitarbeiterInSemester(getAuthUID(), $studiensemester_kurzbz);
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
} else if(getData($this->StudentModel->isStudent(getAuthUID())) ?? false) { // $isStudent
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID(), $studiensemester_kurzbz, getUserLanguage());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
} else {
|
||||
$this->outputJsonError('neither student or mitarbeiter');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Studiensemester extends Auth_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// TODO(chris): access!
|
||||
parent::__construct([
|
||||
'index' => self::PERM_LOGGED,
|
||||
'now' => self::PERM_LOGGED,
|
||||
'set' => self::PERM_LOGGED
|
||||
]);
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$this->StudiensemesterModel->addOrder('start');
|
||||
|
||||
$result = $this->StudiensemesterModel->load();
|
||||
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
public function now()
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
}
|
||||
$result = getData($result) ?: [];
|
||||
|
||||
if (count($result) != 1) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJsonError(count($result) ? 'Mehrere Studiensemester aktiv' : 'Kein Studiensemester aktiv');
|
||||
} else {
|
||||
$this->outputJsonSuccess(current($result)->studiensemester_kurzbz);
|
||||
}
|
||||
}
|
||||
|
||||
public function set()
|
||||
{
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
|
||||
|
||||
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST);
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$stdsem = $this->input->post('studiensemester');
|
||||
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
|
||||
$result = $this->VariableModel->setVariable(getAuthUID(), 'semester_aktuell', $stdsem);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
return $this->outputJson($result);
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess(true);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user