diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d712a143..fe2a855d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,7 +119,7 @@ - **[DEPRECATED]** Spalte ort_kurzbz in tbl_reihungstest wird nicht mehr verwendet und in zukünftigen Versionen entfernt Zum Update auf diese Version folgen Sie den Anweisungen auf folgender Seite: -http://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=fh-complete:codeigniter +https://wiki.fhcomplete.org/doku.php?id=fh-complete:codeigniter ## [3.1.0] - 2015-11-12 ### Added diff --git a/README.md b/README.md index c4b24c64d..d5620010a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # FH-Complete -* [FH-Complete Homepage](http://www.fhcomplete.org) -* [Wiki](http://fhcomplete.technikum-wien.at/dokuwiki/) +* [FH-Complete Homepage](https://www.fhcomplete.org) +* [Wiki](https://wiki.fhcomplete.org/) * [Changelog](CHANGELOG.md) diff --git a/application/models/education/Lehreinheitgruppe_model.php b/application/models/education/Lehreinheitgruppe_model.php index 796ae574b..2a6f9571a 100644 --- a/application/models/education/Lehreinheitgruppe_model.php +++ b/application/models/education/Lehreinheitgruppe_model.php @@ -98,8 +98,8 @@ class Lehreinheitgruppe_model extends DB_Model 'semester' => $lvadata->semester, 'bezeichnung' => $bezeichnung, 'aktiv' => true, - 'mailgrp' => false, - 'sichtbar' => true, + 'mailgrp' => true, + 'sichtbar' => false, 'generiert' => false, 'insertamum' => date('Y-m-d H:i:s'), 'insertvon' => $loggedInUser, diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php index 9248b241d..9878ab5be 100644 --- a/application/models/organisation/Studiensemester_model.php +++ b/application/models/organisation/Studiensemester_model.php @@ -61,7 +61,7 @@ class Studiensemester_model extends DB_Model start, ende FROM public.tbl_studiensemester - WHERE start > ( + WHERE start >= ( SELECT ende FROM public.tbl_studiensemester WHERE studiensemester_kurzbz = ? @@ -72,6 +72,26 @@ class Studiensemester_model extends DB_Model return $this->execQuery($query, array($studiensemester_kurzbz)); } + /** + * getPreviousFrom + */ + public function getPreviousFrom($studiensemester_kurzbz) + { + $query = 'SELECT studiensemester_kurzbz, + start, + ende + FROM public.tbl_studiensemester + WHERE ende <= ( + SELECT start + FROM public.tbl_studiensemester + WHERE studiensemester_kurzbz = ? + ) + ORDER BY start DESC + LIMIT 1'; + + return $this->execQuery($query, array($studiensemester_kurzbz)); + } + /** * getNearest */ diff --git a/application/views/home.php b/application/views/home.php index d00b98f81..79669dd88 100644 --- a/application/views/home.php +++ b/application/views/home.php @@ -3,6 +3,7 @@ $this->load->view('templates/FHC-Header', array( 'title' => 'FH-Complete', 'jquery' => true, + 'jqueryui' => true, 'bootstrap' => true, 'fontawesome' => true, 'sbadmintemplate' => true, diff --git a/cis/infoterminal/index.php b/cis/infoterminal/index.php index 1a913c421..d11ce070b 100644 --- a/cis/infoterminal/index.php +++ b/cis/infoterminal/index.php @@ -20,6 +20,8 @@ * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > */ +session_start(); + require_once('../../config/cis.config.inc.php'); require_once('../../include/wochenplan.class.php'); require_once('../../include/benutzerberechtigung.class.php'); diff --git a/cis/private/bildupload.php b/cis/private/bildupload.php index 968f67ab0..b8ce66422 100644 --- a/cis/private/bildupload.php +++ b/cis/private/bildupload.php @@ -23,8 +23,6 @@ */ // Oberflaeche zum Upload von Bildern - -//session_cache_limiter('none'); //muss gesetzt werden damit der upload in chrome und das automatische updaten des profilbildes funktioniert require_once('../../config/cis.config.inc.php'); require_once('../../include/functions.inc.php'); require_once('../../include/person.class.php'); @@ -32,67 +30,52 @@ require_once('../../include/benutzer.class.php'); require_once('../../include/akte.class.php'); require_once('../../include/phrasen.class.php'); require_once('../../include/fotostatus.class.php'); - $user = get_uid(); $sprache = getSprache(); $p = new phrasen($sprache); - echo ' + - - '. - cropCss().' - - - - - - - - - + + '.$p->t('profil/Bildupload').' +

'.$p->t('profil/Bildupload').'

