From 684c395ad8d3cf1acea97804ee3e3520aed53a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Thu, 27 Nov 2008 15:18:59 +0000 Subject: [PATCH] Statistiken ins FAS integriert --- content/fas.xul.php | 29 ++++- content/fasoverlay.js.php | 40 +++++++ content/statistik/absolventenstatistik.php | 10 +- content/statistik/koordinatorstunden.php | 6 +- content/statistik/lektorenstatistik.php | 6 +- content/statistik/mitarbeiterstatistik.php | 121 +++++++++++++++++++++ content/statistik/studentenstatistik.php | 10 +- locale/de-AT/fas.dtd | 16 +++ 8 files changed, 233 insertions(+), 5 deletions(-) create mode 100644 content/statistik/mitarbeiterstatistik.php diff --git a/content/fas.xul.php b/content/fas.xul.php index 6800e7b9e..cb1de0384 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -95,6 +95,10 @@ echo ''; + + + + @@ -353,7 +357,30 @@ echo ''; label = "&menu-statistic-abgaengerstatistik.label;" command = "menu-statistic-abgaengerstatistik:command" accesskey = "&menu-statistic-abgaengerstatistik.accesskey;"/> - + + + + diff --git a/content/fasoverlay.js.php b/content/fasoverlay.js.php index e80470778..917e17750 100644 --- a/content/fasoverlay.js.php +++ b/content/fasoverlay.js.php @@ -955,6 +955,46 @@ function StatistikPrintAbgaengerstatistik() window.open('content/statistik/abgaengerstatistik.php?stsem='+stsem,'Abgaengerstatistik'); } +// **** +// * Liefert eine statistik ueber die Anzahl der Absolventen pro Studiengang +// **** +function StatistikPrintAbsolventenstatistik() +{ + var stsem = getStudiensemester(); + + window.open('content/statistik/absolventenstatistik.php?stsem='+stsem,'Absolventenstatistik'); +} + +// **** +// * Liefert eine statistik ueber die Anzahl und Verteilung der Studenten auf die Studiengaenge +// **** +function StatistikPrintStudentenstatistik() +{ + var stsem = getStudiensemester(); + + window.open('content/statistik/studentenstatistik.php?stsem='+stsem,'Studentenstatistik'); +} + +// **** +// * Liefert eine statistik ueber die Lektorenverteilung auf die Institute +// **** +function StatistikPrintLektorenstatistik() +{ + var stsem = getStudiensemester(); + + window.open('content/statistik/lektorenstatistik.php?stsem='+stsem,'Lektorenstatistik'); +} + +// **** +// * Liefert eine statistik ueber die Institutszuordnungen und Aufteilung auf intern/extern +// **** +function StatistikPrintMitarbeiterstatistik() +{ + var stsem = getStudiensemester(); + + window.open('content/statistik/mitarbeiterstatistik.php?stsem='+stsem,'Mitarbeiterstatistik'); +} + // **** // * Zeigt HTML Seite zur Bearbeitung der Reihungstests an // **** diff --git a/content/statistik/absolventenstatistik.php b/content/statistik/absolventenstatistik.php index 32aec1845..26bd8e3af 100644 --- a/content/statistik/absolventenstatistik.php +++ b/content/statistik/absolventenstatistik.php @@ -19,7 +19,15 @@ * Andreas Oesterreicher and * Rudolf Hangl . */ - +/* + * Erstellt eine Liste mit den Absolventen eines Studiensemesters + * Aufteilung in + * - Anzahl Gesamt + * - Prozent Anteil + * - Vollzeit/Berufsbegleitend + * - Geschlecht + * - Herkunft (AT/EU/Nicht EU) + */ require_once('../../vilesci/config.inc.php'); require_once('../../include/studiensemester.class.php'); require_once('../../include/benutzerberechtigung.class.php'); diff --git a/content/statistik/koordinatorstunden.php b/content/statistik/koordinatorstunden.php index 0c551c6a4..4551c0292 100644 --- a/content/statistik/koordinatorstunden.php +++ b/content/statistik/koordinatorstunden.php @@ -19,6 +19,10 @@ * Andreas Oesterreicher and * Rudolf Hangl . */ +/* + * Erstellt eine Liste der Koordinatoren eines Instituts und der Anzahl der Stunden + * die er in den jeweiligen Studiengaengen unterrichtet + */ require_once('../../vilesci/config.inc.php'); require_once('../../include/functions.inc.php'); require_once('../../include/studiengang.class.php'); @@ -27,7 +31,7 @@ echo ' Koordinatorstunden - + '; // Datenbank Verbindung diff --git a/content/statistik/lektorenstatistik.php b/content/statistik/lektorenstatistik.php index bac0121a2..646336a7a 100644 --- a/content/statistik/lektorenstatistik.php +++ b/content/statistik/lektorenstatistik.php @@ -19,7 +19,11 @@ * Andreas Oesterreicher and * Rudolf Hangl . */ - +/* + * Erstellt eine Tablle mit der Anzahl der Lektoren die im angegebenen + * StudienJAHR einen Lehrauftrag im jeweiligen Institut haben, getrennt nach Fixangestellten und Freien + * und der Anzahl der Stunden die in diesem Institut gehalten wurden + */ require_once('../../vilesci/config.inc.php'); require_once('../../include/studiensemester.class.php'); require_once('../../include/benutzerberechtigung.class.php'); diff --git a/content/statistik/mitarbeiterstatistik.php b/content/statistik/mitarbeiterstatistik.php new file mode 100644 index 000000000..78dd91f11 --- /dev/null +++ b/content/statistik/mitarbeiterstatistik.php @@ -0,0 +1,121 @@ +, + * Andreas Oesterreicher and + * Rudolf Hangl . + */ +/* + * Generiert eine Liste mit den Institutszuordnungen der Mitarbeiter + * und einer aufschluesselung ob diese Fixangestellt sind + */ +require_once('../../vilesci/config.inc.php'); +require_once('../../include/studiensemester.class.php'); +require_once('../../include/benutzerberechtigung.class.php'); +require_once('../../include/functions.inc.php'); + +if(!$conn = pg_pconnect(CONN_STRING)) + die('Fehler beim Connecten zur DB'); + +echo ' + + + + + + + + '; + + + echo "

