diff --git a/application/core/APIv1_Controller.php b/application/core/APIv1_Controller.php index 26fbeddac..76654b559 100644 --- a/application/core/APIv1_Controller.php +++ b/application/core/APIv1_Controller.php @@ -2,13 +2,15 @@ require_once APPPATH . '/libraries/REST_Controller.php'; -class APIv1_Controller extends REST_Controller +class APIv1_Controller extends REST_Controller { - function __construct() + function __construct() { parent::__construct(); // Loads return messages $this->load->helper('message'); + + log_message('debug', 'Called API: '.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']); } } \ No newline at end of file diff --git a/application/helpers/fhcauth_helper.php b/application/helpers/fhcauth_helper.php index 5fa081712..42fe5889f 100644 --- a/application/helpers/fhcauth_helper.php +++ b/application/helpers/fhcauth_helper.php @@ -11,7 +11,8 @@ * @filesource */ if (! defined('BASEPATH')) exit('No direct script access allowed'); -require_once FCPATH.'include/authentication.class.php'; + +require_once FHCPATH.'include/authentication.class.php'; /** * FHC-Auth Helpers diff --git a/application/libraries/FHC_Auth.php b/application/libraries/FHC_Auth.php index 17cfd65f6..a56cf0237 100644 --- a/application/libraries/FHC_Auth.php +++ b/application/libraries/FHC_Auth.php @@ -11,8 +11,9 @@ * @filesource */ if (! defined('BASEPATH')) exit('No direct script access allowed'); -require_once FCPATH.'include/authentication.class.php'; -require_once FCPATH.'include/AddonAuthentication.php'; + +require_once FHCPATH.'include/authentication.class.php'; +require_once FHCPATH.'include/AddonAuthentication.php'; /** * FHC-Auth Helpers diff --git a/application/libraries/PermissionLib.php b/application/libraries/PermissionLib.php index 662130c42..3bd70eb40 100644 --- a/application/libraries/PermissionLib.php +++ b/application/libraries/PermissionLib.php @@ -11,15 +11,15 @@ * @filesource */ -if (! defined('FCPATH')) exit('No direct script access allowed'); +if (! defined('BASEPATH')) exit('No direct script access allowed'); -require_once(FCPATH.'include/basis_db.class.php'); -require_once(FCPATH.'include/organisationseinheit.class.php'); -require_once(FCPATH.'include/studiengang.class.php'); -require_once(FCPATH.'include/fachbereich.class.php'); -require_once(FCPATH.'include/functions.inc.php'); -require_once(FCPATH.'include/wawi_kostenstelle.class.php'); -require_once(FCPATH.'include/benutzerberechtigung.class.php'); +require_once(FHCPATH.'include/basis_db.class.php'); +require_once(FHCPATH.'include/organisationseinheit.class.php'); +require_once(FHCPATH.'include/studiengang.class.php'); +require_once(FHCPATH.'include/fachbereich.class.php'); +require_once(FHCPATH.'include/functions.inc.php'); +require_once(FHCPATH.'include/wawi_kostenstelle.class.php'); +require_once(FHCPATH.'include/benutzerberechtigung.class.php'); class PermissionLib { @@ -30,11 +30,12 @@ class PermissionLib const DELETE_RIGHT = 'd'; const REPLACE_RIGHT = 'ui'; - private $bb; // benutzerberechtigung private $acl; // conversion array from a source to a permission + private static $bb; // benutzerberechtigung /** - * + * PermissionLib's constructor + * Here is initialized the static property bb with all the rights of the user (API caller) */ function __construct() { @@ -49,9 +50,10 @@ class PermissionLib // Loads the array of resources $this->acl = $this->ci->config->item('fhc_acl'); - - // - $this->bb = new benutzerberechtigung(); + + // API Caller rights initialization + self::$bb = new benutzerberechtigung(); + self::$bb->getBerechtigungen(getAuthUID()); } /** @@ -66,7 +68,7 @@ class PermissionLib if (isset($this->acl[$sourceName])) { // Checks permission - return $this->isBerechtigt($this->acl[$sourceName], $permissionType); + return $this->_isBerechtigt($this->acl[$sourceName], $permissionType); } // if the resource does not exist, do not lose useful clock cycles else @@ -91,27 +93,20 @@ class PermissionLib } /** - * + * Checks user's (API caller) rights */ - private function isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null) + private function _isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null) { + $isBerechtigt = false; + if (!is_null($berechtigung_kurzbz)) { - $this->bb->getBerechtigungen(getAuthUID()); - if($this->bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id)) + if(self::$bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id)) { - log_message('debug','Permission '.$berechtigung_kurzbz.' granted'); - return true; - } - else - { - log_message('debug','Permission '.$berechtigung_kurzbz.' failed'); - return false; + $isBerechtigt = true; } } - else - { - return false; - } + + return $isBerechtigt; } } \ No newline at end of file diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index 385c874a2..cc09c28fd 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -22,7 +22,7 @@ class Studiengang_model extends DB_Model return $isEntitled; if (($isEntitled = $this->isEntitled('bis.tbl_lgartcode', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) return $isEntitled; - + $allForBewerbungQuery = 'SELECT DISTINCT studiengang_kz, typ, organisationseinheittyp_kurzbz, @@ -95,7 +95,7 @@ class Studiengang_model extends DB_Model WHERE t1.onlinebewerbung IS TRUE AND t1.aktiv IS TRUE ORDER BY typ, studiengangbezeichnung, tbl_lgartcode.bezeichnung ASC'; - + return $this->execQuery($allForBewerbungQuery); } @@ -110,11 +110,11 @@ class Studiengang_model extends DB_Model $this->addJoin('lehre.tbl_studienplan', 'studienordnung_id'); // Then join with table lehre.tbl_studienplan_semester on column studienplan_id $this->addJoin('lehre.tbl_studienplan_semester', 'studienplan_id'); - + // Ordering by studiengang_kz and studienplan_id $this->addOrder('public.tbl_studiengang.studiengang_kz'); $this->addOrder('lehre.tbl_studienplan.studienplan_id'); - + $result = $this->loadTree( 'public.tbl_studiengang', array( @@ -130,7 +130,7 @@ class Studiengang_model extends DB_Model 'studienplaene' ) ); - + return $result; } @@ -156,7 +156,7 @@ class Studiengang_model extends DB_Model // Ordering by studiengang_kz and studienplan_id $this->addOrder('public.tbl_studiengang.bezeichnung'); $this->addOrder('lehre.tbl_studienplan.studienplan_id'); - + $result = $this->loadTree( 'public.tbl_studiengang', array( @@ -175,12 +175,12 @@ class Studiengang_model extends DB_Model 'akadgrad' ) ); - + return $result; } - + /** - * + * */ public function getAppliedStudiengang($person_id, $studiensemester_kurzbz, $titel) { @@ -200,10 +200,10 @@ class Studiengang_model extends DB_Model 'prestudent_id', 'LEFT' ); - + // Ordering by studiengang_kz and studienplan_id $this->addOrder('public.tbl_studiengang.bezeichnung'); - + $result = $this->loadTree( 'public.tbl_studiengang', array( @@ -214,7 +214,7 @@ class Studiengang_model extends DB_Model ), 'public.tbl_prestudent.person_id = '.$this->escape($person_id). ' AND public.tbl_prestudentstatus.studiensemester_kurzbz = '.$this->escape($studiensemester_kurzbz). - ' AND (public.tbl_prestudentstatus.status_kurzbz = \'Interessent\' OR public.tbl_prestudentstatus.status_kurzbz = \'Bewerber\')', + ' AND (public.tbl_prestudentstatus.status_kurzbz = \'Interessent\')', array( 'prestudenten', 'prestudentstatus', @@ -222,12 +222,12 @@ class Studiengang_model extends DB_Model 'notizen' ) ); - + return $result; } - + /** - * + * */ public function getAvailableReihungstestByPersonId($person_id) { @@ -241,22 +241,22 @@ class Studiengang_model extends DB_Model return $isEntitled; if (($isEntitled = $this->isEntitled('public.tbl_prestudent', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true) return $isEntitled; - + $this->addJoin('lehre.tbl_studienordnung', 'studiengang_kz'); - + $this->addJoin('lehre.tbl_studienplan', 'studienordnung_id'); - + $this->addJoin('public.tbl_prestudentstatus', 'studienplan_id'); - + $this->addJoin('public.tbl_prestudent', 'prestudent_id'); - + $this->addFrom( '(SELECT * FROM public.tbl_reihungstest LEFT JOIN public.tbl_rt_studienplan USING(reihungstest_id))', 'tbl_reihungstest' ); - + $this->addOrder('tbl_studiengang.bezeichnung, tbl_reihungstest.stufe, tbl_reihungstest.datum'); - + return $this->loadTree( 'public.tbl_studiengang', array('public.tbl_reihungstest'), diff --git a/cis/private/lehre/lesson.php b/cis/private/lehre/lesson.php index 91fdb2293..ae2a5cd51 100755 --- a/cis/private/lehre/lesson.php +++ b/cis/private/lehre/lesson.php @@ -353,7 +353,11 @@ $( document ).ready(function() $user_is_allowed_to_upload=true; } } - ?> + + // DIV zur Plazierung von Zusatzinformationen durch Addons + echo '
'; + ?> +Anmelden (bis "+frist+"):
"; - button = ""; + button = ""; } } else @@ -1983,7 +1992,7 @@ function loadAllPruefungen() function checkTermin(termin) { var heute = new Date(); - var aktTime = new Date(heute.getTime() + (14*24*60*60*1000)); + var aktTime = new Date(heute.getTime() + (*24*60*60*1000)); var vonTime = stringToDate(termin.datum, termin.beginn); var bisTime = stringToDate(termin.datum, termin.ende); diff --git a/config/cis.config-default.inc.php b/config/cis.config-default.inc.php old mode 100644 new mode 100755 index 648b1a379..48a2c091b --- a/config/cis.config-default.inc.php +++ b/config/cis.config-default.inc.php @@ -212,6 +212,14 @@ define('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN',true); //User, welcher für das Anlegen von Anrechnungen bei der Prüfungsanmeldung verwendet wird define('CIS_PRUEFUNGSANMELDUNG_USER','p.pruefungsanmeldung'); +// Anmeldefristen für Prüfungen in Tagen; +// Wenn nicht definiert: 3 +//define('CIS_PRUEFUNGSANMELDUNG_FRIST',3); + +// Mindestvorlaufzeit beim Anlegen von Prüfungen in Tagen +// Wenn nicht definiert: 14 +//define('CIS_PRUEFUNGSTERMIN_FRIST',14); + // Soll für die Prüfungsanmeldungen eine Anrechnung erstellt werden define('CIS_PRUEFUNGSANMELDUNG_ANRECHNUNG', true); @@ -224,6 +232,6 @@ define('CIS_MEINELV_ANZAHL_SEMESTER_PAST', 3); //Gibt an, welche Buchungstypen bei der Überprüfung auf Einzahlung berücksichtigt werden define('CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN', serialize(array("Studiengebuehr"))); -//Gibt an bei welcher Länge die LV-Bezeichnungen im Menü abgeschnitten werden. Default: 21 +//Gibt an bei welcher Länge die LV-Bezeichnungen im Menü abgeschnitten werden. Default: 21 define('CIS_LVMENUE_CUTLENGTH', 21); ?> diff --git a/include/adresse.class.php b/include/adresse.class.php index 25cc84e6a..16fa52fc6 100644 --- a/include/adresse.class.php +++ b/include/adresse.class.php @@ -450,5 +450,58 @@ class adresse extends basis_db } return true; } + + + /** + * Laedt die Rechnungsadresse zu der Person die uebergeben wird + * @param $pers_id ID der Person zu der die Adressen geladen werden sollen + * @return true wenn ok, false im Fehlerfall + */ + public function load_rechnungsadresse($pers_id) + { + //Pruefen ob pers_id eine gueltige Zahl ist + if(!is_numeric($pers_id) || $pers_id == '') + { + $this->errormsg = 'person_id muss eine gültige Zahl sein'; + return false; + } + + //Lesen der Daten aus der Datenbank + $qry = "SELECT * FROM public.tbl_adresse WHERE rechnungsadresse and person_id=".$this->db_add_param($pers_id, FHC_INTEGER, false); + $qry.=" limit 1"; + + if(!$this->db_query($qry)) + { + $this->errormsg = 'Fehler bei einer Datenbankabfrage'; + return false; + } + + while($row = $this->db_fetch_object()) + { + $adr_obj = new adresse(); + + $adr_obj->adresse_id = $row->adresse_id; + $adr_obj->heimatadresse = $this->db_parse_bool($row->heimatadresse); + $adr_obj->gemeinde = $row->gemeinde; + $adr_obj->name = $row->name; + $adr_obj->nation = $row->nation; + $adr_obj->ort = $row->ort; + $adr_obj->person_id = $row->person_id; + $adr_obj->plz = $row->plz; + $adr_obj->strasse = $row->strasse; + $adr_obj->typ = $row->typ; + $adr_obj->firma_id = $row->firma_id; + $adr_obj->updateamum = $row->updateamum; + $adr_obj->updatevon = $row->updatevon; + $adr_obj->insertamum = $row->insertamum; + $adr_obj->insertvon = $row->insertvon; + $adr_obj->zustelladresse = $this->db_parse_bool($row->zustelladresse); + $adr_obj->rechnungsadresse = $this->db_parse_bool($row->rechnungsadresse); + $adr_obj->anmerkung = $row->anmerkung; + + $this->result[] = $adr_obj; + } + return true; + } } ?> diff --git a/include/studienplan.class.php b/include/studienplan.class.php index 58ee074f5..ac7693a9b 100644 --- a/include/studienplan.class.php +++ b/include/studienplan.class.php @@ -1162,7 +1162,7 @@ class studienplan extends basis_db { $qry= " SELECT DISTINCT - studienplan_id, tbl_studienplan.bezeichnung, tbl_studiensemester.start + studienplan_id, tbl_studienplan.bezeichnung, tbl_studiensemester.start, tbl_studienordnung.status_kurzbz FROM lehre.tbl_studienplan JOIN @@ -1174,9 +1174,7 @@ class studienplan extends basis_db JOIN public.tbl_studiensemester ON (tbl_studienordnung.gueltigvon = tbl_studiensemester.studiensemester_kurzbz) WHERE - tbl_studienplan.aktiv=true - AND - tbl_studienordnung.status_kurzbz IN ('approved')"; + tbl_studienplan.aktiv=true"; foreach($searchItems as $value) $qry.=" AND @@ -1201,6 +1199,7 @@ class studienplan extends basis_db $obj->studienplan_id = $row->studienplan_id; $obj->bezeichnung = $row->bezeichnung; + $obj->status_kurzbz = $row->status_kurzbz; $obj->new=false; $this->result[] = $obj; diff --git a/index.ci.php b/index.ci.php index 578dc97d2..f6905f940 100644 --- a/index.ci.php +++ b/index.ci.php @@ -232,7 +232,7 @@ switch (ENVIRONMENT) define('BASEPATH', str_replace('\\', '/', $system_path)); // Path to the front controller (this file) - define('FCPATH', dirname(__FILE__).'/'); + define('FHCPATH', dirname(__FILE__).'/'); // Name of the "system folder" define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); diff --git a/locale/de-AT/dms_link.php b/locale/de-AT/dms_link.php index 8ae0284d5..83694b687 100755 --- a/locale/de-AT/dms_link.php +++ b/locale/de-AT/dms_link.php @@ -28,6 +28,10 @@ $this->phrasen['dms_link/lvplanSyncFAQ']='7188'; //Link zur Anleitung zur Kalend $this->phrasen['dms_link/profilhilfe']=''; //Hilfe-Link aus dem Profil $this->phrasen['dms_link/anleitungMailverteiler']='7578'; //Anleitung für die Benutzung der Mailverteiler und der Berechtigungsschlüssel +// LV-Evaluierung +$this->phrasen['dms_link/lvevaluierungStudierendeninformation']=''; //Beschreibung des Ablaufs der LVEvaluierung für Studierende +$this->phrasen['dms_link/lvevaluierungProzessbeschreibung']=''; //Beschreibung des Prozesses der LVEvaluierung + //Links auf externe Seiten $this->phrasen['dms_link/dokuwikiGesamtnote']='http://fhcomplete.technikum-wien.at/dokuwiki/doku.php?id=cis:gesamtnote'; //Link ins Dokuwiki zur Anleitung Gesamtnote ?> diff --git a/vilesci/stammdaten/reihungstestverwaltung.php b/vilesci/stammdaten/reihungstestverwaltung.php index 2cc100d62..c48b52fca 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].label=ui.content[i].bezeichnung+' ('+ui.content[i].status+')'; } }, select: function(event, ui) @@ -1862,10 +1862,10 @@ $studienplaene_list = implode(',', array_keys($studienplaene_arr));