diff --git a/.gitignore b/.gitignore index def2813f7..cf35d4eea 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ tests/codeception/tests/unit.suite.yml bin /application/logs/ /sparks/* +/webdav/google.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f10fa9d1..d359ea3de 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## [Unreleased] ### Added +- **[FAS]** Studierendensuche erweitert für leichteres auffinden von Personen mit Sonderzeichen;Suche nach EMail (#email),Telefon(#tel) +- **[FAS]** Die Anzahl der angezeigten Studiensemester im Menübaum ist pro User konfigurierbar +- **[CIS]** Im Coodle können nun auch Gruppen zu Umfragen hinzugefügt werden. - **[CIS]** Reservierungen im Stundenplan prüft nun die Verfügbarkeit des Raums im Stundenplandev - **[FAS]** Projektarbeiten können als Final markiert werden - **[FAS]** Verwaltung von Rechnungsadressen @@ -12,6 +15,9 @@ ### CHANGED - **[CORE]** Berechtigungsprüfung wurde angepasst damit deaktiverte Benutzer keine Berechtigungen mehr haben +### Updateinfo +- **[CORE]** Infoscreen wurde umbenannt (informationsbildschirm.php) + ## [3.2] ### Added diff --git a/application/controllers/api/v1/crm/Prestudent.php b/application/controllers/api/v1/crm/Prestudent.php index 6ee24463a..5d5ff063b 100644 --- a/application/controllers/api/v1/crm/Prestudent.php +++ b/application/controllers/api/v1/crm/Prestudent.php @@ -34,11 +34,11 @@ class Prestudent extends APIv1_Controller public function getPrestudent() { $prestudentID = $this->get('prestudent_id'); - + if (isset($prestudentID)) { $result = $this->PrestudentModel->load($prestudentID); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -46,18 +46,18 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function getPrestudentByPersonID() { $person_id = $this->get('person_id'); - + if (isset($person_id)) { $result = $this->PrestudentModel->load(array('person_id' => $person_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -65,7 +65,7 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -73,14 +73,14 @@ class Prestudent extends APIv1_Controller { $prestudent_id = $this->get('prestudent_id'); $titel = $this->get('titel'); - + if (isset($prestudent_id) && isset($titel)) { // Loads model Notiz_model $this->load->model('person/Notiz_model', 'NotizModel'); - + $result = $this->NotizModel->getSpecialization($prestudent_id, $titel); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -88,7 +88,7 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -98,7 +98,7 @@ class Prestudent extends APIv1_Controller $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); $studiengang_kz = $this->get('studiengang_kz'); $status_kurzbz = $this->get('status_kurzbz'); - + if (isset($person_id)) { $result = $this->PrestudentModel->getLastStatuses( @@ -107,7 +107,7 @@ class Prestudent extends APIv1_Controller $studiengang_kz, $status_kurzbz ); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -115,21 +115,56 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + + /** + * Get all Persons with a Status in the define Timerange + * Additionally ALL Prestudents of this person are included. + * (Not only the ones with the status) + * + * @return void + */ + public function getPrestudentsPerStatus() + { + $this->load->model('person/person_model', 'PersonModel'); + $status_kurzbz = $this->get('status_kurzbz'); + $von = $this->get('von'); + $bis = $this->get('bis'); + + if (isset($status_kurzbz) && isset($von) && isset($bis)) + { + $result = $this->PersonModel->getPersonFromStatus( + $status_kurzbz, + $von, + $bis + ); + + // Remove person images from result array to reduce useless traffic + foreach($result->retval as $key=>$val) + { + unset($result->retval[$key]->foto); + } + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + /** * @return void */ public function postRmSpecialization() { $notiz_id = $this->post()['notiz_id']; - + if (isset($notiz_id)) { // Loads model Notiz_model $this->load->model('person/Notiz_model', 'NotizModel'); - + $result = $this->NotizModel->rmSpecialization($notiz_id); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -137,7 +172,7 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -146,14 +181,14 @@ class Prestudent extends APIv1_Controller $prestudent_id = $this->post()['prestudent_id']; $titel = $this->post()['titel']; $text = $this->post()['text']; - + if (isset($prestudent_id) && isset($titel) && isset($text)) { // Loads model Notiz_model $this->load->model('person/Notiz_model', 'NotizModel'); - + $result = $this->NotizModel->addSpecialization($prestudent_id, $titel, $text); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -168,7 +203,7 @@ class Prestudent extends APIv1_Controller public function postPrestudent() { $prestudent = $this->post(); - + if ($this->_validate($this->post())) { if (isset($prestudent['prestudent_id'])) @@ -179,7 +214,7 @@ class Prestudent extends APIv1_Controller { $result = $this->PrestudentModel->insert($prestudent); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -187,7 +222,7 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -196,7 +231,7 @@ class Prestudent extends APIv1_Controller if ($this->_validate($this->delete())) { $result = $this->PrestudentModel->delete($this->delete()['prestudent_id']); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -204,28 +239,28 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function postAddReihungstest() { $ddReihungstest = $this->post(); - + if ($this->_validateReihungstest($ddReihungstest)) { if(isset($ddReihungstest['new']) && $ddReihungstest['new'] == true) { // Remove new parameter to avoid DB insert errors unset($ddReihungstest['new']); - + $result = $this->reihungstestlib->insertPersonReihungstest($ddReihungstest); } else { $result = $this->reihungstestlib->updatePersonReihungstest($ddReihungstest); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -233,18 +268,18 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function postDelReihungstest() { $ddReihungstest = $this->post(); - + if (isset($ddReihungstest['rt_person_id'])) { $result = $this->reihungstestlib->deletePersonReihungstest($ddReihungstest); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -252,19 +287,19 @@ class Prestudent extends APIv1_Controller $this->response(); } } - + private function _validate($prestudent = NULL) { return true; } - + private function _validateReihungstest($ddReihungstest = NULL) { if (!isset($ddReihungstest['person_id']) || !isset($ddReihungstest['rt_id']) || !isset($ddReihungstest['studienplan_id'])) { return false; } - + return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index 93ad9aeb1..814bf0617 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -35,11 +35,11 @@ class Prestudentstatus extends APIv1_Controller $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); $status_kurzbz = $this->get('status_kurzbz'); $prestudent_id = $this->get('prestudent_id'); - + if (isset($ausbildungssemester) && isset($studiensemester_kurzbz) && isset($status_kurzbz) && isset($prestudent_id)) { $result = $this->PrestudentstatusModel->load(array($ausbildungssemester, $studiensemester_kurzbz, $status_kurzbz, $prestudent_id)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -47,7 +47,7 @@ class Prestudentstatus extends APIv1_Controller $this->response(); } } - + /** * @return void */ @@ -56,11 +56,11 @@ class Prestudentstatus extends APIv1_Controller $prestudent_id = $this->get("prestudent_id"); $studiensemester_kurzbz = $this->get("studiensemester_kurzbz"); $status_kurzbz = $this->get("status_kurzbz"); - + if (isset($prestudent_id)) { $result = $this->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz, $status_kurzbz); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -75,14 +75,14 @@ class Prestudentstatus extends APIv1_Controller public function postPrestudentstatus() { $prestudentstatus = $this->post(); - + if ($this->_validate($prestudentstatus)) { if(isset($prestudentstatus['new']) && $prestudentstatus['new'] == true) { // Remove new parameter to avoid DB insert errors unset($prestudentstatus['new']); - + $result = $this->PrestudentstatusModel->insert($prestudentstatus); } else @@ -95,7 +95,7 @@ class Prestudentstatus extends APIv1_Controller $result = $this->PrestudentstatusModel->update($pksArray, $prestudentstatus); } - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -103,14 +103,14 @@ class Prestudentstatus extends APIv1_Controller $this->response(); } } - + /** * @return void */ public function deletePrestudentstatus() { $prestudentstatus = $this->delete(); - + if ($this->_validate($prestudentstatus)) { $pksArray = array($prestudentstatus['ausbildungssemester'], @@ -120,7 +120,7 @@ class Prestudentstatus extends APIv1_Controller ); $result = $this->PrestudentstatusModel->delete($pksArray); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -128,9 +128,34 @@ class Prestudentstatus extends APIv1_Controller $this->response(); } } - + private function _validate($prestudentstatus = null) { return true; } + + /** + * Get list of Status entries of a prestudent according to the filter + * + * @return void + */ + public function getStatusByFilter() + { + $prestudent_id = $this->get("prestudent_id"); + $status_kurzbz = $this->get("status_kurzbz"); + $ausbildungssemester = $this->get("ausbildungssemester"); + $studiensemester_kurzbz = $this->get("studiensemester_kurzbz"); + + if (isset($prestudent_id)) + { + $result = $this->PrestudentstatusModel->getStatusByFilter($prestudent_id, $status_kurzbz, $ausbildungssemester, $studiensemester_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + } diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index ee21dec11..39ad17da5 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -11,7 +11,7 @@ class Prestudent_model extends DB_Model $this->dbTable = 'public.tbl_prestudent'; $this->pk = 'prestudent_id'; } - + /** * @return void */ @@ -24,7 +24,7 @@ class Prestudent_model extends DB_Model return $isEntitled; if (($isEntitled = $this->isEntitled('public.tbl_status', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) return $isEntitled; - + $query = 'SELECT * FROM public.tbl_prestudent p JOIN ( @@ -37,33 +37,33 @@ class Prestudent_model extends DB_Model WHERE ps.ausbildungssemester = 1'; $parametersArray = array($person_id); - + if ($studiensemester_kurzbz != '') { array_push($parametersArray, $studiensemester_kurzbz); $query .= ' AND ps.studiensemester_kurzbz = ?'; } - + if (isset($studiengang_kz)) { array_push($parametersArray, $studiengang_kz); $query .= ' AND p.studiengang_kz = ?'; } - + if ($status_kurzbz != '') { array_push($parametersArray, $status_kurzbz); $query .= ' AND ps.status_kurzbz = ?'; } - + return $this->execQuery($query, $parametersArray); } - + /** - * + * */ public function updateAufnahmegruppe($prestudentIdArray, $aufnahmegruppe) - { + { return $this->execQuery( 'UPDATE public.tbl_prestudent SET aufnahmegruppe_kurzbz = ? @@ -74,7 +74,7 @@ class Prestudent_model extends DB_Model ) ); } - + /** * Returns a list of prestudent with additional information: * - person_id @@ -104,7 +104,7 @@ class Prestudent_model extends DB_Model aufnahmegruppe_kurzbz, SUM(rtp.punkte) AS punkte' ); - + $this->addJoin('public.tbl_person p', 'person_id', 'LEFT'); $this->addJoin( '( @@ -123,39 +123,39 @@ class Prestudent_model extends DB_Model $this->addJoin('lehre.tbl_studienordnung so', 'studienordnung_id'); $this->addJoin('public.tbl_studiengang sg', 'sg.studiengang_kz = so.studiengang_kz'); $this->addJoin('public.tbl_studiengangstyp sgt', 'typ'); - + $this->addJoin('public.tbl_rt_person rtp', 'rtp.person_id = p.person_id AND rtp.studienplan_id = s.studienplan_id', 'LEFT'); - + $this->addOrder('p.person_id', 'ASC'); $this->addOrder('prestudent_id', 'ASC'); - + $parametersArray = array('p.aktiv' => true, 'ps.status_kurzbz' => 'Interessent'); - + if ($studiengang != null) { $parametersArray['public.tbl_prestudent.studiengang_kz'] = $studiengang; } - + if ($studiensemester != null) { $parametersArray['ps.studiensemester_kurzbz'] = $studiensemester; } - + if ($gruppe != null) { $parametersArray['aufnahmegruppe_kurzbz'] = $gruppe; } - + if ($reihungstest != null) { $parametersArray['rtp.rt_id'] = $reihungstest; } - + if ($stufe != null) { $parametersArray['ps.rt_stufe'] = $stufe; } - + $this->addGroupBy( array( 'p.person_id', @@ -174,7 +174,7 @@ class Prestudent_model extends DB_Model 'aufnahmegruppe_kurzbz' ) ); - + return $this->loadWhere($parametersArray); } -} \ No newline at end of file +} diff --git a/application/models/crm/Prestudentstatus_model.php b/application/models/crm/Prestudentstatus_model.php index 48619645b..beb5eb845 100644 --- a/application/models/crm/Prestudentstatus_model.php +++ b/application/models/crm/Prestudentstatus_model.php @@ -12,7 +12,7 @@ class Prestudentstatus_model extends DB_Model $this->pk = array('ausbildungssemester', 'studiensemester_kurzbz', 'status_kurzbz', 'prestudent_id'); $this->hasSequence = false; } - + /** * @return void */ @@ -25,7 +25,7 @@ class Prestudentstatus_model extends DB_Model return $isEntitled; if (($isEntitled = $this->isEntitled('public.tbl_status', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) return $isEntitled; - + $query = 'SELECT tbl_prestudentstatus.*, bezeichnung AS studienplan_bezeichnung, tbl_status.bezeichnung_mehrsprachig @@ -35,7 +35,7 @@ class Prestudentstatus_model extends DB_Model AND prestudent_id = ?'; $parametersArray = array($prestudent_id); - + if ($studiensemester_kurzbz != '') { array_push($parametersArray, $studiensemester_kurzbz); @@ -46,17 +46,17 @@ class Prestudentstatus_model extends DB_Model array_push($parametersArray, $status_kurzbz); $query .= ' AND status_kurzbz = ?'; } - + $query .= ' ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1'; - + return $this->execQuery($query, $parametersArray); } - + /** - * + * */ public function updateStufe($prestudentIdArray, $stufe) - { + { return $this->execQuery( 'UPDATE public.tbl_prestudentstatus SET rt_stufe = ? @@ -68,4 +68,51 @@ class Prestudentstatus_model extends DB_Model ) ); } -} \ No newline at end of file + + /** + * Get all Prestudent status entries according to the given filter + * + * @param prestudent_id ID of the Prestudent. + * @param $status_kurzbz kurzbz of the status. + * @param $ausbildungssemester ausbildungssemester of the status. + * @param $studiensemester_kurzbz studiensemster of the status. + * + * @return result object with all the status entries + */ + public function getStatusByFilter($prestudent_id, $status_kurzbz = '', $ausbildungssemester = '', $studiensemester_kurzbz = '') + { + // Checks if the operation is permitted by the API caller + if (($isEntitled = $this->isEntitled('public.tbl_prestudentstatus', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) + return $isEntitled; + + $query = ' + SELECT + tbl_prestudentstatus.* + FROM + public.tbl_prestudentstatus + WHERE + prestudent_id = ?'; + + $parametersArray = array($prestudent_id); + + if ($studiensemester_kurzbz != '') + { + array_push($parametersArray, $studiensemester_kurzbz); + $query .= ' AND studiensemester_kurzbz = ?'; + } + if ($status_kurzbz != '') + { + array_push($parametersArray, $status_kurzbz); + $query .= ' AND status_kurzbz = ?'; + } + if ($ausbildungssemester != '') + { + array_push($parametersArray, $ausbildungssemester); + $query .= ' AND ausbildungssemester = ?'; + } + + $query .= ' ORDER BY datum DESC, insertamum DESC, ext_id DESC'; + + return $this->execQuery($query, $parametersArray); + } +} diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index 5192cc316..8298c0d1e 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -3,7 +3,7 @@ class Person_model extends DB_Model { /** - * + * */ public function __construct() { @@ -11,16 +11,16 @@ class Person_model extends DB_Model $this->dbTable = 'public.tbl_person'; $this->pk = 'person_id'; } - + public function getPersonKontaktByZugangscode($zugangscode, $email) { $this->addJoin('public.tbl_kontakt', 'person_id'); - + return $this->loadWhere(array('zugangscode' => $zugangscode, 'kontakt' => $email)); } /** - * + * */ public function checkBewerbung($email, $studiensemester_kurzbz = null) { @@ -34,10 +34,10 @@ class Person_model extends DB_Model return $isEntitled; if (($isEntitled = $this->isEntitled('public.tbl_prestudentstatus', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) return $isEntitled; - + $checkBewerbungQuery = ''; $parametersArray = array($email, $email, $email); - + if (is_null($studiensemester_kurzbz)) { $checkBewerbungQuery = 'SELECT DISTINCT p.person_id, p.zugangscode, p.insertamum @@ -60,13 +60,13 @@ class Person_model extends DB_Model AND studiensemester_kurzbz = ? ORDER BY p.insertamum DESC LIMIT 1'; - + array_push($parametersArray, $studiensemester_kurzbz); } - + return $this->execQuery($checkBewerbungQuery, $parametersArray); } - + public function updatePerson($person) { if (isset($person['svnr']) && $person['svnr'] != '') @@ -88,7 +88,46 @@ class Person_model extends DB_Model } } } - + return $this->PersonModel->update($person['person_id'], $person); } -} \ No newline at end of file + + /** + * @return void + */ + public function getPersonFromStatus($status_kurzbz, $von, $bis) + { + // Checks if the operation is permitted by the API caller + if (($isEntitled = $this->isEntitled('public.tbl_prestudent', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) + return $isEntitled; + if (($isEntitled = $this->isEntitled('public.tbl_prestudentstatus', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) + return $isEntitled; + + $this->addJoin('public.tbl_prestudent', 'person_id'); + + $result = $this->loadTree( + 'public.tbl_person', + array( + 'public.tbl_prestudent' + ), + 'EXISTS ( + SELECT + 1 + FROM + public.tbl_prestudentstatus + JOIN public.tbl_prestudent USING(prestudent_id) + WHERE + person_id=tbl_person.person_id + AND status_kurzbz='.$this->escape($status_kurzbz).' + AND datum >= '.$this->escape($von).' + AND datum <= '.$this->escape($bis).' + )', + array( + 'prestudenten' + ) + ); + + return $result; + } + +} diff --git a/cis/infoterminal/infoscreen.php b/cis/infoterminal/informationsbildschirm.php similarity index 92% rename from cis/infoterminal/infoscreen.php rename to cis/infoterminal/informationsbildschirm.php index b776510ea..bd3abbe50 100644 --- a/cis/infoterminal/infoscreen.php +++ b/cis/infoterminal/informationsbildschirm.php @@ -47,7 +47,7 @@ $aktuellerContentIdx=0; //Cookie erhaelt zusaetzlich die IP im Namen damit bei der Preview keine Konflikte entstehen $cookie = 'infoscreenContent'.str_replace('-','',str_replace('.','',$ip)); -//zuletzt angezeigte Seite des Terminals ermitteln +//zuletzt angezeigte Seite des Terminals ermitteln if(isset($_COOKIE[$cookie])) { $lastinfoscreencontent = $_COOKIE[$cookie]; @@ -57,7 +57,7 @@ else $lastinfoscreencontent = -1; $aktuellerContentIdx = 0; } - + if($infoscreen->getInfoscreen($ip)) { $infoscreen_id = $infoscreen->infoscreen_id; @@ -72,14 +72,14 @@ if($infoscreen->getInfoscreen($ip)) { $aktuellerContentIdx=$i+1; } - + } } if($aktuellerContentIdx>$i) $aktuellerContentIdx=0; if(isset($refreshzeiten[$aktuellerContentIdx]) && $refreshzeiten[$aktuellerContentIdx]!='') - $refreshzeit = $refreshzeiten[$aktuellerContentIdx]; + $refreshzeit = $refreshzeiten[$aktuellerContentIdx]; if(isset($infoscreen_content) && isset($infoscreen_content[$aktuellerContentIdx])) { @@ -105,7 +105,7 @@ function initialize() { startit() } - + function scrollwindow() { if (document.all) @@ -134,12 +134,12 @@ function scrollwindow() window.scroll(0,currentpos) } } - + function startit() { setInterval("scrollwindow()",40) } - + window.onload=initialize '; $scroll= " - loadAddons(); foreach($addon_obj->result as $addon) { if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) - echo ''; + { + echo ' + '; + } } // Wenn Seite fertig geladen ist Addons aufrufen echo ' -'; + if(typeof addon !== \'undefined\') + { + for(i in addon) + { + addon[i].init("cis/private/profile/urlaubstool.php", {uid:\''.$uid.'\'}); + } + } + }); + '; ?> - + + Semesterticket-Client @@ -61,16 +61,16 @@ $db = new basis_db(); -Token = $_REQUEST['token']; $obj->Matrikelnummer = $_REQUEST['matrikelnummer']; $obj->Name = $_REQUEST['name']; @@ -78,16 +78,16 @@ if(isset($_REQUEST['submit'])) $obj->Geburtsdatum = $_REQUEST['geburtsdatum']; $obj->Postleitzahl = $_REQUEST['postleitzahl']; $obj->Semesterkuerzel = $_REQUEST['semesterkuerzel']; - + $response = $client->verifyData($obj); //$response = $client->verifyData(array('token'=>$_REQUEST['token'], 'matrikelnummer'=>$_REQUEST['matrikelnummer'], 'name'=>$_REQUEST['name'], 'vorname'=>$_REQUEST['vorname'], 'geburtsdatum'=>$_REQUEST['geburtsdatum'], 'postleitzahl'=>$_REQUEST['postleitzahl'], 'semesterkuerzel'=>$_REQUEST['semesterkuerzel'])); var_dump($response); } - catch(SoapFault $fault) + catch(SoapFault $fault) { echo "SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR; } - + } ?> diff --git a/soap/stip.soap.php b/soap/stip.soap.php index 8ce88298f..f6074a877 100644 --- a/soap/stip.soap.php +++ b/soap/stip.soap.php @@ -17,47 +17,47 @@ * * Authors: Karl Burkhart . */ - + require_once('../config/vilesci.config.inc.php'); -require_once('../config/global.config.inc.php'); +require_once('../config/global.config.inc.php'); require_once('../include/basis_db.class.php'); require_once('../include/prestudent.class.php'); -require_once('../include/student.class.php'); +require_once('../include/student.class.php'); require_once('../include/konto.class.php'); require_once('../include/datum.class.php'); require_once('../include/benutzer.class.php'); -require_once('../include/webservicelog.class.php'); +require_once('../include/webservicelog.class.php'); require_once('../include/mail.class.php'); require_once('../include/abschlusspruefung.class.php'); require_once('../include/note.class.php'); -require_once('stip.class.php'); +require_once('stip.class.php'); ini_set("soap.wsdl_cache_enabled", "0"); -$SOAPServer = new SoapServer(APP_ROOT."/soap/stip.wsdl.php?".microtime()); +$SOAPServer = new SoapServer(APP_ROOT."/soap/stip.wsdl.php?".microtime(true)); $SOAPServer->addFunction("GetStipendienbezieherStip"); $SOAPServer->addFunction("SendStipendienbezieherStipError"); $SOAPServer->handle(); /** - * + * * Funktion nimmt Anfragen entgegen und bearbeitet diese * @param $parameters -> XML SOAP File */ function GetStipendienbezieherStip($parameters) -{ - $anfrageDaten = $parameters->anfrageDaten; - $Stipendiumsbezieher = $anfrageDaten->Stipendiumsbezieher; - - $ErhalterKz = $anfrageDaten->ErhKz; - $AnfrageDatenID = $anfrageDaten->AnfragedatenID; - +{ + $anfrageDaten = $parameters->anfrageDaten; + $Stipendiumsbezieher = $anfrageDaten->Stipendiumsbezieher; + + $ErhalterKz = $anfrageDaten->ErhKz; + $AnfrageDatenID = $anfrageDaten->AnfragedatenID; + // Eintrag in der LogTabelle anlegen - $log = new webservicelog(); - $log->request_data = file_get_contents('php://input'); - $log->webservicetyp_kurzbz = 'stip'; - $log->request_id = $AnfrageDatenID; - $log->beschreibung = "Anfrage von Stip"; + $log = new webservicelog(); + $log->request_data = file_get_contents('php://input'); + $log->webservicetyp_kurzbz = 'stip'; + $log->request_id = $AnfrageDatenID; + $log->beschreibung = "Anfrage von Stip"; $log->save(true); $username = $parameters->userName; @@ -66,17 +66,17 @@ function GetStipendienbezieherStip($parameters) if(!($username==STIP_USER_NAME && $passwort==STIP_USER_PASSWORD)) { // Eintrag in der LogTabelle anlegen - $log = new webservicelog(); + $log = new webservicelog(); $log->request_data = 'SOAP FAULT - Invalid Credentials'; - $log->webservicetyp_kurzbz = 'stip'; - $log->request_id = $AnfrageDatenID; - $log->beschreibung = "Antwort an Stip"; + $log->webservicetyp_kurzbz = 'stip'; + $log->request_id = $AnfrageDatenID; + $log->beschreibung = "Antwort an Stip"; $log->save(true); - return new SoapFault("Server", 'Invalid Credentials'); + return new SoapFault("Server", 'Invalid Credentials'); } - $StipBezieherAntwort = array(); + $StipBezieherAntwort = array(); $i=0; if(!is_array($Stipendiumsbezieher->StipendiumsbezieherAnfrage)) @@ -85,33 +85,33 @@ function GetStipendienbezieherStip($parameters) // läuft alle Anfragedaten durch foreach($Stipendiumsbezieher->StipendiumsbezieherAnfrage as $BezieherStip) { - $prestudentID; - $studentUID; - $studSemester; + $prestudentID; + $studentUID; + $studSemester; $StipBezieher = new stip(); - $datum_obj = new datum(); + $datum_obj = new datum(); if($StipBezieher->validateStipDaten($anfrageDaten->ErhKz, $anfrageDaten->AnfragedatenID, $BezieherStip)) { - $StipBezieher->Semester = $BezieherStip->Semester; - $StipBezieher->Studienjahr = $BezieherStip->Studienjahr; - $StipBezieher->PersKz = $BezieherStip->PersKz; - $StipBezieher->SVNR = $BezieherStip->SVNR; - $StipBezieher->Familienname = $BezieherStip->Familienname; - $StipBezieher->Vorname = $BezieherStip->Vorname; - $StipBezieher->Typ = $BezieherStip->Typ; - + $StipBezieher->Semester = $BezieherStip->Semester; + $StipBezieher->Studienjahr = $BezieherStip->Studienjahr; + $StipBezieher->PersKz = $BezieherStip->PersKz; + $StipBezieher->SVNR = $BezieherStip->SVNR; + $StipBezieher->Familienname = $BezieherStip->Familienname; + $StipBezieher->Vorname = $BezieherStip->Vorname; + $StipBezieher->Typ = $BezieherStip->Typ; + // Studiensemester_kurzbz auslesen if($BezieherStip->Semester == "WS" || $BezieherStip->Semester == "ws") { - $year = mb_substr($BezieherStip->Studienjahr, 0,4); - $studSemester = "WS".$year; + $year = mb_substr($BezieherStip->Studienjahr, 0,4); + $studSemester = "WS".$year; }elseif ($BezieherStip->Semester == "SS" || $BezieherStip->Semester == "ss") { - $year = mb_substr($BezieherStip->Studienjahr, 0,2).mb_substr($BezieherStip->Studienjahr, 5,7); - $studSemester = "SS".$year; + $year = mb_substr($BezieherStip->Studienjahr, 0,2).mb_substr($BezieherStip->Studienjahr, 5,7); + $studSemester = "SS".$year; } - + if(!$prestudentID = $StipBezieher->searchPersonKz($BezieherStip->PersKz)) if(!$prestudentID = $StipBezieher->searchSvnr($BezieherStip->SVNR)) $prestudentID = $StipBezieher->searchVorNachname($BezieherStip->Vorname, $BezieherStip->Familienname); @@ -119,29 +119,29 @@ function GetStipendienbezieherStip($parameters) // Student wurde gefunden if($StipBezieher->AntwortStatusCode == 1) { - $prestudent = new prestudent(); - $prestudent->load($prestudentID); - $prestudent->getLastStatus($prestudentID); + $prestudent = new prestudent(); + $prestudent->load($prestudentID); + $prestudent->getLastStatus($prestudentID); $prestudentStatus = new prestudent(); - $student = new student(); - $studentUID = $student->getUID($prestudentID); + $student = new student(); + $studentUID = $student->getUID($prestudentID); $abschlusspruefung = new abschlusspruefung(); $abschlusspruefung->getLastAbschlusspruefung($studentUID); - - $student->load($studentUID); - $studiengang_kz = $student->studiengang_kz; - - $konto = new konto(); + + $student->load($studentUID); + $studiengang_kz = $student->studiengang_kz; + + $konto = new konto(); $studGebuehr = $konto->getStudiengebuehrGesamt($studentUID, $studSemester, $studiengang_kz); // , als Dezimaltrennzeichen - $studGebuehr = str_replace('.', ',', $studGebuehr); - + $studGebuehr = str_replace('.', ',', $studGebuehr); + // wenn nicht bezahlt if($studGebuehr == "") $studGebuehr = "0,00"; - + if(!$prestudentStatus->getLastStatus($prestudentID,$studSemester)) $StipBezieher->Inskribiert = 'n'; else @@ -150,61 +150,61 @@ function GetStipendienbezieherStip($parameters) if($prestudentStatus->status_kurzbz == 'Interessent') $StipBezieher->Inskribiert = 'n'; else - $StipBezieher->Inskribiert = 'j'; + $StipBezieher->Inskribiert = 'j'; } - + if($BezieherStip->Typ == "as" || $BezieherStip->Typ == "AS") { $StipBezieher->getOrgFormTeilCode($studentUID, $studSemester, $prestudentID); - $StipBezieher->Studienbeitrag = $studGebuehr; - + $StipBezieher->Studienbeitrag = $studGebuehr; + // Wenn letzter Status von Semester Interessent ist -> Semester = null if($prestudentStatus->status_kurzbz != 'Interessent') - $StipBezieher->Ausbildungssemester = $StipBezieher->getSemester($prestudentID, $studSemester); + $StipBezieher->Ausbildungssemester = $StipBezieher->getSemester($prestudentID, $studSemester); else - $StipBezieher->Ausbildungssemester = null; - + $StipBezieher->Ausbildungssemester = null; + $StipBezieher->StudStatusCode = $StipBezieher->getStudStatusCode($prestudentID, $studSemester); - + // Ausgeschieden ohne Abschluss if($StipBezieher->StudStatusCode==4) $StipBezieher->BeendigungsDatum = $datum_obj->formatDatum($prestudent->datum,'dmY'); else if($StipBezieher->StudStatusCode==3) // Absolvent -> letzte Prüfung nehmen $StipBezieher->BeendigungsDatum = $datum_obj->formatDatum($abschlusspruefung->datum,'dmY'); else - $StipBezieher->BeendigungsDatum = null; - + $StipBezieher->BeendigungsDatum = null; + $StipBezieher->Erfolg = $StipBezieher->getErfolg($prestudentID, $studSemester); } elseif($BezieherStip->Typ =="ag" || $BezieherStip->Typ == "AG") { $StipBezieher->Ausbildungssemester = null; - $StipBezieher->StudStatusCode = null; - $StipBezieher->BeendigungsDatum = null; - $StipBezieher->Studienbeitrag = null; - $StipBezieher->OrgFormTeilCode = null; + $StipBezieher->StudStatusCode = null; + $StipBezieher->BeendigungsDatum = null; + $StipBezieher->Studienbeitrag = null; + $StipBezieher->OrgFormTeilCode = null; } - - $StipBezieherAntwort[$i] = $StipBezieher; + + $StipBezieherAntwort[$i] = $StipBezieher; $i++; } else if($StipBezieher->AntwortStatusCode == 2) { // Student wurde nicht gefunden - $StipBezieher->PersKz_Antwort = null; - $StipBezieher->SVNR_Antwort = null; - $StipBezieher->Familienname_Antwort = null; - $StipBezieher->Vorname_Antwort = null; - $StipBezieher->Ausbildungssemester = null; - $StipBezieher->StudStatusCode = null; - $StipBezieher->BeendigungsDatum = null; - $StipBezieher->VonNachPersKz = null; - $StipBezieher->Studienbeitrag = null; - $StipBezieher->Inskribiert = null; - $StipBezieher->Erfolg = null; - $StipBezieher->OrgFormTeilCode = null; - $StipBezieherAntwort[$i] = $StipBezieher; + $StipBezieher->PersKz_Antwort = null; + $StipBezieher->SVNR_Antwort = null; + $StipBezieher->Familienname_Antwort = null; + $StipBezieher->Vorname_Antwort = null; + $StipBezieher->Ausbildungssemester = null; + $StipBezieher->StudStatusCode = null; + $StipBezieher->BeendigungsDatum = null; + $StipBezieher->VonNachPersKz = null; + $StipBezieher->Studienbeitrag = null; + $StipBezieher->Inskribiert = null; + $StipBezieher->Erfolg = null; + $StipBezieher->OrgFormTeilCode = null; + $StipBezieherAntwort[$i] = $StipBezieher; $i++; } @@ -212,46 +212,46 @@ function GetStipendienbezieherStip($parameters) else { // Eintrag in der LogTabelle anlegen - $log = new webservicelog(); + $log = new webservicelog(); $log->request_data = 'SOAP FAULT - ValidationError: '.$StipBezieher->errormsg; - $log->webservicetyp_kurzbz = 'stip'; - $log->request_id = $AnfrageDatenID; - $log->beschreibung = "Antwort an Stip"; + $log->webservicetyp_kurzbz = 'stip'; + $log->request_id = $AnfrageDatenID; + $log->beschreibung = "Antwort an Stip"; $log->save(true); - return new SoapFault("Server", $StipBezieher->errormsg); + return new SoapFault("Server", $StipBezieher->errormsg); } } $ret = array("GetStipendienbezieherStipResult" =>array("ErhKz"=>$ErhalterKz,"AnfragedatenID"=>$AnfrageDatenID, "Stipendiumsbezieher"=>$StipBezieherAntwort)); // Eintrag in der LogTabelle anlegen - $log = new webservicelog(); + $log = new webservicelog(); $log->request_data = print_r($ret,true); - $log->webservicetyp_kurzbz = 'stip'; - $log->request_id = $AnfrageDatenID; - $log->beschreibung = "Antwort an Stip"; + $log->webservicetyp_kurzbz = 'stip'; + $log->request_id = $AnfrageDatenID; + $log->beschreibung = "Antwort an Stip"; $log->save(true); - return $ret; + return $ret; } /** - * + * * Funktion nimmt Fehler entgegen und sendet sie an Admin * @param $parameters -> XML SOAP File */ function SendStipendienbezieherStipError($parameters) { - $xmlData = file_get_contents('php://input'); - - $log = new webservicelog(); - $log->request_data = file_get_contents('php://input'); - $log->webservicetyp_kurzbz = 'stip'; - //$log->request_id = $AnfrageDatenID; - $log->beschreibung = "Stip Error"; + $xmlData = file_get_contents('php://input'); + + $log = new webservicelog(); + $log->request_data = file_get_contents('php://input'); + $log->webservicetyp_kurzbz = 'stip'; + //$log->request_id = $AnfrageDatenID; + $log->beschreibung = "Stip Error"; $log->save(true); - + //1=successful; 2=incomplete xml document; 3=incomplete processing; 4=system-error if($parameters->errorReport->ErrorStatusCode!=1) { diff --git a/soap/stip_client.php b/soap/stip_client.php index 7de745e51..dd9a905b9 100644 --- a/soap/stip_client.php +++ b/soap/stip_client.php @@ -1,4 +1,4 @@ - - + STIP-Client @@ -93,37 +93,37 @@ $db = new basis_db(); -Semester = $_REQUEST['Semester']; $bezieher->Studienjahr = $_REQUEST['Studienjahr']; $bezieher->PersKz= $_REQUEST['PersKz']; - $bezieher->SVNR= $_REQUEST['Svnr']; + $bezieher->SVNR= $_REQUEST['Svnr']; $bezieher->Familienname= $_REQUEST['Familienname']; $bezieher->Vorname= $_REQUEST['Vorname']; $bezieher->Typ = $_REQUEST['Typ']; - $bezieher1 = new stip(); + $bezieher1 = new stip(); $bezieher1->Semester = $_REQUEST['Semester']; $bezieher1->Studienjahr = $_REQUEST['Studienjahr']; $bezieher1->PersKz= $_REQUEST['PersKz']; - $bezieher1->SVNR= $_REQUEST['Svnr']; + $bezieher1->SVNR= $_REQUEST['Svnr']; $bezieher1->Familienname= $_REQUEST['Familienname']; $bezieher1->Vorname= $_REQUEST['Vorname']; $bezieher1->Typ = $_REQUEST['Typ']; - + try - { + { $response_stip = $client->GetStipendienbezieherStip(array("userName"=>$username,"passWord"=>$passwort,"anfrageDaten"=>array("ErhKz"=>$ErhKz, "AnfragedatenID"=>$AnfragedatenID,"Stipendiumsbezieher"=>array($bezieher)))); echo '

Single Request Result

'; echo '
'.print_r($response_stip->GetStipendienbezieherStipResult,true).'
'; @@ -131,11 +131,11 @@ if(isset($_REQUEST['submit'])) $response_stip = $client->GetStipendienbezieherStip(array("userName"=>$username,"passWord"=>$passwort,"anfrageDaten"=>array("ErhKz"=>$ErhKz, "AnfragedatenID"=>$AnfragedatenID,"Stipendiumsbezieher"=>array($bezieher, $bezieher1)))); echo '
'.print_r($response_stip->GetStipendienbezieherStipResult, true).'
'; } - catch(SoapFault $fault) + catch(SoapFault $fault) { echo "SOAP Fault: (faultcode: ".$fault->faultcode.", faultstring: ".$fault->faultstring.")", E_USER_ERROR; } - + } ?> diff --git a/soap/stip_client_error.php b/soap/stip_client_error.php index 4d2052b1d..5887d6357 100644 --- a/soap/stip_client_error.php +++ b/soap/stip_client_error.php @@ -1,4 +1,4 @@ - - + STIP-Client @@ -81,7 +81,7 @@ $db = new basis_db(); JobID: "> - + @@ -91,31 +91,31 @@ $db = new basis_db(); -SendStipendienbezieherStipError(array("userName"=>$username,"passWord"=>$passwort,"errorReport"=>array("ErhKz"=>$ErhKz, "StateCode"=>$statecode,"StateMessage"=>$statemessage,"ErrorStatusCode"=>$errorstatuscode,"JobID"=>$jobid))); echo '

Error Request Result sent

'; } - catch(SoapFault $fault) + catch(SoapFault $fault) { echo "SOAP Fault: (faultcode: ".$fault->faultcode.", faultstring: ".$fault->faultstring.")", E_USER_ERROR; } - + } ?> diff --git a/soap/student.soap.php b/soap/student.soap.php index c5ebea49a..d21939b47 100755 --- a/soap/student.soap.php +++ b/soap/student.soap.php @@ -26,7 +26,7 @@ require_once('../include/webservicerecht.class.php'); require_once('../include/studiensemester.class.php'); ini_set("soap.wsdl_cache_enabled", "0"); -$SOAPServer = new SoapServer(APP_ROOT."/soap/student.wsdl.php?".microtime()); +$SOAPServer = new SoapServer(APP_ROOT."/soap/student.wsdl.php?".microtime(true)); $SOAPServer->addFunction("getStudentFromUid"); $SOAPServer->addFunction("getStudentFromMatrikelnummer"); $SOAPServer->addFunction("getStudentFromStudiengang"); @@ -39,43 +39,43 @@ $SOAPServer->handle(); */ function getStudentFromUid($student_uid, $authentifizierung) { - $recht = new webservicerecht(); + $recht = new webservicerecht(); $user = $authentifizierung->username; - $passwort = $authentifizierung->passwort; - + $passwort = $authentifizierung->passwort; + // User authentifizieren if(!check_user($user, $passwort)) - return new SoapFault("Server", "Invalid Credentials"); - + return new SoapFault("Server", "Invalid Credentials"); + // darf User überhaupt Methode verwenden - $recht = new webservicerecht(); + $recht = new webservicerecht(); if(!$recht->isUserAuthorized($user, 'getStudentFromUid')) return new SoapFault("Server", "No permission"); - + $studentObj = new student(); // Studentendaten $student = new foo(); // Rückgabeobjekt $preStudent = new prestudent(); // StudentenStatus if(!$studentObj->load($student_uid)) - return new SoapFault("Server", "Kein Student mit übergebener Uid gefunden"); - + return new SoapFault("Server", "Kein Student mit übergebener Uid gefunden"); + $preStudent->getLastStatus($studentObj->prestudent_id); - + $student->studiengang_kz = $studentObj->studiengang_kz; - $student->person_id = $studentObj->person_id; - $student->semester = $studentObj->semester; - $student->verband = $studentObj->verband; - $student->gruppe = $studentObj->gruppe; - $student->vorname = $studentObj->vorname; - $student->nachname = $studentObj->nachname; - $student->uid = $studentObj->uid; + $student->person_id = $studentObj->person_id; + $student->semester = $studentObj->semester; + $student->verband = $studentObj->verband; + $student->gruppe = $studentObj->gruppe; + $student->vorname = $studentObj->vorname; + $student->nachname = $studentObj->nachname; + $student->uid = $studentObj->uid; $student->status = $preStudent->status_kurzbz; $student->personenkennzeichen = $studentObj->matrikelnr; $student->email = $student->uid.'@'.DOMAIN; - + $student = $recht->clearResponse($user, 'getStudentFromUid', $student); - - return $student; + + return $student; } /** @@ -85,48 +85,48 @@ function getStudentFromUid($student_uid, $authentifizierung) */ function getStudentFromMatrikelnummer($matrikelnummer, $authentifizierung) { - $recht = new webservicerecht(); + $recht = new webservicerecht(); $user = $authentifizierung->username; - $passwort = $authentifizierung->passwort; - + $passwort = $authentifizierung->passwort; + // User authentifizieren if(!check_user($user, $passwort)) - return new SoapFault("Server", "Invalid Credentials"); - + return new SoapFault("Server", "Invalid Credentials"); + // darf User überhaupt Methode verwenden - $recht = new webservicerecht(); + $recht = new webservicerecht(); if(!$recht->isUserAuthorized($user, 'getStudentFromMatrikelnummer')) return new SoapFault("Server", "No permission"); - + $studentObj = new student(); // Studentendaten $student = new foo(); // Rückgabeobjekt $preStudent = new prestudent(); // StudentenStatus - + $student_uid = $studentObj->getUidFromMatrikelnummer($matrikelnummer); if(!$studentObj->load($student_uid)) - return new SoapFault("Server", "Kein Student mit übergebener Matrikelnummer gefunden"); - + return new SoapFault("Server", "Kein Student mit übergebener Matrikelnummer gefunden"); + $preStudent->getLastStatus($studentObj->prestudent_id); - + $student->studiengang_kz = $studentObj->studiengang_kz; - $student->person_id = $studentObj->person_id; - $student->semester = $studentObj->semester; - $student->verband = $studentObj->verband; - $student->gruppe = $studentObj->gruppe; - $student->vorname = $studentObj->vorname; - $student->nachname = $studentObj->nachname; - $student->uid = $studentObj->uid; + $student->person_id = $studentObj->person_id; + $student->semester = $studentObj->semester; + $student->verband = $studentObj->verband; + $student->gruppe = $studentObj->gruppe; + $student->vorname = $studentObj->vorname; + $student->nachname = $studentObj->nachname; + $student->uid = $studentObj->uid; $student->status = $preStudent->status_kurzbz; $student->personenkennzeichen = $studentObj->matrikelnr; $student->email = $student->uid.'@'.DOMAIN; - + $student = $recht->clearResponse($user, 'getStudentFromMatrikelnummer', $student); - - return $student; + + return $student; } /** - * Lädt alle Studenten eines gewissen Kriteriums + * Lädt alle Studenten eines gewissen Kriteriums * @param $studiengang * @param $semester * @param $verband @@ -134,51 +134,51 @@ function getStudentFromMatrikelnummer($matrikelnummer, $authentifizierung) * @param $authentifizierung */ function getStudentFromStudiengang($studiengang, $semester = null, $verband = null, $gruppe = null, $authentifizierung) -{ - $recht = new webservicerecht(); +{ + $recht = new webservicerecht(); $user = $authentifizierung->username; - $passwort = $authentifizierung->passwort; - + $passwort = $authentifizierung->passwort; + // User authentifizieren if(!check_user($user, $passwort)) - return new SoapFault("Server", "Invalid Credentials"); + return new SoapFault("Server", "Invalid Credentials"); // darf User überhaupt Methode verwenden - $recht = new webservicerecht(); + $recht = new webservicerecht(); if(!$recht->isUserAuthorized($user, 'getStudentFromStudiengang')) return new SoapFault("Server", "No permission"); $studentObj = new student(); // Studentendaten $preStudent = new prestudent(); // StudentenStatus - + $studiensemester = new studiensemester(); // aktuelles Studiensemester $studSemester = $studiensemester->getakt(); - + $studentObj->result = $studentObj->getStudents($studiengang, $semester, $verband, $gruppe, null, $studSemester); - - $studentArray = array(); - + + $studentArray = array(); + foreach($studentObj->result as $stud) - { + { $student = new foo(); // Rückgabeobjekt $preStudent->getLastStatus($stud->prestudent_id); - + $student->studiengang_kz = $stud->studiengang_kz; - $student->person_id = $stud->person_id; - $student->semester = $stud->semester; - $student->verband = $stud->verband; - $student->gruppe = $stud->gruppe; - $student->vorname = $stud->vorname; - $student->nachname = $stud->nachname; - $student->uid = $stud->uid; - $student->status = $preStudent->status_kurzbz; + $student->person_id = $stud->person_id; + $student->semester = $stud->semester; + $student->verband = $stud->verband; + $student->gruppe = $stud->gruppe; + $student->vorname = $stud->vorname; + $student->nachname = $stud->nachname; + $student->uid = $stud->uid; + $student->status = $preStudent->status_kurzbz; $student->personenkennzeichen = $stud->matrikelnr; $student->email = $stud->uid.'@'.DOMAIN; - + $student = $recht->clearResponse($user, 'getStudentFromStudiengang', $student); - $studentArray[] = $student; + $studentArray[] = $student; } - return $studentArray; + return $studentArray; } -class foo{} \ No newline at end of file +class foo{} diff --git a/soap/student.wsdl.php b/soap/student.wsdl.php index 4d86eccb4..174a030ae 100755 --- a/soap/student.wsdl.php +++ b/soap/student.wsdl.php @@ -1,21 +1,21 @@ -"; ?> - - + - + @@ -24,11 +24,11 @@ echo ""; - + - + @@ -37,11 +37,11 @@ echo ""; - + - + @@ -83,7 +83,7 @@ echo ""; - + @@ -94,7 +94,7 @@ echo ""; - + " /> @@ -103,7 +103,7 @@ echo ""; - + " /> @@ -112,12 +112,12 @@ echo ""; - + - + - "/> + "/> - \ No newline at end of file + diff --git a/soap/test.soap.php b/soap/test.soap.php index eb7ffe4aa..36a4d5395 100644 --- a/soap/test.soap.php +++ b/soap/test.soap.php @@ -27,7 +27,7 @@ header("Pragma: no-cache"); require_once('../config/vilesci.config.inc.php'); -$SOAPServer = new SoapServer(APP_ROOT."soap/test.wsdl.php?".microtime()); +$SOAPServer = new SoapServer(APP_ROOT."soap/test.wsdl.php?".microtime(true)); $SOAPServer->addFunction("myTest"); $SOAPServer->handle(); @@ -44,5 +44,3 @@ function myTest($foo) } ?> - - diff --git a/system/checkcomposer.php b/system/checkcomposer.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/system/checkphp.php b/system/checkphp.php deleted file mode 100644 index a14c2fc2d..000000000 --- a/system/checkphp.php +++ /dev/null @@ -1,2 +0,0 @@ - + */ + /** + * Script to Test the System Environment + * Tests if all PHP-Modules, Configfiles, CommandlineTools, etc are installed + */ +require_once('../config/vilesci.config.inc.php'); +require_once('../include/functions.inc.php'); +require_once('../include/benutzerberechtigung.class.php'); + +$user = get_uid(); +$rechte = new benutzerberechtigung(); +$rechte->getBerechtigungen($user); +if(!$rechte->isBerechtigt('admin')) + die($rechte->errormsg); + +echo ' + + + + FH-Complete - Environment'; + +include('../include/meta/jquery.php'); +include('../include/meta/jquery-tablesorter.php'); + +echo ' + + + + +

FH-Complete Environment

+ + + + + + + + +'; +// Apache +printVersion("Apache", apache_get_version()); + +// PHP version +printVersion("php", phpversion()); + +// PHP module +printVersion("php-xsl", phpversion('xsl')); +printVersion("php-gd", phpversion('gd')); +printVersion("php-pgsql", phpversion('pgsql')); +printVersion("php-ldap", phpversion('ldap')); +printVersion("php-mcrypt", phpversion('mcrypt')); +printVersion("php-mbstring", phpversion('mbstring')); +printVersion("php-soap", phpversion('soap')); +printVersion("php-curl", phpversion('curl')); + +// Unoconv version +$returnArray = array(); +exec('unoconv --version',$returnArray); +if(isset($returnArray[0])) + $unoconvVersion = explode(' ',$returnArray[0])[1]; +else + $unoconvVersion = null; + +printVersion("Unoconv", $unoconvVersion, "0.7"); + +// Codeigniter Environment Variable CI_ENV +$CI_ENV = getenv('CI_ENV'); +printVersion("CI_ENV", $CI_ENV); + +// ZIP +printVersion("zip", checkInstalled('zip')); + +// Composer +printVersion("composer", checkInstalled('composer')); + +// Composer / Vendor +$vendorFileExists = file_exists('../vendor/codeigniter/framework/index.php'); +printVersion("Composer Status", ($vendorFileExists?'ok':'out of date')); + +// Config Files +$ConfigExists = file_exists('../config/cis.config.inc.php'); +if(!$ConfigExists) + $ConfigExists = file_exists('../config/vilesci.config.inc.php'); + +printVersion("ConfigFile CIS/Vilesci", ($ConfigExists?'ok':'missing')); + +$ConfigExists = file_exists('../config/global.config.inc.php'); +printVersion("ConfigFile Global", ($ConfigExists?'ok':'missing')); + +if($CI_ENV == '') + $CI_ENV = 'production'; +$ConfigExists = file_exists('../application/config/'.$CI_ENV.'/config.php'); +printVersion("ConfigFile Codeigniter", ($ConfigExists?'ok':'missing')); + +// Htaccess Files +$htaccessExists = file_exists('../cis/private/.htaccess'); +printVersion("htaccess File CIS", ($htaccessExists?'ok':'missing')); +$htaccessExists = file_exists('../content/.htaccess'); +printVersion("htaccess File Content", ($htaccessExists?'ok':'missing')); +$htaccessExists = file_exists('../vilesci/.htaccess'); +printVersion("htaccess File Vilesci", ($htaccessExists?'ok':'missing')); +$htaccessExists = file_exists('../system/.htaccess'); +printVersion("htaccess File System", ($htaccessExists?'ok':'missing')); +$htaccessExists = file_exists('../rdf/.htaccess'); +printVersion("htaccess File RDF", ($htaccessExists?'ok':'missing')); + +echo ' + +
ModuleVersion/Status
+ +'; + +function printVersion($module, $currentVersion, $expectedVersion = '') +{ + $failed = false; + + if ($currentVersion == null) + $failed = true; + + if ($currentVersion == '') + $currentVersion = 'missing'; + if ($expectedVersion != '' && $currentVersion != $expectedVersion) + $failed = true; + + echo ' + + '.$module.' + '.$currentVersion.''; + if($failed && $expectedVersion != '') + echo ' (should be '.$expectedVersion.')'; + echo ''; + echo ''; +} + +function checkInstalled($tool) +{ + $returnArray = array(); + $returnValue = null; + exec('which '.$tool, $returnArray, $returnValue); + if($returnValue==0) + return 'ok'; + else + return 'missing'; +} diff --git a/system/vorlage_zip/DiplSupplement.odt b/system/vorlage_zip/DiplSupplement.odt index 2bec3d182..aaee7c600 100644 Binary files a/system/vorlage_zip/DiplSupplement.odt and b/system/vorlage_zip/DiplSupplement.odt differ diff --git a/system/xsl/diplomaSupp_0.xsl b/system/xsl/diplomaSupp_0.xsl index 358396f28..c6d90e9b6 100644 --- a/system/xsl/diplomaSupp_0.xsl +++ b/system/xsl/diplomaSupp_0.xsl @@ -1287,7 +1287,7 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn - + @@ -2836,12 +2836,12 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn - + - + diff --git a/system/xsl/diplomaSupp_Lehrgaenge.xsl b/system/xsl/diplomaSupp_Lehrgaenge.xsl index 26758c220..0765b9b6c 100644 --- a/system/xsl/diplomaSupp_Lehrgaenge.xsl +++ b/system/xsl/diplomaSupp_Lehrgaenge.xsl @@ -1291,7 +1291,7 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn - + @@ -2839,12 +2839,12 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn - + - + diff --git a/tests/codesniffer/FHComplete/tests/files/FHComplete/throws_pass.php b/tests/codesniffer/FHComplete/tests/files/FHComplete/throws_pass.php index 854344b5b..b2c1d2a04 100644 --- a/tests/codesniffer/FHComplete/tests/files/FHComplete/throws_pass.php +++ b/tests/codesniffer/FHComplete/tests/files/FHComplete/throws_pass.php @@ -8,29 +8,29 @@ use Other\Error as OtherError; class Throws { - /** - * Test throws - * - * @throws Exception An expection happened. - * @throws FHComplete\Boom A boom went off. - * @throws FHComplete\Error\Boom Oh, shucks, another boom. - * @throws Other\Crap Oh boy. - * @throws Other\Error\Issue A missing tissue for your PSR-2 issues. - * @return void - */ - public function test() - { - switch ($a) { - case 1: - throw new Boom(); - case 2: - throw new Error\Boom(); - case 3: - throw new OtherError\Issue(); - case 4: - throw new Crap(); - default: - throw new \Exception(); - } - } + /** + * Test throws + * + * @throws Exception An expection happened. + * @throws FHComplete\Boom A boom went off. + * @throws FHComplete\Error\Boom Oh, shucks, another boom. + * @throws Other\Crap Oh boy. + * @throws Other\Error\Issue A missing tissue for your PSR-2 issues. + * @return void + */ + public function test() + { + switch ($a) { + case 1: + throw new Boom(); + case 2: + throw new Error\Boom(); + case 3: + throw new OtherError\Issue(); + case 4: + throw new Crap(); + default: + throw new \Exception(); + } + } } diff --git a/tests/codesniffer/FHComplete/tests/files/control_structure_brackets_pass.php b/tests/codesniffer/FHComplete/tests/files/control_structure_brackets_pass.php index 75c37ee8e..2584c3507 100644 --- a/tests/codesniffer/FHComplete/tests/files/control_structure_brackets_pass.php +++ b/tests/codesniffer/FHComplete/tests/files/control_structure_brackets_pass.php @@ -1,19 +1,25 @@ 100) { +} +elseif ($i > 100) +{ echo 'i > 100'; } -while (false) { +while (false) +{ echo 'false'; } -do { +do +{ echo 'dowhile test'; } while (false); diff --git a/tests/codesniffer/FHComplete/tests/files/control_structure_dowhile.php b/tests/codesniffer/FHComplete/tests/files/control_structure_dowhile.php index 54b2190d4..b423a48e0 100644 --- a/tests/codesniffer/FHComplete/tests/files/control_structure_dowhile.php +++ b/tests/codesniffer/FHComplete/tests/files/control_structure_dowhile.php @@ -1,6 +1,7 @@ 'after 2 tabs' - ); -} diff --git a/tests/codesniffer/FHComplete/tests/files/multiple_use.php b/tests/codesniffer/FHComplete/tests/files/multiple_use.php deleted file mode 100644 index b239a6419..000000000 --- a/tests/codesniffer/FHComplete/tests/files/multiple_use.php +++ /dev/null @@ -1,6 +0,0 @@ -passingPublic = 'changed'; - $this->underscored = 'has value now'; - $this->doubleUnderscore = 'not recommended'; - } - - /** - * [setStatics description] - * - * @return void - */ - public static function setStatics() - { - self::$publicStatic = true; - self::$protectedStatic = true; - self::$privateStatic = true; - } -} diff --git a/tests/codesniffer/FHComplete/tests/files/whitespace_comma.php b/tests/codesniffer/FHComplete/tests/files/whitespace_comma.php deleted file mode 100644 index 78e43d5f0..000000000 --- a/tests/codesniffer/FHComplete/tests/files/whitespace_comma.php +++ /dev/null @@ -1,2 +0,0 @@ - - - Profilfoto Check + '; + + include('../../include/meta/jquery.php'); + +echo' Profilfoto Check + @@ -116,13 +146,13 @@ echo 'isBerechtigt('basis/fhausweis','suid')) die('Sie haben keine Berechtigung für diese Seite'); } $error = false; -$person_id=''; + if(isset($_POST['person_id'])) { $person_id=$_POST['person_id']; @@ -312,10 +342,12 @@ $qry_anzahl_mitarbeiter = " FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) - LEFT JOIN public.tbl_mitarbeiter ON (uid=mitarbeiter_uid) + JOIN public.tbl_akte USING (person_id) + LEFT JOIN public.tbl_mitarbeiter ON (tbl_benutzer.uid=mitarbeiter_uid) WHERE foto is not NULL AND tbl_benutzer.aktiv + AND tbl_akte.dokument_kurzbz='Lichtbil' AND 'akzeptiert' NOT IN(SELECT fotostatus_kurzbz FROM public.tbl_person_fotostatus WHERE person_id=tbl_person.person_id ORDER BY datum desc, person_fotostatus_id desc LIMIT 1) AND 'abgewiesen' NOT IN (SELECT fotostatus_kurzbz FROM public.tbl_person_fotostatus @@ -335,15 +367,17 @@ $qry_anzahl_studenten = " FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) - LEFT JOIN public.tbl_mitarbeiter ON (uid=mitarbeiter_uid) + JOIN public.tbl_akte USING (person_id) + LEFT JOIN public.tbl_mitarbeiter ON (tbl_benutzer.uid=mitarbeiter_uid) WHERE foto is not NULL AND tbl_benutzer.aktiv + AND tbl_akte.dokument_kurzbz='Lichtbil' AND 'akzeptiert' NOT IN(SELECT fotostatus_kurzbz FROM public.tbl_person_fotostatus WHERE person_id=tbl_person.person_id ORDER BY datum desc, person_fotostatus_id desc LIMIT 1) AND 'abgewiesen' NOT IN (SELECT fotostatus_kurzbz FROM public.tbl_person_fotostatus WHERE person_id=tbl_person.person_id ORDER BY datum desc, person_fotostatus_id desc LIMIT 1) - AND uid NOT IN (SELECT mitarbeiter_uid FROM public.tbl_mitarbeiter) + AND tbl_benutzer.uid NOT IN (SELECT mitarbeiter_uid FROM public.tbl_mitarbeiter) "; $anzahl_std = ''; if($result_anzahl = $db->db_query($qry_anzahl_studenten)) @@ -358,9 +392,11 @@ $qry_anzahl_gesamt = " FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) + JOIN public.tbl_akte USING (person_id) WHERE foto is not NULL AND tbl_benutzer.aktiv + AND tbl_akte.dokument_kurzbz='Lichtbil' AND 'akzeptiert' NOT IN(SELECT fotostatus_kurzbz FROM public.tbl_person_fotostatus WHERE person_id=tbl_person.person_id ORDER BY datum desc, person_fotostatus_id desc LIMIT 1) AND 'abgewiesen' NOT IN (SELECT fotostatus_kurzbz FROM public.tbl_person_fotostatus @@ -434,10 +470,13 @@ if($result = $db->db_query($qry)) diff --git a/vilesci/stammdaten/studiengang_edit.php b/vilesci/stammdaten/studiengang_edit.php index 5063d0c1e..658d9d300 100755 --- a/vilesci/stammdaten/studiengang_edit.php +++ b/vilesci/stammdaten/studiengang_edit.php @@ -85,7 +85,7 @@ if(isset($_GET['action']) && $_GET['action']=='save') } - if($studiengang_kz==334) + if(in_array($studiengang_kz,array(334,257))) { $benutzerfunktion = new benutzerfunktion(); $benutzerfunktion->getOeFunktionen($stg->oe_kurzbz, 'Leitung'); @@ -180,9 +180,9 @@ echo ' '; -if($stg->studiengang_kz==334) +if(in_array($stg->studiengang_kz, array(334,257))) { - // Studiengang MIT / MSC kann auch die Leitung aktivieren/deaktivieren + // Studiengang MIT / MSC und BIF kann auch die Leitung aktivieren/deaktivieren echo ''; echo ''; echo '
-

Originalvorschau

+

Originalvorschau

+
+
  + Person ID: '.$db->convert_html_chars($row->person_id).'
Vorname: '.$db->convert_html_chars($row->vorname).'
Nachname: '.$db->convert_html_chars($row->nachname).'
'.($row->mitarbeiter=='1'?'MitarbeiterIn':'StudentIn').' @@ -455,8 +494,11 @@ if($result = $db->db_query($qry)) echo ''; echo '


'; echo 'Bild Upload'; - echo '

'; - echo 'DMS Download'; + if ($row->dms_id !='') + { + echo '

'; + echo 'DMS Download'; + } echo ''; } else diff --git a/vilesci/fhausweis/kartenverwaltung.php b/vilesci/fhausweis/kartenverwaltung.php index 41fc89c69..dcdb73eb5 100755 --- a/vilesci/fhausweis/kartenverwaltung.php +++ b/vilesci/fhausweis/kartenverwaltung.php @@ -225,7 +225,7 @@ if(isset($_REQUEST['btn_submitStudent'])) { foreach($studiengang->result as $stud) { - if($stud->studiengang_kz >= '10000' || $stud->studiengang_kz < '0') + if($stud->studiengang_kz >= '10000' || $stud->studiengang_kz < '0' || $stud->studiengang_kz == '9005') $studenten->getStudentsStudiengang($stud->studiengang_kz, $semester); } } diff --git a/vilesci/stammdaten/benutzerberechtigung_uebersicht.php b/vilesci/stammdaten/benutzerberechtigung_uebersicht.php index df365bbd3..2f053cdb5 100644 --- a/vilesci/stammdaten/benutzerberechtigung_uebersicht.php +++ b/vilesci/stammdaten/benutzerberechtigung_uebersicht.php @@ -48,10 +48,12 @@ function checkLength() return false; } else - return true; + return true; } -$(document).ready(function() - { +$(document).ready(function() + { + $("#erweitertesuche").hide(); + $("#t1").tablesorter( { sortList: [[0,0],[1,0],[2,0]], @@ -100,13 +102,13 @@ $benutzerart = (isset($_GET['benutzerart'])?$_GET['benutzerart']:''); $benutzeraktiv = (isset($_GET['aktiv'])?$_GET['aktiv']:'aktiv'); $berechtigung_kurzbz = (isset($_GET['berechtigung_kurzbz'])?$_GET['berechtigung_kurzbz']:''); $rolle_kurzbz = (isset($_GET['rolle_kurzbz'])?$_GET['rolle_kurzbz']:''); - + $htmlstr='
- BenutzerIn suchen: + BenutzerIn suchen: -

+    + Erweiterte Suchoptionen ein-/ausblenden + +
+
- Berechtigung: + Berechtigung:

- Rollen: + Rollen:

+
@@ -161,8 +168,8 @@ $htmlstr=' //Benutzer suchen und Tabelle anzeigen if(isset($_GET['searchstr'])) -{ - $benutzer = new benutzer(); +{ + $benutzer = new benutzer(); $searchItems = explode(' ',$searchstr); if ($benutzeraktiv == 'aktiv') $benutzer->search($searchItems,"",true); @@ -170,9 +177,9 @@ if(isset($_GET['searchstr'])) $benutzer->search($searchItems,"",false); if ($benutzeraktiv == '') $benutzer->search($searchItems,"",null); - + if(count($benutzer->result)!=0) - { + { $htmlstr .= "\n"; $htmlstr .= ""; $htmlstr .= "\n"; @@ -185,14 +192,14 @@ if(isset($_GET['searchstr'])) { $benutzerrolle = new benutzerberechtigung(); $benutzerrolle->loadBenutzerRollen($row->uid); - $aktiv = new benutzer(); + $aktiv = new benutzer(); $aktiv->load($row->uid); - + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; } @@ -203,7 +210,7 @@ if(isset($_GET['searchstr'])) $benutzerrolle->loadBenutzerRollen($row->uid); $aktiv = new benutzer(); $aktiv->load($row->uid); - + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; @@ -218,7 +225,7 @@ if(isset($_GET['searchstr'])) $benutzerrolle->loadBenutzerRollen($row->uid); $aktiv = new benutzer(); $aktiv->load($row->uid); - + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= " \n"; @@ -230,7 +237,7 @@ if(isset($_GET['searchstr'])) } $htmlstr .= "
NachnameVornameUIDAktivAktion
".$row->nachname."".$row->vorname."".$row->uid."".($aktiv->bnaktiv?"Ja":"Nein")."".$row->uid."".($aktiv->bnaktiv?"Ja":"Nein")."".(count($benutzerrolle->berechtigungen)!=0?"Rechte bearbeiten":"Rechte vergeben")."
".$row->nachname."".$row->vorname."
".$row->nachname."".$row->vorname."
\n"; } - else + else { $htmlstr .= "Es wurden keine Übereinstimmungen mit Ihrem Suchbegriff gefunden"; } @@ -252,9 +259,9 @@ if($berechtigung_kurzbz != '') { $benutzer = new benutzer(); $benutzer->load($row->uid); - + $heute = strtotime(date('Y-m-d')); - + if ($row->ende!='' && strtotime($row->ende) < $heute) { $color1 = '#f79c9c'; @@ -282,7 +289,7 @@ if($berechtigung_kurzbz != '') -webkit-border-radius: 10; -moz-border-radius: 10; border-radius: 10px; - + border: solid #999 1px; text-decoration: none; ">'; @@ -330,9 +337,9 @@ if($rolle_kurzbz != '') { $benutzer = new benutzer(); $benutzer->load($row->uid); - + $heute = strtotime(date('Y-m-d')); - + if ($row->ende!='' && strtotime($row->ende) < $heute) { $color1 = '#f79c9c'; @@ -360,7 +367,7 @@ if($rolle_kurzbz != '') -webkit-border-radius: 10; -moz-border-radius: 10; border-radius: 10px; - + border: solid #999 1px; text-decoration: none; ">'; diff --git a/vilesci/stammdaten/reihungstestverwaltung.php b/vilesci/stammdaten/reihungstestverwaltung.php index c48b52fca..2cc100d62 100644 --- a/vilesci/stammdaten/reihungstestverwaltung.php +++ b/vilesci/stammdaten/reihungstestverwaltung.php @@ -590,7 +590,7 @@ if(isset($_GET['excel'])) for(i in ui.content) { ui.content[i].value=ui.content[i].bezeichnung; - ui.content[i].label=ui.content[i].bezeichnung+' ('+ui.content[i].status+')'; + ui.content[i].label=ui.content[i].bezeichnung; } }, select: function(event, ui) @@ -1862,10 +1862,10 @@ $studienplaene_list = implode(',', array_keys($studienplaene_arr));
- Kopie erstellen'; - + if($rechte->isBerechtigt('lehre/reihungstest', null, 'suid')) { $anzahl_teilnehmer = new reihungstest(); @@ -1873,9 +1873,9 @@ $studienplaene_list = implode(',', array_keys($studienplaene_arr)); if (isset($orte) && count($orte->result) == 0 && isset($studienplaene) && count($studienplaene->result) == 0 && $anzahl_teilnehmer == 0 && $reihungstest_id != '') echo ''; - else + else echo ''; - } + } ?>
Leitung'; @@ -222,4 +222,4 @@ echo ' ?> - \ No newline at end of file +