mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge branch 'master' into feature-15391/Positive_Zeitsperre
# Conflicts: # system/dbupdate_3.3.php
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Job for resolving core issues
|
||||
*/
|
||||
class IssueResolver extends IssueResolver_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// set fehler codes which can be resolved by the job
|
||||
// structure: fehlercode => class (library) name for resolving
|
||||
$this->_codeLibMappings = array(
|
||||
'CORE_ZGV_0001' => 'CORE_ZGV_0001',
|
||||
'CORE_ZGV_0002' => 'CORE_ZGV_0002',
|
||||
'CORE_ZGV_0003' => 'CORE_ZGV_0003',
|
||||
'CORE_ZGV_0004' => 'CORE_ZGV_0004',
|
||||
'CORE_ZGV_0005' => 'CORE_ZGV_0005',
|
||||
'CORE_INOUT_0001' => 'CORE_INOUT_0001',
|
||||
'CORE_INOUT_0002' => 'CORE_INOUT_0002',
|
||||
'CORE_INOUT_0003' => 'CORE_INOUT_0003',
|
||||
'CORE_INOUT_0004' => 'CORE_INOUT_0004',
|
||||
'CORE_INOUT_0005' => 'CORE_INOUT_0005',
|
||||
'CORE_INOUT_0006' => 'CORE_INOUT_0006'
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,8 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
// Set required permissions
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'download' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'index' => 'lehre/anrechnung_genehmigen:r',
|
||||
'download' => 'lehre/anrechnung_genehmigen:r',
|
||||
'approve' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'reject' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw',
|
||||
@@ -81,7 +81,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read the Anrechnung
|
||||
self::_checkIfEntitledToReadAnrechnung($anrechnung_id);
|
||||
$this->_checkIfEntitledToReadAnrechnung($anrechnung_id);
|
||||
|
||||
// Get Anrechung data
|
||||
$anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
|
||||
@@ -99,11 +99,16 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
// Get Genehmigung data
|
||||
$genehmigungData = $this->anrechnunglib->getGenehmigungData($anrechnung_id);
|
||||
|
||||
$hasReadOnlyAccess =
|
||||
$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $antragData->studiengang_kz)
|
||||
&& !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid', $antragData->studiengang_kz);
|
||||
|
||||
$viewData = array(
|
||||
'antragData' => $antragData,
|
||||
'anrechnungData' => $anrechnungData,
|
||||
'empfehlungData' => $empfehlungData,
|
||||
'genehmigungData' => $genehmigungData
|
||||
'genehmigungData' => $genehmigungData,
|
||||
'hasReadOnlyAccess' => $hasReadOnlyAccess
|
||||
);
|
||||
|
||||
$this->load->view('lehre/anrechnung/approveAnrechnungDetail.php', $viewData);
|
||||
@@ -385,7 +390,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
@@ -421,26 +426,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
'lehrveranstaltung_id' => getData($result)[0]->lehrveranstaltung_id
|
||||
));
|
||||
|
||||
if(!hasData($result))
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
$studiengang_kz = getData($result)[0]->studiengang_kz;
|
||||
|
||||
// Get STGL
|
||||
$result = $this->StudiengangModel->getLeitung(getData($result)[0]->studiengang_kz);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $stgl)
|
||||
{
|
||||
if ($stgl->uid == $this->_uid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
show_error('You are not entitled to read this Anrechnung');
|
||||
// Check if user is entitled
|
||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||
{
|
||||
show_error('You are not entitled to read this page');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -460,23 +452,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
'lehrveranstaltung_id' => $result->lehrveranstaltung_id
|
||||
));
|
||||
|
||||
if(!$result = getData($result)[0])
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
$studiengang_kz = getData($result)[0]->studiengang_kz;
|
||||
|
||||
// Get STGL
|
||||
$result = $this->StudiengangModel->getLeitung($result->studiengang_kz);
|
||||
|
||||
if($result = getData($result)[0])
|
||||
{
|
||||
if ($result->uid == $this->_uid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
// Check if user is entitled
|
||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||
{
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
const BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN = 'lehre/anrechnung_genehmigen';
|
||||
|
||||
const BERECHTIGUNG_ANRECHNUNG_ANLEGEN = 'lehre/anrechnung_anlegen';
|
||||
|
||||
const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht';
|
||||
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
|
||||
@@ -19,8 +20,8 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
// Set required permissions
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'download' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'index' => 'lehre/anrechnung_genehmigen:r',
|
||||
'download' => 'lehre/anrechnung_genehmigen:r',
|
||||
'approve' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'reject' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw'
|
||||
@@ -76,10 +77,19 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error(getError($studiengang_kz_arr));
|
||||
}
|
||||
|
||||
|
||||
$hasReadOnlyAccess =
|
||||
$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's')
|
||||
&& !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid');
|
||||
|
||||
// This permission is checked here to disable create Anrechnung button, if permission is not given
|
||||
$hasCreateAnrechnungAccess = $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_ANLEGEN, 's');
|
||||
|
||||
$viewData = array(
|
||||
'studiensemester_selected' => $studiensemester_kurzbz,
|
||||
'studiengaenge_entitled' => $studiengang_kz_arr
|
||||
'studiengaenge_entitled' => $studiengang_kz_arr,
|
||||
'hasReadOnlyAccess' => $hasReadOnlyAccess,
|
||||
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess
|
||||
);
|
||||
|
||||
$this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
|
||||
@@ -239,7 +249,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
@@ -281,22 +291,14 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
|
||||
$studiengang_kz = $result->studiengang_kz;
|
||||
|
||||
// Get STGL
|
||||
$result = $this->StudiengangModel->getLeitung($result->studiengang_kz);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $stgl)
|
||||
{
|
||||
if ($stgl->uid == $this->_uid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
// Check if user is entitled
|
||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||
{
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Get Anrechung data
|
||||
$anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
|
||||
|
||||
|
||||
// Get Antrag data
|
||||
$antragData = $this->anrechnunglib->getAntragData(
|
||||
$anrechnungData->prestudent_id,
|
||||
@@ -110,7 +110,7 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
// Get lectors person data
|
||||
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
|
||||
{
|
||||
@@ -218,10 +218,10 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
|
||||
// Download file
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
@@ -320,7 +320,12 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
foreach ($studiengang_kz_arr as $studiengang_kz)
|
||||
{
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
$stgmail = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
if(isSuccess($stgmail) && hasData($stgmail))
|
||||
list ($to, $vorname) = getData($stgmail)[0];
|
||||
else
|
||||
show_error ('Failed retrieving DegreeProgram Mail');
|
||||
|
||||
// Get full name of lector
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
@@ -361,24 +366,28 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
$result = $this->StudiengangModel->getLeitung($stg_kz);
|
||||
|
||||
// Get STGL mail address, if available
|
||||
if (hasData($result))
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->uid. '@'. DOMAIN,
|
||||
$result->retval[0]->vorname
|
||||
);
|
||||
));
|
||||
}
|
||||
// ...otherwise get assistance mail address
|
||||
else
|
||||
{
|
||||
$result = $this->StudiengangModel->load($stg_kz);
|
||||
|
||||
if (hasData($result))
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->email,
|
||||
''
|
||||
);
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('Keine E-Mail für diesen Stg gefunden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
const BERECHTIGUNG_ANRECHNUNG_EMPFEHLEN = 'lehre/anrechnung_empfehlen';
|
||||
|
||||
|
||||
const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht';
|
||||
|
||||
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF';
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor';
|
||||
const ANRECHNUNGSTATUS_APPROVED = 'approved';
|
||||
const ANRECHNUNGSTATUS_REJECTED = 'rejected';
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// Set required permissions
|
||||
@@ -25,24 +25,24 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'dontRecommend' => 'lehre/anrechnung_empfehlen:rw'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Load models
|
||||
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
|
||||
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
|
||||
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
|
||||
// Load libraries
|
||||
$this->load->library('WidgetLib');
|
||||
$this->load->library('PermissionLib');
|
||||
$this->load->library('AnrechnungLib');
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
|
||||
// Load helpers
|
||||
$this->load->helper('form');
|
||||
$this->load->helper('url');
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
@@ -54,12 +54,12 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'table'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->_setAuthUID();
|
||||
|
||||
|
||||
$this->setControllerId();
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Get study semester
|
||||
@@ -70,14 +70,14 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
$studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
|
||||
$viewData = array(
|
||||
'studiensemester_selected' => $studiensemester_kurzbz
|
||||
);
|
||||
|
||||
|
||||
$this->load->view('lehre/anrechnung/reviewAnrechnungUebersicht.php', $viewData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recommend Anrechnungen.
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isset($json) && !isEmptyArray($json))
|
||||
{
|
||||
@@ -123,19 +123,19 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Dont recommend Anrechnungen.
|
||||
*/
|
||||
public function dontRecommend()
|
||||
{
|
||||
$data = $this->input->post('data');
|
||||
|
||||
|
||||
if(isEmptyArray($data))
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
foreach ($data as $item)
|
||||
{
|
||||
// Approve Anrechnung
|
||||
@@ -149,7 +149,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isset($json) && !isEmptyArray($json))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error('Failed sending emails');
|
||||
}
|
||||
|
||||
|
||||
return $this->outputJsonSuccess($json);
|
||||
}
|
||||
else
|
||||
@@ -166,7 +166,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Download and open uploaded document (Nachweisdokument).
|
||||
*/
|
||||
@@ -178,28 +178,28 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error('Wrong parameter');
|
||||
}
|
||||
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
|
||||
// Download file
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the UID of the logged user and checks if it is valid
|
||||
*/
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
|
||||
if (!$this->_uid) show_error('User authentification failed');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if user is entitled to read dms doc
|
||||
* @param $dms_id
|
||||
@@ -207,15 +207,15 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
private function _checkIfEntitledToReadDMSDoc($dms_id)
|
||||
{
|
||||
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
||||
|
||||
|
||||
if(!$result = getData($result)[0])
|
||||
{
|
||||
show_error('Failed retrieving Anrechnung');
|
||||
}
|
||||
|
||||
|
||||
$result = $this->LehrveranstaltungModel
|
||||
->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
|
||||
|
||||
|
||||
if($result = getData($result))
|
||||
{
|
||||
$entitled_lector_arr = array_column($result, 'uid');
|
||||
@@ -225,10 +225,10 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send mails to STGL (if not present then to STGL assistance)
|
||||
* @param $mail_params
|
||||
@@ -239,36 +239,41 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
// Get studiengaenge
|
||||
$studiengang_kz_arr = array();
|
||||
|
||||
|
||||
foreach ($mail_params as $item)
|
||||
{
|
||||
$this->AnrechnungModel->addSelect('studiengang_kz');
|
||||
$this->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id');
|
||||
|
||||
|
||||
$studiengang_kz_arr[]= $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiengang_kz;
|
||||
}
|
||||
|
||||
|
||||
$studiengang_kz_arr = array_unique($studiengang_kz_arr);
|
||||
|
||||
|
||||
// Send mail to STGL of each studiengang
|
||||
foreach ($studiengang_kz_arr as $studiengang_kz)
|
||||
{
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
$stgmail = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
if(isSuccess($stgmail) && hasData($stgmail))
|
||||
list ($to, $vorname) = getData($stgmail)[0];
|
||||
else
|
||||
show_error ('Failed retrieving DegreeProgram Mail');
|
||||
|
||||
// Get full name of lector
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid)))
|
||||
{
|
||||
show_error ('Failed retrieving person');
|
||||
}
|
||||
|
||||
|
||||
// Link to Antrag genehmigen
|
||||
$url =
|
||||
CIS_ROOT. 'cis/index.php?menu='.
|
||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||
CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
|
||||
|
||||
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $vorname,
|
||||
@@ -276,7 +281,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'empfehlung' => $empfehlung ? 'positive' : 'negative',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAbgeben',
|
||||
$body_fields,
|
||||
@@ -284,37 +289,41 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
private function _getSTGLMailAddress($stg_kz)
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$result = $this->StudiengangModel->getLeitung($stg_kz);
|
||||
|
||||
|
||||
// Get STGL mail address, if available
|
||||
if (hasData($result))
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->uid. '@'. DOMAIN,
|
||||
$result->retval[0]->vorname
|
||||
);
|
||||
));
|
||||
}
|
||||
// ...otherwise get assistance mail address
|
||||
else
|
||||
{
|
||||
$result = $this->StudiengangModel->load($stg_kz);
|
||||
|
||||
if (hasData($result))
|
||||
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->email,
|
||||
''
|
||||
);
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('Keine E-Mail für diesen Stg gefunden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -560,8 +560,10 @@ class InfoCenter extends Auth_Controller
|
||||
/**
|
||||
* Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang
|
||||
*/
|
||||
private function sendZgvMail($mail, $typ){
|
||||
private function sendZgvMail($mail, $typ, $person){
|
||||
$data = array(
|
||||
'vorname' => $person->vorname,
|
||||
'nachname' => $person->nachname,
|
||||
'link' => site_url('system/infocenter/ZGVUeberpruefung')
|
||||
);
|
||||
|
||||
@@ -657,6 +659,16 @@ class InfoCenter extends Auth_Controller
|
||||
if (isEmptyString($prestudent_id) || isEmptyString($person_id))
|
||||
$this->terminateWithJsonError('Prestudentid OR/AND Personid missing');
|
||||
|
||||
$person = $this->PersonModel->load($person_id);
|
||||
|
||||
if (isError($person))
|
||||
$this->terminateWithJsonError(getError($person));
|
||||
|
||||
if (!hasData($person))
|
||||
$this->terminateWithJsonError('Person existiert nicht.');
|
||||
|
||||
$person = getData($person)[0];
|
||||
|
||||
$zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id);
|
||||
|
||||
$data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
|
||||
@@ -688,7 +700,7 @@ class InfoCenter extends Auth_Controller
|
||||
$this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg'));
|
||||
|
||||
if (isSuccess($insert))
|
||||
$this->sendZgvMail($mail, $typ);
|
||||
$this->sendZgvMail($mail, $typ, $person);
|
||||
elseif (isError($insert))
|
||||
$this->terminateWithJsonError('Fehler beim Speichern');
|
||||
}else
|
||||
@@ -714,7 +726,7 @@ class InfoCenter extends Auth_Controller
|
||||
$this->_log($person_id, 'newzgv', array($zgvpruefung_id));
|
||||
|
||||
if (isSuccess($result))
|
||||
$this->sendZgvMail($mail, $typ);
|
||||
$this->sendZgvMail($mail, $typ, $person);
|
||||
elseif (isError($result))
|
||||
$this->terminateWithJsonError('Fehler beim Speichern');
|
||||
}
|
||||
@@ -1708,9 +1720,15 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
if (isset($locked->retval[0]->uid))
|
||||
{
|
||||
$lockedby = $locked->retval[0]->uid;
|
||||
if ($lockedby !== $this->_uid)
|
||||
if (!$lockedby = getData($this->PersonModel->getFullName($locked->retval[0]->uid)))
|
||||
{
|
||||
show_error('Failed retrieving person');
|
||||
}
|
||||
|
||||
if ($locked->retval[0]->uid !== $this->_uid)
|
||||
{
|
||||
$lockedbyother = true;
|
||||
}
|
||||
}
|
||||
|
||||
$stammdaten = $this->PersonModel->getPersonStammdaten($person_id, true);
|
||||
|
||||
@@ -58,21 +58,42 @@ class Issues extends Auth_Controller
|
||||
{
|
||||
$issue_ids = $this->input->post('issue_ids');
|
||||
$status_kurzbz = $this->input->post('status_kurzbz');
|
||||
$verarbeitetvon = $this->_uid;
|
||||
$user = $this->_uid;
|
||||
|
||||
$errors = array();
|
||||
foreach ($issue_ids as $issue_id)
|
||||
{
|
||||
$issueRes = $this->issueslib->changeIssueStatus($issue_id, $status_kurzbz, $verarbeitetvon);
|
||||
switch ($status_kurzbz)
|
||||
{
|
||||
case IssuesLib::STATUS_NEU:
|
||||
$changeIssueMethod = 'setNeu';
|
||||
break;
|
||||
case IssuesLib::STATUS_IN_BEARBEITUNG:
|
||||
$changeIssueMethod = 'setInBearbeitung';
|
||||
break;
|
||||
case IssuesLib::STATUS_BEHOBEN:
|
||||
$changeIssueMethod = 'setBehoben';
|
||||
break;
|
||||
default:
|
||||
$changeIssueMethod = null;
|
||||
break;
|
||||
}
|
||||
|
||||
if (isError($issueRes))
|
||||
$errors[] = getError($issueRes);
|
||||
if (isEmptyString($changeIssueMethod))
|
||||
$errors[] = error("Invalid issue status given");
|
||||
else
|
||||
{
|
||||
$issueRes = $this->issueslib->{$changeIssueMethod}($issue_id, $user);
|
||||
|
||||
if (isError($issueRes))
|
||||
$errors[] = getError($issueRes);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isEmptyArray($errors))
|
||||
$this->outputJsonError(implode(", ", $errors));
|
||||
else
|
||||
$this->outputJsonSuccess("Status erfolgreich aktualisiert");
|
||||
$this->outputJsonSuccess("Status successfully refreshed");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +154,7 @@ class Issues extends Auth_Controller
|
||||
|
||||
// add oes for which there is the "manage issues" Berechtigung
|
||||
if (!$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ))
|
||||
show_error('Keine Berechtigung oder Fehler bei Berechtigungsprüfung');
|
||||
show_error('No permission or error when checking permissions');
|
||||
|
||||
$all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt));
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Interface defining method to implement for issue resolution checker (from core and extensions)
|
||||
*/
|
||||
interface IIssueResolvedChecker
|
||||
{
|
||||
/**
|
||||
* Checks if a issue of a certain type is resolved.
|
||||
* Classes for resolving a certain issue type implement this method.
|
||||
* @param array $params parameters needed for issue resolution
|
||||
* @return object with success(true) if issue resolved, success(false) otherwise
|
||||
*/
|
||||
public function checkIfIssueIsResolved($params);
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Controller for retrieving open issues and, if the issue condition is not met anymore, automatically set it to resolved
|
||||
*/
|
||||
abstract class IssueResolver_Controller extends JOB_Controller
|
||||
{
|
||||
const ISSUES_FOLDER = 'issues';
|
||||
const CHECK_ISSUE_RESOLVED_METHOD_NAME = 'checkIfIssueIsResolved';
|
||||
|
||||
protected $_codeLibMappings;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->load->model('system/Issue_model', 'IssueModel');
|
||||
|
||||
$this->load->library('IssuesLib');
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes issue resolution.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->logInfo("Issue resolve job started");
|
||||
|
||||
// load open issues with given errorcodes
|
||||
$openIssuesRes = $this->IssueModel->getOpenIssues(array_keys($this->_codeLibMappings));
|
||||
|
||||
// log error if occured
|
||||
if (isError($openIssuesRes))
|
||||
{
|
||||
$this->logError(getError($openIssuesRes));
|
||||
}
|
||||
else
|
||||
{
|
||||
// log info if no data found
|
||||
if (!hasData($openIssuesRes))
|
||||
{
|
||||
$this->logInfo("No open issues found");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$openIssues = getData($openIssuesRes);
|
||||
|
||||
foreach ($openIssues as $issue)
|
||||
{
|
||||
if (isset($this->_codeLibMappings[$issue->fehlercode]))
|
||||
{
|
||||
$libName = $this->_codeLibMappings[$issue->fehlercode];
|
||||
|
||||
// add person id and oe kurzbz automatically as params, merge it with additional params
|
||||
// decode bewerbung_parameter into assoc array
|
||||
$params = array_merge(
|
||||
array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz),
|
||||
isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array()
|
||||
);
|
||||
|
||||
// if called from extension (extension name set), path includes extension names, otherwise it is the core library folder
|
||||
$libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : '';
|
||||
$issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/';
|
||||
$issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php';
|
||||
|
||||
// check if library file exists
|
||||
if (!file_exists($issuesLibFilePath))
|
||||
{
|
||||
// log error and continue with next issue if not
|
||||
$this->logError("Issue library file " . $issuesLibFilePath . " does not exist");
|
||||
continue;
|
||||
}
|
||||
|
||||
// load library connected to fehlercode
|
||||
$this->load->library(
|
||||
$issuesLibPath . $libName
|
||||
);
|
||||
|
||||
$lowercaseLibName = mb_strtolower($libName);
|
||||
|
||||
// check if method is defined in libary class
|
||||
if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_RESOLVED_METHOD_NAME)))
|
||||
{
|
||||
// log error and continue with next issue if not
|
||||
$this->logError("Method " . self::CHECK_ISSUE_RESOLVED_METHOD_NAME . " is not defined in library $lowercaseLibName");
|
||||
continue;
|
||||
}
|
||||
|
||||
// call the function for checking for issue resolution
|
||||
$issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_RESOLVED_METHOD_NAME}($params);
|
||||
|
||||
if (isError($issueResolvedRes))
|
||||
{
|
||||
$this->logError(getError($issueResolvedRes));
|
||||
}
|
||||
else
|
||||
{
|
||||
$issueResolvedData = getData($issueResolvedRes);
|
||||
|
||||
if ($issueResolvedData === true)
|
||||
{
|
||||
// set issue to resolved if needed
|
||||
$behobenRes = $this->issueslib->setBehoben($issue->issue_id, null);
|
||||
|
||||
if (isError($behobenRes))
|
||||
$this->logError(getError($behobenRes));
|
||||
else
|
||||
$this->logInfo("Issue " . $issue->issue_id . " successfully resolved");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->logInfo("Issue resolve job ended");
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,24 @@ function printPageTitle($title)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the meta tag http-equiv refresh having as content the value of the given parameter
|
||||
*/
|
||||
function printRefreshMeta($refresh)
|
||||
{
|
||||
if ($refresh != null)
|
||||
{
|
||||
if (is_numeric($refresh) && $refresh > 0)
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="'.$refresh.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The provided refresh parameter has to be a number greater then 0');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates tags for the style sheets you want to include, the parameter could by a string or an array of strings
|
||||
*/
|
||||
|
||||
@@ -89,6 +89,7 @@ class AnrechnungLib
|
||||
$antrag_data->vorname = $person->vorname;
|
||||
$antrag_data->nachname = $person->nachname;
|
||||
$antrag_data->matrikelnr = $student->matrikelnr;
|
||||
$antrag_data->studiengang_kz = $studiengang->studiengang_kz;
|
||||
$antrag_data->stg_bezeichnung = $studiengang->bezeichnung;
|
||||
$antrag_data->lektoren = $lv_lektoren_arr;
|
||||
$antrag_data->zgv = $latest_zgv_bezeichnung;
|
||||
|
||||
@@ -62,17 +62,17 @@ class IssuesLib
|
||||
* @param array $fehlertext_params params for sprint replace of error text in system.tbl_fehler
|
||||
* @return object success or error
|
||||
*/
|
||||
public function addFhcIssue($fehler_kurzbz, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null)
|
||||
public function addFhcIssue($fehler_kurzbz, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null)
|
||||
{
|
||||
$fehlerRes = $this->_ci->FehlerModel->loadWhere(array('fehler_kurzbz' => $fehler_kurzbz));
|
||||
|
||||
if (hasData($fehlerRes))
|
||||
{
|
||||
$fehlercode = getData($fehlerRes)[0]->fehlercode;
|
||||
return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params);
|
||||
return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params);
|
||||
}
|
||||
else
|
||||
return error("Fehler $fehler_kurzbz nicht gefunden");
|
||||
return error("Error $fehler_kurzbz not found");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,13 +82,13 @@ class IssuesLib
|
||||
* @param int $person_id
|
||||
* @param int $oe_kurzbz
|
||||
* @param array $fehlertext_params params for replacement of parts of error text
|
||||
* @param bool $force_predefined if true, only predefined external issues are added
|
||||
* @param bool $force_predefined if true, only predefined (with entry in fehler table) external issues are added
|
||||
* @return object success or error
|
||||
*/
|
||||
public function addExternalIssue($fehlercode_extern, $inhalt_extern, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $force_predefined = false)
|
||||
public function addExternalIssue($fehlercode_extern, $inhalt_extern, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null)
|
||||
{
|
||||
if (isEmptyString($fehlercode_extern))
|
||||
return error("fehlercode_extern fehlt");
|
||||
return error("fehlercode_extern missing");
|
||||
|
||||
// get external fehlercode (unique for each app)
|
||||
$this->_ci->FehlerModel->addSelect('fehlercode');
|
||||
@@ -102,19 +102,13 @@ class IssuesLib
|
||||
if (isError($fehlerRes))
|
||||
return $fehlerRes;
|
||||
|
||||
$fehlerData = getData($fehlerRes)[0];
|
||||
|
||||
// check if there is a predefined custom error for the external issue
|
||||
if (hasData($fehlerRes))
|
||||
{
|
||||
$fehlerData = getData($fehlerRes)[0];
|
||||
// if found, use the code
|
||||
$fehlercode = $fehlerData->fehlercode;
|
||||
}
|
||||
elseif ($force_predefined === true)
|
||||
{
|
||||
// only added if predefined
|
||||
return success("No definition found - not added");
|
||||
}
|
||||
else
|
||||
{
|
||||
// if predefined error is not found, insert with fallback code
|
||||
@@ -122,20 +116,70 @@ class IssuesLib
|
||||
}
|
||||
|
||||
// add external issue
|
||||
return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params, $fehlercode_extern, $inhalt_extern);
|
||||
return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params, null, $fehlercode_extern, $inhalt_extern);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set issue to resolved.
|
||||
* @param int $issue_id
|
||||
* @param string $user uid of issue resolver
|
||||
* @return object success or error
|
||||
*/
|
||||
public function setBehoben($issue_id, $user)
|
||||
{
|
||||
$data = array(
|
||||
'status_kurzbz' => self::STATUS_BEHOBEN,
|
||||
'verarbeitetvon' => $user,
|
||||
'verarbeitetamum' => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
return $this->_changeIssueStatus($issue_id, $data, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set issue to in progress.
|
||||
* @param int $issue_id
|
||||
* @param string $user uid of issue resovler
|
||||
* @return object success or error
|
||||
*/
|
||||
public function setInBearbeitung($issue_id, $user)
|
||||
{
|
||||
$data = array(
|
||||
'status_kurzbz' => self::STATUS_IN_BEARBEITUNG,
|
||||
'verarbeitetvon' => $user
|
||||
);
|
||||
|
||||
return $this->_changeIssueStatus($issue_id, $data, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set issue to new.
|
||||
* @param int $issue_id
|
||||
* @param string $user uid of issue resolver
|
||||
* @return object success or error
|
||||
*/
|
||||
public function setNeu($issue_id, $user)
|
||||
{
|
||||
$data = array(
|
||||
'status_kurzbz' => self::STATUS_NEU,
|
||||
'verarbeitetvon' => null,
|
||||
'verarbeitetamum' => null
|
||||
);
|
||||
|
||||
return $this->_changeIssueStatus($issue_id, $data, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes status of an issue.
|
||||
* @param int $issue_id
|
||||
* @param string $status_kurzbz the new status
|
||||
* @param string $verarbeitetvon uid of person changing the status (needed for in Bearbeitung and behoben)
|
||||
* @param array $sdata the data to save, including status
|
||||
* @param string $user uid of person changing the status (needed for in Bearbeitung and behoben)
|
||||
* @return success or error
|
||||
*/
|
||||
public function changeIssueStatus($issue_id, $status_kurzbz, $verarbeitetvon = null)
|
||||
private function _changeIssueStatus($issue_id, $data, $user)
|
||||
{
|
||||
if (!isset($issue_id) || !is_numeric($issue_id))
|
||||
return error("Issue Id muss korrekt gesetzt sein.");
|
||||
return error("Issue Id must be set correctly.");
|
||||
|
||||
// check if given status is same as existing
|
||||
$this->_ci->IssueModel->addSelect('status_kurzbz');
|
||||
@@ -143,39 +187,14 @@ class IssuesLib
|
||||
|
||||
if (hasData($currStatus))
|
||||
{
|
||||
if (getData($currStatus)[0]->status_kurzbz == $status_kurzbz)
|
||||
return success("Gleicher Status bereits gesetzt");
|
||||
if (getData($currStatus)[0]->status_kurzbz == $data['status_kurzbz'])
|
||||
return success("Same status already set");
|
||||
}
|
||||
else
|
||||
return error("Fehler beim Holen des Status");
|
||||
return error("Error when getting status");
|
||||
|
||||
$data = array(
|
||||
'status_kurzbz' => $status_kurzbz,
|
||||
'updatevon' => $verarbeitetvon,
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
if ($status_kurzbz == self::STATUS_NEU)
|
||||
{
|
||||
|
||||
$data['verarbeitetvon'] = null;
|
||||
}
|
||||
|
||||
if ($status_kurzbz == self::STATUS_NEU || $status_kurzbz == self::STATUS_IN_BEARBEITUNG)
|
||||
{
|
||||
$data['verarbeitetamum'] = null;
|
||||
}
|
||||
|
||||
if ($status_kurzbz == self::STATUS_IN_BEARBEITUNG || $status_kurzbz == self::STATUS_BEHOBEN)
|
||||
{
|
||||
if (isset($verarbeitetvon))
|
||||
$data['verarbeitetvon'] = $verarbeitetvon;
|
||||
else
|
||||
return error("Verarbeitetvon nicht gesetzt");
|
||||
}
|
||||
|
||||
if ($status_kurzbz == self::STATUS_BEHOBEN)
|
||||
$data['verarbeitetamum'] = date('Y-m-d H:i:s');
|
||||
$data['updatevon'] = $user;
|
||||
$data['updateamum'] = date('Y-m-d H:i:s');
|
||||
|
||||
return $this->_ci->IssueModel->update(
|
||||
array(
|
||||
@@ -191,14 +210,15 @@ class IssuesLib
|
||||
* @param int $person_id
|
||||
* @param string $oe_kurzbz
|
||||
* @param array $fehlertext_params
|
||||
* @param string $resolution_params
|
||||
* @param string $fehlercode_extern
|
||||
* @param string $inhalt_extern
|
||||
* @return object success or error
|
||||
*/
|
||||
private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $fehlercode_extern = null, $inhalt_extern = null)
|
||||
private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null, $fehlercode_extern = null, $inhalt_extern = null)
|
||||
{
|
||||
if (isEmptyString($person_id) && isEmptyString($oe_kurzbz))
|
||||
return error("Person_id oder oe_kurzbz muss gesetzt sein.");
|
||||
return error("Person_id or oe_kurzbz must be set.");
|
||||
|
||||
// get fehlertextVorlage and replace it with params
|
||||
$fehlerRes = $this->_ci->FehlerModel->load($fehlercode);
|
||||
@@ -218,6 +238,20 @@ class IssuesLib
|
||||
|
||||
if ($openIssueCount == 0)
|
||||
{
|
||||
if (isset($resolution_params))
|
||||
{
|
||||
if (is_array($resolution_params))
|
||||
{
|
||||
foreach ($resolution_params as $resolution_key => $resolution_param)
|
||||
{
|
||||
if (!is_string($resolution_key))
|
||||
return error("Invalid parameter for resolution, must be an associative array");
|
||||
}
|
||||
}
|
||||
else
|
||||
return error("Invalid parameters for resolution");
|
||||
}
|
||||
|
||||
return $this->_ci->IssueModel->insert(
|
||||
array(
|
||||
'fehlercode' => $fehlercode,
|
||||
@@ -228,6 +262,7 @@ class IssuesLib
|
||||
'oe_kurzbz' => $oe_kurzbz,
|
||||
'datum' => date('Y-m-d H:i:s'),
|
||||
'status_kurzbz' => self::STATUS_NEU,
|
||||
'behebung_parameter' => isset($resolution_params) ? json_encode($resolution_params) : null,
|
||||
'insertvon' => $this->_insertvon
|
||||
)
|
||||
);
|
||||
@@ -236,9 +271,9 @@ class IssuesLib
|
||||
return success($openIssueCount);
|
||||
}
|
||||
else
|
||||
return error("Anzahl offener Issues konnte nicht ermittelt werden.");
|
||||
return error("Number of open issues could not be determined");
|
||||
}
|
||||
else
|
||||
return error("Fehler $fehlercode nicht gefunden");
|
||||
return error("Error $fehlercode could not be found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Bisio Zweck does not exist
|
||||
*/
|
||||
class CORE_INOUT_0001 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['bisio_id']) || !is_numeric($params['bisio_id']))
|
||||
return error('Bisio Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
// get all bisio Zwecke
|
||||
$this->_ci->BisiozweckModel->addSelect('1');
|
||||
$bisiozweckRes = $this->_ci->BisiozweckModel->loadWhere(array('bisio_id' => $params['bisio_id']));
|
||||
|
||||
if (isError($bisiozweckRes))
|
||||
return $bisiozweckRes;
|
||||
|
||||
if (hasData($bisiozweckRes))
|
||||
return success(true); // resolved if bisio Zweck exists
|
||||
else
|
||||
return success(false); // not resolved if no bisio zweck
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* More than one Zweck for incoming
|
||||
*/
|
||||
class CORE_INOUT_0002 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['bisio_id']) || !is_numeric($params['bisio_id']))
|
||||
return error('Bisio Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
// get all bisio Zwecke
|
||||
$this->_ci->BisiozweckModel->addSelect('1');
|
||||
$bisiozweckRes = $this->_ci->BisiozweckModel->loadWhere(array('bisio_id' => $params['bisio_id']));
|
||||
|
||||
if (isError($bisiozweckRes))
|
||||
return $bisiozweckRes;
|
||||
|
||||
if (hasData($bisiozweckRes))
|
||||
{
|
||||
if (count(getData($bisiozweckRes)) <= 1) // resolved if one bisio Zweck
|
||||
return success(true);
|
||||
else
|
||||
return success(false); // otherwise not resolved
|
||||
}
|
||||
else
|
||||
return success(true); // resolved if no bisio zweck
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Invalid Zweck for incoming
|
||||
*/
|
||||
class CORE_INOUT_0003 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['bisio_id']) || !is_numeric($params['bisio_id']))
|
||||
return error('Bisio Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
// get all Zwecke
|
||||
$this->_ci->BisiozweckModel->addSelect('zweck_code');
|
||||
$bisiozweckRes = $this->_ci->BisiozweckModel->loadWhere(array('bisio_id' => $params['bisio_id']));
|
||||
|
||||
if (isError($bisiozweckRes))
|
||||
return $bisiozweckRes;
|
||||
|
||||
if (hasData($bisiozweckRes))
|
||||
{
|
||||
$bisiozweckData = getData($bisiozweckRes);
|
||||
|
||||
// resolved if Zweck is 1, 2 or 3
|
||||
if (count($bisiozweckData) == 1 && !in_array($bisiozweckData[0]->zweck_code, array(1, 2, 3)))
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Aufenthaltsförderung must exist if certain length of outgoing stay is exceeded
|
||||
*/
|
||||
class CORE_INOUT_0004 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['bisio_id']) || !is_numeric($params['bisio_id']))
|
||||
return error('Bisio Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
|
||||
|
||||
// get all Zwecke
|
||||
$this->_ci->AufenthaltfoerderungModel->addSelect('tbl_aufenthaltfoerderung.aufenthaltfoerderung_code');
|
||||
$this->_ci->AufenthaltfoerderungModel->addJoin('bis.tbl_bisio_aufenthaltfoerderung', 'aufenthaltfoerderung_code');
|
||||
$this->_ci->AufenthaltfoerderungModel->addOrder('tbl_aufenthaltfoerderung.aufenthaltfoerderung_code');
|
||||
$bisioFoerderungRes = $this->_ci->AufenthaltfoerderungModel->loadWhere(array('bisio_id' => $params['bisio_id']));
|
||||
|
||||
if (isError($bisioFoerderungRes))
|
||||
return $bisioFoerderungRes;
|
||||
|
||||
if (hasData($bisioFoerderungRes))
|
||||
{
|
||||
// resolved if Aufenthaltsfoerderung exists
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_ci->load->model('codex/Bisio_model', 'BisioModel');
|
||||
|
||||
// get Bisio Aufenthaltsdauer
|
||||
$aufenthaltsdauerRes = $this->_ci->BisioModel->getAufenthaltsdauer($params['bisio_id']);
|
||||
|
||||
if (isError($aufenthaltsdauerRes))
|
||||
return $aufenthaltsdauerRes;
|
||||
|
||||
if (hasData($aufenthaltsdauerRes))
|
||||
{
|
||||
$aufenthaltsdauer = getData($aufenthaltsdauerRes);
|
||||
|
||||
// check if stay >= 29 days. If yes and no Aufenthaltsfoerderung - not resolved
|
||||
if ($aufenthaltsdauer >= 29)
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else // no Aufenthaltsdauer - not resolved
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ECTS angerechnet must exist for outgoing if longer stay
|
||||
*/
|
||||
class CORE_INOUT_0005 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['bisio_id']) || !is_numeric($params['bisio_id']))
|
||||
return error('Bisio Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Bisio_model', 'BisioModel');
|
||||
|
||||
// get all Zwecke
|
||||
$this->_ci->BisioModel->addSelect('ects_angerechnet');
|
||||
$bisioRes = $this->_ci->BisioModel->loadWhere(array('bisio_id' => $params['bisio_id']));
|
||||
|
||||
if (isError($bisioRes))
|
||||
return $bisioRes;
|
||||
|
||||
if (hasData($bisioRes) && !isEmptyString(getData($bisioRes)[0]->ects_angerechnet))
|
||||
{
|
||||
// resolved if ects exists
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get Bisio Aufenthaltsdauer
|
||||
$aufenthaltsdauerRes = $this->_ci->BisioModel->getAufenthaltsdauer($params['bisio_id']);
|
||||
|
||||
if (isError($aufenthaltsdauerRes))
|
||||
return $aufenthaltsdauerRes;
|
||||
|
||||
if (hasData($aufenthaltsdauerRes))
|
||||
{
|
||||
$aufenthaltsdauer = getData($aufenthaltsdauerRes);
|
||||
|
||||
// check if stay >= 29 days. If yes and no ects - not resolved
|
||||
if ($aufenthaltsdauer >= 29)
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else // no Aufenthaltsdauer - not resolved
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ECTS erworben must exist for outgoing if longer stay
|
||||
*/
|
||||
class CORE_INOUT_0006 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['bisio_id']) || !is_numeric($params['bisio_id']))
|
||||
return error('Bisio Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Bisio_model', 'BisioModel');
|
||||
//$this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
|
||||
|
||||
// get all Zwecke
|
||||
$this->_ci->BisioModel->addSelect('ects_erworben');
|
||||
$bisioRes = $this->_ci->BisioModel->loadWhere(array('bisio_id' => $params['bisio_id']));
|
||||
|
||||
if (isError($bisioRes))
|
||||
return $bisioRes;
|
||||
|
||||
if (hasData($bisioRes) && !isEmptyString(getData($bisioRes)[0]->ects_erworben))
|
||||
{
|
||||
// resolved if ects exists
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// get Bisio Aufenthaltsdauer
|
||||
$aufenthaltsdauerRes = $this->_ci->BisioModel->getAufenthaltsdauer($params['bisio_id']);
|
||||
|
||||
if (isError($aufenthaltsdauerRes))
|
||||
return $aufenthaltsdauerRes;
|
||||
|
||||
if (hasData($aufenthaltsdauerRes))
|
||||
{
|
||||
$aufenthaltsdauer = getData($aufenthaltsdauerRes);
|
||||
|
||||
// check if stay >= 29 days. If yes and no ects - not resolved
|
||||
if ($aufenthaltsdauer >= 29)
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else // no Aufenthaltsdauer - not resolved
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ZGV Datum in future
|
||||
*/
|
||||
class CORE_ZGV_0001 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// get zgvdatum of prestudent
|
||||
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->_ci->PrestudentModel->addSelect('zgvdatum');
|
||||
$prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']);
|
||||
|
||||
if (isError($prestudentRes))
|
||||
return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$zgvdatum = getData($prestudentRes)[0]->zgvdatum;
|
||||
|
||||
if (isEmptyString($zgvdatum))
|
||||
return success(false);
|
||||
|
||||
// check if zgvdatum comes after today
|
||||
if ($zgvdatum > date('Y-m-d'))
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ZGV Datum must be after Geburtsdatum
|
||||
*/
|
||||
class CORE_ZGV_0002 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// get zgvdatum of prestudent
|
||||
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->_ci->PrestudentModel->addSelect('zgvdatum, gebdatum');
|
||||
$this->_ci->PrestudentModel->addJoin('public.tbl_person', 'person_id');
|
||||
$prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']);
|
||||
|
||||
if (isError($prestudentRes))
|
||||
return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudentData = getData($prestudentRes)[0];
|
||||
|
||||
$zgvdatum = $prestudentData->zgvdatum;
|
||||
|
||||
if (isEmptyString($zgvdatum))
|
||||
return success(false);
|
||||
|
||||
$gebdatum = $prestudentData->gebdatum;
|
||||
|
||||
if (isEmptyString($gebdatum))
|
||||
return success(false);
|
||||
|
||||
// check if zgvdatum comes before geburtsdatum
|
||||
if ($zgvdatum < $gebdatum)
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ZGV master Datum in future
|
||||
*/
|
||||
class CORE_ZGV_0003 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// get zgvdatum of prestudent
|
||||
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->_ci->PrestudentModel->addSelect('zgvmadatum');
|
||||
$prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']);
|
||||
|
||||
if (isError($prestudentRes))
|
||||
return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$zgvdatum = getData($prestudentRes)[0]->zgvmadatum;
|
||||
|
||||
if (isEmptyString($zgvdatum))
|
||||
return success(false);
|
||||
|
||||
// check if zgvdatum comes after today
|
||||
if ($zgvdatum > date('Y-m-d'))
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ZGV Datum should not be after ZGV master Datum
|
||||
*/
|
||||
class CORE_ZGV_0004 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// get zgvdatum of prestudent
|
||||
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->_ci->PrestudentModel->addSelect('zgvdatum, zgvmadatum');
|
||||
$prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']);
|
||||
|
||||
if (isError($prestudentRes))
|
||||
return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudentData = getData($prestudentRes)[0];
|
||||
|
||||
// get and compare zgvdatum and zgvmadatum
|
||||
$zgvdatum = $prestudentData->zgvdatum;
|
||||
|
||||
if (isEmptyString($zgvdatum))
|
||||
return success(false);
|
||||
|
||||
$zgvmadatum = $prestudentData->zgvmadatum;
|
||||
|
||||
if (isEmptyString($zgvmadatum))
|
||||
return success(false);
|
||||
|
||||
// check if zgvmadatum comes after zgvdatum
|
||||
if ($zgvmadatum < $zgvdatum)
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* ZGV master Datum before Geburtsdatum
|
||||
*/
|
||||
class CORE_ZGV_0005 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// get zgvdatum and geburtsdatum of prestudent
|
||||
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->_ci->PrestudentModel->addSelect('zgvmadatum, gebdatum');
|
||||
$this->_ci->PrestudentModel->addJoin('public.tbl_person', 'person_id');
|
||||
$prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']);
|
||||
|
||||
if (isError($prestudentRes))
|
||||
return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudentData = getData($prestudentRes)[0];
|
||||
|
||||
$zgvdatum = $prestudentData->zgvmadatum;
|
||||
|
||||
if (isEmptyString($zgvdatum))
|
||||
return success(false);
|
||||
|
||||
$gebdatum = $prestudentData->gebdatum;
|
||||
|
||||
if (isEmptyString($gebdatum))
|
||||
return success(false);
|
||||
|
||||
// check if zgvdatum comes before geburtsdatum
|
||||
if ($zgvdatum < $gebdatum)
|
||||
return success(false);
|
||||
else
|
||||
return success(true);
|
||||
}
|
||||
else
|
||||
return success(false);
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,37 @@ class Bisio_model extends DB_Model
|
||||
$this->dbTable = 'bis.tbl_bisio';
|
||||
$this->pk = 'bisio_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets duration of stay in days by bisio_id.
|
||||
* @param int $bisio_id
|
||||
* @return object success with number of days or error
|
||||
*/
|
||||
public function getAufenthaltsdauer($bisio_id)
|
||||
{
|
||||
// get from and to date
|
||||
$this->addSelect('von, bis');
|
||||
$bisioRes = $this->load($bisio_id);
|
||||
|
||||
if (isError($bisioRes))
|
||||
return $bisioRes;
|
||||
|
||||
if (hasData($bisioRes))
|
||||
{
|
||||
$bisioData = getData($bisioRes)[0];
|
||||
|
||||
$avon = $bisioData->von;
|
||||
$abis = $bisioData->bis;
|
||||
|
||||
if (is_null($avon) || is_null($abis))
|
||||
return success("Von or bis date not set");
|
||||
|
||||
$vonDate = new DateTime($avon);
|
||||
$bisDate = new DateTime($abis);
|
||||
$interval = $vonDate->diff($bisDate);
|
||||
return success($interval->days);
|
||||
}
|
||||
else
|
||||
return success("Bisio not found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,45 +18,50 @@ class Konto_model extends DB_Model
|
||||
public function setPaid($buchungsnr)
|
||||
{
|
||||
// get payment
|
||||
$buchungResult = $this->loadWhere(array('buchungsnr' => $buchungsnr));
|
||||
$buchungResult = $this->loadWhere(array('buchungsnr' => $buchungsnr));
|
||||
|
||||
if(isSuccess($buchungResult) && hasData($buchungResult))
|
||||
if (isSuccess($buchungResult) && hasData($buchungResult))
|
||||
{
|
||||
$buchung = getData($buchungResult)[0];
|
||||
|
||||
// get already paid amount
|
||||
$this->addSelect('sum(betrag) as bezahlt');
|
||||
$this->addGroupBy('buchungsnr_verweis');
|
||||
$buchungVerweisResult = $this->loadWhere(array('buchungsnr_verweis' => $buchungsnr));
|
||||
$buchungVerweisResult = $this->loadWhere(array('buchungsnr_verweis' => $buchungsnr));
|
||||
|
||||
if(isSuccess($buchungVerweisResult))
|
||||
if (isSuccess($buchungVerweisResult))
|
||||
{
|
||||
if(hasData($buchungVerweisResult))
|
||||
{
|
||||
$betragBezahltResult = getData($buchungVerweisResult);
|
||||
$betragBezahlt = $betragBezahltResult->bezahlt;
|
||||
}
|
||||
else
|
||||
$betragBezahlt = 0;
|
||||
$betragBezahlt = 0;
|
||||
|
||||
$buchung = getData($buchungResult);
|
||||
$buchung = $buchung[0];
|
||||
if (hasData($buchungVerweisResult))
|
||||
{
|
||||
$betragBezahlt = getData($buchungVerweisResult)[0]->bezahlt;
|
||||
}
|
||||
|
||||
// calculate open amount
|
||||
$betragOffen = $betragBezahlt - $buchung->betrag*(-1);
|
||||
$betragOffen = $betragBezahlt - $buchung->betrag * (-1);
|
||||
|
||||
$data = array(
|
||||
'person_id' => $buchung->person_id,
|
||||
'studiengang_kz' => $buchung->studiengang_kz,
|
||||
'studiensemester_kurzbz' => $buchung->studiensemester_kurzbz,
|
||||
'buchungsnr_verweis' => $buchungsnr,
|
||||
'betrag' => str_replace(',','.',$betragOffen*(-1)),
|
||||
'buchungsdatum' => date('Y-m-d'),
|
||||
'buchungstext' => $buchung->buchungstext,
|
||||
'insertamum' => date('Y-m-d H:i:s'),
|
||||
'insertvon' => '',
|
||||
'buchungstyp_kurzbz' => $buchung->buchungstyp_kurzbz,
|
||||
);
|
||||
if ($betragOffen != 0)
|
||||
{
|
||||
$data = array(
|
||||
'person_id' => $buchung->person_id,
|
||||
'studiengang_kz' => $buchung->studiengang_kz,
|
||||
'studiensemester_kurzbz' => $buchung->studiensemester_kurzbz,
|
||||
'buchungsnr_verweis' => $buchungsnr,
|
||||
'betrag' => str_replace(',', '.', $betragOffen * (-1)),
|
||||
'buchungsdatum' => date('Y-m-d'),
|
||||
'buchungstext' => $buchung->buchungstext,
|
||||
'insertamum' => date('Y-m-d H:i:s'),
|
||||
'insertvon' => '',
|
||||
'buchungstyp_kurzbz' => $buchung->buchungstyp_kurzbz,
|
||||
);
|
||||
|
||||
return $this->insert($data);
|
||||
return $this->insert($data);
|
||||
}
|
||||
else
|
||||
{
|
||||
return success();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -86,9 +86,10 @@ class Zeugnisnote_model extends DB_Model
|
||||
* @param bool $lehre
|
||||
* @param bool $offiziell
|
||||
* @param bool $positiv
|
||||
* @param bool $zeugnis
|
||||
* @return object
|
||||
*/
|
||||
public function getByPerson($person_id, $studiensemester_kurzbz, $aktiv = true, $lehre = null, $offiziell = null, $positiv = null)
|
||||
public function getByPerson($person_id, $studiensemester_kurzbz, $aktiv = true, $lehre = null, $offiziell = null, $positiv = null, $zeugnis = null)
|
||||
{
|
||||
$params = array($person_id, $studiensemester_kurzbz);
|
||||
|
||||
@@ -129,6 +130,12 @@ class Zeugnisnote_model extends DB_Model
|
||||
$params[] = $positiv;
|
||||
}
|
||||
|
||||
if (isset($zeugnis))
|
||||
{
|
||||
$qry .= ' AND lv.zeugnis = ?';
|
||||
$params[] = $zeugnis;
|
||||
}
|
||||
|
||||
$qry .= ' ORDER BY zgnisnote.benotungsdatum';
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
|
||||
@@ -448,10 +448,11 @@ class Studiengang_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($typ));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Studiengangsleitung
|
||||
* @param null $studiengang_kz
|
||||
* Get Studiengangsleitung/en of Studiengang/Studiengaenge.
|
||||
*
|
||||
* @param null $studiengang_kz Numeric or Array
|
||||
* @return array
|
||||
*/
|
||||
public function getLeitung($studiengang_kz = null)
|
||||
@@ -460,7 +461,12 @@ class Studiengang_model extends DB_Model
|
||||
$this->addJoin('public.tbl_benutzerfunktion', 'oe_kurzbz');
|
||||
$this->addJoin('public.tbl_benutzer', 'uid');
|
||||
$this->addJoin('public.tbl_person', 'person_id');
|
||||
|
||||
|
||||
if (!is_numeric($studiengang_kz) && !is_array($studiengang_kz))
|
||||
{
|
||||
return error('Studiengangskennzahl ungültig');
|
||||
}
|
||||
|
||||
if (is_null($studiengang_kz))
|
||||
{
|
||||
$condition = '
|
||||
@@ -469,16 +475,21 @@ class Studiengang_model extends DB_Model
|
||||
AND ( datum_bis >= NOW() OR datum_bis IS NULL )
|
||||
';
|
||||
}
|
||||
elseif (is_numeric($studiengang_kz))
|
||||
elseif (is_numeric($studiengang_kz) || is_array($studiengang_kz))
|
||||
{
|
||||
if (is_array($studiengang_kz))
|
||||
{
|
||||
$studiengang_kz = array_map(array($this,'escape'), $studiengang_kz);
|
||||
$studiengang_kz = implode(', ', $studiengang_kz);
|
||||
}
|
||||
$condition = '
|
||||
funktion_kurzbz = \'Leitung\'
|
||||
AND ( datum_von <= NOW() OR datum_von IS NULL )
|
||||
AND ( datum_bis >= NOW() OR datum_bis IS NULL )
|
||||
AND studiengang_kz = ' . $this->db->escape($studiengang_kz)
|
||||
AND studiengang_kz IN (' . $studiengang_kz. ')';
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
return $this->loadWhere($condition);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ class Person_model extends DB_Model
|
||||
if (!hasData($person))
|
||||
return success(null);
|
||||
|
||||
$this->KontaktModel->addSelect('kontakttyp, anmerkung, kontakt, zustellung');
|
||||
$this->KontaktModel->addSelect('kontakt_id, kontakttyp, anmerkung, kontakt, zustellung');
|
||||
$this->KontaktModel->addOrder('kontakttyp');
|
||||
$this->KontaktModel->addOrder('insertamum', 'DESC');
|
||||
$where = $zustellung_only === true ? array('person_id' => $person_id, 'zustellung' => true) : array('person_id' => $person_id);
|
||||
@@ -268,16 +268,61 @@ class Person_model extends DB_Model
|
||||
|
||||
public function checkDuplicate($person_id)
|
||||
{
|
||||
$qry = "SELECT sp.person_id
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN public.tbl_person sp ON p.vorname = sp.vorname
|
||||
AND p.nachname = sp.nachname
|
||||
AND p.gebdatum = sp.gebdatum
|
||||
JOIN public.tbl_prestudent ps ON sp.person_id = ps.person_id
|
||||
JOIN public.tbl_prestudentstatus pss ON ps.prestudent_id = pss.prestudent_id
|
||||
WHERE p.person_id = ? AND sp.person_id != ? AND pss.status_kurzbz = ?";
|
||||
$qry = "SELECT person_id
|
||||
FROM public.tbl_prestudent p
|
||||
JOIN
|
||||
(
|
||||
SELECT DISTINCT ON(prestudent_id) *
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id IN
|
||||
(
|
||||
SELECT prestudent_id
|
||||
FROM public.tbl_prestudent
|
||||
WHERE person_id IN
|
||||
(
|
||||
SELECT p2.person_id
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_person p2
|
||||
ON p.vorname = p2.vorname
|
||||
AND p.nachname = p2.nachname
|
||||
AND p.gebdatum = p2.gebdatum
|
||||
AND p.person_id = ?
|
||||
)
|
||||
)
|
||||
ORDER BY prestudent_id, datum DESC, insertamum DESC
|
||||
) ps USING(prestudent_id)
|
||||
JOIN public.tbl_status USING(status_kurzbz)
|
||||
WHERE status_kurzbz = 'Interessent'
|
||||
AND studiengang_kz IN
|
||||
(
|
||||
SELECT studiengang_kz
|
||||
FROM public.tbl_prestudent p
|
||||
JOIN
|
||||
(
|
||||
SELECT DISTINCT ON(prestudent_id) *
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id IN
|
||||
(
|
||||
SELECT prestudent_id
|
||||
FROM public.tbl_prestudent
|
||||
WHERE person_id IN
|
||||
(
|
||||
SELECT p2.person_id
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_person p2
|
||||
ON p.vorname = p2.vorname
|
||||
AND p.nachname = p2.nachname
|
||||
AND p.gebdatum = p2.gebdatum
|
||||
AND p.person_id = ?
|
||||
)
|
||||
)
|
||||
ORDER BY prestudent_id, datum DESC, insertamum DESC
|
||||
) ps USING(prestudent_id)
|
||||
JOIN public.tbl_status USING(status_kurzbz)
|
||||
WHERE status_kurzbz = 'Abbrecher'
|
||||
)
|
||||
";
|
||||
|
||||
|
||||
return $this->execQuery($qry, array($person_id, $person_id, 'Abbrecher'));
|
||||
return $this->execQuery($qry, array($person_id, $person_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,45 @@ class Issue_model extends DB_Model
|
||||
$this->pk = 'issue_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets issues which are open, i.e. not resolved.
|
||||
* @param array $fehlercodes only issues for given fehler are retrieved
|
||||
* @param int $person_id
|
||||
* @param string $oe_kurzbz
|
||||
* @param string $fehlercode_extern
|
||||
* @return object success with issues or error
|
||||
*/
|
||||
public function getOpenIssues($fehlercodes, $person_id = null, $oe_kurzbz = null, $fehlercode_extern = null)
|
||||
{
|
||||
$params = array($fehlercodes);
|
||||
// issue exists for a fehlercode (or fehlercode_extern), person_id, oe_kurzbz, if not verarbeitet yet
|
||||
$qry = 'SELECT issue_id, fehlercode, inhalt, fehlercode_extern, inhalt_extern, person_id, oe_kurzbz,
|
||||
behebung_parameter, datum, verarbeitetvon, verarbeitetamum
|
||||
FROM system.tbl_issue
|
||||
WHERE fehlercode IN ?
|
||||
AND verarbeitetamum IS NULL';
|
||||
|
||||
if (!isEmptyString($fehlercode_extern))
|
||||
{
|
||||
$qry .= ' AND fehlercode_extern = ?';
|
||||
$params[] = $fehlercode_extern;
|
||||
}
|
||||
|
||||
if (isset($person_id))
|
||||
{
|
||||
$qry .= ' AND person_id = ?';
|
||||
$params[] = $person_id;
|
||||
}
|
||||
|
||||
if (isset($oe_kurzbz))
|
||||
{
|
||||
$qry .= ' AND oe_kurzbz = ?';
|
||||
$params[] = $oe_kurzbz;
|
||||
}
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets number of open (non-resolved) issues.
|
||||
* @param string $fehlercode unique error code
|
||||
|
||||
@@ -25,7 +25,8 @@ $this->load->view(
|
||||
'bitteBegruendungAngeben',
|
||||
'empfehlungWurdeAngefordert',
|
||||
'anrechnungenWurdenGenehmigt',
|
||||
'anrechnungenWurdenAbgelehnt'
|
||||
'anrechnungenWurdenAbgelehnt',
|
||||
'nurLeseberechtigung'
|
||||
),
|
||||
'person' => array(
|
||||
'student',
|
||||
@@ -72,7 +73,7 @@ $this->load->view(
|
||||
</div>
|
||||
<!--end header -->
|
||||
|
||||
<div class="row">
|
||||
<div class="row" id="approveAnrechnungDetail-generell" data-readonly="<?php echo json_encode($hasReadOnlyAccess)?>">
|
||||
<div class="col-xs-8">
|
||||
<!-- Antragsdaten -->
|
||||
<div class="row">
|
||||
|
||||
@@ -48,7 +48,8 @@ $this->load->view(
|
||||
'empfehlungWurdeAngefordert',
|
||||
'empfehlungWurdeAngefordertAusnahmeWoKeineLektoren',
|
||||
'anrechnungenWurdenGenehmigt',
|
||||
'anrechnungenWurdenAbgelehnt'
|
||||
'anrechnungenWurdenAbgelehnt',
|
||||
'nurLeseberechtigung'
|
||||
),
|
||||
'person' => array(
|
||||
'student',
|
||||
@@ -101,7 +102,7 @@ $this->load->view(
|
||||
<!-- dropdown studiensemester -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="formApproveAnrechnungUebersicht" class="form-inline" action="" method="get">
|
||||
<form id="formApproveAnrechnungUebersicht" class="form-inline" action="" method="get" data-readonly="<?php echo json_encode($hasReadOnlyAccess)?>" data-createaccess="<?php echo json_encode($hasCreateAnrechnungAccess)?>">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
@@ -226,7 +227,7 @@ $this->load->view(
|
||||
class='fa fa-times'></i>
|
||||
</button>
|
||||
</div>
|
||||
<a type="button" class="btn btn-default" style="margin-left: 20px;" href='<?php echo site_url('lehre/anrechnung/createAnrechnung') ?>' target='_blank'>
|
||||
<a type="button" id="approveAnrechnungUebersicht-create-anrechnung" class="btn btn-default" style="margin-left: 20px;" href='<?php echo site_url('lehre/anrechnung/createAnrechnung') ?>' target='_blank'>
|
||||
<i class='fa fa-plus' aria-hidden='true'></i> <?php echo $this->p->t('global', 'antragAnlegen'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
'query' => '
|
||||
SELECT
|
||||
person_id, vorname, nachname, geschlecht, svnr, ersatzkennzeichen, matr_nr,
|
||||
staatsbuergerschaft, gebdatum, false AS mitarbeiter
|
||||
staatsbuergerschaft, gebdatum, false AS mitarbeiter,
|
||||
(SELECT count(*) FROM public.tbl_akte WHERE person_id=tbl_person.person_id) AS anzahl_dokumente
|
||||
FROM
|
||||
public.tbl_person
|
||||
WHERE
|
||||
@@ -14,7 +15,8 @@
|
||||
UNION
|
||||
SELECT
|
||||
person_id, vorname, nachname, geschlecht, svnr, ersatzkennzeichen, matr_nr,
|
||||
staatsbuergerschaft, gebdatum, true AS mitarbeiter
|
||||
staatsbuergerschaft, gebdatum, true AS mitarbeiter,
|
||||
(SELECT count(*) FROM public.tbl_akte WHERE person_id=tbl_person.person_id) AS anzahl_dokumente
|
||||
FROM
|
||||
public.tbl_person
|
||||
JOIN public.tbl_benutzer USING(person_id)
|
||||
@@ -36,7 +38,8 @@
|
||||
ucfirst($this->p->t('person', 'matrikelnummer')),
|
||||
ucfirst($this->p->t('person', 'staatsbuergerschaft')),
|
||||
ucfirst($this->p->t('person', 'geburtsdatum')),
|
||||
'Mitarbeiter'
|
||||
'Mitarbeiter',
|
||||
'Anzahl Dokumente'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
|
||||
@@ -414,6 +414,10 @@
|
||||
{
|
||||
$datasetRaw->{'OnholdDate'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'OnholdDate'} = date_format(date_create($datasetRaw->{'OnholdDate'}), 'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAbgeschickt'} == null)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
$STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\'';
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$IDENTITY = '\'identity\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -245,7 +246,15 @@ $query = '
|
||||
LIMIT 1
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "InfoCenterMitarbeiter"
|
||||
) AS "InfoCenterMitarbeiter",
|
||||
(
|
||||
SELECT akte.akte_id
|
||||
FROM public.tbl_akte akte
|
||||
JOIN public.tbl_dokument USING (dokument_kurzbz)
|
||||
WHERE akte.person_id = p.person_id
|
||||
AND dokument_kurzbz = '. $IDENTITY .'
|
||||
LIMIT 1
|
||||
) AS "AktenId"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (
|
||||
SELECT tpl.person_id,
|
||||
@@ -317,7 +326,8 @@ $query = '
|
||||
'Reihungstest date',
|
||||
'ZGV Nation BA',
|
||||
'ZGV Nation MA',
|
||||
'InfoCenter Mitarbeiter'
|
||||
'InfoCenter Mitarbeiter',
|
||||
'Identitätsnachweis'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
@@ -425,6 +435,19 @@ $query = '
|
||||
$datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'AktenId'} !== null)
|
||||
{
|
||||
$datasetRaw->{'AktenId'} = sprintf(
|
||||
'<a href="outputAkteContent/%s">Identitätsnachweis</a>',
|
||||
$datasetRaw->{'AktenId'}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'AktenId'} = '-';
|
||||
}
|
||||
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
// By default set the parameters to null
|
||||
$title = isset($title) ? $title : null;
|
||||
$refresh = isset($refresh) ? $refresh : null;
|
||||
$customCSSs = isset($customCSSs) ? $customCSSs : null;
|
||||
$customJSs = isset($customJSs) ? $customJSs : null;
|
||||
$phrases = isset($phrases) ? $phrases : null;
|
||||
@@ -48,6 +49,8 @@
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<?php printRefreshMeta($refresh); ?>
|
||||
|
||||
<?php
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// CSS
|
||||
|
||||
@@ -37,6 +37,11 @@ else
|
||||
$ip = $_SERVER["REMOTE_ADDR"];
|
||||
}
|
||||
|
||||
if(isset($_GET['norefresh']))
|
||||
$norefresh = true;
|
||||
else
|
||||
$norefresh = false;
|
||||
|
||||
$infoscreen = new infoscreen();
|
||||
$i=-1;
|
||||
$refreshzeit = 40; // Default Refreshzeit
|
||||
@@ -90,9 +95,12 @@ if(isset($infoscreen_content) && isset($infoscreen_content[$aktuellerContentIdx]
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="refresh" content="',$refreshzeit,'">
|
||||
<link href="../../skin/infoscreen.css" rel="stylesheet" type="text/css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
|
||||
if (!$norefresh)
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="',$refreshzeit,'">';
|
||||
}
|
||||
echo ' <link href="../../skin/infoscreen.css" rel="stylesheet" type="text/css">
|
||||
';
|
||||
|
||||
//Skript fuer den automatischen bildlauf
|
||||
|
||||
@@ -1192,6 +1192,7 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
|
||||
foreach ($grades as $uid => $data)
|
||||
//Ausgabe Array
|
||||
{
|
||||
|
||||
$htmlstring .= '<tr class="liste' . ($i % 2) . '">
|
||||
<td><a href="mailto:' . $uid . '@' . DOMAIN . '"><img src="../../../../skin/images/button_mail.gif"></a></td>
|
||||
<td>' . $db->convert_html_chars($uid) . '</td>
|
||||
@@ -1219,6 +1220,7 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
|
||||
$negativeteilnote = false;
|
||||
$note_zusatztext = '';
|
||||
$note_zusatztext_tooltip = '';
|
||||
$ueberschreibbar = false; //Damit keine Notice Fehler kommt muss Variable bei jeden Schleifendurchgang neue gesetzt und berechnet werden.
|
||||
|
||||
if (isset($data['grades']))
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ $uid = get_uid();
|
||||
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
|
||||
$typen_arr = array("Urlaub", "PflegeU", "ZA", "Krank", "DienstF", "DienstV");
|
||||
$typen_arr = array("Urlaub", "PflegeU", "ZA", "Krank", "DienstF", "DienstV", "CovidSB", "CovidKS");
|
||||
|
||||
if(isset($_GET['type']))
|
||||
$type=$_GET['type'];
|
||||
@@ -69,8 +69,8 @@ $datum_obj = new datum();
|
||||
$ma= new mitarbeiter();
|
||||
|
||||
// definiert bis zu welchem Datum die Eintragung nicht mehr möglich ist
|
||||
$zasperre = new zeitaufzeichnung();
|
||||
if ($sperrdat = $zasperre->getEintragungGesperrtBisForUser($uid))
|
||||
$zaufzeichnung = new zeitaufzeichnung();
|
||||
if ($sperrdat = $zaufzeichnung->getEintragungGesperrtBisForUser($uid))
|
||||
$gesperrt_bis = $sperrdat;
|
||||
else if (defined('CIS_ZEITAUFZEICHNUNG_GESPERRT_BIS') && CIS_ZEITAUFZEICHNUNG_GESPERRT_BIS != '')
|
||||
$gesperrt_bis = CIS_ZEITAUFZEICHNUNG_GESPERRT_BIS;
|
||||
@@ -138,7 +138,15 @@ $( document ).ready(function()
|
||||
rows: 4,
|
||||
});
|
||||
|
||||
$("#vondatum").change(
|
||||
function()
|
||||
{
|
||||
$(".error").text("");
|
||||
}
|
||||
)
|
||||
|
||||
});
|
||||
|
||||
// set holidays function which is configured in beforeShowDay
|
||||
function setHoliDays(date) {
|
||||
for (i = 0; i < holiDays.length; i++) {
|
||||
@@ -302,7 +310,9 @@ function showHideStudeDropDown()
|
||||
|| dd.options[dd.selectedIndex].value == 'Urlaub'
|
||||
|| dd.options[dd.selectedIndex].value == 'Krank'
|
||||
|| dd.options[dd.selectedIndex].value == 'DienstF'
|
||||
|| dd.options[dd.selectedIndex].value == 'DienstV')
|
||||
|| dd.options[dd.selectedIndex].value == 'DienstV'
|
||||
|| dd.options[dd.selectedIndex].value == 'CovidSB'
|
||||
|| dd.options[dd.selectedIndex].value == 'CovidKS')
|
||||
{
|
||||
document.getElementById('vonStd').style.visibility = 'hidden';
|
||||
document.getElementById('bisStd').style.visibility = 'hidden';
|
||||
@@ -350,6 +360,40 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_
|
||||
$error_msg .= $p->t('zeitsperre/bisDatumUngueltig').' ';
|
||||
}
|
||||
|
||||
//Prüfen auf vorhandene Zeitaufzeichnung
|
||||
if (isset($_POST['bisdatum']) && isset($_POST['vondatum'])
|
||||
&& $zaufzeichnung->existsZeitaufzeichnung($uid, $_POST['vondatum'], $_POST['bisdatum'])
|
||||
// Nur Zeitaufzeichnungsrelevante Typen sollen das speichern blockieren
|
||||
&& in_array($_POST['zeitsperretyp_kurzbz'], zeitsperre::getBlockierendeZeitsperren()))
|
||||
{
|
||||
$error = true;
|
||||
$error_msg .= $p->t('zeitsperre/zeitaufzeichnungVorhanden');
|
||||
}
|
||||
|
||||
//Prüfen auf vorhandene Zeitsperre
|
||||
if (isset($_POST['bisdatum']) && isset($_POST['vondatum'])
|
||||
&& in_array($_POST['zeitsperretyp_kurzbz'], zeitsperre::getBlockierendeZeitsperren()))
|
||||
{
|
||||
$von = $_POST['vondatum'];
|
||||
$von2 = new DateTime($von);
|
||||
$von2 = $von2->format('Y-m-d');
|
||||
$zeitsperre = new zeitsperre();
|
||||
|
||||
if ($zeitsperre->getSperreByDate($uid, $von2, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN))
|
||||
{
|
||||
foreach ($zeitsperre->result as $z)
|
||||
{
|
||||
// Beim editieren nicht mit dem eigenen Eintrag kollidieren
|
||||
if($_GET['type'] == 'edit_sperre' && $z->zeitsperre_id == $_GET['id'])
|
||||
continue;
|
||||
|
||||
$typ = $z->zeitsperretyp_kurzbz;
|
||||
$error = true;
|
||||
$error_msg .= $p->t('zeitsperre/zeitsperreEingetragen', [$von, $typ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//von - bis-datum pruefen von darf nicht groesser als bis sein
|
||||
// 09.02.2009 simane
|
||||
$vondatum=0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,11 @@ $sprache_index = $sprache_obj->index;
|
||||
|
||||
$uid = get_uid();
|
||||
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
$mitarbeiter->getUntergebene($uid, true);
|
||||
$untergebenen_arr = array();
|
||||
$untergebenen_arr = $mitarbeiter->untergebene;
|
||||
|
||||
//Wenn User Administrator ist und UID uebergeben wurde, dann die Zeitaufzeichnung
|
||||
//des uebergebenen Users anzeigen
|
||||
if (isset($_GET['uid']))
|
||||
@@ -55,7 +60,7 @@ if (isset($_GET['uid']))
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if ($rechte->isBerechtigt('admin'))
|
||||
if ($rechte->isBerechtigt('admin') || (in_array($_GET['uid'], $untergebenen_arr)))
|
||||
{
|
||||
$uid = $_GET['uid'];
|
||||
}
|
||||
@@ -74,9 +79,9 @@ $year = $_GET['projexpjahr'];
|
||||
|
||||
$monthtext = $monatsname[$sprache_index][$month - 1];
|
||||
$username = $benutzer->vorname." ".$benutzer->nachname;
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
$mitarbeiter->load($uid);
|
||||
$persnr = $mitarbeiter->personalnummer;
|
||||
|
||||
$daysinmonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);
|
||||
|
||||
$date = new datum();
|
||||
|
||||
@@ -27,12 +27,18 @@ require_once('../../../include/projektphase.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/mitarbeiter.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
$mitarbeiter->getUntergebene($user, true);
|
||||
$untergebenen_arr = array();
|
||||
$untergebenen_arr = $mitarbeiter->untergebene;
|
||||
|
||||
//Wenn User Administrator ist und UID uebergeben wurde, dann die Phasen
|
||||
//des uebergebenen Users anzeigen
|
||||
if (isset($_GET['uid']) && $user != $_GET['uid'])
|
||||
@@ -40,7 +46,7 @@ if (isset($_GET['uid']) && $user != $_GET['uid'])
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if ($rechte->isBerechtigt('admin'))
|
||||
if ($rechte->isBerechtigt('admin') || (in_array($_GET['uid'], $untergebenen_arr)))
|
||||
{
|
||||
$user = $_GET['uid'];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Author: Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Checks, if there is a zeitsperre for a certain date. It should not be possible
|
||||
* to add a zeitaufzeichnung with a holiday (or else) entry on the same day.
|
||||
*/
|
||||
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/zeitsperre.class.php');
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
if ( isset($_GET['day']) )
|
||||
{
|
||||
$auth = new authentication();
|
||||
$uid = $auth->getUser();
|
||||
$day = $_GET['day'];
|
||||
|
||||
$zs = new zeitsperre();
|
||||
$sperreVorhanden = false;
|
||||
$typ = '';
|
||||
$zs->getSperreByDate($uid, $day, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN);
|
||||
$result_obj = array();
|
||||
$now = new DateTime($day);
|
||||
$now = $now->format('d.m.Y');
|
||||
|
||||
foreach ($zs->result as $z)
|
||||
{
|
||||
if ($z->zeitsperretyp_kurzbz)
|
||||
{
|
||||
$item['typ'] = $z->zeitsperretyp_kurzbz;
|
||||
$item['day'] = $now;
|
||||
$item['sperreVorhanden'] = true;
|
||||
$result_obj[] = $item;
|
||||
}
|
||||
}
|
||||
echo json_encode($result_obj);
|
||||
} else {
|
||||
http_response_code(500);
|
||||
echo json_encode(array(
|
||||
array(
|
||||
"error" => 'missing parameter day'
|
||||
)
|
||||
));
|
||||
}
|
||||
@@ -55,7 +55,7 @@ if (isset($_GET['logout']) && $_GET['logout'] == true)
|
||||
|
||||
echo '
|
||||
<script language="Javascript">
|
||||
location = location.pathname; // clean the login.php-url from querystring
|
||||
location = "logout.html"; // clean the login.php-url from querystring
|
||||
parent.menu.location = parent.menu.location.pathname; // clean the menu.php-url from querystring
|
||||
parent.topbar.location = parent.topbar.location.pathname; // clean the topbar.php-url from querystring
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>TestTool - FH Technikum Wien</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-xs-11">
|
||||
<div class="row" style="margin-bottom: 20px; margin-top: 3%;">
|
||||
<div class="col-xs-6 text-center" style="border-right: 1px solid lightgrey; float: left">
|
||||
<h1 style="white-space: normal">Vielen Dank für die Teilnahme an unserem Aufnahmeverfahren.</h1>
|
||||
<br/><br/>
|
||||
Die zuständige Assistenz wird sich in den nächsten Tagen bei Ihnen melden.
|
||||
<br/><br/>
|
||||
<a href="login.php" class="btn btn-default">Zurück zur Startseite</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center" style="float: left">
|
||||
<h1 style="white-space: normal">Thank you for participating in our admission procedure.</h1>
|
||||
<br/><br/>
|
||||
The assistant in charge will contact you in the next few days.
|
||||
<br/><br/>
|
||||
<a href="login.php" class="btn btn-default">Back to startpage</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -246,7 +246,7 @@
|
||||
|
||||
"afarkas/html5shiv": "3.7.*",
|
||||
|
||||
"chriskacerguis/codeigniter-restserver": "3.0.*",
|
||||
"chriskacerguis/codeigniter-restserver": "3.0.3",
|
||||
"christianbach/tablesorter": "1.0.*",
|
||||
"codeigniter/framework": "3.*",
|
||||
"components/jquery": "3.*",
|
||||
|
||||
Generated
+80
-76
@@ -4,8 +4,8 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "d9941245360c86434d18413999bdc812",
|
||||
"content-hash": "fbeb5d4ef943f6d1d55220cb844d11f1",
|
||||
"hash": "ab181b377c4128ccde03cc50571b7ab6",
|
||||
"content-hash": "e19ca762a6a929e69ae3b0e649fa4f6d",
|
||||
"packages": [
|
||||
{
|
||||
"name": "BlackrockDigital/startbootstrap-sb-admin-2",
|
||||
@@ -130,24 +130,24 @@
|
||||
},
|
||||
{
|
||||
"name": "codeigniter/framework",
|
||||
"version": "3.1.11",
|
||||
"version": "3.1.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bcit-ci/CodeIgniter.git",
|
||||
"reference": "b73eb19aed66190c10c9cad476da7c36c271d6dc"
|
||||
"reference": "bcb17eb8ba53a85de154439d0ab8ff1bed047bc9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/b73eb19aed66190c10c9cad476da7c36c271d6dc",
|
||||
"reference": "b73eb19aed66190c10c9cad476da7c36c271d6dc",
|
||||
"url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/bcb17eb8ba53a85de154439d0ab8ff1bed047bc9",
|
||||
"reference": "bcb17eb8ba53a85de154439d0ab8ff1bed047bc9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.7"
|
||||
},
|
||||
"require-dev": {
|
||||
"mikey179/vfsstream": "1.1.*",
|
||||
"phpunit/phpunit": "4.* || 5.*"
|
||||
"mikey179/vfsstream": "1.6.*",
|
||||
"phpunit/phpunit": "4.* || 5.* || 9.*"
|
||||
},
|
||||
"suggest": {
|
||||
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
|
||||
@@ -159,7 +159,7 @@
|
||||
],
|
||||
"description": "The CodeIgniter framework",
|
||||
"homepage": "https://codeigniter.com",
|
||||
"time": "2019-09-19 12:08:45"
|
||||
"time": "2022-03-03 13:21:49"
|
||||
},
|
||||
{
|
||||
"name": "components/angular.js",
|
||||
@@ -502,16 +502,16 @@
|
||||
},
|
||||
{
|
||||
"name": "components/jquery",
|
||||
"version": "3.4.1",
|
||||
"version": "3.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/components/jquery.git",
|
||||
"reference": "901828b7968b18319e377dc23d466f28426ee083"
|
||||
"reference": "6cf38ee1fd04b6adf8e7dda161283aa35be818c3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/components/jquery/zipball/901828b7968b18319e377dc23d466f28426ee083",
|
||||
"reference": "901828b7968b18319e377dc23d466f28426ee083",
|
||||
"url": "https://api.github.com/repos/components/jquery/zipball/6cf38ee1fd04b6adf8e7dda161283aa35be818c3",
|
||||
"reference": "6cf38ee1fd04b6adf8e7dda161283aa35be818c3",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "component",
|
||||
@@ -540,7 +540,7 @@
|
||||
],
|
||||
"description": "jQuery JavaScript Library",
|
||||
"homepage": "http://jquery.com",
|
||||
"time": "2019-10-23 05:15:13"
|
||||
"time": "2021-03-20 19:13:42"
|
||||
},
|
||||
{
|
||||
"name": "components/jqueryui",
|
||||
@@ -674,6 +674,7 @@
|
||||
"captcha",
|
||||
"security"
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2018-03-09 06:07:41"
|
||||
},
|
||||
{
|
||||
@@ -750,16 +751,16 @@
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
"version": "v1.9.1",
|
||||
"version": "v1.9.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fzaninotto/Faker.git",
|
||||
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f"
|
||||
"reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f",
|
||||
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f",
|
||||
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
|
||||
"reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -797,7 +798,7 @@
|
||||
"fixtures"
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2019-12-12 13:22:17"
|
||||
"time": "2020-12-11 09:56:16"
|
||||
},
|
||||
{
|
||||
"name": "joeldbirch/superfish",
|
||||
@@ -1086,16 +1087,16 @@
|
||||
},
|
||||
{
|
||||
"name": "ml/json-ld",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lanthaler/JsonLD.git",
|
||||
"reference": "b5f82820c255cb64067b1c7adbb819cad4afa70a"
|
||||
"reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/b5f82820c255cb64067b1c7adbb819cad4afa70a",
|
||||
"reference": "b5f82820c255cb64067b1c7adbb819cad4afa70a",
|
||||
"url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/c74a1aed5979ed1cfb1be35a55a305fd30e30b93",
|
||||
"reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1131,7 +1132,7 @@
|
||||
"JSON-LD",
|
||||
"jsonld"
|
||||
],
|
||||
"time": "2018-11-18 20:26:18"
|
||||
"time": "2020-06-16 17:45:06"
|
||||
},
|
||||
{
|
||||
"name": "moment/momentjs",
|
||||
@@ -1146,16 +1147,16 @@
|
||||
},
|
||||
{
|
||||
"name": "mottie/tablesorter",
|
||||
"version": "v2.31.2",
|
||||
"version": "v2.31.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Mottie/tablesorter.git",
|
||||
"reference": "6a32e5acc294be5b6c420c83d70d66e096533d8f"
|
||||
"reference": "7202d5faf8105a5ecd1a2b7a653777618713ffe5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Mottie/tablesorter/zipball/6a32e5acc294be5b6c420c83d70d66e096533d8f",
|
||||
"reference": "6a32e5acc294be5b6c420c83d70d66e096533d8f",
|
||||
"url": "https://api.github.com/repos/Mottie/tablesorter/zipball/7202d5faf8105a5ecd1a2b7a653777618713ffe5",
|
||||
"reference": "7202d5faf8105a5ecd1a2b7a653777618713ffe5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1193,7 +1194,7 @@
|
||||
"sorting",
|
||||
"table"
|
||||
],
|
||||
"time": "2019-12-01 13:49:52"
|
||||
"time": "2020-03-03 13:46:03"
|
||||
},
|
||||
{
|
||||
"name": "nategood/httpful",
|
||||
@@ -1322,16 +1323,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "2.0.31",
|
||||
"version": "2.0.36",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4"
|
||||
"reference": "a97547126396548c224703a267a30af1592be146"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4",
|
||||
"reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/a97547126396548c224703a267a30af1592be146",
|
||||
"reference": "a97547126396548c224703a267a30af1592be146",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1409,7 +1410,7 @@
|
||||
"x.509",
|
||||
"x509"
|
||||
],
|
||||
"time": "2021-04-06 13:56:45"
|
||||
"time": "2022-01-30 08:48:36"
|
||||
},
|
||||
{
|
||||
"name": "rmariuzzo/jquery-checkboxes",
|
||||
@@ -1435,16 +1436,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.13.1",
|
||||
"version": "v1.19.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
|
||||
"reference": "aed596913b70fae57be53d86faa2e9ef85a2297b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
|
||||
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b",
|
||||
"reference": "aed596913b70fae57be53d86faa2e9ef85a2297b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1456,16 +1457,20 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.13-dev"
|
||||
"dev-main": "1.19-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -1489,7 +1494,7 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2019-11-27 13:56:44"
|
||||
"time": "2020-10-23 09:01:57"
|
||||
},
|
||||
{
|
||||
"name": "tapmodo/Jcrop",
|
||||
@@ -1504,16 +1509,16 @@
|
||||
},
|
||||
{
|
||||
"name": "tinymce/tinymce",
|
||||
"version": "4.9.8",
|
||||
"version": "4.9.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tinymce/tinymce-dist.git",
|
||||
"reference": "912df2bc85015c758e32d1262219f1653bbf9783"
|
||||
"reference": "3a68b67d1120ab89c6760afeb787291703c9a7d5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/912df2bc85015c758e32d1262219f1653bbf9783",
|
||||
"reference": "912df2bc85015c758e32d1262219f1653bbf9783",
|
||||
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/3a68b67d1120ab89c6760afeb787291703c9a7d5",
|
||||
"reference": "3a68b67d1120ab89c6760afeb787291703c9a7d5",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "component",
|
||||
@@ -1546,7 +1551,7 @@
|
||||
"tinymce",
|
||||
"wysiwyg"
|
||||
],
|
||||
"time": "2020-01-28 05:03:01"
|
||||
"time": "2020-07-13 05:29:19"
|
||||
},
|
||||
{
|
||||
"name": "tomazdragar/SimpleCropper",
|
||||
@@ -1611,16 +1616,16 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.42.4",
|
||||
"version": "v1.42.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152"
|
||||
"reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/e587180584c3d2d6cb864a0454e777bb6dcb6152",
|
||||
"reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
|
||||
"reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1629,8 +1634,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/container": "^1.0",
|
||||
"symfony/debug": "^3.4|^4.2",
|
||||
"symfony/phpunit-bridge": "^4.4@dev|^5.0"
|
||||
"symfony/phpunit-bridge": "^4.4|^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -1659,7 +1663,6 @@
|
||||
},
|
||||
{
|
||||
"name": "Twig Team",
|
||||
"homepage": "https://twig.symfony.com/contributors",
|
||||
"role": "Contributors"
|
||||
},
|
||||
{
|
||||
@@ -1673,24 +1676,24 @@
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2019-11-11 16:49:32"
|
||||
"time": "2020-02-11 05:59:23"
|
||||
},
|
||||
{
|
||||
"name": "zetacomponents/base",
|
||||
"version": "1.9.1",
|
||||
"version": "1.9.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zetacomponents/Base.git",
|
||||
"reference": "489e20235989ddc97fdd793af31ac803972454f1"
|
||||
"reference": "2f432f4117a5aa2164d4fb1784f84db91dbdd3b8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zetacomponents/Base/zipball/489e20235989ddc97fdd793af31ac803972454f1",
|
||||
"reference": "489e20235989ddc97fdd793af31ac803972454f1",
|
||||
"url": "https://api.github.com/repos/zetacomponents/Base/zipball/2f432f4117a5aa2164d4fb1784f84db91dbdd3b8",
|
||||
"reference": "2f432f4117a5aa2164d4fb1784f84db91dbdd3b8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~5.7",
|
||||
"phpunit/phpunit": "~8.0",
|
||||
"zetacomponents/unit-test": "*"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -1737,27 +1740,27 @@
|
||||
],
|
||||
"description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.",
|
||||
"homepage": "https://github.com/zetacomponents",
|
||||
"time": "2017-11-28 11:30:00"
|
||||
"time": "2021-07-25 15:46:08"
|
||||
},
|
||||
{
|
||||
"name": "zetacomponents/database",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zetacomponents/Database.git",
|
||||
"reference": "1750d34bf64b62f064c5b1aeb5374fbd06400904"
|
||||
"reference": "85a2fd2af4e49f64d5c7616b6fb82c1b88de53b4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zetacomponents/Database/zipball/1750d34bf64b62f064c5b1aeb5374fbd06400904",
|
||||
"reference": "1750d34bf64b62f064c5b1aeb5374fbd06400904",
|
||||
"url": "https://api.github.com/repos/zetacomponents/Database/zipball/85a2fd2af4e49f64d5c7616b6fb82c1b88de53b4",
|
||||
"reference": "85a2fd2af4e49f64d5c7616b6fb82c1b88de53b4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"zetacomponents/base": "~1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~5.7",
|
||||
"phpunit/phpunit": "~8.0",
|
||||
"zetacomponents/database-schema": "~1.5",
|
||||
"zetacomponents/unit-test": "*"
|
||||
},
|
||||
@@ -1814,27 +1817,28 @@
|
||||
],
|
||||
"description": "A lightweight database layer on top of PHP's PDO that allows you to utilize a database without having to take care of differences in SQL dialects.",
|
||||
"homepage": "https://github.com/zetacomponents",
|
||||
"time": "2017-11-28 10:55:26"
|
||||
"time": "2022-02-11 17:18:33"
|
||||
},
|
||||
{
|
||||
"name": "zetacomponents/document",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zetacomponents/Document.git",
|
||||
"reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8"
|
||||
"reference": "196884f00871ea7dcbca9ab8bc85716f626e9cc3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8",
|
||||
"reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8",
|
||||
"url": "https://api.github.com/repos/zetacomponents/Document/zipball/196884f00871ea7dcbca9ab8bc85716f626e9cc3",
|
||||
"reference": "196884f00871ea7dcbca9ab8bc85716f626e9cc3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"zetacomponents/base": "*"
|
||||
"zetacomponents/base": "~1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"zetacomponents/unit-test": "dev-master"
|
||||
"phpunit/phpunit": "~8.0",
|
||||
"zetacomponents/unit-test": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -1865,7 +1869,7 @@
|
||||
],
|
||||
"description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.",
|
||||
"homepage": "https://github.com/zetacomponents",
|
||||
"time": "2013-12-19 11:40:00"
|
||||
"time": "2022-02-11 17:26:31"
|
||||
},
|
||||
{
|
||||
"name": "zetacomponents/workflow",
|
||||
|
||||
+1
-1
@@ -903,7 +903,7 @@ foreach($addon_obj->result as $addon)
|
||||
echo '<tree id="tree-verband" />';
|
||||
//echo '<vbox id="vbox-fachbereich" />';
|
||||
echo '<vbox id="vbox-organisationseinheit" />';
|
||||
echo '<tree id="tree-lektor" />';
|
||||
echo '<vbox id="vbox-lektor" />';
|
||||
}
|
||||
if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter'))
|
||||
{
|
||||
|
||||
@@ -741,6 +741,10 @@ function onLektorSelect(event)
|
||||
var uid=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
var stg_idx = tree.view.getParentIndex(tree.currentIndex);
|
||||
//Wenn der Filter angewendet wurde, gibt es keinen Parent. Daher wird hier der stg_idx auf 0 gesetzt.
|
||||
if(stg_idx == -1 && uid != '')
|
||||
stg_idx = 0;
|
||||
|
||||
//wenn direkt ein studiengang markiert wurde dann abbrechen
|
||||
if(stg_idx==-1)
|
||||
return;
|
||||
@@ -789,6 +793,58 @@ function onLektorSelect(event)
|
||||
}
|
||||
}
|
||||
|
||||
// Lektorenliste aktualisieren
|
||||
function onLektorRefresh()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var treeLektorenTree=document.getElementById('tree-lektor');
|
||||
// Input-Feld leeren
|
||||
document.getElementById('fas-lektor-filter').value = '';
|
||||
var url = '<?php echo APP_ROOT; ?>rdf/mitarbeiter.rdf.php?user=true&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var datasource = rdfService.GetDataSource(url);
|
||||
var oldDatasources = treeLektorenTree.database.GetDataSources();
|
||||
|
||||
datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
datasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
|
||||
treeLektorenTree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
treeLektorenTree.database.AddDataSource(datasource);
|
||||
treeLektorenTree.builder.rebuild();
|
||||
}
|
||||
|
||||
// Lektorenliste filtern
|
||||
function onLektorFilter()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var filter=document.getElementById('fas-lektor-filter').value;
|
||||
|
||||
var treeLektorenTree=document.getElementById('tree-lektor');
|
||||
|
||||
if(filter.length>2)
|
||||
{
|
||||
var url = '<?php echo APP_ROOT; ?>rdf/mitarbeiter.rdf.php?filter='+encodeURIComponent(filter)+'&'+gettimestamp();
|
||||
var oldDatasources = treeLektorenTree.database.GetDataSources();
|
||||
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
treeLektorenTree.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
if(typeof(filter)=='undefined')
|
||||
var datasource = rdfService.GetDataSource(url);
|
||||
else
|
||||
var datasource = rdfService.GetDataSourceBlocking(url);
|
||||
datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
datasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
treeLektorenTree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
treeLektorenTree.database.AddDataSource(datasource);
|
||||
if(typeof(filter)!='undefined')
|
||||
treeLektorenTree.builder.rebuild();
|
||||
treeLektorenTree.builder.addListener(LektorTreeListener);
|
||||
}
|
||||
}
|
||||
|
||||
function loadURL(event)
|
||||
{
|
||||
var contentFrame = document.getElementById('contentFrame');
|
||||
|
||||
+61
-45
@@ -133,52 +133,68 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/mitarbeiter/mitarbeiteroverlay.xul
|
||||
</tree>
|
||||
</vbox>
|
||||
|
||||
<tree id="tree-lektor" onmouseup="onLektorSelect(event);"
|
||||
seltype="multi" hidecolumnpicker="false" flex="1"
|
||||
enableColumnDrag="true"
|
||||
ondraggesture="nsDragAndDrop.startDrag(event,mitarbeiterDDObserver);"
|
||||
ondrop="nsDragAndDrop.drop(event,LektorFunktionDDObserver)"
|
||||
ondragdrop="nsDragAndDrop.drop(event,LektorFunktionDDObserver)"
|
||||
ondragover="nsDragAndDrop.dragOver(event,LektorFunktionDDObserver)"
|
||||
ondragenter="nsDragAndDrop.dragEnter(event,LektorFunktionDDObserver)"
|
||||
ondragexit="nsDragAndDrop.dragExit(event,LektorFunktionDDObserver)"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
context="fasoverlay-lektor-tree-popup"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="kurzbz" label="Kuerzel" flex="2" primary="true" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="nachname" label="Nachname" flex="2" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="vorname" label="Vorname" flex="2" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="titel" label="Titel" flex="1" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="uid" label="UID" flex="1" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="studiengang_kz" label="Studiengangkz" flex="1" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="tree-lektor-fixangestellt" label="Fixangestellt" flex="1" hidden="true"/>
|
||||
</treecols>
|
||||
<vbox id="vbox-lektor">
|
||||
<hbox>
|
||||
<!-- <spacer flex="1" />-->
|
||||
<toolbox>
|
||||
<toolbar id="toolbarLektorTreeFilter" tbautostretch="always" persist="collapsed">
|
||||
<toolbarbutton id="toolbarbuttonLektorTreeRefresh"
|
||||
image="../skin/images/refresh.png"
|
||||
oncommand="onLektorRefresh();"
|
||||
tooltiptext="Neu laden"
|
||||
/>
|
||||
<textbox id="fas-lektor-filter" size="30" oninput="onLektorFilter()" flex="1"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
<!-- <spacer flex="1" />-->
|
||||
</hbox>
|
||||
<tree id="tree-lektor" onmouseup="onLektorSelect(event);"
|
||||
seltype="multi" hidecolumnpicker="false" flex="1"
|
||||
enableColumnDrag="true"
|
||||
ondraggesture="nsDragAndDrop.startDrag(event,mitarbeiterDDObserver);"
|
||||
ondrop="nsDragAndDrop.drop(event,LektorFunktionDDObserver)"
|
||||
ondragdrop="nsDragAndDrop.drop(event,LektorFunktionDDObserver)"
|
||||
ondragover="nsDragAndDrop.dragOver(event,LektorFunktionDDObserver)"
|
||||
ondragenter="nsDragAndDrop.dragEnter(event,LektorFunktionDDObserver)"
|
||||
ondragexit="nsDragAndDrop.dragExit(event,LektorFunktionDDObserver)"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
context="fasoverlay-lektor-tree-popup"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="kurzbz" label="Kuerzel" flex="2" primary="true" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="nachname" label="Nachname" flex="2" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="vorname" label="Vorname" flex="2" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="titel" label="Titel" flex="1" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="uid" label="UID" flex="1" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="studiengang_kz" label="Studiengangkz" flex="1" hidden="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="tree-lektor-fixangestellt" label="Fixangestellt" flex="1" hidden="true"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#kurzbz"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpre"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#studiengang_kz"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#fixangestellt"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#kurzbz"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpre"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#studiengang_kz"/>
|
||||
<treecell properties="Lektor_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#fixangestellt"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
</vbox>
|
||||
|
||||
<tree id="tree-menu-mitarbeiter" onselect="onMitarbeiterSelect();"
|
||||
seltype="single" hidecolumnpicker="true" flex="1"
|
||||
|
||||
@@ -49,8 +49,11 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
<menupopup id="lehrveranstaltung-noten-tree-popup">
|
||||
<menuitem label="Entfernen" oncommand="LehrveranstaltungNotenDelete();" id="lehrveranstaltung-noten-tree-popup-delete" hidden="false"/>
|
||||
<menuitem label="Zertifikat erstellen" oncommand="LehrveranstaltungFFZertifikatPrint(event);" id="lehrveranstaltung-noten-tree-popup-ffzertifikat" hidden="false"/>
|
||||
<menuitem label="Zertifikat erstellen mit Signatur" oncommand="LehrveranstaltungFFZertifikatPrint(event, true);" id="lehrveranstaltung-noten-tree-popup-ffzertifikat" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis Deutsch erstellen" oncommand="LehrveranstaltungLVZeugnisPrint(event, 'German');" id="lehrveranstaltung-noten-tree-popup-lvzeugnis" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis Deutsch erstellen mit Signatur" oncommand="LehrveranstaltungLVZeugnisPrint(event, 'German', true);" id="lehrveranstaltung-noten-tree-popup-lvzeugnis" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis Englisch erstellen" oncommand="LehrveranstaltungLVZeugnisPrint(event, 'English');" id="lehrveranstaltung-noten-tree-popup-lvzeugnis-englisch" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis Englisch erstellen mit Signatur" oncommand="LehrveranstaltungLVZeugnisPrint(event, 'English', true);" id="lehrveranstaltung-noten-tree-popup-lvzeugnis-englisch" hidden="false"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
<hbox flex="1" style="margin-top: 10px;">
|
||||
|
||||
@@ -707,6 +707,7 @@ function LeDetailSave()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
document.getElementById('lehrveranstaltung-detail-checkbox-new').checked=false;
|
||||
LeDetailDisableFields(true);
|
||||
//LvTreeRefresh();
|
||||
LvSelectLehreinheit_id=val.dbdml_data;
|
||||
LvOpenLehrveranstaltung_id=lehrveranstaltung;
|
||||
@@ -1335,7 +1336,7 @@ function LeMitarbeiterAuswahl()
|
||||
document.getElementById('lehrveranstaltung-lehreinheitmitarbeiter-checkbox-bismelden').checked=false;
|
||||
|
||||
var gesamtkosten = LeMitarbeiterGesamtkosten();
|
||||
|
||||
|
||||
// Wenn Vertragsdetails angezeigt werden
|
||||
if (lehrveranstaltung_vertragsdetails_anzeigen) {
|
||||
|
||||
@@ -2261,6 +2262,8 @@ function LehrveranstaltungNotenAuswahl()
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>rdf/zeugnisnote.rdf.php?lehrveranstaltung_id='+lehrveranstaltung_id+'&uid='+student_uid+'&studiensemester_kurzbz='+studiensemester_kurzbz+'&'+gettimestamp();
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/zeugnisnote/" + lehrveranstaltung_id+'/'+student_uid+'/'+studiensemester_kurzbz);
|
||||
@@ -2272,9 +2275,6 @@ function LehrveranstaltungNotenAuswahl()
|
||||
note = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#note" ));
|
||||
punkte = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#punkte" ));
|
||||
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/zeugnisnote.rdf.php?lehrveranstaltung_id='+lehrveranstaltung_id+'&uid='+student_uid+'&studiensemester_kurzbz='+studiensemester_kurzbz+'&'+gettimestamp();
|
||||
|
||||
if(note=='')
|
||||
note='9';
|
||||
|
||||
@@ -2403,7 +2403,7 @@ function LehrveranstaltungNotenPunkteChange()
|
||||
// ****
|
||||
// * Erstellt das Zertifikat fuer die Freifaecher
|
||||
// ****
|
||||
function LehrveranstaltungFFZertifikatPrint(event)
|
||||
function LehrveranstaltungFFZertifikatPrint(event, signieren)
|
||||
{
|
||||
tree = document.getElementById('lehrveranstaltung-noten-tree');
|
||||
//Alle markierten Noten holen
|
||||
@@ -2414,39 +2414,93 @@ function LehrveranstaltungFFZertifikatPrint(event)
|
||||
var anzahl=0;
|
||||
var lvid='';
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-student_uid"] : "lehrveranstaltung-noten-tree-student_uid";
|
||||
uid = tree.view.getCellText(v,col);
|
||||
paramList += ';'+uid;
|
||||
anzahl = anzahl+1;
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-lehrveranstaltung_id"] : "lehrveranstaltung-noten-tree-lehrveranstaltung_id";
|
||||
lvid = tree.view.getCellText(v,col);
|
||||
}
|
||||
}
|
||||
var ss = getStudiensemester();
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-studiengang_kz_lv"] : "lehrveranstaltung-noten-tree-studiengang_kz_lv";
|
||||
stg_kz = tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
if (event.shiftKey)
|
||||
var output='odt';
|
||||
else if (event.ctrlKey)
|
||||
var output='doc';
|
||||
else
|
||||
var output='pdf';
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=zertifikat.rdf.php&xsl=Zertifikat&stg_kz='+stg_kz+'&ss='+ss+'&'+gettimestamp();
|
||||
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=zertifikat.rdf.php&xsl=Zertifikat&stg_kz='+stg_kz+'&uid='+paramList+'&output='+output+'&ss='+ss+'&lvid='+lvid+'&'+gettimestamp();
|
||||
window.location.href = url;
|
||||
//prompt('test:',url);
|
||||
if (signieren)
|
||||
{
|
||||
// Wenn die Dokumente signiert werden, dann einzeln erstellen
|
||||
|
||||
var errors='';
|
||||
var anz_erfolgreich=0;
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-student_uid"] : "lehrveranstaltung-noten-tree-student_uid";
|
||||
uid = tree.view.getCellText(v,col);
|
||||
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-lehrveranstaltung_id"] : "lehrveranstaltung-noten-tree-lehrveranstaltung_id";
|
||||
lvid = tree.view.getCellText(v,col);
|
||||
|
||||
// Dokument fuer alle markierten Personen einzeln erstellen und signieren/archivieren
|
||||
|
||||
var req = new phpRequest(url,'','');
|
||||
req.add('output', 'pdf');
|
||||
req.add('sign', '1');
|
||||
req.add('archive', '1');
|
||||
req.add('uid', uid);
|
||||
req.add('lvid', lvid);
|
||||
|
||||
var response = req.execute();
|
||||
|
||||
if (response != '')
|
||||
errors = errors + response;
|
||||
else
|
||||
{
|
||||
anz_erfolgreich = anz_erfolgreich + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (errors != '')
|
||||
{
|
||||
alert(anz_erfolgreich + ' Dokumente wurden erfolgreich erstellt und signiert. Folgende Fehler sind aufgetreten:' + errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(anz_erfolgreich + ' Dokumente wurden erfolgreich erstellt und signiert');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// wenn die Dokumente unsigniert erstellt werden, dann alle in ein Dokument generieren
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-student_uid"] : "lehrveranstaltung-noten-tree-student_uid";
|
||||
uid = tree.view.getCellText(v,col);
|
||||
paramList += ';'+uid;
|
||||
anzahl = anzahl+1;
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-lehrveranstaltung_id"] : "lehrveranstaltung-noten-tree-lehrveranstaltung_id";
|
||||
lvid = tree.view.getCellText(v,col);
|
||||
}
|
||||
}
|
||||
|
||||
if (event.shiftKey)
|
||||
var output='odt';
|
||||
else if (event.ctrlKey)
|
||||
var output='doc';
|
||||
else
|
||||
var output='pdf';
|
||||
|
||||
url = url +'&uid='+paramList+'&lvid='+lvid+'&output='+output;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Erstellt ein Lehrveranstaltungszeugnis fuer die LV
|
||||
// ****
|
||||
function LehrveranstaltungLVZeugnisPrint(event, sprache)
|
||||
function LehrveranstaltungLVZeugnisPrint(event, sprache, signieren)
|
||||
{
|
||||
tree = document.getElementById('lehrveranstaltung-noten-tree');
|
||||
//Alle markierten Noten holen
|
||||
@@ -2457,37 +2511,92 @@ function LehrveranstaltungLVZeugnisPrint(event, sprache)
|
||||
var anzahl=0;
|
||||
var lvid='';
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-student_uid"] : "lehrveranstaltung-noten-tree-student_uid";
|
||||
uid = tree.view.getCellText(v,col);
|
||||
paramList += ';'+uid;
|
||||
anzahl = anzahl+1;
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-lehrveranstaltung_id"] : "lehrveranstaltung-noten-tree-lehrveranstaltung_id";
|
||||
lvid = tree.view.getCellText(v,col);
|
||||
}
|
||||
}
|
||||
var ss = getStudiensemester();
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-studiengang_kz"] : "lehrveranstaltung-noten-tree-studiengang_kz";
|
||||
stg_kz = tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
if (event.shiftKey)
|
||||
var output='odt';
|
||||
else if (event.ctrlKey)
|
||||
var output='doc';
|
||||
else
|
||||
var output='pdf';
|
||||
|
||||
var xsl = 'LVZeugnis';
|
||||
|
||||
if (sprache == 'English')
|
||||
xsl = 'LVZeugnisEng';
|
||||
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=lehrveranstaltungszeugnis.rdf.php&xsl='+xsl+'&stg_kz='+stg_kz+'&uid='+paramList+'&output='+output+'&ss='+ss+'&lvid='+lvid+'&'+gettimestamp();
|
||||
window.location.href = url;
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=lehrveranstaltungszeugnis.rdf.php&xsl='+xsl+'&stg_kz='+stg_kz+'&ss='+ss+'&'+gettimestamp();
|
||||
|
||||
if(signieren)
|
||||
{
|
||||
// Wenn die Dokumente signiert werden, dann einzeln erstellen
|
||||
|
||||
var errors='';
|
||||
var anz_erfolgreich=0;
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-student_uid"] : "lehrveranstaltung-noten-tree-student_uid";
|
||||
uid = tree.view.getCellText(v,col);
|
||||
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-lehrveranstaltung_id"] : "lehrveranstaltung-noten-tree-lehrveranstaltung_id";
|
||||
lvid = tree.view.getCellText(v,col);
|
||||
|
||||
// Dokument fuer alle markierten Personen einzeln erstellen und signieren/archivieren
|
||||
|
||||
var req = new phpRequest(url,'','');
|
||||
req.add('output', 'pdf');
|
||||
req.add('sign', '1');
|
||||
req.add('archive', '1');
|
||||
req.add('uid', uid);
|
||||
req.add('lvid', lvid);
|
||||
|
||||
var response = req.execute();
|
||||
|
||||
if (response != '')
|
||||
errors = errors + response;
|
||||
else
|
||||
{
|
||||
anz_erfolgreich = anz_erfolgreich + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (errors != '')
|
||||
{
|
||||
alert(anz_erfolgreich + ' Dokumente wurden erfolgreich erstellt und signiert. Folgende Fehler sind aufgetreten:' + errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(anz_erfolgreich + ' Dokumente wurden erfolgreich erstellt und signiert');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// wenn die Dokumente unsigniert erstellt werden, dann alle in ein Dokument generieren
|
||||
|
||||
for (var t = 0; t < numRanges; t++)
|
||||
{
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++)
|
||||
{
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-student_uid"] : "lehrveranstaltung-noten-tree-student_uid";
|
||||
uid = tree.view.getCellText(v,col);
|
||||
paramList += ';'+uid;
|
||||
anzahl = anzahl+1;
|
||||
col = tree.columns ? tree.columns["lehrveranstaltung-noten-tree-lehrveranstaltung_id"] : "lehrveranstaltung-noten-tree-lehrveranstaltung_id";
|
||||
lvid = tree.view.getCellText(v,col);
|
||||
}
|
||||
}
|
||||
|
||||
if (event.shiftKey)
|
||||
var output='odt';
|
||||
else if (event.ctrlKey)
|
||||
var output='doc';
|
||||
else
|
||||
var output='pdf';
|
||||
|
||||
|
||||
url = url+'&lvid='+lvid+'&uid='+paramList+'&output='+output;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
|
||||
+16
-3
@@ -47,6 +47,7 @@ require_once('../include/studienordnung.class.php');
|
||||
require_once('../include/dokument_export.class.php');
|
||||
require_once('../include/dokument.class.php');
|
||||
require_once('../include/pdf.class.php');
|
||||
require_once('../include/lehrveranstaltung.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
$db = new basis_db();
|
||||
@@ -458,7 +459,7 @@ else
|
||||
}
|
||||
|
||||
$dokument->setFilename($filename);
|
||||
|
||||
|
||||
if ($sign === true)
|
||||
{
|
||||
$dokument->sign($user);
|
||||
@@ -520,6 +521,18 @@ else
|
||||
{
|
||||
$bezeichnung = mb_substr($vorlage->bezeichnung." ".$studiengang->kuerzel, 0, 64);
|
||||
}
|
||||
elseif ($xsl === 'LVZeugnisEng' || $xsl === 'LVZeugnis' || $xsl === 'Zertifikat')
|
||||
{
|
||||
$lehrveranstaltung = new lehrveranstaltung($_GET['lvid']);
|
||||
$vorlage->dokument_kurzbz = $xsl;
|
||||
$bezeichnung = mb_substr($xsl." ".strtoupper($row->typ).strtoupper($row->kurzbz)." ".$semester.". Semester".' '.$ss . ' '. $lehrveranstaltung->bezeichnung, 0, 64);
|
||||
$titel = mb_substr($xsl."_".strtoupper($row->typ).strtoupper($row->kurzbz)."_".$semester.'_'.$ss. '_' . str_replace(' ', '_', $lehrveranstaltung->bezeichnung), 0, 60);
|
||||
}
|
||||
elseif ($xsl == 'SZeugnis')
|
||||
{
|
||||
$bezeichnung = mb_substr($vorlage->bezeichnung." ".$studiengang->kuerzel, 0, 64);
|
||||
$titel = mb_substr($vorlage->bezeichnung." ".$studiengang->kuerzel, 0, 64);
|
||||
}
|
||||
else
|
||||
{
|
||||
$bezeichnung = mb_substr($xsl." ".strtoupper($row->typ).strtoupper($row->kurzbz)." ".$semester.". Semester".' '.$ss, 0, 64);
|
||||
@@ -566,7 +579,7 @@ else
|
||||
$dokument->setFilename($filename);
|
||||
|
||||
$error = false;
|
||||
|
||||
|
||||
// XML-tag archivierbar ergaenzen
|
||||
$dokument->setXMLTag_archivierbar();
|
||||
|
||||
@@ -578,7 +591,7 @@ else
|
||||
{
|
||||
$dokument->sign($user);
|
||||
}
|
||||
|
||||
|
||||
if ($dokument->create($output))
|
||||
$doc = $dokument->output(false);
|
||||
else
|
||||
|
||||
@@ -31,18 +31,18 @@ function treeProjektmenueSelect()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
|
||||
var bezeichnung = getTreeCellText(tree, "treecol-projektmenue-bezeichnung", tree.currentIndex);
|
||||
var oe=getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
var projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
var projekt_phase=getTreeCellText(tree, "treecol-projektmenue-projekt_phase", tree.currentIndex);
|
||||
var projekt_phase_id=getTreeCellText(tree, "treecol-projektmenue-projekt_phase_id", tree.currentIndex);
|
||||
|
||||
|
||||
|
||||
|
||||
//Neu und Delete Button fuer Projekte und Phasen aktivieren/deaktivieren
|
||||
if (projekt_kurzbz=='')
|
||||
{
|
||||
@@ -54,7 +54,7 @@ function treeProjektmenueSelect()
|
||||
document.getElementById('toolbarbutton-projekt-neu').disabled=true;
|
||||
document.getElementById('toolbarbutton-projektphase-neu').disabled=false;
|
||||
}
|
||||
|
||||
|
||||
//Projekte neu laden
|
||||
try
|
||||
{
|
||||
@@ -75,8 +75,8 @@ function treeProjektmenueSelect()
|
||||
reloadRessourcePhasen();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
// Wenn der Tab Phase oder Tasks ausgewaehlt ist auf die Projekte wechseln
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projektphase')
|
||||
|| document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekttask'))
|
||||
@@ -102,7 +102,7 @@ function treeProjektmenueSelect()
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
datasourceTreeProjekt = rdfService.GetDataSource(datasource);
|
||||
datasourceTreeProjekt.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
@@ -115,12 +115,12 @@ function treeProjektmenueSelect()
|
||||
{
|
||||
debug("whoops Projekt load failed with exception: "+e);
|
||||
}
|
||||
|
||||
|
||||
// Projektphasen neu laden
|
||||
if(projekt_kurzbz!='')
|
||||
{
|
||||
// Wenn ein Projekt angeklickt wird, ggf Karteireiter wechseln
|
||||
|
||||
|
||||
// Wenn der Ressourceauslastung Tab geoeffnet ist
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-ressourceauslastung'))
|
||||
{
|
||||
@@ -135,7 +135,7 @@ function treeProjektmenueSelect()
|
||||
reloadRessourcePhasen();
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// Wenn der Tab Projekte oder Tasks ausgewaehlt ist auf die Phasen wechseln
|
||||
if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekte')
|
||||
@@ -144,10 +144,11 @@ function treeProjektmenueSelect()
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projektphase');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var datasources="<?php echo APP_ROOT; ?>rdf/projektphase.rdf.php?"+gettimestamp();
|
||||
datasources = datasources + "&filterprj=" + encodeURIComponent(projekt_kurzbz);
|
||||
var ref="http://www.technikum-wien.at/projektphase/"+oe+"/"+projekt_kurzbz;
|
||||
var treePhase=document.getElementById('tree-projektphase');
|
||||
|
||||
@@ -165,7 +166,7 @@ function treeProjektmenueSelect()
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
datasourceTreeProjektphase = rdfService.GetDataSource(datasources);
|
||||
datasourceTreeProjektphase.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
@@ -180,7 +181,7 @@ function treeProjektmenueSelect()
|
||||
debug("whoops Projektphase load failed with exception: "+e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Projekttasks neu laden
|
||||
if(projekt_phase_id!='')
|
||||
{
|
||||
@@ -190,12 +191,12 @@ function treeProjektmenueSelect()
|
||||
{
|
||||
document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projekttask');
|
||||
}
|
||||
LoadTasks(projekt_phase_id);
|
||||
LoadTasks(projekt_phase_id);
|
||||
}
|
||||
|
||||
|
||||
document.getElementById('projekttask-toolbar-del').disabled=true;
|
||||
|
||||
|
||||
|
||||
|
||||
// Dokumente laden
|
||||
if(projekt_phase_id!='' || projekt_kurzbz!='')
|
||||
{
|
||||
@@ -203,21 +204,21 @@ function treeProjektmenueSelect()
|
||||
document.getElementById('toolbarbutton-projektdokument-zuweisung').disabled=false;
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
if(projekt_phase_id!='')
|
||||
url = "<?php echo APP_ROOT; ?>rdf/dms.rdf.php?projektphase_id="+projekt_phase_id+"&"+gettimestamp();
|
||||
else if(projekt_kurzbz!='')
|
||||
url = "<?php echo APP_ROOT; ?>rdf/dms.rdf.php?projekt_kurzbz="+projekt_kurzbz+"&"+gettimestamp();
|
||||
|
||||
|
||||
var treeDokument=document.getElementById('tree-projektdokument');
|
||||
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeDokument.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeDokument.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
datasourceTreeDokument.removeXMLSinkObserver(DokumentTreeSinkObserver);
|
||||
@@ -226,7 +227,7 @@ function treeProjektmenueSelect()
|
||||
catch(e)
|
||||
{}
|
||||
treeDokument.builder.rebuild();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
datasourceTreeDokument = rdfService.GetDataSource(url);
|
||||
datasourceTreeDokument.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
@@ -245,13 +246,13 @@ function treeProjektmenueSelect()
|
||||
else
|
||||
{
|
||||
document.getElementById('toolbarbutton-projektdokument-neu').disabled=true;
|
||||
document.getElementById('toolbarbutton-projektdokument-zuweisung').disabled=true;
|
||||
document.getElementById('toolbarbutton-projektdokument-zuweisung').disabled=true;
|
||||
drawGantt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Bestellung laden
|
||||
if(projekt_phase_id=='' && projekt_kurzbz!='')
|
||||
{
|
||||
@@ -259,14 +260,14 @@ function treeProjektmenueSelect()
|
||||
{
|
||||
url = "<?php echo APP_ROOT; ?>rdf/bestellung.rdf.php?projektKurzbz="+projekt_kurzbz+"&"+gettimestamp();
|
||||
var treeBestellung=document.getElementById('tree-bestellung');
|
||||
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeBestellung.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeBestellung.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
datasourceTreeBestellung.removeXMLSinkObserver(BestellungTreeSinkObserver);
|
||||
@@ -274,7 +275,7 @@ function treeProjektmenueSelect()
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
datasourceTreeBestellung = rdfService.GetDataSource(url);
|
||||
datasourceTreeBestellung.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
@@ -323,7 +324,7 @@ function ProjektmenueRefresh(filter)
|
||||
global_filter='alle';
|
||||
if(filter==undefined)
|
||||
filter=global_filter;
|
||||
|
||||
|
||||
global_filter=filter;
|
||||
try
|
||||
{
|
||||
@@ -332,7 +333,7 @@ function ProjektmenueRefresh(filter)
|
||||
url = "<?php echo APP_ROOT; ?>rdf/projektphase.rdf.php?"+gettimestamp();
|
||||
else
|
||||
url = "<?php echo APP_ROOT; ?>rdf/projektphase.rdf.php?filter="+global_filter+"&"+gettimestamp();
|
||||
|
||||
|
||||
var treeProjektmenue=document.getElementById('tree-projektmenue');
|
||||
|
||||
//Alte DS entfernen
|
||||
@@ -342,7 +343,7 @@ function ProjektmenueRefresh(filter)
|
||||
treeProjektmenue.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
treeProjektmenue.builder.rebuild();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
datasourceTreeProjektmenue = rdfService.GetDataSource(url);
|
||||
datasourceTreeProjektmenue.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
@@ -372,11 +373,11 @@ function loadURL(event)
|
||||
function parseRDFString(str, url)
|
||||
{
|
||||
|
||||
try
|
||||
try
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
}
|
||||
catch(e)
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert(e);
|
||||
return;
|
||||
@@ -423,34 +424,34 @@ var projektTaskDDObserver=
|
||||
{
|
||||
debug('treeDragDrop: e');
|
||||
}
|
||||
|
||||
|
||||
var ds = dragservice_ds;
|
||||
|
||||
var tree = document.getElementById('tree-projektmenue')
|
||||
var row = { }
|
||||
var col = { }
|
||||
var child = { }
|
||||
|
||||
|
||||
tree.treeBoxObject.getCellAt(evt.pageX, evt.pageY, row, col, child)
|
||||
|
||||
|
||||
col = tree.columns ? tree.columns["treecol-projektmenue-projekt_phase_id"] : "treecol-projektmenue-projekt_phase_id";
|
||||
projektphaseID=tree.view.getCellText(row.value,col);
|
||||
|
||||
|
||||
if(projektphaseID == '')
|
||||
{
|
||||
alert('keine phase ausgewählt!');
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
var projekttask_id = dropdata.data;
|
||||
|
||||
var projekttask_id = dropdata.data;
|
||||
|
||||
var soapBody = new SOAPObject("changeProjektPhase");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
|
||||
soapBody.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id);
|
||||
soapBody.appendChild(new SOAPObject("projektphase_id")).val(projektphaseID);
|
||||
|
||||
|
||||
var sr = new SOAPRequest("changeProjektPhase",soapBody);
|
||||
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/projekttask.soap.php?"+gettimestamp();
|
||||
SOAPClient.SendRequest(sr, clb_changePhaseTask);
|
||||
}
|
||||
@@ -473,7 +474,7 @@ function clb_changePhaseTask(respObj)
|
||||
}
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
document.getElementById('textbox-projekttaskdetail-projekttask_id').value=id;
|
||||
|
||||
|
||||
TaskSelectID=id;
|
||||
datasourceTreeTask.Refresh(false); //non blocking
|
||||
TaskTreeRefresh()
|
||||
|
||||
@@ -109,6 +109,14 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektdetail.overlay.xul.
|
||||
<treecol id="treecol-projekt-endeiso" label="EndeISO" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/projekt/rdf#ende_iso" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="treecol-projekt-aufwand_pt" label="Aufwand PT" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/projekt/rdf#aufwandpt" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="treecol-projekt-anzahl_ma" label="Anzahl MA" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/projekt/rdf#anzahl_ma" />
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
@@ -126,6 +134,8 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektdetail.overlay.xul.
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#budget"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#beginn_iso"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#ende_iso"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#aufwand_pt"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projekt/rdf#anzahl_ma"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
|
||||
@@ -91,6 +91,10 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektphasedetail.overlay
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/projektphase/rdf#ende_iso" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="treecol-projektphase-personentage" label="Personentage" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/projektphase/rdf#personentage" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="treecol-projektphase-budget" label="Budget" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/projektphase/rdf#budget" />
|
||||
@@ -129,6 +133,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektphasedetail.overlay
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#beschreibung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#beginn"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#ende"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#personentage"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#budget"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#typ"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/projektphase/rdf#oe_kurzbz"/>
|
||||
|
||||
@@ -87,8 +87,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<menulist id="textbox-projektphase-detail-typ" disabled="true">
|
||||
<menupopup>
|
||||
<menuitem value="Arbeitspaket" label="Arbeitspaket"/>
|
||||
<menuitem value="Projektphase" label="Projektphase"/>
|
||||
<menuitem value="Milestone" label="Milestone"/>
|
||||
<menuitem value="Projektphase" label="Projektphase"/>
|
||||
<menuitem value="Service" label="Service"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
|
||||
@@ -160,15 +160,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-aufwand" label="Aufwand" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#aufwand" />
|
||||
sort="rdf:http://www.technikum-wien.at/ressource/rdf#aufwand" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-funktion_kurzbz" label="Funktion" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#funktion_kurzbz" />
|
||||
sort="rdf:http://www.technikum-wien.at/ressource/rdf#funktion_kurzbz" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-typ" label="Typ" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#typ" />
|
||||
sort="rdf:http://www.technikum-wien.at/ressource/rdf#typ" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-ressource-ressource_id" label="ID" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
|
||||
@@ -47,8 +47,11 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
<menupopup id="student-noten-tree-popup">
|
||||
<menuitem label="Entfernen" oncommand="StudentNotenDelete();" id="student-noten-tree-popup-delete" hidden="false"/>
|
||||
<menuitem label="Zertifikat erstellen" oncommand="StudentFFZertifikatPrint(event);" id="student-noten-tree-popup-ffzertifikat" hidden="false"/>
|
||||
<menuitem label="Zertifikat archivieren mit Signatur" oncommand="StudentFFZertifikatPrint(event, true);" id="student-noten-tree-popup-ffzertifikat" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis erstellen" oncommand="StudentLVZeugnisPrint(event, 'German');" id="student-noten-tree-popup-lvzeugnis" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis archivieren mit Signatur" oncommand="StudentLVZeugnisPrint(event, 'German', true);" id="student-noten-tree-popup-lvzeugnis" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis Englisch erstellen" oncommand="StudentLVZeugnisPrint(event, 'English');" id="student-noten-tree-popup-lvzeugnis_eng" hidden="false"/>
|
||||
<menuitem label="Lehrveranstaltungszeugnis Englisch archivieren mit Signatur" oncommand="StudentLVZeugnisPrint(event, 'English', true);" id="student-noten-tree-popup-lvzeugnis_eng" hidden="false"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
<hbox flex="1" style="margin-top: 10px;">
|
||||
|
||||
@@ -462,7 +462,7 @@ function StudentTreeKeyPress(event)
|
||||
// ****
|
||||
// * Erstellt das Zertifikat fuer die Freifaecher
|
||||
// ****
|
||||
function StudentFFZertifikatPrint(event)
|
||||
function StudentFFZertifikatPrint(event, signieren)
|
||||
{
|
||||
// netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('student-noten-tree');
|
||||
@@ -486,16 +486,36 @@ function StudentFFZertifikatPrint(event)
|
||||
else
|
||||
var output='pdf';
|
||||
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=zertifikat.rdf.php&xsl=Zertifikat&stg_kz='+stg_kz+'&uid=;'+uid+'&output='+output+'&ss='+stsem+'&lvid='+lvid+'&'+gettimestamp();
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=zertifikat.rdf.php&xsl=Zertifikat&stg_kz='+stg_kz+'&uid='+uid+'&ss='+stsem+'&lvid='+lvid+'&'+gettimestamp();
|
||||
|
||||
// alert('url: '+url);
|
||||
window.location.href = url;
|
||||
if (signieren)
|
||||
{
|
||||
var req = new phpRequest(url,'','');
|
||||
req.add('output', 'pdf');
|
||||
req.add('sign', '1');
|
||||
req.add('archive', '1');
|
||||
|
||||
var response = req.execute();
|
||||
|
||||
if (response != '')
|
||||
alert(response)
|
||||
else
|
||||
{
|
||||
alert('Erfolgreich archiviert und signiert');
|
||||
StudentTreeRefresh();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
url = url+'&output='+output;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
//****
|
||||
//* Erstellt ein Lehrveranstaltungszeugnis fuer die LV
|
||||
//****
|
||||
function StudentLVZeugnisPrint(event, sprache)
|
||||
function StudentLVZeugnisPrint(event, sprache, signieren)
|
||||
{
|
||||
// netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('student-noten-tree');
|
||||
@@ -523,9 +543,30 @@ function StudentLVZeugnisPrint(event, sprache)
|
||||
if (sprache == 'English')
|
||||
xsl = 'LVZeugnisEng';
|
||||
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=lehrveranstaltungszeugnis.rdf.php&xsl='+xsl+'&stg_kz='+stg_kz+'&uid=;'+uid+'&output='+output+'&ss='+stsem+'&lvid='+lvid+'&'+gettimestamp();
|
||||
url = '<?php echo APP_ROOT; ?>content/pdfExport.php?xml=lehrveranstaltungszeugnis.rdf.php&xsl='+xsl+'&stg_kz='+stg_kz+'&uid='+uid+'&ss='+stsem+'&lvid='+lvid+'&'+gettimestamp();
|
||||
|
||||
window.location.href = url;
|
||||
if (signieren)
|
||||
{
|
||||
var req = new phpRequest(url,'','');
|
||||
req.add('output', 'pdf');
|
||||
req.add('sign', '1');
|
||||
req.add('archive', '1');
|
||||
|
||||
var response = req.execute();
|
||||
|
||||
if (response != '')
|
||||
alert(response)
|
||||
else
|
||||
{
|
||||
alert('Erfolgreich archiviert und signiert');
|
||||
StudentTreeRefresh();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
url = url+'&output='+output;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
@@ -3326,6 +3367,7 @@ function StudentZeugnisDokumentArchivieren()
|
||||
break;
|
||||
|
||||
case 'DiplSupplement':
|
||||
case 'SZeugnis':
|
||||
xml = 'diplomasupplement.xml.php';
|
||||
break;
|
||||
|
||||
|
||||
@@ -284,6 +284,10 @@ function onLektorSelect(event)
|
||||
|
||||
var stg_idx = tree.view.getParentIndex(tree.currentIndex);
|
||||
var col = tree.columns ? tree.columns["studiengang_kz"] : "studiengang_kz";
|
||||
//Wenn der Filter angewendet wurde, gibt es keinen Parent. Daher wird hier der stg_idx auf 0 gesetzt.
|
||||
if(stg_idx == -1 && uid != '')
|
||||
stg_idx = 0;
|
||||
|
||||
if (stg_idx != -1)
|
||||
var stg_kz=tree.view.getCellText(stg_idx,col);
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@ class bisverwendung extends basis_db
|
||||
public $inkludierte_lehre;
|
||||
public $zeitaufzeichnungspflichtig;
|
||||
public $azgrelevant;
|
||||
public $homeoffice;
|
||||
public $homeoffice=false;
|
||||
|
||||
public $ba1bez;
|
||||
public $ba2bez;
|
||||
|
||||
@@ -849,6 +849,8 @@ class mitarbeiter extends benutzer
|
||||
$obj->titelpost = $row->titelpost;
|
||||
$obj->kurzbz = $row->kurzbz;
|
||||
$obj->vornamen = $row->vornamen;
|
||||
$obj->aktiv =$this->db_parse_bool($row->aktiv);
|
||||
$obj->fixangestellt = $this->db_parse_bool($row->fixangestellt);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -1358,6 +1360,7 @@ class mitarbeiter extends benutzer
|
||||
WHERE
|
||||
bismelden
|
||||
AND personalnummer>0
|
||||
AND tbl_bisverwendung.beginn<='.$this->db_add_param($meldungEnde).'
|
||||
AND (tbl_bisverwendung.ende is NULL OR tbl_bisverwendung.ende>'.$this->db_add_param($meldungBeginn).')
|
||||
ORDER BY uid, nachname,vorname
|
||||
';
|
||||
@@ -1467,22 +1470,25 @@ class mitarbeiter extends benutzer
|
||||
$hasUDF = false;
|
||||
$udf = new UDF();
|
||||
|
||||
$qry = "SELECT DISTINCT ON(mitarbeiter_uid) *,
|
||||
tbl_benutzer.aktiv as aktiv,
|
||||
tbl_mitarbeiter.insertamum,
|
||||
tbl_mitarbeiter.insertvon,
|
||||
tbl_mitarbeiter.updateamum,
|
||||
tbl_mitarbeiter.updatevon";
|
||||
$qry = "SELECT
|
||||
*,
|
||||
tbl_benutzer.aktiv as aktiv,
|
||||
tbl_mitarbeiter.insertamum,
|
||||
tbl_mitarbeiter.insertvon,
|
||||
tbl_mitarbeiter.updateamum,
|
||||
tbl_mitarbeiter.updatevon";
|
||||
|
||||
if ($hasUDF = $udf->personHasUDF())
|
||||
{
|
||||
$qry .= ", public.tbl_person.udf_values AS p_udf_values";
|
||||
}
|
||||
|
||||
$qry .= " FROM ((public.tbl_mitarbeiter JOIN public.tbl_benutzer ON(mitarbeiter_uid=uid))
|
||||
JOIN public.tbl_person USING(person_id))
|
||||
LEFT JOIN public.tbl_benutzerfunktion USING(uid)
|
||||
WHERE uid in(".$this->db_implode4SQL($uid_arr).")";;
|
||||
$qry .= " FROM
|
||||
public.tbl_mitarbeiter
|
||||
JOIN public.tbl_benutzer ON(mitarbeiter_uid=uid)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE uid in(".$this->db_implode4SQL($uid_arr).")";
|
||||
$qry .= " ORDER BY nachname, vorname";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@ class projektphase extends basis_db
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
$obj->start = $row->start;
|
||||
$obj->ende = $row->ende;
|
||||
//$obj->personentage = $row->personentage;
|
||||
$obj->personentage = $row->personentage;
|
||||
$obj->farbe = $row->farbe;
|
||||
$obj->budget = $row->budget;
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
|
||||
@@ -1247,15 +1247,16 @@ class reihungstest extends basis_db
|
||||
*/
|
||||
public function getReihungstestPersonDatum($prestudent_id, $datum)
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_rt_person.*
|
||||
FROM
|
||||
public.tbl_rt_person
|
||||
JOIN public.tbl_prestudent USING(person_id)
|
||||
JOIN public.tbl_reihungstest ON(tbl_reihungstest.reihungstest_id=tbl_rt_person.rt_id)
|
||||
WHERE
|
||||
tbl_prestudent.prestudent_id = ".$this->db_add_param($prestudent_id)."
|
||||
AND tbl_reihungstest.datum=".$this->db_add_param($datum);
|
||||
$qry = "SELECT rt_person.*
|
||||
FROM tbl_prestudent ps
|
||||
JOIN tbl_prestudentstatus pss ON ps.prestudent_id = pss.prestudent_id
|
||||
JOIN tbl_rt_person rt_person ON ps.person_id = rt_person.person_id
|
||||
JOIN tbl_reihungstest rt ON rt_person.rt_id = rt.reihungstest_id
|
||||
JOIN tbl_rt_studienplan rtstp ON rt.reihungstest_id = rtstp.reihungstest_id
|
||||
WHERE ps.prestudent_id = ".$this->db_add_param($prestudent_id)."
|
||||
AND rtstp.studienplan_id = pss.studienplan_id
|
||||
AND rt.datum=".$this->db_add_param($datum);
|
||||
|
||||
if ($result = $this->db_query($qry))
|
||||
{
|
||||
while ($row = $this->db_fetch_object($result))
|
||||
|
||||
@@ -553,6 +553,12 @@ class statistik extends basis_db
|
||||
{
|
||||
$name = $this->db_field_name($this->data,$spalte);
|
||||
$this->html.= '<td>'.$this->convert_html_chars($row->$name).'</td>';
|
||||
// Umwandeln von Punkt in Komma bei Float-Werten
|
||||
if (is_numeric($row->$name))
|
||||
{
|
||||
if (strpos($row->$name,'.') != false)
|
||||
$row->$name = number_format($row->$name,2,",","");
|
||||
}
|
||||
$this->csv.= '"'.$row->$name.'",';
|
||||
}
|
||||
|
||||
|
||||
@@ -812,20 +812,141 @@ or not exists
|
||||
|
||||
$qry = "select max(datum) from addon.tbl_casetime_timesheet where ".$where." and abgeschicktamum is not null";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if ($result = $this->db_query($qry))
|
||||
{
|
||||
$datum = $this->db_fetch_object($result);
|
||||
return $datum->max;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft, ob es für einen bestimmten User für einen bestimmten Tag eine Zeitaufzeichnung gibt
|
||||
* @param string $user Uid des zu prüfenden Users.
|
||||
* @param date $vonDay Startdatum des zu prüfenden Zeitraumes im Format d.m.Y.
|
||||
* @param date $bisDay Enddatum des zu prüfenden Zeitraumes im Format d.m.Y.
|
||||
* @return boolean true, wenn vorhanden, sonst false
|
||||
*/
|
||||
public function existsZeitaufzeichnung($user, $vonDay, $bisDay)
|
||||
{
|
||||
$datum = date($vonDay);
|
||||
$year = substr($datum, 6, 4);
|
||||
$month = substr($datum, 3, 2);
|
||||
$day = substr($datum, 0, 2);
|
||||
|
||||
$datumbisDay = date($bisDay);
|
||||
$yearbisDay = substr($datumbisDay, 6, 4);
|
||||
$monthbisDay = substr($datumbisDay, 3, 2);
|
||||
$daybisDay = substr($datumbisDay, 0, 2);
|
||||
|
||||
$bisDay = date("Y-m-d", (mktime(0, 0, 0, $monthbisDay, $daybisDay + 1, $yearbisDay)));
|
||||
$datum = date("Y-m-d", (mktime(0, 0, 0, $month, $day, $year)));
|
||||
|
||||
$qry = "
|
||||
SELECT *
|
||||
FROM campus.tbl_zeitaufzeichnung
|
||||
WHERE uid = ". $this->db_add_param($user). "
|
||||
AND start >= ". $this->db_add_param($datum). "
|
||||
AND ende < ". $this->db_add_param($bisDay). ";
|
||||
";
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
$num_rows = $this->db_num_rows();
|
||||
if ($num_rows >= 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** Check, if there is a blocking PausenError
|
||||
*
|
||||
* @param string $uid User uid.
|
||||
* @param string $datumday Day to be check in the format "Y-m-d".
|
||||
* @return boolean True if there is a Pausen error.
|
||||
*/
|
||||
public function checkPausenErrors($uid, $datumday)
|
||||
{
|
||||
$tagesbeginn = '';
|
||||
$tagesende = '';
|
||||
$pausesumme = 0;
|
||||
$tagessaldo = '';
|
||||
$elsumme = '00:00';
|
||||
$pflichtpause = false;
|
||||
$blockingError = false;
|
||||
$datum = new datum();
|
||||
|
||||
$this->getListeUserFromTo($uid, $datumday, $datumday, null);
|
||||
|
||||
foreach ($this->result as $row)
|
||||
{
|
||||
$datumtag = $datum->formatDatum($row->datum, 'Y-m-d');
|
||||
|
||||
if (($tagesbeginn == '' || $datum->mktime_fromtimestamp($datum->formatDatum($tagesbeginn, $format = 'Y-m-d H:i:s')) > $datum->mktime_fromtimestamp($datum->formatDatum($row->start, $format = 'Y-m-d H:i:s'))) && $row->aktivitaet_kurzbz != 'LehreExtern' && $row->aktivitaet_kurzbz != 'Ersatzruhe')
|
||||
$tagesbeginn = $datum->formatDatum($row->start, 'H:i');
|
||||
|
||||
if (($tagesende == '' || $datum->mktime_fromtimestamp($datum->formatDatum($tagesende, $format = 'Y-m-d H:i:s')) < $datum->mktime_fromtimestamp($datum->formatDatum($row->ende, $format = 'Y-m-d H:i:s'))) && $row->aktivitaet_kurzbz != 'LehreExtern' && $row->aktivitaet_kurzbz != 'Ersatzruhe')
|
||||
$tagesende = $datum->formatDatum($row->ende, 'H:i');
|
||||
|
||||
if ($row->aktivitaet_kurzbz == "Pause")
|
||||
{
|
||||
list($h1, $m1) = explode(':', $row->diff);
|
||||
$pausesumme += ($h1 * 3600 + $m1 * 60);
|
||||
}
|
||||
}
|
||||
|
||||
$tagessaldo = $datum->mktime_fromtimestamp($datum->formatDatum($tagesende, $format = 'Y-m-d H:i:s')) - $datum->mktime_fromtimestamp($datum->formatDatum($tagesbeginn, $format = 'Y-m-d H:i:s')) - 3600;
|
||||
|
||||
list($h2, $m2) = explode(':', $elsumme);
|
||||
$elsumme = $h2 * 3600 + $m2 * 60;
|
||||
|
||||
|
||||
if ($datum->formatDatum($datumday, 'Y-m-d') >= '2019-11-06')
|
||||
{
|
||||
$pausesumme = $pausesumme;
|
||||
}
|
||||
elseif ($tagessaldo > 18000 && $tagessaldo < 19800 && $pflichtpause == false && $elsumme == 0)
|
||||
{
|
||||
$pausesumme = $tagessaldo - 18000;
|
||||
}
|
||||
elseif ($tagessaldo > 18000 && $pflichtpause == false && $elsumme == 0)
|
||||
{
|
||||
$pausesumme = $pausesumme + 1800;
|
||||
}
|
||||
|
||||
if ($elsumme > 0)
|
||||
{
|
||||
$pausesumme = $pausesumme + $elsumme;
|
||||
$pflichtpause = true;
|
||||
}
|
||||
|
||||
$tagessaldo = $tagessaldo - $pausesumme;
|
||||
|
||||
//check if blocking error
|
||||
if (($tagessaldo > 19800 && $pausesumme < 1800) || ($tagessaldo > 18000 && $tagessaldo < 19800 && $pausesumme < $tagessaldo - 18000))
|
||||
{
|
||||
$blockingError = true;
|
||||
}
|
||||
|
||||
return $blockingError;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
<?php
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/projekt.class.php');
|
||||
require_once('../../../include/projektphase.class.php');
|
||||
require_once('../../../include/zeitaufzeichnung.class.php');
|
||||
|
||||
/**
|
||||
* Description of zeitaufzeichnung_import
|
||||
*
|
||||
* @author chris
|
||||
*/
|
||||
class zeitaufzeichnung_import {
|
||||
|
||||
protected $errors;
|
||||
protected $warnings;
|
||||
protected $infos;
|
||||
|
||||
protected $p;
|
||||
protected $datum;
|
||||
|
||||
protected $project;
|
||||
protected $phase;
|
||||
protected $limitdate;
|
||||
|
||||
protected $zeit;
|
||||
|
||||
|
||||
/**
|
||||
* @param phrasen $p The Translator object
|
||||
*/
|
||||
public function __construct($p) {
|
||||
$this->errors = [];
|
||||
$this->warnings = [];
|
||||
$this->infos = [];
|
||||
|
||||
$this->p = $p;
|
||||
$this->datum = new datum();
|
||||
|
||||
$this->project = new projekt();
|
||||
$this->phase = new projektphase();
|
||||
$this->limitdate = date('c', strtotime("+5 weeks"));
|
||||
|
||||
$this->zeit = new zeitaufzeichnung();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasErrors() {
|
||||
return !empty($this->errors);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasWarnings() {
|
||||
return !empty($this->warnings);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasInfos() {
|
||||
return !empty($this->infos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function ErrorsToHTML() {
|
||||
$html = '';
|
||||
foreach ($this->errors as $msg) {
|
||||
$html .= '<span style="color:red;"><b>' . $msg . '</b></span><br>' . "\n";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function WarningsToHTML() {
|
||||
$html = '';
|
||||
foreach ($this->warnings as $msg) {
|
||||
$html .= '<span style="color:orange;"><b>' . $msg . '</b></span><br>' . "\n";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function InfosToHTML() {
|
||||
$html = '';
|
||||
foreach ($this->infos as $msg) {
|
||||
$html .= '<span style="color:green;"><b>' . $msg . '</b></span><br>' . "\n";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function OutputToHTML() {
|
||||
return $this->InfosToHTML() . $this->WarningsToHTML() . $this->ErrorsToHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
protected function addError($msg) {
|
||||
$this->errors[] = $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
protected function addWarning($msg) {
|
||||
$this->warnings[] = $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
protected function addInfo($msg) {
|
||||
$this->infos[] = $msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $uid The user id
|
||||
* @param string $day "Y-m-d" formatted datestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkZeitsperren($uid, $day) {
|
||||
$zs = new zeitsperre();
|
||||
|
||||
if (!$zs->getSperreByDate($uid, $day, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN)) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ": Fehler beim Überprüfen der Zeitsperren");
|
||||
}
|
||||
|
||||
if (count($zs->result) !== 0) {
|
||||
$zsdate = new DateTime($day);
|
||||
$zsdate = $zsdate->format('d.m.Y');
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ": " . $this->p->t("zeitaufzeichnung/zeitsperreVorhanden", [$zsdate, $zs->result[0]->zeitsperretyp_kurzbz]));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $date datetimestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkLimitdatum($date) {
|
||||
if ($this->datum->formatDatum($date, 'Y-m-d H:i:s') > $this->limitdate) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Eingabe nicht möglich da (' . $date . ') zu weit in der Zukunft liegt.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datestring
|
||||
* @param string $end datestring
|
||||
* @param string $aktivitaet_kurzbz
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkDienstreise($start, $end, $aktivitaet_kurzbz) {
|
||||
$startDate = $this->datum->formatDatum($start, 'Y-m-d');
|
||||
$endDate = $this->datum->formatDatum($end, 'Y-m-d');
|
||||
if ($startDate != $endDate && $aktivitaet_kurzbz != "DienstreiseMT") {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten")
|
||||
.': Eingabe nicht möglich, da keine Zeitaufzeichnung über mehrere Tage erlaubt ist (ausgenommen Dienstreisen).');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $end timestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkTagesgenau($end) {
|
||||
$endTime = $this->datum->formatDatum($end, 'H:i:s');
|
||||
if ($endTime == '00:00:00') {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten")
|
||||
.': Bitte Arbeitszeiten gemäß Arbeitsaufzeichnung Leitfaden tagesgenau abgrenzen: Nur Eingaben von 00:00 bis 23:59 erlaubt!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $projekt_kurzbz
|
||||
* @param string $start datestring
|
||||
* @param string $end datestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkProjectInterval($projekt_kurzbz, $start, $end) {
|
||||
if (!$this->project->checkProjectInCorrectTime($projekt_kurzbz, $start, $end)) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektzeitrahmen fällt: (' . $start . ') (' . $end . ')');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phase The Projektphase ID
|
||||
* @param string $start datestring
|
||||
* @param string $end datestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPhaseInterval($phase, $start, $end) {
|
||||
if (!$this->phase->checkProjectphaseInCorrectTime($phase, $start, $end)) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt: (' . $start . ') (' . $end . ')');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,435 @@
|
||||
<?php
|
||||
require_once('zeitaufzeichnung_import.class.php');
|
||||
require_once('../../../include/organisationseinheit.class.php');
|
||||
|
||||
/**
|
||||
* Description of zeitaufzeichnung_csv_import
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
|
||||
|
||||
const USER = 0;
|
||||
const AKTIVITAET = 1;
|
||||
const STARTDT = 2;
|
||||
const ENDEDT = 3;
|
||||
const BESCHREIBUNG = 4;
|
||||
const OE = 5;
|
||||
const PROJEKT = 6;
|
||||
const PHASE = 7;
|
||||
const SERVICE = 8;
|
||||
const HOMEOFFICE = 9;
|
||||
const ANZAHL_PFLICHTFELDER = 4;
|
||||
|
||||
protected $tmpname;
|
||||
protected $fh;
|
||||
|
||||
protected $anzahl;
|
||||
protected $importtage_array;
|
||||
protected $ende_vorher;
|
||||
|
||||
protected $user;
|
||||
|
||||
protected $project_kurzbz_array;
|
||||
protected $projectphasen_kurzbz_array;
|
||||
|
||||
protected $sperrdatum;
|
||||
|
||||
protected $current_line;
|
||||
|
||||
protected $homeoffice;
|
||||
|
||||
|
||||
/**
|
||||
* @param phrasen $p The Translator object
|
||||
* @param string $user The user ID
|
||||
* @param string $sperrdatum "c" formatted datetimestring
|
||||
* @param string $filename
|
||||
*/
|
||||
public function __construct(phrasen $p, $user, $sperrdatum, $filename) {
|
||||
parent::__construct($p);
|
||||
|
||||
$this->user = $user;
|
||||
$this->tmpname = $filename;
|
||||
$this->sperrdatum = $sperrdatum;
|
||||
|
||||
$this->project_kurzbz_array = [];
|
||||
$projects = $this->project->getProjekteListForMitarbeiter($user);
|
||||
foreach ($projects as $pp)
|
||||
$this->project_kurzbz_array[] = (string) $pp->projekt_kurzbz;
|
||||
|
||||
$this->projectphasen_kurzbz_array = [];
|
||||
$projektphasen = $this->phase->getProjectphaseForMitarbeiter($user);
|
||||
foreach ($projektphasen as $pp)
|
||||
$this->projectphasen_kurzbz_array[] = (string) $pp->projektphase_id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
* @param boolean $prepend_current_line
|
||||
* @return void
|
||||
*/
|
||||
protected function addError($msg, $prepend_current_line = false) {
|
||||
if( $prepend_current_line ) {
|
||||
$msg = 'Zeile ' . $this->current_line . ' - ' . $msg;
|
||||
}
|
||||
$this->errors[] = $msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function import() {
|
||||
try {
|
||||
$this->checkMimeType();
|
||||
$this->openFileForReading();
|
||||
$this->checkEncoding();
|
||||
$this->iterateRows();
|
||||
$this->checkAndCleanup();
|
||||
} catch (Exception $ex) {
|
||||
$this->addError($ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkMimeType() {
|
||||
$mimeType = mime_content_type($this->tmpname);
|
||||
if ($mimeType !== 'text/plain' ) {
|
||||
throw new Exception('Datei ist nicht im CSV Format.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function openFileForReading() {
|
||||
if (false === ($this->fh = fopen($this->tmpname, 'r')) )
|
||||
{
|
||||
throw new Exception('CSV - Datei konnte nicht zum lesen geöffnet werden.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkEncoding() {
|
||||
$filecontent = file_get_contents($this->tmpname);
|
||||
if (!mb_detect_encoding($filecontent, 'UTF-8', true) ) {
|
||||
throw new Exception('Datei konnte nicht importiert werden. Encoding ist nicht UTF-8!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function iterateRows() {
|
||||
set_time_limit(0);
|
||||
|
||||
$this->anzahl = 0;
|
||||
$this->importtage_array = array();
|
||||
$this->ende_vorher = date('Y-m-d H:i:s');
|
||||
|
||||
$data = null;
|
||||
$this->current_line = 0;
|
||||
while (($data = fgetcsv($this->fh, 1000, ';', '"')) !== FALSE) {
|
||||
if ((false !== strpos($data[self::USER], '#'))
|
||||
|| count($data) < self::ANZAHL_PFLICHTFELDER) {
|
||||
// ignore lines starting with #
|
||||
continue;
|
||||
}
|
||||
$this->current_line++;
|
||||
$this->processData($data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
protected function processData($data) {
|
||||
try {
|
||||
$this->checkUser($data[self::USER]);
|
||||
$this->initData($data);
|
||||
$this->checkProject($data[self::PROJEKT], $data[self::PHASE]);
|
||||
$this->checkPhase($data[self::PHASE]);
|
||||
|
||||
$this->checkZeitsperren($this->user, $this->datum->formatDatum($data[self::STARTDT], 'Y-m-d'));
|
||||
$this->checkSperrdatum($data[self::STARTDT]);
|
||||
$this->checkLimitdatum($data[self::STARTDT]);
|
||||
$this->checkDienstreise($data[self::STARTDT], $data[self::ENDEDT], $data[self::AKTIVITAET]);
|
||||
$this->checkTagesgenau($data[self::ENDEDT]);
|
||||
if(empty($data[self::PHASE]))
|
||||
$this->checkProjectInterval($data[self::PROJEKT], $data[self::STARTDT], $data[self::ENDEDT]);
|
||||
$this->checkPhaseInterval($data[self::PHASE], $data[self::STARTDT], $data[self::ENDEDT]);
|
||||
$this->checkVals($data[self::OE],$data[self::PROJEKT],$data[self::PHASE],$data[self::SERVICE]);
|
||||
$this->mapLehreIntern($data);
|
||||
$this->prepareZeitaufzeichnung($data);
|
||||
$this->checkImporttage($data[self::STARTDT]);
|
||||
$this->saveZeit($data[self::STARTDT], $data[self::ENDEDT]);
|
||||
} catch (Exception $ex) {
|
||||
$this->addError($ex->getMessage(), true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user The User ID
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkUser($user) {
|
||||
if ($user !== $this->user || (strpos($user, '#') !== false))
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten").': Falsche UID nicht importiert (' . $user . ')');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $project The Project ID or empty string
|
||||
* @param string $phase The Phase ID or empty string
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkProject($project, $phase) {
|
||||
if(!empty($project) && !in_array($project, $this->project_kurzbz_array) && empty($phase))
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da Sie folgendem Projekt entweder nicht zugewiesen sind oder das Projekt schon abgeschlossen wurde: (' . $project . ')');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phase The Phase ID or empty string
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPhase($phase) {
|
||||
if(!empty($phase) && !in_array($phase, $this->projectphasen_kurzbz_array))
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da Sie folgender Projektphase entweder nicht zugewiesen sind oder die Projektphase schon abgeschlossen wurde: (' . $phase . ')');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
protected function initData(&$data) {
|
||||
foreach ([self::OE, self::PROJEKT, self::PHASE, self::SERVICE] as $key)
|
||||
if (!isset($data[$key]))
|
||||
$data[$key] = NULL;
|
||||
|
||||
if (!isset($data[self::HOMEOFFICE]))
|
||||
$data[$key] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetimestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkSperrdatum($start) {
|
||||
if ($this->datum->formatDatum($start, 'Y-m-d H:i:s') < $this->sperrdatum) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Eingabe nicht möglich da vor dem Sperrdatum (' . $start . ')');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $oe_val
|
||||
* @param string $project_val
|
||||
* @param string $phase_val
|
||||
* @param string $service_val
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkVals($oe_val, $project_val, $phase_val, $service_val) {
|
||||
$failedvals = $this->_checkVals($oe_val, $project_val, $phase_val, $service_val);
|
||||
if( count($failedvals) > 0 )
|
||||
{
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten").': Fehlerhafte Werte ('.implode(', ', $failedvals).')');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $oe_val
|
||||
* @param string $project_val
|
||||
* @param string $phase_val
|
||||
* @param string $service_val
|
||||
* @return array
|
||||
*/
|
||||
protected function _checkVals ($oe_val, $project_val, $phase_val, $service_val) {
|
||||
$error = [];
|
||||
if ($service_val && ( filter_var($service_val, FILTER_VALIDATE_INT) === false )) {
|
||||
$error[] = 'service';
|
||||
}
|
||||
if ($phase_val && ( filter_var($phase_val, FILTER_VALIDATE_INT) === false )) {
|
||||
$error[] = 'phase';
|
||||
}
|
||||
if ($oe_val) {
|
||||
$oecheck = new organisationseinheit($oe_val);
|
||||
if ($oecheck->errormsg) {
|
||||
$error[] = 'OE';
|
||||
}
|
||||
}
|
||||
if ($project_val) {
|
||||
$procheck = new projekt($project_val);
|
||||
if ($procheck->errormsg) {
|
||||
$error[] = 'projekt';
|
||||
}
|
||||
}
|
||||
return $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
protected function mapLehreIntern(&$data) {
|
||||
if ($data[self::AKTIVITAET] == 'LehreIntern') {
|
||||
$data[self::AKTIVITAET] = 'Lehre';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
protected function prepareZeitaufzeichnung($data) {
|
||||
$this->zeit->new = true;
|
||||
$this->zeit->beschreibung = NULL;
|
||||
$this->zeit->oe_kurzbz_1 = NULL;
|
||||
$this->zeit->projekt_kurzbz = NULL;
|
||||
$this->zeit->projektphase_id = NULL;
|
||||
$this->zeit->service_id = NULL;
|
||||
|
||||
$this->zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->updateamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->updatevon = $this->user;
|
||||
$this->zeit->insertvon = $this->user;
|
||||
$this->zeit->uid = $data[self::USER];
|
||||
$this->zeit->aktivitaet_kurzbz = $data[self::AKTIVITAET];
|
||||
$this->zeit->start = $this->datum->formatDatum($data[self::STARTDT], 'Y-m-d H:i:s');
|
||||
$this->zeit->ende = $this->datum->formatDatum($data[self::ENDEDT], 'Y-m-d H:i:s');
|
||||
if (isset($data[self::BESCHREIBUNG])) {
|
||||
$this->zeit->beschreibung = $data[self::BESCHREIBUNG];
|
||||
}
|
||||
if (isset($data[self::OE])) {
|
||||
$this->zeit->oe_kurzbz_1 = $data[self::OE];
|
||||
}
|
||||
if (isset($data[self::PROJEKT])) {
|
||||
$this->zeit->projekt_kurzbz = $data[self::PROJEKT];
|
||||
}
|
||||
if (isset($data[self::PHASE])) {
|
||||
$this->zeit->projektphase_id = $data[self::PHASE];
|
||||
}
|
||||
if (isset($data[self::SERVICE])) {
|
||||
$this->zeit->service_id = $data[self::SERVICE];
|
||||
}
|
||||
$this->zeit->homeoffice = false;
|
||||
if (isset($data[self::HOMEOFFICE])) {
|
||||
$this->zeit->homeoffice = (strtolower($data[self::HOMEOFFICE]) == 'true');
|
||||
if (strtolower($data[self::HOMEOFFICE]) == 'true') {
|
||||
// check, ob homeoffice gemäß Bisverwendung
|
||||
$vonCSV = $this->datum->formatDatum($data[self::STARTDT], 'Y-m-d');
|
||||
$verwendung = new bisverwendung();
|
||||
$verwendung->getVerwendungDatum($data[self::USER], $vonCSV);
|
||||
|
||||
foreach ($verwendung->result as $v) {
|
||||
if ($v->homeoffice) {
|
||||
$this->zeit->homeoffice = true;
|
||||
} else {
|
||||
$this->addWarning($this->p->t("zeitaufzeichnung/homeofficeNichtErlaubt", [$vonCSV]));
|
||||
$this->zeit->homeoffice = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datestring
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkImporttage($start) {
|
||||
$tag = $this->datum->formatDatum($start, 'Y-m-d');
|
||||
|
||||
if (!in_array($tag, $this->importtage_array)) {
|
||||
$this->importtage_array[] = $tag;
|
||||
$this->zeit->deleteEntriesForUser($this->user, $tag);
|
||||
} else if ($this->ende_vorher < $this->zeit->start) {
|
||||
$this->savePause();
|
||||
}
|
||||
|
||||
$this->ende_vorher = $this->zeit->ende;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function savePause() {
|
||||
$pause = new zeitaufzeichnung();
|
||||
$pause->new = true;
|
||||
$pause->insertamum = date('Y-m-d H:i:s');
|
||||
$pause->updateamum = date('Y-m-d H:i:s');
|
||||
$pause->updatevon = $this->user;
|
||||
$pause->insertvon = $this->user;
|
||||
$pause->uid = $this->user;
|
||||
$pause->aktivitaet_kurzbz = 'Pause';
|
||||
$pause->start = $this->ende_vorher;
|
||||
$pause->ende = $this->zeit->start;
|
||||
$pause->beschreibung = '';
|
||||
$pause->homeoffice = $this->zeit->homeoffice;
|
||||
if(!$pause->save())
|
||||
{
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetimestring
|
||||
* @param string $end datetimestring
|
||||
* @return void
|
||||
*/
|
||||
protected function saveZeit($start, $end) {
|
||||
if ($start != $end) {
|
||||
if (!$this->zeit->save()) {
|
||||
$this->addError($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $this->zeit->errormsg . '(' . $this->zeit->start . ')', true);
|
||||
} else {
|
||||
$this->anzahl++;
|
||||
}
|
||||
} else {
|
||||
$this->anzahl++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function checkAndCleanup() {
|
||||
if ($this->anzahl > 0) {
|
||||
$this->addInfo($this->p->t("global/datenWurdenGespeichert") . ' (' . $this->anzahl . ')');
|
||||
foreach ($this->importtage_array as $ptag) {
|
||||
$this->zeit->cleanPausenForUser($this->user, $ptag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
require_once('zeitaufzeichnung_import.class.php');
|
||||
|
||||
/**
|
||||
* Description of zeitaufzeichnung_import_post
|
||||
*
|
||||
* @author chris
|
||||
*/
|
||||
class zeitaufzeichnung_import_post extends zeitaufzeichnung_import {
|
||||
|
||||
protected $datum;
|
||||
|
||||
protected $user;
|
||||
protected $edit;
|
||||
protected $data;
|
||||
|
||||
|
||||
/**
|
||||
* @param phrasen $p The Translator object
|
||||
* @param string $user The user ID
|
||||
* @param boolean $edit Edit or create a new one
|
||||
* @param array $data The array keys are:
|
||||
* - aktivitaet_kurzbz string
|
||||
* - beschreibung string
|
||||
* - bis datum
|
||||
* - bis_pause datum
|
||||
* - homeoffice boolean
|
||||
* - kunde_uid string ID
|
||||
* - oe_kurzbz_1 string
|
||||
* - oe_kurzbz_2 string
|
||||
* - projekt_kurzbz string
|
||||
* - projektphase_id string ID
|
||||
* - service_id string ID
|
||||
* - von datum
|
||||
* - von_pause datum
|
||||
* - zeitaufzeichnung_id string ID
|
||||
* @param string $filename
|
||||
*/
|
||||
public function __construct(phrasen $p, $user, $edit, $data) {
|
||||
parent::__construct($p);
|
||||
|
||||
$this->user = $user;
|
||||
$this->edit = $edit;
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function ErrorsToHTML() {
|
||||
$html = '';
|
||||
foreach ($this->errors as $msg) {
|
||||
$html .= '<span id="triggerPhasenReset" style="color:red;"><b>' . $msg . '</b></span><br>' . "\n";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function import() {
|
||||
try {
|
||||
$this->checkNew($this->data['zeitaufzeichnung_id']);
|
||||
$this->prepareZeitaufzeichnung($this->data['aktivitaet_kurzbz'], $this->data['von'], $this->data['bis'], $this->data['beschreibung'], $this->data['oe_kurzbz_1'], $this->data['oe_kurzbz_2'], $this->data['projekt_kurzbz'], $this->data['projektphase_id'], $this->data['homeoffice'], $this->data['service_id'], $this->data['kunde_uid']);
|
||||
$this->checkZeitsperren($this->user, $this->datum->formatDatum($this->data['von'], 'Y-m-d'));
|
||||
$this->checkProjectInterval($this->data['projekt_kurzbz'], $this->data['von'], $this->data['bis']);
|
||||
$this->checkLimitdatum($this->data['von']);
|
||||
$this->checkLimitdatum($this->data['bis']);
|
||||
$this->checkPhaseInterval($this->data['projektphase_id'], $this->data['von'], $this->data['bis']);
|
||||
$this->checkDienstreise($this->data['von'], $this->data['bis'], $this->data['aktivitaet_kurzbz']);
|
||||
$this->checkTagesgenau($this->data['bis']);
|
||||
$this->processPause($this->data['von_pause'], $this->data['bis_pause']);
|
||||
$this->saveZeit();
|
||||
} catch (Exception $ex) {
|
||||
$this->addError($ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $zeitaufzeichnung_id
|
||||
* @return void
|
||||
*/
|
||||
protected function checkNew($zeitaufzeichnung_id) {
|
||||
if($this->edit) {
|
||||
if(!$this->zeit->load($zeitaufzeichnung_id))
|
||||
die($this->p->t("global/fehlerBeimLadenDesDatensatzes"));
|
||||
|
||||
$this->zeit->new = false;
|
||||
} else {
|
||||
$this->zeit->new = true;
|
||||
$this->zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->insertvon = $this->user;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $aktivitaet_kurzbz
|
||||
* @param string $von datetime
|
||||
* @param string $bis datetime
|
||||
* @param string $beschreibung
|
||||
* @param string $oe_kurzbz_1
|
||||
* @param string $oe_kurzbz_2
|
||||
* @param string $projekt_kurzbz
|
||||
* @param string $projektphase_id
|
||||
* @param boolean $homeoffice
|
||||
* @param string $service_id
|
||||
* @param string $kunde_uid
|
||||
* @return void
|
||||
*/
|
||||
protected function prepareZeitaufzeichnung($aktivitaet_kurzbz, $von, $bis, $beschreibung, $oe_kurzbz_1, $oe_kurzbz_2, $projekt_kurzbz, $projektphase_id, $homeoffice, $service_id, $kunde_uid) {
|
||||
$this->zeit->uid = $this->user;
|
||||
$this->zeit->aktivitaet_kurzbz = $aktivitaet_kurzbz;
|
||||
$this->zeit->start = $this->datum->formatDatum($von, 'Y-m-d H:i:s');
|
||||
$this->zeit->ende = $this->datum->formatDatum($bis, 'Y-m-d H:i:s');
|
||||
$this->zeit->beschreibung = $beschreibung;
|
||||
$this->zeit->oe_kurzbz_1 = $oe_kurzbz_1;
|
||||
$this->zeit->oe_kurzbz_2 = $oe_kurzbz_2;
|
||||
$this->zeit->updateamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->updatevon = $this->user;
|
||||
$this->zeit->projekt_kurzbz = $projekt_kurzbz;
|
||||
$this->zeit->projektphase_id = $projektphase_id;
|
||||
$this->zeit->homeoffice = $homeoffice;
|
||||
$this->zeit->service_id = $service_id;
|
||||
$this->zeit->kunde_uid = $kunde_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetime
|
||||
* @param string $end datetime
|
||||
* @return void
|
||||
*/
|
||||
protected function processPause($start, $end) {
|
||||
if (isset($_POST['genPause'])) {
|
||||
$p_start = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
$p_end = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$this->checkPauseInArbeitszeit($p_start, $p_end);
|
||||
$this->checkPauseValid($p_start, $p_end);
|
||||
$this->savePause($start, $end);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start "Y-m-d H:i:s" formatted datetime
|
||||
* @param string $end "Y-m-d H:i:s" formatted datetime
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPauseInArbeitszeit($start, $end) {
|
||||
if ($this->zeit->start > $start || $this->zeit->ende < $end) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Pause außerhalb der Arbeitszeit');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start "Y-m-d H:i:s" formatted datetime
|
||||
* @param string $end "Y-m-d H:i:s" formatted datetime
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkPauseValid($start, $end) {
|
||||
if ($start > $end) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Fehlerhafte Pausenzeiten');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start datetime
|
||||
* @param string $end datetime
|
||||
* @return void
|
||||
*/
|
||||
protected function savePause($start, $end) {
|
||||
//Eintrag Arbeit bis zur Pause
|
||||
$ende = $this->zeit->ende;
|
||||
$this->zeit->ende = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
if (!$this->zeit->save()) {
|
||||
$this->addError($p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $this->zeit->errormsg);
|
||||
}
|
||||
//Eintrag für die Pause
|
||||
$pause = new zeitaufzeichnung();
|
||||
$pause->new = true;
|
||||
$pause->insertamum = date('Y-m-d H:i:s');
|
||||
$pause->updateamum = date('Y-m-d H:i:s');
|
||||
$pause->updatevon = $this->user;
|
||||
$pause->insertvon = $this->user;
|
||||
$pause->uid = $this->user;
|
||||
$pause->aktivitaet_kurzbz = 'Pause';
|
||||
$pause->homeoffice = $this->zeit->homeoffice;
|
||||
$pause->start = $this->datum->formatDatum($start, 'Y-m-d H:i:s');
|
||||
$pause->ende = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$pause->beschreibung = '';
|
||||
if (!$pause->save()) {
|
||||
$this->addError($p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $pause->errormsg);
|
||||
}
|
||||
// Eintrag Arbeit ab der Pause
|
||||
if ($this->zeit->new == false) {
|
||||
$this->zeit->new = true;
|
||||
$this->zeit->insertamum = date('Y-m-d H:i:s');
|
||||
$this->zeit->insertvon = $this->user;
|
||||
}
|
||||
|
||||
$this->zeit->start = $this->datum->formatDatum($end, 'Y-m-d H:i:s');
|
||||
$this->zeit->ende = $ende;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function saveZeit() {
|
||||
if (!$this->zeit->save()) {
|
||||
throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': ' . $this->zeit->errormsg);
|
||||
} else if (!$this->hasErrors()) {
|
||||
$this->addInfo($this->p->t("global/datenWurdenGespeichert"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,6 +23,9 @@ require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class zeitsperre extends basis_db
|
||||
{
|
||||
const NUR_BLOCKIERENDE_ZEITSPERREN = true;
|
||||
const BLOCKIERENDE_ZEITSPERREN = "'Krank','Urlaub','ZA','DienstV','PflegeU','DienstF','CovidSB','CovidKS'";
|
||||
|
||||
public $new; // boolean
|
||||
public $result = array(); // news Objekt
|
||||
|
||||
@@ -57,6 +60,11 @@ class zeitsperre extends basis_db
|
||||
$this->load($zeitsperre_id);
|
||||
}
|
||||
|
||||
public static function getBlockierendeZeitsperren()
|
||||
{
|
||||
return explode("','",trim(self::BLOCKIERENDE_ZEITSPERREN, '\''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt alle Zeitsperren eines Benutzers wo ende>=now() ist
|
||||
* @param $uid
|
||||
@@ -368,11 +376,13 @@ class zeitsperre extends basis_db
|
||||
*
|
||||
* @param $user
|
||||
* @param $datum
|
||||
* @param $stunde
|
||||
* @param $stunde optional, wird nur abgefragt, wenn != null
|
||||
* @param $nurblockierend boolean default false
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getSperreByDate($user, $datum, $stunde)
|
||||
public function getSperreByDate($user, $datum, $stunde=null, $nurblockierend=false)
|
||||
{
|
||||
$this->result = array();
|
||||
$qry = "
|
||||
SELECT
|
||||
*
|
||||
@@ -380,16 +390,23 @@ class zeitsperre extends basis_db
|
||||
campus.tbl_zeitsperre
|
||||
WHERE
|
||||
vondatum<=".$this->db_add_param($datum)."
|
||||
AND bisdatum>=".$this->db_add_param($datum)." AND
|
||||
((vondatum=".$this->db_add_param($datum)." AND vonstunde<=".$this->db_add_param($stunde).") OR vonstunde is null OR vondatum<>".$this->db_add_param($datum).") AND
|
||||
((bisdatum=".$this->db_add_param($datum)." AND bisstunde>=".$this->db_add_param($stunde).") OR bisstunde is null OR bisdatum<>".$this->db_add_param($datum).") AND
|
||||
mitarbeiter_uid=".$this->db_add_param($user);
|
||||
AND bisdatum>=".$this->db_add_param($datum);
|
||||
|
||||
if( $nurblockierend ) {
|
||||
$qry .= " AND zeitsperretyp_kurzbz in (" . self::BLOCKIERENDE_ZEITSPERREN . ")";
|
||||
}
|
||||
|
||||
if(!is_null($stunde))
|
||||
$qry.=" AND
|
||||
((vondatum=".$this->db_add_param($datum)." AND vonstunde<=".$this->db_add_param($stunde).") OR vonstunde is null OR vondatum<>".$this->db_add_param($datum).") AND
|
||||
((bisdatum=".$this->db_add_param($datum)." AND bisstunde>=".$this->db_add_param($stunde).") OR bisstunde is null OR bisdatum<>".$this->db_add_param($datum).")";
|
||||
|
||||
$qry .= "AND mitarbeiter_uid=".$this->db_add_param($user);
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
|
||||
$obj = new zeitsperre();
|
||||
|
||||
$obj->zeitsperre_id = $row->zeitsperre_id;
|
||||
@@ -482,7 +499,7 @@ class zeitsperre extends basis_db
|
||||
|
||||
$qry = "select datum::date, freigabevon, zeitsperretyp_kurzbz
|
||||
from (SELECT generate_series(vondatum::timestamp, bisdatum::timestamp, '1 day') as datum, freigabevon, mitarbeiter_uid, zeitsperretyp_kurzbz FROM campus.tbl_zeitsperre where vonstunde is null and bisstunde is null) a
|
||||
where a.mitarbeiter_uid = ".$this->db_add_param($uid)." and datum>(now() - interval '".$anz_tage." Days') and zeitsperretyp_kurzbz in ('Krank','Urlaub', 'ZA', 'DienstV','PflegeU', 'DienstF','CovidSB','CovidKS')";
|
||||
where a.mitarbeiter_uid = ".$this->db_add_param($uid)." and datum>(now() - interval '".$anz_tage." Days') and zeitsperretyp_kurzbz in (" . self::BLOCKIERENDE_ZEITSPERREN . ")";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,3 +65,5 @@ $this->phrasen['zeitaufzeichnung/pauseEinfuegen']='Pause automatisch einfügen';
|
||||
$this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Zeitraum zu kurz für automatische Pause';
|
||||
$this->phrasen['zeitaufzeichnung/supportAnfragen']='<p><hr>Supportanfragen unter<br><a href="mailto:zeiterfassung@technikum-wien.at">zeiterfassung@technikum-wien.at</a></p>';
|
||||
$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice für den Tag %s nicht erlaubt';
|
||||
$this->phrasen['zeitaufzeichnung/zeitsperreVorhanden']='Achtung: Für den Tag %s existiert eine ganztägige Zeitsperre vom Typ %s!';
|
||||
$this->phrasen['zeitaufzeichnung/zeitsperreVorhanden1']='Für diesen Tag ist bereits eine ganztägige Zeitsperre eingetragen!';
|
||||
|
||||
@@ -44,4 +44,7 @@ $this->phrasen['zeitsperre/legendeDurchwahl']='(123)...Durchwahl';
|
||||
$this->phrasen['zeitsperre/vertretungNichtKorrekt']='Die angegebene Vertretung kann nicht gefunden werden. Bitte prüfen Sie die Vertretung und versuchen Sie es erneut.';
|
||||
$this->phrasen['zeitsperre/vorSperrdatum']='Datum liegt vor dem Sperrdatum der Zeitliste';
|
||||
$this->phrasen['zeitsperre/abwesend']='Abwesend';
|
||||
$this->phrasen['zeitsperre/zeitaufzeichnungVorhanden']='Es existiert mindestens eine Zeitaufzeichnung im angegebenen Zeitraum.';
|
||||
$this->phrasen['zeitsperre/zeitsperreEingetragen']='Für den <strong>%s</strong> existiert bereits eine Zeitsperre vom Typ <strong>%s</strong>.
|
||||
Bitte löschen Sie diese bevor Sie eine neue für diesen Tag eintragen!';
|
||||
?>
|
||||
|
||||
@@ -65,3 +65,4 @@ $this->phrasen['zeitaufzeichnung/pauseEinfuegen']='insert break automatically';
|
||||
$this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Timeslot too short for automatic break.';
|
||||
$this->phrasen['zeitaufzeichnung/supportAnfragen']='<p><hr>Contact for support<br><a href="mailto:zeiterfassung@technikum-wien.at">zeiterfassung@technikum-wien.at</a></p>';
|
||||
$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice for day %s not allowed';
|
||||
$this->phrasen['zeitaufzeichnung/zeitsperreVorhanden']='<p>Please note: There is a timeout for the day %s: %s!</p>';
|
||||
|
||||
@@ -44,4 +44,7 @@ $this->phrasen['zeitsperre/legendeDurchwahl']='(123)...Extension';
|
||||
$this->phrasen['zeitsperre/vertretungNichtKorrekt']='The selected substitute is invalid. Please check the substitute an try again.';
|
||||
$this->phrasen['zeitsperre/vorSperrdatum']='Date is before last open timesheet date';
|
||||
$this->phrasen['zeitsperre/abwesend']='absent';
|
||||
$this->phrasen['zeitsperre/zeitaufzeichnungVorhanden']='It exists at least one time record in the specified period.';
|
||||
$this->phrasen['zeitsperre/zeitsperreEingetragen']='There already exists an unavailability on the <strong>%s</strong> of the type <strong>%s</strong>.
|
||||
Please delete the existing before creating a new one for this date!';
|
||||
?>
|
||||
|
||||
@@ -107,10 +107,12 @@ var IssuesDataset = {
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
if (FHC_AjaxClient.isError(data))
|
||||
{
|
||||
FHC_DialogLib.alertError(
|
||||
FHC_PhrasesLib.t("fehlermonitoring", "statusAendernFehler") + ": "
|
||||
+ FHC_AjaxClient.getError(data)
|
||||
);
|
||||
}
|
||||
else if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
FHC_FilterWidget.reloadDataset();
|
||||
|
||||
@@ -10,6 +10,7 @@ $(function(){
|
||||
|
||||
const genehmigung_panel = $('#approveAnrechnungDetail-genehmigung-panel');
|
||||
const begruendung_panel = $('#approveAnrechnungDetail-begruendung-panel');
|
||||
const hasReadOnlyAccess = $('#approveAnrechnungDetail-generell').data('readonly');
|
||||
|
||||
// Pruefen ob Promise unterstuetzt wird
|
||||
// Tabulator funktioniert nicht mit IE
|
||||
@@ -21,6 +22,11 @@ $(function(){
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasReadOnlyAccess)
|
||||
{
|
||||
approveAnrechnungDetail.disableEditElements();
|
||||
}
|
||||
|
||||
// Set status alert color
|
||||
approveAnrechnungDetail.setStatusAlertColor();
|
||||
|
||||
@@ -417,6 +423,34 @@ var approveAnrechnungDetail = {
|
||||
}
|
||||
);
|
||||
},
|
||||
disableEditElements: function()
|
||||
{
|
||||
// Disable:
|
||||
// ...button Empfehlung anfordern
|
||||
$('#approveAnrechnungDetail-request-recommendation')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Empfehlung zuruecknehmen
|
||||
$('#approveAnrechnungDetail-withdraw-request-recommedation')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Genehmigen
|
||||
$('#approveAnrechnungDetail-approve-anrechnung-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Ablehnen
|
||||
$('#approveAnrechnungDetail-reject-anrechnung-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Genehmigung zurücknehmen
|
||||
$('#approveAnrechnungDetail-withdraw-anrechnung-approvement')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ... form Empfehlungsnotiz
|
||||
$('#form-empfehlungNotiz :input')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
},
|
||||
copyIntoTextarea: function(elem){
|
||||
|
||||
// Find closest textarea
|
||||
|
||||
@@ -148,6 +148,8 @@ $(function(){
|
||||
|
||||
const genehmigung_panel = $('#approveAnrechnungUebersicht-genehmigung-panel');
|
||||
const begruendung_panel = $('#approveAnrechnungUebersicht-begruendung-panel');
|
||||
const hasReadOnlyAccess = $('#formApproveAnrechnungUebersicht').data('readonly');
|
||||
const hasCreateAnrechnungAccess = $('#formApproveAnrechnungUebersicht').data('createaccess');
|
||||
|
||||
// Pruefen ob Promise unterstuetzt wird
|
||||
// Tabulator funktioniert nicht mit IE
|
||||
@@ -165,6 +167,16 @@ $(function(){
|
||||
$('#tableWidgetTabulator').tabulator('redraw', true);
|
||||
});
|
||||
|
||||
if (hasReadOnlyAccess)
|
||||
{
|
||||
approveAnrechnung.disableEditElements();
|
||||
}
|
||||
|
||||
if (!hasCreateAnrechnungAccess)
|
||||
{
|
||||
approveAnrechnung.disableCreateAnrechnungButton();
|
||||
}
|
||||
|
||||
// Set status alert color
|
||||
approveAnrechnung.setStatusAlertColor();
|
||||
|
||||
@@ -517,6 +529,30 @@ var approveAnrechnung = {
|
||||
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning');
|
||||
}
|
||||
},
|
||||
disableEditElements: function()
|
||||
{
|
||||
// Disable:
|
||||
// ...button Empfehlung anfordern
|
||||
$('#approveAnrechnungUebersicht-request-recommendation')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Ablehnen
|
||||
$('#approveAnrechnungUebersicht-reject-anrechnungen-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Genehmigen
|
||||
$('#approveAnrechnungUebersicht-approve-anrechnungen-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
|
||||
},
|
||||
disableCreateAnrechnungButton: function()
|
||||
{
|
||||
// Disable button Antrag anlegen
|
||||
$('#approveAnrechnungUebersicht-create-anrechnung')
|
||||
.removeAttr('href')
|
||||
.css({'color': 'grey', 'pointer-events': 'none'}); // property disabled does not work for <a> link
|
||||
},
|
||||
copyIntoTextarea: function(elem){
|
||||
|
||||
// Find closest textarea
|
||||
|
||||
+59
-47
@@ -36,9 +36,9 @@ $projekt_kurzbz = isset($_GET['projekt_kurzbz'])?$_GET['projekt_kurzbz'] : '';
|
||||
if($projektphase_id != '')
|
||||
{
|
||||
$phase = new projektphase();
|
||||
$timestamp = time();
|
||||
$timestamp = time();
|
||||
$timestamp = date('Y-m-d');
|
||||
|
||||
|
||||
if(!$phase->load($projektphase_id))
|
||||
die('Fehler beim Laden der Phase');
|
||||
$ergebnis = $phase->getFortschritt($projektphase_id);
|
||||
@@ -47,7 +47,7 @@ if($projektphase_id != '')
|
||||
// hat phase schon begonnen
|
||||
if($timestamp <= $phase->start || $phase->start == '')
|
||||
$ergebnis = "-";
|
||||
|
||||
|
||||
$oRdf->obj[$i]->setAttribut('projektphase_id',$phase->projektphase_id);
|
||||
$oRdf->obj[$i]->setAttribut('projekt_kurzbz',$phase->projekt_kurzbz);
|
||||
$oRdf->obj[$i]->setAttribut('projektphase_fk',$phase->projektphase_fk);
|
||||
@@ -69,49 +69,50 @@ if($projektphase_id != '')
|
||||
$oRdf->addSequence($phase->projektphase_id, $phase->projektphase_fk);
|
||||
else
|
||||
$oRdf->addSequence($phase->projektphase_id);
|
||||
|
||||
}else if($projekt_kurzbz != '')
|
||||
|
||||
}
|
||||
else if($projekt_kurzbz != '')
|
||||
{
|
||||
$projektphase = new projektphase();
|
||||
|
||||
|
||||
// gesetzt wenn abfrage für fk ansonsten lade alle phasen zur projekt_kurzbz
|
||||
if(isset($_GET['phase_id']))
|
||||
$projektphase->getProjektphasenForFk($projekt_kurzbz, $_GET['phase_id']);
|
||||
else
|
||||
$projektphase->getProjektphasen($projekt_kurzbz);
|
||||
|
||||
else
|
||||
$projektphase->getProjektphasen($projekt_kurzbz);
|
||||
|
||||
if(isset($_GET['optional']))
|
||||
{
|
||||
$idx=$oRdf->newObjekt('opt');
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('projektphase_id','');
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz', '');
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('projektphase_id','');
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz', '');
|
||||
$oRdf->obj[$idx]->setAttribut('projektphase_fk', '');
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung','< Auswahl >');
|
||||
$oRdf->obj[$idx]->setAttribut('beschreibung', '');
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung','< Auswahl >');
|
||||
$oRdf->obj[$idx]->setAttribut('beschreibung', '');
|
||||
$oRdf->obj[$idx]->setAttribut('start', '');
|
||||
$oRdf->obj[$idx]->setAttribut('ende', '');
|
||||
$oRdf->obj[$idx]->setAttribut('budget', '');
|
||||
$oRdf->obj[$idx]->setAttribut('personentage', '');
|
||||
$oRdf->obj[$idx]->setAttribut('budget', '');
|
||||
$oRdf->obj[$idx]->setAttribut('personentage', '');
|
||||
$oRdf->obj[$idx]->setAttribut('farbe', '');
|
||||
$oRdf->obj[$idx]->setAttribut('typ', '');
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung','');
|
||||
|
||||
$oRdf->addSequence('opt');
|
||||
}
|
||||
|
||||
|
||||
foreach($projektphase->result as $phase)
|
||||
{
|
||||
$idx=$oRdf->newObjekt($phase->projektphase_id);
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('projektphase_id',$phase->projektphase_id);
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz', $phase->projekt_kurzbz);
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('projektphase_id',$phase->projektphase_id);
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz', $phase->projekt_kurzbz);
|
||||
$oRdf->obj[$idx]->setAttribut('projektphase_fk', $phase->projektphase_fk);
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung',$phase->bezeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('beschreibung', $phase->beschreibung);
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung',$phase->bezeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('beschreibung', $phase->beschreibung);
|
||||
$oRdf->obj[$idx]->setAttribut('start', $phase->start);
|
||||
$oRdf->obj[$idx]->setAttribut('ende', $phase->ende);
|
||||
$oRdf->obj[$idx]->setAttribut('budget', $phase->budget);
|
||||
$oRdf->obj[$idx]->setAttribut('budget', $phase->budget);
|
||||
$oRdf->obj[$idx]->setAttribut('personentage', $phase->personentage);
|
||||
$oRdf->obj[$idx]->setAttribut('farbe', $phase->farbe);
|
||||
$oRdf->obj[$idx]->setAttribut('typ', $phase->typ);
|
||||
@@ -119,25 +120,36 @@ if($projektphase_id != '')
|
||||
|
||||
$oRdf->addSequence($phase->projektphase_id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$projekt_obj = new projekt();
|
||||
|
||||
if(!isset($_REQUEST['filter']))
|
||||
$projekt_obj->getProjekte();
|
||||
else
|
||||
{
|
||||
if($_REQUEST['filter']=='aktuell')
|
||||
$projekt_obj->getProjekteAktuell();
|
||||
else if($_REQUEST['filter']=='kommende')
|
||||
$projekt_obj->getProjekteAktuell(true);
|
||||
}
|
||||
|
||||
|
||||
if(isset($_REQUEST['filterprj']))
|
||||
{
|
||||
$projekt_obj2 = new projekt();
|
||||
if($projekt_obj2->load($_REQUEST['filterprj']))
|
||||
{
|
||||
$projekt_obj->result[] = $projekt_obj2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!isset($_REQUEST['filter']))
|
||||
$projekt_obj->getProjekte();
|
||||
else
|
||||
{
|
||||
if($_REQUEST['filter']=='aktuell')
|
||||
$projekt_obj->getProjekteAktuell();
|
||||
else if($_REQUEST['filter']=='kommende')
|
||||
$projekt_obj->getProjekteAktuell(true);
|
||||
}
|
||||
}
|
||||
|
||||
$projektphase_obj = new projektphase();
|
||||
$sequenzProjektphase = array();
|
||||
|
||||
|
||||
$descr='';
|
||||
$sequenz='';
|
||||
$lastOE=null;
|
||||
@@ -152,7 +164,7 @@ else
|
||||
if ($lastOE!=$currentOE || $i==0)
|
||||
{
|
||||
$idx=$oRdf->newObjekt($projekt->oe_kurzbz);
|
||||
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung',$projekt->oe_kurzbz);
|
||||
$oRdf->obj[$idx]->setAttribut('oe_kurzbz',$projekt->oe_kurzbz);
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz','');
|
||||
@@ -169,12 +181,12 @@ else
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung','');
|
||||
|
||||
$oRdf->addSequence($projekt->oe_kurzbz);
|
||||
|
||||
|
||||
$lastOE=$currentOE;
|
||||
}
|
||||
|
||||
|
||||
$idx=$oRdf->newObjekt($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz);
|
||||
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung',$projekt->titel);
|
||||
$oRdf->obj[$idx]->setAttribut('oe_kurzbz',$projekt->oe_kurzbz);
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz',$projekt->projekt_kurzbz);
|
||||
@@ -190,26 +202,26 @@ else
|
||||
$oRdf->obj[$idx]->setAttribut('typ','projekt');
|
||||
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$projekt->zeitaufzeichnung);
|
||||
|
||||
|
||||
|
||||
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz, $projekt->oe_kurzbz);
|
||||
|
||||
|
||||
$projektphase_obj->getProjektphasen($projekt->projekt_kurzbz);
|
||||
$tmpStr='';
|
||||
for ($j=0;$j<count($projektphase_obj->result);$j++)
|
||||
{
|
||||
$projektphase=$projektphase_obj->result[$j];
|
||||
|
||||
$timestamp = time();
|
||||
|
||||
$timestamp = time();
|
||||
$timestamp = date('Y-m-d');
|
||||
|
||||
$ergebnis = $projektphase->getFortschritt($projektphase->projektphase_id);
|
||||
|
||||
|
||||
// hat phase schon begonnen
|
||||
if($timestamp <= $projektphase->start || $projektphase->start == '')
|
||||
$ergebnis = "-";
|
||||
|
||||
|
||||
$idx=$oRdf->newObjekt($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_id);
|
||||
|
||||
|
||||
$oRdf->obj[$idx]->setAttribut('bezeichnung',$projektphase->bezeichnung);
|
||||
$oRdf->obj[$idx]->setAttribut('oe_kurzbz',$projekt->oe_kurzbz);
|
||||
$oRdf->obj[$idx]->setAttribut('projekt_kurzbz',$projektphase->projekt_kurzbz);
|
||||
|
||||
@@ -188,7 +188,7 @@ function draw_ressource($ressource)
|
||||
else
|
||||
die('Fehler beim Laden der Studenten-daten');
|
||||
|
||||
$student.="\n\t\t\t<RDF:li resource=\"".$rdf_url.$ressource->ressource_id."\" />";
|
||||
$student.="\n\t\t\t<RDF:li resource=\"".$rdf_url.$ressource->ressource_id.'/'.$ressource->projekt_ressource_id."\" />";
|
||||
$typ ='Student';
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ function draw_ressource($ressource)
|
||||
else
|
||||
die('Fehler beim Laden der Betriebsmittel-daten');
|
||||
|
||||
$betriebsmittel.="\n\t\t\t<RDF:li resource=\"".$rdf_url.$ressource->ressource_id."\" />";
|
||||
$betriebsmittel.="\n\t\t\t<RDF:li resource=\"".$rdf_url.$ressource->ressource_id.'/'.$ressource->projekt_ressource_id."\" />";
|
||||
$typ = 'Betriebsmittel';
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ function draw_ressource($ressource)
|
||||
else
|
||||
die('Fehler beim Laden der Firmen-daten');
|
||||
|
||||
$firma.="\n\t\t\t<RDF:li resource=\"".$rdf_url.$ressource->ressource_id."\" />";
|
||||
$firma.="\n\t\t\t<RDF:li resource=\"".$rdf_url.$ressource->ressource_id.'/'.$ressource->projekt_ressource_id."\" />";
|
||||
$typ = 'Firma';
|
||||
}
|
||||
|
||||
@@ -249,4 +249,4 @@ function draw_ressource($ressource)
|
||||
</RDF:Description>
|
||||
';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -158,7 +158,7 @@ foreach($uid_arr as $uid)
|
||||
echo "\t\t<ects_pro_semester_studienplan><![CDATA[".($studienplan->regelstudiendauer!=0?$studienplan->ects_stpl/$studienplan->regelstudiendauer:0)."]]></ects_pro_semester_studienplan>";
|
||||
|
||||
echo "\t\t<aktuellesJahr><![CDATA[".date('Y')."]]></aktuellesJahr>";
|
||||
$status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,null,null))?$prestudent->status_kurzbz:'';
|
||||
$status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,$studiensemester,null))?$prestudent->status_kurzbz:'';
|
||||
$abbrecher = false;
|
||||
$absolvent = false;
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 841 B |
@@ -83,6 +83,16 @@ echo '<div>';
|
||||
require_once('filtersupdate.php');
|
||||
echo '</div>';
|
||||
|
||||
// ******** fehlerupdate ************/
|
||||
echo '<H2>Issues time!</H2>';
|
||||
|
||||
echo '<div>';
|
||||
echo 'fehlerupdate.php wird aufgerufen...';
|
||||
echo '</div>';
|
||||
echo '<div>';
|
||||
require_once('fehlerupdate.php');
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// ******** Berechtigungen Prüfen ************/
|
||||
echo '<h2>Berechtigungen pruefen</h2>';
|
||||
|
||||
+250
-1
@@ -3458,6 +3458,231 @@ if(!@$db->db_query("SELECT insertamum FROM public.tbl_vorlage LIMIT 1"))
|
||||
echo '<br>Neue Spalten insertamum,insertvon,updateamum und updatevon in public.tbl_vorlage hinzugefügt';
|
||||
}
|
||||
|
||||
// Spalte archivierbar und signierbar in public.tbl_vorlage auf TRUE gesetzt bei Vorlage: Zertifikat
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'Zertifikat' AND archivierbar AND signierbar;"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_vorlage SET archivierbar = TRUE, signierbar = TRUE WHERE vorlage_kurzbz = 'Zertifikat';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_vorlage: Spalten archivierbar und signierbar auf TRUE gesetzt bei Vorlage: Zertifikat<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Spalte archivierbar und signierbar in public.tbl_vorlage auf TRUE gesetzt bei Vorlage: LVZeugnis
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'LVZeugnis' AND archivierbar AND signierbar;"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_vorlage SET archivierbar = TRUE, signierbar = TRUE WHERE vorlage_kurzbz = 'LVZeugnis';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_vorlage: Spalten archivierbar und signierbar auf TRUE gesetzt bei Vorlage: LVZeugnis<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Spalte archivierbar und signierbar in public.tbl_vorlage auf TRUE gesetzt bei Vorlage: LVZeugnisEng
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'LVZeugnisEng' AND archivierbar AND signierbar;"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_vorlage SET archivierbar = TRUE, signierbar = TRUE WHERE vorlage_kurzbz = 'LVZeugnisEng';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_vorlage: Spalten archivierbar und signierbar auf TRUE gesetzt bei Vorlage: LVZeugnisEng<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Spalte stud_selfservice in public.tbl_vorlage auf TRUE gesetzt bei Vorlage: Zertifikat
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'Zertifikat' AND stud_selfservice;"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_vorlage SET stud_selfservice = TRUE WHERE vorlage_kurzbz = 'Zertifikat';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_vorlage: Spalte stud_selfservice auf TRUE gesetzt bei Vorlage: Zertifikat<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Spalte stud_selfservice in public.tbl_vorlage auf TRUE gesetzt bei Vorlage: LVZeugnis
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'LVZeugnis' AND stud_selfservice;"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_vorlage SET stud_selfservice = TRUE WHERE vorlage_kurzbz = 'LVZeugnis';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_vorlage: Spalte stud_selfservice auf TRUE gesetzt bei Vorlage: LVZeugnis<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Spalte stud_selfservice in public.tbl_vorlage auf TRUE gesetzt bei Vorlage: LVZeugnisEng
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'LVZeugnisEng' AND stud_selfservice;"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_vorlage SET stud_selfservice = TRUE WHERE vorlage_kurzbz = 'LVZeugnisEng';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_vorlage: Spalte stud_selfservice auf TRUE gesetzt bei Vorlage: LVZeugnisEng<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// dokument_kurzbz in public.tbl_dokument auf 32 Zeichen verlängert
|
||||
if($result = @$db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_dokument' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = " ALTER TABLE public.tbl_dokument ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokument '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in public.tbl_dokument auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// dokument_kurzbz in public.tbl_akte auf 32 Zeichen verlängert
|
||||
if($result = @$db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_akte' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = " ALTER TABLE public.tbl_akte ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokument '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in public.tbl_akte auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// dokument_kurzbz in campus.tbl_dms auf 32 Zeichen verlängert
|
||||
if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='campus' AND TABLE_NAME='tbl_dms' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "ALTER TABLE campus.tbl_dms ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_dms '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in campus.tbl_dms auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// dokument_kurzbz in public.tbl_dokumentprestudent auf 32 Zeichen verlängert
|
||||
if($result = @$db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_dokumentprestudent' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = " ALTER TABLE public.tbl_dokumentprestudent ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokumentprestudent '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in public.tbl_dokumentprestudent auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// dokument_kurzbz in public.tbl_dokumentstudiengang auf 32 Zeichen verlängert
|
||||
if($result = @$db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_dokumentstudiengang' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = " ALTER TABLE public.tbl_dokumentstudiengang ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokumentstudiengang '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in public.tbl_dokumentstudiengang auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// dokument_kurzbz in public.tbl_vorlage auf 32 Zeichen verlängert
|
||||
if($result = @$db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_vorlage' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = " ALTER TABLE public.tbl_vorlage ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in public.tbl_vorlage auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// dokument_kurzbz in public.tbl_vorlagedokument auf 32 Zeichen verlängert
|
||||
if($result = @$db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_vorlagedokument' AND COLUMN_NAME = 'dokument_kurzbz' AND character_maximum_length = 32"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = " ALTER TABLE public.tbl_vorlagedokument ALTER COLUMN dokument_kurzbz TYPE varchar(32)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_vorlage '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte dokument_kurzbz in public.tbl_vorlagedokument auf varchar(32) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Neues Dokument hinzugefuegt LVZeugnisEng
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_dokument WHERE dokument_kurzbz = 'LVZeugnisEng'"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_dokument (dokument_kurzbz, bezeichnung, bezeichnung_mehrsprachig) VALUES ('LVZeugnisEng', 'Lehrveranstaltungszeugnis Englisch', '{\"Lehrveranstaltungszeugnis\",\"Course Certificate\"}')";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokument '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_dokument: LVZeugnisEng hinzugefügt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Neues Dokument hinzugefuegt LVZeugnis
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_dokument WHERE dokument_kurzbz = 'LVZeugnis'"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_dokument (dokument_kurzbz, bezeichnung, bezeichnung_mehrsprachig) VALUES ('LVZeugnis', 'Lehrveranstaltungszeugnis', '{\"Lehrveranstaltungszeugnis\",\"Course Certificate\"}')";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokument '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_dokument: LVZeugnis hinzugefügt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Neues Dokument hinzugefuegt Zertifikat
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_dokument WHERE dokument_kurzbz = 'Zertifikat'"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_dokument (dokument_kurzbz, bezeichnung, bezeichnung_mehrsprachig) VALUES ('Zertifikat', 'Zertifikat', '{\"Zertifikat\",\"Certificate\"}')";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_dokument '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_dokument: Zertifikat hinzugefügt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// insert und update fuer public.tbl_vorlagestudiengang
|
||||
if(!@$db->db_query("SELECT insertamum FROM public.tbl_vorlagestudiengang LIMIT 1"))
|
||||
{
|
||||
@@ -5876,6 +6101,30 @@ if (!$result = @$db->db_query("SELECT zeitwunsch_id FROM campus.tbl_zeitwunsch L
|
||||
echo '<br>campus.tbl_zeitwunsch: Neue Spalte zeitwunsch_id hinzugefuegt.';
|
||||
}
|
||||
|
||||
// Change size of wawi.tbl_kostenstelle.kostenstelle_nr from character varying(4) to character varying(6)
|
||||
if ($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='wawi' AND TABLE_NAME='tbl_kostenstelle' AND COLUMN_NAME = 'kostenstelle_nr' AND character_maximum_length < 6"))
|
||||
{
|
||||
if ($db->db_num_rows($result) > 0)
|
||||
{
|
||||
$qry = "ALTER TABLE wawi.tbl_kostenstelle ALTER COLUMN kostenstelle_nr TYPE varchar(6);";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>wawi.tbl_kostenstelle '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte kostenstelle_nr in wawi.tbl_kostenstelle von varchar(4) auf varchar(6) geändert<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Add column parameterFuerBehebung to system.tbl_issue
|
||||
if(!$result = @$db->db_query("SELECT behebung_parameter FROM system.tbl_issue LIMIT 1"))
|
||||
{
|
||||
$qry = 'ALTER TABLE system.tbl_issue ADD COLUMN behebung_parameter JSONB;';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_issue: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Added column behebung_parameter to table system.tbl_issue';
|
||||
}
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
@@ -6173,7 +6422,7 @@ $tabellen=array(
|
||||
"system.tbl_fehler" => array("fehlercode","fehler_kurzbz","fehlercode_extern","fehlertext","fehlertyp_kurzbz","app"),
|
||||
"system.tbl_fehlertyp" => array("fehlertyp_kurzbz","bezeichnung_mehrsprachig"),
|
||||
"system.tbl_fehler_zustaendigkeiten" => array("fehlerzustaendigkeiten_id","fehlercode","person_id","oe_kurzbz","funktion_kurzbz"),
|
||||
"system.tbl_issue" => array("issue_id","fehlercode","fehlercode_extern","inhalt","inhalt_extern","person_id","oe_kurzbz","datum","verarbeitetvon","verarbeitetamum","status_kurzbz","insertvon","insertamum","updatevon","updateamum"),
|
||||
"system.tbl_issue" => array("issue_id","fehlercode","fehlercode_extern","inhalt","inhalt_extern","person_id","oe_kurzbz","datum","verarbeitetvon","verarbeitetamum","status_kurzbz","behebung_parameter","insertvon","insertamum","updatevon","updateamum"),
|
||||
"system.tbl_issue_status" => array("status_kurzbz","bezeichnung_mehrsprachig"),
|
||||
"system.tbl_log" => array("log_id","person_id","zeitpunkt","app","oe_kurzbz","logtype_kurzbz","logdata","insertvon","taetigkeit_kurzbz"),
|
||||
"system.tbl_logtype" => array("logtype_kurzbz", "data_schema"),
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2013 FH Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// Array of fehler to be added in the database
|
||||
$fehlerArr = array(
|
||||
array(
|
||||
'fehlercode' => 'CORE_ZGV_0001',
|
||||
'fehler_kurzbz' => 'zgvDatumInZukunft',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'ZGV Datum in Zukunft',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_ZGV_0002',
|
||||
'fehler_kurzbz' => 'zgvDatumVorGeburtsdatum',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'ZGV Datum vor Geburtsdatum',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_ZGV_0003',
|
||||
'fehler_kurzbz' => 'zgvMasterDatumInZukunft',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'ZGV Masterdatum in Zukunft',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_ZGV_0004',
|
||||
'fehler_kurzbz' => 'zgvMasterDatumVorZgvdatum',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'ZGV Masterdatum vor Zgvdatum',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_ZGV_0005',
|
||||
'fehler_kurzbz' => 'zgvMasterDatumVorGeburtsdatum',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'ZGV Masterdatum vor Geburtsdatum',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_INOUT_0001',
|
||||
'fehler_kurzbz' => 'keinAufenthaltszweckPlausi',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Kein Aufenthaltszweck gefunden',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_INOUT_0002',
|
||||
'fehler_kurzbz' => 'zuVieleZweckeIncomingPlausi',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Es sind %s Aufenthaltszwecke eingetragen (max. 1 Zweck für Incomings)',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_INOUT_0003',
|
||||
'fehler_kurzbz' => 'falscherIncomingZweckPlausi',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Aufenthaltszweckcode ist %s (für Incomings ist nur Zweck 1, 2, 3 erlaubt)',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_INOUT_0004',
|
||||
'fehler_kurzbz' => 'outgoingAufenthaltfoerderungfehltPlausi',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Keine Aufenthaltsfoerderung angegeben (bei Outgoings >= 29 Tage Monat im Ausland muss mind. 1 gemeldet werden)',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_INOUT_0005',
|
||||
'fehler_kurzbz' => 'outgoingAngerechneteEctsFehlenPlausi',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Angerechnete ECTS fehlen (Meldepflicht bei Outgoings >= 29 Tage Monat im Ausland)',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
),
|
||||
array(
|
||||
'fehlercode' => 'CORE_INOUT_0006',
|
||||
'fehler_kurzbz' => 'outgoingErworbeneEctsFehlenPlausi',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Erworbene ECTS fehlen (Meldepflicht bei Outgoings >= 29 Tage Monat im Ausland)',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core'
|
||||
)
|
||||
);
|
||||
|
||||
// Loop through the filters array
|
||||
for ($fehlerCounter = 0; $fehlerCounter < count($fehlerArr); $fehlerCounter++)
|
||||
{
|
||||
$fehler = $fehlerArr[$fehlerCounter]; // single fehler definition
|
||||
|
||||
// add optional fields
|
||||
$optional_fields = array('fehlercode_extern');
|
||||
|
||||
foreach ($optional_fields as $optional_field)
|
||||
{
|
||||
if (!array_key_exists($optional_field, $fehler))
|
||||
$fehler[$optional_field] = null;
|
||||
}
|
||||
|
||||
// If it's an array and contains the required fields
|
||||
if (is_array($fehler)
|
||||
&& isset($fehler['fehlercode']) && isset($fehler['fehler_kurzbz'])
|
||||
&& isset($fehler['fehlertext']) && isset($fehler['fehlertyp_kurzbz'])
|
||||
&& isset($fehler['app']))
|
||||
{
|
||||
$selectFehlerQuery = 'SELECT 1
|
||||
FROM system.tbl_fehler
|
||||
WHERE fehlercode = '.$db->db_add_param($fehler['fehlercode']);
|
||||
|
||||
// If no error occurred while loading a fehler from the DB
|
||||
if ($dbFehlerDefinition = @$db->db_query($selectFehlerQuery))
|
||||
{
|
||||
// If NO filters were loaded: insert
|
||||
if ($db->db_num_rows($dbFehlerDefinition) == 0)
|
||||
{
|
||||
$insertFehlerQuery = 'INSERT INTO system.tbl_fehler (
|
||||
fehlercode,
|
||||
fehler_kurzbz,
|
||||
fehlercode_extern,
|
||||
fehlertext,
|
||||
fehlertyp_kurzbz,
|
||||
app
|
||||
) VALUES (
|
||||
'.$db->db_add_param($fehler['fehlercode']).',
|
||||
'.$db->db_add_param($fehler['fehler_kurzbz']).',
|
||||
'.$db->db_add_param($fehler['fehlercode_extern']).',
|
||||
'.$db->db_add_param($fehler['fehlertext']).',
|
||||
'.$db->db_add_param($fehler['fehlertyp_kurzbz']).',
|
||||
'.$db->db_add_param($fehler['app']).'
|
||||
)';
|
||||
|
||||
if (!@$db->db_query($insertFehlerQuery)) // checks query execution
|
||||
{
|
||||
echo '<strong>An error occurred while inserting fehler: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Fehler added: '.$fehler['fehlercode'].' - '.$fehler['fehler_kurzbz'].'<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else // otherwise if errors occurred
|
||||
{
|
||||
echo '<strong>An error occurred while inserting fehler: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,12 +35,12 @@ $filters = array(
|
||||
{"name": "ZGVNation"},
|
||||
{"name": "ZGVMNation"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "Studiensemester"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "LastActionType"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "InfoCenterMitarbeiter"},
|
||||
{"name": "LockUser"}
|
||||
{"name": "LockUser"},
|
||||
{"name": "OnholdDate"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
@@ -311,6 +311,7 @@ $filters = array(
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "AktenId"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "LastActionType"},
|
||||
@@ -902,9 +903,9 @@ $filters = array(
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "Fehlerstatus",
|
||||
"name": "Statuscode",
|
||||
"operation": "ncontains",
|
||||
"condition": "behoben"
|
||||
"condition": "resolved"
|
||||
},
|
||||
{
|
||||
"name": "Hauptzuständig",
|
||||
@@ -963,7 +964,8 @@ $filters = array(
|
||||
{"name": "Nachname"},
|
||||
{"name": "PersonId"},
|
||||
{"name": "Fehlerstatus"},
|
||||
{"name": "Verarbeitet von"}
|
||||
{"name": "Verarbeitet von"},
|
||||
{"name": "Verarbeitet am"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
@@ -973,14 +975,59 @@ $filters = array(
|
||||
"option": "days"
|
||||
},
|
||||
{
|
||||
"name": "Fehlerstatus",
|
||||
"name": "Statuscode",
|
||||
"operation": "contains",
|
||||
"condition": "behoben"
|
||||
"condition": "resolved"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'dvuh',
|
||||
'dataset_name' => 'storno',
|
||||
'filter_kurzbz' => 'DVUHStorno',
|
||||
'description' => '{DVUH Storno Übersicht}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "DVUHStorno",
|
||||
"columns": [
|
||||
{"name": "vorname"},
|
||||
{"name": "nachname"},
|
||||
{"name": "matrikelnummer"},
|
||||
{"name": "studiengang"},
|
||||
{"name": "studiensemester"}
|
||||
],
|
||||
"filters": []
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'dvuh',
|
||||
'dataset_name' => 'overview',
|
||||
'filter_kurzbz' => 'BPKWartungDVUH',
|
||||
'description' => '{bPK Uebersicht}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Fehlende bPK",
|
||||
"columns": [
|
||||
{"name": "person_id"},
|
||||
{"name": "vorname"},
|
||||
{"name": "nachname"},
|
||||
{"name": "svnr"},
|
||||
{"name": "ersatzkennzeichen"},
|
||||
{"name": "mitarbeiter"}
|
||||
],
|
||||
"filters": []
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -896,13 +896,13 @@ $phrases = array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'BewerberIn bereits vorhanden',
|
||||
'text' => 'BewerberIn möglicherweise vorhanden',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Applicant already available',
|
||||
'text' => 'Applicant maybe available',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -2725,6 +2725,26 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'lehre',
|
||||
'phrase' => 'studiengangskennzahlLehre',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Studiengangskennzahl',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Study program number',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
//********************** INFOCENTER/infocenter
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
@@ -13714,7 +13734,27 @@ array(
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'nurLeseberechtigung',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Nur Leseberechtigung",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Read-Only Access",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -675,12 +675,12 @@ if(isset($_POST['save']))
|
||||
$nachname_clean = str_replace(' ','_', $nachname_clean);
|
||||
$vorname_clean = str_replace(' ','_', $vorname_clean);
|
||||
|
||||
if (!preg_match('/^[a-z0-9-_]{3,32}$/i', $vorname_clean))
|
||||
if (!preg_match('/^[a-z0-9-_]{2,32}$/i', $vorname_clean))
|
||||
{
|
||||
$error = true;
|
||||
$errormsg = 'Im Vornamen dürfen keine Trennzeichen außer - enthalten sein!';
|
||||
}
|
||||
if (!preg_match('/^[a-z0-9-_]{4,32}$/i', $nachname_clean))
|
||||
if (!preg_match('/^[a-z0-9-_]{2,32}$/i', $nachname_clean))
|
||||
{
|
||||
$error = true;
|
||||
$errormsg = 'Im Nachnamen dürfen keine Trennzeichen außer - enthalten sein!';
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
|
||||
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/basis_db.class.php');
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
include('../../include/functions.inc.php');
|
||||
|
||||
foreach ($_REQUEST as $key => $value)
|
||||
{
|
||||
$key=$value;
|
||||
}
|
||||
|
||||
$type=(isset($_REQUEST['type'])?$_REQUEST['type']:'');
|
||||
|
||||
if ($type=='new')
|
||||
{
|
||||
$sql_query="INSERT INTO lektorzuteilung (lektor_id, lehrfach_id, stg_id, semester) VALUES ($lektorid,$lehrfachid,$stgid,$semester)";
|
||||
//echo $sql_query;
|
||||
if(!($result=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
|
||||
if ($type=='del')
|
||||
{
|
||||
$sql_query="DELETE FROM lektorzuteilung WHERE id=$id";
|
||||
//echo $sql_query;
|
||||
if(!($result=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
|
||||
// Daten für Lektorenauswahl
|
||||
$sql_query="SELECT id, nachname, vornamen, uid FROM lektor ORDER BY upper(nachname), vornamen, uid";
|
||||
if(!($result_lektor=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
|
||||
// Daten für Lehrfachauswahl
|
||||
$sql_query="SELECT id, kurzbz, bezeichnung FROM lehrfach ORDER BY kurzbz";
|
||||
if(!($result_lehrfach=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
|
||||
// Daten für Studiengang
|
||||
$sql_query="SELECT id, kurzbz, bezeichnung FROM studiengang ORDER BY kurzbz";
|
||||
if(!($result_stg=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
// Daten für die Zuteilungen
|
||||
if (!isset($order))
|
||||
$order='upper(nachname), vornamen, uid';
|
||||
$sql_query="SELECT lektorzuteilung.id, nachname, nachname, vornamen, uid, lehrfach.kurzbz AS lfkurzbz, studiengang.kurzbz AS stgkurzbz, semester";
|
||||
$sql_query.=" FROM lektorzuteilung, lektor, lehrfach, studiengang WHERE lektorzuteilung.lektor_id=lektor.id";
|
||||
$sql_query.=" AND lektorzuteilung.lehrfach_id=lehrfach.id AND lektorzuteilung.stg_id=studiengang.id ORDER BY $order";
|
||||
//echo $sql_query;
|
||||
if(!($erg=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
$num_rows=$db->db_num_rows($erg);
|
||||
|
||||
|
||||
|
||||
$cfgBorder=1;
|
||||
$cfgThBgcolor='#CCCCCC';
|
||||
|
||||
$cfgBgcolorOne='#F4F4F4';
|
||||
$cfgBgcolorTwo='#FEFFE6';
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Zuteilung der Lektoren</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!--<link rel="stylesheet" href="../../include/styles.css" type="text/css"> -->
|
||||
<LINK rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body class="background_main">
|
||||
<h2>Lektoren - Lehrfach Zuteilung</h2>
|
||||
Anzahl:
|
||||
<?php echo $num_rows; ?>
|
||||
<br>
|
||||
<br>
|
||||
<table border="<?php echo $cfgBorder;?>">
|
||||
<tr bgcolor="<?php echo $cfgThBgcolor; ?>">
|
||||
<th></th><th>Nachname</th><th>Vornamen</th>
|
||||
<th>uid</th>
|
||||
<th>Lehrfach</th>
|
||||
<th>Studiengang</th>
|
||||
<th>Semester</th></tr>
|
||||
<?php
|
||||
for ($i=0; $i<$num_rows; $i++)
|
||||
{
|
||||
$bgcolor = $cfgBgcolorOne;
|
||||
$i % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
|
||||
|
||||
$row=$db->db_fetch_object ($erg, $i);
|
||||
|
||||
?>
|
||||
<tr bgcolor=<?php echo $bgcolor; ?>>
|
||||
<td><a href="lektorzuteilung_edit.php?id=<?php echo $row->id.'&type=del'; ?>" class="linkblue">Delete</a></td>
|
||||
<td><?php echo $row->nachname; ?></td>
|
||||
<td><?php echo $row->vornamen; ?></td>
|
||||
<td><A href="mailto:<?php echo $row->uid; ?>@technikum-wien.at" class="linkgreen"><?php echo $row->uid; ?></A></td>
|
||||
<td><?php echo $row->lfkurzbz; ?></td>
|
||||
<td><?php echo $row->stgkurzbz; ?></td>
|
||||
<td><?php echo $row->semester; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<FORM name="newpers" method="post" action="lektorzuteilung_edit.php">
|
||||
<INPUT type="hidden" name="type" value="new">
|
||||
Lektor:
|
||||
<SELECT name="lektorid">
|
||||
<?php
|
||||
// Auswahl des Lektors
|
||||
$num_rows=$db->db_num_rows($result_lektor);
|
||||
for ($i=0;$i<$num_rows;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object ($result_lektor, $i);
|
||||
echo "<option value=\"$row->id\">$row->nachname $row->vornamen - $row->uid</option>";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
<BR>
|
||||
Lehrfach:
|
||||
<SELECT name="lehrfachid">
|
||||
<?php
|
||||
// Auswahl des Lehrfach
|
||||
$num_rows=$db->db_num_rows($result_lehrfach);
|
||||
for ($i=0;$i<$num_rows;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object ($result_lehrfach, $i);
|
||||
echo "<option value=\"$row->id\">$row->kurzbz - $row->bezeichnung</option>";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
<BR>
|
||||
Studiengang:
|
||||
<SELECT name="stgid">
|
||||
<?php
|
||||
// Auswahl des Lektors
|
||||
$num_rows=$db->db_num_rows($result_stg);
|
||||
for ($i=0;$i<$num_rows;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object ($result_stg, $i);
|
||||
echo "<option value=\"$row->id\">$row->kurzbz - $row->bezeichnung</option>";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
Semester:
|
||||
<SELECT name="semester">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</SELECT>
|
||||
<INPUT type="submit" name="Abschicken" value="Hinzufügen">
|
||||
</FORM>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,82 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
|
||||
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/basis_db.class.php');
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
include('../../include/functions.inc.php');
|
||||
|
||||
|
||||
if(!($erg_std=$db->db_query("SELECT * FROM stunde ORDER BY id")))
|
||||
die($db->db_last_error());
|
||||
$num_rows_std=$db->db_num_rows($erg_std);
|
||||
for ($t=1;$t<7;$t++)
|
||||
for ($i=0;$i<$num_rows_std;$i++)
|
||||
{
|
||||
$var='wunsch'.$t.'_'.$i;
|
||||
//echo $$var;
|
||||
$gewicht=$$var;
|
||||
$stunde=$i+1;
|
||||
$query="SELECT * FROM zeitwunsch WHERE lektor_id=$lkid AND stunde_id=$stunde AND tag=$t";
|
||||
if(!($erg_wunsch=$db->db_query($query)))
|
||||
die($db->db_last_error());
|
||||
$num_rows_wunsch=$db->db_num_rows($erg_wunsch);
|
||||
if ($num_rows_wunsch==0)
|
||||
{
|
||||
$query="INSERT INTO zeitwunsch (lektor_id, stunde_id, tag, gewicht) VALUES ($lkid, $stunde, $t, $gewicht)";
|
||||
if(!($erg=$db->db_query($query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
elseif ($num_rows_wunsch==1)
|
||||
{
|
||||
$id=$db->db_result($erg_wunsch,0,"id");
|
||||
$query="UPDATE zeitwunsch SET lektor_id=$lkid, stunde_id=$stunde, tag=$t, gewicht=$gewicht WHERE id=$id";
|
||||
if(!($erg=$db->db_query($query)))
|
||||
die($db->db_last_error());
|
||||
}
|
||||
else
|
||||
die("Zuviele Eintraege fuer!");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Profil</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../include/styles.css" type="text/css">
|
||||
<META http-equiv="refresh" content="2;URL=zeitwunsch.php?lkid=<?php echo $lkid.'&vornamen='.$vornamen.'&nachname='.$nachname.'&titel='.$titel; ?>">
|
||||
</head>
|
||||
|
||||
<body class="background_main">
|
||||
<h4>Zeitwünsche von
|
||||
<?php echo $titel.' '.$vornamen.' '.$nachname; ?>
|
||||
sind aktualisiert!</h4>
|
||||
<A href="zeitwunsch.php?lkid=<?php echo $lkid.'&vornamen='.$vornamen.'&nachname='.$nachname.'&titel='.$titel; ?>"><<
|
||||
Zurück</A><br>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -86,9 +86,22 @@ $(document).ready(function()
|
||||
$("#t3").tablesorter(
|
||||
{
|
||||
sortList: [[1,0],[2,0],[3,0]],
|
||||
widgets: ["zebra"],
|
||||
widgets: ["zebra", "filter", "stickyHeaders"],
|
||||
headers: {8:{sorter:false}},
|
||||
emptyTo: "emptyMax"
|
||||
emptyTo: "emptyMax",
|
||||
widgetOptions : { filter_functions:
|
||||
{
|
||||
// Add select menu to this column
|
||||
6 : {
|
||||
"Ja" : function(e, n, f, i, $r, c, data) { return /Ja/.test(e); },
|
||||
"Nein" : function(e, n, f, i, $r, c, data) { return /Nein/.test(e); }
|
||||
},
|
||||
7 : {
|
||||
"Aktiv" : function(e, n, f, i, $r, c, data) { return $r.find("div").hasClass( "buttonGreen" ); },
|
||||
"Inaktiv" : function(e, n, f, i, $r, c, data) { return $r.find("div").hasClass( "buttonRed" ) || $r.find("div").hasClass( "buttonYellow" ); }
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#t4").tablesorter(
|
||||
{
|
||||
@@ -528,8 +541,22 @@ if($rolle_kurzbz != '')
|
||||
|
||||
if(isset($rollen->result) && count($rollen->result) != 0)
|
||||
{
|
||||
// Anzahl uniquer UIDs ermitteln
|
||||
$berechtigungen_array_uids = sizeof(array_column($rollen->result, null, 'uid'));
|
||||
|
||||
$htmlstr .= "<h3>".$berechtigung_kurzbz."</h3>\n";
|
||||
$htmlstr .= "<div style='font-size: 9pt'>".count($rollen->result)." Einträge</div>";
|
||||
$htmlstr .= "<div style='font-size: 9pt'>".$berechtigungen_array_uids." UIDs</div>";
|
||||
$htmlstr .= "<table id='t3' class='tablesorter'><thead><tr>\n";
|
||||
$htmlstr .= "<th>Rolle</th><th>Funktion</th><th>Nachname</th><th>Vorname</th><th>UID</th><th>Art</th><th>Benutzer Aktiv</th><th>Status</th><th>Aktion</th>";
|
||||
$htmlstr .= " <th>Rolle</th>
|
||||
<th>Funktion</th>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
<th>Art</th>
|
||||
<th>Benutzer Aktiv</th>
|
||||
<th>Status</th>
|
||||
<th>Aktion</th>";
|
||||
$htmlstr .= "</tr></thead><tbody>\n";
|
||||
|
||||
foreach($rollen->result as $row)
|
||||
@@ -541,35 +568,16 @@ if($rolle_kurzbz != '')
|
||||
|
||||
if ($row->ende!='' && strtotime($row->ende) < $heute)
|
||||
{
|
||||
$color1 = '#f79c9c';
|
||||
$color2 = '#cc0202';
|
||||
$status = '<div class="buttonRed"></div>';
|
||||
}
|
||||
elseif ($row->start!='' && strtotime($row->start) > $heute)
|
||||
{
|
||||
$color1 = '#faf7b9';
|
||||
$color2 = '#cfde00';
|
||||
$status = '<div class="buttonYellow"></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$color1 = '#d1fab9';
|
||||
$color2 = '#00de00';
|
||||
$status = '<div class="buttonGreen"></div>';
|
||||
}
|
||||
$status='<div style="
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: '.$color1.';
|
||||
background-image: -webkit-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: -moz-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: -ms-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: -o-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: linear-gradient(to bottom, '.$color1.', '.$color2.');
|
||||
-webkit-border-radius: 10;
|
||||
-moz-border-radius: 10;
|
||||
border-radius: 10px;
|
||||
|
||||
border: solid #999 1px;
|
||||
text-decoration: none;
|
||||
"></div>';
|
||||
|
||||
$htmlstr .= ' <tr>';
|
||||
$htmlstr .= ' <td>'.$row->rolle_kurzbz.'</td>';
|
||||
|
||||
Reference in New Issue
Block a user