mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Addon Template angepasst
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014 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: Andreas Österreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Diese Datei fügt zusätzliche Links im CIS Profil ein
|
||||
* Dazu muss die Datei umbenannt werden in profil_array.php
|
||||
*
|
||||
* Dazu wird ein Array aufgebaut welches die Links enthaelt.
|
||||
*
|
||||
* $menu = array('MeinLink'=>array('name'=>'Name des Links','link'=>'../path/to/file.php','target'='content'));
|
||||
*/
|
||||
|
||||
|
||||
// Unterschiedliche Links für Studierende und Mitarbeiter
|
||||
if($type=='student')
|
||||
{
|
||||
if(!$ansicht)
|
||||
$menu['Notenliste']=array('name'=>$p->t('profil/leistungsbeurteilung'), 'link'=>'../lehre/notenliste.php', 'target'=>'content');
|
||||
$menu['LVPlan']=array('name'=>$p->t('profil/lvplanVon').' '.$user->nachname, 'link'=>'../lvplan/stpl_week.php?pers_uid='.$user->uid.'&type=student', 'target'=>'content');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$ansicht)
|
||||
{
|
||||
$menu['Zeitwunsch']=array('name'=>$p->t('profil/zeitwuensche'), 'link'=>'zeitwunsch.php?uid='.$user->uid, 'target'=>'content');
|
||||
$menu['Lehrveranstaltungen']=array('name'=>$p->t('lvaliste/lehrveranstaltungen'), 'link'=>'lva_liste.php?uid='.$user->uid, 'target'=>'content');
|
||||
}
|
||||
|
||||
if(check_lektor(get_uid()))
|
||||
{
|
||||
$menu['Zeitsperren']=array('name'=>$p->t('profil/zeitsperrenVon').' '.$user->nachname, 'link'=>'zeitsperre_days.php?days=30&lektor='.$user->uid, 'target'=>'content');
|
||||
}
|
||||
|
||||
if($uid!=get_uid())
|
||||
{
|
||||
$menu['LVPlan']=array('name'=>$p->t('profil/lvplanVon').' '.$user->nachname, 'link'=>'../lvplan/stpl_week.php?pers_uid='.$user->uid.'&type=lektor', 'target'=>'content');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -27,6 +27,7 @@ addon.push(
|
||||
{
|
||||
// Diese Funktion wird nach dem Laden des FAS aufgerufen
|
||||
|
||||
/*
|
||||
|
||||
// Hinzufuegen eines zusaetzlichen Tabs bei Mitarbeitern mit einem Label darin
|
||||
var tabitem = document.createElement("tab");
|
||||
@@ -58,6 +59,8 @@ addon.push(
|
||||
menuentry.addEventListener("command",AddonTemplateMenuEntry, true);
|
||||
|
||||
statistikmenue.appendChild(menuentry);
|
||||
|
||||
*/
|
||||
},
|
||||
selectMitarbeiter: function(person_id, mitarbeiter_uid)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
In diesem Ordner können Locale-Dateien abgelegt werden.
|
||||
Diese überschreiben globale Locales die unter /locale/ abgelegt sind.
|
||||
|
||||
In den Dateien müssen nicht alle Phrasen vorhanden sein. Es genügt, wenn nur die Phrasen vorhanden sind die überschrieben werden sollen. Alle anderen Phrasen werden aus dem Standard-Ordner übernommen.
|
||||
|
||||
Die Datei mit der Phrase muss jedoch den selben Namen haben wie die Ursprungsdatei in der die Phrase enthalten ist.
|
||||
@@ -0,0 +1,2 @@
|
||||
In diesem Ordner können modifizierte ODT Vorlagen für die Dokumentenerstellung abgelegt werden.
|
||||
Vorlagen die in diesem Ordner abgelegt werden, werden bevorzugt gegenüber jenen die unter /system/vorlage_zip abgelegt sind.
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
*/
|
||||
/**
|
||||
* Benutzerdefinierte Funktion zur Generierung der UIDs
|
||||
* Zur Aktivierung muss die Datei in generateuid.inc.php umbenannt werden
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generiert die UID für Studierende
|
||||
*
|
||||
* @param $stgkzl Studiengangskuerzel
|
||||
* @param $jahr Studienjahr (zB 2014)
|
||||
* @param $stgtyp Studiengangstyp einstellige Ziffer
|
||||
* @param $matrikelnummer Personenkennzeichen des Studierenden
|
||||
*/
|
||||
function generateUID($stgkzl, $jahr, $stgtyp, $matrikelnummer)
|
||||
{
|
||||
return $matrikelnummer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gerneriert die Mitarbeiter UID
|
||||
* Format v.nachname max 20 Zeichen
|
||||
* Im Fall von Doppelnamen wird vor dem Bindestrich abgeschnitten
|
||||
*
|
||||
* @param $vorname Vorname
|
||||
* @param $nachname Nachname
|
||||
* @param $lektor Boolean true wenn Lektor sonst false
|
||||
*/
|
||||
function generateMitarbeiterUID($vorname, $nachname, $lektor)
|
||||
{
|
||||
$bn = new benutzer();
|
||||
$uid='';
|
||||
|
||||
// Wenn ein Bindestrich vorhanden ist (Doppelname), dort abschneiden
|
||||
if(mb_strpos($nachname,'-')!==false)
|
||||
$nachname = mb_substr($nachname, 0, mb_strpos($nachname,'-'));
|
||||
// Nachname wird so lange verkuerzt bis eine eindeutige UID entsteht die noch nicht vergeben ist
|
||||
for($nn=18;$nn!=0;$nn--)
|
||||
{
|
||||
$uid = mb_substr($vorname,0,1);
|
||||
$uid .= mb_substr($nachname,0,$nn);
|
||||
|
||||
$uid = mb_str_replace(' ','',$uid);
|
||||
$uid = mb_str_replace('-','',$uid);
|
||||
|
||||
$uid = mb_strtolower($uid);
|
||||
if(!$bn->uid_exists($uid))
|
||||
return $uid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
/*
|
||||
* Diese Datei überschreibt die Default-Funktionen zur Passwort Änderung
|
||||
* Zur Aktivierung muss die Datei in passwort.inc.php umbenannt werden
|
||||
*
|
||||
* Ansonsten wird die Default Funktionalität unter /include/tw/passwort.inc.php verwendet
|
||||
*/
|
||||
|
||||
/**
|
||||
* Aendert das Passwort
|
||||
* @param $passwort_alt Altes (aktuelles) Passwort
|
||||
* @param $passwort_neu neues Passwort
|
||||
* @param $uid - UID/Benutzername des Users
|
||||
* @return true wenn erfolgreich - Fehlermeldung im Fehlerfall
|
||||
*/
|
||||
function change_password($passwort_alt, $passwort_neu, $uid)
|
||||
{
|
||||
return 'Passwort Änderung fehlgeschlagen.';
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user