mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge remote-tracking branch 'origin/feature-25999/C4_cleanup' into feature-25999/C4_cleanup
This commit is contained in:
@@ -58,6 +58,22 @@ class LvMenu extends FHCAPI_Controller
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
|
||||
/**
|
||||
* alternative function to get multiple lvMenus with a single http request
|
||||
*/
|
||||
public function getMultipleLvMenu($lvMenuOptionList){
|
||||
$result =[];
|
||||
foreach($lvMenuOptionList as $lvMenuOptions){
|
||||
$lvMenu = $this->getLvMenu($lvMenuOptions['lvid'],$lvMenuOptions['studiensemester_kurzbz']);
|
||||
if(isError($lvMenu)){
|
||||
// TODO: some lvMenu threw an error, handle error here
|
||||
}
|
||||
$result[$lvMenuOptions['lvid']]=$lvMenu;
|
||||
}
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -91,20 +107,24 @@ class LvMenu extends FHCAPI_Controller
|
||||
$lvres = $this->Lehrveranstaltung_model->load($lvid);
|
||||
if(!hasData($lvres))
|
||||
{
|
||||
$this->terminateWithError('LV ' . $lvid . ' not found.');
|
||||
$this->terminateWithError('LV ' . $lvid . ' not found.');
|
||||
}
|
||||
$lv = (getData($lvres))[0];
|
||||
|
||||
$this->addMeta('lvInfo',$lv);
|
||||
// define studiengang_kz / semester / lehrverzeichnis
|
||||
$studiengang_kz = $lv->studiengang_kz;
|
||||
$semester = $lv->semester;
|
||||
$short = $lv->lehreverzeichnis;
|
||||
// return empty menu for studiengang_kz = 0
|
||||
if($studiengang_kz == 0){
|
||||
$this->terminateWithSuccess("organisatorische_einheit");
|
||||
}
|
||||
|
||||
// load studiengang
|
||||
$stgres = $this->Studiengang_model->load($lv->studiengang_kz);
|
||||
$stgres = $this->Studiengang_model->load(strval($studiengang_kz));
|
||||
if(!hasData($stgres))
|
||||
{
|
||||
$this->terminateWithError('Stg ' . $lv->studiengang_kz . ' nof found.');
|
||||
$this->terminateWithError('Stg ' . $lv->studiengang_kz . ' not found.');
|
||||
}
|
||||
$stg = (getData($stgres))[0];
|
||||
$kurzbz = strtoupper($stg->typ . $stg->kurzbz);
|
||||
|
||||
@@ -88,7 +88,7 @@ class Profil extends FHCAPI_Controller
|
||||
$res->data = $this->studentProfil();
|
||||
$res->data->pid = $this->pid;
|
||||
}
|
||||
|
||||
// editing your own profil - true
|
||||
$editAllowed = true;
|
||||
}
|
||||
// UID is availabe when accessing Profil/View/:uid
|
||||
@@ -495,12 +495,11 @@ class Profil extends FHCAPI_Controller
|
||||
*/
|
||||
private function getPersonInfo($uid, $geburtsInfo = null)
|
||||
{
|
||||
$selectClause = ["foto", "anrede", "titelpost as postnomen", "titelpre as titel", "vorname", "nachname"];
|
||||
$selectClause = ["foto", "foto_sperre", "anrede", "titelpost as postnomen", "titelpre as titel", "vorname", "nachname"];
|
||||
/** @param integer $geburtsInfo */
|
||||
if ($geburtsInfo) {
|
||||
array_push($selectClause, "gebort");
|
||||
array_push($selectClause, "gebdatum");
|
||||
array_push($selectClause, "foto_sperre");
|
||||
}
|
||||
$this->BenutzerModel->addSelect($selectClause);
|
||||
$this->BenutzerModel->addJoin("tbl_person", "person_id");
|
||||
@@ -512,6 +511,12 @@ class Profil extends FHCAPI_Controller
|
||||
$person_res = hasData($person_res) ? getData($person_res)[0] : null;
|
||||
}
|
||||
|
||||
if( ($person_res->foto === null) || (($this->uid !== $uid) && ($person_res->foto_sperre !== false)) )
|
||||
{
|
||||
$dummy_foto = base64_encode(file_get_contents(DOC_ROOT.'skin/images/profilbild_dummy.jpg'));
|
||||
$person_res->foto = $dummy_foto;
|
||||
}
|
||||
|
||||
return $person_res;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Tag_Controller extends FHCAPI_Controller
|
||||
{
|
||||
private $_uid;
|
||||
|
||||
const BERECHTIGUNG_KURZBZ = 'admin:rw';
|
||||
|
||||
public function __construct($permissions)
|
||||
{
|
||||
$default_permissions = [
|
||||
'getTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'getTags' => self::BERECHTIGUNG_KURZBZ,
|
||||
'addTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
|
||||
'updateTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'doneTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'deleteTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
];
|
||||
|
||||
$merged_permissions = array_merge($default_permissions, $permissions);
|
||||
|
||||
parent::__construct($merged_permissions);
|
||||
|
||||
$this->_setAuthUID();
|
||||
$this->load->model('person/Notiz_model', 'NotizModel');
|
||||
$this->load->model('system/Notiztyp_model', 'NotiztypModel');
|
||||
$this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel');
|
||||
}
|
||||
|
||||
public function getTag()
|
||||
{
|
||||
$id = $this->input->get('id');
|
||||
|
||||
$this->NotizModel->addSelect(
|
||||
'tbl_notiz.titel,
|
||||
tbl_notiz.text,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung,
|
||||
tbl_notiz.notiz_id,
|
||||
tbl_notiz_typ.style,
|
||||
tbl_notiz.erledigt as done,
|
||||
tbl_notiz.insertamum,
|
||||
tbl_notiz.updateamum,
|
||||
tbl_notiz.insertvon,
|
||||
tbl_notiz.updatevon
|
||||
'
|
||||
);
|
||||
$this->NotizModel->addJoin('public.tbl_notiz_typ', 'public.tbl_notiz.typ = public.tbl_notiz_typ.typ_kurzbz');
|
||||
$notiz = $this->NotizModel->loadWhere(array('notiz_id' => $id));
|
||||
|
||||
$this->terminateWithSuccess(hasData($notiz) ? getData($notiz)[0] : array());
|
||||
}
|
||||
|
||||
public function getTags()
|
||||
{
|
||||
$this->NotiztypModel->addSelect(
|
||||
'typ_kurzbz as tag_typ_kurzbz,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung,
|
||||
style,
|
||||
beschreibung,
|
||||
tag
|
||||
'
|
||||
);
|
||||
$this->NotiztypModel->addOrder('prioritaet');
|
||||
$notiztypen = $this->NotiztypModel->loadWhere(array('aktiv' => true));
|
||||
$this->terminateWithSuccess(hasData($notiztypen) ? getData($notiztypen) : array());
|
||||
}
|
||||
|
||||
public function addTag($withZuordnung = true)
|
||||
{
|
||||
$postData = $this->getPostJson();
|
||||
|
||||
$checkTyp = $this->NotiztypModel->loadWhere(array('typ_kurzbz' => $postData->tag_typ_kurzbz));
|
||||
|
||||
if (!hasData($checkTyp))
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
|
||||
if ($withZuordnung)
|
||||
{
|
||||
$return = array();
|
||||
$checkZuordnungType = $this->NotizzuordnungModel->isValidType($postData->zuordnung_typ);
|
||||
if (!isSuccess($checkZuordnungType))
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$values = array_unique($postData->values);
|
||||
|
||||
foreach ($values as $value)
|
||||
{
|
||||
$insertResult = $this->addNotiz($postData);
|
||||
|
||||
if (isError($insertResult))
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$insertZuordnung = $this->NotizzuordnungModel->insert(array(
|
||||
'notiz_id' => $insertResult->retval,
|
||||
$postData->zuordnung_typ => $value
|
||||
));
|
||||
|
||||
if (isError($insertZuordnung))
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$return[] = [$postData->zuordnung_typ => $value, 'id' => $insertResult->retval];
|
||||
}
|
||||
$this->terminateWithSuccess($return);
|
||||
}
|
||||
else
|
||||
{
|
||||
$insertResult = $this->addNotiz($postData);
|
||||
if (isError($insertResult))
|
||||
$this->terminateWithError('Error occurred', self::ERROR_TYPE_GENERAL);
|
||||
|
||||
return $insertResult->retval;
|
||||
}
|
||||
}
|
||||
|
||||
private function addNotiz($postData)
|
||||
{
|
||||
return $this->NotizModel->insert(array(
|
||||
'titel' => 'TAG', //TODO klären
|
||||
'text' => $postData->notiz,
|
||||
'verfasser_uid' => $this->_uid,
|
||||
'erledigt' => false,
|
||||
'insertamum' => date('Y-m-d H:i:s'),
|
||||
'insertvon' => $this->_uid,
|
||||
'typ' => $postData->tag_typ_kurzbz
|
||||
));
|
||||
|
||||
}
|
||||
public function updateTag()
|
||||
{
|
||||
$postData = $this->getPostJson();
|
||||
$updateData = $this->NotizModel->update(array('notiz_id' => $postData->id),
|
||||
array('text' => $postData->notiz)
|
||||
);
|
||||
$this->terminateWithSuccess($updateData);
|
||||
}
|
||||
public function doneTag()
|
||||
{
|
||||
$postData = $this->getPostJson();
|
||||
$updateData = $this->NotizModel->update(array('notiz_id' => $postData->id),
|
||||
array('erledigt' => !$postData->done)
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($updateData);
|
||||
}
|
||||
|
||||
public function deleteTag($withZuordnung = true)
|
||||
{
|
||||
$postData = $this->getPostJson();
|
||||
|
||||
$deleteNotiz = "";
|
||||
if ($withZuordnung)
|
||||
{
|
||||
$deleteZuordnung = $this->NotizzuordnungModel->delete(array(
|
||||
'notiz_id' => $postData->id
|
||||
));
|
||||
|
||||
if (isSuccess($deleteZuordnung))
|
||||
{
|
||||
$deleteNotiz = $this->NotizModel->delete(array(
|
||||
'notiz_id' => $postData->id
|
||||
));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$deleteNotiz = $this->NotizModel->delete(array(
|
||||
'notiz_id' => $postData->id
|
||||
));
|
||||
}
|
||||
$this->terminateWithSuccess($deleteNotiz);
|
||||
}
|
||||
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
if (!$this->_uid)
|
||||
show_error('User authentification failed');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -87,18 +87,28 @@ function generateCSSsInclude($CSSs)
|
||||
*/
|
||||
function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->model('system/Sprache_model','SpracheModel');
|
||||
$server_language = getData($ci->SpracheModel->loadWhere(['content' => true]));
|
||||
$server_language = array_map(function($language){
|
||||
return ['sprache'=>$language->sprache, 'locale'=>$language->locale, 'bezeichnung'=>$language->bezeichnung[$language->index-1]];
|
||||
}, $server_language);
|
||||
$user_language = getUserLanguage();
|
||||
|
||||
$FHC_JS_DATA_STORAGE_OBJECT = array(
|
||||
'app_root' => APP_ROOT,
|
||||
'ci_router' => $indexPage,
|
||||
'called_path' => $calledPath,
|
||||
'called_method' => $calledMethod,
|
||||
'server_languages' => $server_language,
|
||||
'user_language' => $user_language,
|
||||
'timezone' => date_default_timezone_get(),
|
||||
);
|
||||
|
||||
$toPrint = "\n";
|
||||
$toPrint .= '<script type="text/javascript">';
|
||||
$toPrint .= '
|
||||
var FHC_JS_DATA_STORAGE_OBJECT = {
|
||||
app_root: "'.APP_ROOT.'",
|
||||
ci_router: "'.$indexPage.'",
|
||||
called_path: "'.$calledPath.'",
|
||||
called_method: "'.$calledMethod.'",
|
||||
user_language: "'.$user_language.'"
|
||||
};';
|
||||
var FHC_JS_DATA_STORAGE_OBJECT = '.json_encode($FHC_JS_DATA_STORAGE_OBJECT).';';
|
||||
$toPrint .= "\n";
|
||||
$toPrint .= '</script>';
|
||||
$toPrint .= "\n\n";
|
||||
|
||||
@@ -33,7 +33,7 @@ class SearchBarLib
|
||||
const ERROR_NOT_AUTH = 'ERR005';
|
||||
|
||||
// List of allowed types of search
|
||||
const ALLOWED_TYPES = ['mitarbeiter', 'mitarbeiter_ohne_zuordnung', 'organisationunit', 'raum', 'person', 'student', 'prestudent', 'document', 'cms'];
|
||||
const ALLOWED_TYPES = ['mitarbeiter', 'mitarbeiter_ohne_zuordnung', 'organisationunit', 'raum', 'person', 'student','studentStv', 'prestudent', 'document', 'cms'];
|
||||
|
||||
const PHOTO_IMG_URL = '/cis/public/bild.php?src=person&person_id=';
|
||||
|
||||
@@ -362,17 +362,26 @@ EOSC;
|
||||
private function _student($searchstr, $type)
|
||||
{
|
||||
$dbModel = new DB_Model();
|
||||
|
||||
$gesperrtes_foto = base64_encode(file_get_contents(DOC_ROOT.'skin/images/profilbild_dummy.jpg'));
|
||||
$students = $dbModel->execReadOnlyQuery('
|
||||
SELECT
|
||||
\''.$type.'\' AS type,
|
||||
s.student_uid AS uid,
|
||||
CONCAT(s.student_uid,\'@'.DOMAIN.'\') AS email,
|
||||
s.matrikelnr,
|
||||
CONCAT(UPPER(stg.typ),UPPER(stg.kurzbz),\'-\',s.semester,s.verband) as verband,
|
||||
stg.bezeichnung AS studiengang,
|
||||
p.person_id AS person_id,
|
||||
p.vorname || \' \' || p.nachname AS name,
|
||||
k.kontakt as email ,
|
||||
p.foto
|
||||
CASE
|
||||
when s.student_uid = \''.getAuthUID().'\' then p.foto
|
||||
when p.foto IS NULL then \''.$gesperrtes_foto.'\'
|
||||
when p.foto_sperre = false then p.foto
|
||||
else \''.$gesperrtes_foto.'\'
|
||||
end as foto,
|
||||
b.aktiv
|
||||
FROM public.tbl_student s
|
||||
JOIN public.tbl_studiengang stg USING(studiengang_kz)
|
||||
JOIN public.tbl_benutzer b ON(b.uid = s.student_uid)
|
||||
JOIN public.tbl_person p USING(person_id)
|
||||
LEFT JOIN (
|
||||
@@ -380,10 +389,57 @@ EOSC;
|
||||
FROM public.tbl_kontakt
|
||||
WHERE kontakttyp = \'email\'
|
||||
) as k USING(person_id)
|
||||
WHERE b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
WHERE
|
||||
b.aktiv = TRUE
|
||||
AND (b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\')
|
||||
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name,
|
||||
email, p.foto, s.verband, s.semester, stg.bezeichnung,
|
||||
stg.typ, stg.kurzbz, b.aktiv
|
||||
ORDER BY b.aktiv DESC, p.nachname ASC, p.vorname ASC
|
||||
');
|
||||
|
||||
// If something has been found then return it
|
||||
if (hasData($students)) return getData($students);
|
||||
|
||||
// Otherwise return an empty array
|
||||
return array();
|
||||
}
|
||||
|
||||
private function _studentStv($searchstr, $type)
|
||||
{
|
||||
$dbModel = new DB_Model();
|
||||
|
||||
$students = $dbModel->execReadOnlyQuery('
|
||||
SELECT
|
||||
\''.$type.'\' AS type,
|
||||
s.student_uid AS uid,
|
||||
s.matrikelnr,
|
||||
CONCAT(UPPER(stg.typ),UPPER(stg.kurzbz),\'-\',s.semester,s.verband) as verband,
|
||||
stg.bezeichnung AS studiengang,
|
||||
p.person_id AS person_id,
|
||||
p.vorname || \' \' || p.nachname AS name,
|
||||
k.kontakt AS email,
|
||||
p.foto,
|
||||
b.aktiv
|
||||
FROM public.tbl_student s
|
||||
JOIN public.tbl_studiengang stg USING(studiengang_kz)
|
||||
JOIN public.tbl_benutzer b ON(b.uid = s.student_uid)
|
||||
JOIN public.tbl_person p USING(person_id)
|
||||
LEFT JOIN (
|
||||
SELECT kontakt, person_id
|
||||
FROM public.tbl_kontakt
|
||||
WHERE kontakttyp = \'email\'
|
||||
) as k USING(person_id)
|
||||
WHERE
|
||||
b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name, email, p.foto
|
||||
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name,
|
||||
k.kontakt, p.foto, s.verband, s.semester, stg.bezeichnung,
|
||||
stg.typ, stg.kurzbz, b.aktiv
|
||||
ORDER BY b.aktiv DESC, p.nachname ASC, p.vorname ASC
|
||||
');
|
||||
|
||||
// If something has been found then return it
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class LehrveranstaltungFaktor_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'lehre.tbl_lehrveranstaltung_faktor';
|
||||
$this->pk = 'lehrveranstaltung_faktor_id';
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ class Notiz_model extends DB_Model
|
||||
$this->addSelect('public.tbl_notiz.*');
|
||||
$this->addJoin('public.tbl_notizzuordnung', 'notiz_id');
|
||||
|
||||
return $this->loadWhere(array('person_id' => $person_id));
|
||||
return $this->loadWhere(array('person_id' => $person_id, 'tbl_notiz.typ' => NULL));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
class Projects_Employees_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'sync.tbl_projects_employees';
|
||||
$this->pk = 'projects_employees_id';
|
||||
}
|
||||
|
||||
public function deleteByProjectTaskId($ids)
|
||||
{
|
||||
$qry = "DELETE FROM " . $this->dbTable . "
|
||||
WHERE project_task_id IN ?";
|
||||
|
||||
return $this->execQuery($qry, array($ids));
|
||||
}
|
||||
}
|
||||
@@ -13,5 +13,33 @@ class Stundensatz_model extends DB_Model
|
||||
$this->pk = 'stundensatz_id';
|
||||
$this->hasSequence = true;
|
||||
}
|
||||
|
||||
|
||||
public function getStundensatzByDatum($uid, $beginn, $ende = null, $typ = null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
hr.tbl_stundensatz
|
||||
WHERE
|
||||
uid = ?
|
||||
AND (gueltig_bis >= ? OR gueltig_bis is null)";
|
||||
|
||||
$params = array($uid, $beginn);
|
||||
|
||||
if (!is_null($ende))
|
||||
{
|
||||
$qry .= " AND (gueltig_von <= ?)";
|
||||
$params[] = $ende;
|
||||
}
|
||||
|
||||
if (!is_null($typ))
|
||||
{
|
||||
$qry .= " AND stundensatztyp = ?";
|
||||
$params[] = $typ;
|
||||
}
|
||||
|
||||
$qry .= " ORDER BY gueltig_bis DESC NULLS FIRST, gueltig_von DESC NULLS LAST LIMIT 1;";
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Notiztyp_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'public.tbl_notiz_typ';
|
||||
$this->pk = 'typ_kurzbz';
|
||||
}
|
||||
}
|
||||
@@ -45,3 +45,4 @@
|
||||
$tablewidget = isset($tablewidget) ? $tablewidget : false;
|
||||
$udfs = isset($udfs) ? $udfs : false;
|
||||
$widgets = isset($widgets) ? $widgets : false;
|
||||
$tags = isset($tags) ? $tags : false;
|
||||
|
||||
@@ -119,6 +119,9 @@
|
||||
// CIS
|
||||
if ($cis === true) generateCSSsInclude(defined('CIS4') ? 'public/css/cis4.css' : 'public/css/cis_bs5.css');
|
||||
|
||||
//Tags
|
||||
if ($tags === true) generateCSSsInclude('public/css/tags.css');
|
||||
|
||||
// Eventually required CSS
|
||||
generateCSSsInclude($customCSSs); // Eventually required CSS
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
<?php
|
||||
|
||||
require_once(dirname(__FILE__) . '/basis_db.class.php');
|
||||
require_once(dirname(__FILE__) . '/functions.inc.php');
|
||||
|
||||
class lehrveranstaltung_faktor extends basis_db
|
||||
{
|
||||
public $lehrveranstaltung_faktor_id; // serial
|
||||
public $lehrveranstaltung_id; // integer
|
||||
public $faktor; // numeric
|
||||
public $studiensemester_kurzbz_von; // varchar(16)
|
||||
public $studiensemester_kurzbz_bis; // varchar(16)
|
||||
public $insertamum; // timestamp
|
||||
public $insertvon; // varchar(32)
|
||||
public $updateamum; // timestamp
|
||||
public $updatevon; // varchar(32)
|
||||
public $lv_faktoren = array(); // lehrveranstaltung Objekt
|
||||
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $lehrveranstaltung_faktor_id
|
||||
*/
|
||||
public function __construct($lehrveranstaltung_faktor_id = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if (!is_null($lehrveranstaltung_faktor_id))
|
||||
$this->load($lehrveranstaltung_faktor_id);
|
||||
}
|
||||
|
||||
|
||||
public function load($lehrveranstaltung_faktor_id)
|
||||
{
|
||||
if (!is_numeric($lehrveranstaltung_faktor_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_faktor_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM lehre.tbl_lehrveranstaltung_faktor
|
||||
WHERE lehrveranstaltung_faktor_id=".$this->db_add_param($lehrveranstaltung_faktor_id, FHC_INTEGER);
|
||||
|
||||
if (!$this->db_query($qry)) {
|
||||
$this->errormsg = 'Datensatz konnte nicht geladen werden';
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->lehrveranstaltung_faktor_id = $row->lehrveranstaltung_faktor_id;
|
||||
$this->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$this->faktor = $row->faktor;
|
||||
$this->studiensemester_kurzbz_von = $row->studiensemester_kurzbz_von;
|
||||
$this->studiensemester_kurzbz_bis = $row->studiensemester_kurzbz_bis;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function loadByLV($lv_id, $von = null, $bis = null, $id = null)
|
||||
{
|
||||
|
||||
if (!is_numeric($lv_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_faktor_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
$qry = "SELECT *
|
||||
FROM lehre.tbl_lehrveranstaltung_faktor
|
||||
LEFT JOIN public.tbl_studiensemester vonstsem
|
||||
ON tbl_lehrveranstaltung_faktor.studiensemester_kurzbz_von = vonstsem.studiensemester_kurzbz
|
||||
LEFT JOIN public.tbl_studiensemester bisstem
|
||||
ON tbl_lehrveranstaltung_faktor.studiensemester_kurzbz_bis = bisstem.studiensemester_kurzbz
|
||||
WHERE lehrveranstaltung_id = ".$this->db_add_param($lv_id, FHC_INTEGER);
|
||||
|
||||
if(!empty($von))
|
||||
{
|
||||
$qry .= "
|
||||
AND (bisstem.ende >= (
|
||||
SELECT start
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE studiensemester_kurzbz = " . $this->db_add_param($von, FHC_STRING) . "
|
||||
)
|
||||
OR bisstem.ende IS NULL
|
||||
)";
|
||||
}
|
||||
|
||||
if(!empty($bis) && $bis !== "")
|
||||
{
|
||||
$qry .= "
|
||||
AND
|
||||
(vonstsem.start <= (
|
||||
SELECT ende
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE studiensemester_kurzbz = " . $this->db_add_param($bis, FHC_STRING) . "
|
||||
))
|
||||
";
|
||||
}
|
||||
|
||||
if (!empty($id) && $id !== "")
|
||||
{
|
||||
$qry .= "
|
||||
AND
|
||||
lehrveranstaltung_faktor_id != ". $this->db_add_param($id, FHC_INTEGER);
|
||||
}
|
||||
|
||||
if (!$result = $this->db_query($qry)) {
|
||||
$this->errormsg = 'Datensatz konnte nicht geladen werden';
|
||||
return false;
|
||||
}
|
||||
|
||||
while ($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$lv_faktor_objekt = new lehrveranstaltung_faktor();
|
||||
|
||||
$lv_faktor_objekt->lehrveranstaltung_faktor_id = $row->lehrveranstaltung_faktor_id;
|
||||
$lv_faktor_objekt->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$lv_faktor_objekt->faktor = $row->faktor;
|
||||
$lv_faktor_objekt->studiensemester_kurzbz_von = $row->studiensemester_kurzbz_von;
|
||||
$lv_faktor_objekt->studiensemester_kurzbz_bis = $row->studiensemester_kurzbz_bis;
|
||||
|
||||
$this->lv_faktoren[] = $lv_faktor_objekt;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function addFaktor($lv_id, $faktor, $von, $bis = NULL)
|
||||
{
|
||||
$qry = 'INSERT INTO lehre.tbl_lehrveranstaltung_faktor (lehrveranstaltung_id, faktor, studiensemester_kurzbz_von, studiensemester_kurzbz_bis)
|
||||
VALUES ('. $this->db_add_param($lv_id, FHC_INTEGER) . ', '.
|
||||
$this->db_add_param($faktor, FHC_INTEGER) . ', '.
|
||||
$this->db_add_param($von, FHC_STRING) . ', '.
|
||||
$this->db_add_param($bis, FHC_STRING) . ');';
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
$qry_id = "SELECT currval('lehre.lehrveranstaltung_faktor_id_seq') as id;";
|
||||
if($this->db_query($qry_id))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->db_query('COMMIT');
|
||||
return [
|
||||
'id' => $row->id,
|
||||
'lv_id' => $lv_id,
|
||||
'faktor' => $faktor,
|
||||
'von' => $von,
|
||||
'bis' => $bis
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db_query('ROLLBACK');
|
||||
return [
|
||||
'status' => 'error',
|
||||
'message' => 'Fehler beim Einfügen in die Datenbank:'
|
||||
];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db_query('ROLLBACK');
|
||||
return [
|
||||
'status' => 'error',
|
||||
'message' => 'Fehler beim Einfügen in die Datenbank:'
|
||||
];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return [
|
||||
'status' => 'error',
|
||||
'message' => 'Fehler beim Einfügen in die Datenbank:'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public function updateFaktor($id, $faktor, $von, $bis)
|
||||
{
|
||||
$qry = "UPDATE lehre.tbl_lehrveranstaltung_faktor
|
||||
SET faktor = ". $this->db_add_param($faktor) ." ,
|
||||
studiensemester_kurzbz_von = ". $this->db_add_param($von) .",
|
||||
studiensemester_kurzbz_bis = ". $this->db_add_param($bis) ."
|
||||
WHERE lehrveranstaltung_faktor_id = ". $this->db_add_param($id, FHC_INTEGER);
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [
|
||||
'status' => 'error',
|
||||
'message' => 'Fehler beim Einfügen in die Datenbank:'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public function getAkt($lv_id)
|
||||
{
|
||||
if (!is_numeric($lv_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT *
|
||||
FROM lehre.tbl_lehrveranstaltung_faktor
|
||||
LEFT JOIN public.tbl_studiensemester vonstsem
|
||||
ON tbl_lehrveranstaltung_faktor.studiensemester_kurzbz_von = vonstsem.studiensemester_kurzbz
|
||||
LEFT JOIN public.tbl_studiensemester bisstem
|
||||
ON tbl_lehrveranstaltung_faktor.studiensemester_kurzbz_bis = bisstem.studiensemester_kurzbz
|
||||
WHERE lehrveranstaltung_id = ".$this->db_add_param($lv_id, FHC_INTEGER) . "
|
||||
AND (vonstsem.start <= now() OR vonstsem.start IS NULL)
|
||||
AND (bisstem.ende >= now() OR bisstem.ende IS NULL)
|
||||
ORDER BY vonstsem.start DESC LIMIT 1
|
||||
";
|
||||
|
||||
|
||||
if (!$this->db_query($qry)) {
|
||||
$this->errormsg = 'Datensatz konnte nicht geladen werden';
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->lehrveranstaltung_faktor_id = $row->lehrveranstaltung_faktor_id;
|
||||
$this->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$this->faktor = $row->faktor;
|
||||
$this->studiensemester_kurzbz_von = $row->studiensemester_kurzbz_von;
|
||||
$this->studiensemester_kurzbz_bis = $row->studiensemester_kurzbz_bis;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function deleteFaktor($id)
|
||||
{
|
||||
$qry = "DELETE FROM lehre.tbl_lehrveranstaltung_faktor
|
||||
WHERE lehrveranstaltung_faktor_id = ". $this->db_add_param($id, FHC_INTEGER);
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [
|
||||
'status' => 'error',
|
||||
'message' => 'Fehler beim Löschen aus der Datenbank:'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1237,7 +1237,7 @@ class mitarbeiter extends benutzer
|
||||
".$this->db_add_param($datumvon)." BETWEEN COALESCE(vbskarenz.von, '1970-01-01') AND COALESCE(vbskarenz.bis, '2170-12-31')
|
||||
OR
|
||||
".$this->db_add_param($datumbis)." BETWEEN COALESCE(vbskarenz.von, '1970-01-01') AND COALESCE(vbskarenz.bis, '2170-12-31')
|
||||
)
|
||||
) LIMIT 1
|
||||
) NULLS FIRST LIMIT 1
|
||||
|
||||
)
|
||||
|
||||
@@ -325,7 +325,7 @@ class notiz extends basis_db
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE 1=1";
|
||||
WHERE 1=1 AND tbl_notiz.typ IS NULL ";
|
||||
|
||||
if(!is_null($erledigt))
|
||||
{
|
||||
@@ -523,7 +523,7 @@ class notiz extends basis_db
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE 1=1";
|
||||
WHERE 1=1 AND tbl_notiz.typ IS NULL ";
|
||||
|
||||
if(!is_null($erledigt))
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
width: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.searchbar_results_scroller {
|
||||
@@ -109,3 +110,7 @@
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE/Edge */
|
||||
}
|
||||
|
||||
.searchbar_inaktiv {
|
||||
opacity: .6;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
.tag {
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
margin-right: 5px;
|
||||
border-radius: 3px;
|
||||
color: white;
|
||||
font-size: .75em;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.tag:hover
|
||||
{
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
.tag_rot {
|
||||
background-color: #ff0000ff;
|
||||
}
|
||||
|
||||
.tag_gelb {
|
||||
background-color: #ffff00ff;
|
||||
color: black;
|
||||
}
|
||||
.tag_gruen {
|
||||
background-color: #008000ff;
|
||||
}
|
||||
|
||||
.tag_rosa {
|
||||
background-color: #FFC1C1;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.tag_aprikose {
|
||||
background-color: #4f7596;
|
||||
}
|
||||
|
||||
.tag_pfirsich {
|
||||
background-color: #a15f95;
|
||||
}
|
||||
|
||||
.tag_orange {
|
||||
background-color: #ffA500ff;
|
||||
}
|
||||
|
||||
|
||||
.tag_braun {
|
||||
background-color: #6d4c41;
|
||||
}
|
||||
|
||||
.tag_blau {
|
||||
background-color: #508498;
|
||||
}
|
||||
|
||||
.tag_lavendel {
|
||||
background-color: #C7A3FF;
|
||||
}
|
||||
|
||||
.tag_limette {
|
||||
background-color: #D3FFCE;
|
||||
}
|
||||
|
||||
.tag_done {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.display_all {
|
||||
background-color: darkgrey !important;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dropdown_list {
|
||||
list-style: none;
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
padding: 10px 10px 10px;
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.plus_button_container.disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.modificationdate {
|
||||
font-style: italic;
|
||||
font-size: 0.7em;
|
||||
text-align: left;
|
||||
}
|
||||
@@ -18,6 +18,7 @@ const app = Vue.createApp({
|
||||
calcheightonly: true,
|
||||
types: [
|
||||
"mitarbeiter",
|
||||
"student",
|
||||
"raum",
|
||||
"organisationunit"
|
||||
],
|
||||
@@ -33,6 +34,17 @@ const app = Vue.createApp({
|
||||
},
|
||||
childactions: []
|
||||
},
|
||||
student: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
"/Cis/Profil/View/" + data.uid;
|
||||
|
||||
}
|
||||
},
|
||||
childactions: []
|
||||
},
|
||||
raum: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.format({ year: 'numeric' }) + ' KW ' + this.focusDate.w;
|
||||
return this.focusDate.wYear + ' KW ' + this.focusDate.w;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -102,9 +102,9 @@ export default {
|
||||
dayText(){
|
||||
if(!this.size || !this.day)return {};
|
||||
return {
|
||||
heading: this.day.toLocaleString(this.$p.user_language_locale_identifier.value, { dateStyle: 'short' }),
|
||||
tag: this.day.toLocaleString(this.$p.user_language_locale_identifier.value, { weekday: this.size < 2 ? 'narrow' : (this.size < 3 ? 'short' : 'long') }),
|
||||
datum: this.day.toLocaleString(this.$p.user_language_locale_identifier.value, [{ day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { dateStyle: 'short' }][this.size]),
|
||||
heading: this.day.toLocaleString(this.$p.user_locale.value, { dateStyle: 'short' }),
|
||||
tag: this.day.toLocaleString(this.$p.user_locale.value, { weekday: this.size < 2 ? 'narrow' : (this.size < 3 ? 'short' : 'long') }),
|
||||
datum: this.day.toLocaleString(this.$p.user_locale.value, [{ day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { dateStyle: 'short' }][this.size]),
|
||||
}
|
||||
},
|
||||
dayGridStyle() {
|
||||
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.format({month: ['short','long','long','long'][this.size], year: 'numeric'}, this.$p.user_language_locale_identifier.value);
|
||||
return this.focusDate.format({month: ['short','long','long','long'][this.size], year: 'numeric'}, this.$p.user_locale.value);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
if (!this.size || !this.weeks[0]?.days) return {};
|
||||
let dayTextMap ={};
|
||||
this.weeks[0].days.forEach((day)=>{
|
||||
dayTextMap[day] = day.toLocaleString(this.$p.user_language_locale_identifier.value, { weekday: this.size < 1 ? 'narrow' : (this.size < 3 ? 'short' : 'long') });
|
||||
dayTextMap[day] = day.toLocaleString(this.$p.user_locale.value, { weekday: this.size < 1 ? 'narrow' : (this.size < 3 ? 'short' : 'long') });
|
||||
});
|
||||
return dayTextMap;
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
return this.focusDate.format({year: 'numeric'});
|
||||
},
|
||||
months() {
|
||||
return this.monthIndices.map(i => (new Date(0, i, 1)).toLocaleString(this.$p.user_language_locale_identifier.value, {month: this.size < 2 ? 'short' : 'long'}));
|
||||
return this.monthIndices.map(i => (new Date(0, i, 1)).toLocaleString(this.$p.user_locale.value, {month: this.size < 2 ? 'short' : 'long'}));
|
||||
}
|
||||
},
|
||||
template: `
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.format({ year: 'numeric' }) + ' KW ' + this.focusDate.w;
|
||||
return this.focusDate.wYear + ' KW ' + this.focusDate.w;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -61,9 +61,9 @@ export default {
|
||||
let dayTextMap ={};
|
||||
this.days.forEach((day)=>{
|
||||
dayTextMap[day] = {
|
||||
heading: day.toLocaleString(this.$p.user_language_locale_identifier.value, { dateStyle: 'short' }),
|
||||
tag: day.toLocaleString(this.$p.user_language_locale_identifier.value, { weekday: this.size < 2 ? 'narrow' : (this.size < 3 ? 'short' : 'long') }),
|
||||
datum: day.toLocaleString(this.$p.user_language_locale_identifier.value, [{ day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { dateStyle: 'short' }][this.size]),
|
||||
heading: day.toLocaleString(this.$p.user_locale.value, { dateStyle: 'short' }),
|
||||
tag: day.toLocaleString(this.$p.user_locale.value, { weekday: this.size < 2 ? 'narrow' : (this.size < 3 ? 'short' : 'long') }),
|
||||
datum: day.toLocaleString(this.$p.user_locale.value, [{ day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { day: 'numeric', month: 'numeric' }, { dateStyle: 'short' }][this.size]),
|
||||
};
|
||||
});
|
||||
return dayTextMap;
|
||||
|
||||
@@ -39,6 +39,12 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is_organisatorische_einheit(){
|
||||
return this.menu == "organisatorische_einheit";
|
||||
},
|
||||
emptyMenu(){
|
||||
return !this.menu || !Array.isArray(this.menu) || Array.isArray(this.menu) && this.menu.length == 0;
|
||||
},
|
||||
bodyStyle() {return {};
|
||||
const bodyStyle = {};
|
||||
if (this.farbe)
|
||||
@@ -53,6 +59,17 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
fetchMenu(lehrveranstaltung_id = this.lehrveranstaltung_id, studien_semester = this.studien_semester){
|
||||
return this.$fhcApi.factory.addons.getLvMenu(lehrveranstaltung_id, studien_semester)
|
||||
.then(res => {
|
||||
this.menu = res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
this.menu = [];
|
||||
});
|
||||
},
|
||||
|
||||
c4_link(menuItem) {
|
||||
if (!menuItem) return null;
|
||||
if (Array.isArray(menuItem.c4_moodle_links) && menuItem.c4_moodle_links.length) {
|
||||
@@ -103,11 +120,7 @@ export default {
|
||||
},
|
||||
watch:{
|
||||
studien_semester(newValue){
|
||||
this.$fhcApi.factory.addons.getLvMenu(this.lehrveranstaltung_id, newValue)
|
||||
.then(res => {
|
||||
this.menu = res.data;
|
||||
})
|
||||
.catch((error) => this.$fhcAlert.handleSystemError);
|
||||
this.fetchMenu(this.lehrveranstaltung_id, newValue);
|
||||
}
|
||||
},
|
||||
created(){
|
||||
@@ -119,14 +132,7 @@ export default {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$fhcApi.factory.addons.getLvMenu(this.lehrveranstaltung_id, this.studien_semester)
|
||||
.then(res => {
|
||||
this.menu = res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$fhcAlert.handleSystemError(error);
|
||||
this.menu = [];
|
||||
});
|
||||
this.fetchMenu(this.lehrveranstaltung_id, this.studien_semester);
|
||||
},
|
||||
template: /*html*/`<div class="mylv-semester-studiengang-lv card">
|
||||
<lv-uebersicht ref="lvUebersicht" :preselectedMenu="preselectedMenuItem" :event="{
|
||||
@@ -136,11 +142,12 @@ export default {
|
||||
stg_kurzbzlang:studien_semester,
|
||||
}"/>
|
||||
|
||||
<div class="card-header">
|
||||
<div class="p-2" :class="is_organisatorische_einheit?'':'card-header'">
|
||||
<!-- {{module}} if the module of the lv is important then query the module from the api endpoint for LV-->
|
||||
<h6 class="card-title">{{bezeichnung}}</h6>
|
||||
<h6 class="fw-bold" v-if="is_organisatorische_einheit" >Organisatorische Einheit:</h6>
|
||||
<h6 class="mb-0">{{bezeichnung}}</h6>
|
||||
</div>
|
||||
<div class="card-body " :style="bodyStyle">
|
||||
<div v-if="!emptyMenu" class="card-body " :style="bodyStyle">
|
||||
<template v-if="menu">
|
||||
<ul class="list-group border-top-0 border-bottom-0 rounded-0">
|
||||
<li :type="menuItem.c4_link ? 'button' : null" v-for="menuItem in menu" class="list-group-item border-0 " >
|
||||
@@ -164,7 +171,7 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div v-if="!emptyMenu" class="card-footer">
|
||||
<div class="row">
|
||||
<template v-if="LvHasPruefungenInformation">
|
||||
<a href="#" class="col-auto text-start text-decoration-none" @click.prevent="openPruefungen">
|
||||
|
||||
@@ -252,12 +252,12 @@ export default {
|
||||
<div class="row">
|
||||
<div class="d-md-none col-12 ">
|
||||
|
||||
<div class="row mb-3">
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<!-- MOBILE QUICK LINKS -->
|
||||
<quick-links :title="$p.t('profil','quickLinks')" :mobile="true"></quick-links>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!-- Bearbeiten Button -->
|
||||
|
||||
@@ -426,17 +426,17 @@ export default {
|
||||
|
||||
|
||||
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<!-- QUICK LINKS -->
|
||||
<quick-links :title="$p.t('profil','quickLinks')"></quick-links>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!-- Bearbeiten Button -->
|
||||
|
||||
|
||||
@@ -134,27 +134,29 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
template: /*html*/ `
|
||||
template: /*html*/ `
|
||||
|
||||
<div class="container-fluid text-break fhc-form" >
|
||||
<!-- ROW -->
|
||||
<!-- ROW -->
|
||||
<div class="row">
|
||||
<!-- HIDDEN QUICK LINKS -->
|
||||
<!-- TODO: uncomment when implemented
|
||||
<div class="d-md-none col-12 ">
|
||||
|
||||
|
||||
<quick-links :title="$p.t('profil','quickLinks')" :mobile="true" ></quick-links>
|
||||
|
||||
</div>
|
||||
-->
|
||||
<!-- END OF HIDDEN QUCK LINKS -->
|
||||
|
||||
<!-- MAIN PANNEL -->
|
||||
<div class="col-sm-12 col-md-8 col-xxl-9 ">
|
||||
<!-- ROW WITH PROFIL IMAGE AND INFORMATION -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- INFORMATION CONTENT START -->
|
||||
<!-- ROW WITH THE PROFIL INFORMATION -->
|
||||
<!-- ROW WITH THE PROFIL INFORMATION -->
|
||||
<div class="row mb-4">
|
||||
|
||||
|
||||
@@ -163,17 +165,17 @@ export default {
|
||||
<div class="col-lg-12 col-xl-6 ">
|
||||
<div class="row mb-4">
|
||||
<div class="col">
|
||||
|
||||
|
||||
<!-- Profil Informationen -->
|
||||
<profil-information :title="$p.t('profil','mitarbeiterIn')" :data="profilInformation" :editable="editable"></profil-information>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- START OF SECOND PROFIL INFORMATION COLUMN -->
|
||||
|
||||
|
||||
|
||||
<!-- END OF PROFIL INFORMATION ROW -->
|
||||
<!-- INFORMATION CONTENT END -->
|
||||
@@ -185,21 +187,21 @@ export default {
|
||||
|
||||
<!-- EMAILS -->
|
||||
<profil-emails :title="this.$p.t('person','email')" :data="personEmails"></profil-emails>
|
||||
|
||||
|
||||
</div></div>
|
||||
|
||||
|
||||
<!-- SECOND ROW OF SECOND COLUMN IN MAIN CONTENT -->
|
||||
<div class="row mb-4">
|
||||
|
||||
|
||||
|
||||
<div class=" col-lg-12">
|
||||
|
||||
|
||||
<!-- roleInformation -->
|
||||
<role-information :data="roleInformation" :title="$p.t('profil','mitarbeiterInformation')"></role-information>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- END OF SECOND ROW OF SECOND COLUMN IN MAIN CONTENT -->
|
||||
|
||||
@@ -210,15 +212,15 @@ export default {
|
||||
</div>
|
||||
|
||||
|
||||
<!-- START OF THE SECOND PROFIL INFORMATION ROW -->
|
||||
|
||||
|
||||
<!-- START OF THE SECOND PROFIL INFORMATION ROW -->
|
||||
|
||||
|
||||
<!-- ROW WITH PROFIL IMAGE AND INFORMATION END -->
|
||||
</div >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -231,7 +233,7 @@ export default {
|
||||
<core-filter-cmpt @tableBuilt="funktionenTableBuilt" :title="$p.t('person','funktionen')" ref="funktionenTable" :tabulator-options="funktionen_table_options" tableOnly :sideMenu="false" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- END OF THE ROW WITH THE TABLES UNDER THE PROFIL INFORMATION -->
|
||||
</div>
|
||||
@@ -243,15 +245,15 @@ export default {
|
||||
<div class="col-md-4 col-xxl-3 col-sm-12 text-break" >
|
||||
|
||||
<!-- VISIBLE UNTIL VIEWPORT MD -->
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
<div class="col">
|
||||
|
||||
<!-- QUICKLINKS -->
|
||||
|
||||
<quick-links :title="$p.t('profil','quickLinks')" ></quick-links>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-->
|
||||
<div class="row">
|
||||
|
||||
<div class="col">
|
||||
|
||||
@@ -194,11 +194,12 @@ export default {
|
||||
<div class="row">
|
||||
<!-- HIDDEN QUICK LINKS -->
|
||||
<div class="d-md-none col-12 ">
|
||||
<div class="row py-2">
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row py-2">
|
||||
<div class="col">
|
||||
<quick-links :title="$p.t('profil','quickLinks')" :mobile="true"></quick-links>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!-- Bearbeiten Button -->
|
||||
<div v-if="editable" class="row ">
|
||||
@@ -314,12 +315,12 @@ export default {
|
||||
</div>
|
||||
<!-- START OF SIDE PANEL -->
|
||||
<div class="col-md-4 col-xxl-3 col-sm-12 text-break" >
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
<div class="col">
|
||||
<!-- QUICK LINKS -->
|
||||
<quick-links :title="$p.t('profil','quickLinks')"></quick-links>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- Bearbeiten Button -->
|
||||
<div class="row d-none d-md-block">
|
||||
<div class="col mb-3">
|
||||
|
||||
@@ -69,11 +69,12 @@ export default {
|
||||
<!-- ROW -->
|
||||
<div class="row">
|
||||
<!-- HIDDEN QUICK LINKS -->
|
||||
<div class="d-md-none col-12 ">
|
||||
<!-- uncomment when implemented
|
||||
<div class="d-md-none col-12 ">
|
||||
|
||||
<quick-links :title="$p.t('profil','quickLinks')" :mobile="true"></quick-links>
|
||||
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- END OF HIDDEN QUCK LINKS -->
|
||||
|
||||
<!-- MAIN PANNEL -->
|
||||
@@ -148,13 +149,15 @@ export default {
|
||||
|
||||
<!-- START OF THE FIRDT ROW IN THE SIDE PANEL -->
|
||||
<!-- THESE QUCK LINKS ARE ONLY VISIBLE UNTIL VIEWPORT MD -->
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
<div class="col">
|
||||
|
||||
<quick-links :title="$p.t('profil','quickLinks')"></quick-links>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!-- START OF THE SECOND ROW IN THE SIDE PANEL -->
|
||||
<div class="row">
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
allActiveLanguages: null,
|
||||
sprachenTranslation:null,
|
||||
allActiveLanguages: FHC_JS_DATA_STORAGE_OBJECT.server_languages,
|
||||
}
|
||||
},
|
||||
emits: ['languageChanged'],
|
||||
methods:{
|
||||
changeLanguage: function(lang){
|
||||
if(this.allActiveLanguages.some(l => l === lang))
|
||||
if(this.allActiveLanguages.some(l => l.sprache === lang))
|
||||
{
|
||||
this.$p.setLanguage(lang, this.$fhcApi)
|
||||
.then(res => res.data)
|
||||
@@ -18,25 +17,11 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
getSprachenBezeichnung: function(lang){
|
||||
if (!Array.isArray(this.sprachenTranslation) || this.sprachenTranslation.length == 0) return;
|
||||
return this.sprachenTranslation.find(s=>s.sprache == lang)?.bezeichnung;
|
||||
},
|
||||
},
|
||||
mounted(){
|
||||
this.$fhcApi.factory.phrasen.getActiveDbLanguages()
|
||||
.then(res => res.data)
|
||||
.then(
|
||||
(langs) => {
|
||||
this.allActiveLanguages = langs.map(l=>l.sprache);
|
||||
this.sprachenTranslation = langs;
|
||||
}
|
||||
);
|
||||
},
|
||||
template:/*html*/`
|
||||
<div class="container">
|
||||
<div class="row justify-content-center align-items-center flex-nowrap overflow-hidden">
|
||||
<button v-for="lang in allActiveLanguages" @click.prevent="changeLanguage(lang)" class="col text-white fhc-entry btn text-center w-100" :selected="$p.user_language.value==lang?'':null">{{getSprachenBezeichnung(lang)}}</button>
|
||||
<button v-for="lang in allActiveLanguages" @click.prevent="changeLanguage(lang.sprache)" class="col text-white fhc-entry btn text-center w-100" :selected="$p.user_language.value==lang.sprache?'':null">{{lang.bezeichnung}}</button>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
cssclass: "position-relative",
|
||||
calcheightonly: true,
|
||||
types: [
|
||||
"student",
|
||||
"studentStv",
|
||||
"prestudent"
|
||||
],
|
||||
actions: {
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
import CoreForm from '../Form/Form.js';
|
||||
import FormInput from "../Form/Input.js";
|
||||
import BsModal from '../Bootstrap/Modal.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreForm,
|
||||
FormInput,
|
||||
BsModal,
|
||||
},
|
||||
emits: [
|
||||
'added',
|
||||
'updated',
|
||||
'deleted',
|
||||
],
|
||||
props: {
|
||||
endpoint: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
zuordnung_typ: String,
|
||||
savepoint: {},
|
||||
values: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
confirmLimit: {
|
||||
type: Number,
|
||||
default: 20
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showList: false,
|
||||
selectedTagId: null,
|
||||
tagData: {
|
||||
beschreibung: "",
|
||||
tag_typ_kurzbz: "",
|
||||
notiz: "",
|
||||
style: "",
|
||||
zuordnung_typ: "",
|
||||
id: "",
|
||||
insertamum: "",
|
||||
insertvon: "",
|
||||
updateamum: "",
|
||||
updatevon: "",
|
||||
response: ""
|
||||
},
|
||||
mode: "create"
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init() {
|
||||
if (!this.endpoint)
|
||||
return;
|
||||
this.endpoint.getTags()
|
||||
.then(response => response.data)
|
||||
.then(response => {
|
||||
this.tags = response
|
||||
})
|
||||
},
|
||||
hideList() {
|
||||
this.showList = false;
|
||||
},
|
||||
async editTag(tag_id) {
|
||||
let getData = {
|
||||
'id': tag_id
|
||||
};
|
||||
|
||||
this.endpoint.getTag(getData)
|
||||
.then(result => result.data)
|
||||
.then(result => this.openModal(result))
|
||||
},
|
||||
openModal(item = null)
|
||||
{
|
||||
this.tagData.beschreibung = item.bezeichnung;
|
||||
this.tagData.tag_typ_kurzbz = item.tag_typ_kurzbz;
|
||||
this.tagData.style = item.style;
|
||||
this.tagData.zuordnung_typ = this.zuordnung_typ;
|
||||
this.tagData.done = item.done;
|
||||
this.tagData.insertamum = item.insertamum;
|
||||
this.tagData.updateamum = item.updateamum;
|
||||
this.tagData.updatevon = item.updatevon;
|
||||
this.tagData.insertvon = item.insertvon;
|
||||
|
||||
if (item && item.notiz_id)
|
||||
{
|
||||
this.selectedTagId = item.notiz_id;
|
||||
this.tagData.notiz = item.text;
|
||||
this.mode = "edit";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.selectedTagId = null;
|
||||
this.tagData.notiz = "";
|
||||
this.mode = "create";
|
||||
}
|
||||
|
||||
if (this.mode === "create" && item.tag)
|
||||
this.saveTag()
|
||||
else
|
||||
this.$refs.tagModal.show();
|
||||
},
|
||||
async saveTag()
|
||||
{
|
||||
let postData = {
|
||||
tag_typ_kurzbz: this.tagData.tag_typ_kurzbz,
|
||||
notiz: this.tagData.notiz,
|
||||
zuordnung_typ: this.tagData.zuordnung_typ,
|
||||
values: this.values
|
||||
}
|
||||
|
||||
if (this.mode === "edit")
|
||||
{
|
||||
postData.id = this.selectedTagId;
|
||||
this.tagData.id = this.selectedTagId;
|
||||
this.endpoint.updateTag(postData);
|
||||
this.$emit("updated", this.tagData);
|
||||
this.$refs.tagModal.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.$fhcAlert && postData.values.length >= this.confirmLimit)
|
||||
{
|
||||
if (await this.$fhcAlert.confirm({message: `Der Tag wird für ${postData.values.length} Einträge gesetzt. Sind Sie sicher?`}) === false)
|
||||
return;
|
||||
}
|
||||
|
||||
this.endpoint.addTag(postData)
|
||||
.then(response => response.data)
|
||||
.then(response => {
|
||||
if (typeof response === 'number') {
|
||||
this.tagData.id = response;
|
||||
} else {
|
||||
this.tagData.response = response;
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
this.$emit("added", this.tagData);
|
||||
})
|
||||
.then(() => {
|
||||
this.$refs.tagModal.hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async doneTag()
|
||||
{
|
||||
this.tagData.id = this.selectedTagId;
|
||||
this.tagData.done = !this.tagData.done;
|
||||
|
||||
let postData = {
|
||||
id: this.selectedTagId,
|
||||
done: !this.tagData.done
|
||||
}
|
||||
this.endpoint.doneTag(postData)
|
||||
this.$emit("updated", this.tagData);
|
||||
this.$refs.tagModal.hide();
|
||||
},
|
||||
async deleteTag()
|
||||
{
|
||||
let postData = {
|
||||
id: this.selectedTagId
|
||||
}
|
||||
this.endpoint.deleteTag(postData)
|
||||
this.$emit("deleted", this.selectedTagId)
|
||||
this.$refs.tagModal.hide();
|
||||
},
|
||||
reset() {
|
||||
this.tagData = {
|
||||
beschreibung: "",
|
||||
tag_typ_kurzbz: "",
|
||||
notiz: "",
|
||||
style: "",
|
||||
zuordnung_typ: "",
|
||||
id: "",
|
||||
done: false,
|
||||
insertamum: "",
|
||||
insertvon: "",
|
||||
updateamum: "",
|
||||
updatevon: "",
|
||||
response: ""
|
||||
};
|
||||
this.selectedTagId = null;
|
||||
this.mode = "create";
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="plus_button_container" @mouseleave="hideList">
|
||||
<button @mouseover="showList = true"
|
||||
:disabled="!values || values.length === 0"
|
||||
class="btn btn-sm">
|
||||
<i class="fa-solid fa-tag fa-xl"></i>
|
||||
</button>
|
||||
<ul v-if="showList" class="dropdown_list">
|
||||
<li v-for="(item, index) in tags" :key="index" @click="openModal(item)" :title="item.bezeichnung">
|
||||
{{ item.bezeichnung }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<bs-modal
|
||||
ref="tagModal"
|
||||
class="fade text-center"
|
||||
dialog-class="modal-dialog-centered"
|
||||
@hidden-bs-modal="reset"
|
||||
>
|
||||
<template #title>
|
||||
<span :class="['tag', tagData.style]">{{ tagData.beschreibung }}</span>
|
||||
</template>
|
||||
<template #default>
|
||||
<div class="col">
|
||||
<form-input
|
||||
v-model="tagData.notiz"
|
||||
type="textarea"
|
||||
field="notiz"
|
||||
placeholder="Notiz..."
|
||||
></form-input>
|
||||
<div class="modificationdate">angelegt von {{ tagData.insertvon }} am {{ tagData.insertamum }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div class="d-flex justify-content-between w-100">
|
||||
<div>
|
||||
<button
|
||||
v-if="mode === 'edit'"
|
||||
class="btn btn-success me-2"
|
||||
@click="doneTag"
|
||||
>
|
||||
{{ tagData.done ? 'Rückgängig' : 'Erledigt' }}
|
||||
</button>
|
||||
<button v-if="mode === 'edit'" class="btn btn-danger" @click="deleteTag">Löschen</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" @click="saveTag">
|
||||
{{ mode === "edit" ? $p.t('ui', 'bearbeiten') : $p.t('studierendenantrag', 'btn_create') }}
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</bs-modal>`,
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import FilterConfig from './Filter/Config.js';
|
||||
import FilterColumns from './Filter/Columns.js';
|
||||
import TableDownload from './Table/Download.js';
|
||||
import collapseAutoClose from '../../directives/collapseAutoClose.js';
|
||||
import { defaultHeaderFilter } from '../../tabulator/filters/defaultHeaderFilter.js';
|
||||
|
||||
//
|
||||
const FILTER_COMPONENT_NEW_FILTER = 'Filter Component New Filter';
|
||||
@@ -72,7 +73,8 @@ export const CoreFilterCmpt = {
|
||||
uniqueId: String,
|
||||
// TODO soll im master kommen?
|
||||
idField: String,
|
||||
parentIdField: String
|
||||
parentIdField: String,
|
||||
countOnly: Boolean
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
@@ -206,6 +208,7 @@ export const CoreFilterCmpt = {
|
||||
movableColumns: true,
|
||||
columnDefaults:{
|
||||
tooltip: true,
|
||||
headerFilterFunc: defaultHeaderFilter,
|
||||
},
|
||||
placeholder,
|
||||
reactiveData: true,
|
||||
@@ -275,11 +278,11 @@ export const CoreFilterCmpt = {
|
||||
const cols = this.tabulator.getColumns();
|
||||
this.fields = cols.map(col => col.getField());
|
||||
this.selectedFields = cols.filter(col => col.isVisible()).map(col => col.getField());
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
updateTabulator() {
|
||||
if (this.tabulator) {
|
||||
@@ -610,7 +613,10 @@ export const CoreFilterCmpt = {
|
||||
<button v-if="reload" class="btn btn-outline-secondary" aria-label="Reload" @click="reloadTable">
|
||||
<span class="fa-solid fa-rotate-right" aria-hidden="true"></span>
|
||||
</button>
|
||||
<span v-if="$slots.actions && tabulatorHasSelector">Mit {{selectedData.length}} ausgewählten:</span>
|
||||
<span v-if="$slots.actions && tabulatorHasSelector">
|
||||
<span v-if="countOnly">{{ selectedData.length }} ausgewählt</span>
|
||||
<span v-else> Mit {{ selectedData.length }} ausgewählten:</span>
|
||||
</span>
|
||||
<slot name="actions" v-bind="{selected: tabulatorHasSelector ? selectedData : []}"></slot>
|
||||
<slot name="search"></slot>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
<div v-else-if="searchresult.length < 1">Es wurden keine Ergebnisse gefunden.</div>
|
||||
<template v-else="" v-for="res in searchresult">
|
||||
<person v-if="res.type === 'person'" :res="res" :actions="this.searchoptions.actions.person" @actionexecuted="this.hideresult"></person>
|
||||
<student v-else-if="res.type === 'student'" :res="res" :actions="this.searchoptions.actions.student" @actionexecuted="this.hideresult"></student>
|
||||
<student v-else-if="res.type === 'student' || res.type === 'studentStv'" :res="res" :actions="this.searchoptions.actions.student" @actionexecuted="this.hideresult"></student>
|
||||
<prestudent v-else-if="res.type === 'prestudent'" :res="res" :actions="this.searchoptions.actions.prestudent" @actionexecuted="this.hideresult"></prestudent>
|
||||
<employee v-else-if="res.type === 'mitarbeiter' || res.type === 'mitarbeiter_ohne_zuordnung'" :res="res" :actions="this.searchoptions.actions.employee" @actionexecuted="this.hideresult"></employee>
|
||||
<organisationunit v-else-if="res.type === 'organisationunit'" :res="res" :actions="this.searchoptions.actions.organisationunit" @actionexecuted="this.hideresult"></organisationunit>
|
||||
|
||||
@@ -9,14 +9,14 @@ export default {
|
||||
},
|
||||
emits: [ 'actionexecuted' ],
|
||||
template: `
|
||||
<div class="searchbar_result searchbar_student">
|
||||
<div class="searchbar_result searchbar_student" :class="(!res?.aktiv) ? 'searchbar_inaktiv' : ''">
|
||||
|
||||
<div class="searchbar_grid">
|
||||
<div class="searchbar_icon">
|
||||
<action :res="this.res" :action="this.actions.defaultaction" @actionexecuted="$emit('actionexecuted')">
|
||||
<img v-if="(typeof res.foto !== 'undefined') && (res.foto !== null)"
|
||||
:src="'data:image/jpeg;base64,' + res.foto"
|
||||
class="rounded-circle" height="100"/>
|
||||
:src="studentImage"
|
||||
class="rounded" style="max-height: 120px; max-width: 90px;" />
|
||||
<i v-else class="fas fa-user-circle fa-5x"></i>
|
||||
</action>
|
||||
</div>
|
||||
@@ -29,18 +29,25 @@ export default {
|
||||
<div class="mb-3"></div>
|
||||
|
||||
<div class="searchbar_table">
|
||||
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Student_uid</div>
|
||||
<div class="searchbar_tablecell">Student UID</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.uid }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Person_id</div>
|
||||
<div class="searchbar_tablecell">Studiengang</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.person_id }}
|
||||
{{ res.studiengang }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Verband</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.verband }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -75,6 +82,10 @@ export default {
|
||||
computed: {
|
||||
mailtourl: function() {
|
||||
return 'mailto:' + this.res.email;
|
||||
}
|
||||
},
|
||||
studentImage: function () {
|
||||
if (!this.res.foto) return;
|
||||
return 'data:image/jpeg;base64,'.concat(this.res.foto);
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -49,6 +49,12 @@ class CalendarDate {
|
||||
}
|
||||
}
|
||||
}
|
||||
get wYear() {
|
||||
if( this.w === 1 ) {
|
||||
return this.cdLastDayOfWeek.format({ year: 'numeric' });
|
||||
}
|
||||
return this.cdFirstDayOfWeek.format({ year: 'numeric' });
|
||||
}
|
||||
get wd() {
|
||||
if (this._wd === null) {
|
||||
this._wd = ((new Date(this.y, this.m, this.d)).getDay()+7-this.weekStart)%7;
|
||||
@@ -112,13 +118,24 @@ class CalendarDate {
|
||||
return (new CalendarDate(this.y+1,0,this.weekStart == 1 ? -3 : 0)).w;
|
||||
}
|
||||
set(y,m,d,noClean) {
|
||||
|
||||
if (y !== undefined && (m === undefined || m === true) && d === undefined) {
|
||||
if (Object.prototype.toString.call(y) === '[object Date]')
|
||||
if (this.#isDate(y))
|
||||
{
|
||||
// set year/month/day from date object
|
||||
return this.set(y.getFullYear(), y.getMonth(), y.getDate(), m);
|
||||
}
|
||||
if (y.y !== undefined && y.m !== undefined && y.d !== undefined)
|
||||
{
|
||||
// set year/month/day from CalendarDate object
|
||||
return this.set(y.y, y.m, y.d, m);
|
||||
}
|
||||
}
|
||||
[this._y,this._m,this._d] = [y || 0, m || 0, d || 0];
|
||||
// initialize year/month/day
|
||||
this._y = y ?? 0;
|
||||
this._m = m ?? 0;
|
||||
this._d = d ?? 0;
|
||||
|
||||
if (!noClean)
|
||||
this._clean();
|
||||
}
|
||||
@@ -131,7 +148,7 @@ class CalendarDate {
|
||||
return (new Date(this._y, this._m, this._d)).toLocaleString(lang, options);
|
||||
}
|
||||
compare(d) {
|
||||
if (Object.prototype.toString.call(d) === '[object Date]')
|
||||
if (this.#isDate(d))
|
||||
return (this.y === d.getFullYear() && this.m === d.getMonth() && this.d === d.getDate());
|
||||
return (this.y === d.y && this.m === d.m && this.d === d.d);
|
||||
}
|
||||
@@ -151,6 +168,10 @@ class CalendarDate {
|
||||
setLocale(locale) {
|
||||
this.weekStart = CalendarDate.getWeekStart(locale);
|
||||
}
|
||||
// private method that checks if the parameter is of type Date
|
||||
#isDate(obj){
|
||||
return Object.prototype.toString.call(obj) === '[object Date]';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns the weekday number (Date.getDay()) on which the week starts depending on the locale.
|
||||
@@ -163,19 +184,37 @@ class CalendarDate {
|
||||
* @return integer
|
||||
*/
|
||||
CalendarDate.getWeekStart = function(locale) {
|
||||
|
||||
locale = locale || navigator.language;
|
||||
const parts = locale.match(/^([a-z]{2,3})(?:-([a-z]{3})(?=$|-))?(?:-([a-z]{4})(?=$|-))?(?:-([a-z]{2}|\d{3})(?=$|-))?/i);
|
||||
const regionSat = 'AEAFBHDJDZEGIQIRJOKWLYOMQASDSY'.match(/../g);
|
||||
const regionSun = 'AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW'.match(/../g);
|
||||
const languageSat = ['ar','arq','arz','fa'];
|
||||
const languageSun = 'amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu'.match(/../g);
|
||||
|
||||
return (
|
||||
parts[4] ? (
|
||||
regionSun.includes(parts[4]) ? 0 :
|
||||
regionSat.includes(parts[4]) ? 6 : 1) : (
|
||||
languageSun.includes(parts[1]) ? 0 :
|
||||
languageSat.includes(parts[1]) ? 6 : 1));
|
||||
const region_code = parts[1];
|
||||
const region_starting_Sat = 'AEAFBHDJDZEGIQIRJOKWLYOMQASDSY'.match(/../g);
|
||||
const region_starting_Sun = 'AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW'.match(/../g);
|
||||
|
||||
const language_code = parts[4];
|
||||
const language_starting_Sat = ['ar','arq','arz','fa'];
|
||||
const language_starting_Sun = 'amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu'.match(/../g);
|
||||
|
||||
if (language_code){
|
||||
if (language_starting_Sun.includes(language_code))
|
||||
return 0;
|
||||
else if (language_starting_Sat.includes(language_code))
|
||||
return 6;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
else if(region_code)
|
||||
{
|
||||
if (region_starting_Sun.includes(region_code))
|
||||
return 0;
|
||||
else if (region_starting_Sat.includes(region_code))
|
||||
return 6;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,13 +3,9 @@ import FhcApi from './FhcApi.js';
|
||||
const categories = Vue.reactive({});
|
||||
const loadingModules = {};
|
||||
let user_language = Vue.ref(FHC_JS_DATA_STORAGE_OBJECT.user_language);
|
||||
let user_language_locale_identifier = Vue.computed(()=>{
|
||||
if(!user_language.value) return undefined;
|
||||
switch(user_language.value){
|
||||
case 'German': return 'de-AT';
|
||||
case 'English': return 'en-GB';
|
||||
default: return undefined;
|
||||
}
|
||||
let user_locale = Vue.computed(()=>{
|
||||
if(!user_language.value) return null;
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.server_languages.find(language => language.sprache == user_language.value).locale;
|
||||
});
|
||||
|
||||
function extractCategory(obj, category) {
|
||||
@@ -30,7 +26,7 @@ function getValueForLoadedPhrase(category, phrase, params) {
|
||||
|
||||
const phrasen = {
|
||||
user_language,
|
||||
user_language_locale_identifier,
|
||||
user_locale,
|
||||
setLanguage(language, api) {
|
||||
const catArray = Object.keys(categories)
|
||||
return api.factory.phrasen.setLanguage(catArray, language).then(res => {
|
||||
@@ -93,7 +89,7 @@ export default {
|
||||
loadCategory: cat => phrasen.loadCategory.call(app, cat),
|
||||
setLanguage: phrasen.setLanguage,
|
||||
user_language: user_language,
|
||||
user_language_locale_identifier: user_language_locale_identifier,
|
||||
user_locale,
|
||||
t_ref: phrasen.t_ref
|
||||
};
|
||||
app.provide('$p', app.config.globalProperties.$p);
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
function parseFilterExpression(expression){
|
||||
const includeGroups = [];
|
||||
const excludeTerms = [];
|
||||
const comparisons = [];
|
||||
|
||||
const andParts = expression.split('&&').map(part => part.trim());
|
||||
|
||||
andParts.forEach(part => {
|
||||
const orTerms = part.split('||').map(p => p.trim());
|
||||
const orRegexes = [];
|
||||
|
||||
orTerms.forEach(term => {
|
||||
|
||||
const comparisonMatch = term.match(/^(<=|>=|<|>|=|!=)\s*(\d+)$/);
|
||||
|
||||
if (comparisonMatch)
|
||||
{
|
||||
const operator = comparisonMatch[1];
|
||||
const number = parseFloat(comparisonMatch[2]);
|
||||
|
||||
comparisons.push({ operator, number });
|
||||
}
|
||||
else if (term.startsWith('!'))
|
||||
{
|
||||
const excludeTerm = term.substring(1).trim().replace(/\*/g, '.*');
|
||||
excludeTerms.push(new RegExp(excludeTerm, 'i'));
|
||||
}
|
||||
else
|
||||
{
|
||||
const includeTerm = term.replace(/\*/g, '.*');
|
||||
orRegexes.push(new RegExp(includeTerm, 'i'));
|
||||
}
|
||||
});
|
||||
|
||||
if (orRegexes.length > 0)
|
||||
{
|
||||
includeGroups.push(orRegexes);
|
||||
}
|
||||
});
|
||||
|
||||
return { includeGroups, excludeTerms, comparisons };
|
||||
}
|
||||
|
||||
export function defaultHeaderFilter(headerValue, rowValue)
|
||||
{
|
||||
const { includeGroups, excludeTerms, comparisons } = parseFilterExpression(headerValue);
|
||||
|
||||
const includes = includeGroups.every(group =>
|
||||
group.some(regex => regex.test(rowValue))
|
||||
);
|
||||
|
||||
const excludes = excludeTerms.every(regex => !regex.test(rowValue));
|
||||
|
||||
const comparisonCheck = comparisons.every(({ operator, number }) => {
|
||||
let value = rowValue;
|
||||
|
||||
if (!isNaN(number))
|
||||
{
|
||||
value = parseFloat(rowValue);
|
||||
if (isNaN(value)) return false;
|
||||
}
|
||||
|
||||
switch (operator) {
|
||||
case '<':
|
||||
return value < number;
|
||||
case '>':
|
||||
return value > number;
|
||||
case '<=':
|
||||
return value <= number;
|
||||
case '>=':
|
||||
return value >= number;
|
||||
case '=':
|
||||
return value === number;
|
||||
case '!=':
|
||||
return value !== number;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return includes && excludes && comparisonCheck;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/lehrveranstaltung_faktor.class.php');
|
||||
require_once('../include/lehrveranstaltung.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/studiensemester.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/person', null, 'suid'))
|
||||
{
|
||||
exit('Sie haben keine Berechtigung für die Seite');
|
||||
}
|
||||
|
||||
$method = isset($_REQUEST['method']) ? $_REQUEST['method']: '' ;
|
||||
$lv_faktor = new lehrveranstaltung_faktor();
|
||||
|
||||
switch($method)
|
||||
{
|
||||
case 'addFaktor':
|
||||
$faktor = isset($_REQUEST['faktor']) ? $_REQUEST['faktor']: '' ;
|
||||
if ($faktor !== '')
|
||||
{
|
||||
if (!isRightType($faktor['lv_id']))
|
||||
{
|
||||
echo json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'Nur LVs und Templates möglich'
|
||||
]);
|
||||
break;
|
||||
}
|
||||
if (vonHigherThanBis($faktor['von'], $faktor['bis']))
|
||||
{
|
||||
echo json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'Von nach Bis'
|
||||
]);
|
||||
break;
|
||||
}
|
||||
if (exists($faktor['lv_id'], $faktor['von'], $faktor['bis']))
|
||||
{
|
||||
echo json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'Für den Zeitraum bereits vorhanden'
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
||||
$result = $lv_faktor->addFaktor($faktor['lv_id'], $faktor['faktor'], $faktor['von'], $faktor['bis']);
|
||||
echo json_encode($result);
|
||||
}
|
||||
break;
|
||||
case 'updateFaktor':
|
||||
$faktor = isset($_REQUEST['faktor']) ? $_REQUEST['faktor']: '' ;
|
||||
if ($faktor !== '')
|
||||
{
|
||||
if (vonHigherThanBis($faktor['von'], $faktor['bis']))
|
||||
{
|
||||
echo json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'Von nach Bis'
|
||||
]);
|
||||
break;
|
||||
}
|
||||
if (exists($faktor['lv_id'], $faktor['von'], $faktor['bis'], $faktor['id']))
|
||||
{
|
||||
echo json_encode([
|
||||
'status' => 'error',
|
||||
'message' => 'Für den Zeitraum bereits vorhanden'
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
||||
$result = $lv_faktor->updateFaktor($faktor['id'], $faktor['faktor'], $faktor['von'], $faktor['bis']);
|
||||
echo json_encode($result);
|
||||
}
|
||||
break;
|
||||
case 'deleteFaktor':
|
||||
$faktor = isset($_REQUEST['faktor']) ? $_REQUEST['faktor']: '' ;
|
||||
if ($faktor !== '')
|
||||
{
|
||||
$result = $lv_faktor->deleteFaktor($faktor['id']);
|
||||
echo json_encode($result);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
function isRightType($lv_id)
|
||||
{
|
||||
$lv = new lehrveranstaltung($lv_id);
|
||||
if (in_array($lv->lehrtyp_kurzbz, array('lv', 'tpl')))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function exists($lv_id, $von, $bis, $id = null)
|
||||
{
|
||||
$lv_faktor = new lehrveranstaltung_faktor();
|
||||
$lv_faktor->loadByLV($lv_id, $von, $bis, $id);
|
||||
return !empty($lv_faktor->lv_faktoren);
|
||||
}
|
||||
|
||||
function vonHigherThanBis($von, $bis)
|
||||
{
|
||||
$vonStsem = new studiensemester($von);
|
||||
$bisStsem = new studiensemester($bis);
|
||||
|
||||
if (is_null($bis) || $bis === "")
|
||||
return false;
|
||||
if ($vonStsem->start > $bisStsem->start)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -65,6 +65,9 @@ require_once('dbupdate_3.4/40896_kennzeichnung_unruly_person.php');
|
||||
require_once('dbupdate_3.4/39911_tabulator_in_contentmittitel.php');
|
||||
require_once('dbupdate_3.4/25999_C4_permission.php');
|
||||
require_once('dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php');
|
||||
require_once('dbupdate_3.4/40717_lv_faktor.php');
|
||||
require_once('dbupdate_3.4/48526_pep_tagging.php');
|
||||
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -260,6 +263,7 @@ $tabellen=array(
|
||||
"lehre.tbl_zeitfenster" => array("wochentag","stunde","ort_kurzbz","studiengang_kz","gewicht"),
|
||||
"lehre.tbl_zeugnis" => array("zeugnis_id","student_uid","zeugnis","erstelltam","gedruckt","titel","bezeichnung","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"lehre.tbl_zeugnisnote" => array("lehrveranstaltung_id","student_uid","studiensemester_kurzbz","note","uebernahmedatum","benotungsdatum","bemerkung","updateamum","updatevon","insertamum","insertvon","ext_id","punkte"),
|
||||
"lehre.tbl_lehrveranstaltung_faktor" => array("lehrveranstaltung_faktor_id", "lehrveranstaltung_id","faktor","studiensemester_kurzbz_von","studiensemester_kurzbz_bis","insertamum","insertvon","updateamum","updatevon"),
|
||||
"public.ci_apikey" => array("apikey_id","key","level","ignore_limits","date_created"),
|
||||
"public.tbl_adresse" => array("adresse_id","person_id","name","strasse","plz","ort","gemeinde","nation","typ","heimatadresse","zustelladresse","firma_id","updateamum","updatevon","insertamum","insertvon","ext_id","rechnungsadresse","anmerkung", "co_name"),
|
||||
"public.tbl_adressentyp" => array("adressentyp_kurzbz", "bezeichnung", "bezeichnung_mehrsprachig", "sort"),
|
||||
@@ -306,9 +310,10 @@ $tabellen=array(
|
||||
"public.tbl_msg_message" => array("message_id","person_id","subject","body","priority","relationmessage_id","oe_kurzbz","insertamum","insertvon"),
|
||||
"public.tbl_msg_recipient" => array("message_id","person_id","token","sent","sentinfo","insertamum","insertvon","oe_kurzbz"),
|
||||
"public.tbl_msg_status" => array("message_id","person_id","status","statusinfo","insertamum","insertvon","updateamum","updatevon"),
|
||||
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id"),
|
||||
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id", "typ"),
|
||||
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id","anrechnung_id"),
|
||||
"public.tbl_notiz_dokument" => array("notiz_id","dms_id"),
|
||||
"public.tbl_notiz_typ" => array("typ_kurzbz","bezeichnung_mehrsprachig", "beschreibung", "automatisiert", "aktiv", "zuordnung", "tag", "style", "vorrueckung", "prioritaet"),
|
||||
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz","arbeitsplaetze"),
|
||||
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
|
||||
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre","standort","warn_semesterstunden_frei","warn_semesterstunden_fix","standort_id"),
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
if (!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_lehrveranstaltung_faktor LIMIT 1"))
|
||||
{
|
||||
$qry = "
|
||||
|
||||
CREATE TABLE lehre.tbl_lehrveranstaltung_faktor
|
||||
(
|
||||
lehrveranstaltung_faktor_id integer NOT NULL,
|
||||
lehrveranstaltung_id integer NOT NULL,
|
||||
faktor numeric NOT NULL,
|
||||
studiensemester_kurzbz_von varchar(16) NOT NULL,
|
||||
studiensemester_kurzbz_bis varchar(16),
|
||||
insertamum timestamp DEFAULT NOW(),
|
||||
insertvon varchar(32),
|
||||
updateamum timestamp,
|
||||
updatevon varchar(32),
|
||||
CONSTRAINT tbl_lehrveranstaltung_faktor_pk PRIMARY KEY (lehrveranstaltung_faktor_id)
|
||||
);
|
||||
|
||||
CREATE SEQUENCE lehre.lehrveranstaltung_faktor_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;
|
||||
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ALTER COLUMN lehrveranstaltung_faktor_id SET DEFAULT nextval('lehre.lehrveranstaltung_faktor_id_seq');
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ADD CONSTRAINT fk_lehrveranstaltung_faktor_lehrveranstaltung_id FOREIGN KEY (lehrveranstaltung_id) REFERENCES lehre.tbl_lehrveranstaltung (lehrveranstaltung_id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ADD CONSTRAINT fk_lehrveranstaltung_faktor_studiensemester_von FOREIGN KEY (studiensemester_kurzbz_von) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ADD CONSTRAINT fk_lehrveranstaltung_faktor_studiensemester_bis FOREIGN KEY (studiensemester_kurzbz_bis) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;
|
||||
|
||||
GRANT SELECT ON lehre.tbl_lehrveranstaltung_faktor TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_lehrveranstaltung_faktor TO vilesci;
|
||||
GRANT SELECT ON lehre.lehrveranstaltung_faktor_id_seq TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.lehrveranstaltung_faktor_id_seq TO vilesci;
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung_faktor: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Tabelle: lehre.tbl_lehrveranstaltung_faktor erstellt!';
|
||||
|
||||
//TODO ggf default wert in eine config
|
||||
$qry = "
|
||||
INSERT INTO lehre.tbl_lehrveranstaltung_faktor
|
||||
(lehrveranstaltung_id, faktor, studiensemester_kurzbz_von, insertvon)
|
||||
(
|
||||
SELECT lehrveranstaltung_id,
|
||||
2,
|
||||
(
|
||||
SELECT public.tbl_studiensemester.studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
ORDER BY start LIMIT 1
|
||||
),
|
||||
'checksystem'
|
||||
FROM lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrtyp_kurzbz IN ('lv', 'tpl')
|
||||
);
|
||||
";
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung_faktor: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Tabelle: lehre.tbl_lehrveranstaltung_faktor befüllt!';
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// add app pep
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='pep'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_app (app) VALUES('pep');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>System Tabelle app: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>app pep hinzugefuegt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Creates table public.tbl_notiz_typ if it doesn't exist and grants privileges
|
||||
if (!$result = @$db->db_query('SELECT 0 FROM public.tbl_notiz_typ WHERE 0 = 1'))
|
||||
{
|
||||
//TODO zuordnung typ definieren
|
||||
$qry = 'CREATE TABLE public.tbl_notiz_typ (
|
||||
typ_kurzbz varchar(32) NOT NULL,
|
||||
bezeichnung_mehrsprachig character varying(256)[] NOT NULL,
|
||||
beschreibung text,
|
||||
automatisiert boolean NOT NULL,
|
||||
aktiv boolean NOT NULL,
|
||||
zuordnung text,
|
||||
tag boolean NOT NULL,
|
||||
style text,
|
||||
vorrueckung boolean NOT NULL,
|
||||
prioritaet smallint
|
||||
);
|
||||
|
||||
ALTER TABLE public.tbl_notiz_typ ADD CONSTRAINT pk_tbl_tbl_notiz_typ PRIMARY KEY (typ_kurzbz)';
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_notiz_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_notiz_typ table created';
|
||||
|
||||
$qry = 'GRANT SELECT ON TABLE public.tbl_notiz_typ TO web;';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_notiz_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on public.tbl_notiz_typ';
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE public.tbl_notiz_typ TO vilesci;';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_notiz_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on public.tbl_notiz_typ';
|
||||
}
|
||||
|
||||
if(!@$db->db_query("SELECT typ FROM public.tbl_notiz LIMIT 1"))
|
||||
{
|
||||
$qry = 'ALTER TABLE public.tbl_notiz ADD COLUMN typ varchar(32);
|
||||
ALTER TABLE public.tbl_notiz ADD CONSTRAINT tbl_notiz_typ_fkey FOREIGN KEY (typ) REFERENCES public.tbl_notiz_typ (typ_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;';
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong> public.tbl_notiz '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_notiz: Neue Spalte typ hinzugefügt';
|
||||
}
|
||||
@@ -15105,6 +15105,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'felderFehlen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Bitte füllen Sie alle Formularfelder aus",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Please fill in all form fields",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
@@ -37419,6 +37439,46 @@ array(
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'pep',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'maprojohneoe',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mitarbeiter und Projekt sind der Organisationseinheit nicht zugeordnet.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Employee and project are not assigned to the organizational unit.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'pep',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'infoandepl/kfl',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Info an DepL/KFL',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Info to DepL/KFL:',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ require_once('../../include/organisationsform.class.php');
|
||||
require_once('../../include/addon.class.php');
|
||||
require_once('../../include/sprache.class.php');
|
||||
require_once('../../include/lehrmodus.class.php');
|
||||
require_once('../../include/lehrveranstaltung_faktor.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
@@ -1108,7 +1109,8 @@ if ($result_lv!=0)
|
||||
{
|
||||
echo "<th>LV-Angebot</th>
|
||||
<th>kompatible LV</th>
|
||||
<th>Aktion</th>";
|
||||
<th>Aktion</th>
|
||||
<th>Faktor</th>";
|
||||
}
|
||||
|
||||
echo "</tr></thead>";
|
||||
@@ -1326,7 +1328,20 @@ if ($result_lv!=0)
|
||||
</td>';
|
||||
|
||||
echo '<td><a href="lehrveranstaltung_kompatibel.php?lehrveranstaltung_id='.$row->lehrveranstaltung_id.'&type=edit" target="lv_detail">Kompatible LV</a></td>';
|
||||
echo '<td><a href="'.$_SERVER['PHP_SELF'].'?delete_lvid='.$row->lehrveranstaltung_id.'&stg_kz='.$stg_kz.'&semester='.$semester.'&fachbereich_kurzbz='.$oe_fachbereich.'&isaktiv='.$isaktiv.'&oe_kurzbz='.$oe_kurzbz.'&orgform='.$orgform_kurzbz.'" onclick="return conf_del()">löschen</a></td>';
|
||||
echo '<td>
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?delete_lvid='.$row->lehrveranstaltung_id.'&stg_kz='.$stg_kz.'&semester='.$semester.'&fachbereich_kurzbz='.$oe_fachbereich.'&isaktiv='.$isaktiv.'&oe_kurzbz='.$oe_kurzbz.'&orgform='.$orgform_kurzbz.'" onclick="return conf_del()">löschen</a>
|
||||
';
|
||||
|
||||
if (in_array($row->lehrtyp_kurzbz, array("tpl", "lv")))
|
||||
echo '<br /><a href="lehrveranstaltung_faktor.php?lehrveranstaltung_id='.$db->convert_html_chars($row->lehrveranstaltung_id).'" target="lv_detail">Faktor</a>';
|
||||
echo '</td>';
|
||||
echo '
|
||||
<td nowrap>';
|
||||
|
||||
$lv_faktor = new lehrveranstaltung_faktor();
|
||||
$lv_faktor->getAkt($row->lehrveranstaltung_id);
|
||||
|
||||
echo $lv_faktor->faktor.'</td>';
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
require_once('../../include/lehrmodus.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/studienplan.class.php');
|
||||
require_once('../../include/lehrveranstaltung_faktor.class.php');
|
||||
require_once('../../include/studiensemester.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
@@ -139,6 +141,31 @@
|
||||
$reloadstr .= " window.location.href='".$_SERVER['PHP_SELF']."?stg_kz=$lv->studiengang_kz&semester=$lv->semester&neu=true';";
|
||||
}
|
||||
$reloadstr .= "</script>\n";
|
||||
|
||||
if (in_array($lv->lehrtyp_kurzbz, array('tpl', 'lv')) && $lv->new === true)
|
||||
{
|
||||
$lv_faktor = new lehrveranstaltung_faktor();
|
||||
$studiensemester = new studiensemester();
|
||||
$studiensemester_von = $studiensemester->getLastOrAktSemester();
|
||||
if ($lv->lehrtyp_kurzbz === 'lv' && $_POST['lehrveranstaltung_template_id'] !== '')
|
||||
{
|
||||
|
||||
$lv_faktor->getAkt($_POST['lehrveranstaltung_template_id']);
|
||||
//TODO Faktor in eine Config
|
||||
if (is_null($lv_faktor->faktor))
|
||||
$lv_faktor->addFaktor($lv->lehrveranstaltung_id, 2, $studiensemester_von);
|
||||
else
|
||||
$lv_faktor->addFaktor($lv->lehrveranstaltung_id, $lv_faktor->faktor, $studiensemester_von);
|
||||
}
|
||||
else
|
||||
{
|
||||
$lv_faktor->loadByLV($lv->lehrveranstaltung_id);
|
||||
if (empty($lv_faktor->lv_faktoren))
|
||||
{
|
||||
$lv_faktor->addFaktor($lv->lehrveranstaltung_id, 2, $studiensemester_von);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
<?php
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/phrasen.class.php');
|
||||
require_once('../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../include/lehrveranstaltung_faktor.class.php');
|
||||
require_once('../../include/studiensemester.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
if(!$rechte->isBerechtigt('lehre/lehrveranstaltung', null, 'suid'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
echo '<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../skin/jquery.css" type="text/css"/>
|
||||
<script type="text/javascript" src="../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<link rel="stylesheet" href="../../skin/tablesort.css" type="text/css"/>
|
||||
';
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#faktorTable').on('click', '.edit', function() {
|
||||
var row = $(this).closest('tr');
|
||||
var id = row.data('id');
|
||||
var faktor = row.find('.faktor').text();
|
||||
var von = row.find('.von').text();
|
||||
var bis = row.find('.bis').text();
|
||||
|
||||
$('#action').val('edit');
|
||||
$('#id').val(id);
|
||||
$('#faktor').val(faktor);
|
||||
$('#von').val(von);
|
||||
$('#bis').val(bis);
|
||||
});
|
||||
|
||||
$('#faktorTable').on('click', '.delete', function() {
|
||||
var id = $(this).closest('tr').data('id');
|
||||
|
||||
var formData = {
|
||||
id: id
|
||||
}
|
||||
deleteFaktor(formData);
|
||||
});
|
||||
|
||||
$('#faktorForm').on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
var action = $('#action').val();
|
||||
var id = $('#id').val();
|
||||
|
||||
var faktor = $('#faktor').val();
|
||||
var von = $('#von').val();
|
||||
var bis = $('#bis').val();
|
||||
var lv_id = $('#lv_id').val();
|
||||
|
||||
var formData = {
|
||||
faktor: faktor,
|
||||
von: von,
|
||||
bis: bis,
|
||||
lv_id: lv_id
|
||||
};
|
||||
|
||||
if(action === 'add')
|
||||
{
|
||||
addFaktor(formData);
|
||||
}
|
||||
else
|
||||
{
|
||||
formData.id = id;
|
||||
updateFaktor(formData);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function addFaktor(formData)
|
||||
{
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: 'POST',
|
||||
url: "../../soap/lehrveranstaltung_faktor.json.php",
|
||||
data: {
|
||||
method: 'addFaktor',
|
||||
faktor: formData
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
if (data.status === 'error')
|
||||
return alert(data.message);
|
||||
else
|
||||
{
|
||||
addRow(data);
|
||||
handleResponse('save')
|
||||
sortTable();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error)
|
||||
{
|
||||
alert('Fehler beim Laden der Daten');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateFaktor(formData)
|
||||
{
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: 'POST',
|
||||
url: "../../soap/lehrveranstaltung_faktor.json.php",
|
||||
data: {
|
||||
method: 'updateFaktor',
|
||||
faktor: formData
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
if (data.status === 'error')
|
||||
return alert(data.message);
|
||||
else
|
||||
{
|
||||
var row = $('#faktorTable tbody tr[data-id="' + formData.id + '"]');
|
||||
row.find('.faktor').text(formData.faktor);
|
||||
row.find('.von').text(formData.von);
|
||||
row.find('.bis').text(formData.bis);
|
||||
|
||||
handleResponse('save');
|
||||
sortTable();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error)
|
||||
{
|
||||
alert('Fehler beim Laden der Daten');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteFaktor(formData)
|
||||
{
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: 'POST',
|
||||
url: "../../soap/lehrveranstaltung_faktor.json.php",
|
||||
data: {
|
||||
method: 'deleteFaktor',
|
||||
faktor: formData
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.status === 'error')
|
||||
return alert(data.message);
|
||||
else
|
||||
{
|
||||
var row = $('#faktorTable tbody tr[data-id="' + formData.id + '"]');
|
||||
row.remove();
|
||||
$("#faktorTable").trigger("update").trigger("applyWidgets");
|
||||
handleResponse('delete');
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
alert('Fehler beim Laden der Daten');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function addRow(faktor)
|
||||
{
|
||||
var tr = $('<tr>')
|
||||
.attr('data-id', faktor.id);
|
||||
|
||||
var editButton = $('<button>')
|
||||
.text('Bearbeiten')
|
||||
.addClass('edit')
|
||||
|
||||
var deleteButton = $('<button>')
|
||||
.text('Loeschen')
|
||||
.addClass('delete')
|
||||
|
||||
var row = tr
|
||||
.append(
|
||||
$('<td>').text(faktor.faktor).addClass('faktor'),
|
||||
$('<td>').text(faktor.von).addClass('von'),
|
||||
$('<td>').text(faktor.bis).addClass('bis'),
|
||||
$('<td>').append(editButton).addClass('edit'),
|
||||
$('<td>').append(deleteButton).addClass('delete')
|
||||
);
|
||||
|
||||
$('#faktorTable tbody').append(row);
|
||||
}
|
||||
|
||||
function handleResponse(type)
|
||||
{
|
||||
$('#faktorForm')[0].reset();
|
||||
$('#action').val('add');
|
||||
$('#id').val('');
|
||||
|
||||
let successMessage = document.getElementById('success_message_' + type);
|
||||
successMessage.style.display = 'block';
|
||||
setTimeout(() => successMessage.style.display = 'none', 1000);
|
||||
}
|
||||
|
||||
function sortTable()
|
||||
{
|
||||
if ($("#faktorTable tbody tr").length > 0)
|
||||
{
|
||||
$("#faktorTable").tablesorter({
|
||||
sortList: [[1,1], [0,0], [2,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$lehrveranstaltung_id = $_GET["lehrveranstaltung_id"];
|
||||
$lv = new lehrveranstaltung();
|
||||
$lv->load($lehrveranstaltung_id);
|
||||
|
||||
$faktor = new lehrveranstaltung_faktor();
|
||||
$faktor->loadByLV($lv->lehrveranstaltung_id);
|
||||
|
||||
$studiensemester = new studiensemester();
|
||||
$studiensemester->getAll('desc');
|
||||
|
||||
|
||||
echo '
|
||||
</head>
|
||||
<body class="Background_main">
|
||||
<h2>Faktor - '. $lv->bezeichnung . ' - ' . $lv->lehrveranstaltung_id . '</h2>';
|
||||
|
||||
echo '
|
||||
<form id="faktorForm">
|
||||
<input type="hidden" id="action" value="add" />
|
||||
<input type="hidden" id="id"/>
|
||||
<input type="hidden" id="lv_id" value="'. $lv->lehrveranstaltung_id .'"/>
|
||||
<label for="faktor">Faktor</label>
|
||||
<input type="number" id="faktor" name="faktor" required />
|
||||
<label for="von">Von</label>
|
||||
<select id="von" name="von" required>
|
||||
<option value="">---keine Auswahl---</option>';
|
||||
|
||||
foreach ($studiensemester->studiensemester as $sem)
|
||||
{
|
||||
echo '<option value="'.$sem->studiensemester_kurzbz.'">'.$sem->studiensemester_kurzbz.'</option>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</select>
|
||||
<label for="bis">Bis</label>
|
||||
<select id="bis" name="bis">
|
||||
<option value="">---keine Auswahl---</option>';
|
||||
|
||||
foreach ($studiensemester->studiensemester as $sem)
|
||||
{
|
||||
echo '<option value="'.$sem->studiensemester_kurzbz.'">'.$sem->studiensemester_kurzbz.'</option>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</select>
|
||||
<button type="submit">'.$p->t('global/speichern').'</button>
|
||||
<span id="success_message_save" class="alert alert-success" style="display:none;">'. $p->t('global/erfolgreichgespeichert') . '</span>
|
||||
<span id="success_message_delete" class="alert alert-success" style="display:none;">'. $p->t('global/erfolgreichgelöscht') . '</span>
|
||||
</form>
|
||||
|
||||
<table class="tablesorter" id="faktorTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$p->t('lv/faktor').'</th>
|
||||
<th>'.$p->t('global/von').'</th>
|
||||
<th>'.$p->t('global/bis').'</th>
|
||||
<th>'.$p->t('global/bearbeiten').'</th>
|
||||
<th>'.$p->t('global/loeschen').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
';
|
||||
|
||||
if(count($faktor->lv_faktoren) > 0)
|
||||
{
|
||||
foreach($faktor->lv_faktoren as $lv_faktor)
|
||||
{
|
||||
echo "<tr data-id=". $lv_faktor->lehrveranstaltung_faktor_id .">
|
||||
<td class='faktor'>".$lv_faktor->faktor."</td>
|
||||
<td class='von'>".$lv_faktor->studiensemester_kurzbz_von."</td>
|
||||
<td class='bis'>".$lv_faktor->studiensemester_kurzbz_bis."</td>
|
||||
<td><button class='edit'>".$p->t('global/bearbeiten')."</button></td>
|
||||
<td><button class='delete'>".$p->t('global/loeschen')."</button></td>
|
||||
</tr>"
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
'</tbody>
|
||||
</table>
|
||||
';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user