mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -28,6 +28,7 @@ require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/erhalter.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/lehrelisthelper.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
@@ -64,183 +65,15 @@ if(isset($_GET['output']) && ($output='odt' || $output='doc'))
|
||||
isset($_GET['stg_kz']) ? $studiengang = $_GET['stg_kz'] : $studiengang = NULL;
|
||||
isset($_GET['lehreinheit_id']) ? $lehreinheit = $_GET['lehreinheit_id'] : $lehreinheit = NULL;
|
||||
|
||||
|
||||
|
||||
$doc = new dokument_export('Anwesenheitslist');
|
||||
|
||||
// Teilnehmende Gruppen laden
|
||||
$qry = "SELECT DISTINCT ON(kuerzel, semester, verband, gruppe, gruppe_kurzbz)
|
||||
UPPER(stg_typ::varchar(1) || stg_kurzbz) as kuerzel,
|
||||
semester,
|
||||
verband,
|
||||
gruppe,
|
||||
gruppe_kurzbz
|
||||
FROM campus.vw_lehreinheit
|
||||
WHERE lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)."
|
||||
AND studiensemester_kurzbz=".$db->db_add_param($studiensemester);
|
||||
if($lehreinheit!='')
|
||||
$qry.=" AND lehreinheit_id=".$db->db_add_param($lehreinheit, FHC_INTEGER);
|
||||
|
||||
$gruppen_string = '';
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
if($gruppen_string!='')
|
||||
$gruppen_string.=', ';
|
||||
if($row->gruppe_kurzbz=='')
|
||||
$gruppen_string.=trim($row->kuerzel.'-'.$row->semester.$row->verband.$row->gruppe);
|
||||
else
|
||||
$gruppen_string.=$row->gruppe_kurzbz;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Verplante Räume laden
|
||||
$qry = "SELECT distinct(ort_kurzbz)
|
||||
FROM lehre.tbl_stundenplan
|
||||
WHERE lehreinheit_id in
|
||||
(
|
||||
SELECT lehreinheit_id
|
||||
FROM campus.vw_lehreinheit
|
||||
WHERE lehrveranstaltung_id = ".$db->db_add_param($lvid, FHC_INTEGER)."
|
||||
AND studiensemester_kurzbz = ".$db->db_add_param($studiensemester)."
|
||||
)";
|
||||
if($lehreinheit!='')
|
||||
$qry.= " AND tbl_stundenplan.lehreinheit_id = ".$db->db_add_param($lehreinheit, FHC_INTEGER);
|
||||
|
||||
|
||||
$raum_string = '';
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
if($raum_string!='')
|
||||
$raum_string.=', ';
|
||||
if($row->ort_kurzbz!='')
|
||||
$raum_string.=$row->ort_kurzbz;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$stg = new studiengang();
|
||||
$stg->load($lv->studiengang_kz);
|
||||
|
||||
$studiengang_bezeichnung=$stg->bezeichnung;
|
||||
$doc = new dokument_export('Anwesenheitslist');
|
||||
|
||||
$stg->getAllTypes();
|
||||
|
||||
$data = array(
|
||||
'gruppen'=>$gruppen_string,
|
||||
'bezeichnung'=>$lv->bezeichnung,
|
||||
'lehrveranstaltung_id'=>$lv->lehrveranstaltung_id,
|
||||
'studiengang'=>$studiengang_bezeichnung,
|
||||
'studiengang_kz'=>$lv->studiengang_kz,
|
||||
'typ'=>$stg->studiengang_typ_arr[$stg->typ],
|
||||
'ects'=>$lv->ects,
|
||||
'sprache'=>$lv->sprache,
|
||||
'studiensemester'=>$studiensemester,
|
||||
'semester'=>$lv->semester,
|
||||
'orgform'=>$lv->orgform_kurzbz,
|
||||
'raum'=>$raum_string,
|
||||
);
|
||||
|
||||
//Lehrende der LV laden und in ein Array schreiben
|
||||
$lehrende = new lehreinheitmitarbeiter();
|
||||
$lehrende->getMitarbeiterLV($lvid, $studiensemester, $lehreinheit);
|
||||
$arr_lehrende = array();
|
||||
if (isset($lehrende->result))
|
||||
{
|
||||
foreach($lehrende->result AS $row)
|
||||
{
|
||||
$data[]=array('lehrende'=>array('uid'=>$row->uid,'name'=>$row->vorname.' '.$row->nachname));
|
||||
$arr_lehrende[]=mb_strtoupper($row->uid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Studierende der LV laden und in ein Array schreiben
|
||||
|
||||
$qry = 'SELECT
|
||||
distinct on(nachname, vorname, person_id) vorname, nachname, matrikelnr,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe,
|
||||
(SELECT status_kurzbz FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_student.prestudent_id ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as status,
|
||||
tbl_bisio.bisio_id, tbl_bisio.von, tbl_bisio.bis, tbl_student.studiengang_kz AS stg_kz_student,
|
||||
tbl_note.lkt_ueberschreibbar, tbl_note.anmerkung, tbl_mitarbeiter.mitarbeiter_uid, tbl_person.matr_nr, tbl_studiengang.kurzbzlang
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung JOIN public.tbl_benutzer USING(uid)
|
||||
JOIN public.tbl_person USING(person_id) LEFT JOIN public.tbl_student ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid)
|
||||
LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=tbl_student.student_uid AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_note USING (note)
|
||||
LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid)
|
||||
LEFT JOIN public.tbl_studiengang ON(tbl_student.studiengang_kz=tbl_studiengang.studiengang_kz)
|
||||
WHERE
|
||||
vw_student_lehrveranstaltung.lehrveranstaltung_id='.$db->db_add_param($lvid, FHC_INTEGER).' AND
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz='.$db->db_add_param($studiensemester);
|
||||
|
||||
if($lehreinheit!='')
|
||||
$qry.=' AND vw_student_lehrveranstaltung.lehreinheit_id='.$db->db_add_param($lehreinheit, FHC_INTEGER);
|
||||
|
||||
$qry.=' ORDER BY nachname, vorname, person_id, tbl_bisio.bis DESC';
|
||||
|
||||
$stsem_obj = new studiensemester();
|
||||
$stsem_obj->load($studiensemester);
|
||||
$stsemdatumvon = $stsem_obj->start;
|
||||
$stsemdatumbis = $stsem_obj->ende;
|
||||
|
||||
$erhalter = new erhalter();
|
||||
$erhalter->getAll();
|
||||
|
||||
$a_o_kz = '9'.sprintf("%03s", $erhalter->result[0]->erhalter_kz); //Stg_Kz AO-Studierende auslesen (9005 fuer FHTW)
|
||||
$anzahl_studierende = 0;
|
||||
$datum = new datum();
|
||||
$zusatz = '';
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
if($row->status!='Abbrecher' && $row->status!='Unterbrecher')
|
||||
{
|
||||
$anzahl_studierende++;
|
||||
|
||||
if($row->status=='Incoming') //Incoming
|
||||
$zusatz='(i)';
|
||||
else
|
||||
$zusatz='';
|
||||
|
||||
if($row->bisio_id!='' && $row->status!='Incoming' && ($row->bis > $stsemdatumvon || $row->bis=='') && $row->von < $stsemdatumbis) //Outgoing
|
||||
$zusatz.='(o)(ab '.$datum->formatDatum($row->von,'d.m.Y').')';
|
||||
|
||||
if($row->lkt_ueberschreibbar == 'f') // angerechnet / intern angerechnet / nicht zugelassen
|
||||
$zusatz.= '('. $row->anmerkung. ')';
|
||||
|
||||
if($row->mitarbeiter_uid!='') //mitarbeiter
|
||||
$zusatz.='(ma)';
|
||||
|
||||
if($row->stg_kz_student==$a_o_kz) //Außerordentliche Studierende
|
||||
$zusatz.='(a.o.)';
|
||||
|
||||
$data[]=array('student'=>array(
|
||||
'vorname'=>$row->vorname,
|
||||
'nachname'=>$row->nachname,
|
||||
'personenkennzeichen'=>trim($row->matrikelnr),
|
||||
'matr_nr'=>$row->matr_nr,
|
||||
'semester'=>$row->semester,
|
||||
'verband'=>trim($row->verband),
|
||||
'gruppe'=>trim($row->gruppe),
|
||||
'zusatz'=>$zusatz,
|
||||
'studiengang_kurzbz'=>$row->kurzbzlang
|
||||
));
|
||||
}
|
||||
}
|
||||
//Anzahl Studierende in Array $data (an erster Stelle) einfuegen
|
||||
$data = array_reverse($data, true);
|
||||
$data['anzahl_studierende'] = $anzahl_studierende;
|
||||
$data = array_reverse($data, true);
|
||||
}
|
||||
$lehrelisthelper = new LehreListHelper($db, $studiensemester, $lvid, $lv, $stg, $lehreinheit);
|
||||
$arr_lehrende = $lehrelisthelper->getArr_Lehrende();
|
||||
$data = $lehrelisthelper->getData();
|
||||
$studentuids = $lehrelisthelper->getStudentUids();
|
||||
|
||||
$doc->addDataArray($data,'anwesenheitsliste');
|
||||
if($lehreinheit!='')
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
require_once('../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/vertrag.class.php');
|
||||
require_once '../../../include/covid/covidhelper.class.php';
|
||||
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
@@ -61,7 +62,8 @@
|
||||
$stsem = $_GET['stsem'];
|
||||
else
|
||||
die($p->t('anwesenheitsliste/studiensemesterIstUngueltig'));
|
||||
|
||||
|
||||
$covidhelper = new CovidHelper();
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
@@ -69,6 +71,11 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<style type="text/css">
|
||||
.covidstatus {
|
||||
padding-left: 4em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -84,6 +91,7 @@
|
||||
<?php
|
||||
if($error==0)
|
||||
{
|
||||
$covid_content = '';
|
||||
$aw_content='';
|
||||
$awbild_content='';
|
||||
$nt_content='';
|
||||
@@ -98,6 +106,7 @@
|
||||
|
||||
$lv = new lehrveranstaltung($lvid);
|
||||
|
||||
$covid_content .= ($covidhelper->isUdfDefined()) ? '<tr><td><a href="covidstatusliste.php?stg='.$stg_kz.'.&sem='.$sem.'&lvid='.$lvid.'&stsem='.$stsem.'">' . $p->t('anwesenheitsliste/gesamtliste') . ' ' . $lv->bezeichnung . '</a></td></tr>' : '';
|
||||
$aw_content .= "<tr><td><a class='Item' href='anwesenheitsliste.pdf.php?stg=$stg_kz&sem=$sem&lvid=$lvid&stsem=$stsem'>".$p->t('anwesenheitsliste/gesamtliste')." $lv->bezeichnung</a></td></tr>";
|
||||
$awbild_content .= "<tr><td><a class='Item' href='fotoliste.pdf.php?stg=$stg_kz&sem=$sem&lvid=$lvid&stsem=$stsem'>".$p->t('anwesenheitsliste/gesamtliste')." $lv->bezeichnung</a></td></tr>";
|
||||
$nt_content .= "<tr><td><a class='Item' href='notenliste.xls.php?stg=$stg_kz&sem=$sem&lvid=$lvid&stsem=$stsem'>".$p->t('anwesenheitsliste/gesamtliste')." $lv->bezeichnung</a></td></tr>";
|
||||
@@ -151,6 +160,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$covid_content .= ($covidhelper->isUdfDefined()) ? '<tr><td><a href="covidstatusliste.php?stg='.$stg_kz.'.&sem='.$sem.'&lvid='.$lvid.'&lehreinheit_id='.$lastlehreinheit.'&stsem='.$stsem.'"> <img src="../../../skin/images/haken.gif" />' . $kurzbz . ' - ' . $lehrform . ' - ' . $gruppen . ' (' . $lektoren . ')</a></td></tr>' : '';
|
||||
$aw_content .= "<tr><td><a class='Item' href='anwesenheitsliste.pdf.php?stg=$stg_kz&sem=$sem&lvid=$lvid&lehreinheit_id=$lastlehreinheit&stsem=$stsem'> <img src='../../../skin/images/haken.gif' />$kurzbz - $lehrform - $gruppen ($lektoren)</a></td></tr>";
|
||||
$awbild_content .= "<tr><td><a class='Item' href='fotoliste.pdf.php?stg=$stg_kz&sem=$sem&lvid=$lvid&lehreinheit_id=$lastlehreinheit&stsem=$stsem'> <img src='../../../skin/images/haken.gif' />$kurzbz - $lehrform - $gruppen ($lektoren)</a></td></tr>";
|
||||
$nt_content .= "<tr><td><a class='Item' href='notenliste.xls.php?stg=$stg_kz&sem=$sem&lvid=$lvid&lehreinheit_id=$lastlehreinheit&stsem=$stsem'> <img src='../../../skin/images/haken.gif' />$kurzbz - $lehrform - $gruppen ($lektoren)</a></td></tr>";
|
||||
@@ -186,6 +196,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$covid_content .= ($covidhelper->isUdfDefined()) ? '<tr><td><a href="covidstatusliste.php?stg='.$stg_kz.'.&sem='.$sem.'&lvid='.$lvid.'&lehreinheit_id='.$lastlehreinheit.'&stsem='.$stsem.'"> <img src="../../../skin/images/haken.gif" />' . $kurzbz . ' - ' . $lehrform . ' - ' . $gruppen . ' (' . $lektoren . ')</a></td></tr>' : '';
|
||||
$aw_content .= "<tr><td><a class='Item' href='anwesenheitsliste.pdf.php?stg=$stg_kz&sem=$sem&lvid=$lvid&lehreinheit_id=$lastlehreinheit&stsem=$stsem'> <img src='../../../skin/images/haken.gif' />$kurzbz - $lehrform - $gruppen ($lektoren)</a></td></tr>";
|
||||
$awbild_content .= "<tr><td><a class='Item' href='fotoliste.pdf.php?stg=$stg_kz&sem=$sem&lvid=$lvid&lehreinheit_id=$lastlehreinheit&stsem=$stsem'> <img src='../../../skin/images/haken.gif' />$kurzbz - $lehrform - $gruppen ($lektoren)</a></td></tr>";
|
||||
$nt_content .= "<tr><td><a class='Item' href='notenliste.xls.php?stg=$stg_kz&sem=$sem&lvid=$lvid&lehreinheit_id=$lastlehreinheit&stsem=$stsem'> <img src='../../../skin/images/haken.gif' />$kurzbz - $lehrform - $gruppen ($lektoren)</a></td></tr>";
|
||||
@@ -198,6 +209,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if($covid_content!='')
|
||||
$covid_content = "<table border='0' cellspacing='0'><tr><td><h3>".$p->t('anwesenheitsliste/covidstatuslisten')."</h3></td></tr>".$covid_content."</table>";
|
||||
else
|
||||
$covid_content = ($covidhelper->isUdfDefined()) ? $p->t('anwesenheitsliste/keineStudentenVorhanden') : '';
|
||||
|
||||
if($aw_content!='')
|
||||
$aw_content = "<table border='0' cellspacing='0'><tr><td><h3>".$p->t('anwesenheitsliste/anwesenheitslisten')."</h3></td></tr>".$aw_content."</table>";
|
||||
else
|
||||
@@ -221,17 +237,20 @@
|
||||
$aw_content='';
|
||||
if(defined('CIS_ANWESENHEITSLISTE_ANWESENHEITSLISTE_BILD_ANZEIGEN') && !CIS_ANWESENHEITSLISTE_ANWESENHEITSLISTE_BILD_ANZEIGEN)
|
||||
$awbild_content='';
|
||||
|
||||
|
||||
echo "<table cellpadding='0' cellspacing='0'>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>$aw_content</td>
|
||||
<td class=\"covidstatus\">$covid_content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$awbild_content</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$nt_content</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table>";
|
||||
|
||||
@@ -45,6 +45,8 @@ require_once ('../../../../include/note.class.php');
|
||||
require_once ('../../../../include/notenschluessel.class.php');
|
||||
require_once ('../../../../include/studienplan.class.php');
|
||||
require_once ('../../../../include/addon.class.php');
|
||||
require_once ('../../../../include/mobilitaet.class.php');
|
||||
require_once ('../../../../include/student.class.php');
|
||||
|
||||
$summe_stud = 0;
|
||||
$summe_t2 = 0;
|
||||
@@ -80,6 +82,8 @@ if (! $lv_obj->load($lvid))
|
||||
// Studiengang laden
|
||||
$stg_obj = new studiengang($lv_obj->studiengang_kz);
|
||||
|
||||
$stg_obj->studiengang_kz;
|
||||
|
||||
$datum_obj = new datum();
|
||||
|
||||
if (isset($_GET['stsem']))
|
||||
@@ -1113,8 +1117,8 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
|
||||
campus.vw_student_lehrveranstaltung
|
||||
JOIN campus.vw_student USING(uid)
|
||||
WHERE
|
||||
studiensemester_kurzbz = " . $db->db_add_param($stsem) . "
|
||||
AND lehrveranstaltung_id = " . $db->db_add_param($lvid) . "
|
||||
studiensemester_kurzbz = ". $db->db_add_param($stsem). "
|
||||
AND lehrveranstaltung_id = ". $db->db_add_param($lvid). "
|
||||
ORDER BY nachname, vorname ";
|
||||
|
||||
if ($result_stud = $db->db_query($qry_stud))
|
||||
@@ -1122,11 +1126,29 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
|
||||
$i = 1;
|
||||
$errorshown = false;
|
||||
$summe_stud = $db->db_num_rows($result_stud);
|
||||
|
||||
//Ergänzung um Mobility-Eintrag (d.d.)
|
||||
while ($row_stud = $db->db_fetch_object($result_stud))
|
||||
{
|
||||
$grades[$row_stud->uid]['vorname'] = $row_stud->vorname;
|
||||
$grades[$row_stud->uid]['nachname'] = $row_stud->nachname;
|
||||
|
||||
$student = new student();
|
||||
$student->load($row_stud->uid);
|
||||
$student->result[]= $student;
|
||||
$prestudent_id = $student->prestudent_id;
|
||||
|
||||
$mobility = new mobilitaet();
|
||||
$mobility->loadPrestudent($prestudent_id);
|
||||
$output = $mobility->result;
|
||||
$eintrag = '';
|
||||
foreach ($output as $k)
|
||||
{
|
||||
if($k->mobilitaetstyp_kurzbz == 'GS')
|
||||
$eintrag = ' (d.d.)';
|
||||
}
|
||||
$grades[$row_stud->uid]['mobility'] = $eintrag;
|
||||
|
||||
// Noten aus Uebungstool
|
||||
$le = new lehreinheit();
|
||||
$le->load_lehreinheiten($lvid, $stsem);
|
||||
@@ -1167,12 +1189,13 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
|
||||
|
||||
$anzahlChanged = 0;
|
||||
foreach ($grades as $uid => $data)
|
||||
//Ausgabe Array
|
||||
{
|
||||
$htmlstring .= '<tr class="liste' . ($i % 2) . '">
|
||||
<td><a href="mailto:' . $uid . '@' . DOMAIN . '"><img src="../../../../skin/images/button_mail.gif"></a></td>
|
||||
<td>' . $db->convert_html_chars($uid) . '</td>
|
||||
<td id= '. $uid. "_nn". '>' . $db->convert_html_chars($data['nachname']) . '</td>
|
||||
<td id= '. $uid. "_vn". '>' . $db->convert_html_chars($data['vorname']) . '</td>';
|
||||
<td id= '. $uid. "_vn". '>' . $db->convert_html_chars($data['vorname']) . $db->convert_html_chars($data['mobility']) .'</td>';
|
||||
|
||||
// Bereits eingetragene Note ermitteln
|
||||
if ($lvgesamtnote = new lvgesamtnote($lvid, $uid, $stsem))
|
||||
@@ -1619,5 +1642,11 @@ echo $htmlstring;
|
||||
|
||||
<div id="nachpruefung_div"></div>
|
||||
|
||||
<div id="legende">
|
||||
<hr>
|
||||
<h3>Legende</h2>
|
||||
<p>(d.d.)... Double Degree Program</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Manfred Kindl <manfred.kindl@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../include/lehreinheitgruppe.class.php');
|
||||
require_once('../../../include/lehreinheit.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/lehreinheitmitarbeiter.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/erhalter.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/lehrelisthelper.class.php');
|
||||
require_once('../../../include/covid/covidhelper.class.php');
|
||||
|
||||
$debug = false;
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$user=get_uid();
|
||||
|
||||
$berechtigung = new benutzerberechtigung();
|
||||
$berechtigung->getBerechtigungen($user);
|
||||
|
||||
if(isset($_GET['lvid']) && is_numeric($_GET['lvid']))
|
||||
$lvid = $_GET['lvid'];
|
||||
else
|
||||
die('Eine gueltige LvID muss uebergeben werden');
|
||||
|
||||
$lv = new lehrveranstaltung();
|
||||
$lv->load($lvid);
|
||||
|
||||
if(isset($_GET['stsem']))
|
||||
$studiensemester = $_GET['stsem'];
|
||||
else
|
||||
die('Eine Studiensemester muss uebergeben werden');
|
||||
|
||||
if( !$berechtigung->isBerechtigt('admin')
|
||||
&& !$berechtigung->isBerechtigt('assistenz')
|
||||
&& !$berechtigung->isBerechtigt('lehre', $lv->oe_kurzbz, 's')
|
||||
&& !check_lektor_lehrveranstaltung($user,$lvid,$studiensemester))
|
||||
die('Sie muessen LektorIn der LV sein oder das Recht "ADMIN", "ASSISTENZ" oder "LEHRE" haben, um diese Seite aufrufen zu koennen');
|
||||
|
||||
isset($_GET['stg_kz']) ? $studiengang = $_GET['stg_kz'] : $studiengang = NULL;
|
||||
isset($_GET['lehreinheit_id']) ? $lehreinheit = $_GET['lehreinheit_id'] : $lehreinheit = NULL;
|
||||
|
||||
$stg = new studiengang();
|
||||
$stg->load($lv->studiengang_kz);
|
||||
|
||||
$lehrelisthelper = new LehreListHelper($db, $studiensemester, $lvid, $lv, $stg, $lehreinheit);
|
||||
$arr_lehrende = $lehrelisthelper->getArr_Lehrende();
|
||||
$data = $lehrelisthelper->getData();
|
||||
$studentuids = $lehrelisthelper->getStudentUids();
|
||||
|
||||
$covidhelper = new CovidHelper();
|
||||
$covidhelper->fetchCovidStatus($studentuids);
|
||||
$covidstatus = $covidhelper->getCovidStatus();
|
||||
|
||||
$now = new DateTime('now', new DateTimeZone('Europe/Vienna'));
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
?>
|
||||
<!<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>FHC - Nachweisliste</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link href="../../../vendor/components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
|
||||
<h1>Nachweisliste "<?php echo $data['bezeichnung']; ?>"</h1>
|
||||
<ul>
|
||||
<li><strong>Gruppen</strong>: <?php echo $data['gruppen']; ?></li>
|
||||
<li><strong>Studiensemester</strong>: <?php echo $data['studiensemester']; ?></li>
|
||||
<li><strong>Lehrende</strong>: <?php echo $lehrelisthelper->getLehrende_String(); ?></li>
|
||||
<li><strong>generiert</strong>: <?php echo $now->format('d.m.Y H:i'); ?></li>
|
||||
<li><strong>Anzahl der Studierenden</strong>: <?php echo $data['anzahl_studierende']; ?></li>
|
||||
</ul>
|
||||
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>lfd.Nr.</th>
|
||||
<th>Name</th>
|
||||
<th>Kennzeichen</th>
|
||||
<th>Gruppe</th>
|
||||
<th>Nachweis</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$len = strlen($data['anzahl_studierende']);
|
||||
$lfdnr = 1;
|
||||
foreach ($data as $value)
|
||||
{
|
||||
if( !(is_array($value) && isset($value['student'])) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$tmpstudent =& $value['student'];
|
||||
?>
|
||||
<tr class="<?php echo $covidhelper->getBootstrapClass($tmpstudent['uid'])?>" title="<?php echo $covidhelper->getTitle($tmpstudent['uid'])?>">
|
||||
<td><?php echo sprintf('%0' . $len . 'd', $lfdnr); ?></td>
|
||||
<td><?php echo $tmpstudent['nachname'] . ' ' . $tmpstudent['vorname'] . ' ' . $tmpstudent['zusatz']; ?></td>
|
||||
<td><?php echo $tmpstudent['personenkennzeichen']; ?></td>
|
||||
<td><?php echo $tmpstudent['semester'] . $tmpstudent['verband'] . $tmpstudent['gruppe']; ?></td>
|
||||
<td><?php echo $covidhelper->getIconHtml($tmpstudent['uid']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$lfdnr++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if( $debug )
|
||||
{
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
|
||||
<div class="debug">
|
||||
<pre>
|
||||
<?php
|
||||
print_r($data);
|
||||
print_r($covidstatus);
|
||||
?>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -200,20 +200,26 @@ else
|
||||
$stsemdatumbis = $stsem_obj->ende;
|
||||
|
||||
$qry = "SELECT
|
||||
distinct on(nachname, vorname, person_id) vorname, nachname, matrikelnr, person_id, tbl_student.student_uid as uid,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe,
|
||||
(SELECT status_kurzbz FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_student.prestudent_id ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as status,
|
||||
tbl_bisio.bisio_id, tbl_bisio.bis, tbl_bisio.von,
|
||||
tbl_zeugnisnote.note
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung JOIN public.tbl_benutzer USING(uid)
|
||||
JOIN public.tbl_person USING(person_id) JOIN public.tbl_student ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=tbl_student.student_uid AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz)
|
||||
LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid)
|
||||
WHERE
|
||||
vw_student_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz=".$db->db_add_param($stsem);
|
||||
distinct on(nachname, vorname, person_id) vorname, nachname, matrikelnr, person_id, tbl_student.student_uid as uid,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe,
|
||||
(SELECT status_kurzbz
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id=tbl_student.prestudent_id
|
||||
ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as status,
|
||||
tbl_bisio.bisio_id, tbl_bisio.bis, tbl_bisio.von,
|
||||
tbl_zeugnisnote.note,tbl_mobilitaet.mobilitaetstyp_kurzbz
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung JOIN public.tbl_benutzer USING(uid)
|
||||
JOIN public.tbl_person USING(person_id) JOIN public.tbl_student ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
AND tbl_zeugnisnote.student_uid=tbl_student.student_uid
|
||||
AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz)
|
||||
LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid)
|
||||
LEFT JOIN bis.tbl_mobilitaet USING(prestudent_id)
|
||||
WHERE
|
||||
vw_student_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz=".$db->db_add_param($stsem);";";
|
||||
|
||||
if($lehreinheit_id!='')
|
||||
$qry.=" AND vw_student_lehrveranstaltung.lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
@@ -243,6 +249,10 @@ else
|
||||
$inc.=' (ar)';
|
||||
$note='ar';
|
||||
}
|
||||
if($elem->mobilitaetstyp_kurzbz !='') //dd-Program
|
||||
{
|
||||
$inc.=' (dd)';
|
||||
}
|
||||
else
|
||||
$note='';
|
||||
$worksheet->write($lines,1,$elem->uid);
|
||||
@@ -295,6 +305,7 @@ else
|
||||
$worksheet->write(++$lines,0,'(i) ... Incoming');
|
||||
$worksheet->write(++$lines,0,'(o) ... Outgoing');
|
||||
$worksheet->write(++$lines,0,'(ar) ... '.$p->t('anwesenheitsliste/angerechnet'));
|
||||
$worksheet->write(++$lines,0,'(dd) ... Double Degree Program');
|
||||
|
||||
$worksheet->setColumn(0, 0, 5);
|
||||
$worksheet->setColumn(0, 1, 16);
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Harald Bamberger <harald.bamberger@technikum-wien.at>
|
||||
*/
|
||||
require_once(dirname(__DIR__) . '/basis_db.class.php');
|
||||
/**
|
||||
* Description of covidhelper
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
class CovidHelper extends basis_db
|
||||
{
|
||||
const STATUS_OK = 1;
|
||||
const STATUS_NOTOK = 0;
|
||||
const STATUS_UNKNOWN = -1;
|
||||
const STATUS_NOTSET = -2;
|
||||
|
||||
const TITLE_OK = 'Nachweis gültig';
|
||||
const TITLE_NOTOK = 'Nachweis ungültig';
|
||||
const TITLE_UNKNOWN = 'Nachweis unbekannt';
|
||||
|
||||
const DB_SCHEMA = 'public';
|
||||
const DB_TABLE = 'tbl_person';
|
||||
const DB_UDFNAME = 'udf_3gvalid';
|
||||
|
||||
protected $isUdfDefined;
|
||||
|
||||
protected $uids;
|
||||
protected $covidstatus;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->uids = array();
|
||||
$this->covidstatus = array();
|
||||
$this->isUdfDefined = false;
|
||||
$this->checkIfUdfValuesAreDefined();
|
||||
}
|
||||
|
||||
public function isUdfDefined()
|
||||
{
|
||||
return $this->isUdfDefined;
|
||||
}
|
||||
|
||||
public function fetchCovidStatus(array $uids)
|
||||
{
|
||||
$this->uids = $uids;
|
||||
$this->covidstatus = array();
|
||||
$this->fetchCovidValidStatus();
|
||||
}
|
||||
|
||||
public function getIconHtml($uid)
|
||||
{
|
||||
$html = '';
|
||||
$status = isset($this->covidstatus[$uid]) ? $this->covidstatus[$uid] : self::STATUS_NOTSET;
|
||||
switch ($status)
|
||||
{
|
||||
case self::STATUS_OK:
|
||||
$html = '<i title="' . $this->getTitle($uid) . '" class="fa fa-check-circle" aria-hidden="true" style="color: green; margin-right: .5em;"></i>';
|
||||
break;
|
||||
case self::STATUS_NOTOK:
|
||||
case self::STATUS_UNKNOWN:
|
||||
$html = '<i title="' . $this->getTitle($uid) . '" class="fa fa-times-circle" aria-hidden="true" style="color: red; margin-right: .5em;"></i>';
|
||||
break;
|
||||
/*
|
||||
case self::STATUS_UNKNOWN:
|
||||
$html = '<i title="' . $this->getTitle($uid) . '" class="fa fa-question-circle" aria-hidden="true" style="color: grey; margin-right: .5em;"></i>';
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
$html = '';
|
||||
break;
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function getBootstrapClass($uid)
|
||||
{
|
||||
$class = '';
|
||||
$status = isset($this->covidstatus[$uid]) ? $this->covidstatus[$uid] : self::STATUS_NOTSET;
|
||||
switch ($status)
|
||||
{
|
||||
case self::STATUS_OK:
|
||||
$class = 'success';
|
||||
break;
|
||||
case self::STATUS_NOTOK:
|
||||
case self::STATUS_UNKNOWN:
|
||||
$class = 'danger';
|
||||
break;
|
||||
/*
|
||||
case self::STATUS_UNKNOWN:
|
||||
$class = 'warning';
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
$class = '';
|
||||
break;
|
||||
}
|
||||
return $class;
|
||||
}
|
||||
|
||||
public function getTitle($uid)
|
||||
{
|
||||
$title = '';
|
||||
$status = isset($this->covidstatus[$uid]) ? $this->covidstatus[$uid] : self::STATUS_NOTSET;
|
||||
switch ($status)
|
||||
{
|
||||
case self::STATUS_OK:
|
||||
$title = self::TITLE_OK;
|
||||
break;
|
||||
case self::STATUS_NOTOK:
|
||||
case self::STATUS_UNKNOWN:
|
||||
$title = self::TITLE_NOTOK;
|
||||
break;
|
||||
/*
|
||||
case self::STATUS_UNKNOWN:
|
||||
$title = self::TITLE_UNKNOWN;
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
$title = '';
|
||||
break;
|
||||
}
|
||||
return $title;
|
||||
}
|
||||
|
||||
public function getCovidStatus()
|
||||
{
|
||||
return $this->covidstatus;
|
||||
}
|
||||
|
||||
protected function fetchCovidValidStatus()
|
||||
{
|
||||
if( !($this->isUdfDefined && is_array($this->uids) && (count($this->uids) > 0)) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
$sql = <<<EOSQL
|
||||
SELECT b.uid, CASE
|
||||
WHEN (p."udf_values" -> 'udf_3gvalid')::text::date >= CURRENT_DATE::text::date THEN 1
|
||||
WHEN (p."udf_values" -> 'udf_3gvalid')::text::date < CURRENT_DATE::text::date THEN 0
|
||||
ELSE -1
|
||||
END AS covidvalid
|
||||
FROM tbl_person p
|
||||
JOIN tbl_benutzer b ON b.person_id = p.person_id AND b.uid IN ({$this->implode4SQL($this->uids)})
|
||||
EOSQL;
|
||||
|
||||
$this->covidstatus = array();
|
||||
if( $this->db_query($sql) )
|
||||
{
|
||||
while( false !== ($row = $this->db_fetch_object()) )
|
||||
{
|
||||
$this->covidstatus[$row->uid] = $row->covidvalid;
|
||||
}
|
||||
} else {
|
||||
$this->errormsg = "Fehler in der Abfrage des Covidstatus.";
|
||||
}
|
||||
}
|
||||
|
||||
public function checkIfUdfValuesAreDefined()
|
||||
{
|
||||
$sql = 'SELECT count(name) AS "udfdefined" '
|
||||
. 'FROM "system"."tbl_udf", jsonb_to_recordset("jsons") AS items(name text) '
|
||||
. 'WHERE "schema" = \'' . self::DB_SCHEMA . '\' '
|
||||
. 'AND "table" = \'' . self::DB_TABLE . '\' '
|
||||
. 'AND "name" = \'' . self::DB_UDFNAME . '\'';
|
||||
if ( $this->db_query($sql) )
|
||||
{
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->isUdfDefined = ($row->udfdefined > 0) ? true : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler in der Abfrage beim Pruefen der UDFs. Kein Datensatz gefunden.";
|
||||
$this->isUdfDefined = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler in der Abfrage beim Pruefen der UDFs.";
|
||||
$this->isUdfDefined = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Harald Bamberger <harald.bamberger@technikum-wien.at>
|
||||
* Manfred Kindl <manfred.kindl@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../include/lehreinheitgruppe.class.php');
|
||||
require_once('../../../include/lehreinheit.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/lehreinheitmitarbeiter.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/erhalter.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
/**
|
||||
* Description of lehrelisthelper
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
class LehreListHelper
|
||||
{
|
||||
protected $db;
|
||||
protected $studiensemester;
|
||||
protected $lvid;
|
||||
protected $lv;
|
||||
protected $lehreinheit;
|
||||
protected $stg;
|
||||
|
||||
protected $arr_lehrende;
|
||||
protected $studentuids;
|
||||
protected $data;
|
||||
|
||||
protected $gruppen_string;
|
||||
protected $lehrende_string;
|
||||
protected $raum_string;
|
||||
|
||||
public function __construct(basis_db $db, $studiensemester, $lvid,
|
||||
lehrveranstaltung $lv, studiengang $stg, $lehreinheit='')
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->studiensemester = $studiensemester;
|
||||
$this->lvid = $lvid;
|
||||
$this->lv = $lv;
|
||||
$this->lehreinheit = $lehreinheit;
|
||||
$this->stg = $stg;
|
||||
|
||||
$this->arr_lehrende = array();
|
||||
$this->studentuids = array();
|
||||
$this->data = array();
|
||||
|
||||
$this->gruppen_string = '';
|
||||
$this->lehrende_string = '';
|
||||
$this->raum_string = '';
|
||||
|
||||
$this->loadMemberGroups();
|
||||
$this->loadPlannedRooms();
|
||||
$this->initData();
|
||||
$this->loadLehrende();
|
||||
$this->loadStudierende();
|
||||
}
|
||||
|
||||
public function getData()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function getStudentUids()
|
||||
{
|
||||
return $this->studentuids;
|
||||
}
|
||||
|
||||
public function getArr_Lehrende()
|
||||
{
|
||||
return $this->arr_lehrende;
|
||||
}
|
||||
|
||||
public function getLehrende_String()
|
||||
{
|
||||
return $this->lehrende_string;
|
||||
}
|
||||
|
||||
protected function loadMemberGroups()
|
||||
{
|
||||
// Teilnehmende Gruppen laden
|
||||
$qry = "SELECT DISTINCT ON(kuerzel, semester, verband, gruppe, gruppe_kurzbz)
|
||||
UPPER(stg_typ::varchar(1) || stg_kurzbz) as kuerzel,
|
||||
semester,
|
||||
verband,
|
||||
gruppe,
|
||||
gruppe_kurzbz
|
||||
FROM campus.vw_lehreinheit
|
||||
WHERE lehrveranstaltung_id=".$this->db->db_add_param($this->lvid, FHC_INTEGER)."
|
||||
AND studiensemester_kurzbz=".$this->db->db_add_param($this->studiensemester);
|
||||
if($this->lehreinheit!='')
|
||||
$qry.=" AND lehreinheit_id=".$this->db->db_add_param($this->lehreinheit, FHC_INTEGER);
|
||||
|
||||
$this->gruppen_string = '';
|
||||
if($result = $this->db->db_query($qry))
|
||||
{
|
||||
while($row = $this->db->db_fetch_object($result))
|
||||
{
|
||||
if($this->gruppen_string!='')
|
||||
$this->gruppen_string.=', ';
|
||||
if($row->gruppe_kurzbz=='')
|
||||
$this->gruppen_string.=trim($row->kuerzel.'-'.$row->semester.$row->verband.$row->gruppe);
|
||||
else
|
||||
$this->gruppen_string.=$row->gruppe_kurzbz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadPlannedRooms()
|
||||
{
|
||||
// Verplante Räume laden
|
||||
$qry = "SELECT distinct(ort_kurzbz)
|
||||
FROM lehre.tbl_stundenplan
|
||||
WHERE lehreinheit_id in
|
||||
(
|
||||
SELECT lehreinheit_id
|
||||
FROM campus.vw_lehreinheit
|
||||
WHERE lehrveranstaltung_id = ".$this->db->db_add_param($this->lvid, FHC_INTEGER)."
|
||||
AND studiensemester_kurzbz = ".$this->db->db_add_param($this->studiensemester)."
|
||||
)";
|
||||
if($this->lehreinheit!='')
|
||||
$qry.= " AND tbl_stundenplan.lehreinheit_id = ".$this->db->db_add_param($this->lehreinheit, FHC_INTEGER);
|
||||
|
||||
|
||||
$this->raum_string = '';
|
||||
if($result = $this->db->db_query($qry))
|
||||
{
|
||||
while($row = $this->db->db_fetch_object($result))
|
||||
{
|
||||
if($this->raum_string!='')
|
||||
$this->raum_string.=', ';
|
||||
if($row->ort_kurzbz!='')
|
||||
$this->raum_string.=$row->ort_kurzbz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function initData()
|
||||
{
|
||||
$studiengang_bezeichnung=$this->stg->bezeichnung;
|
||||
|
||||
$this->stg->getAllTypes();
|
||||
|
||||
$this->data = array(
|
||||
'gruppen'=>$this->gruppen_string,
|
||||
'bezeichnung'=>$this->lv->bezeichnung,
|
||||
'lehrveranstaltung_id'=>$this->lv->lehrveranstaltung_id,
|
||||
'studiengang'=>$studiengang_bezeichnung,
|
||||
'studiengang_kz'=>$this->lv->studiengang_kz,
|
||||
'typ'=>$this->stg->studiengang_typ_arr[$this->stg->typ],
|
||||
'ects'=>$this->lv->ects,
|
||||
'sprache'=>$this->lv->sprache,
|
||||
'studiensemester'=>$this->studiensemester,
|
||||
'semester'=>$this->lv->semester,
|
||||
'orgform'=>$this->lv->orgform_kurzbz,
|
||||
'raum'=>$this->raum_string,
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadLehrende()
|
||||
{
|
||||
//Lehrende der LV laden und in ein Array schreiben
|
||||
$lehrende = new lehreinheitmitarbeiter();
|
||||
$lehrende->getMitarbeiterLV($this->lvid, $this->studiensemester, $this->lehreinheit);
|
||||
$this->arr_lehrende = array();
|
||||
if (isset($lehrende->result))
|
||||
{
|
||||
foreach($lehrende->result AS $row)
|
||||
{
|
||||
$this->data[]=array('lehrende'=>array('uid'=>$row->uid,'name'=>$row->vorname.' '.$row->nachname));
|
||||
$this->arr_lehrende[]=mb_strtoupper($row->uid);
|
||||
$this->lehrende_string .= (strlen($this->lehrende_string) > 0)
|
||||
? ', ' . $row->vorname . ' ' . $row->nachname
|
||||
: $row->vorname . ' ' . $row->nachname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadStudierende()
|
||||
{
|
||||
//Studierende der LV laden und in ein Array schreiben
|
||||
|
||||
$qry = 'SELECT
|
||||
distinct on(nachname, vorname, person_id) vorname, nachname, matrikelnr, public.tbl_student.student_uid,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe,
|
||||
(SELECT status_kurzbz FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_student.prestudent_id ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as status,
|
||||
tbl_bisio.bisio_id, tbl_bisio.von, tbl_bisio.bis, tbl_student.studiengang_kz AS stg_kz_student,
|
||||
tbl_note.lkt_ueberschreibbar, tbl_note.anmerkung, tbl_mitarbeiter.mitarbeiter_uid, tbl_person.matr_nr, tbl_studiengang.kurzbzlang, tbl_mobilitaet.mobilitaetstyp_kurzbz
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung
|
||||
JOIN public.tbl_benutzer USING(uid)
|
||||
JOIN public.tbl_person USING(person_id) LEFT JOIN public.tbl_student ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid)
|
||||
LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=tbl_student.student_uid AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_note USING (note)
|
||||
LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid)
|
||||
LEFT JOIN public.tbl_studiengang ON(tbl_student.studiengang_kz=tbl_studiengang.studiengang_kz)
|
||||
LEFT JOIN bis.tbl_mobilitaet USING(prestudent_id)
|
||||
WHERE
|
||||
vw_student_lehrveranstaltung.lehrveranstaltung_id='.$this->db->db_add_param($this->lvid, FHC_INTEGER).' AND
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz='.$this->db->db_add_param($this->studiensemester);
|
||||
|
||||
|
||||
if($this->lehreinheit!='')
|
||||
$qry.=' AND vw_student_lehrveranstaltung.lehreinheit_id='.$this->db->db_add_param($this->lehreinheit, FHC_INTEGER);
|
||||
|
||||
$qry.=' ORDER BY nachname, vorname, person_id, tbl_bisio.bis DESC';
|
||||
|
||||
$stsem_obj = new studiensemester();
|
||||
$stsem_obj->load($this->studiensemester);
|
||||
$stsemdatumvon = $stsem_obj->start;
|
||||
$stsemdatumbis = $stsem_obj->ende;
|
||||
|
||||
$erhalter = new erhalter();
|
||||
$erhalter->getAll();
|
||||
|
||||
$a_o_kz = '9'.sprintf("%03s", $erhalter->result[0]->erhalter_kz); //Stg_Kz AO-Studierende auslesen (9005 fuer FHTW)
|
||||
$anzahl_studierende = 0;
|
||||
$datum = new datum();
|
||||
$zusatz = '';
|
||||
|
||||
$this->studentuids = array();
|
||||
if($result = $this->db->db_query($qry))
|
||||
{
|
||||
while($row = $this->db->db_fetch_object($result))
|
||||
{
|
||||
if($row->status!='Abbrecher' && $row->status!='Unterbrecher')
|
||||
{
|
||||
$anzahl_studierende++;
|
||||
|
||||
if($row->status=='Incoming') //Incoming
|
||||
$zusatz='(i)';
|
||||
else
|
||||
$zusatz='';
|
||||
|
||||
if($row->bisio_id!='' && $row->status!='Incoming' && ($row->bis > $stsemdatumvon || $row->bis=='') && $row->von < $stsemdatumbis) //Outgoing
|
||||
$zusatz.='(o)(ab '.$datum->formatDatum($row->von,'d.m.Y').')';
|
||||
|
||||
if($row->lkt_ueberschreibbar == 'f') // angerechnet / intern angerechnet / nicht zugelassen
|
||||
$zusatz.= '('. $row->anmerkung. ')';
|
||||
|
||||
if($row->mitarbeiter_uid!='') //mitarbeiter
|
||||
$zusatz.='(ma)';
|
||||
|
||||
if($row->stg_kz_student==$a_o_kz) //Außerordentliche Studierende
|
||||
$zusatz.='(a.o.)';
|
||||
|
||||
if($row->mobilitaetstyp_kurzbz !='') //Double Degree Student
|
||||
$zusatz.='(d.d.)';
|
||||
|
||||
//$zusatz.='test';
|
||||
|
||||
$this->studentuids[] = $row->student_uid;
|
||||
$this->data[]=array('student'=>array(
|
||||
'uid' => $row->student_uid,
|
||||
'vorname'=>$row->vorname,
|
||||
'nachname'=>$row->nachname,
|
||||
'personenkennzeichen'=>trim($row->matrikelnr),
|
||||
'matr_nr'=>$row->matr_nr,
|
||||
'semester'=>$row->semester,
|
||||
'verband'=>trim($row->verband),
|
||||
'gruppe'=>trim($row->gruppe),
|
||||
'zusatz'=>$zusatz,
|
||||
'studiengang_kurzbz'=>$row->kurzbzlang,
|
||||
'mobilitaetstyp_kurzbz'=>$row->mobilitaetstyp_kurzbz
|
||||
));
|
||||
}
|
||||
}
|
||||
//Anzahl Studierende in Array $data (an erster Stelle) einfuegen
|
||||
$this->data = array_reverse($this->data, true);
|
||||
$this->data['anzahl_studierende'] = $anzahl_studierende;
|
||||
$this->data = array_reverse($this->data, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,12 +32,12 @@ class basis_db extends db
|
||||
//Connection Herstellen
|
||||
if (DB_CONNECT_PERSISTENT)
|
||||
{
|
||||
if(!basis_db::$db_conn = pg_pconnect($conn_str))
|
||||
if(!basis_db::$db_conn = @pg_pconnect($conn_str))
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!basis_db::$db_conn = pg_connect($conn_str))
|
||||
if(!basis_db::$db_conn = @pg_connect($conn_str))
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,7 +571,7 @@ class student extends benutzer
|
||||
{
|
||||
$qry = "SELECT tbl_student.* FROM public.tbl_benutzer JOIN public.tbl_student ON(uid=student_uid)
|
||||
WHERE person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
|
||||
|
||||
if($studiengang_kz != '')
|
||||
{
|
||||
$qry .= " AND studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$this->phrasen['anwesenheitsliste/studiensemesterIstUngueltig']='Studiensemester ist ungueltig';
|
||||
$this->phrasen['anwesenheitsliste/anwesenheitslisten']='Anwesenheitslisten';
|
||||
$this->phrasen['anwesenheitsliste/covidstatuslisten']='Nachweislisten';
|
||||
$this->phrasen['anwesenheitsliste/notenlisten']='Notenlisten';
|
||||
$this->phrasen['anwesenheitsliste/notenliste']='Notenliste';
|
||||
$this->phrasen['anwesenheitsliste/anwesenheitslistenMitBildern']='Fotolisten';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$this->phrasen['anwesenheitsliste/studiensemesterIstUngueltig']='No valid semester';
|
||||
$this->phrasen['anwesenheitsliste/anwesenheitslisten']='Attendance lists';
|
||||
$this->phrasen['anwesenheitsliste/covidstatuslisten']='verification lists';
|
||||
$this->phrasen['anwesenheitsliste/notenlisten']='Grade lists';
|
||||
$this->phrasen['anwesenheitsliste/notenliste']='Grade list';
|
||||
$this->phrasen['anwesenheitsliste/anwesenheitslistenMitBildern']='Picture lists';
|
||||
|
||||
@@ -1740,6 +1740,20 @@ if ($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
|
||||
}
|
||||
|
||||
|
||||
// SELECT Berechtigung fuer web User erteilen fuer tbl_mobilitaet
|
||||
if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_mobilitaet' AND table_schema='bis' AND grantee='web' AND privilege_type='SELECT'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "GRANT SELECT ON bis.tbl_mobilitaet TO web;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>bis.tbl_mobilitaet Berechtigungen: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'SELECT Recht fuer bis.tbl_mobilitaet fuer web user gesetzt ';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Kommentare fuer Datenbanktabellen
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user