'; - function resize($filename, $width, $height) { - $ext = explode('.',$_FILES['bild']['name']); - $ext = strtolower($ext[count($ext)-1]); + $ext = explode('.',$_FILES['bild']['name']); + $ext = strtolower($ext[count($ext)-1]); + // Hoehe und Breite neu berechnen + list($width_orig, $height_orig) = getimagesize($filename); + if ($width && ($width_orig < $height_orig)) + { + $width = ($height / $height_orig) * $width_orig; + } + else + { + $height = ($width / $width_orig) * $height_orig; + } - // Hoehe und Breite neu berechnen - list($width_orig, $height_orig) = getimagesize($filename); + $image_p = imagecreatetruecolor($width, $height); - if ($width && ($width_orig < $height_orig)) - { - $width = ($height / $height_orig) * $width_orig; - } - else - { - $height = ($width / $width_orig) * $height_orig; - } + $image = imagecreatefromjpeg($filename); - $image_p = imagecreatetruecolor($width, $height); + //Bild nur verkleinern aber nicht vergroessern + if($width_orig>$width || $height_orig>$height) + imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); + else + $image_p = $image; - $image = imagecreatefromjpeg($filename); + imagejpeg($image_p, $filename, 80); - //Bild nur verkleinern aber nicht vergroessern - if($width_orig>$width || $height_orig>$height) - imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); - else - $image_p = $image; - - imagejpeg($image_p, $filename, 80); - - @imagedestroy($image_p); - @imagedestroy($image); + @imagedestroy($image_p); + @imagedestroy($image); } - - if(isset($_GET['person_id'])) { $benutzer = new benutzer(); @@ -107,269 +90,132 @@ if(isset($_GET['person_id'])) } else die($p->t('global/fehlerBeiDerParameteruebergabe')); +//Bei Upload des Bildes +if(isset($_POST['submitbild'])) +{ + if(isset($_FILES['bild']['tmp_name'])) + { + //Extension herausfiltern + $ext = explode('.',$_FILES['bild']['name']); + $ext = mb_strtolower($ext[count($ext)-1]); + $width=101; + $height=130; -echo '
'; -echo $p->t('profil/BilduploadInfotext',array($p->t('dms_link/bildRichtlinien'))).'

'; -echo '
- '.$p->t('profil/fotoAuswählen').' -
- -
- - '; + //--check that it's a jpeg + if ($ext=='jpg' || $ext=='jpeg') + { + $filename = $_FILES['bild']['tmp_name']; -if (isset($_POST['src'])) { - $src = $_POST['src']; - echo $src; + //groesse auf maximal 827x1063 begrenzen + resize($filename, 827, 1063); + + $fp = fopen($filename,'r'); + //auslesen + $content = fread($fp, filesize($filename)); + fclose($fp); + + $akte = new akte(); + + if($akte->getAkten($_GET['person_id'], 'Lichtbil')) + { + if(count($akte->result)>0) + { + $akte = $akte->result[0]; + $akte->new = false; + } + else + $akte->new = true; + } + else + { + $akte->new = true; + } + + $akte->dokument_kurzbz = 'Lichtbil'; + $akte->person_id = $_GET['person_id']; + $akte->inhalt = base64_encode($content); + $akte->mimetype = "image/jpg"; + $akte->erstelltam = date('Y-m-d H:i:s'); + $akte->gedruckt = false; + $akte->titel = "Lichtbild_".$_GET['person_id'].".jpg"; + $akte->bezeichnung = "Lichtbild gross"; + $akte->updateamum = date('Y-m-d H:i:s'); + $akte->updatevon = $user; + $akte->insertamum = date('Y-m-d H:i:s'); + $akte->insertvon = $user; + $akte->uid = ''; + + if(!$akte->save()) + { + echo '
Fehler: '.$akte->errormsg.'
'; + } + + //groesse auf maximal 101x130 begrenzen + resize($filename, 101, 130); + + //in DB speichern + //File oeffnen + $fp = fopen($filename,'r'); + //auslesen + $content = fread($fp, filesize($filename)); + fclose($fp); + //in base64-Werte umrechnen + $content = base64_encode($content); + $person = new person(); + if($person->load($_GET['person_id'])) + { + //base64 Wert in die Datenbank speichern + $person->foto = $content; + $person->new = false; + if($person->save()) + { + $fs = new fotostatus(); + $fs->person_id=$person->person_id; + $fs->fotostatus_kurzbz='hochgeladen'; + $fs->datum = date('Y-m-d'); + $fs->insertamum = date('Y-m-d H:i:s'); + $fs->insertvon = $user; + $fs->updateamum = date('Y-m-d H:i:s'); + $fs->updatevon = $user; + if(!$fs->save(true)) + echo '
Fehler beim Setzen des Bildstatus
'; + else + { + + echo "
Bild wurde erfolgreich gespeichert
+ "; + } + } + else + echo '
'.$person->errormsg.'
'; + } + else + echo '
'.$person->errormsg.'
'; + } + else + echo '
'.$p->t('profil/nurJPGBilder').'
'; + } } -function cropCss() { - return ' - '; -} +//echo '
'; +echo $p->t('profil/BilduploadInfotext',array($p->t('dms_link/bildRichtlinien'))).'

+
+ '.$p->t('profil/Bild').':
+ +
+ '; ?> +
diff --git a/cis/private/lehre/pruefung/pruefung.js.php b/cis/private/lehre/pruefung/pruefung.js.php index 70c410cde..5662898d9 100644 --- a/cis/private/lehre/pruefung/pruefung.js.php +++ b/cis/private/lehre/pruefung/pruefung.js.php @@ -791,6 +791,8 @@ function writeAnmeldungen(data) var liste = "