diff --git a/cis/private/lehre/lesson.php b/cis/private/lehre/lesson.php index 67a2bee99..8c1634585 100644 --- a/cis/private/lehre/lesson.php +++ b/cis/private/lehre/lesson.php @@ -312,13 +312,66 @@
'; if($is_lector) { //Anwesenheitsliste - echo '
'; - echo "Anwesenheits- und Notenlisten"; + + echo "Anwesenheits- und Notenlisten
"; } - + + //Leistungsuebersicht + $dest_dir = @dir('../../../documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name).'/leistung'); + + if(!@is_dir($dest_dir->path)) + { + if(!is_dir('../../../documents/'.strtolower($kurzbz))) + { + @exec('mkdir -m 775 "../../../documents/'.strtolower($kurzbz).'"'); + exec('sudo chown www-data:teacher "'.$GLOBALS["DOCUMENT_ROOT"].'/documents/'.strtolower($kurzbz).'"'); + } + if(!is_dir('../../../documents/'.strtolower($kurzbz).'/'.$term_id)) + { + @exec('mkdir -m 775 "../../../documents/'.strtolower($kurzbz).'/'.$term_id.'"'); + exec('sudo chown www-data:teacher "'.$GLOBALS["DOCUMENT_ROOT"].'/documents/'.strtolower($kurzbz).'/'.$term_id.'"'); + } + if(!is_dir('../../../documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name))) + { + @exec('mkdir -m 775 "../../../documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name).'"'); + exec('sudo chown www-data:teacher "'.$GLOBALS["DOCUMENT_ROOT"].'/documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name).'"'); + } + if(!is_dir('../../../documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name).'/leistung')) + { + @exec('mkdir -m 775 "../../../documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name).'/leistung"'); + exec('sudo chown www-data:teacher "'.$GLOBALS["DOCUMENT_ROOT"].'/documents/'.strtolower($kurzbz).'/'.$term_id.'/'.strtolower($short_short_name).'/leistung"'); + } + } + + if($dest_dir) + { + $dir_empty = true; + + while($entry = $dest_dir->read()) + { + if($entry != "." && $entry != "..") + { + $dir_empty = false; + + break; + } + } + } + + if(isset($dest_dir) && isset($dir_empty) && $dir_empty == false) + { + echo ''; + echo 'Leistungsübersicht'; + echo ''; + } + else + { + echo 'Leistungsübersicht'; + } ?>

 

diff --git a/cis/private/lehre/pinboard.php b/cis/private/lehre/pinboard.php index c6f9fabe5..3d8ed14dd 100644 --- a/cis/private/lehre/pinboard.php +++ b/cis/private/lehre/pinboard.php @@ -404,7 +404,7 @@ read()) + + } + $dest_dir = @dir($path); + while($entry = $dest_dir->read()) + { + if($entry != "." && $entry != "..") { - if($entry != "." && $entry != "..") - { - $dir_empty = false; - - break; - } + $dir_empty = false; + break; } } diff --git a/cis/public/linkliste.html b/cis/public/linkliste.html index 027bc2d08..bc48c328a 100644 --- a/cis/public/linkliste.html +++ b/cis/public/linkliste.html @@ -68,7 +68,7 @@ www.alpbach.org/Deutsch/Stipendien.htm   - + @@ -112,7 +112,7 @@ Mandrake - www.postgresql.org + www.postgresql.org PostgreSQL diff --git a/content/excel.php b/content/excel.php index aee708e92..eaa524baa 100644 --- a/content/excel.php +++ b/content/excel.php @@ -9,6 +9,7 @@ include('../vilesci/config.inc.php'); +include_once('../include/functions.inc.php'); include_once('../include/fas/functions.inc.php'); include_once('../include/fas/person.class.php'); include_once('../include/fas/mitarbeiter.class.php'); @@ -23,12 +24,18 @@ include_once('../include/Excel/PPS.php'); include_once('../include/Excel/Root.php'); include_once('../include/Excel/File.php'); include_once('../include/Excel/Writer.php'); +include_once('../include/fas/benutzer.class.php'); // Datenbank Verbindung if (!$conn = @pg_pconnect(CONN_STRING_FAS)) $error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!'; +if (!$conn_vilesci = @pg_pconnect(CONN_STRING)) + $error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!'; + +$user = get_uid(); + //Parameter holen if (isset($_GET['mitarbeiter_id'])) $mitarbeiter_id = $_GET['mitarbeiter_id']; @@ -81,7 +88,8 @@ while (isset($_GET[$varname])) $varname='spalte'.(string)$anzSpalten; } $zustelladresse=true; - +$benutzer = new benutzer($conn_vilesci); +$benutzer->loadVariables($user); // Mitarbeiter holen $mitarbeiterDAO=new mitarbeiter($conn); $mitarbeiterDAO->getMitarbeiter($mitarbeiter_id, $fix, $stgl, $fbl, $aktiv, $karenziert, $ausgeschieden, $zustelladresse,getStudiensemesterIdFromName($conn, $benutzer->variable->semester_aktuell)); diff --git a/include/fas/person.class.php b/include/fas/person.class.php index 2d353c7e3..ad1596e21 100644 --- a/include/fas/person.class.php +++ b/include/fas/person.class.php @@ -576,7 +576,7 @@ class person if(pg_query($qry)) { //Log schreiben - $sql .= $qry; + $sql = $qry; $qry = "SELECT nextval('log_seq') as id;"; if(!$row = pg_fetch_object(pg_query($this->conn, $qry))) {