mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
@@ -627,14 +627,14 @@
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
exec('chmod 664 "'.$uploadfile.'"');
|
||||
exec('chmod 664 '.escapeshellarg($uploadfile));
|
||||
if($islector)
|
||||
{
|
||||
exec('sudo chown :teacher "'.$uploadfile.'"');
|
||||
exec('sudo chown :teacher '.escapeshellarg($uploadfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo chown :student "'.$uploadfile.'"');
|
||||
exec('sudo chown :student '.escapeshellarg($uploadfile));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -650,14 +650,14 @@
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
exec('chmod 664 "'.$uploadfile.'"');
|
||||
exec('chmod 664 '.escapeshellarg($uploadfile));
|
||||
if($islector)
|
||||
{
|
||||
exec('sudo chown :teacher "'.$uploadfile.'"');
|
||||
exec('sudo chown :teacher '.escapeshellarg($uploadfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo chown :student "'.$uploadfile.'"');
|
||||
exec('sudo chown :student '.escapeshellarg($uploadfile));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -683,14 +683,14 @@
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
exec('chmod 664 "'.$uploadfile.'"');
|
||||
exec('chmod 664 '.escapeshellarg($uploadfile));
|
||||
if($islector)
|
||||
{
|
||||
exec('sudo chown :teacher "'.$uploadfile.'"');
|
||||
exec('sudo chown :teacher '.escapeshellarg($uploadfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo chown :student "'.$uploadfile.'"');
|
||||
exec('sudo chown :student '.escapeshellarg($uploadfile));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -706,14 +706,14 @@
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
exec('chmod 664 "'.$uploadfile.'"');
|
||||
exec('chmod 664 '.escapeshellarg($uploadfile));
|
||||
if($islector)
|
||||
{
|
||||
exec('sudo chown :teacher "'.$uploadfile.'"');
|
||||
exec('sudo chown :teacher '.escapeshellarg($uploadfile));
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo chown :student "'.$uploadfile.'"');
|
||||
exec('sudo chown :student '.escapeshellarg($uploadfile));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -848,15 +848,15 @@
|
||||
if(!@is_dir($dest_create_dir->path.'/'.$new_dir_name_text) && !@file_exists($dest_create_dir->path.'/'.$new_dir_name_text) && $new_dir_name_text != "")
|
||||
{
|
||||
@mkdir($dest_create_dir->path.'/'.$new_dir_name_text);
|
||||
exec('chmod 775 "'.$dest_create_dir->path.'/'.$new_dir_name_text.'"');
|
||||
exec('chmod 775 '.escapeshellarg($dest_create_dir->path.'/'.$new_dir_name_text));
|
||||
|
||||
if($islector)
|
||||
{
|
||||
exec('sudo chown :teacher "'.$dest_create_dir->path.'/'.$new_dir_name_text.'"');
|
||||
exec('sudo chown :teacher '.escapeshellarg($dest_create_dir->path.'/'.$new_dir_name_text));
|
||||
}
|
||||
else
|
||||
{
|
||||
exec('sudo chown :student "'.$dest_create_dir->path.'/'.$new_dir_name_text.'"');
|
||||
exec('sudo chown :student '.escapeshellarg($dest_create_dir->path.'/'.$new_dir_name_text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1112,7 +1112,7 @@
|
||||
if(@is_dir($dest_dir->path.'/'.$entry))
|
||||
{
|
||||
writeCISlog('DELETE', 'rm -r "'.$dest_dir->path.'/'.$entry.'"');
|
||||
exec('rm -r "'.$dest_dir->path.'/'.$entry.'"');
|
||||
exec('rm -r '.escapeshellarg($dest_dir->path.'/'.$entry));
|
||||
}
|
||||
|
||||
unset($check_state);
|
||||
@@ -1359,7 +1359,7 @@
|
||||
if(!@is_dir($dest_dir->path.'/'.$entry))
|
||||
{
|
||||
writeCISlog('DELETE', 'rm -r "'.$dest_dir->path.'/'.$entry.'"');
|
||||
exec('rm -r "'.$dest_dir->path.'/'.$entry.'"');
|
||||
exec('rm -r '.escapeshellarg($dest_dir->path.'/'.$entry));
|
||||
}
|
||||
|
||||
unset($check_state);
|
||||
|
||||
@@ -48,6 +48,9 @@ if (!$db = new basis_db())
|
||||
$user = get_uid();
|
||||
$datum = new datum();
|
||||
|
||||
// definiert bis zu welchem Datum die Eintragung nicht mehr möglich ist
|
||||
$gesperrt_bis = '2015-01-31';
|
||||
$sperrdatum = date('c', strtotime($gesperrt_bis));
|
||||
|
||||
$zeitaufzeichnung_id = (isset($_GET['zeitaufzeichnung_id'])?$_GET['zeitaufzeichnung_id']:'');
|
||||
$projekt_kurzbz = (isset($_POST['projekt'])?$_POST['projekt']:'');
|
||||
@@ -353,54 +356,61 @@ if(isset($_POST['save']) || isset($_POST['edit']))
|
||||
{
|
||||
$zeit = new zeitaufzeichnung();
|
||||
|
||||
if(isset($_POST['edit']))
|
||||
{
|
||||
if(!$zeit->load($zeitaufzeichnung_id))
|
||||
die($p->t("global/fehlerBeimLadenDesDatensatzes"));
|
||||
|
||||
$zeit->new = false;
|
||||
}
|
||||
if ($datum->formatDatum($von, $format='Y-m-d H:i:s') < $sperrdatum)
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum</b></span>';
|
||||
else
|
||||
{
|
||||
$zeit->new = true;
|
||||
$zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$zeit->insertvon = $user;
|
||||
}
|
||||
|
||||
$zeit->uid = $user;
|
||||
$zeit->aktivitaet_kurzbz = $aktivitaet_kurzbz;
|
||||
$zeit->start = $datum->formatDatum($von, $format='Y-m-d H:i:s');
|
||||
$zeit->ende = $datum->formatDatum($bis, $format='Y-m-d H:i:s');
|
||||
$zeit->beschreibung = $beschreibung;
|
||||
$zeit->oe_kurzbz_1 = $oe_kurzbz_1;
|
||||
$zeit->oe_kurzbz_2 = $oe_kurzbz_2;
|
||||
$zeit->updateamum = date('Y-m-d H:i:s');
|
||||
$zeit->updatevon = $user;
|
||||
$zeit->projekt_kurzbz = $projekt_kurzbz;
|
||||
$zeit->service_id = $service_id;
|
||||
$zeit->kunde_uid = $kunde_uid;
|
||||
|
||||
if(!$zeit->save())
|
||||
{
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$zeit->errormsg.'</b></span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span style="color:green"><b>'.$p->t("global/datenWurdenGespeichert").'</b></span>';
|
||||
|
||||
// Nach dem Speichern in den neu Modus springen und als Von Zeit
|
||||
// das Ende des letzten Eintrages eintragen
|
||||
$zeitaufzeichnung_id = '';
|
||||
$uid = $zeit->uid;
|
||||
$aktivitaet_kurzbz = '';
|
||||
$von = date('d.m.Y H:i', $datum->mktime_fromtimestamp($zeit->ende));
|
||||
$bis = date('d.m.Y H:i', $datum->mktime_fromtimestamp($zeit->ende)+3600);
|
||||
$beschreibung = '';
|
||||
$oe_kurzbz_1 = '';
|
||||
$oe_kurzbz_2 = '';
|
||||
$projekt_kurzbz = '';
|
||||
$service_id = '';
|
||||
$kunde_uid = '';
|
||||
if(isset($_POST['edit']))
|
||||
{
|
||||
if(!$zeit->load($zeitaufzeichnung_id))
|
||||
die($p->t("global/fehlerBeimLadenDesDatensatzes"));
|
||||
|
||||
$zeit->new = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeit->new = true;
|
||||
$zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$zeit->insertvon = $user;
|
||||
}
|
||||
|
||||
$zeit->uid = $user;
|
||||
$zeit->aktivitaet_kurzbz = $aktivitaet_kurzbz;
|
||||
$zeit->start = $datum->formatDatum($von, $format='Y-m-d H:i:s');
|
||||
$zeit->ende = $datum->formatDatum($bis, $format='Y-m-d H:i:s');
|
||||
$zeit->beschreibung = $beschreibung;
|
||||
$zeit->oe_kurzbz_1 = $oe_kurzbz_1;
|
||||
$zeit->oe_kurzbz_2 = $oe_kurzbz_2;
|
||||
$zeit->updateamum = date('Y-m-d H:i:s');
|
||||
$zeit->updatevon = $user;
|
||||
$zeit->projekt_kurzbz = $projekt_kurzbz;
|
||||
$zeit->service_id = $service_id;
|
||||
$zeit->kunde_uid = $kunde_uid;
|
||||
|
||||
if(!$zeit->save())
|
||||
{
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$zeit->errormsg.'</b></span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span style="color:green"><b>'.$p->t("global/datenWurdenGespeichert").'</b></span>';
|
||||
|
||||
// Nach dem Speichern in den neu Modus springen und als Von Zeit
|
||||
// das Ende des letzten Eintrages eintragen
|
||||
$zeitaufzeichnung_id = '';
|
||||
$uid = $zeit->uid;
|
||||
$aktivitaet_kurzbz = '';
|
||||
$von = date('d.m.Y H:i', $datum->mktime_fromtimestamp($zeit->ende));
|
||||
$bis = date('d.m.Y H:i', $datum->mktime_fromtimestamp($zeit->ende)+3600);
|
||||
$beschreibung = '';
|
||||
$oe_kurzbz_1 = '';
|
||||
$oe_kurzbz_2 = '';
|
||||
$projekt_kurzbz = '';
|
||||
$service_id = '';
|
||||
$kunde_uid = '';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,15 +421,21 @@ if(isset($_GET['type']) && $_GET['type']=='delete')
|
||||
|
||||
if($zeit->load($zeitaufzeichnung_id))
|
||||
{
|
||||
if($zeit->uid==$user)
|
||||
{
|
||||
if($zeit->delete($zeitaufzeichnung_id))
|
||||
echo '<span style="color:orange"><b>'.$p->t("global/eintragWurdeGeloescht").'</b></span>';
|
||||
else
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimLoeschenDesEintrags").'</b></span>';
|
||||
}
|
||||
|
||||
if ($zeit->start < $sperrdatum)
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum</b></span>';
|
||||
else
|
||||
echo '<span style="color:red"><b>'.$p->t("global/keineBerechtigung").'!</b></span>';
|
||||
{
|
||||
if($zeit->uid==$user)
|
||||
{
|
||||
if($zeit->delete($zeitaufzeichnung_id))
|
||||
echo '<span style="color:orange"><b>'.$p->t("global/eintragWurdeGeloescht").'</b></span>';
|
||||
else
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimLoeschenDesEintrags").'</b></span>';
|
||||
}
|
||||
else
|
||||
echo '<span style="color:red"><b>'.$p->t("global/keineBerechtigung").'!</b></span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
echo '<span style="color:red"><b>'.$p->t("global/datensatzWurdeNichtGefunden").'</b></span>';
|
||||
@@ -774,7 +790,11 @@ if($projekt->getProjekteMitarbeiter($user))
|
||||
'.$p->t("zeitaufzeichnung/pause").' '.($pflichtpause==false?$p->t("zeitaufzeichnung/inklusivePflichtpause"):'').':
|
||||
</td>
|
||||
<td '.$style.' align="right"><b>'.$tagessaldo.'</b><br>'.date('H:i', ($pausesumme-3600)).'</td>
|
||||
<td '.$style.' colspan="3" align="right"><a href="?von_datum='.$datum->formatDatum($tag,'d.m.Y').'&bis_datum='.$datum->formatDatum($tag,'d.m.Y').'" class="item"><-</a></td>';
|
||||
<td '.$style.' colspan="3" align="right">';
|
||||
if ($tag > $sperrdatum)
|
||||
echo '<a href="?von_datum='.$datum->formatDatum($tag,'d.m.Y').'&bis_datum='.$datum->formatDatum($tag,'d.m.Y').'" class="item"><-</a>';
|
||||
|
||||
echo '</td>';
|
||||
|
||||
$tag=$datumtag;
|
||||
$tagessumme='00:00';
|
||||
@@ -874,11 +894,11 @@ if($projekt->getProjekteMitarbeiter($user))
|
||||
<td '.$style.' align="right">'.$db->convert_html_chars($row->diff).'</td>
|
||||
<td '.$style.' title="'.$db->convert_html_chars(mb_eregi_replace("\r\n",' ',$row->beschreibung)).'">'.StringCut($db->convert_html_chars($row->beschreibung),20,null,'...').'</td>
|
||||
<td '.$style.'>';
|
||||
if(!isset($_GET['filter']) || $row->uid==$user)
|
||||
if(!isset($_GET['filter']) && ($row->uid==$user && $row->datum > $sperrdatum))
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'?type=edit&zeitaufzeichnung_id='.$row->zeitaufzeichnung_id.'" class="Item">'.$p->t("global/bearbeiten").'</a>';
|
||||
echo "</td>\n";
|
||||
echo " <td ".$style.">";
|
||||
if(!isset($_GET['filter']) || $row->uid==$user)
|
||||
if(!isset($_GET['filter']) && ($row->uid==$user && $row->start > $sperrdatum))
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'?type=delete&zeitaufzeichnung_id='.$row->zeitaufzeichnung_id.'" class="Item" onclick="return confdel()">'.$p->t("global/loeschen").'</a>';
|
||||
echo "</td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
@@ -110,6 +110,14 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang_lv" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-noten-tree-semester_lv" label="SemesterLV" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#semester_lv" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-noten-tree-ects_lv" label="ECTS" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#ects_lv" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-noten-tree-lehrform" label="Lehrform" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_lehrform" />
|
||||
@@ -140,6 +148,8 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang_kz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang_lv"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#semester_lv"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#ects_lv"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_lehrform"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#punkte"/>
|
||||
|
||||
@@ -543,7 +543,7 @@ class statistik extends basis_db
|
||||
$anzahl_spalten = $this->db_num_fields($this->data);
|
||||
for($spalte=0;$spalte<$anzahl_spalten;$spalte++)
|
||||
{
|
||||
$this->html.= '<th>'.$this->db_field_name($this->data,$spalte).'</th>';
|
||||
$this->html.= '<th>'.$this->convert_html_chars($this->db_field_name($this->data,$spalte)).'</th>';
|
||||
$this->csv.='"'.$this->db_field_name($this->data,$spalte).'",';
|
||||
}
|
||||
$this->html.= '</tr></thead><tbody>';
|
||||
@@ -556,7 +556,7 @@ class statistik extends basis_db
|
||||
for($spalte=0;$spalte<$anzahl_spalten;$spalte++)
|
||||
{
|
||||
$name = $this->db_field_name($this->data,$spalte);
|
||||
$this->html.= '<td>'.$row->$name.'</td>';
|
||||
$this->html.= '<td>'.$this->convert_html_chars($row->$name).'</td>';
|
||||
$this->csv.= '"'.$row->$name.'",';
|
||||
}
|
||||
|
||||
|
||||
@@ -230,6 +230,31 @@ class studiengang extends basis_db
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt alle Studiengaenge zurueck, fuer die man sich online bewerben kann
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAllForBewerbung()
|
||||
{
|
||||
$qry = 'SELECT DISTINCT studiengang_kz, typ, organisationseinheittyp_kurzbz, studiengangbezeichnung '
|
||||
. 'FROM lehre.vw_studienplan '
|
||||
. 'WHERE onlinebewerbung IS TRUE '
|
||||
. 'ORDER BY studiengangbezeichnung ASC';
|
||||
|
||||
if(!$result = $this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Datensatz konnte nicht geladen werden';
|
||||
return false;
|
||||
}
|
||||
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->result[] = $row;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt alle Studientypen in das Attribut studiengang_typ_array
|
||||
|
||||
@@ -114,6 +114,8 @@ foreach ($obj->result as $row)
|
||||
<NOTE:studiengang><![CDATA['.$stg_arr[$benutzer->studiengang_kz].']]></NOTE:studiengang>
|
||||
<NOTE:studiengang_kz><![CDATA['.$benutzer->studiengang_kz.']]></NOTE:studiengang_kz>
|
||||
<NOTE:studiengang_lv><![CDATA['.$stg_arr[$lv_obj->studiengang_kz].']]></NOTE:studiengang_lv>
|
||||
<NOTE:semester_lv><![CDATA['.$lv_obj->semester.']]></NOTE:semester_lv>
|
||||
<NOTE:ects_lv><![CDATA['.$lv_obj->ects.']]></NOTE:ects_lv>
|
||||
<NOTE:student_semester><![CDATA['.$benutzer->semester.']]></NOTE:student_semester>
|
||||
<NOTE:punkte><![CDATA['.($row->punkte!=''?(float)$row->punkte:'').']]></NOTE:punkte>
|
||||
</RDF:Description>
|
||||
|
||||
+5
-1
@@ -28,8 +28,12 @@
|
||||
{
|
||||
color: green;
|
||||
}
|
||||
.warning
|
||||
{
|
||||
color: #ffa500;;
|
||||
}
|
||||
|
||||
.marked
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2910,6 +2910,39 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht
|
||||
}
|
||||
}
|
||||
|
||||
// View lehre.vw_studienplan erstellen
|
||||
if(!$result = @$db->db_query("SELECT * FROM lehre.vw_studienplan LIMIT 1"))
|
||||
{
|
||||
$qry = "CREATE VIEW lehre.vw_studienplan AS
|
||||
SELECT
|
||||
organisationseinheittyp_kurzbz, oe_kurzbz, studiengang_kz, studienordnung_id, studienplan_id,
|
||||
tbl_studienplan.orgform_kurzbz, tbl_studienplan.version, tbl_studienplan.bezeichnung, regelstudiendauer,
|
||||
tbl_studienplan.sprache, tbl_studienplan.aktiv, semesterwochen, tbl_studienplan.testtool_sprachwahl,
|
||||
tbl_studienplan.insertamum, tbl_studienplan.insertvon, tbl_studienplan.updateamum, tbl_studienplan.updatevon,
|
||||
gueltigvon, gueltigbis, ects, studiengangbezeichnung, studiengangbezeichnung_englisch, studiengangkurzbzlang,
|
||||
akadgrad_id, kurzbz, kurzbzlang, typ, english, farbe, email, telefon, max_semester, max_verband, max_gruppe,
|
||||
erhalter_kz, bescheid, bescheidbgbl1, bescheidbgbl2, bescheidgz, bescheidvom, titelbescheidvom, zusatzinfo_html,
|
||||
moodle, studienplaetze, lgartcode, mischform, projektarbeit_note_anzeige, onlinebewerbung, oe_parent_kurzbz,
|
||||
mailverteiler, freigabegrenze, kurzzeichen, lehre, beschreibung, studienordnung_semester_id, studiensemester_kurzbz,
|
||||
semester
|
||||
FROM
|
||||
lehre.tbl_studienplan
|
||||
JOIN lehre.tbl_studienordnung USING (studienordnung_id)
|
||||
JOIN tbl_studiengang USING (studiengang_kz)
|
||||
JOIN tbl_organisationseinheit USING (oe_kurzbz)
|
||||
JOIN tbl_organisationseinheittyp USING (organisationseinheittyp_kurzbz)
|
||||
JOIN lehre.tbl_studienordnung_semester USING (studienordnung_id);
|
||||
|
||||
GRANT SELECT ON lehre.vw_studienplan TO admin;
|
||||
GRANT SELECT ON lehre.vw_studienplan TO vilesci;
|
||||
GRANT SELECT ON lehre.vw_studienplan TO web;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<br><strong>lehre.vw_studienplan: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>lehre.vw_studienplan: View erstellt';
|
||||
}
|
||||
|
||||
|
||||
echo '<br><br><br>';
|
||||
|
||||
|
||||
@@ -0,0 +1,729 @@
|
||||
<?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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
/*
|
||||
* Prueft die Daten in der Datenbank auf konsistenz und gibt Hinweise
|
||||
* bei fehlerhafter Datenmigration oder Datenmanipulation direkt auf Datenbankebene
|
||||
*/
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if(!$rechte->isBerechtigt('admin'))
|
||||
{
|
||||
die('Sie haben keine Berechtigung fuer diese Seite (admin)');
|
||||
}
|
||||
|
||||
$db = new basis_db();
|
||||
|
||||
$error_kritisch=0;
|
||||
$error_warning=0;
|
||||
|
||||
echo '<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Konsistenzpruefung</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="stylesheet" href="../skin/vilesci.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../skin/fhcomplete.css" type="text/css" />
|
||||
<script type="text/javascript" src="../include/js/jquery1.9.min.js"></script>
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css">
|
||||
</head>
|
||||
<body>';
|
||||
|
||||
/************************************************************************************
|
||||
* Pruefung auf falschen Personenkreislauf
|
||||
* tbl_person->tbl_benutzer->tbl_student->tbl_prestudent->tbl_person
|
||||
*/
|
||||
|
||||
$qry = "SELECT
|
||||
vorname, nachname, tbl_benutzer.uid, tbl_prestudent.prestudent_id,
|
||||
tbl_person.person_id as pers_person_id, tbl_prestudent.person_id pre_person_id
|
||||
FROM
|
||||
public.tbl_person
|
||||
JOIN public.tbl_benutzer USING(person_id)
|
||||
JOIN public.tbl_student ON(uid=student_uid)
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
WHERE
|
||||
tbl_person.person_id<>tbl_prestudent.person_id
|
||||
ORDER BY nachname, vorname, uid";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Inkonsistenter Personenkreislauf tbl_person->tbl_benutzer->tbl_student->tbl_prestudent->tbl_person</h2>';
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
echo '<span class="'.($anzahl>0?'error':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#personenkreislauf\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#personenkreislauf").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table id="personenkreislauf" class="tablesorter" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
<th>PrestudentID</th>
|
||||
<th>tbl_person.person_id</th>
|
||||
<th>tbl_prestudent.person_id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_kritisch++;
|
||||
echo '<tr>
|
||||
<th>'.$db->convert_html_chars($row->nachname).'</th>
|
||||
<th>'.$db->convert_html_chars($row->vorname).'</th>
|
||||
<th>'.$db->convert_html_chars($row->uid).'</th>
|
||||
<th>'.$db->convert_html_chars($row->prestudent_id).'</th>
|
||||
<th>'.$db->convert_html_chars($row->pers_person_id).'</th>
|
||||
<th>'.$db->convert_html_chars($row->pre_person_id).'</th>
|
||||
</tr>';
|
||||
}
|
||||
echo '</thead></table>';
|
||||
}
|
||||
}
|
||||
flush();
|
||||
|
||||
|
||||
/**************************************************************************************
|
||||
* UIDs ohne Student und ohne Mitarbeiter
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_benutzer.uid, tbl_benutzer.person_id, tbl_person.vorname, tbl_person.nachname
|
||||
FROM
|
||||
public.tbl_benutzer
|
||||
LEFT JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
NOT EXISTS (SELECT 1 FROM public.tbl_student WHERE student_uid=tbl_benutzer.uid)
|
||||
AND NOT EXISTS (SELECT 1 FROM public.tbl_mitarbeiter WHERE mitarbeiter_uid=tbl_benutzer.uid)";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Benutzer ohne Student und ohne Mitarbeiter Eintrag</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#benutzerohnestudent\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#benutzerohnestudent").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="benutzerohnestudent" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
<th>PersonID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->uid).'</td>
|
||||
<td>'.$db->convert_html_chars($row->person_id).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Studentenstatus ohne UID
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
distinct tbl_person.person_id, tbl_person.vorname, tbl_person.nachname, tbl_prestudent.prestudent_id
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
status_kurzbz IN('Student','Absolvent','Diplomand','Incoming')
|
||||
AND NOT EXISTS (SELECT 1 FROM public.tbl_student WHERE prestudent_id=tbl_prestudent.prestudent_id)";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Prestudenten mit Studenten/Absolventen/Diplomanden/Incoming Status aber ohne StudentUID</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'error':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#studentohneuid\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#studentohneuid").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="studentohneuid" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>PrestudentID</th>
|
||||
<th>PersonID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_kritisch++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->prestudent_id).'</td>
|
||||
<td>'.$db->convert_html_chars($row->person_id).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* StgKz von Stunent und Prestudent unterschiedlich
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_prestudent.prestudent_id, tbl_student.student_uid,
|
||||
tbl_student.studiengang_kz as stud_studiengang_kz, tbl_prestudent.studiengang_kz as pre_studiengang_kz
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
tbl_student.studiengang_kz<>tbl_prestudent.studiengang_kz";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Studiengangskennzahl von tbl_student ungleich tbl_prestudent</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'error':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#stgungleich\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#stgungleich").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="stgungleich" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>PrestudentID</th>
|
||||
<th>StudentStgKZ</th>
|
||||
<th>PrestudentStgKZ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_kritisch++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->prestudent_id).'</td>
|
||||
<td>'.$db->convert_html_chars($row->stud_studiengang_kz).'</td>
|
||||
<td>'.$db->convert_html_chars($row->pre_studiengang_kz).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Studenten ohne passenden Status
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_prestudent.prestudent_id, tbl_student.student_uid,
|
||||
get_rolle_prestudent(prestudent_id, null) as laststatus
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
NOT EXISTS(SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id AND status_kurzbz in('Student','Incoming','Diplomand','Absolvent'))";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Studenten ohne Status Student/Diplomand/Incoming/Absolvent</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#studentenohnestatus\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#studentenohnestatus").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="studentenohnestatus" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>prestudent_id</th>
|
||||
<th>UID</th>
|
||||
<th>Letzter Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->prestudent_id).'</td>
|
||||
<td>'.$db->convert_html_chars($row->student_uid).'</td>
|
||||
<td>'.$db->convert_html_chars($row->laststatus).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Prestudenten ohne Status
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_prestudent.prestudent_id
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
NOT EXISTS(SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id)";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Prestudenten ohne Status</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#prestudentenohnestatus\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#prestudentenohnestatus").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="prestudentenohnestatus" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>prestudent_id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->prestudent_id).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Studenten ohne Studentlehrverband eintrag
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_student.student_uid
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_benutzer ON(uid=student_uid)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
NOT EXISTS(SELECT 1 FROM public.tbl_studentlehrverband WHERE student_uid=tbl_student.student_uid)";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Studenten ohne Studentlehrverband Eintrag</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#studentlehrverband\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#studentlehrverband").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="studentlehrverband" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->student_uid).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Incoming ohne IO Datensatz
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_student.student_uid
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
NOT EXISTS(SELECT 1 FROM bis.tbl_bisio WHERE student_uid=tbl_student.student_uid)
|
||||
AND EXISTS(SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_student.prestudent_id AND status_kurzbz='Incoming')";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Incoming ohne IO-Datensatz</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#incomingohneio\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#incomingohneio").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="incomingohneio" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->student_uid).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Personenkennzeichen passt nicht zur Studiengangskennzahl
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_student.student_uid, tbl_student.matrikelnr, tbl_student.studiengang_kz
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
tbl_student.studiengang_kz<1000 AND tbl_student.studiengang_kz>0
|
||||
AND tbl_student.studiengang_kz::text!=trim(leading '0' from substring(matrikelnr,5,3))";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Personenkennzeichen passt nicht zum Studiengang</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#perskzstg\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#perskzstg").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="perskzstg" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
<th>Personenkennzeichen</th>
|
||||
<th>StudiengangKZ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->student_uid).'</td>
|
||||
<td>'.$db->convert_html_chars($row->matrikelnr).'</td>
|
||||
<td>'.$db->convert_html_chars($row->studiengang_kz).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Absolventen ohne Abschlusspruefung
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_student.student_uid
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
tbl_student.studiengang_kz<1000 AND tbl_student.studiengang_kz>0
|
||||
AND EXISTS (SELECT 1 FROM public.tbl_prestudentstatus WHERE status_kurzbz='Absolvent' AND prestudent_id=tbl_student.prestudent_id)
|
||||
AND NOT EXISTS(SELECT 1 FROM lehre.tbl_abschlusspruefung WHERE student_uid=tbl_student.student_uid)";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Absolventen ohne Abschlusspruefung</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#absolventohnepruefung\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#absolventohnepruefung").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="absolventohnepruefung" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->student_uid).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* Studenten mit mind. 2 Stati ohne Noten
|
||||
*
|
||||
*/
|
||||
$qry = "SELECT
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_student.student_uid
|
||||
FROM
|
||||
public.tbl_student
|
||||
JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
tbl_student.studiengang_kz<1000 AND tbl_student.studiengang_kz>0
|
||||
AND 1<(SELECT count(*) FROM public.tbl_prestudentstatus WHERE status_kurzbz='Student' AND prestudent_id=tbl_student.prestudent_id)
|
||||
AND NOT EXISTS(SELECT 1 FROM lehre.tbl_zeugnisnote WHERE student_uid=tbl_student.student_uid)";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
echo '<h2>Studenten mit mind. 2 Studentenstati aber ohne Noten</h2>';
|
||||
|
||||
$anzahl = $db->db_num_rows($result);
|
||||
|
||||
echo '<span class="'.($anzahl>0?'warning':'ok').'">'.$anzahl.' Probleme gefunden</span>';
|
||||
|
||||
if($anzahl>0)
|
||||
{
|
||||
echo '<br><a href="#Anzeigen" onclick="$(\'#studentohnenoten\').toggle(); return false;">Anzeigen >></a>';
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#studentohnenoten").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<table class="tablesorter" id="studentohnenoten" style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$error_warning++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$db->convert_html_chars($row->nachname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->vorname).'</td>
|
||||
<td>'.$db->convert_html_chars($row->student_uid).'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
// ************************************************************************************
|
||||
echo '<hr>';
|
||||
echo '<br>Kritische Fehler: '.($error_kritisch>0?'<span class="error">':'<span class="ok">').$error_kritisch.'</span>';
|
||||
echo '<br>Warnungen: '.($error_warning>0?'<span class="warning">':'<span class="ok">').$error_warning.'</span>';
|
||||
echo '<br><br><br><br><br><br><br><br></body></html>';
|
||||
?>
|
||||
@@ -479,7 +479,7 @@
|
||||
<link rel="stylesheet" href="../../skin/colorpicker.css" type="text/css"/>
|
||||
<script type="text/javascript" src="../../include/js/mailcheck.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/datecheck.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/jquery1.9.min.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/colorpicker.js"></script>
|
||||
<script>
|
||||
function copyToLehreVz()
|
||||
|
||||
Reference in New Issue
Block a user