mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Generierung der Matrikelnummer implementiert
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../config/global.config.inc.php');
|
||||
require_once('../../include/'.EXT_FKT_PATH.'/generateuid.inc.php');
|
||||
require_once('../../include/'.EXT_FKT_PATH.'/generatematrikelnr.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/benutzergruppe.class.php');
|
||||
@@ -67,6 +68,8 @@ require_once('../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../include/anwesenheit.class.php');
|
||||
require_once('../../include/benutzerfunktion.class.php');
|
||||
require_once('../../include/note.class.php');
|
||||
require_once('../../include/standort.class.php');
|
||||
require_once('../../include/adresse.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
$db = new basis_db();
|
||||
@@ -1366,6 +1369,13 @@ if(!$error)
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->load(ltrim($stg,'0'));
|
||||
$uid = generateUID($stg_obj->kurzbz,$jahr,$stg_obj->typ,$matrikelnr);
|
||||
$matrikelnummer = generateMatrikelnr($stg_obj->oe_kurzbz);
|
||||
|
||||
if($matrikelnummer != null)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_person SET matr_nr=".$db->db_add_param($matrikelnummer)." WHERE person_id=".$db->db_add_param($prestd->person_id, FHC_INTEGER).' AND matr_nr is null';
|
||||
$db->db_query($qry);
|
||||
}
|
||||
|
||||
if(defined('SET_UID_AS_PERSONENKENNZEICHEN') && SET_UID_AS_PERSONENKENNZEICHEN)
|
||||
{
|
||||
|
||||
@@ -42,6 +42,7 @@ class organisationseinheit extends basis_db
|
||||
public $aktiv=true;
|
||||
public $lehre=true;
|
||||
public $mailverteiler=false;
|
||||
public $standort_id;
|
||||
|
||||
public $oe_kurzbz_orig;
|
||||
public $beschreibung;
|
||||
@@ -133,6 +134,7 @@ class organisationseinheit extends basis_db
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$this->mailverteiler = $this->db_parse_bool($row->mailverteiler);
|
||||
$this->lehre = $this->db_parse_bool($row->lehre);
|
||||
$this->standort_id = $row->standort_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2016 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Nikolaus Krondraf <nikolaus.krondraf@technikum-wien.at>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Funktion zur Generierung der Matrikelnummer
|
||||
* Default: es wird keine Matrikelnummer generiert
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../addon.class.php');
|
||||
|
||||
// die aktiven Addons werden durchsucht, ob eines davon eine eigene Matrikelnummern-Generierung vorsieht
|
||||
// falls ja, wird die Version des Addons genommen, ansonsten die Default Generierung
|
||||
$generateuid_addon_found=false;
|
||||
$generateuid_addons = new addon();
|
||||
|
||||
foreach($generateuid_addons->aktive_addons as $addon)
|
||||
{
|
||||
$generateuid_addon_filename = dirname(__FILE__).'/../../addons/'.$addon.'/vilesci/generatematrikelnr.inc.php';
|
||||
|
||||
if(file_exists($generateuid_addon_filename))
|
||||
{
|
||||
include($generateuid_addon_filename);
|
||||
$generateuid_addon_found=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!$generateuid_addon_found)
|
||||
{
|
||||
function generateMatrikelnr($oe_kurzbz)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user