Mitarbeiterstatistik"; + echo ''.date('d.m.Y').'


'; + echo ''; + + echo '

'; + + echo " + + + + + + + + + + + + + + "; + //Bachelor + $qry = "SELECT + bezeichnung, + (SELECT count(*) FROM (SELECT distinct uid FROM public.tbl_benutzerfunktion JOIN campus.vw_mitarbeiter USING(uid) WHERE fachbereich_kurzbz=a.fachbereich_kurzbz AND fixangestellt AND funktion_kurzbz='Institut' AND aktiv) a) as fix, + (SELECT count(*) FROM (SELECT distinct uid FROM public.tbl_benutzerfunktion JOIN campus.vw_mitarbeiter USING(uid) WHERE fachbereich_kurzbz=a.fachbereich_kurzbz AND NOT fixangestellt AND funktion_kurzbz='Institut' AND aktiv) a) as extern + FROM public.tbl_fachbereich a WHERE aktiv ORDER BY bezeichnung"; + + if($result = pg_query($conn, $qry)) + { + + $gesamt_fix=0; + $gesamt_extern=0; + + while($row = pg_fetch_object($result)) + { + if($row->fix==0 && $row->extern==0) + { + continue; + } + echo ''; + echo ""; + echo ""; + echo ""; + echo ""; + $gesamt_fix+=$row->fix; + $gesamt_extern+=$row->extern; + } + + $qry = "SELECT + (SELECT count(*) FROM campus.vw_mitarbeiter WHERE uid NOT in(SELECT uid FROM public.tbl_benutzerfunktion WHERE funktion_kurzbz='Institut') AND aktiv AND fixangestellt) as fix, + (SELECT count(*) FROM campus.vw_mitarbeiter WHERE uid NOT in(SELECT uid FROM public.tbl_benutzerfunktion WHERE funktion_kurzbz='Institut') AND aktiv AND NOT fixangestellt) as extern + "; + if($result = pg_query($conn, $qry)) + { + if($row = pg_fetch_object($result)) + { + echo ''; + echo ""; + echo ""; + echo ""; + echo ""; + $gesamt_fix += $row->fix; + $gesamt_extern += $row->extern; + } + } + echo ''; + echo ''; + echo ""; + echo ""; + echo ""; + + } + echo '
Anzahl
Institutefixextern
$row->bezeichnung$row->fix$row->extern
Nicht zugeordnet$row->fix$row->extern
SUMME$gesamt_fix$gesamt_extern
'; +?> + + \ No newline at end of file diff --git a/content/statistik/studentenstatistik.php b/content/statistik/studentenstatistik.php index a76c6559d..f1009d41b 100644 --- a/content/statistik/studentenstatistik.php +++ b/content/statistik/studentenstatistik.php @@ -19,7 +19,15 @@ * Andreas Oesterreicher and * Rudolf Hangl . */ - +/* + * Erstellt eine Liste der Studenten eines Studiensemesters + * Aufteilung in + * - Anzahl Gesamt + * - Prozent Anteil + * - Vollzeit/Berufsbegleitend + * - Geschlecht + * - Herkunft (AT/EU/Nicht EU) + */ require_once('../../vilesci/config.inc.php'); require_once('../../include/studiensemester.class.php'); require_once('../../include/benutzerberechtigung.class.php'); diff --git a/locale/de-AT/fas.dtd b/locale/de-AT/fas.dtd index ecab32402..27b980c71 100644 --- a/locale/de-AT/fas.dtd +++ b/locale/de-AT/fas.dtd @@ -132,6 +132,22 @@ + + + + + + + + + + + + + + + +