Generierung der Matrikelnummer implementiert

This commit is contained in:
Nikolaus Krondraf
2016-01-18 09:55:50 +01:00
parent fd7c8237f8
commit 8fc0e20ef9
3 changed files with 65 additions and 0 deletions
+2
View File
@@ -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
{
+53
View File
@@ -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;
}
}