mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9df0a408c |
@@ -7,8 +7,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
$config['interval_blocking_application'] = 'P1M';
|
||||
|
||||
// Application submission period given by start- and enddate.
|
||||
$config['submit_application_start'] = '05.09.2022';
|
||||
$config['submit_application_end'] = '22.09.2022';
|
||||
$config['submit_application_start'] = '01.02.2021';
|
||||
$config['submit_application_end'] = '22.02.2021';
|
||||
|
||||
// Lehrveranstaltungen with these grades will be blocked for application
|
||||
$config['grades_blocking_application'] = array(
|
||||
|
||||
@@ -119,13 +119,6 @@ $config['navigation_header'] = array(
|
||||
'expand' => true,
|
||||
'sort' => 30,
|
||||
'requiredPermissions' => 'system/issues_verwalten:r'
|
||||
),
|
||||
'gruppenmanagement' => array(
|
||||
'link' => site_url('person/Gruppenmanagement'),
|
||||
'description' => 'Gruppenmanagement',
|
||||
'expand' => true,
|
||||
'sort' => 40,
|
||||
'requiredPermissions' => 'lehre/gruppenmanager:r'
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -252,14 +245,3 @@ $config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/*'] = array(
|
||||
'requiredPermissions' => array('lehre/lehrauftrag_erteilen:r')
|
||||
)
|
||||
);
|
||||
|
||||
$config['navigation_menu']['system/issues/Issues/*'] = array(
|
||||
'fehlerzustaendigkeiten' => array(
|
||||
'link' => site_url('system/issues/IssuesZustaendigkeiten'),
|
||||
'description' => 'Fehler Zuständigkeiten',
|
||||
'icon' => 'cogs',
|
||||
'sort' => 100,
|
||||
'target' => '_blank',
|
||||
'requiredPermissions' => array('admin:rw')
|
||||
)
|
||||
);
|
||||
|
||||
@@ -16,11 +16,9 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class AnrechnungJob extends JOB_Controller
|
||||
{
|
||||
const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht';
|
||||
const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht';
|
||||
|
||||
const ANRECHNUNGSTATUS_APPROVED = 'approved';
|
||||
const ANRECHNUNGSTATUS_REJECTED = 'rejected';
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor';
|
||||
const ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL = 'AnrechnungNotizSTGL';
|
||||
|
||||
/**
|
||||
@@ -35,8 +33,6 @@ class AnrechnungJob extends JOB_Controller
|
||||
|
||||
$this->load->helper('url');
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
$this->load->library('AnrechnungLib');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -346,79 +342,6 @@ html;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Sancho mail to remind lecturers to provide their recommendation if not done until one week after request.
|
||||
*/
|
||||
public function sendMailRemindRecommendation(){
|
||||
|
||||
$this->logInfo('Start AnrechnungJob sendMailRemindRecommendation to remind lecturers to provide their recommendation.');
|
||||
|
||||
// Get Anrechnungen with pending recommendations, that were requested 1 week before today.
|
||||
// Restrict query for Anrechnungen of actual semester.
|
||||
$this->AnrechnungModel->addSelect('astat.anrechnung_id, astat.datum, astat.insertamum');
|
||||
$this->AnrechnungModel->addDistinct('astat.anrechnung_id');
|
||||
$this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus astat', 'anrechnung_id');
|
||||
|
||||
$result = $this->AnrechnungModel->loadWhere('
|
||||
studiensemester_kurzbz = (
|
||||
SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende)
|
||||
)
|
||||
AND genehmigt_von IS NULL
|
||||
AND empfehlung_anrechnung IS NULL
|
||||
AND status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) .' -- in Bearbeitung durch Lektor
|
||||
AND NOW()::date = (astat.datum + interval \'1 week\') -- eine Woche nach Empfehlungsanfrage
|
||||
ORDER BY astat.anrechnung_id, astat.datum DESC, astat.insertamum DESC -- nur letzten status dabei prüfen
|
||||
');
|
||||
|
||||
// Exit if there are no pending recommendations
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->logInfo('End AnrechnungJob sendMailRemindRecommendation, because no recommendations to be done.');
|
||||
exit;
|
||||
}
|
||||
|
||||
$anrechnung_id_arr = array_column(getData($result), 'anrechnung_id');
|
||||
|
||||
$arr_lvLector_arr = array();
|
||||
foreach ($anrechnung_id_arr as $anrechnung_id)
|
||||
{
|
||||
$arr_lvLector_arr[]= $this->anrechnunglib->getLectors($anrechnung_id); // Returns LV Leitung. If not present, then all lectors of LV.
|
||||
}
|
||||
|
||||
// Unique lector array to send only one mail per lector
|
||||
$arr_lvLector_arr = array_unique($arr_lvLector_arr, SORT_REGULAR);
|
||||
|
||||
// Link to 'Anrechnungen prüfen' dashboard
|
||||
$url =
|
||||
CIS_ROOT. 'cis/index.php?menu='.
|
||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||
CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI;
|
||||
|
||||
foreach ($arr_lvLector_arr as $lvLector_arr)
|
||||
{
|
||||
foreach ($lvLector_arr as $lector)
|
||||
{
|
||||
// Prepare mail content
|
||||
$fields = array(
|
||||
'vorname' => $lector->vorname,
|
||||
'stgl_name' => 'Die Studiengangsleitung',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
// Send mail
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAnfordern',
|
||||
$fields,
|
||||
$lector->uid. '@'. DOMAIN,
|
||||
'Erinnerung: Deine Empfehlung wird benötigt zur Anerkennung nachgewiesener Kenntnisse'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->logInfo('SUCCEDED AnrechnungJob sendMailRemindRecommendation');
|
||||
|
||||
}
|
||||
|
||||
// Get STGL mail address
|
||||
private function _getSTGLMailAddress($studiengang_kz)
|
||||
{
|
||||
|
||||
@@ -240,13 +240,11 @@ class LVPlanJob extends JOB_Controller
|
||||
}
|
||||
|
||||
// Send mail to STG Assistenz
|
||||
/*
|
||||
$result = $this->_sendMailToStg($uidByStg_arr);
|
||||
if (isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
*/
|
||||
|
||||
// Send mail to Kompetenzfeld Leitung
|
||||
$result = $this->_sendMailToKF($uidByOe_arr);
|
||||
|
||||
@@ -359,7 +359,7 @@ class LehrauftragJob extends JOB_Controller
|
||||
for ($i = 0; $i < $data_len; $i++)
|
||||
{
|
||||
// Get all users entitled by organisational unit
|
||||
$result = $this->BenutzerrolleModel->getBenutzerByBerechtigung(self::BERECHTIGUNG_LEHRAUFTRAG_ERTEILEN, $data[$i]['oe_kurzbz'], 'suid');
|
||||
$result = $this->BenutzerrolleModel->getBenutzerByBerechtigung(self::BERECHTIGUNG_LEHRAUFTRAG_ERTEILEN, $data[$i]['oe_kurzbz']);
|
||||
|
||||
if ($berechtigung_arr = getData($result))
|
||||
{
|
||||
|
||||
@@ -395,12 +395,8 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
// Get file to be downloaded from DMS
|
||||
$download = $this->dmslib->download($dms_id, $filename);
|
||||
if (isError($download)) return $download;
|
||||
|
||||
// Download file
|
||||
$this->outputFile(getData($download));
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,13 +8,13 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
const BERECHTIGUNG_ANRECHNUNG_ANLEGEN = 'lehre/anrechnung_anlegen';
|
||||
|
||||
const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht';
|
||||
|
||||
|
||||
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
|
||||
@@ -27,23 +27,23 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Load models
|
||||
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
|
||||
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
|
||||
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||
|
||||
|
||||
// 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(
|
||||
@@ -55,23 +55,23 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
'table'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->_setAuthUID();
|
||||
|
||||
|
||||
$this->setControllerId();
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Get study semester
|
||||
$studiensemester_kurzbz = $this->input->get('studiensemester');
|
||||
|
||||
|
||||
if (isEmptyString($studiensemester_kurzbz))
|
||||
{
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
$studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
|
||||
// Get studiengaenge the user is entitled for
|
||||
if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN))
|
||||
{
|
||||
@@ -91,10 +91,10 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
'hasReadOnlyAccess' => $hasReadOnlyAccess,
|
||||
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess
|
||||
);
|
||||
|
||||
|
||||
$this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Approve Anrechnungen.
|
||||
*/
|
||||
@@ -107,30 +107,22 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
$json = array(
|
||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED,
|
||||
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED),
|
||||
'prestudenten' => []
|
||||
);
|
||||
|
||||
|
||||
// Approve Anrechnung
|
||||
foreach ($data as $item)
|
||||
{
|
||||
// Get Prestudent
|
||||
$this->AnrechnungModel->addSelect('prestudent_id');
|
||||
$result = $this->AnrechnungModel->load($item['anrechnung_id']);
|
||||
$prestudent_id = getData($result)[0]->prestudent_id;
|
||||
|
||||
// Approve
|
||||
if ($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))
|
||||
if ($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))
|
||||
{
|
||||
$json['prestudenten'][$prestudent_id][] = $item['anrechnung_id'];
|
||||
$json[]= array(
|
||||
'anrechnung_id' => $item['anrechnung_id'],
|
||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED,
|
||||
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isset($json) && !isEmptyArray($json['prestudenten']))
|
||||
if (isset($json) && !isEmptyArray($json))
|
||||
{
|
||||
return $this->outputJsonSuccess($json);
|
||||
}
|
||||
@@ -139,20 +131,20 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reject Anrechnungen.
|
||||
*/
|
||||
public function reject()
|
||||
{
|
||||
$data = $this->input->post('data');
|
||||
|
||||
|
||||
// Validate data
|
||||
if (isEmptyArray($data))
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
// Reject Anrechnung
|
||||
foreach ($data as $item)
|
||||
{
|
||||
@@ -165,7 +157,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isset($json) && !isEmptyArray($json))
|
||||
{
|
||||
@@ -176,22 +168,22 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Request recommendation for Anrechnungen.
|
||||
*/
|
||||
public function requestRecommendation()
|
||||
{
|
||||
$data = $this->input->post('data');
|
||||
|
||||
|
||||
if(isEmptyArray($data))
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
$retval = array();
|
||||
$counter = 0;
|
||||
|
||||
|
||||
foreach ($data as $item)
|
||||
{
|
||||
// Check if Anrechnungs-LV has lector
|
||||
@@ -199,7 +191,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
// Count up LV with no lector
|
||||
$counter++;
|
||||
|
||||
|
||||
// Continue loop, if LV has no lector
|
||||
continue;
|
||||
}
|
||||
@@ -213,7 +205,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
|
||||
? implode(', ', array_column($lector_arr, 'fullname'))
|
||||
: '';
|
||||
|
||||
|
||||
$retval[]= array(
|
||||
'anrechnung_id' => $item['anrechnung_id'],
|
||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
|
||||
@@ -224,7 +216,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send mails to lectors
|
||||
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
|
||||
@@ -234,16 +226,16 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
self::_sendSanchoMailToLectors($retval);
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isEmptyArray($retval) && $counter == 0)
|
||||
{
|
||||
return $this->outputJsonError('Es wurden keine Empfehlungen angefordert');
|
||||
}
|
||||
|
||||
|
||||
return $this->outputJsonSuccess($retval);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Download and open uploaded document (Nachweisdokument).
|
||||
*/
|
||||
@@ -258,28 +250,25 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
// Get file to be downloaded from DMS
|
||||
$download = $this->dmslib->download($dms_id, $filename);
|
||||
if (isError($download)) return $download;
|
||||
|
||||
|
||||
// Download file
|
||||
$this->outputFile(getData($download));
|
||||
$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
|
||||
@@ -287,30 +276,31 @@ class approveAnrechnungUebersicht 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->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $result->lehrveranstaltung_id
|
||||
));
|
||||
|
||||
|
||||
|
||||
if(!$result = getData($result)[0])
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
|
||||
$studiengang_kz = $result->studiengang_kz;
|
||||
|
||||
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
|
||||
* @param $mail_params
|
||||
@@ -320,7 +310,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
// Get Lehrveranstaltungen
|
||||
$anrechnung_arr = array();
|
||||
|
||||
|
||||
foreach ($mail_params as $item)
|
||||
{
|
||||
$this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz');
|
||||
@@ -329,10 +319,10 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
'studiensemester_kurzbz' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiensemester_kurzbz
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
|
||||
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
||||
@@ -344,27 +334,27 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
$to = $lector->uid;
|
||||
$vorname = $lector->vorname;
|
||||
|
||||
|
||||
// Get full name of stgl
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
if (!$stgl_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::REVIEW_ANRECHNUNG_URI;
|
||||
|
||||
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $vorname,
|
||||
'stgl_name' => $stgl_name,
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAnfordern',
|
||||
$body_fields,
|
||||
@@ -374,7 +364,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
|
||||
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
||||
@@ -384,18 +374,18 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
private function _getLectors($anrechnung_arr)
|
||||
{
|
||||
$lector_arr = array();
|
||||
|
||||
|
||||
// Get lectors
|
||||
foreach($anrechnung_arr as $anrechnung)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']);
|
||||
|
||||
|
||||
if (!hasData($result))
|
||||
{
|
||||
show_error('Failed retrieving lectors of Lehrveranstaltung');
|
||||
}
|
||||
|
||||
|
||||
$lecturersByLv = getData($result);
|
||||
|
||||
// Check if lv has LV-Leitung
|
||||
@@ -411,7 +401,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
$lector_arr = array_merge($lector_arr, $lecturersByLv);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step
|
||||
* (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both.
|
||||
@@ -421,10 +411,10 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
unset($lector->lvleiter);
|
||||
}
|
||||
|
||||
|
||||
// Now make the lector array aka mail receivers unique
|
||||
$lector_arr = array_unique($lector_arr, SORT_REGULAR);
|
||||
|
||||
|
||||
return $lector_arr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,13 @@ class requestAnrechnung extends Auth_Controller
|
||||
{
|
||||
const REQUEST_ANRECHNUNG_URI = '/lehre/anrechnung/RequestAnrechnung';
|
||||
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
|
||||
@@ -23,22 +23,22 @@ class requestAnrechnung extends Auth_Controller
|
||||
'download' => 'student/anrechnung_beantragen:rw',
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Load models
|
||||
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
|
||||
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||
|
||||
|
||||
// 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 configs
|
||||
$this->load->config('anrechnung');
|
||||
|
||||
@@ -205,14 +205,9 @@ class requestAnrechnung extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Get file to be downloaded from DMS
|
||||
$download = $this->dmslib->download($dms_id);
|
||||
if (isError($download)) return $download;
|
||||
|
||||
// Download file
|
||||
$this->outputFile(getData($download));
|
||||
$this->dmslib->download($dms_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -221,10 +216,10 @@ class requestAnrechnung extends Auth_Controller
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
|
||||
if (!$this->_uid) show_error('User authentification failed');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if application deadline is expired.
|
||||
*
|
||||
@@ -237,7 +232,7 @@ class requestAnrechnung extends Auth_Controller
|
||||
private function _isExpired($start, $ende, $studiensemester_kurzbz)
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
|
||||
// If start is not given, set to Semesterstart.
|
||||
if (!isset($start) || isEmptyString($start))
|
||||
{
|
||||
@@ -245,7 +240,7 @@ class requestAnrechnung extends Auth_Controller
|
||||
$result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
|
||||
$start = getData($result)[0]->start;
|
||||
}
|
||||
|
||||
|
||||
// If ende is not given, set to Semesterende.
|
||||
if (!isset($ende) || isEmptyString($ende))
|
||||
{
|
||||
@@ -253,15 +248,15 @@ class requestAnrechnung extends Auth_Controller
|
||||
$result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
|
||||
$ende = getData($result)[0]->ende;
|
||||
}
|
||||
|
||||
|
||||
$today = new DateTime('today midnight');
|
||||
$start = new DateTime($start);
|
||||
$ende = new DateTime($ende);
|
||||
|
||||
|
||||
// True if expired
|
||||
return ($today < $start || $today > $ende);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if user is entitled to read dms doc.
|
||||
*
|
||||
@@ -273,9 +268,9 @@ class requestAnrechnung extends Auth_Controller
|
||||
{
|
||||
show_error('Failed loading Student');
|
||||
}
|
||||
|
||||
|
||||
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
||||
|
||||
|
||||
if($result = getData($result)[0])
|
||||
{
|
||||
if ($result->prestudent_id == $student->prestudent_id)
|
||||
@@ -283,10 +278,10 @@ class requestAnrechnung extends Auth_Controller
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if application already exists.
|
||||
*
|
||||
@@ -302,15 +297,15 @@ class requestAnrechnung extends Auth_Controller
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'prestudent_id' => $prestudent_id
|
||||
));
|
||||
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
show_error(getError($result));
|
||||
}
|
||||
|
||||
|
||||
return hasData($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if applications' study semester is actual study semester.
|
||||
*
|
||||
@@ -322,10 +317,10 @@ class requestAnrechnung extends Auth_Controller
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
$actual_ss = getData($result)[0]->studiensemester_kurzbz;
|
||||
|
||||
|
||||
return $studiensemester_kurzbz == $actual_ss;
|
||||
}
|
||||
|
||||
|
||||
private function _LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id)
|
||||
{
|
||||
// Get Note of Lehrveranstaltung
|
||||
@@ -336,12 +331,12 @@ class requestAnrechnung extends Auth_Controller
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// If Lehrveranstaltung has Note
|
||||
if (hasData($result))
|
||||
{
|
||||
$note = getData($result)[0]->note;
|
||||
|
||||
|
||||
// Check if Note is a blocking grade
|
||||
if (in_array($note, $this->config->item('grades_blocking_application')))
|
||||
{
|
||||
@@ -350,7 +345,7 @@ class requestAnrechnung extends Auth_Controller
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Upload file via DMS library.
|
||||
*
|
||||
@@ -367,8 +362,8 @@ class requestAnrechnung extends Auth_Controller
|
||||
'insertamum' => (new DateTime())->format('Y-m-d H:i:s'),
|
||||
'insertvon' => $this->_uid
|
||||
);
|
||||
|
||||
|
||||
// Upload document
|
||||
return $this->dmslib->upload($dms, 'uploadfile', array('pdf'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -217,19 +217,16 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
// Get file to be downloaded from DMS
|
||||
$download = $this->dmslib->download($dms_id, $filename);
|
||||
if (isError($download)) return $download;
|
||||
|
||||
// Download file
|
||||
$this->outputFile(getData($download));
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the UID of the logged user and checks if it is valid
|
||||
*/
|
||||
@@ -322,10 +319,20 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
// 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
|
||||
$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');
|
||||
$result = $this->PersonModel->getFullName($this->_uid);
|
||||
$lector_name = hasData($result) ? getData($result) : 'Ein Lektor';
|
||||
if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid)))
|
||||
{
|
||||
show_error ('Failed retrieving person');
|
||||
}
|
||||
|
||||
// Link to Antrag genehmigen
|
||||
$url =
|
||||
@@ -333,26 +340,22 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||
CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
|
||||
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
if( !$result = $this->_getSTGLMailAddress($studiengang_kz)) return false;
|
||||
foreach ($result as $stgl)
|
||||
{
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $stgl['vorname'],
|
||||
'lektor_name' => $lector_name,
|
||||
'empfehlung' => $empfehlung ? 'positive' : 'negative',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $vorname,
|
||||
'lektor_name' => $lector_name,
|
||||
'empfehlung' => $empfehlung ? 'positive' : 'negative',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAbgeben',
|
||||
$body_fields,
|
||||
$stgl['to'],
|
||||
'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben'
|
||||
);
|
||||
}
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAbgeben',
|
||||
$body_fields,
|
||||
$to,
|
||||
'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben'
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -363,33 +366,28 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
$result = $this->StudiengangModel->getLeitung($stg_kz);
|
||||
|
||||
// Get STGL mail address, if available
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $stgl)
|
||||
{
|
||||
$stglMailAdress_arr[]= array(
|
||||
'to' => $stgl->uid. '@'. DOMAIN,
|
||||
'vorname' => $stgl->vorname
|
||||
);
|
||||
}
|
||||
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
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 false;
|
||||
return error('Keine E-Mail für diesen Stg gefunden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,17 +180,13 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
// Get file to be downloaded from DMS
|
||||
$download = $this->dmslib->download($dms_id, $filename);
|
||||
if (isError($download)) return $download;
|
||||
|
||||
// Download file
|
||||
$this->outputFile(getData($download));
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -257,10 +253,20 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
// 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
|
||||
$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');
|
||||
$result = $this->PersonModel->getFullName($this->_uid);
|
||||
$lector_name = hasData($result) ? getData($result) : 'Ein Lektor';
|
||||
if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid)))
|
||||
{
|
||||
show_error ('Failed retrieving person');
|
||||
}
|
||||
|
||||
// Link to Antrag genehmigen
|
||||
$url =
|
||||
@@ -268,26 +274,22 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||
CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
|
||||
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
if (!$result = $this->_getSTGLMailAddress($studiengang_kz)) return false;
|
||||
foreach ($result as $stgl)
|
||||
{
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $stgl['vorname'],
|
||||
'lektor_name' => $lector_name,
|
||||
'empfehlung' => $empfehlung ? 'positive' : 'negative',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $vorname,
|
||||
'lektor_name' => $lector_name,
|
||||
'empfehlung' => $empfehlung ? 'positive' : 'negative',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAbgeben',
|
||||
$body_fields,
|
||||
$stgl['to'],
|
||||
'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben'
|
||||
);
|
||||
}
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAbgeben',
|
||||
$body_fields,
|
||||
$to,
|
||||
'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben'
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -298,33 +300,28 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
$result = $this->StudiengangModel->getLeitung($stg_kz);
|
||||
|
||||
// Get STGL mail address, if available
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $stgl)
|
||||
{
|
||||
$stglMailAdress_arr[]= array(
|
||||
'to' => $stgl->uid. '@'. DOMAIN,
|
||||
'vorname' => $stgl->vorname
|
||||
);
|
||||
}
|
||||
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
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 false;
|
||||
return error('Keine E-Mail für diesen Stg gefunden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ class Studiensemester extends Auth_Controller
|
||||
$start = $this->input->post("semstart");
|
||||
$ende = $this->input->post("semende");
|
||||
$studienjahr_kurzbz = $this->input->post("studienjahrkurzbz");
|
||||
$beschreibung = isEmptyString($this->input->post("beschreibung")) ? null : $this->input->post("beschreibung");
|
||||
$beschreibung = $this->input->post("beschreibung");
|
||||
$onlinebewerbung = $this->input->post("onlinebewerbung");
|
||||
$onlinebewerbung = isset($onlinebewerbung);
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
*/
|
||||
class BPKWartung extends Auth_Controller
|
||||
{
|
||||
private $_uid; // contains the UID of the logged user
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -44,7 +46,7 @@ class BPKWartung extends Auth_Controller
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Main page of the bPK Wartung.
|
||||
* Main page of the InfoCenter tool
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@@ -54,7 +56,9 @@ class BPKWartung extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* bPK Details initialization function, gets person data and loads the view with the data.
|
||||
* Personal details page of the InfoCenter tool
|
||||
* Initialization function, gets person and prestudent data and loads the view with the data
|
||||
* @param $person_id
|
||||
*/
|
||||
public function showDetails()
|
||||
{
|
||||
@@ -81,7 +85,8 @@ class BPKWartung extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves a bPK for a person.
|
||||
* Saves a ZGV for a prestudent, includes Ort, Datum, Nation for bachelor and master
|
||||
* @param $prestudent_id
|
||||
*/
|
||||
public function saveBPK()
|
||||
{
|
||||
@@ -107,7 +112,7 @@ class BPKWartung extends Auth_Controller
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Loads all necessary Person data.
|
||||
* Loads all necessary Person data: Stammdaten (name, svnr, contact, ...), Dokumente, Logs and Notizen
|
||||
* @param $person_id
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -1,254 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Page for managing groups of which user is the manager
|
||||
*/
|
||||
class Gruppenmanagement extends Auth_Controller
|
||||
{
|
||||
private $_uid; // contains the UID of the logged user
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'lehre/gruppenmanager:r',
|
||||
'showBenutzergruppe' => 'lehre/gruppenmanager:r',
|
||||
'getBenutzer' => 'lehre/gruppenmanager:r',
|
||||
'getAllBenutzer' => 'lehre/gruppenmanager:r',
|
||||
'addBenutzer' => 'lehre/gruppenmanager:rw',
|
||||
'removeBenutzer' => 'lehre/gruppenmanager:rw'
|
||||
)
|
||||
);
|
||||
|
||||
// Loads models
|
||||
$this->load->model('person/benutzer_model', 'BenutzerModel');
|
||||
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->load->model('person/benutzergruppe_model', 'BenutzergruppeModel');
|
||||
$this->load->model('system/Log_model', 'LogModel');
|
||||
|
||||
$this->load->library('WidgetLib');
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'person',
|
||||
'lehre',
|
||||
'ui',
|
||||
'filter',
|
||||
'gruppenmanagement'
|
||||
)
|
||||
);
|
||||
|
||||
$this->setControllerId(); // sets the controller id
|
||||
$this->_setAuthUID(); // sets property uid
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Main page
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view(
|
||||
'person/gruppenmanagement/gruppenmanagement.php',
|
||||
array('uid' => $this->_uid)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows Benutzergruppe overview page.
|
||||
*/
|
||||
public function showBenutzergruppe()
|
||||
{
|
||||
$this->_setNavigationMenuShowDetails();
|
||||
$gruppe_kurzbz = $this->input->get('gruppe_kurzbz');
|
||||
|
||||
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
|
||||
|
||||
$this->load->view(
|
||||
'person/gruppenmanagement/benutzergruppe.php',
|
||||
array('gruppe_kurzbz' => $gruppe_kurzbz)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Benutzer assigned to a Gruppe
|
||||
*/
|
||||
public function getBenutzer()
|
||||
{
|
||||
$gruppe_kurzbz = $this->input->get('gruppe_kurzbz');
|
||||
|
||||
$this->BenutzergruppeModel->addSelect('uid, vorname, nachname, ben.aktiv');
|
||||
$this->BenutzergruppeModel->addJoin('public.tbl_benutzer ben', 'uid');
|
||||
$this->BenutzergruppeModel->addJoin('public.tbl_person', 'person_id');
|
||||
$benutzerRes = $this->BenutzergruppeModel->loadWhere(array('gruppe_kurzbz' => $gruppe_kurzbz));
|
||||
|
||||
$this->outputJson($benutzerRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all Benutzer for assignment to Gruppe
|
||||
*/
|
||||
public function getAllBenutzer()
|
||||
{
|
||||
$this->BenutzerModel->addSelect('uid, vorname, nachname');
|
||||
$this->BenutzerModel->addJoin('public.tbl_person', 'person_id');
|
||||
$benutzerRes = $this->BenutzerModel->loadWhere(
|
||||
array('tbl_benutzer.aktiv' => true)
|
||||
);
|
||||
$this->outputJson($benutzerRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Benutzer to Gruppe
|
||||
*/
|
||||
public function addBenutzer()
|
||||
{
|
||||
$uid = $this->input->post('uid');
|
||||
$gruppe_kurzbz = $this->input->post('gruppe_kurzbz');
|
||||
|
||||
if (isEmptyString($uid))
|
||||
$result = error('Uid missing');
|
||||
else
|
||||
{
|
||||
$benutzerExistsRes = $this->BenutzergruppeModel->loadWhere(
|
||||
array(
|
||||
'uid' => $uid,
|
||||
'gruppe_kurzbz' => $gruppe_kurzbz
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($benutzerExistsRes))
|
||||
{
|
||||
$this->outputJsonError(getError($benutzerExistsRes));
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasData($benutzerExistsRes))
|
||||
{
|
||||
$this->outputJsonError($this->p->t('gruppenmanagement', 'benutzerSchonZugewiesen'));
|
||||
return;
|
||||
}
|
||||
|
||||
$result = $this->BenutzergruppeModel->insert(
|
||||
array(
|
||||
'uid' => $uid,
|
||||
'gruppe_kurzbz' => $gruppe_kurzbz,
|
||||
'insertamum' => date('Y-m-d H:i:s'),
|
||||
'insertvon' => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
// log the group add
|
||||
$lastQry = $this->db->last_query();
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$beschreibung = 'Gruppenmanagement: Nutzer zu Gruppe hinzugefügt';
|
||||
$this->_writeLog($this->_uid, $beschreibung, $lastQry);
|
||||
}
|
||||
}
|
||||
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Benutzer from Gruppe
|
||||
*/
|
||||
public function removeBenutzer()
|
||||
{
|
||||
$uid = $this->input->post('uid');
|
||||
$gruppe_kurzbz = $this->input->post('gruppe_kurzbz');
|
||||
|
||||
if (isEmptyString($uid))
|
||||
$result = error('Uid missing');
|
||||
else
|
||||
{
|
||||
$result = $this->BenutzergruppeModel->delete(
|
||||
array(
|
||||
'uid' => $uid,
|
||||
'gruppe_kurzbz' => $gruppe_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// log the group remove
|
||||
$lastQry = $this->db->last_query();
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$beschreibung = 'Gruppenmanagement: Nutzer aus Gruppe entfernt';
|
||||
$this->_writeLog($this->_uid, $beschreibung, $lastQry);
|
||||
}
|
||||
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Define the navigation menu for the showDetails page
|
||||
*/
|
||||
private function _setNavigationMenuShowDetails()
|
||||
{
|
||||
$this->load->library('NavigationLib', array('navigation_page' => 'person/Gruppenmanagement/showBenutzergruppe'));
|
||||
|
||||
$link = site_url('person/Gruppenmanagement');
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'back' => $this->navigationlib->oneLevel(
|
||||
'Zurück', // description
|
||||
$link, // link
|
||||
array(), // children
|
||||
'angle-left', // icon
|
||||
true, // expand
|
||||
null, // subscriptDescription
|
||||
null, // subscriptLinkClass
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
1 // sort
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set uid of authentificated user
|
||||
*/
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
if (!$this->_uid) show_error('User authentification failed');
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes an entry in the log table
|
||||
*/
|
||||
private function _writeLog($uid, $beschreibung, $lastQry)
|
||||
{
|
||||
$mitarbeiterResult = $this->MitarbeiterModel->load(array('mitarbeiter_uid'=>$this->_uid));
|
||||
|
||||
if(!isSuccess($mitarbeiterResult) || !hasData($mitarbeiterResult))
|
||||
{
|
||||
$uid = DUMMY_LEKTOR_UID;
|
||||
$beschreibung .= ': '.$this->_uid;
|
||||
$beschreibung = mb_substr($beschreibung, 0, 64);
|
||||
}
|
||||
|
||||
$this->LogModel->insert(array(
|
||||
'mitarbeiter_uid' => $uid,
|
||||
'beschreibung' => $beschreibung,
|
||||
'sql' => $lastQry
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,10 +18,10 @@ class Variables extends Auth_Controller
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'setVar' => array('basis/variable:rw','basis/variable_persoenlich:rw'),
|
||||
'getVar' => array('basis/variable:rw','basis/variable_persoenlich:rw'),
|
||||
'changeStudiensemesterVar' => array('basis/variable:rw','basis/variable_persoenlich:rw'),
|
||||
'changeStudengangsTypVar' => array('basis/variable:rw','basis/variable_persoenlich:rw')
|
||||
'setVar' => 'basis/variable:rw',
|
||||
'getVar' => 'basis/variable:rw',
|
||||
'changeStudiensemesterVar' => 'basis/variable:rw',
|
||||
'changeStudengangsTypVar' => 'basis/variable:rw'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -88,12 +88,6 @@ class InfoCenter extends Auth_Controller
|
||||
'message' => 'Type of Document %s was updated, set to %s',
|
||||
'success' => null
|
||||
),
|
||||
'deletedoc' => array(
|
||||
'logtype' => 'Action',
|
||||
'name' => 'Document deleted',
|
||||
'message' => 'Document %s deleted',
|
||||
'success' => null
|
||||
),
|
||||
);
|
||||
|
||||
// Name of Interessentenstatus
|
||||
@@ -137,7 +131,6 @@ class InfoCenter extends Auth_Controller
|
||||
'reloadZgvPruefungen' => 'infocenter:r',
|
||||
'reloadMessages' => 'infocenter:r',
|
||||
'reloadDoks' => 'infocenter:r',
|
||||
'reloadUebersichtDoks' => 'infocenter:r',
|
||||
'reloadNotizen' => array('infocenter:r', 'lehre/zgvpruefung:r'),
|
||||
'reloadLogs' => 'infocenter:r',
|
||||
'outputAkteContent' => array('infocenter:r', 'lehre/zgvpruefung:r'),
|
||||
@@ -149,9 +142,7 @@ class InfoCenter extends Auth_Controller
|
||||
'getStudienjahrEnd' => array('infocenter:r', 'lehre/zgvpruefung:r'),
|
||||
'setNavigationMenuArrayJson' => 'infocenter:r',
|
||||
'getAbsageData' => 'infocenter:r',
|
||||
'saveAbsageForAll' => 'infocenter:rw',
|
||||
'deleteDoc' => 'infocenter:rw',
|
||||
'getStudienartData' => 'infocenter:rw'
|
||||
'saveAbsageForAll' => 'infocenter:rw'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -168,10 +159,6 @@ class InfoCenter extends Auth_Controller
|
||||
$this->load->model('system/Message_model', 'MessageModel');
|
||||
$this->load->model('system/Filters_model', 'FiltersModel');
|
||||
$this->load->model('system/PersonLock_model', 'PersonLockModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$this->load->model('codex/Zgv_model', 'ZgvModel');
|
||||
$this->load->model('codex/Zgvmaster_model', 'ZgvmasterModel');
|
||||
$this->load->model('codex/Nation_model', 'NationModel');
|
||||
|
||||
// Loads libraries
|
||||
$this->load->library('PersonLogLib');
|
||||
@@ -411,35 +398,6 @@ class InfoCenter extends Auth_Controller
|
||||
$this->outputJsonSuccess(array($json));
|
||||
}
|
||||
|
||||
public function deleteDoc($person_id)
|
||||
{
|
||||
$akte_id = $this->input->post('akteid');
|
||||
|
||||
if (isset($akte_id) && isset($person_id))
|
||||
{
|
||||
$this->load->library('AkteLib');
|
||||
$akte = $this->aktelib->get($akte_id);
|
||||
|
||||
if (hasData($akte))
|
||||
{
|
||||
$akte = getData($akte);
|
||||
if ($akte->person_id === (int)$person_id)
|
||||
{
|
||||
$result = $this->aktelib->remove($akte_id);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithJsonError('Error deleting document');
|
||||
}
|
||||
|
||||
$this->_log($person_id, 'deletedoc', array($akte->bezeichnung));
|
||||
|
||||
$this->outputJsonSuccess('success');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets prestudent data for a person in json format
|
||||
* @param $person_id
|
||||
@@ -1116,17 +1074,6 @@ class InfoCenter extends Auth_Controller
|
||||
$this->load->view('system/infocenter/dokNachzureichend.php', array('dokumente_nachgereicht' => $dokumente_nachgereicht->retval));
|
||||
}
|
||||
|
||||
public function reloadUebersichtDoks($person_id)
|
||||
{
|
||||
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false);
|
||||
|
||||
$this->DokumentModel->addOrder('bezeichnung');
|
||||
$dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load())));
|
||||
$data = array_merge($dokumentdata, ['dokumente' => $dokumente->retval]);
|
||||
|
||||
$this->load->view('system/infocenter/dokpruefung.php', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs content of an Akte, sends appropriate headers (so the document can be downloaded)
|
||||
* @param $akte_id
|
||||
@@ -1985,25 +1932,10 @@ class InfoCenter extends Auth_Controller
|
||||
$abwstatusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
|
||||
$intstatusgruende = $this->StatusgrundModel->getStatus(self::INTERESSENTSTATUS)->retval;
|
||||
|
||||
$studienArtBerechtigung = array_column($this->getStudienArtBerechtigung(), 'typ');
|
||||
|
||||
$this->ZgvModel->addOrder('zgv_bez');
|
||||
$allZGVs = getData($this->ZgvModel->load());
|
||||
|
||||
$this->ZgvModel->addOrder('zgvmas_bez');
|
||||
$allZGVsMaster = getData($this->ZgvmasterModel->load());
|
||||
|
||||
$this->NationModel->addOrder('langtext');
|
||||
$allNations = getData($this->NationModel->load());
|
||||
|
||||
$data = array (
|
||||
'zgvpruefungen' => $zgvpruefungen,
|
||||
'abwstatusgruende' => $abwstatusgruende,
|
||||
'intstatusgruende' => $intstatusgruende,
|
||||
'studienArtBerechtigung' => $studienArtBerechtigung,
|
||||
'all_zgvs' => $allZGVs,
|
||||
'all_zgvs_master' => $allZGVsMaster,
|
||||
'all_nations' => $allNations,
|
||||
'intstatusgruende' => $intstatusgruende
|
||||
);
|
||||
|
||||
return $data;
|
||||
@@ -2262,36 +2194,18 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
public function getAbsageData()
|
||||
{
|
||||
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
|
||||
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm']);
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
if (hasData($stg_typ))
|
||||
{
|
||||
$stg_typ = getData($stg_typ);
|
||||
$statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
|
||||
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
|
||||
$studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester);
|
||||
$statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
|
||||
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
|
||||
$studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(['b', 'm'], $studienSemester);
|
||||
|
||||
$data = array (
|
||||
'statusgruende' => $statusgruende,
|
||||
'studiengaenge' => $studiengaenge->retval
|
||||
);
|
||||
$data = array (
|
||||
'statusgruende' => $statusgruende,
|
||||
'studiengaenge' => $studiengaenge->retval
|
||||
);
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
else
|
||||
$this->outputJsonSuccess(null);
|
||||
}
|
||||
|
||||
public function getStudienArtBerechtigung()
|
||||
{
|
||||
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
|
||||
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm', 'l']);
|
||||
return getData($stg_typ);
|
||||
}
|
||||
public function getStudienartData()
|
||||
{
|
||||
$this->outputJsonSuccess($this->getStudienArtBerechtigung());
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
public function saveAbsageForAll()
|
||||
|
||||
@@ -6,7 +6,7 @@ class Issues extends Auth_Controller
|
||||
{
|
||||
private $_uid;
|
||||
|
||||
const FUNKTION_KURZBZ = 'ass'; // user having this funktion can see issues for oes assigned with this funktion
|
||||
const FUNKTION_KURZBZ = 'ass'; // // user having this funktion can see issues for oes assigned with this funktion
|
||||
const BERECHTIGUNG_KURZBZ = 'system/issues_verwalten'; // user having this permission can see issues for oes assigned with this permission
|
||||
|
||||
public function __construct()
|
||||
@@ -39,7 +39,6 @@ class Issues extends Auth_Controller
|
||||
);
|
||||
|
||||
$this->_setAuthUID(); // sets property uid
|
||||
$this->setControllerId(); // sets the controller id
|
||||
}
|
||||
|
||||
public function index()
|
||||
@@ -81,7 +80,7 @@ class Issues extends Auth_Controller
|
||||
}
|
||||
|
||||
if (isEmptyString($changeIssueMethod))
|
||||
$errors[] = "Invalid issue status given";
|
||||
$errors[] = error("Invalid issue status given");
|
||||
else
|
||||
{
|
||||
$issueRes = $this->issueslib->{$changeIssueMethod}($issue_id, $user);
|
||||
@@ -128,7 +127,7 @@ class Issues extends Auth_Controller
|
||||
{
|
||||
$all_funktionen_oe_kurzbz[$benutzerfunktion->oe_kurzbz][] = $benutzerfunktion->funktion_kurzbz;
|
||||
|
||||
// separate oes for the additional funktion which enables displaying issues
|
||||
// separate oes for the funktion needed for displaying issues
|
||||
if ($benutzerfunktion->funktion_kurzbz == self::FUNKTION_KURZBZ)
|
||||
{
|
||||
$oe_kurzbz_for_funktion[] = $benutzerfunktion->oe_kurzbz;
|
||||
@@ -154,9 +153,7 @@ class Issues extends Auth_Controller
|
||||
}
|
||||
|
||||
// add oes for which there is the "manage issues" Berechtigung
|
||||
$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ);
|
||||
|
||||
if (!$oe_kurzbz_berechtigt)
|
||||
if (!$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ))
|
||||
show_error('No permission or error when checking permissions');
|
||||
|
||||
$all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt));
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class IssuesZustaendigkeiten extends Auth_Controller
|
||||
{
|
||||
private $_uid;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'admin:r',
|
||||
'getApps' => 'admin:r',
|
||||
'getFehlercodes' => 'admin:r',
|
||||
'getNonAssignedZustaendigkeiten' => 'admin:r',
|
||||
'addZustaendigkeit' => 'admin:rw',
|
||||
'deleteZustaendigkeit' => 'admin:rw'
|
||||
)
|
||||
);
|
||||
|
||||
// Load libraries
|
||||
$this->load->library('IssuesLib');
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
// Load models
|
||||
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||
$this->load->model('system/Fehler_model', 'FehlerModel');
|
||||
$this->load->model('system/Fehler_model', 'FehlerModel');
|
||||
$this->load->model('system/Fehlerzustaendigkeiten_model', 'FehlerzustaendigkeitenModel');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'filter',
|
||||
'lehre',
|
||||
'person',
|
||||
'fehlermonitoring'
|
||||
)
|
||||
);
|
||||
|
||||
$this->_setAuthUID(); // sets property uid
|
||||
$this->setControllerId(); // sets the controller id
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->load->view("system/issues/issuesZustaendigkeiten.php");
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all Apps to which Fehler exist.
|
||||
*/
|
||||
public function getApps()
|
||||
{
|
||||
$this->FehlerModel->addDistinct();
|
||||
$this->FehlerModel->addSelect('app');
|
||||
$this->FehlerModel->addOrder('app');
|
||||
|
||||
$appRes = $this->FehlerModel->load();
|
||||
|
||||
$this->outputJson($appRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all fehlercodes, optionally by app.
|
||||
*/
|
||||
public function getFehlercodes()
|
||||
{
|
||||
$app = $this->input->get('app');
|
||||
|
||||
//$this->FehlerModel->addSelect('fehlercode, fehler_kurzbz, fehlertext, fehlertyp_kurzbz');
|
||||
$this->FehlerModel->addOrder('fehlercode');
|
||||
|
||||
$fehlerRes = isset($app) ? $this->FehlerModel->loadWhere(array('app' => $app)) : $this->FehlerModel->load();
|
||||
|
||||
$this->outputJson($fehlerRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all Mitarbeiter, Organisationseinheiten, Funktionen not assigned to a Fehler yet.
|
||||
*/
|
||||
public function getNonAssignedZustaendigkeiten()
|
||||
{
|
||||
$fehlercode = $this->input->get('fehlercode');
|
||||
|
||||
$mitarbeiterRes = $this->FehlerzustaendigkeitenModel->getNonAssignedMitarbeiter($fehlercode);
|
||||
|
||||
if (isError($mitarbeiterRes))
|
||||
{
|
||||
$this->outputJsonError(getError($mitarbeiterRes));
|
||||
return;
|
||||
}
|
||||
|
||||
$this->OrganisationseinheitModel->addSelect('oe_kurzbz, bezeichnung, organisationseinheittyp_kurzbz');
|
||||
$this->OrganisationseinheitModel->addOrder('organisationseinheittyp_kurzbz, bezeichnung');
|
||||
$oeRes = $this->OrganisationseinheitModel->loadWhere(array('aktiv' => true));
|
||||
|
||||
if (isError($oeRes))
|
||||
{
|
||||
$this->outputJsonError(getError($oeRes));
|
||||
return;
|
||||
}
|
||||
|
||||
$oe_funktionen = array();
|
||||
|
||||
if (hasData($oeRes))
|
||||
{
|
||||
$oes = getData($oeRes);
|
||||
|
||||
foreach ($oes as $oe)
|
||||
{
|
||||
$oe->funktionen = array();
|
||||
$funktionRes = $this->FehlerzustaendigkeitenModel->getNonAssignedFunktionen($fehlercode, $oe->oe_kurzbz);
|
||||
|
||||
if (isError($funktionRes))
|
||||
{
|
||||
$this->outputJsonError(getError($oeRes));
|
||||
return;
|
||||
}
|
||||
|
||||
$funktionData = getData($funktionRes);
|
||||
$oe->funktionen = $funktionData;
|
||||
$oe_funktionen[] = $oe;
|
||||
}
|
||||
}
|
||||
|
||||
if (isError($funktionRes))
|
||||
{
|
||||
$this->outputJsonError(getError($funktionRes));
|
||||
return;
|
||||
}
|
||||
|
||||
$result = array(
|
||||
'mitarbeiter' => getData($mitarbeiterRes),
|
||||
'oe_funktionen' => $oe_funktionen
|
||||
);
|
||||
|
||||
$this->outputJsonSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Zuständigkeit after performing error checks.
|
||||
*/
|
||||
public function addZustaendigkeit()
|
||||
{
|
||||
$fehlercode = $this->input->post('fehlercode');
|
||||
$mitarbeiter_person_id = $this->input->post('mitarbeiter_person_id');
|
||||
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||
$funktion_kurzbz = $this->input->post('funktion_kurzbz');
|
||||
|
||||
if (isEmptyString($fehlercode))
|
||||
$this->outputJsonError($this->p->t('fehlermonitoring', 'fehlercodeFehlt'));
|
||||
elseif (isEmptyString($mitarbeiter_person_id) && isEmptyString($oe_kurzbz))
|
||||
$this->outputJsonError($this->p->t('fehlermonitoring', 'mitarbeiterUndOeFehlt'));
|
||||
elseif (!isEmptyString($mitarbeiter_person_id) && !isEmptyString($oe_kurzbz))
|
||||
$this->outputJsonError($this->p->t('fehlermonitoring', 'nurOeOderMitarbeiterSetzen'));
|
||||
elseif (isset($mitarbeiter_person_id) && !is_numeric($mitarbeiter_person_id))
|
||||
$this->outputJsonError($this->p->t('fehlermonitoring', 'ungueltigeMitarbeiterId'));
|
||||
else
|
||||
{
|
||||
$data = array(
|
||||
'fehlercode' => $fehlercode
|
||||
);
|
||||
|
||||
if (!isEmptyString($mitarbeiter_person_id))
|
||||
$data['person_id'] = $mitarbeiter_person_id;
|
||||
|
||||
if (!isEmptyString($oe_kurzbz))
|
||||
$data['oe_kurzbz'] = $oe_kurzbz;
|
||||
|
||||
if (!isEmptyString($funktion_kurzbz))
|
||||
$data['funktion_kurzbz'] = $funktion_kurzbz;
|
||||
|
||||
$zustaendigkeitExistsRes = $this->FehlerzustaendigkeitenModel->loadWhere($data);
|
||||
|
||||
if (isError($zustaendigkeitExistsRes))
|
||||
$this->outputJsonError(getError($zustaendigkeitExistsRes));
|
||||
elseif (hasData($zustaendigkeitExistsRes))
|
||||
$this->outputJsonError($this->p->t('fehlermonitoring', 'zustaendigkeitExistiert'));
|
||||
else
|
||||
{
|
||||
$data['insertvon'] = $this->_uid;
|
||||
|
||||
$this->outputJson($this->FehlerzustaendigkeitenModel->insert($data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Zuständigkeit.
|
||||
*/
|
||||
public function deleteZustaendigkeit()
|
||||
{
|
||||
$fehlerzustaendigkeiten_id = $this->input->post('fehlerzustaendigkeiten_id');
|
||||
|
||||
// check if Id correctly passed
|
||||
if (!isset($fehlerzustaendigkeiten_id) || !is_numeric($fehlerzustaendigkeiten_id))
|
||||
{
|
||||
$this->outputJsonError($this->p->t('fehlermonitoring', 'ungueltigeZustaendigkeitenId'));
|
||||
return;
|
||||
}
|
||||
|
||||
$this->outputJson($this->FehlerzustaendigkeitenModel->delete($fehlerzustaendigkeiten_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
}
|
||||
@@ -22,16 +22,11 @@ class DB_Model extends CI_Model
|
||||
const PGSQL_BOOLEAN_FALSE = 'f';
|
||||
const PGSQL_BOOLEAN_TYPE = 'bool';
|
||||
const PGSQL_BOOLEAN_ARRAY_TYPE = '_bool';
|
||||
const PGSQL_INT2_TYPE = 'int2';
|
||||
const PGSQL_INT4_TYPE = 'int4';
|
||||
const PGSQL_INT8_TYPE = 'int8';
|
||||
const PGSQL_FLOAT4_TYPE = 'float4';
|
||||
const PGSQL_FLOAT8_TYPE = 'float8';
|
||||
|
||||
protected $dbTable; // Name of the DB-Table for CI-Insert, -Update, ...
|
||||
protected $pk; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
protected $pk; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
protected $hasSequence; // False if this table has a composite primary key that is not using a sequence
|
||||
// True if this table has a primary key that uses a sequence
|
||||
// True if this table has a primary key that uses a sequence
|
||||
|
||||
private $executedQueryMetaData;
|
||||
private $executedQueryListFields;
|
||||
@@ -276,6 +271,11 @@ class DB_Model extends CI_Model
|
||||
/**
|
||||
* Load data and convert a record into a list of data from the main table,
|
||||
* and linked to every element, the data from the side tables
|
||||
*
|
||||
* TODO:
|
||||
* - Adding support for composed primary key
|
||||
* - Adding support for cascading side tables (useful?)
|
||||
*
|
||||
* NOTE: sub queries are not supported in the from clause
|
||||
*
|
||||
* @return array
|
||||
@@ -598,28 +598,6 @@ class DB_Model extends CI_Model
|
||||
return $val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert PG-Int* to PHP-Integer
|
||||
*/
|
||||
public function pgIntPhp($val)
|
||||
{
|
||||
// If it is null, let it be null
|
||||
if ($val == null) return $val;
|
||||
|
||||
return intval($val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert PG-Float* to PHP-Float
|
||||
*/
|
||||
public function pgFloatPhp($val)
|
||||
{
|
||||
// If it is null, let it be null
|
||||
if ($val == null) return $val;
|
||||
|
||||
return floatval($val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts from PostgreSQL array to php array
|
||||
* It also takes care about array of booleans
|
||||
@@ -914,11 +892,6 @@ class DB_Model extends CI_Model
|
||||
// If array type, boolean type OR a UDF
|
||||
if (strpos($eqmd->type, DB_Model::PGSQL_ARRAY_TYPE) !== false
|
||||
|| $eqmd->type == DB_Model::PGSQL_BOOLEAN_TYPE
|
||||
|| $eqmd->type == DB_Model::PGSQL_INT2_TYPE
|
||||
|| $eqmd->type == DB_Model::PGSQL_INT4_TYPE
|
||||
|| $eqmd->type == DB_Model::PGSQL_INT8_TYPE
|
||||
|| $eqmd->type == DB_Model::PGSQL_FLOAT4_TYPE
|
||||
|| $eqmd->type == DB_Model::PGSQL_FLOAT8_TYPE
|
||||
|| $this->udflib->isUDFColumn($eqmd->name, $eqmd->type))
|
||||
{
|
||||
// If UDFs are inside this result set
|
||||
@@ -968,19 +941,6 @@ class DB_Model extends CI_Model
|
||||
{
|
||||
$resultElement->{$toBeConverted->name} = $this->pgBoolPhp($resultElement->{$toBeConverted->name});
|
||||
}
|
||||
// Integer type
|
||||
elseif ($toBeConverted->type == DB_Model::PGSQL_INT2_TYPE
|
||||
|| $toBeConverted->type == DB_Model::PGSQL_INT4_TYPE
|
||||
|| $toBeConverted->type == DB_Model::PGSQL_INT8_TYPE)
|
||||
{
|
||||
$resultElement->{$toBeConverted->name} = $this->pgIntPhp($resultElement->{$toBeConverted->name});
|
||||
}
|
||||
// Float type
|
||||
elseif ($toBeConverted->type == DB_Model::PGSQL_FLOAT4_TYPE
|
||||
|| $toBeConverted->type == DB_Model::PGSQL_FLOAT8_TYPE)
|
||||
{
|
||||
$resultElement->{$toBeConverted->name} = $this->pgFloatPhp($resultElement->{$toBeConverted->name});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ abstract class FHC_Controller extends CI_Controller
|
||||
protected function terminateWithJsonError($message)
|
||||
{
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(error($message)); // KEEP IT!!!
|
||||
echo json_encode(error($message));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -132,41 +132,31 @@ abstract class FHC_Controller extends CI_Controller
|
||||
{
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($mixed));
|
||||
}
|
||||
|
||||
/**
|
||||
* To download the given file represented by the fileObj parameter.
|
||||
* fileObj has the following structure:
|
||||
* $fileObj->filename
|
||||
* $fileObj->file
|
||||
* $fileObj->name
|
||||
* $fileObj->mimetype
|
||||
* $fileObj->disposition
|
||||
*/
|
||||
|
||||
protected function outputFile($fileObj)
|
||||
{
|
||||
// If the file exists
|
||||
if (isset($fileObj->file) && !isEmptyString($fileObj->file) && file_exists($fileObj->file))
|
||||
if (file_exists($fileObj->file))
|
||||
{
|
||||
$finfo = new finfo(FILEINFO_MIME);
|
||||
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: '. $fileObj->mimetype);
|
||||
header('Content-Type: '. $finfo->file($fileObj->file));
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: ' . filesize($fileObj->file));
|
||||
|
||||
if (isset($fileObj->disposition)
|
||||
&& ($fileObj->disposition == 'inline' || $fileObj->disposition == 'attachment'))
|
||||
|
||||
if (isset($fileObj->disposition) && ($fileObj->disposition == 'inline' || $fileObj->disposition == 'attachment'))
|
||||
{
|
||||
header('Content-Disposition: '. $fileObj->disposition. '; filename="'. $fileObj->name. '"');
|
||||
}
|
||||
|
||||
readfile($fileObj->file); // reads the file content to the output buffer
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise print an error
|
||||
show_error('The provided file does not exist: '.(isset($fileObj->file) ? $fileObj->file : 'file not given'));
|
||||
|
||||
readfile($fileObj->file);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+54
-243
@@ -3,238 +3,113 @@
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Model to work with the filesystem, it represents a directory
|
||||
* It could be extended or could be used directly to work on the given path
|
||||
*
|
||||
*/
|
||||
class FS_Model extends CI_Model
|
||||
abstract class FS_Model extends CI_Model
|
||||
{
|
||||
const READ_MODE = 'r';
|
||||
const READ_WRITE_MODE = 'w+';
|
||||
const READ_APPEND_MODE = 'a+';
|
||||
const BLOCK_SIZE = 8192;
|
||||
const META_URI = 'uri';
|
||||
|
||||
private $_path; // Directory where this model can operate
|
||||
protected $filepath; // Path of the file
|
||||
|
||||
/**
|
||||
* Set properties
|
||||
* Loads FilesystemLib and set properties
|
||||
*/
|
||||
public function __construct($path)
|
||||
public function __construct($filepath = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->_path = $path;
|
||||
}
|
||||
// Load the filesystem library
|
||||
$this->load->library('FilesystemLib');
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Opens a file in read mode and returns its file handle
|
||||
*/
|
||||
public function openRead($filename)
|
||||
{
|
||||
return $this->_open($filename, self::READ_MODE);
|
||||
$this->filepath = $filepath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a file in read and write mode and returns its file handle
|
||||
* If the file does not exist then it is created
|
||||
* Read data from file system
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function openReadWrite($filename)
|
||||
public function read($filename)
|
||||
{
|
||||
return $this->_open($filename, self::READ_WRITE_MODE);
|
||||
}
|
||||
// Check Class-Attributes
|
||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
||||
|
||||
/**
|
||||
* Opens a file in read and append mode and returns its file handle
|
||||
* If the file does not exist then it is created
|
||||
*/
|
||||
public function openReadAppend($filename)
|
||||
{
|
||||
return $this->_open($filename, self::READ_APPEND_MODE);
|
||||
}
|
||||
// Check method parameters
|
||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||
|
||||
/**
|
||||
* Closes a file handle
|
||||
*/
|
||||
public function close($fileHandle)
|
||||
{
|
||||
return fclose($fileHandle) === true ? success() : error('Error while closing the file handler');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a block of bytes from the given file
|
||||
* Returns a success that contains the block
|
||||
* On failure returns an error
|
||||
*/
|
||||
public function readBlock($fileHandle)
|
||||
{
|
||||
// Reads a block of bytes from the file
|
||||
$block = fread($fileHandle, self::BLOCK_SIZE);
|
||||
|
||||
// If an error occurred
|
||||
if ($block === false)
|
||||
if (!is_null($data = $this->filesystemlib->read($this->filepath, $filename)))
|
||||
{
|
||||
// Prepare the error message
|
||||
$errorMsg = 'An error occurred while reading a file';
|
||||
|
||||
// Tries to get the file name and to concatenate it to the error message
|
||||
$fileMetaData = stream_get_meta_data($fileHandle);
|
||||
if (isset($fileMetaData[self::META_URI])) $errorMsg .= ': '.$fileMetaData[self::META_URI];
|
||||
|
||||
return error($errorMsg); // returns the error
|
||||
return success(base64_encode($data));
|
||||
}
|
||||
|
||||
return success($block); // return success if everything was fine
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes/appends (depending on how the file was opened) a content into a file
|
||||
* Returns a success that contains the written number of bytes
|
||||
* On failure returns an error
|
||||
*/
|
||||
public function write($fileHandle, $content)
|
||||
{
|
||||
// Writes the provided content to the file
|
||||
$writeResult = fwrite($fileHandle, $content);
|
||||
|
||||
// If an error occurred
|
||||
if ($writeResult === false)
|
||||
else
|
||||
{
|
||||
$errorMsg = 'An error occurred while writing a file';
|
||||
|
||||
// Tries to get the file name and to concatenate it to the error message
|
||||
$fileMetaData = stream_get_meta_data($fileHandle);
|
||||
if (isset($fileMetaData[self::META_URI])) $errorMsg .= ': '.$fileMetaData[self::META_URI];
|
||||
|
||||
return error($errorMsg); // returns the error
|
||||
return error('An error occurred while reading a file', EXIT_ERROR);
|
||||
}
|
||||
|
||||
return success($writeResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a given file
|
||||
* Writing data to file system
|
||||
*
|
||||
* @param string $fileContent File content
|
||||
* @return object
|
||||
*/
|
||||
public function remove($filename)
|
||||
public function write($filename, $content)
|
||||
{
|
||||
// Check if the property _path represents a valid directory
|
||||
$checkResult = $this->_checkPath();
|
||||
// Check Class-Attributes
|
||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
||||
|
||||
if (isError($checkResult)) return $checkResult; // If not then return the error
|
||||
// Check method parameters
|
||||
if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR);
|
||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||
|
||||
// Check filename
|
||||
if (isEmptyString($filename)) return error('The given filename is not valid');
|
||||
|
||||
// remove file
|
||||
if (unlink($this->_path.DIRECTORY_SEPARATOR.$filename) === true)
|
||||
if ($this->filesystemlib->write($this->filepath, $filename, base64_decode($content)) === true)
|
||||
{
|
||||
return success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('An error occurred while removing a file');
|
||||
return error('An error occurred while writing a file', EXIT_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------
|
||||
// Old public methods that work with the base64 encoding, not to be used!
|
||||
|
||||
/**
|
||||
* Read data from the given file and encode its content to base64
|
||||
* Append data to a file
|
||||
*
|
||||
* @param array $data File content
|
||||
* @return array
|
||||
*/
|
||||
public function readBase64($filename)
|
||||
public function append($filename, $content)
|
||||
{
|
||||
// Open the file in read mode
|
||||
$openReadResult = $this->openRead($filename);
|
||||
if (isError($openReadResult)) return $openReadResult; // if an error occurred then return it
|
||||
// Check Class-Attributes
|
||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
||||
|
||||
$fileContent = ''; // to store the file content
|
||||
$fileHandle = getData($openReadResult); // get the file handle
|
||||
// Check method parameters
|
||||
if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR);
|
||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||
|
||||
// While the end of the file is not reached and the read does not fail
|
||||
while (!feof($fileHandle) && isSuccess($readBlockResult = $this->readBlock($fileHandle)))
|
||||
if ($this->filesystemlib->append($this->filepath, $filename, base64_decode($content)) === true)
|
||||
{
|
||||
// Concatenate the content of the file
|
||||
$fileContent .= getData($readBlockResult);
|
||||
return success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('An error occurred while appending to a file', EXIT_ERROR);
|
||||
}
|
||||
|
||||
// If an error occurred while reading then return it
|
||||
if (isError($readBlockResult)) return $readBlockResult;
|
||||
|
||||
// Close the file handler
|
||||
$closeResult = $this->close($fileHandle);
|
||||
if (isError($closeResult)) return $closeResult; // if it fails then return the error
|
||||
|
||||
// If everything was fine encode the file content into base64 and return it as a success
|
||||
return success(base64_encode($fileContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the given content into the given file. The content is base64 encoded
|
||||
*/
|
||||
public function writeBase64($filename, $content)
|
||||
{
|
||||
// Open the file in read and write mode
|
||||
$openWriteResult = $this->openReadWrite($filename);
|
||||
if (isError($openWriteResult)) return $openWriteResult; // if an error occurred then return it
|
||||
|
||||
$fileHandle = getData($openWriteResult); // get the file handle
|
||||
|
||||
// Writes the given base64 encoded content into to given file
|
||||
$writeResult = $this->write($fileHandle, base64_decode($content));
|
||||
// If an error occurred while writing then return it
|
||||
if (isError($writeResult)) return $writeResult;
|
||||
|
||||
// Close the file handler
|
||||
$closeResult = $this->close($fileHandle);
|
||||
if (isError($closeResult)) return $closeResult; // if it fails then return the error
|
||||
|
||||
// If everything was fine
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the given content into the given file. The content is base64 encoded
|
||||
*/
|
||||
public function appendBase64($filename, $content)
|
||||
{
|
||||
// Open the file in read and append mode
|
||||
$openWriteResult = $this->openReadAppend($filename);
|
||||
if (isError($openWriteResult)) return $openWriteResult; // if an error occurred then return it
|
||||
|
||||
$fileHandle = getData($openWriteResult); // get the file handle
|
||||
|
||||
// Writes the given base64 encoded content into to given file
|
||||
$writeResult = $this->write($fileHandle, base64_decode($content));
|
||||
// If an error occurred while writing then return it
|
||||
if (isError($writeResult)) return $writeResult;
|
||||
|
||||
// Close the file handler
|
||||
$closeResult = $this->close($fileHandle);
|
||||
if (isError($closeResult)) return $closeResult; // if it fails then return the error
|
||||
|
||||
// If everything was fine
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete data from file system
|
||||
* NOTE: it does not work with the base64 encoding but it has been kept for retro compatibility
|
||||
*
|
||||
* @param string $id Primary Key for DELETE
|
||||
* @return array
|
||||
*/
|
||||
public function removeBase64($filename)
|
||||
public function remove($filename)
|
||||
{
|
||||
// Check Class-Attributes
|
||||
if (is_null($this->_path)) return error('The given _path in not valid', EXIT_ERROR);
|
||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
||||
|
||||
// Check method parameters
|
||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||
|
||||
if (unlink($this->_path.DIRECTORY_SEPARATOR.$filename) === true)
|
||||
if ($this->filesystemlib->remove($this->filepath, $filename) === true)
|
||||
{
|
||||
return success();
|
||||
}
|
||||
@@ -246,21 +121,20 @@ class FS_Model extends CI_Model
|
||||
|
||||
/**
|
||||
* Rename a file
|
||||
* NOTE: it does not work with the base64 encoding but it has been kept for retro compatibility
|
||||
*
|
||||
* @param string $id Primary Key for DELETE
|
||||
* @return array
|
||||
*/
|
||||
public function renameBase64($filename, $newFilename)
|
||||
public function rename($filename, $newFilename)
|
||||
{
|
||||
// Check Class-Attributes
|
||||
if (is_null($this->_path)) return error('The given _path in not valid', EXIT_ERROR);
|
||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
||||
|
||||
// Check method parameters
|
||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||
if (is_null($newFilename)) return error('The given new filename is not valid', EXIT_ERROR);
|
||||
|
||||
if (rename($this->_path.DIRECTORY_SEPARATOR.$filename, $this->_path.DIRECTORY_SEPARATOR.$newFilename) === true)
|
||||
if ($this->filesystemlib->rename($this->filepath, $filename, $this->filepath, $newFilename) === true)
|
||||
{
|
||||
return success();
|
||||
}
|
||||
@@ -269,67 +143,4 @@ class FS_Model extends CI_Model
|
||||
return error('An error occurred while renaming a file', EXIT_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Checks if the given $this->_path is a valid directory
|
||||
*/
|
||||
private function _checkPath()
|
||||
{
|
||||
// If _path...
|
||||
if (!isEmptyString($this->_path) // ...is a not empty string...
|
||||
&& file_exists($this->_path) && is_dir($this->_path)) // ...exists on the file system and it is a directory...
|
||||
{
|
||||
return success(); // return a success
|
||||
}
|
||||
|
||||
// If not a valid path return an error
|
||||
return error('The given path is not valid: '.$this->_path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a file using the provided mode
|
||||
* It returns a file handle
|
||||
* Or write and append if the file does not exist then creates it
|
||||
*/
|
||||
private function _open($filename, $mode)
|
||||
{
|
||||
// Check if the property _path represents a valid directory
|
||||
$checkResult = $this->_checkPath();
|
||||
if (isError($checkResult)) return $checkResult; // If not then return the error
|
||||
|
||||
// Full file path: path + filename
|
||||
$fileFullPath = $this->_path.DIRECTORY_SEPARATOR.$filename;
|
||||
|
||||
// If needed then check if the file exists and really it is a file
|
||||
if ($mode == self::READ_MODE && (!file_exists($fileFullPath) || !is_file($fileFullPath)))
|
||||
{
|
||||
return error('Trying to read a not existing file');
|
||||
}
|
||||
|
||||
// If needed then check if it is possible to read from the path and the file
|
||||
if ($mode == self::READ_MODE && (!is_readable($this->_path) || !is_readable($fileFullPath)))
|
||||
{
|
||||
return error('The given path or filename are not readable: '.$fileFullPath);
|
||||
}
|
||||
|
||||
// If needed then check if the path and the filename are writable
|
||||
if (($mode == self::READ_WRITE_MODE || $mode == self::READ_APPEND_MODE)
|
||||
&& (!is_writable($this->_path) || (file_exists($fileFullPath) && !is_writable($fileFullPath))))
|
||||
{
|
||||
return error('The given path or filename are not writable: '.$fileFullPath);
|
||||
}
|
||||
|
||||
// Open the file in read mode
|
||||
$fileHandle = fopen($fileFullPath, $mode);
|
||||
|
||||
// If it was a failure the return the error
|
||||
if ($fileHandle === false) return error('An error occurred while opening a file in '.$mode.' mode');
|
||||
|
||||
// Otherwise return the file handle
|
||||
return success($fileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,268 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2022 fhcomplete.net
|
||||
* @license GPLv3
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class AkteLib
|
||||
{
|
||||
const AKTE_KATEGORIE_KURZBZ = 'Akte'; // kategorie_kurzbz of dms when inserting for akte
|
||||
|
||||
private $_ci; // Code igniter instance
|
||||
private $_who; // who added this document
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct($params = null)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
// Set the the _who property
|
||||
$this->_who = 'Akte system'; // default
|
||||
// It is possible to set it using the who parameter
|
||||
if (!isEmptyArray($params) && isset($params['who']) && !isEmptyString($params['who'])) $this->_who = $params['who'];
|
||||
|
||||
$this->_ci->load->model('crm/Akte_model', 'AkteModel');
|
||||
$this->_ci->load->model('content/DmsFS_model', 'DmsFSModel');
|
||||
|
||||
$this->_ci->load->library('DmsLib');
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a new file, adds a new dms entry with given akte data,
|
||||
* adds a new dms version 0 for the written file, and adds Akte if dms add was successfull
|
||||
* Returns success with inserted akte id or error
|
||||
*/
|
||||
public function add(
|
||||
$person_id, $dokument_kurzbz, $titel, $mimetype, $fileHandle, // Required parameters
|
||||
$bezeichnung = null, $archiv = false, $signiert = false, $stud_selfservice = false
|
||||
)
|
||||
{
|
||||
// add new dms entry and new dms version for the Akte, using Akte data (title, mimetype, file content as handle)
|
||||
$dmsAddResult = $this->_ci->dmslib->add($titel, $mimetype, $fileHandle, self::AKTE_KATEGORIE_KURZBZ, $dokument_kurzbz, $bezeichnung);
|
||||
|
||||
if (isError($dmsAddResult)) return $dmsAddResult;
|
||||
|
||||
if (!hasData($dmsAddResult)) return error("Dms document could not be added");
|
||||
|
||||
$dmsAddData = getData($dmsAddResult);
|
||||
|
||||
// insert the Akte
|
||||
return $this->_ci->AkteModel->insert(
|
||||
array(
|
||||
'person_id' => $person_id,
|
||||
'dokument_kurzbz' => $dokument_kurzbz,
|
||||
'titel' => $titel,
|
||||
'mimetype' => $mimetype,
|
||||
'bezeichnung' => $bezeichnung,
|
||||
'erstelltam' => date('Y-m-d'),
|
||||
'dms_id' => $dmsAddData->dms_id,
|
||||
'archiv' => $archiv,
|
||||
'signiert' => $signiert,
|
||||
'stud_selfservice' => $stud_selfservice,
|
||||
'insertamum' => date('Y-m-d H:i:s'),
|
||||
'insertvon' => $this->_who
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a new file, adds a new dms version 0 for the written file, and updates Akte if dms version add was successfull
|
||||
* Returns success with updated akte id or error
|
||||
*/
|
||||
public function update($akte_id, $titel, $mimetype, $fileHandle, $bezeichnung = null, $archiv = false, $signiert = false, $stud_selfservice = false)
|
||||
{
|
||||
// check if Akte with dms exists
|
||||
$this->_ci->AkteModel->addSelect('dms_id');
|
||||
$akteResult = $this->_ci->AkteModel->load($akte_id);
|
||||
|
||||
if (isError($akteResult)) return $akteResult;
|
||||
|
||||
if (!hasData($akteResult)) return error("Akte not found");
|
||||
|
||||
$dms_id = getData($akteResult)[0]->dms_id;
|
||||
|
||||
if (isEmptyString($dms_id)) return error("Akte has no dms document");
|
||||
|
||||
// if Akte with dms found, update the last dms version
|
||||
$dmsUpdateResult = $this->_ci->dmslib->updateLastVersion($dms_id, $fileHandle, $titel, $mimetype, $bezeichnung);
|
||||
|
||||
if (isError($dmsUpdateResult)) return $dmsUpdateResult;
|
||||
|
||||
if (!hasData($dmsUpdateResult)) return error("Dms document could not be updated");
|
||||
|
||||
// update the Akte
|
||||
return $this->_ci->AkteModel->update(
|
||||
$akte_id,
|
||||
array(
|
||||
'titel' => $titel,
|
||||
'mimetype' => $mimetype,
|
||||
'bezeichnung' => $bezeichnung,
|
||||
'erstelltam' => date('Y-m-d'),
|
||||
'dms_id' => $dms_id,
|
||||
'archiv' => $archiv,
|
||||
'signiert' => $signiert,
|
||||
'stud_selfservice' => $stud_selfservice,
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => $this->_who
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets akte data and associated dms data by akte Id
|
||||
* Returns success with akte and dms data or error
|
||||
*/
|
||||
public function get($akte_id)
|
||||
{
|
||||
// get Akte data
|
||||
$this->_ci->AkteModel->addSelect('person_id, dokument_kurzbz, mimetype, erstelltam, titel, bezeichnung,
|
||||
gedruckt, uid, dms_id, nachgereicht, nachgereicht_am, anmerkung,
|
||||
ausstellungsnation, formal_geprueft_amum, archiv, signiert,
|
||||
stud_selfservice, akzeptiertamum, insertvon, insertamum, updatevon, updateamum');
|
||||
$this->_ci->AkteModel->load($akte_id);
|
||||
$akteResult = $this->_ci->AkteModel->load($akte_id);
|
||||
|
||||
if (isError($akteResult)) return $akteResult;
|
||||
|
||||
if (!hasData($akteResult)) return error("Akte not found");
|
||||
|
||||
$resultObject = getData($akteResult)[0];
|
||||
|
||||
// set properties with same name in Akte and Dms table
|
||||
$resultObject->akte_mimetype = $resultObject->mimetype;
|
||||
|
||||
// get dms data
|
||||
$dmsResult = $this->_ci->dmslib->getLastVersion($resultObject->dms_id);
|
||||
|
||||
if (isError($dmsResult)) return $dmsResult;
|
||||
|
||||
// properties to retrieve from dms
|
||||
$dmsProperties = array('version', 'filename', 'mimetype', 'name', 'beschreibung', 'cis_suche', 'schlagworte', DmsLib::FILE_CONTENT_PROPERTY);
|
||||
|
||||
// set dms properties
|
||||
if (hasData($dmsResult))
|
||||
{
|
||||
$dmsData = getData($dmsResult);
|
||||
|
||||
foreach ($dmsProperties as $dmsProperty)
|
||||
{
|
||||
$resultObject->{$dmsProperty} = $dmsData->{$dmsProperty};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// set null if no dms result found
|
||||
foreach ($dmsProperties as $dmsProperty)
|
||||
{
|
||||
$resultObject->{$dmsProperty} = null;
|
||||
}
|
||||
}
|
||||
|
||||
// return the object containing akte and dms data
|
||||
return success($resultObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Akte data and associated dms data by person Id and dokument_kurzbz
|
||||
* Returns success with result array with akte and dms data or error
|
||||
*/
|
||||
public function getByPersonIdAndDocumentType($person_id, $dokument_kurzbz)
|
||||
{
|
||||
// load all Akte entries for given person and dokument_kurzbz
|
||||
$this->_ci->AkteModel->addSelect('akte_id');
|
||||
$akteResult = $this->_ci->AkteModel->loadWhere(
|
||||
array(
|
||||
'person_id' => $person_id,
|
||||
'dokument_kurzbz' => $dokument_kurzbz
|
||||
)
|
||||
);
|
||||
|
||||
if (!hasData($akteResult)) return error("Akte not found");
|
||||
|
||||
$akteData = getData($akteResult);
|
||||
|
||||
$resultArr = array();
|
||||
|
||||
// for each found akte entry
|
||||
foreach ($akteData as $akte)
|
||||
{
|
||||
// get dms and akte data from akte Id
|
||||
$getAkteDmsResult = $this->get($akte->akte_id);
|
||||
|
||||
if (isError($getAkteDmsResult)) return $getAkteDmsResult;
|
||||
|
||||
$resultArr[] = getData($getAkteDmsResult);
|
||||
}
|
||||
|
||||
// return all found entries
|
||||
return success($resultArr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Akte by akte Id, removes all associated dms entries and versions, and deletes all associated files
|
||||
* Returns success with removed version numbers or error
|
||||
*/
|
||||
public function remove($akte_id)
|
||||
{
|
||||
// get dms_id for akte
|
||||
$this->_ci->AkteModel->addSelect('dms_id');
|
||||
$akteResult = $this->_ci->AkteModel->load($akte_id);
|
||||
|
||||
if (isError($akteResult)) return $akteResult;
|
||||
|
||||
if (!hasData($akteResult)) return error("Akte not found");
|
||||
|
||||
$dms_id = getData($akteResult)[0]->dms_id;
|
||||
$error = null;
|
||||
|
||||
// Start DB transaction to avoid deleting only part of the data
|
||||
$this->_ci->db->trans_begin();
|
||||
|
||||
// delete Akte
|
||||
$deleteResult = $this->_ci->AkteModel->delete($akte_id);
|
||||
|
||||
if (isError($deleteResult))
|
||||
{
|
||||
$error = $deleteResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove all dms entry for dms of the akte
|
||||
$removeAllResult = $this->_ci->dmslib->removeAll($dms_id);
|
||||
|
||||
if (isError($removeAllResult))
|
||||
$error = $removeAllResult;
|
||||
}
|
||||
|
||||
// Transaction complete!
|
||||
$this->_ci->db->trans_complete();
|
||||
|
||||
// Check if everything went ok during the transaction
|
||||
if ($this->_ci->db->trans_status() === false || isset($error))
|
||||
{
|
||||
$this->_ci->db->trans_rollback();
|
||||
|
||||
// return occured error
|
||||
if (isset($error))
|
||||
return $error;
|
||||
else
|
||||
return error("Error occured when deleting, rolled back");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_ci->db->trans_commit();
|
||||
|
||||
// return removed dms entry data
|
||||
return $removeAllResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,24 +80,14 @@ class AnrechnungLib
|
||||
// Get latest ZGV
|
||||
$result = $this->ci->PrestudentModel->getLatestZGVBezeichnung($prestudent_id);
|
||||
$latest_zgv_bezeichnung = hasData($result) ? getData($result)[0]->bezeichnung : '';
|
||||
|
||||
// Get Sum of berufliche and schulische ECTS
|
||||
$result = $this->ci->LehrveranstaltungModel->getEctsSumSchulisch($uid, $prestudent_id, $lv->studiengang_kz);
|
||||
$sumEctsSchulisch = getData($result)[0]->ectssumschulisch;
|
||||
|
||||
$result = $this->ci->LehrveranstaltungModel->getEctsSumBeruflich($uid);
|
||||
$sumEctsBeruflich = getData($result)[0]->ectssumberuflich;
|
||||
|
||||
|
||||
// Set the given studiensemester
|
||||
$antrag_data->lv_id = $lv_id;
|
||||
$antrag_data->lv_bezeichnung = $lv->bezeichnung;
|
||||
$antrag_data->ects = $lv->ects;
|
||||
$antrag_data->sumEctsSchulisch = $sumEctsSchulisch;
|
||||
$antrag_data->sumEctsBeruflich = $sumEctsBeruflich;
|
||||
$antrag_data->studiensemester_kurzbz = $studiensemester_kurzbz;
|
||||
$antrag_data->vorname = $person->vorname;
|
||||
$antrag_data->nachname = $person->nachname;
|
||||
$antrag_data->student_uid = $uid;
|
||||
$antrag_data->matrikelnr = $student->matrikelnr;
|
||||
$antrag_data->studiengang_kz = $studiengang->studiengang_kz;
|
||||
$antrag_data->stg_bezeichnung = $studiengang->bezeichnung;
|
||||
@@ -122,7 +112,6 @@ class AnrechnungLib
|
||||
|
||||
$anrechnung_data = new StdClass();
|
||||
|
||||
$this->ci->AnrechnungModel->addJoin('lehre.tbl_anrechnung_begruendung', 'begruendung_id');
|
||||
$result = $this->ci->AnrechnungModel->load($anrechnung_id);
|
||||
|
||||
if (isError($result))
|
||||
@@ -156,7 +145,6 @@ class AnrechnungLib
|
||||
$anrechnung_data->prestudent_id = '';
|
||||
$anrechnung_data->lehrveranstaltung = '';
|
||||
$anrechnung_data->begruendung_id = '';
|
||||
$anrechnung_data->begruendung = '';
|
||||
$anrechnung_data->anmerkung = '';
|
||||
$anrechnung_data->dms_id = '';
|
||||
$anrechnung_data->insertamum = '';
|
||||
@@ -167,7 +155,6 @@ class AnrechnungLib
|
||||
$anrechnung_data->status = getUserLanguage() == 'German' ? 'neu' : 'new';
|
||||
$anrechnung_data->dokumentname = '';
|
||||
|
||||
$this->ci->AnrechnungModel->addJoin('lehre.tbl_anrechnung_begruendung', 'begruendung_id');
|
||||
$result = $this->ci->AnrechnungModel->loadWhere(
|
||||
array(
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
@@ -813,7 +800,6 @@ class AnrechnungLib
|
||||
$anrechnung_data->prestudent_id = $anrechnung->prestudent_id;
|
||||
$anrechnung_data->lehrveranstaltung_id = $anrechnung->lehrveranstaltung_id;
|
||||
$anrechnung_data->begruendung_id = $anrechnung->begruendung_id;
|
||||
$anrechnung_data->begruendung = $anrechnung->bezeichnung;
|
||||
$anrechnung_data->anmerkung = $anrechnung->anmerkung_student;
|
||||
$anrechnung_data->dms_id = $anrechnung->dms_id;
|
||||
$anrechnung_data->insertamum = (new DateTime($anrechnung->insertamum))->format('d.m.Y');
|
||||
@@ -837,110 +823,4 @@ class AnrechnungLib
|
||||
|
||||
return $anrechnung_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* If Student is a Quereinsteiger, get ECTS Summe of all angerechnete Studiensemester.
|
||||
*
|
||||
* @param $prestudent_id
|
||||
* @param $studiengang_kz Studiengang_kz der LV
|
||||
* @return int|mixed
|
||||
*/
|
||||
public function getQuereinsteigerEctsSumme($prestudent_id, $studiengang_kz)
|
||||
{
|
||||
$sumEctsQuereinsteiger = 0;
|
||||
|
||||
// Check, if student is Quereinsteiger
|
||||
$this->ci->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
$result = $this->ci->PrestudentstatusModel->getFirstStatus($prestudent_id, 'Student');
|
||||
|
||||
$prestudentFirstStudentStatus = getData($result)[0];
|
||||
|
||||
// If Prestudent is not a Quereinsteiger
|
||||
if ($prestudentFirstStudentStatus->ausbildungssemester == 1)
|
||||
{
|
||||
return $sumEctsQuereinsteiger; // return 0
|
||||
}
|
||||
|
||||
$anzahlAngerechneteStudiensemester = $prestudentFirstStudentStatus->ausbildungssemester - 1;
|
||||
|
||||
// If Prestudent is a Quereinsteiger
|
||||
if ($prestudentFirstStudentStatus->ausbildungssemester > 1)
|
||||
{
|
||||
// Get the 'angerechnete Studiensemester'
|
||||
$this->ci->load->model('organisations/Studiensemester_model', 'StudiensemesterModel');
|
||||
$result = $this->ci->StudiensemesterModel->getPreviousFrom(
|
||||
$prestudentFirstStudentStatus->studiensemester_kurzbz,
|
||||
$anzahlAngerechneteStudiensemester
|
||||
);
|
||||
|
||||
// Get ECTS Summe of each 'angerechnetes Studiensemester'
|
||||
foreach (getData($result) as $studiensemester)
|
||||
{
|
||||
$result = $this->ci->LehrveranstaltungModel->getSumQuereinstiegsECTSProSemester(
|
||||
$studiengang_kz,
|
||||
$studiensemester->studiensemester_kurzbz,
|
||||
$anzahlAngerechneteStudiensemester--,
|
||||
$prestudentFirstStudentStatus->orgform_kurzbz
|
||||
);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$sumEctsQuereinsteiger = $sumEctsQuereinsteiger + getData($result)[0]->sum_ects;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $sumEctsQuereinsteiger; // return sum of ects of all 'angerechnete Studiensemester'
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ECTS Summe of all Anrechnungen based on schulische Kenntnisse.
|
||||
*
|
||||
* @param $student_uid
|
||||
* @return int|mixed
|
||||
*/
|
||||
public function getSchulischeAnrechnungenEctsSumme($student_uid)
|
||||
{
|
||||
$sumEctsSchule = 0;
|
||||
|
||||
$result = $this->ci->LehrveranstaltungModel->getSumAngerechneteECTSByBegruendung($student_uid);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $ects)
|
||||
{
|
||||
if ($ects->begruendung_id != 4)
|
||||
{
|
||||
$sumEctsSchule = $sumEctsSchule + $ects->sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $sumEctsSchule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ECTS Summe of all Anrechnungen based on berufliche Kenntnisse.
|
||||
*
|
||||
* @param $student_uid
|
||||
* @return int
|
||||
*/
|
||||
public function getBeruflicheAnrechnungenEctsSumme($student_uid)
|
||||
{
|
||||
$sumEctsBeruflich = 0;
|
||||
|
||||
$result = $this->ci->LehrveranstaltungModel->getSumAngerechneteECTSByBegruendung($student_uid);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $ects)
|
||||
{
|
||||
if ($ects->begruendung_id == 4)
|
||||
{
|
||||
$sumEctsBeruflich = $ects->sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $sumEctsBeruflich;
|
||||
}
|
||||
}
|
||||
|
||||
+148
-589
@@ -1,483 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2022 fhcomplete.net
|
||||
* @license GPLv3
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \stdClass as stdClass;
|
||||
|
||||
class DmsLib
|
||||
class DmsLib extends FHC_Controller
|
||||
{
|
||||
const FILE_CONTENT_PROPERTY = 'file_content'; // property name for file content
|
||||
|
||||
private $_ci; // code igniter instance
|
||||
private $_who; // who added this document
|
||||
const FILE_CONTENT_PROPERTY = 'file_content';
|
||||
|
||||
private $UPLOAD_PATH = DMS_PATH; // temporary directory to store the upload file
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct($params = null)
|
||||
public function __construct()
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
$this->ci =& get_instance();
|
||||
|
||||
// Set the the _who property
|
||||
$this->_who = 'DMS system'; // default
|
||||
// It is possible to set it using the who parameter
|
||||
if (!isEmptyArray($params) && isset($params['who']) && !isEmptyString($params['who'])) $this->_who = $params['who'];
|
||||
|
||||
$this->_ci->load->model('crm/Akte_model', 'AkteModel'); // deprecated, should not be used here!
|
||||
$this->_ci->load->model('content/Dms_model', 'DmsModel');
|
||||
$this->_ci->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||
$this->_ci->load->model('content/DmsFS_model', 'DmsFSModel');
|
||||
$this->ci->load->model('crm/Akte_model', 'AkteModel');
|
||||
$this->ci->load->model('content/Dms_model', 'DmsModel');
|
||||
$this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||
$this->ci->load->model('content/DmsFS_model', 'DmsFSModel');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Writes a new file, adds a new dms entry and a new dms version 0 for the written file
|
||||
* Returns success info of added dms entry (dms_id, version, filename) or error
|
||||
*/
|
||||
public function add(
|
||||
$name, $mimetype, $fileHandle, // Required parameters
|
||||
$kategorie_kurzbz = null, $dokument_kurzbz = null, $beschreibung = null, $cis_suche = false, $schlagworte = null
|
||||
)
|
||||
{
|
||||
// create unique filename, using original document name to detect file extension
|
||||
$filename = $this->_getUniqueFilename($name);
|
||||
|
||||
// copy file from fileHandle to dms folder
|
||||
$copyFileResult = $this->_copyFile($fileHandle, $filename);
|
||||
|
||||
if (isError($copyFileResult)) return $copyFileResult;
|
||||
|
||||
// if file written successful, insert dms
|
||||
$dmsResult = $this->_ci->DmsModel->insert(
|
||||
array(
|
||||
'kategorie_kurzbz' => $kategorie_kurzbz,
|
||||
'dokument_kurzbz' => $dokument_kurzbz
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($dmsResult)) return $dmsResult;
|
||||
|
||||
if (hasData($dmsResult))
|
||||
{
|
||||
$dms_id = getData($dmsResult);
|
||||
$version = 0;
|
||||
|
||||
// insert dms version
|
||||
$dmsVersion = array(
|
||||
'dms_id' => $dms_id,
|
||||
'version' => $version,
|
||||
'filename' => $filename,
|
||||
'mimetype' => $mimetype,
|
||||
'name' => $name,
|
||||
'beschreibung' => $beschreibung,
|
||||
'cis_suche' => $cis_suche,
|
||||
'schlagworte' => $schlagworte,
|
||||
'insertvon' => $this->_who,
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
$dmsVersionResult = $this->_ci->DmsVersionModel->insert($dmsVersion);
|
||||
|
||||
if (isError($dmsVersionResult)) return $dmsVersionResult;
|
||||
|
||||
// return dms info
|
||||
$resObj = new stdClass();
|
||||
$resObj->dms_id = $dms_id;
|
||||
$resObj->version = $version;
|
||||
$resObj->filename = $filename;
|
||||
|
||||
return success($resObj);
|
||||
}
|
||||
else
|
||||
return error("error when inserting DMS");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a new file with content of fileHandle, adds a new dms version (max version number + 1) for the written file
|
||||
* Returns success with info of added dms version (version, filename) or error
|
||||
*/
|
||||
public function addNewVersion($dms_id, $fileHandle, $name = null, $mimetype = null, $beschreibung = null, $cis_suche = false, $schlagworte = null)
|
||||
{
|
||||
// get the latest version
|
||||
$lastVersionResult = $this->getLastVersion($dms_id);
|
||||
|
||||
if (isError($lastVersionResult)) return $lastVersionResult;
|
||||
|
||||
if (hasData($lastVersionResult))
|
||||
{
|
||||
$lastVersion = getData($lastVersionResult);
|
||||
|
||||
$originalName = isset($name) ? $name : $lastVersion->name;
|
||||
|
||||
// create unique filename, using original document name to detect file extension
|
||||
$filename = $this->_getUniqueFilename($originalName);
|
||||
|
||||
// copy file from fileHandle to dms folder
|
||||
$copyFileResult = $this->_copyFile($fileHandle, $filename);
|
||||
|
||||
if (isError($copyFileResult)) return $copyFileResult;
|
||||
|
||||
// insert new version
|
||||
$newVersionNumber = $lastVersion->version + 1;
|
||||
|
||||
// if new parameters given, use them, otherwise use parameters from last version
|
||||
$newVersion = array(
|
||||
'dms_id' => $dms_id,
|
||||
'name' => $originalName,
|
||||
'filename' => $filename,
|
||||
'version' => $newVersionNumber,
|
||||
'mimetype' => isset($mimetype) ? $mimetype : $lastVersion->mimetype,
|
||||
'beschreibung' => isset($beschreibung) ? $beschreibung : $lastVersion->beschreibung,
|
||||
'cis_suche' => isset($cis_suche) ? $cis_suche : $lastVersion->cis_suche,
|
||||
'schlagworte' => isset($schlagworte) ? $schlagworte : $lastVersion->schlagworte,
|
||||
'insertvon' => $this->_who,
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
$addVersionResult = $this->_ci->DmsVersionModel->insert($newVersion);
|
||||
|
||||
if (isError($addVersionResult)) return $addVersionResult;
|
||||
|
||||
// return dms info
|
||||
$resObj = new stdClass();
|
||||
$resObj->version = $newVersionNumber;
|
||||
$resObj->filename = $filename;
|
||||
|
||||
return success($resObj);
|
||||
}
|
||||
else
|
||||
return error("last version not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the last version (max version number) of a dms entry
|
||||
* Overwrites the file associated with this version with content read from fileHandle
|
||||
* Returns success with info of added dms version (version, filename) or error
|
||||
*/
|
||||
public function updateLastVersion($dms_id, $fileHandle, $name = null, $mimetype = null, $beschreibung = null, $cis_suche = false, $schlagworte = null)
|
||||
{
|
||||
// get the latest version
|
||||
$lastVersionResult = $this->getLastVersion($dms_id);
|
||||
|
||||
if (isError($lastVersionResult)) return $lastVersionResult;
|
||||
|
||||
if (hasData($lastVersionResult))
|
||||
{
|
||||
$lastVersion = getData($lastVersionResult);
|
||||
$filename = $lastVersion->filename;
|
||||
|
||||
// update file in filesystem
|
||||
$copyFileResult = $this->_copyFile($fileHandle, $filename);
|
||||
|
||||
if (isError($copyFileResult)) return $copyFileResult;
|
||||
|
||||
// if new parameters given, use them, otherwise use parameters from last version
|
||||
$newVersion = array(
|
||||
'name' => isset($name) ? $name : $lastVersion->name,
|
||||
'filename' => $filename,
|
||||
'mimetype' => isset($mimetype) ? $mimetype : $lastVersion->mimetype,
|
||||
'beschreibung' => isset($beschreibung) ? $beschreibung : $lastVersion->beschreibung,
|
||||
'cis_suche' => isset($cis_suche) ? $cis_suche : $lastVersion->cis_suche,
|
||||
'schlagworte' => isset($schlagworte) ? $schlagworte : $lastVersion->schlagworte,
|
||||
);
|
||||
|
||||
// update last dms version
|
||||
$addVersionResult = $this->_ci->DmsVersionModel->update(
|
||||
array($dms_id, $lastVersion->version),
|
||||
$newVersion
|
||||
);
|
||||
|
||||
if (isError($addVersionResult)) return $addVersionResult;
|
||||
|
||||
// return dms info
|
||||
$resObj = new stdClass();
|
||||
$resObj->version = $lastVersion->version;
|
||||
$resObj->filename = $filename;
|
||||
|
||||
return success($resObj);
|
||||
}
|
||||
else
|
||||
return error("last version not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets dms version with highest number
|
||||
* Returns success with dms data and fileHandle with file content or error
|
||||
*/
|
||||
public function getLastVersion($dms_id)
|
||||
{
|
||||
// get the latest version number
|
||||
$this->_ci->DmsVersionModel->addSelect('version');
|
||||
$this->_ci->DmsVersionModel->addOrder('version', 'DESC');
|
||||
$this->_ci->DmsVersionModel->addOrder('insertamum', 'DESC');
|
||||
$this->_ci->DmsVersionModel->addLimit(1);
|
||||
$lastDmsVersionResult = $this->_ci->DmsVersionModel->loadWhere(
|
||||
array('dms_id' => $dms_id)
|
||||
);
|
||||
|
||||
if (isError($lastDmsVersionResult)) return $lastDmsVersionResult;
|
||||
|
||||
if (hasData($lastDmsVersionResult))
|
||||
{
|
||||
$lastDmsVersionData = getData($lastDmsVersionResult)[0];
|
||||
$lastDmsVersion = $lastDmsVersionData->version;
|
||||
|
||||
// call get Version with last version number
|
||||
return $this->getVersion($dms_id, $lastDmsVersion);
|
||||
}
|
||||
else
|
||||
return error("Dms last version not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets specified dms version
|
||||
* Returns success with dms data and fileHandle with file content or error
|
||||
*/
|
||||
public function getVersion($dms_id, $version)
|
||||
{
|
||||
$this->_ci->DmsVersionModel->addSelect('dms_id, version, filename, mimetype, name, beschreibung, cis_suche, schlagworte');
|
||||
$dmsVersionResult = $this->_ci->DmsVersionModel->loadWhere(
|
||||
array(
|
||||
'dms_id' => $dms_id,
|
||||
'version' => $version
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($dmsVersionResult)) return $dmsVersionResult;
|
||||
|
||||
if (hasData($dmsVersionResult))
|
||||
{
|
||||
$dmsVersion = getData($dmsVersionResult)[0];
|
||||
|
||||
// get file content as file pointer
|
||||
$fileHandleResult = $this->_ci->DmsFSModel->openRead($dmsVersion->filename);
|
||||
|
||||
if (isError($fileHandleResult)) return $fileHandleResult;
|
||||
|
||||
if (hasData($fileHandleResult))
|
||||
{
|
||||
$fileHandle = getData($fileHandleResult);
|
||||
$dmsVersion->{self::FILE_CONTENT_PROPERTY} = $fileHandle;
|
||||
|
||||
// close file pointer
|
||||
$closeResult = $this->_ci->DmsFSModel->close($fileHandle);
|
||||
|
||||
if (isError($closeResult)) return $closeResult;
|
||||
|
||||
return success($dmsVersion);
|
||||
}
|
||||
else
|
||||
return error("File could not be opened");
|
||||
}
|
||||
else
|
||||
return error("Dms version not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes dms entry and all its versions, deletes all associated files
|
||||
* Returns success with removed version numbers or error
|
||||
*/
|
||||
public function removeAll($dms_id)
|
||||
{
|
||||
$versionsRemoved = array();
|
||||
|
||||
$this->_ci->DmsVersionModel->addSelect('version, filename');
|
||||
$allVersionsResult = $this->_ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
|
||||
|
||||
if (hasData($allVersionsResult))
|
||||
{
|
||||
$allVersionsData = getData($allVersionsResult);
|
||||
|
||||
$error = null;
|
||||
|
||||
// Start DB transaction to avoid deleting only part of the data
|
||||
$this->_ci->db->trans_begin();
|
||||
|
||||
// remove all versions of the dms Id
|
||||
foreach ($allVersionsData as $version)
|
||||
{
|
||||
$removeVersionResult = $this->removeVersion($dms_id, $version->version);
|
||||
|
||||
if (isError($removeVersionResult))
|
||||
{
|
||||
$error = $removeVersionResult;
|
||||
break;
|
||||
}
|
||||
else
|
||||
$versionsRemoved[] = $version; // return removed versions
|
||||
}
|
||||
|
||||
// Transaction complete!
|
||||
$this->_ci->db->trans_complete();
|
||||
|
||||
// Check if everything went ok during the transaction
|
||||
if ($this->_ci->db->trans_status() === false || isset($error))
|
||||
{
|
||||
$this->_ci->db->trans_rollback();
|
||||
|
||||
if (isset($error))
|
||||
return $error;
|
||||
else
|
||||
return error("Error occured when deleting, rolled back");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_ci->db->trans_commit();
|
||||
}
|
||||
}
|
||||
|
||||
return success($versionsRemoved);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes latest version and its associated file
|
||||
* Returns success with removed dms version data (dms_id, version, filename) or error
|
||||
*/
|
||||
public function removeLastVersion($dms_id)
|
||||
{
|
||||
$lastVersionNumber = 0;
|
||||
// get the latest version
|
||||
$lastVersionResult = $this->getLastVersion($dms_id);
|
||||
|
||||
if (isError($lastVersionResult)) return $lastVersionResult;
|
||||
|
||||
if (hasData($lastVersionResult))
|
||||
{
|
||||
$lastVersion = getData($lastVersionResult);
|
||||
$lastVersionNumber = $lastVersion->version;
|
||||
}
|
||||
|
||||
// call remove method for latest version
|
||||
return $this->removeVersion($dms_id, $lastVersionNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes latest version and its associated file
|
||||
* Returns success with removed dms version data (dms_id, version, filename) or error
|
||||
*/
|
||||
public function removeVersion($dms_id, $version)
|
||||
{
|
||||
$removeVersionResultObj = new stdClass();
|
||||
$removeVersionResultObj->dms_id = null;
|
||||
$removeVersionResultObj->version = null;
|
||||
$removeVersionResultObj->filename = null;
|
||||
|
||||
// load dms version and check how many versions there are
|
||||
$db = new DB_Model();
|
||||
|
||||
$checkDeleteResult = $db->execReadOnlyQuery(
|
||||
"SELECT filename,
|
||||
(SELECT count(version)
|
||||
FROM campus.tbl_dms_version dv_anzahl
|
||||
WHERE dv_anzahl.dms_id = dv.dms_id) AS anzahl_versionen
|
||||
FROM campus.tbl_dms_version dv
|
||||
WHERE dms_id=?
|
||||
AND version=?",
|
||||
array($dms_id, $version)
|
||||
);
|
||||
|
||||
if (isError($checkDeleteResult)) return $checkDeleteResult;
|
||||
|
||||
if (hasData($checkDeleteResult))
|
||||
{
|
||||
$checkDeleteData = getData($checkDeleteResult)[0];
|
||||
|
||||
// delete version
|
||||
$deleteVersionResult = $this->_ci->DmsVersionModel->delete(array($dms_id, $version));
|
||||
|
||||
if (isError($deleteVersionResult)) return $deleteVersionResult;
|
||||
|
||||
$removeVersionResultObj->version = $version;
|
||||
$removeVersionResultObj->filename = $checkDeleteData->filename;
|
||||
|
||||
// delete dms too if no versions left
|
||||
if ($checkDeleteData->anzahl_versionen <= 1)
|
||||
{
|
||||
$deleteDmsResult = $this->_ci->DmsModel->delete($dms_id);
|
||||
|
||||
if (isError($deleteDmsResult)) return $deleteDmsResult;
|
||||
|
||||
$removeVersionResultObj->dms_id = $dms_id;
|
||||
}
|
||||
|
||||
// delete file from file system
|
||||
$removeResult = $this->_ci->DmsFSModel->remove($checkDeleteData->filename);
|
||||
|
||||
if (isError($removeResult)) return $removeResult;
|
||||
}
|
||||
|
||||
return success($removeVersionResultObj);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Copies file from sourceFileHandle to destinationFilename in DMS folder
|
||||
* Returns success or error on fail
|
||||
*/
|
||||
private function _copyFile($sourceFileHandle, $destinationFilename)
|
||||
{
|
||||
// get file location from file handle
|
||||
$metaData = stream_get_meta_data($sourceFileHandle);
|
||||
|
||||
if (isset($metaData['uri']) && !isEmptyString($metaData['uri']))
|
||||
{
|
||||
// if file location determined, copy file
|
||||
$source = $metaData['uri'];
|
||||
|
||||
if (copy($source, DMS_PATH.$destinationFilename))
|
||||
{
|
||||
return success();
|
||||
}
|
||||
else
|
||||
{
|
||||
// error if copy returned false
|
||||
return error('error occured while copying file');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// error when source location could not be determined
|
||||
return error('error occured while getting source file name');
|
||||
}
|
||||
|
||||
return success($resObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates unique filename, appends file extension from document name
|
||||
* Returns the filename string
|
||||
*/
|
||||
private function _getUniqueFilename($dokname)
|
||||
{
|
||||
// create unique id
|
||||
$uniqueFilename = uniqid();
|
||||
|
||||
// getting extension of file from document name
|
||||
$fileExtension = pathinfo($dokname, PATHINFO_EXTENSION);
|
||||
|
||||
// if file extension found, append it
|
||||
if (!isEmptyString($fileExtension))
|
||||
$uniqueFilename .= '.'.$fileExtension;
|
||||
|
||||
return $uniqueFilename;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
// Deprecated methods, not to be used
|
||||
|
||||
|
||||
/**
|
||||
* Load a DMS Document.
|
||||
* If no version is particularly given, the latest version is loaded.
|
||||
@@ -490,20 +33,19 @@ class DmsLib
|
||||
{
|
||||
if (is_numeric($dms_id))
|
||||
{
|
||||
$this->_ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||
$this->_ci->DmsModel->addOrder('version', 'DESC');
|
||||
$this->_ci->DmsModel->addLimit(1);
|
||||
|
||||
$this->ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||
$this->ci->DmsModel->addOrder('version', 'DESC');
|
||||
$this->ci->DmsModel->addLimit(1);
|
||||
|
||||
if (!is_numeric($version))
|
||||
{
|
||||
return $this->_ci->DmsModel->load($dms_id);
|
||||
return $this->ci->DmsModel->load($dms_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->_ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
||||
return $this->ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
||||
}
|
||||
}
|
||||
|
||||
return error('The parameter DMS ID must be a number');
|
||||
}
|
||||
|
||||
@@ -515,30 +57,34 @@ class DmsLib
|
||||
*/
|
||||
public function read($dms_id, $version = null)
|
||||
{
|
||||
$result = error('Wrong dms_id parameter');
|
||||
$result = null;
|
||||
|
||||
if (isset($dms_id))
|
||||
{
|
||||
$this->_ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||
$this->_ci->DmsModel->addOrder('version', 'DESC');
|
||||
$this->_ci->DmsModel->addLimit(1);
|
||||
$this->ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||
$this->ci->DmsModel->addOrder('version', 'DESC');
|
||||
$this->ci->DmsModel->addLimit(1);
|
||||
|
||||
if (!isset($version))
|
||||
{
|
||||
$result = $this->_ci->DmsModel->load($dms_id);
|
||||
$result = $this->ci->DmsModel->load($dms_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->_ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
||||
$result = $this->ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
||||
}
|
||||
}
|
||||
|
||||
// If a dms has been found
|
||||
if (hasData($result))
|
||||
if (hasData($result))
|
||||
{
|
||||
$resultFS = $this->ci->DmsFSModel->read($result->retval[0]->filename);
|
||||
if (isSuccess($resultFS))
|
||||
{
|
||||
$resultFS = $this->_ci->DmsFSModel->readBase64(getData($result)[0]->filename);
|
||||
if (isError($resultFS)) return $resultFS; // if an error occurred return it
|
||||
|
||||
$result->retval[0]->{self::FILE_CONTENT_PROPERTY} = getData($resultFS);
|
||||
$result->retval[0]->{DmsLib::FILE_CONTENT_PROPERTY} = $resultFS->retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $resultFS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,22 +101,28 @@ class DmsLib
|
||||
*/
|
||||
public function getAktenAcceptedDms($person_id, $dokument_kurzbz = null, $no_file = null)
|
||||
{
|
||||
$result = $this->_ci->AkteModel->getAktenAcceptedDms($person_id, $dokument_kurzbz);
|
||||
$result = $this->ci->AkteModel->getAktenAcceptedDms($person_id, $dokument_kurzbz);
|
||||
|
||||
if (hasData($result) && $no_file == null)
|
||||
{
|
||||
for ($i = 0; $i < count(getData($result)); $i++)
|
||||
$cnt = count($result->retval);
|
||||
for ($i = 0; $i < $cnt; $i++)
|
||||
{
|
||||
$resultFS = $this->_ci->DmsFSModel->readBase64(getData($result)[$i]->filename);
|
||||
if (isError($resultFS)) return $resultFS; // if an error occurred return it
|
||||
|
||||
$result->retval[$i]->{self::FILE_CONTENT_PROPERTY} = getData($resultFS);
|
||||
$resultFS = $this->ci->DmsFSModel->read($result->retval[$i]->filename);
|
||||
if (isSuccess($resultFS))
|
||||
{
|
||||
$result->retval[$i]->{DmsLib::FILE_CONTENT_PROPERTY} = $resultFS->retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $resultFS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Uploads a document and saves it to DMS
|
||||
* @param $dms DMS assoc array
|
||||
@@ -583,33 +135,32 @@ class DmsLib
|
||||
// Init upload configs
|
||||
$this->_loadUploadLibrary($allowed_types);
|
||||
|
||||
if (!$this->_ci->upload->do_upload($field_name))
|
||||
if (!$this->ci->upload->do_upload($field_name))
|
||||
{
|
||||
return error($this->_ci->upload->display_errors());
|
||||
return error($this->ci->upload->display_errors());
|
||||
}
|
||||
|
||||
$upload_data = $this->_ci->upload->data(); // data about the uploaded file
|
||||
$upload_data = $this->ci->upload->data(); // data about the uploaded file
|
||||
$filename = $upload_data['file_name'];
|
||||
|
||||
// Insert to DMS table
|
||||
$insDmsResult = $this->_ci->DmsModel->insert($this->_ci->DmsModel->filterFields($dms));
|
||||
if (isError($insDmsResult)) return $insDmsResult;
|
||||
|
||||
$upload_data['dms_id'] = getData($insDmsResult);
|
||||
if (!$result = $this->ci->DmsModel->insert($this->ci->DmsModel->filterFields($dms)))
|
||||
{
|
||||
return error('Failed inserting to DMS');
|
||||
}
|
||||
$upload_data['dms_id'] = $result->retval;
|
||||
|
||||
// Insert DMS version
|
||||
$insVersionResult = $this->_ci->DmsVersionModel->insert(
|
||||
$this->_ci->DmsVersionModel->filterFields(
|
||||
$dms,
|
||||
$upload_data['dms_id'],
|
||||
$upload_data['file_name']
|
||||
)
|
||||
);
|
||||
if (isError($insVersionResult)) return $insVersionResult;
|
||||
if (!$result = $this->ci->DmsVersionModel->insert(
|
||||
$this->ci->DmsVersionModel->filterFields($dms, $result->retval, $filename)))
|
||||
{
|
||||
return error('Failed inserting DMS version');
|
||||
}
|
||||
|
||||
// Return result of uploaded data
|
||||
return success($upload_data);
|
||||
// return result of uploaded data
|
||||
return success($upload_data); // data about the uploaded file
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Download a document.
|
||||
*
|
||||
@@ -620,31 +171,38 @@ class DmsLib
|
||||
*/
|
||||
public function download($dms_id, $filename = null, $disposition = 'inline')
|
||||
{
|
||||
// Retrieves info about the given dms
|
||||
$fileInfoResult = $this->getFileInfo($dms_id);
|
||||
if (isError($fileInfoResult)) return error(getError($fileInfoResult));
|
||||
|
||||
// If data have been found
|
||||
if (hasData($fileInfoResult))
|
||||
$result = $this->getFileInfo($dms_id);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$fileObj = getData($fileInfoResult);
|
||||
|
||||
// Change filename, if filename is provided
|
||||
if (!isEmptyString($filename)) $fileObj->name = $filename;
|
||||
|
||||
// Add file disposition if disposition has a valid value
|
||||
if ($disposition == 'attachment' || $disposition == 'inline')
|
||||
{
|
||||
$fileObj->disposition = $disposition;
|
||||
}
|
||||
|
||||
return success($fileObj);
|
||||
return error(getError($result));
|
||||
}
|
||||
|
||||
// If no data have been found then return an empty success
|
||||
return success();
|
||||
$fileObj = getData($result);
|
||||
|
||||
// Change filename, if filename is provided
|
||||
if (is_string($filename))
|
||||
{
|
||||
$fileObj->name = $filename;
|
||||
}
|
||||
|
||||
// Add file disposition
|
||||
if ($disposition == 'attachment')
|
||||
{
|
||||
$fileObj->disposition = 'attachment';
|
||||
}
|
||||
else
|
||||
{
|
||||
$fileObj->disposition = 'inline';
|
||||
}
|
||||
|
||||
// Output file
|
||||
if(!$this->outputFile($fileObj))
|
||||
{
|
||||
return error('Error on file output');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get file information.
|
||||
*
|
||||
@@ -654,28 +212,28 @@ class DmsLib
|
||||
*/
|
||||
public function getFileInfo($dms_id, $version = null)
|
||||
{
|
||||
// Checks the dms_id parameter
|
||||
if (!is_numeric($dms_id)) return error('Wrong parameter');
|
||||
|
||||
// Load DMS from database
|
||||
$result = $this->load($dms_id, $version);
|
||||
if (isError($result)) return error(getError($result));
|
||||
|
||||
// If data have been found
|
||||
if (hasData($result))
|
||||
if (!is_numeric($dms_id))
|
||||
{
|
||||
// Store file information in fileObj
|
||||
$fileObj = new stdClass();
|
||||
$fileObj->filename = getData($result)[0]->filename;
|
||||
$fileObj->file = DMS_PATH.getData($result)[0]->filename;
|
||||
$fileObj->name = DMS_PATH.getData($result)[0]->name; // original user filename
|
||||
$fileObj->mimetype = getData($result)[0]->mimetype;
|
||||
return error('Wrong parameter');
|
||||
}
|
||||
|
||||
// Load file
|
||||
$result = $this->load($dms_id, $version);
|
||||
|
||||
return success($fileObj);
|
||||
if (isError($result))
|
||||
{
|
||||
return error(getError($result));
|
||||
}
|
||||
|
||||
// If no data have been found return an empty success
|
||||
return success();
|
||||
// Store file information in fileObj
|
||||
$fileObj = new StdClass();
|
||||
$fileObj->filename = getData($result)[0]->filename;
|
||||
$fileObj->file = DMS_PATH. getData($result)[0]->filename;
|
||||
$fileObj->name = DMS_PATH. getData($result)[0]->name; // original users filename
|
||||
$fileObj->mimetype = DMS_PATH. getData($result)[0]->mimetype;
|
||||
|
||||
return success($fileObj);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -695,20 +253,20 @@ class DmsLib
|
||||
$result = $this->_saveFileOnInsert($dms);
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$filename = getData($result);
|
||||
$filename = $result->retval;
|
||||
if (isset($dms['dms_id']) && $dms['dms_id'] != '')
|
||||
{
|
||||
$result = $this->_ci->DmsVersionModel->insert(
|
||||
$this->_ci->DmsVersionModel->filterFields($dms, $dms['dms_id'], $filename)
|
||||
$result = $this->ci->DmsVersionModel->insert(
|
||||
$this->ci->DmsVersionModel->filterFields($dms, $dms['dms_id'], $filename)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->_ci->DmsModel->insert($this->_ci->DmsModel->filterFields($dms));
|
||||
$result = $this->ci->DmsModel->insert($this->ci->DmsModel->filterFields($dms));
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$result = $this->_ci->DmsVersionModel->insert(
|
||||
$this->_ci->DmsVersionModel->filterFields($dms, getData($result), $filename)
|
||||
$result = $this->ci->DmsVersionModel->insert(
|
||||
$this->ci->DmsVersionModel->filterFields($dms, $result->retval, $filename)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -719,15 +277,15 @@ class DmsLib
|
||||
$result = $this->_saveFileOnUpdate($dms);
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$result = $this->_ci->DmsModel->update($dms['dms_id'], $this->_ci->DmsModel->filterFields($dms));
|
||||
$result = $this->ci->DmsModel->update($dms['dms_id'], $this->ci->DmsModel->filterFields($dms));
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$result = $this->_ci->DmsVersionModel->update(
|
||||
$result = $this->ci->DmsVersionModel->update(
|
||||
array(
|
||||
$dms['dms_id'],
|
||||
$dms['version']
|
||||
),
|
||||
$this->_ci->DmsVersionModel->filterFields($dms)
|
||||
$this->ci->DmsVersionModel->filterFields($dms)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -750,54 +308,56 @@ class DmsLib
|
||||
if (is_numeric($person_id) && is_numeric($dms_id))
|
||||
{
|
||||
// Start DB transaction
|
||||
$this->_ci->db->trans_start(false);
|
||||
$this->ci->db->trans_start(false);
|
||||
|
||||
// Get akte_id from table tbl_akte
|
||||
$result = $this->_ci->AkteModel->loadWhere(array('person_id' => $person_id, 'dms_id' => $dms_id));
|
||||
$result = $this->ci->AkteModel->loadWhere(array('person_id' => $person_id, 'dms_id' => $dms_id));
|
||||
if (isSuccess($result))
|
||||
{
|
||||
// Delete all entries in tbl_akte
|
||||
for ($i = 0; $i < count(getData($result)); $i++)
|
||||
$cnt = count($result->retval);
|
||||
for ($i = 0; $i < $cnt; $i++)
|
||||
{
|
||||
$this->_ci->AkteModel->delete(getData($result)[$i]->akte_id);
|
||||
$this->ci->AkteModel->delete($result->retval[$i]->akte_id);
|
||||
}
|
||||
|
||||
// Get all filenames related to this dms
|
||||
$resultFileNames = $this->_ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
|
||||
$resultFileNames = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
|
||||
if (isSuccess($resultFileNames))
|
||||
{
|
||||
// Delete from tbl_dms_version
|
||||
$result = $this->_ci->DmsVersionModel->delete(array('dms_id' => $dms_id));
|
||||
$result = $this->ci->DmsVersionModel->delete(array('dms_id' => $dms_id));
|
||||
if (isSuccess($result))
|
||||
{
|
||||
// Delete from tbl_dms
|
||||
$result = $this->_ci->DmsModel->delete($dms_id);
|
||||
$result = $this->ci->DmsModel->delete($dms_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Transaction complete!
|
||||
$this->_ci->db->trans_complete();
|
||||
$this->ci->db->trans_complete();
|
||||
|
||||
// Check if everything went ok during the transaction
|
||||
if ($this->_ci->db->trans_status() === false || isError($result))
|
||||
if ($this->ci->db->trans_status() === false || isError($result))
|
||||
{
|
||||
$this->_ci->db->trans_rollback();
|
||||
$this->ci->db->trans_rollback();
|
||||
$result = error('An error occurred while performing a delete operation', EXIT_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_ci->db->trans_commit();
|
||||
$this->ci->db->trans_commit();
|
||||
$result = success('Dms successfully removed from DB');
|
||||
}
|
||||
|
||||
// If everything is ok
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$cnt = count($resultFileNames->retval);
|
||||
// Remove all files related to this person and dms
|
||||
for ($i = 0; $i < count(getData($resultFileNames)); $i++)
|
||||
for ($i = 0; $i < $cnt; $i++)
|
||||
{
|
||||
$this->_ci->DmsFSModel->removeBase64(getData($resultFileNames)[$i]->filename);
|
||||
$this->ci->DmsFSModel->remove($resultFileNames->retval[$i]->filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -816,19 +376,19 @@ class DmsLib
|
||||
*/
|
||||
public function getAkteContent($akte_id)
|
||||
{
|
||||
$akte = $this->_ci->AkteModel->load($akte_id);
|
||||
$akte = $this->ci->AkteModel->load($akte_id);
|
||||
if (hasData($akte))
|
||||
{
|
||||
if (getData($akte)[0]->inhalt != '')
|
||||
if ($akte->retval[0]->inhalt != '')
|
||||
{
|
||||
return success(base64_decode(getData($akte)[0]->inhalt));
|
||||
return success(base64_decode($akte->retval[0]->inhalt));
|
||||
}
|
||||
elseif (getData($akte)[0]->dms_id != '')
|
||||
elseif ($akte->retval[0]->dms_id != '')
|
||||
{
|
||||
$dmscontent = $this->read(getData($akte)[0]->dms_id);
|
||||
$dmscontent = $this->read($akte->retval[0]->dms_id);
|
||||
if (isSuccess($dmscontent))
|
||||
{
|
||||
return success(base64_decode(getData($dmscontent)[0]->file_content));
|
||||
return success(base64_decode($dmscontent->retval[0]->file_content));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -855,10 +415,10 @@ class DmsLib
|
||||
{
|
||||
$filename = uniqid().'.'.pathinfo($dms['name'], PATHINFO_EXTENSION);
|
||||
|
||||
$result = $this->_ci->DmsFSModel->writeBase64($filename, $dms['file_content']);
|
||||
$result = $this->ci->DmsFSModel->write($filename, $dms['file_content']);
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$result = success($filename);
|
||||
$result->retval = $filename;
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -879,7 +439,7 @@ class DmsLib
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$result = $this->_ci->DmsFSModel->writeBase64(getData($result)[0]->filename, $dms['file_content']);
|
||||
$result = $this->ci->DmsFSModel->write($result->retval[0]->filename, $dms['file_content']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -891,13 +451,12 @@ class DmsLib
|
||||
*/
|
||||
private function _loadUploadLibrary($allowed_types)
|
||||
{
|
||||
$config = array();
|
||||
$config['upload_path'] = DMS_PATH;
|
||||
$config['allowed_types'] = implode('|', $allowed_types);
|
||||
$config['overwrite'] = true;
|
||||
$config['file_name'] = uniqid().'.pdf';
|
||||
$config['upload_path'] = $this->UPLOAD_PATH;
|
||||
$config['allowed_types'] = implode('|', $allowed_types);
|
||||
$config['overwrite'] = true;
|
||||
$config['file_name'] = uniqid().'.pdf';
|
||||
|
||||
$this->_ci->load->library('upload', $config);
|
||||
$this->_ci->upload->initialize($config);
|
||||
$this->ci->load->library('upload', $config);
|
||||
$this->ci->upload->initialize($config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
/***
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class FilesystemLib
|
||||
{
|
||||
/**
|
||||
* checkParameters
|
||||
*/
|
||||
private function checkParameters($filepath, $filename)
|
||||
{
|
||||
if (isset($filepath) && isset($filename) &&
|
||||
$filepath != '' && $filename != '')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* read
|
||||
*/
|
||||
public function read($filepath, $filename)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->checkParameters($filepath, $filename))
|
||||
{
|
||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
||||
if (file_exists($resource) && $fileHandle = fopen($resource, 'r'))
|
||||
{
|
||||
$result = '';
|
||||
while (!feof($fileHandle))
|
||||
{
|
||||
$result .= fread($fileHandle, 8192);
|
||||
}
|
||||
fclose($fileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* write
|
||||
*/
|
||||
public function write($filepath, $filename, $content)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->checkParameters($filepath, $filename) && isset($content))
|
||||
{
|
||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
||||
if (is_writable($filepath) && $fileHandle = fopen($resource, 'w'))
|
||||
{
|
||||
if (fwrite($fileHandle, $content) !== false)
|
||||
{
|
||||
$result = true;
|
||||
}
|
||||
fclose($fileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* append
|
||||
*/
|
||||
public function append($filepath, $filename, $content)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->checkParameters($filepath, $filename) && isset($content))
|
||||
{
|
||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
||||
if (is_writable($resource) && $fileHandle = fopen($resource, 'a'))
|
||||
{
|
||||
if (fwrite($fileHandle, $content) !== false)
|
||||
{
|
||||
$result = true;
|
||||
}
|
||||
fclose($fileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* remove
|
||||
*/
|
||||
public function remove($filepath, $filename)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->checkParameters($filepath, $filename))
|
||||
{
|
||||
if (is_writable($filepath))
|
||||
{
|
||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
||||
$result = unlink($resource);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* rename
|
||||
*/
|
||||
public function rename($filepath, $filename, $newFilepath, $newFilename)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->checkParameters($filepath, $filename) && $this->checkParameters($newFilepath, $newFilename))
|
||||
{
|
||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
||||
if (is_writable($filepath) && is_writable($newFilepath) && file_exists($resource))
|
||||
{
|
||||
$destination = $newFilepath.DIRECTORY_SEPARATOR.$newFilename;
|
||||
$result = rename($resource, $destination);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -340,25 +340,20 @@ class FilterWidgetLib
|
||||
{
|
||||
$filterDefinition = $filters[$filtersCounter]; // definition of one filter
|
||||
|
||||
// If the name of the applied filter is valid
|
||||
if (!isEmptyString($filterDefinition->name))
|
||||
if ($filtersCounter > 0)
|
||||
$where .= ' AND '; // if it's NOT the last one
|
||||
|
||||
if (!isEmptyString($filterDefinition->name)) // if the name of the applied filter is valid
|
||||
{
|
||||
// Build the query conditions
|
||||
$datasetQueryCondition = $this->_getDatasetQueryCondition($filterDefinition);
|
||||
|
||||
// If the built condition is valid then add it to the query clause
|
||||
if (!isEmptyString($datasetQueryCondition))
|
||||
{
|
||||
// // If this is NOT the first one
|
||||
if ($filtersCounter > 0) $where .= ' AND ';
|
||||
|
||||
$where .= '"'.$filterDefinition->name.'"'.$datasetQueryCondition;
|
||||
}
|
||||
// ...build the condition
|
||||
$where .= '"'.$filterDefinition->name.'"'.$this->_getDatasetQueryCondition($filterDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
// If the SQL where clause was built
|
||||
if ($where != '') $datasetQuery .= ' WHERE '.$where;
|
||||
if ($where != '') // if the SQL where clause was built
|
||||
{
|
||||
$datasetQuery .= ' WHERE '.$where;
|
||||
}
|
||||
}
|
||||
|
||||
return $datasetQuery;
|
||||
|
||||
@@ -528,13 +528,6 @@ class Messages_model extends CI_Model
|
||||
*/
|
||||
public function sendReply($receiver_id, $subject, $body, $relationmessage_id, $token)
|
||||
{
|
||||
// Checks that the receiver_id, relationmessage_id and token belongs to the same message
|
||||
$crossedDataResult = $this->MessageTokenModel->crossClientData($token, $relationmessage_id, $receiver_id);
|
||||
if (isError($crossedDataResult)) show_error(getError($crossedDataResult));
|
||||
if (!hasData($crossedDataResult)) show_error(
|
||||
'The parameters token, relationmessage_id and receiver_id do not belong to the same message'
|
||||
);
|
||||
|
||||
// Retrieves message sender information
|
||||
$senderResult = $this->MessageTokenModel->getSenderData($receiver_id);
|
||||
if (isError($senderResult)) show_error(getError($senderResult));
|
||||
|
||||
@@ -135,7 +135,7 @@ class Vertragvertragsstatus_model extends DB_Model
|
||||
|
||||
/**
|
||||
* Get all contracts, where the status had been set to 'bestellt' on given date
|
||||
* @param string $string_date e.g. 'YYYY-MM-DD' or special Date/Time inputs like 'YESTERDAY', 'TODAY', 'NOW'
|
||||
* @param string $string_date e.g. '01.11.2019' or special Date/Time inputs like 'YESTERDAY', 'TODAY', 'NOW'
|
||||
* @param bool $further_processed If true, ALL ordered contracts of that day are retrieved, even if they were
|
||||
* were ALSO approved/accepted/cancelled (further processed) on that same day.
|
||||
* @return array
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
class Gsprogramm_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'bis.tbl_gsprogramm';
|
||||
$this->pk = 'gsprogramm_id';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
class Mobilitaet_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'bis.tbl_mobilitaet';
|
||||
$this->pk = 'mobilitaet_id';
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
class Nation_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -11,4 +11,4 @@ class Nation_model extends DB_Model
|
||||
$this->dbTable = 'bis.tbl_nation';
|
||||
$this->pk = 'nation_code';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ class DmsFS_model extends FS_Model
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(DMS_PATH);
|
||||
parent::__construct();
|
||||
$this->filepath = DMS_PATH;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Model for writing temporary files
|
||||
*/
|
||||
class TempFS_model extends FS_Model
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// default temp directory of server is used
|
||||
parent::__construct(sys_get_temp_dir());
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ class Dokumentprestudent_model extends DB_Model
|
||||
parent::__construct();
|
||||
$this->dbTable = 'public.tbl_dokumentprestudent';
|
||||
$this->pk = array('prestudent_id', 'dokument_kurzbz');
|
||||
$this->hasSequence = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -74,11 +74,10 @@ class Konto_model extends DB_Model
|
||||
}
|
||||
}
|
||||
|
||||
public function getStudienbeitraege($uid, $buchungstypen)
|
||||
public function getLastStudienbeitrag($uid, $buchungstypen)
|
||||
{
|
||||
$query = 'SELECT konto.studiensemester_kurzbz
|
||||
FROM public.tbl_konto konto
|
||||
JOIN public.tbl_studiensemester studiensemester ON konto.studiensemester_kurzbz = studiensemester.studiensemester_kurzbz,
|
||||
FROM public.tbl_konto konto,
|
||||
public.tbl_benutzer,
|
||||
public.tbl_student
|
||||
WHERE tbl_benutzer.uid = \'' . $uid . '\'
|
||||
@@ -92,7 +91,7 @@ class Konto_model extends DB_Model
|
||||
WHERE skonto.buchungsnr = konto.buchungsnr_verweis
|
||||
OR skonto.buchungsnr_verweis = konto.buchungsnr_verweis
|
||||
)
|
||||
ORDER BY studiensemester.start DESC;
|
||||
ORDER BY buchungsnr DESC LIMIT 1;
|
||||
';
|
||||
|
||||
return $this->execQuery($query);
|
||||
|
||||
@@ -556,7 +556,7 @@ class Prestudent_model extends DB_Model
|
||||
*/
|
||||
public function getOrganisationunitsByPersonId($person_id)
|
||||
{
|
||||
$query = 'SELECT DISTINCT o.oe_kurzbz,
|
||||
$query = 'SELECT o.oe_kurzbz,
|
||||
o.bezeichnung,
|
||||
(CASE
|
||||
WHEN sg.typ = \'b\' THEN ps.prestudent_id
|
||||
|
||||
@@ -52,24 +52,6 @@ class Prestudentstatus_model extends DB_Model
|
||||
return $this->execQuery($query, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert den Ersten Status eines Prestudenten mit der übergebenen Statuskurzbezeichnung.
|
||||
*
|
||||
* @param $prestudent_id
|
||||
* @param $status_kurzbz
|
||||
* @return array
|
||||
*/
|
||||
public function getFirstStatus($prestudent_id, $status_kurzbz)
|
||||
{
|
||||
$this->addOrder('datum, insertamum, ext_id');
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->loadWhere(array(
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => $status_kurzbz
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* updateStufe
|
||||
*/
|
||||
|
||||
@@ -66,20 +66,4 @@ class Student_model extends DB_Model
|
||||
|
||||
return $result->retval[0]->student_uid;
|
||||
}
|
||||
|
||||
public function searchStudent($filter)
|
||||
{
|
||||
$this->addSelect('vorname, nachname, gebdatum, person.person_id, student_uid');
|
||||
$this->addJoin('public.tbl_prestudent ps', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_person person', 'person_id');
|
||||
|
||||
$result = $this->loadWhere(
|
||||
"lower(student_uid) like ".$this->db->escape('%'.$filter.'%')."
|
||||
OR lower(person.nachname) like ".$this->db->escape('%'.$filter.'%')."
|
||||
OR lower(person.vorname) like ".$this->db->escape('%'.$filter.'%')."
|
||||
OR lower(person.nachname || ' ' || person.vorname) like ".$this->db->escape('%'.$filter.'%')."
|
||||
OR lower(person.vorname || ' ' || person.nachname) like ".$this->db->escape('%'.$filter.'%'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,166 +309,4 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($uid, $studiensemester_kurzbz, $lehrveranstaltung_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sucht nach LV Templates und gibt Id und Label ("bezeichnung [kurzbz]") aus
|
||||
* Diese funktion ist für autocomplete gedacht
|
||||
*
|
||||
* @param string $filter Suchfilter
|
||||
* @return \stdClass A return object
|
||||
*/
|
||||
public function loadTemplates($filter)
|
||||
{
|
||||
$filter = strtolower($filter);
|
||||
$qry = "SELECT
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id, tbl_lehrveranstaltung.bezeichnung, tbl_lehrveranstaltung.kurzbz
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
WHERE
|
||||
tbl_lehrveranstaltung.lehrtyp_kurzbz = 'tpl' AND (
|
||||
CAST(tbl_lehrveranstaltung.lehrveranstaltung_id AS TEXT) LIKE '%".$this->db_escape($filter)."%' OR
|
||||
LOWER(tbl_lehrveranstaltung.bezeichnung) LIKE '%".$this->db_escape($filter). "%' OR
|
||||
LOWER(tbl_lehrveranstaltung.kurzbz) LIKE '%".$this->db_escape($filter). "%'
|
||||
)
|
||||
";
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lädt Template und gibt Id und Label ("bezeichnung [kurzbz]") zurück
|
||||
* Diese funktion ist für autocomplete gedacht
|
||||
*
|
||||
* @param string $name
|
||||
* @return \stdClass A return object
|
||||
*/
|
||||
public function loadTemplateByName($name)
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id as id, CONCAT(tbl_lehrveranstaltung.bezeichnung, ' [', tbl_lehrveranstaltung.kurzbz, ']') as label
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
WHERE
|
||||
tbl_lehrveranstaltung.lehrtyp_kurzbz = 'tpl' AND (
|
||||
CAST(tbl_lehrveranstaltung.lehrveranstaltung_id AS TEXT) = '".($name ? $this->db_escape($name) : 0)."' OR tbl_lehrveranstaltung.bezeichnung = '".$this->db_escape($name). "' OR tbl_lehrveranstaltung.kurzbz = '".$this->db_escape($name). "'
|
||||
)
|
||||
";
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get ECTS Summe pro angerechnetes Quereinstiegssemester.
|
||||
*
|
||||
* @param $studiengang_kz
|
||||
* @param $studiensemester_kurzbz
|
||||
* @param $ausbildungssemester
|
||||
* @param $orgform_kurzbz
|
||||
* @return array|stdClass|null
|
||||
*/
|
||||
public function getSumQuereinstiegsECTSProSemester($studiengang_kz, $studiensemester_kurzbz, $ausbildungssemester, $orgform_kurzbz)
|
||||
{
|
||||
$qry = '
|
||||
SELECT
|
||||
sum(tbl_lehrveranstaltung.ects) as "sum_ects"
|
||||
FROM
|
||||
lehre.tbl_studienplan
|
||||
JOIN lehre.tbl_studienplan_lehrveranstaltung USING (studienplan_id)
|
||||
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
|
||||
WHERE
|
||||
tbl_studienplan.studienplan_id = (
|
||||
SELECT
|
||||
studienplan_id
|
||||
FROM
|
||||
lehre.tbl_studienordnung
|
||||
JOIN lehre.tbl_studienplan USING (studienordnung_id)
|
||||
JOIN lehre.tbl_studienplan_semester USING (studienplan_id)
|
||||
WHERE tbl_studienordnung.studiengang_kz = ?
|
||||
AND tbl_studienplan_semester.semester = ?
|
||||
AND tbl_studienplan_semester.studiensemester_kurzbz = ?
|
||||
AND tbl_studienplan.orgform_kurzbz = ?
|
||||
|
||||
LIMIT 1
|
||||
)
|
||||
AND tbl_studienplan_lehrveranstaltung.semester = ?
|
||||
AND studienplan_lehrveranstaltung_id_parent IS NULL -- auf Modulebene
|
||||
AND tbl_studienplan_lehrveranstaltung.export = TRUE
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array(
|
||||
$studiengang_kz, $ausbildungssemester, $studiensemester_kurzbz, $orgform_kurzbz, $ausbildungssemester)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ECTS Summe aller bisher angerechneten LVs.
|
||||
* Wenn keine explizite Begruendung angegeben ist, wird eine schulische Begruendung angenommen.
|
||||
*
|
||||
* @param $student_uid
|
||||
* @return array|stdClass|null
|
||||
*/
|
||||
public function getSumAngerechneteECTSByBegruendung($student_uid)
|
||||
{
|
||||
$qry = '
|
||||
SELECT sum(ects), begruendung_id FROM (
|
||||
SELECT
|
||||
lehrveranstaltung_id, studiensemester_kurzbz, ects, COALESCE(begruendung_id, 1) as begruendung_id -- fallback auf externes Zeugnis
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
LEFT JOIN lehre.tbl_anrechnung USING(lehrveranstaltung_id, studiensemester_kurzbz)
|
||||
JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
JOIN public.tbl_student USING(student_uid)
|
||||
WHERE
|
||||
tbl_zeugnisnote.note = 6
|
||||
AND student_uid = ?
|
||||
AND (lehre.tbl_anrechnung.prestudent_id = tbl_student.prestudent_id
|
||||
OR lehre.tbl_anrechnung.prestudent_id is null)
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
lehrveranstaltung_id, studiensemester_kurzbz, ects, begruendung_id -- fallback auf externes Zeugnis
|
||||
FROM
|
||||
lehre.tbl_anrechnung
|
||||
JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
JOIN public.tbl_student USING(prestudent_id)
|
||||
WHERE
|
||||
genehmigt_von is not null
|
||||
AND student_uid = ?
|
||||
) lvsangerechnet
|
||||
GROUP BY begruendung_id
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array($student_uid, $student_uid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ECTS Summe aller bisher schulisch begruendeten angerechneten LVs.
|
||||
* Derzeit wird auch jede Anrechnung, die nicht beruflich ist, als schulisch angenommen.
|
||||
*
|
||||
* @param $student_uid
|
||||
* @return array|stdClass|null
|
||||
*/
|
||||
public function getEctsSumSchulisch($student_uid, $prestudent_id, $studiengang_kz)
|
||||
{
|
||||
$qry = '
|
||||
SELECT get_ects_summe_schulisch(?, ?, ?) AS ectsSumSchulisch
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array($student_uid, $prestudent_id, $studiengang_kz));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ECTS Summe aller bisher beruflich angerechneten LVs.
|
||||
*
|
||||
* @param $student_uid
|
||||
* @return array|stdClass|null
|
||||
*/
|
||||
public function getEctsSumBeruflich($student_uid)
|
||||
{
|
||||
$qry = '
|
||||
SELECT get_ects_summe_beruflich(?) AS ectsSumBeruflich
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array($student_uid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,14 +507,4 @@ class Studiengang_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($typ, $semester));
|
||||
}
|
||||
|
||||
public function getStudiengangTyp($studiengang_kz, $typ)
|
||||
{
|
||||
$query = "SELECT DISTINCT(sgt.*)
|
||||
FROM tbl_studiengangstyp sgt JOIN tbl_studiengang sg on sgt.typ = sg.typ
|
||||
WHERE studiengang_kz IN ? and sgt.typ IN ?";
|
||||
|
||||
return $this->execQuery($query, array($studiengang_kz, $typ));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class Studiensemester_model extends DB_Model
|
||||
/**
|
||||
* getPreviousFrom
|
||||
*/
|
||||
public function getPreviousFrom($studiensemester_kurzbz, $limit = 1)
|
||||
public function getPreviousFrom($studiensemester_kurzbz)
|
||||
{
|
||||
$query = 'SELECT studiensemester_kurzbz,
|
||||
start,
|
||||
@@ -117,9 +117,9 @@ class Studiensemester_model extends DB_Model
|
||||
WHERE studiensemester_kurzbz = ?
|
||||
)
|
||||
ORDER BY start DESC
|
||||
LIMIT ?';
|
||||
LIMIT 1';
|
||||
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz, $limit));
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,7 +82,7 @@ class Person_model extends DB_Model
|
||||
}
|
||||
else
|
||||
{
|
||||
$person['svnr'] = $person['svnr'] . 'v' . ($result->retval[0]->svnr[11] + 1);
|
||||
$person['svnr'] = $person['svnr'] . 'v' . ($result->retval[0]->svnr{11} + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -283,8 +283,8 @@ class Person_model extends DB_Model
|
||||
SELECT p2.person_id
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_person p2
|
||||
ON lower(p.vorname) = lower(p2.vorname)
|
||||
AND lower(p.nachname) = lower(p2.nachname)
|
||||
ON p.vorname = p2.vorname
|
||||
AND p.nachname = p2.nachname
|
||||
AND p.gebdatum = p2.gebdatum
|
||||
AND p.person_id = ?
|
||||
)
|
||||
@@ -310,8 +310,8 @@ class Person_model extends DB_Model
|
||||
SELECT p2.person_id
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_person p2
|
||||
ON lower(p.vorname) = lower(p2.vorname)
|
||||
AND lower(p.nachname) = lower(p2.nachname)
|
||||
ON p.vorname = p2.vorname
|
||||
AND p.nachname = p2.nachname
|
||||
AND p.gebdatum = p2.gebdatum
|
||||
AND p.person_id = ?
|
||||
)
|
||||
@@ -321,18 +321,8 @@ class Person_model extends DB_Model
|
||||
JOIN public.tbl_status USING(status_kurzbz)
|
||||
WHERE status_kurzbz = 'Abbrecher'
|
||||
)
|
||||
";
|
||||
|
||||
UNION
|
||||
|
||||
SELECT p2.person_id
|
||||
FROM tbl_person p1
|
||||
INNER JOIN (
|
||||
SELECT vorname, nachname, gebdatum, person_id
|
||||
FROM tbl_person
|
||||
) p2
|
||||
ON (lower(p1.vorname) = lower(p2.vorname) AND lower(p1.nachname) = lower(p2.nachname) AND p1.gebdatum = p2.gebdatum)
|
||||
WHERE p1.person_id != p2.person_id AND (p1.person_id = ?)";
|
||||
|
||||
return $this->execQuery($qry, array($person_id, $person_id, $person_id));
|
||||
return $this->execQuery($qry, array($person_id, $person_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,28 +72,4 @@ class Betriebsmittelperson_model extends DB_Model
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function getBetriebsmittelByUid($uid, $betriebsmitteltyp = null, $isRetourniert = false)
|
||||
{
|
||||
$this->addJoin('wawi.tbl_betriebsmittel', 'betriebsmittel_id');
|
||||
|
||||
$condition = ' wawi.tbl_betriebsmittelperson.uid = '. $this->escape($uid);
|
||||
|
||||
if (is_string($betriebsmitteltyp))
|
||||
{
|
||||
$condition .= ' AND betriebsmitteltyp = ' . $this->escape($betriebsmitteltyp);
|
||||
}
|
||||
|
||||
if ($isRetourniert === true) {
|
||||
$condition .= ' AND retouram IS NOT NULL';
|
||||
}
|
||||
elseif ($isRetourniert === false)
|
||||
{
|
||||
$condition .= ' AND retouram IS NULL';
|
||||
}
|
||||
|
||||
$this->addOrder('ausgegebenam', 'DESC');
|
||||
|
||||
return $this->loadWhere($condition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class Benutzerrolle_model extends DB_Model
|
||||
* @param null $oe_kurzbz
|
||||
* @return array
|
||||
*/
|
||||
public function getBenutzerByBerechtigung($berechtigung_kurzbz, $oe_kurzbz = null, $art = null)
|
||||
public function getBenutzerByBerechtigung($berechtigung_kurzbz, $oe_kurzbz = null)
|
||||
{
|
||||
$params = array();
|
||||
$query = '
|
||||
@@ -62,12 +62,6 @@ class Benutzerrolle_model extends DB_Model
|
||||
$params[] = $oe_kurzbz;
|
||||
}
|
||||
|
||||
if (!is_null($art))
|
||||
{
|
||||
$query .= ' AND art = ?';
|
||||
$params[] = $art;
|
||||
}
|
||||
|
||||
return $this->execQuery($query, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
class Fehlerzustaendigkeiten_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'system.tbl_fehler_zustaendigkeiten';
|
||||
$this->pk = 'fehlerzustaendigkeiten_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets active Mitarbeiter not assigned to a Fehler.
|
||||
* @param $fehlercode
|
||||
* @return object
|
||||
*/
|
||||
public function getNonAssignedMitarbeiter($fehlercode)
|
||||
{
|
||||
$query = "SELECT person_id, ben.uid, vorname, nachname, titelpre, titelpost, personalnummer
|
||||
FROM public.tbl_mitarbeiter
|
||||
JOIN public.tbl_benutzer ben ON tbl_mitarbeiter.mitarbeiter_uid = ben.uid
|
||||
JOIN public.tbl_person pers USING (person_id)
|
||||
WHERE ben.aktiv
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM system.tbl_fehler_zustaendigkeiten
|
||||
WHERE person_id = pers.person_id
|
||||
AND fehlercode = ?
|
||||
)
|
||||
ORDER BY nachname, vorname, uid";
|
||||
|
||||
return $this->execReadOnlyQuery($query, array($fehlercode));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Funktionen not assigned to a Fehler (over an organisational unit).
|
||||
* @param $fehlercode
|
||||
* @param $oe_kurzbz
|
||||
* @return object
|
||||
*/
|
||||
public function getNonAssignedFunktionen($fehlercode, $oe_kurzbz)
|
||||
{
|
||||
$query = "SELECT funktion_kurzbz, beschreibung
|
||||
FROM public.tbl_funktion funk
|
||||
WHERE aktiv
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM system.tbl_fehler_zustaendigkeiten
|
||||
WHERE funktion_kurzbz = funk.funktion_kurzbz
|
||||
AND fehlercode = ?
|
||||
AND oe_kurzbz = ?
|
||||
)
|
||||
ORDER BY beschreibung";
|
||||
|
||||
return $this->execReadOnlyQuery($query, array($fehlercode, $oe_kurzbz));
|
||||
}
|
||||
}
|
||||
@@ -176,20 +176,4 @@ class MessageToken_model extends DB_Model
|
||||
|
||||
return $this->execQuery($sql, array($oe_kurzbz));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function crossClientData($token, $relationmessage_id, $receiver_id)
|
||||
{
|
||||
$sql = 'SELECT mm.message_id
|
||||
FROM public.tbl_msg_message mm
|
||||
JOIN public.tbl_msg_recipient mr USING(message_id)
|
||||
WHERE mr.token = ?
|
||||
AND mm.message_id = ?
|
||||
AND mm.person_id = ?';
|
||||
|
||||
return $this->execQuery($sql, array($token, $relationmessage_id, $receiver_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@ $this->load->view(
|
||||
'empfehlungsanforderungWirklichZuruecknehmen',
|
||||
'erfolgreichZurueckgenommen',
|
||||
'empfehlungPositivConfirmed',
|
||||
'empfehlungNegativConfirmed',
|
||||
'anrechnungEctsTooltipTextBeiUeberschreitung'
|
||||
'empfehlungNegativConfirmed'
|
||||
)
|
||||
),
|
||||
'customCSSs' => array(
|
||||
@@ -60,6 +59,7 @@ $this->load->view(
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- header -->
|
||||
@@ -124,27 +124,11 @@ $this->load->view(
|
||||
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'ects'); ?></th>
|
||||
<td colspan="3"><span id="ects"><?php echo $antragData->ects ?></span></td>
|
||||
<td><?php echo $antragData->ects ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4">
|
||||
<?php echo $this->p->t('anrechnung', 'bisherAngerechneteEcts'); ?>
|
||||
<span class="approveAnrechnungDetail-anrechnungEctsTooltip"
|
||||
data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungEctsTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</th>
|
||||
<td colspan="3">
|
||||
Total: <span id="sumEctsTotal"><?php echo number_format($antragData->sumEctsSchulisch + $antragData->sumEctsBeruflich, 1) ?></span>
|
||||
[Schulisch: <span id="sumEctsSchulisch" value="<?php echo $antragData->sumEctsSchulisch ?>"><?php echo $antragData->sumEctsSchulisch ?></span> /
|
||||
Beruflich: <span id="sumEctsBeruflich" value="<?php echo $antragData->sumEctsBeruflich ?>"><?php echo $antragData->sumEctsBeruflich ?></span> ]
|
||||
<span id="sumEctsMsg"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'lektorInnen'); ?></th>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
<?php $len = count($antragData->lektoren) - 1 ?>
|
||||
<?php foreach ($antragData->lektoren as $key => $lektor): ?>
|
||||
<?php echo $lektor->vorname . ' ' . $lektor->nachname;
|
||||
@@ -154,23 +138,19 @@ $this->load->view(
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('global', 'zgv')); ?></th>
|
||||
<td colspan="3"><?php echo $antragData->zgv ?></td>
|
||||
<td><?php echo $antragData->zgv ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'herkunftDerKenntnisse'); ?></th>
|
||||
<td colspan="3"><?php echo $anrechnungData->anmerkung ?></td>
|
||||
<td><?php echo $anrechnungData->anmerkung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'nachweisdokumente'); ?></th>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
<a href="<?php echo current_url() . '/download?dms_id=' . $anrechnungData->dms_id; ?>"
|
||||
target="_blank"><?php echo htmlentities($anrechnungData->dokumentname) ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('global', 'begruendung'); ?></th>
|
||||
<td colspan="3"><span id="begruendung_id" data-begruendung_id="<?php echo $anrechnungData->begruendung_id ?>" ><?php echo $anrechnungData->begruendung ?></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -198,10 +178,8 @@ $this->load->view(
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<form id="form-empfehlung">
|
||||
<input type="hidden" name="anrechnung_id" value="<?php echo $anrechnungData->anrechnung_id ?>">
|
||||
<input type="hidden" name="ects" value="<?php echo $antragData->ects ?>">
|
||||
<input type="hidden" name="sumEctsSchulisch" value="<?php echo $antragData->sumEctsSchulisch ?>">
|
||||
<input type="hidden" name="sumEctsBeruflich" value="<?php echo $antragData->sumEctsBeruflich ?>">
|
||||
<input type="hidden" name="anrechnung_id"
|
||||
value="<?php echo $anrechnungData->anrechnung_id ?>">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -313,44 +291,38 @@ $this->load->view(
|
||||
<div style="display: none" id="approveAnrechnungDetail-begruendung-panel">
|
||||
<div>
|
||||
<h4 class="panel panel-body panel-danger text-danger"><?php echo $this->p->t('anrechnung', 'genehmigungNegativQuestion'); ?></h4>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<b> <?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?></b><br><br>
|
||||
<ul>
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativPruefungNichtMoeglich'); ?></span>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativKenntnisseNichtGleichwertig'); ?></span>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativEctsHoechstgrenzeUeberschritten'); ?></span>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'genehmigungNegativEmpfehlungstextUebernehmen'); ?></span>
|
||||
<span id="empfehlungstextUebernehmen" class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
<span id="empfehlungstextUebernehmen" class="btn-copyIntoTextarea" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'andereBegruendung'); ?></li>
|
||||
</ul>
|
||||
<br>
|
||||
<textarea class="form-control" name="begruendung"
|
||||
id="approveAnrechnungDetail-begruendung"
|
||||
rows="2"
|
||||
placeholder="<?php echo $this->p->t('anrechnung', 'textUebernehmenOderEigenenBegruendungstext'); ?>" required></textarea>
|
||||
rows="2" required></textarea>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Action Button 'Abbrechen'-->
|
||||
@@ -427,5 +399,6 @@ $this->load->view(
|
||||
|
||||
</div><!--end container-fluid-->
|
||||
</div><!--end page-wrapper-->
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
@@ -87,6 +87,7 @@ $this->load->view(
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- title -->
|
||||
@@ -133,34 +134,28 @@ $this->load->view(
|
||||
id="approveAnrechnungUebersicht-begruendung-panel">
|
||||
<div>
|
||||
<h4 class="panel panel-body panel-danger text-danger"><?php echo $this->p->t('anrechnung', 'genehmigungenNegativQuestion'); ?></h4>
|
||||
<b><?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?>
|
||||
<b><?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?></b><br><br>
|
||||
<ol>
|
||||
<li><?php echo $this->p->t('anrechnung', 'genehmigungNegativPruefungNichtMoeglich'); ?>
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'genehmigungNegativKenntnisseNichtGleichwertig'); ?>
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'andereBegruendung'); ?></li>
|
||||
</ol>
|
||||
<br>
|
||||
<span class="text-danger">
|
||||
<?php echo $this->p->t('anrechnung', 'begruendungWirdFuerAlleUebernommen'); ?>
|
||||
</span></b>
|
||||
<br><br>
|
||||
<ol class="list-group">
|
||||
<li class="list-group-item"><?php echo $this->p->t('anrechnung', 'genehmigungNegativPruefungNichtMoeglich'); ?>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item"><?php echo $this->p->t('anrechnung', 'genehmigungNegativKenntnisseNichtGleichwertig'); ?>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item"><?php echo $this->p->t('anrechnung', 'genehmigungNegativEctsHoechstgrenzeUeberschritten'); ?>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
</span><br><br>
|
||||
<textarea class="form-control" name="begruendung" id="approveAnrechnungUebersicht-begruendung"
|
||||
rows="2"
|
||||
placeholder="<?php echo $this->p->t('anrechnung', 'textUebernehmenOderEigenenBegruendungstext'); ?>" required></textarea>
|
||||
rows="2" required></textarea>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Action Button 'Abbrechen'-->
|
||||
@@ -254,5 +249,6 @@ $this->load->view(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
@@ -16,20 +16,15 @@ $query = '
|
||||
anrechnung.dms_id,
|
||||
anrechnung.studiensemester_kurzbz,
|
||||
stg.studiengang_kz,
|
||||
stg.bezeichnung AS stg_bezeichnung,
|
||||
stg.bezeichnung AS "stg_bezeichnung",
|
||||
lv.orgform_kurzbz,
|
||||
(SELECT ausbildungssemester
|
||||
FROM public.tbl_prestudentstatus press
|
||||
WHERE press.prestudent_id = anrechnung.prestudent_id
|
||||
AND press.studiensemester_kurzbz = anrechnung.studiensemester_kurzbz
|
||||
AND press.status_kurzbz = \'Student\'
|
||||
ORDER BY press.datum DESC
|
||||
LIMIT 1
|
||||
),
|
||||
lv.bezeichnung AS lv_bezeichnung,
|
||||
lv.ects::numeric(4,1),
|
||||
get_ects_summe_schulisch(student.student_uid, anrechnung.prestudent_id, stg.studiengang_kz) AS ectsSumSchulisch,
|
||||
get_ects_summe_beruflich(student.student_uid) AS ectsSumBeruflich,
|
||||
AND press.status_kurzbz = \'Student\'),
|
||||
lv.bezeichnung AS "lv_bezeichnung",
|
||||
lv.ects,
|
||||
(person.nachname || \' \' || person.vorname) AS "student",
|
||||
begruendung.bezeichnung AS "begruendung",
|
||||
dmsversion.name AS "dokument_bezeichnung",
|
||||
@@ -51,9 +46,7 @@ $query = '
|
||||
WHERE anrechnung_id = anrechnung.anrechnung_id
|
||||
ORDER BY insertamum DESC
|
||||
LIMIT 1
|
||||
) AS status_kurzbz,
|
||||
student.student_uid,
|
||||
anrechnung.prestudent_id
|
||||
) AS status_kurzbz
|
||||
FROM lehre.tbl_anrechnung AS anrechnung
|
||||
JOIN public.tbl_prestudent USING (prestudent_id)
|
||||
JOIN public.tbl_person AS person USING (person_id)
|
||||
@@ -62,69 +55,44 @@ $query = '
|
||||
LEFT JOIN campus.tbl_dms_version AS dmsversion USING (dms_id)
|
||||
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (anrechnung_id)
|
||||
JOIN lehre.tbl_anrechnung_begruendung AS begruendung USING (begruendung_id)
|
||||
JOIN public.tbl_student student USING (prestudent_id)
|
||||
WHERE anrechnung.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
|
||||
AND stg.studiengang_kz IN (' . $STUDIENGAENGE_ENTITLED . ')
|
||||
)
|
||||
|
||||
SELECT anrechnungen.anrechnung_id,
|
||||
anrechnungen.lehrveranstaltung_id,
|
||||
anrechnungen.begruendung_id,
|
||||
anrechnungen.dms_id,
|
||||
anrechnungen.studiensemester_kurzbz,
|
||||
anrechnungen.studiengang_kz,
|
||||
anrechnungen.stg_bezeichnung,
|
||||
anrechnungen.orgform_kurzbz,
|
||||
anrechnungen.ausbildungssemester,
|
||||
anrechnungen.lv_bezeichnung,
|
||||
anrechnungen.ects::float4 AS ects,
|
||||
NULL AS "ectsSumBisherUndNeu",
|
||||
anrechnungen.ectsSumSchulisch::float4 AS "ectsSumSchulisch",
|
||||
anrechnungen.ectsSumBeruflich::float4 AS "ectsSumBeruflich",
|
||||
anrechnungen.begruendung,
|
||||
anrechnungen.student,
|
||||
anrechnungen.dokument_bezeichnung,
|
||||
anrechnungen.anmerkung_student,
|
||||
anrechnungen.zgv,
|
||||
anrechnungen.antragsdatum,
|
||||
anrechnungen.empfehlung_anrechnung,
|
||||
anrechnungen.status_kurzbz,
|
||||
array_to_json(anrechnungstatus.bezeichnung_mehrsprachig::varchar[])->>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung",
|
||||
anrechnungen.prestudent_id,
|
||||
CASE
|
||||
WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL
|
||||
ELSE
|
||||
(SELECT insertamum::date
|
||||
FROM lehre.tbl_anrechnungstatus
|
||||
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz)
|
||||
WHERE anrechnung_id = anrechnungen.anrechnung_id
|
||||
AND status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR . '\'
|
||||
ORDER BY insertamum DESC
|
||||
LIMIT 1)
|
||||
END "empfehlungsanfrageAm",
|
||||
CASE
|
||||
WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL
|
||||
ELSE
|
||||
(SELECT COALESCE(
|
||||
STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = TRUE),
|
||||
STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = FALSE)
|
||||
) empfehlungsanfrageAn
|
||||
FROM (
|
||||
SELECT DISTINCT ON (benutzer.uid) uid, vorname, nachname,
|
||||
CASE WHEN lehrfunktion_kurzbz = \'LV-Leitung\' THEN TRUE ELSE FALSE END AS lvleiter
|
||||
FROM lehre.tbl_lehreinheit
|
||||
JOIN lehre.tbl_lehreinheitmitarbeiter lema USING (lehreinheit_id)
|
||||
JOIN public.tbl_benutzer benutzer ON lema.mitarbeiter_uid = benutzer.uid
|
||||
JOIN public.tbl_person USING (person_id)
|
||||
WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
|
||||
AND lehrveranstaltung_id = anrechnungen.lehrveranstaltung_id
|
||||
AND lema.mitarbeiter_uid NOT like \'_Dummy%\'
|
||||
AND benutzer.aktiv = TRUE
|
||||
AND tbl_person.aktiv = TRUE
|
||||
ORDER BY benutzer.uid, lvleiter DESC, nachname, vorname
|
||||
) as tmp_lvlektoren
|
||||
)
|
||||
END "empfehlungsanfrageAn"
|
||||
|
||||
SELECT anrechnungen.*,
|
||||
array_to_json(anrechnungstatus.bezeichnung_mehrsprachig::varchar[])->>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung",
|
||||
CASE
|
||||
WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL
|
||||
ELSE
|
||||
(SELECT insertamum::date
|
||||
FROM lehre.tbl_anrechnungstatus
|
||||
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz)
|
||||
WHERE anrechnung_id = anrechnungen.anrechnung_id
|
||||
AND status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR . '\'
|
||||
ORDER BY insertamum DESC
|
||||
LIMIT 1)
|
||||
END "empfehlungsanfrageAm",
|
||||
CASE
|
||||
WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL
|
||||
ELSE
|
||||
(SELECT COALESCE(
|
||||
STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = TRUE),
|
||||
STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = FALSE)
|
||||
) empfehlungsanfrageAn
|
||||
FROM (
|
||||
SELECT DISTINCT ON (benutzer.uid) uid, vorname, nachname,
|
||||
CASE WHEN lehrfunktion_kurzbz = \'LV-Leitung\' THEN TRUE ELSE FALSE END AS lvleiter
|
||||
FROM lehre.tbl_lehreinheit
|
||||
JOIN lehre.tbl_lehreinheitmitarbeiter lema USING (lehreinheit_id)
|
||||
JOIN public.tbl_benutzer benutzer ON lema.mitarbeiter_uid = benutzer.uid
|
||||
JOIN public.tbl_person USING (person_id)
|
||||
WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
|
||||
AND lehrveranstaltung_id = anrechnungen.lehrveranstaltung_id
|
||||
AND lema.mitarbeiter_uid NOT like \'_Dummy%\'
|
||||
AND benutzer.aktiv = TRUE
|
||||
AND tbl_person.aktiv = TRUE
|
||||
ORDER BY benutzer.uid, lvleiter DESC, nachname, vorname
|
||||
) as tmp_lvlektoren
|
||||
)
|
||||
END "empfehlungsanfrageAn"
|
||||
FROM anrechnungen
|
||||
JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz)
|
||||
WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
|
||||
@@ -147,12 +115,9 @@ $filterWidgetArray = array(
|
||||
ucfirst($this->p->t('lehre', 'organisationsform')),
|
||||
'Semester',
|
||||
ucfirst($this->p->t('lehre', 'lehrveranstaltung')),
|
||||
'ECTS (LV)',
|
||||
'ECTS (LV + Bisher)',
|
||||
'ECTS (Bisher schulisch)',
|
||||
'ECTS (Bisher beruflich',
|
||||
ucfirst($this->p->t('global', 'begruendung')),
|
||||
'ECTS',
|
||||
ucfirst($this->p->t('person', 'studentIn')),
|
||||
ucfirst($this->p->t('global', 'begruendung')),
|
||||
ucfirst($this->p->t('anrechnung', 'nachweisdokumente')),
|
||||
ucfirst($this->p->t('anrechnung', 'herkunft')),
|
||||
ucfirst($this->p->t('global', 'zgv')),
|
||||
@@ -160,7 +125,6 @@ $filterWidgetArray = array(
|
||||
ucfirst($this->p->t('anrechnung', 'empfehlung')),
|
||||
'status_kurzbz',
|
||||
'Status',
|
||||
'PrestudentID',
|
||||
ucfirst($this->p->t('anrechnung', 'empfehlungsanfrageAm')),
|
||||
ucfirst($this->p->t('anrechnung', 'empfehlungsanfrageAn'))
|
||||
),
|
||||
@@ -188,8 +152,8 @@ $filterWidgetArray = array(
|
||||
rowFormatter:function(row){
|
||||
func_rowFormatter(row);
|
||||
},
|
||||
rowSelectionChanged:function(data, rows){
|
||||
func_rowSelectionChanged(data, rows);
|
||||
rowUpdated:function(row){
|
||||
func_rowUpdated(row);
|
||||
},
|
||||
tooltips: function(cell){
|
||||
return func_tooltips(cell);
|
||||
@@ -207,11 +171,8 @@ $filterWidgetArray = array(
|
||||
ausbildungssemester: {headerFilter:"input"},
|
||||
lv_bezeichnung: {headerFilter:"input"},
|
||||
ects: {headerFilter:"input", align:"center"},
|
||||
ectsSumBisherUndNeu: {formatter: format_ectsSumBisherUndNeu},
|
||||
ectsSumSchulisch: {visible: false, headerFilter:"input", align:"right"},
|
||||
ectsSumBeruflich: {visible: false, headerFilter:"input", align:"right"},
|
||||
begruendung: {headerFilter:"input", visible: true},
|
||||
student: {headerFilter:"input"},
|
||||
begruendung: {headerFilter:"input"},
|
||||
zgv: {visible: false, headerFilter:"input"},
|
||||
dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{
|
||||
labelField:"dokument_bezeichnung",
|
||||
@@ -223,7 +184,6 @@ $filterWidgetArray = array(
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
|
||||
status_kurzbz: {visible: false, headerFilter:"input"},
|
||||
status_bezeichnung: {headerFilter:"input"},
|
||||
prestudent_id: {visible: false, headerFilter:"input"},
|
||||
empfehlungsanfrageAm: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate},
|
||||
empfehlungsanfrageAn: {visible: false, headerFilter:"input"}
|
||||
}', // col properties
|
||||
@@ -231,4 +191,4 @@ $filterWidgetArray = array(
|
||||
|
||||
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -38,6 +38,7 @@ $this->load->view(
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
|
||||
@@ -169,5 +170,4 @@ $this->load->view(
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
</body>
|
||||
|
||||
@@ -31,9 +31,7 @@ $this->load->view(
|
||||
),
|
||||
'anrechnung' => array(
|
||||
'deadlineUeberschritten',
|
||||
'benotungDerLV',
|
||||
'anrechnungEctsTextBeiUeberschreitung',
|
||||
'anrechnungEctsTooltipTextBeiUeberschreitung'
|
||||
'benotungDerLV'
|
||||
),
|
||||
'person' => array(
|
||||
'student',
|
||||
@@ -62,6 +60,7 @@ $this->load->view(
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- header -->
|
||||
@@ -81,13 +80,9 @@ $this->load->view(
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="requestAnrechnung-form">
|
||||
<input type="hidden" name="anrechnung_id" id="anrechnung_id" value="<?php echo $anrechnungData->anrechnung_id ?>">
|
||||
<input type="hidden" name="lv_id" value="<?php echo $antragData->lv_id ?>">
|
||||
<input type="hidden" name="studiensemester" value="<?php echo $antragData->studiensemester_kurzbz ?>">
|
||||
<input type="hidden" name="ects" value="<?php echo $antragData->ects ?>">
|
||||
<input type="hidden" name="sumEctsSchulisch" value="<?php echo $antragData->sumEctsSchulisch ?>">
|
||||
<input type="hidden" name="sumEctsBeruflich" value="<?php echo $antragData->sumEctsBeruflich ?>">
|
||||
<!-- Antragsdaten -->
|
||||
<!-- Antragsdaten -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
@@ -124,23 +119,8 @@ $this->load->view(
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $this->p->t('lehre', 'ects'); ?></th>
|
||||
<td><span id="ects"><?php echo number_format($antragData->ects, 1) ?> ECTS</span></td>
|
||||
<td><?php echo $antragData->ects ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php echo $this->p->t('anrechnung', 'bisherAngerechneteEcts'); ?>
|
||||
<span data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungEctsTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</th>
|
||||
<td colspan="3">
|
||||
Total ECTS: <span id="sumEctsTotal"><?php echo number_format($antragData->sumEctsSchulisch + $antragData->sumEctsBeruflich, 1) ?></span>
|
||||
[ Schulisch: <span id="sumEctsSchulisch"><?php echo $antragData->sumEctsSchulisch ?></span> |
|
||||
Beruflich: <span id="sumEctsBeruflich"><?php echo $antragData->sumEctsBeruflich ?></span> ]
|
||||
<span id="requestAnrechnung-maxEctsUeberschrittenMsg"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('lehre', 'lektorInnen')); ?></th>
|
||||
<td>
|
||||
@@ -172,17 +152,6 @@ $this->load->view(
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="radio" name="begruendung" value="5" required
|
||||
<?php echo $anrechnungData->begruendung_id == '5' ? 'checked' : ''; ?> />
|
||||
<?php echo $this->p->t('anrechnung', 'antragStellenWegenHochschulzeugnis'); ?> 
|
||||
<span id="requestAnrechnung-anrechnungGrundHochschulzeugnisTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungGrundZeugnisTooltipText'); ?>" />
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="radio" name="begruendung" value="4" required
|
||||
@@ -211,7 +180,7 @@ $this->load->view(
|
||||
<div class="form-inline panel-body">
|
||||
<div class="form-group">
|
||||
<input type="file" id="requestAnrechnung-uploadfile"
|
||||
name="uploadfile" accept=".pdf" size="50" data-maxsize="<?php echo (int)ini_get('upload_max_filesize') * 1024 * 1024 ?>"
|
||||
name="uploadfile" accept=".pdf" size="50" data-maxsize="<?php echo (int)ini_get('upload_max_filesize') * 1024 ?>"
|
||||
required>
|
||||
</div>
|
||||
<span id="requestAnrechnung-uploadTooltip" data-toggle="tooltip" data-placement="right"
|
||||
@@ -292,5 +261,6 @@ $this->load->view(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
@@ -52,6 +52,7 @@ $this->load->view(
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- title -->
|
||||
@@ -224,29 +225,31 @@ $this->load->view(
|
||||
<div class="panel panel-default panel-body" style="display: none" id="reviewAnrechnungDetail-begruendung-panel">
|
||||
<div>
|
||||
<h4 class="panel panel-body panel-danger text-danger"><?php echo $this->p->t('anrechnung', 'empfehlungNegativQuestion'); ?></h4>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
 
|
||||
<b> <?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?></b><br><br>
|
||||
<ul>
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'empfehlungNegativPruefungNichtMoeglich'); ?></span> 
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'empfehlungNegativKenntnisseNichtGleichwertig'); ?></span> 
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip"
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'andereBegruendung'); ?></li>
|
||||
</ul>
|
||||
<br>
|
||||
<textarea class="form-control" name="begruendung"
|
||||
id="reviewAnrechnungDetail-begruendung"
|
||||
rows="2"
|
||||
placeholder="<?php echo $this->p->t('anrechnung', 'textUebernehmenOderEigenenBegruendungstext'); ?>"
|
||||
required></textarea>
|
||||
rows="2" required></textarea>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Button Abbrechen & Bestaetigen-->
|
||||
@@ -315,5 +318,6 @@ $this->load->view(
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
@@ -80,6 +80,7 @@ $this->load->view(
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- title -->
|
||||
@@ -126,31 +127,30 @@ $this->load->view(
|
||||
id="reviewAnrechnungUebersicht-begruendung-panel">
|
||||
<div>
|
||||
<h4 class="panel panel-body panel-danger text-danger"><?php echo $this->p->t('anrechnung', 'empfehlungenNegativQuestion'); ?></h4>
|
||||
<b><span> <?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?></span>
|
||||
<span class="text-danger">
|
||||
<?php echo $this->p->t('anrechnung', 'begruendungWirdFuerAlleUebernommen'); ?>
|
||||
</span></b>
|
||||
<br><br>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<b> <?php echo $this->p->t('anrechnung', 'bitteBegruendungAngeben'); ?></b><br><br>
|
||||
<ul>
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'empfehlungNegativPruefungNichtMoeglich'); ?></span>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip" data-placement="right"
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<li>
|
||||
<span><?php echo $this->p->t('anrechnung', 'empfehlungNegativKenntnisseNichtGleichwertig'); ?></span>
|
||||
<span class="btn-copyIntoTextarea pull-right" data-toggle="tooltip" data-placement="right"
|
||||
<span class="btn-copyIntoTextarea" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('ui', 'textUebernehmen'); ?>">
|
||||
<i class="fa fa-clipboard fa-lg" aria-hidden="true"></i>
|
||||
<i class="fa fa-clipboard" aria-hidden="true"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li><?php echo $this->p->t('anrechnung', 'andereBegruendung'); ?></li>
|
||||
</ul>
|
||||
<br>
|
||||
<span class="text-danger">
|
||||
<?php echo $this->p->t('anrechnung', 'begruendungWirdFuerAlleUebernommen'); ?>
|
||||
</span><br><br>
|
||||
<textarea class="form-control" name="begruendung" id="reviewAnrechnungUebersicht-begruendung"
|
||||
rows="2"
|
||||
placeholder="<?php echo $this->p->t('anrechnung', 'textUebernehmenOderEigenenBegruendungstext'); ?>"
|
||||
required></textarea>
|
||||
rows="2" required></textarea>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Action Button Abbrechen & Bestaetigen-->
|
||||
@@ -235,6 +235,7 @@ $this->load->view(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Benutzer in Gruppe',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'tablesorter' => true,
|
||||
'ajaxlib' => true,
|
||||
'dialoglib' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'gruppenmanagement',
|
||||
'ui'
|
||||
),
|
||||
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/tablesort/tablesort.js', 'public/js/person/benutzergruppe.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
||||
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
|
||||
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
<?php echo ucfirst($this->p->t('gruppenmanagement', 'benutzergruppe')).' '.$gruppe_kurzbz ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-inline">
|
||||
<div class="input-group" id="absgstatusgrselect_137998">
|
||||
<input type="text" class="form-control" name="teilnehmerSelect" id="teilnehmerSelect">
|
||||
<input type="hidden" name="teilnehmer_uid" id="teilnehmer_uid">
|
||||
<input type="hidden" name="gruppe_kurzbz" id="gruppe_kurzbz" value="<?php echo $gruppe_kurzbz ?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="teilnehmerHinzufuegen">
|
||||
<?php echo $this->p->t('gruppenmanagement', 'benutzerHinzufuegen') ?>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered table-condensed table-responsive" id="benutzer-table">
|
||||
<thead>
|
||||
<th>Uid</th>
|
||||
<th><?php echo ucfirst($this->p->t('person', 'vorname')); ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('person', 'nachname')); ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('gruppenmanagement', 'aktiv')); ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('ui', 'entfernen')); ?></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Gruppenmanagement',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'tablesorter' => true,
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'ui'
|
||||
),
|
||||
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
|
||||
'customJSs' => array('public/js/bootstrapper.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
||||
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
|
||||
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
<?php echo ucfirst($this->p->t('gruppenmanagement', 'gruppenmanagement')); ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->load->view('person/gruppenmanagement/gruppenmanagementData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT gruppe_kurzbz, grp.bezeichnung AS gruppe_bezeichnung, grp.beschreibung AS gruppe_beschreibung,
|
||||
studiengang_kz, UPPER(stg.typ||stg.kurzbz) AS studiengang_kurzbz, semester, sichtbar, lehre, grp.aktiv, mailgrp, generiert
|
||||
FROM public.tbl_gruppe grp
|
||||
JOIN public.tbl_studiengang stg USING (studiengang_kz)
|
||||
JOIN public.tbl_gruppe_manager grpmgr USING (gruppe_kurzbz)
|
||||
WHERE grp.aktiv = TRUE
|
||||
AND grpmgr.uid = \''.$uid.'\'',
|
||||
'requiredPermissions' => 'lehre/gruppenmanager',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'additionalColumns' => array('Teilnehmer'),
|
||||
'columnsAliases' => array(
|
||||
ucfirst($this->p->t('gruppenmanagement', 'kurzbezeichnung')),
|
||||
ucfirst($this->p->t('gruppenmanagement', 'bezeichnung')),
|
||||
ucfirst($this->p->t('gruppenmanagement', 'beschreibung')),
|
||||
ucfirst($this->p->t('lehre', 'studiengangskennzahlLehre')),
|
||||
ucfirst($this->p->t('lehre', 'studiengang')),
|
||||
ucfirst($this->p->t('lehre', 'semester')),
|
||||
'Sichtbar',
|
||||
'Lehre',
|
||||
'Aktiv',
|
||||
'Mailgrp',
|
||||
'Generiert'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
/* NOTE: Dont use $this here for PHP Version compatibility */
|
||||
$datasetRaw->{'Teilnehmer'} = sprintf(
|
||||
'<a href="%s?gruppe_kurzbz=%s&origin_page=%s&fhc_controller_id=%s">'.$this->p->t('gruppenmanagement', 'zuweisenloeschen').'</a>',
|
||||
site_url('person/Gruppenmanagement/showBenutzergruppe'),
|
||||
$datasetRaw->{'gruppe_kurzbz'},
|
||||
'index',
|
||||
(isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'gruppe_bezeichnung'} == null)
|
||||
{
|
||||
$datasetRaw->{'gruppe_bezeichnung'} = '-';
|
||||
}
|
||||
if ($datasetRaw->{'gruppe_beschreibung'} == null)
|
||||
{
|
||||
$datasetRaw->{'gruppe_beschreibung'} = '-';
|
||||
}
|
||||
if ($datasetRaw->{'semester'} == null)
|
||||
{
|
||||
$datasetRaw->{'semester'} = '-';
|
||||
}
|
||||
$datasetRaw->{'sichtbar'} = $datasetRaw->{'sichtbar'} == 'true' ? 'ja' : 'nein';
|
||||
$datasetRaw->{'lehre'} = $datasetRaw->{'lehre'} == 'true' ? 'ja' : 'nein';
|
||||
$datasetRaw->{'aktiv'} = $datasetRaw->{'aktiv'} == 'true' ? 'ja' : 'nein';
|
||||
$datasetRaw->{'mailgrp'} = $datasetRaw->{'mailgrp'} == 'true' ? 'ja' : 'nein';
|
||||
$datasetRaw->{'generiert'} = $datasetRaw->{'generiert'} == 'true' ? 'ja' : 'nein';
|
||||
|
||||
return $datasetRaw;
|
||||
}
|
||||
);
|
||||
|
||||
$filterWidgetArray['app'] = 'core';
|
||||
$filterWidgetArray['datasetName'] = 'gruppenmanagement';
|
||||
$filterWidgetArray['filterKurzbz'] = 'gruppenmanagement';
|
||||
$filterWidgetArray['filter_id'] = $this->input->get('filter_id');
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
@@ -1,11 +1,10 @@
|
||||
<div class="table-responsive" id="uebersichtDoks">
|
||||
<table id="doctable" class="table table-bordered table-condensed tablesorter tablesorter-default">
|
||||
<div class="table-responsive">
|
||||
<table id="doctable" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ucfirst($this->p->t('global','name')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','typ')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('global','uploaddatum')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('ui','loeschen')) ?></th>
|
||||
<th><?php echo ucfirst($this->p->t('infocenter','ausstellungsnation')) ?></th>
|
||||
<?php
|
||||
if (!isset($formalReadonly))
|
||||
@@ -23,7 +22,7 @@
|
||||
<a href="outputAkteContent/<?php echo $dokument->akte_id ?>"><?php echo isEmptyString($dokument->titel) ? $dokument->bezeichnung : $dokument->titel ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control aktenid" id="aktenid_<?php echo $dokument->akte_id?>" <?php echo (isset($formalReadonly) ? 'disabled' : '') ?> autocomplete="off">
|
||||
<select class="aktenid" id="aktenid_<?php echo $dokument->akte_id?>" <?php echo (isset($formalReadonly) ? 'disabled' : '') ?> autocomplete="off">
|
||||
<?php
|
||||
foreach($dokumententypen as $dokumenttyp)
|
||||
echo "<option " . ($dokumenttyp->bezeichnung === $dokument->dokument_bezeichnung ? 'selected' : '') . " value = " . $dokumenttyp->dokument_kurzbz . ">" . $dokumenttyp->bezeichnung . "</option>"
|
||||
@@ -31,7 +30,7 @@
|
||||
</select>
|
||||
|
||||
<div class="row">
|
||||
<button class="nachreichungInfos hidden btn btn-default" id="nachreichungInfos_<?php echo $dokument->akte_id?>"><?php echo ucfirst($this->p->t('infocenter','dokumentWirdNachgereicht')) ?></button>
|
||||
<button class="nachreichungInfos hidden" id="nachreichungInfos_<?php echo $dokument->akte_id?>"><?php echo ucfirst($this->p->t('infocenter','dokumentWirdNachgereicht')) ?></button>
|
||||
</div>
|
||||
|
||||
<div class="nachreichungInputs hidden" id="nachreichungInputs_<?php echo $dokument->akte_id?>">
|
||||
@@ -50,7 +49,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="btn-group pull-right">
|
||||
<input type="button" value="OK" class="btn btn-primary nachreichungSpeichern btn-default" id="nachreichungSpeichern_<?php echo $dokument->akte_id?>">
|
||||
<input type="button" value="OK" class="btn btn-primary nachreichungSpeichern" id="nachreichungSpeichern_<?php echo $dokument->akte_id?>">
|
||||
<input type="button" value="Abbrechen" class="btn btn-default nachreichungAbbrechen" id="nachreichungAbbrechen_<?php echo $dokument->akte_id?>">
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,7 +60,6 @@
|
||||
|
||||
</td>
|
||||
<td><?php echo date_format(date_create($dokument->erstelltam), 'd.m.Y') ?></td>
|
||||
<td><input type="button" value="<?php echo ucfirst($this->p->t('ui','loeschen')); ?>" class="btn btn-default dokLoeschen" id="dokLoeschen_<?php echo $dokument->akte_id?>" <?php echo (isset($formalReadonly) ? 'disabled' : '') ?>></td>
|
||||
<td><?php echo $dokument->langtext ?></td>
|
||||
<?php
|
||||
if (!isset($formalReadonly)) :
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
$AKTE_TYP = '\'identity\', \'zgv_bakk\'';
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$ONLINE = '\'online\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -56,13 +55,10 @@
|
||||
a.dokument_kurzbz in ('.$AKTE_TYP.')
|
||||
) AS "AnzahlAkte",
|
||||
(
|
||||
SELECT CASE WHEN student.student_uid IS NULL THEN
|
||||
(CASE WHEN sp.nachname IS NULL THEN l.insertvon ELSE sp.nachname END)
|
||||
ELSE '. $ONLINE .' END
|
||||
SELECT CASE WHEN sp.nachname IS NULL THEN l.insertvon ELSE sp.nachname END
|
||||
FROM system.tbl_log l
|
||||
LEFT JOIN public.tbl_benutzer on l.insertvon = tbl_benutzer.uid
|
||||
LEFT JOIN public.tbl_person sp on tbl_benutzer.person_id = sp.person_id
|
||||
LEFT JOIN public.tbl_student student ON tbl_benutzer.uid = student.student_uid
|
||||
WHERE l.taetigkeit_kurzbz IN ('.$TAETIGKEIT_KURZBZ.')
|
||||
AND l.logdata->>\'name\' NOT IN ('.$LOGDATA_NAME.')
|
||||
AND l.person_id = p.person_id
|
||||
@@ -258,22 +254,6 @@
|
||||
ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC
|
||||
LIMIT 1
|
||||
) AS "ZGVMNation",
|
||||
(
|
||||
SELECT upper(tbl_nation.nationengruppe_kurzbz)
|
||||
FROM public.tbl_prestudent ps
|
||||
JOIN bis.tbl_nation ON ps.zgvnation = tbl_nation.nation_code
|
||||
WHERE ps.person_id = p.person_id
|
||||
ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC
|
||||
LIMIT 1
|
||||
) AS "ZGVNationGruppe",
|
||||
(
|
||||
SELECT upper(tbl_nation.nationengruppe_kurzbz)
|
||||
FROM public.tbl_prestudent ps
|
||||
JOIN bis.tbl_nation ON ps.zgvmanation = tbl_nation.nation_code
|
||||
WHERE ps.person_id = p.person_id
|
||||
ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC
|
||||
LIMIT 1
|
||||
) AS "ZGVMNationGruppe",
|
||||
(
|
||||
SELECT tbl_organisationseinheit.bezeichnung
|
||||
FROM public.tbl_benutzerfunktion
|
||||
@@ -381,8 +361,6 @@
|
||||
ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')',
|
||||
'ZGV Nation BA',
|
||||
'ZGV Nation MA',
|
||||
'ZGV Gruppe BA',
|
||||
'ZGV Gruppe MA',
|
||||
'InfoCenter Mitarbeiter'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
@@ -474,16 +452,6 @@
|
||||
$datasetRaw->{'ZGVMNation'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'ZGVNationGruppe'} == null)
|
||||
{
|
||||
$datasetRaw->{'ZGVNationGruppe'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'ZGVMNationGruppe'} == null)
|
||||
{
|
||||
$datasetRaw->{'ZGVMNationGruppe'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'InfoCenterMitarbeiter'} === null)
|
||||
{
|
||||
$datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein';
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$IDENTITY = '\'identity\'';
|
||||
$ONLINE = '\'online\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -43,13 +42,10 @@ $query = '
|
||||
LIMIT 1
|
||||
) AS "LastActionType",
|
||||
(
|
||||
SELECT CASE WHEN student.student_uid IS NULL THEN
|
||||
(CASE WHEN sp.nachname IS NULL THEN l.insertvon ELSE sp.nachname END)
|
||||
ELSE '. $ONLINE .' END
|
||||
SELECT CASE WHEN sp.nachname IS NULL THEN l.insertvon ELSE sp.nachname END
|
||||
FROM system.tbl_log l
|
||||
LEFT JOIN public.tbl_benutzer on l.insertvon = tbl_benutzer.uid
|
||||
LEFT JOIN public.tbl_person sp on tbl_benutzer.person_id = sp.person_id
|
||||
LEFT JOIN public.tbl_student student ON tbl_benutzer.uid = student.student_uid
|
||||
WHERE l.taetigkeit_kurzbz IN('.$TAETIGKEIT_KURZBZ.')
|
||||
AND l.logdata->>\'name\' NOT IN ('.$LOGDATA_NAME.')
|
||||
AND l.person_id = p.person_id
|
||||
@@ -182,7 +178,7 @@ $query = '
|
||||
WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.'
|
||||
AND ps.person_id = p.person_id
|
||||
AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.'
|
||||
ORDER BY rtp.teilgenommen NULLS FIRST, pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "ReihungstestAngetreten",
|
||||
(
|
||||
@@ -203,25 +199,21 @@ $query = '
|
||||
LIMIT 1
|
||||
) AS "ReihungstestApplied",
|
||||
(
|
||||
SELECT (ARRAY_TO_STRING(array_agg(DISTINCT(CONCAT(rtp.datum, \' \', to_char(rtp.uhrzeit, \'HH24:MI\'), \' \', studiengang.kurzbzlang))), \', \'))
|
||||
SELECT rtp.datum
|
||||
FROM public.tbl_prestudentstatus pss
|
||||
JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
LEFT JOIN (
|
||||
SELECT rtp.person_id,
|
||||
rt.studiensemester_kurzbz,
|
||||
rtp.teilgenommen,
|
||||
rt.datum,
|
||||
rt.uhrzeit,
|
||||
rt.studiengang_kz
|
||||
rt.datum
|
||||
FROM public.tbl_rt_person rtp
|
||||
JOIN tbl_reihungstest rt ON(rtp.rt_id = rt.reihungstest_id)
|
||||
WHERE rt.stufe = 1
|
||||
) rtp ON(rtp.person_id = ps.person_id AND rtp.studiensemester_kurzbz = pss.studiensemester_kurzbz)
|
||||
JOIN tbl_studiengang studiengang ON rtp.studiengang_kz = studiengang.studiengang_kz
|
||||
WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.'
|
||||
AND ps.person_id = p.person_id
|
||||
AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.'
|
||||
GROUP BY pss.datum, pss.insertamum, pss.ext_id
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "ReihungstestDate",
|
||||
@@ -417,10 +409,14 @@ $query = '
|
||||
$datasetRaw->{'ReihungstestApplied'} = 'Nein';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'ReihungstestDate'} == '')
|
||||
if ($datasetRaw->{'ReihungstestDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'ReihungstestDate'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'ReihungstestDate'} = date_format(date_create($datasetRaw->{'ReihungstestDate'}),'Y-m-d');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'ZGVNation'} == null)
|
||||
{
|
||||
|
||||
@@ -124,32 +124,6 @@
|
||||
</div>
|
||||
<div id="collapse<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
class="panel-collapse collapse<?php echo $infoonly ? '' : ' in' ?>">
|
||||
<?php
|
||||
$disabled = $disabledStg = $disabledTxt = $disabledStgTxt = '';
|
||||
if (isEmptyString($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
{
|
||||
$disabled = $disabledStg = 'disabled';
|
||||
$disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt');
|
||||
}
|
||||
|
||||
if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm')
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
$disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
|
||||
// FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter
|
||||
if (!in_array($studiengang_kz, $fit_programme_studiengaenge))
|
||||
{
|
||||
$disabledStg = 'disabled';
|
||||
$disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($studiengangtyp, $studienArtBerechtigung))
|
||||
$disabledPer = 'disabled';
|
||||
else
|
||||
$disabledPer = '';
|
||||
?>
|
||||
<div class="panel-body">
|
||||
<form action="javascript:void(0);" class="zgvform" id="zgvform_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<input type="hidden" name="prestudentid" value="<?php echo $zgvpruefung->prestudent_id ?>" class="prestudentidinput">
|
||||
@@ -222,25 +196,12 @@
|
||||
<a href="javascript:void(0)"><i class="fa fa-info-circle"></i> <?php echo $this->p->t('infocenter', 'zgv') ?> <?php echo $studiengangkurzbz ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!$infoonly):
|
||||
echo "<select id='zgv_" . $zgvpruefung->prestudent_id . "' name='zgv' class='form-control'>";
|
||||
$selectedDefault = (is_null($zgvpruefung->zgv_code) ? 'selected' : '');
|
||||
echo "<option " . $selectedDefault . " value='null'>Bitte Eintrag wählen...</option>";
|
||||
foreach ($all_zgvs as $zgv)
|
||||
{
|
||||
$selected = ($zgvpruefung->zgv_code === $zgv->zgv_code) ? 'selected' : '';
|
||||
$aktiv = '';
|
||||
$class = '';
|
||||
if (!$zgv->aktiv)
|
||||
{
|
||||
$aktiv = '(inaktiv)';
|
||||
$class = 'gesperrtoption';
|
||||
}
|
||||
|
||||
echo "<option " . $selected . " value='" . $zgv->zgv_code . "' class='". $class ."'>" . $zgv->zgv_bez . " " . $aktiv ."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
endif;?>
|
||||
<?php if (!$infoonly)
|
||||
echo $this->widgetlib->widget(
|
||||
'Zgv_widget',
|
||||
array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgv_code),
|
||||
array('name' => 'zgv', 'id' => 'zgv_'.$zgvpruefung->prestudent_id)
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-<?php echo $columns[1] ?>">
|
||||
@@ -278,26 +239,11 @@
|
||||
<?php if ($infoonly)
|
||||
echo $zgvpruefung->zgvnation_bez;
|
||||
else
|
||||
{
|
||||
echo "<select id='zgvnation_" . $zgvpruefung->prestudent_id . "' name='zgvnation' class='form-control'>";
|
||||
$selectedDefault = (is_null($zgvpruefung->zgvnation_code) ? 'selected' : '');
|
||||
echo "<option " . $selectedDefault . " value='null'>Bitte Eintrag wählen...</option>";
|
||||
|
||||
foreach ($all_nations as $nation)
|
||||
{
|
||||
$selected = ($nation->nation_code === $zgvpruefung->zgvnation_code) ? 'selected' : '';
|
||||
$sperre = '';
|
||||
$class = '';
|
||||
if ($nation->sperre == 'true')
|
||||
{
|
||||
$sperre = '(gesperrt)';
|
||||
$class = 'gesperrtoption';
|
||||
}
|
||||
echo "<option " . $selected . " value='" . $nation->nation_code . "' class='" . $class ."'>" . $nation->langtext . " " . $sperre ."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
}
|
||||
?>
|
||||
echo $this->widgetlib->widget(
|
||||
'Nation_widget',
|
||||
array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvnation_code),
|
||||
array('name' => 'zgvnation', 'id' => 'zgvnation_'.$zgvpruefung->prestudent_id)
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -310,25 +256,11 @@
|
||||
if ($infoonly)
|
||||
echo $zgvpruefung->zgvmas_bez;
|
||||
else
|
||||
{
|
||||
echo "<select id='zgvmas_" . $zgvpruefung->prestudent_id . "' name='zgvmas' class='form-control'>";
|
||||
$selectedDefault = (is_null($zgvpruefung->zgvmas_code) ? 'selected' : '');
|
||||
echo "<option " . $selectedDefault . " value='null'>Bitte Eintrag wählen...</option>";
|
||||
foreach ($all_zgvs_master as $zgv)
|
||||
{
|
||||
$selected = ($zgvpruefung->zgvmas_code === $zgv->zgvmas_code) ? 'selected' : '';
|
||||
$aktiv = '';
|
||||
$class = '';
|
||||
if (!$zgv->aktiv)
|
||||
{
|
||||
$aktiv = '(inaktiv)';
|
||||
$class = 'gesperrtoption';
|
||||
}
|
||||
echo "<option " . $selected . " value='" . $zgv->zgvmas_code . "' class='" . $class . "'>" . $zgv->zgvmas_bez . " " . $aktiv ."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
}
|
||||
?>
|
||||
echo $this->widgetlib->widget(
|
||||
'Zgvmaster_widget',
|
||||
array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmas_code),
|
||||
array('name' => 'zgvmas', 'id' => 'zgvmas_'.$zgvpruefung->prestudent_id)
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-<?php echo $columns[1] ?>">
|
||||
@@ -368,28 +300,11 @@
|
||||
if ($infoonly)
|
||||
echo $zgvpruefung->zgvmanation_bez;
|
||||
else
|
||||
{
|
||||
echo "<select id='zgvmanation_" . $zgvpruefung->prestudent_id . "' name='zgvmanation' class='form-control'>";
|
||||
$selectedDefault = (is_null($zgvpruefung->zgvmanation_code) ? 'selected' : '');
|
||||
echo "<option " . $selectedDefault . " value='null'>Bitte Eintrag wählen...</option>";
|
||||
|
||||
foreach ($all_nations as $nation)
|
||||
{
|
||||
$selected = ($nation->nation_code === $zgvpruefung->zgvmanation_code) ? 'selected' : '';
|
||||
$sperre = '';
|
||||
$class = '';
|
||||
|
||||
if ($nation->sperre == 'true')
|
||||
{
|
||||
$sperre = '(gesperrt)';
|
||||
$class = 'gesperrtoption';
|
||||
}
|
||||
|
||||
echo "<option " . $selected . " value='" . $nation->nation_code . "' class='" . $class . "'>" . $nation->langtext . " " . $sperre ."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
}
|
||||
?>
|
||||
echo $this->widgetlib->widget(
|
||||
'Nation_widget',
|
||||
array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmanation_code),
|
||||
array('name' => 'zgvmanation', 'id' => 'zgvmanation_'.$zgvpruefung->prestudent_id)
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -403,17 +318,17 @@
|
||||
<?php if (!$infoonly): ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-8 text-left zgvBearbeitungButtons" id="zgvBearbeitungButtons_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button type="button" class="btn btn-default zgvUebernehmen" id="zgvUebernehmen_<?php echo $zgvpruefung->prestudent_id ?>" <?php echo $disabledPer?>>
|
||||
<button type="button" class="btn btn-default zgvUebernehmen" id="zgvUebernehmen_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('infocenter', 'letzteZgvUebernehmen') ?>
|
||||
</button>
|
||||
<button class="btn btn-default zgvRueckfragen" <?php echo $disabledStg . ' ' . $disabledPer?> id="zgvRueckfragen_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button class="btn btn-default zgvRueckfragen" id="zgvRueckfragen_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('infocenter', 'zgvRueckfragen') ?>
|
||||
</button>
|
||||
<span class="zgvStatusText" id="zgvStatusText_<?php echo $zgvpruefung->prestudent_id ?>" <?php (!(isset($zgvpruefung->statusZGV))) ?: print_r('data-info="need"')?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<button type="submit" class="btn btn-default saveZgv" id="zgvSpeichern_<?php echo $zgvpruefung->prestudent_id ?>" <?php echo $disabledPer?>>
|
||||
<button type="submit" class="btn btn-default saveZgv" id="zgvSpeichern_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('ui', 'speichern') ?>
|
||||
</button>
|
||||
</div>
|
||||
@@ -421,7 +336,7 @@
|
||||
<?php endif; ?>
|
||||
<br />
|
||||
<?php
|
||||
if (isset($zgvpruefung->prestudentUdfs) && $studiengangtyp !== 'l')
|
||||
if (isset($zgvpruefung->prestudentUdfs))
|
||||
{
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
@@ -447,8 +362,6 @@
|
||||
<div class="form-inline">
|
||||
<div class="input-group" id="absgstatusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="absgstatusgrund"
|
||||
<?php echo $disabledStg ?>
|
||||
<?php echo $disabledPer ?>
|
||||
class="d-inline float-right"
|
||||
required>
|
||||
<option value="null"
|
||||
@@ -460,7 +373,7 @@
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button"
|
||||
class="btn btn-default absageBtn" <?php echo $disabledStg . ' ' . $disabledPer?> id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
class="btn btn-default absageBtn" id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('ui', 'absagen') ?>
|
||||
</button>
|
||||
</span>
|
||||
@@ -468,6 +381,25 @@
|
||||
</div>
|
||||
</div><!-- /.column-absage -->
|
||||
<?php
|
||||
$disabled = $disabledStg = $disabledTxt = $disabledStgTxt = '';
|
||||
if (isEmptyString($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
{
|
||||
$disabled = $disabledStg = 'disabled';
|
||||
$disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt');
|
||||
}
|
||||
|
||||
if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm')
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
$disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
|
||||
// FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter
|
||||
if (!in_array($studiengang_kz, $fit_programme_studiengaenge))
|
||||
{
|
||||
$disabledStg = 'disabled';
|
||||
$disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
}
|
||||
}
|
||||
if (!$infoonly) :
|
||||
?>
|
||||
<div class="col-lg-8 text-right">
|
||||
@@ -476,7 +408,6 @@
|
||||
<select name="frgstatusgrund"
|
||||
class="d-inline float-right"
|
||||
<?php echo $disabledStg ?>
|
||||
<?php echo $disabledPer ?>
|
||||
required>
|
||||
<option value="null"
|
||||
selected="selected"><?php echo ucfirst($this->p->t('ui', 'freigabeart')) . '...' ?>
|
||||
@@ -486,14 +417,14 @@
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default freigabebtnstg" <?php echo $disabledStg . ' ' . $disabledPer?> id="freigabebtnstg_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
<button class="btn btn-default freigabebtnstg" <?php echo $disabledStg ?> id="freigabebtnstg_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
data-toggle="tooltip" title="<?php echo $disabledStgTxt ?>">
|
||||
<?php echo $this->p->t('ui', 'freigabeAnStudiengang') ?>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group" id="igrfrgbtn">
|
||||
<button type="button" id="freigabebtn_<?php echo $zgvpruefung->prestudent_id ?>" class="btn btn-default freigabebtn" <?php echo $disabled . ' ' . $disabledPer?>
|
||||
<button type="button" id="freigabebtn_<?php echo $zgvpruefung->prestudent_id ?>" class="btn btn-default freigabebtn" <?php echo $disabled ?>
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
<?php echo $this->p->t('ui', 'freigabeZumReihungstest') ?>
|
||||
</button>
|
||||
@@ -558,8 +489,6 @@
|
||||
<div class="col-lg-4 text-left">
|
||||
<div class="input-group" id="absgstatusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="absgstatusgrund"
|
||||
<?php echo $disabledStg?>
|
||||
<?php echo $disabledPer?>
|
||||
class="d-inline float-right"
|
||||
required>
|
||||
<option value="null"
|
||||
@@ -571,8 +500,6 @@
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button"
|
||||
<?php echo $disabledStg ?>
|
||||
<?php echo $disabledPer ?>
|
||||
class="btn btn-default absageBtn" id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('ui', 'absagen') ?>
|
||||
</button>
|
||||
@@ -625,3 +552,4 @@
|
||||
endforeach; // end foreach zgvpruefungen
|
||||
?>
|
||||
</div><!-- /.panel-group -->
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
|
||||
$PERSON_ID = getAuthPersonId();
|
||||
// all oe kurzbz for which logged user has a funktion
|
||||
$ALL_FUNKTIONEN_OE_KURZBZ = "('" . implode("','", array_keys($all_funktionen_oe_kurzbz)) . "')";
|
||||
// all oes for which logged user has issues permissions, including permissions for "special" issue funktion
|
||||
$ALL_OE_KURZBZ_BERECHTIGT = "('" . implode("','", $all_oe_kurzbz_berechtigt) . "')";
|
||||
$RELEVANT_PRESTUDENT_STATUS = "('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')";
|
||||
$LANGUAGE_INDEX = getUserLanguage() == 'German' ? '1' : '2';
|
||||
@@ -31,74 +29,39 @@ $query = "WITH zustaendigkeiten AS (
|
||||
$query .= " THEN TRUE
|
||||
ELSE FALSE
|
||||
END AS \"zustaendig\"
|
||||
FROM system.tbl_fehler_zustaendigkeiten zst
|
||||
FROM system.tbl_fehler_zustaendigkeiten zst
|
||||
)";
|
||||
|
||||
$query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\",
|
||||
inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\",
|
||||
ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\",
|
||||
verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\",
|
||||
fr.fehlertyp_kurzbz AS \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
|
||||
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\",
|
||||
(
|
||||
/* show all relevant Studiengänge of person and wether it is an employee*/
|
||||
SELECT STRING_AGG(studiengang || ' ' || last_status, ' | ')
|
||||
|| (CASE WHEN EXISTS (
|
||||
SELECT 1 FROM public.tbl_mitarbeiter ma
|
||||
JOIN public.tbl_benutzer ben ON ma.mitarbeiter_uid = ben.uid
|
||||
WHERE person_id = prestudents.person_id
|
||||
AND ben.aktiv
|
||||
) THEN ' | Mitarbeiter' ELSE '' END)
|
||||
FROM (
|
||||
SELECT DISTINCT person_id, prestudent_id, UPPER(stg.typ || stg.kurzbz) AS studiengang, get_rolle_prestudent(ps.prestudent_id, null) AS last_status
|
||||
FROM public.tbl_prestudent ps
|
||||
JOIN public.tbl_studiengang stg USING (studiengang_kz)
|
||||
WHERE person_id = pers.person_id
|
||||
ORDER BY prestudent_id DESC
|
||||
) prestudents
|
||||
WHERE last_status IN ('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')
|
||||
GROUP BY person_id
|
||||
LIMIT 1;
|
||||
) AS \"Zugehörigkeit\",
|
||||
CASE
|
||||
WHEN
|
||||
EXISTS(SELECT 1
|
||||
FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = TRUE) /* If Zuständigkeit is defined for the oe/person, zustaendig. */
|
||||
THEN 'Ja'
|
||||
WHEN
|
||||
EXISTS(SELECT 1
|
||||
FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = FALSE) /* If Zuständigkeit is defined for different oe/person, not zustaendig. */
|
||||
THEN 'Nein'
|
||||
ELSE 'Ja' /* If no Zuständigkeit defined, zustaendig by default. */
|
||||
END AS \"Hauptzuständig\",
|
||||
(
|
||||
SELECT string_agg(vorname || ' ' || nachname, ' | ' ORDER BY vorname, nachname)
|
||||
FROM system.tbl_fehler_zustaendigkeiten
|
||||
JOIN public.tbl_person USING (person_id)
|
||||
WHERE fehlercode = fr.fehlercode
|
||||
GROUP BY fehlercode
|
||||
) AS \"Person Zuständigkeiten\",
|
||||
(
|
||||
SELECT string_agg(organisationseinheittyp_kurzbz || ' ' || oe.bezeichnung || COALESCE(' - ' || fu.beschreibung, ''), ' | ' ORDER BY bezeichnung, oe_kurzbz)
|
||||
FROM system.tbl_fehler_zustaendigkeiten
|
||||
LEFT JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz)
|
||||
LEFT JOIN public.tbl_funktion fu USING (funktion_kurzbz)
|
||||
WHERE fehlercode = fr.fehlercode
|
||||
GROUP BY fehlercode
|
||||
) AS \"Organisationseinheit Zuständigkeiten\"
|
||||
FROM system.tbl_issue iss
|
||||
JOIN system.tbl_fehler fr USING (fehlercode)
|
||||
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
|
||||
JOIN system.tbl_issue_status stat USING (status_kurzbz)
|
||||
LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id
|
||||
WHERE EXISTS ( /* if oe or person is specified in fehler_zustaendigkeiten */
|
||||
SELECT 1 FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = TRUE)";
|
||||
inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\",
|
||||
ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\",
|
||||
verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\",
|
||||
fr.fehlertyp_kurzbz AS \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
|
||||
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\",
|
||||
CASE
|
||||
WHEN
|
||||
EXISTS(SELECT 1
|
||||
FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = TRUE) /* If Zuständigkeit is defined for the oe/person, zustaendig. */
|
||||
THEN 'Ja'
|
||||
WHEN
|
||||
EXISTS(SELECT 1
|
||||
FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = FALSE) /* If Zuständigkeit is defined for different oe/person, not zustaendig. */
|
||||
THEN 'Nein'
|
||||
ELSE 'Ja' /* If no Zuständigkeit defined, zustaendig by default. */
|
||||
END AS \"Hauptzuständig\"
|
||||
FROM system.tbl_issue iss
|
||||
JOIN system.tbl_fehler fr USING (fehlercode)
|
||||
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
|
||||
JOIN system.tbl_issue_status stat USING (status_kurzbz)
|
||||
LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id
|
||||
WHERE EXISTS ( /* if oe or person is specified in fehler_zustaendigkeiten */
|
||||
SELECT 1 FROM zustaendigkeiten
|
||||
WHERE fehlercode = iss.fehlercode
|
||||
AND zustaendig = TRUE)";
|
||||
|
||||
// show issue if it is assigend to oe of logged in user or to student of oe of logged in user
|
||||
if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
||||
@@ -115,13 +78,13 @@ if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
||||
AND NOT EXISTS (SELECT 1 /* irrelevant if already finished studies and studied a while ago */
|
||||
FROM public.tbl_prestudentstatus ps_finished
|
||||
JOIN public.tbl_studiensemester sem_finished USING (studiensemester_kurzbz)
|
||||
WHERE prestudent_id = ps.prestudent_id
|
||||
WHERE prestudent_id = ps.prestudent_id
|
||||
AND status_kurzbz IN ('Absolvent','Abbrecher','Abgewiesener')
|
||||
AND datum::date + interval '2 months' < NOW()
|
||||
AND EXISTS (SELECT 1 FROM public.tbl_prestudent /* if more recent prestudent exists, still display the issue */
|
||||
JOIN public.tbl_prestudentstatus USING (prestudent_id)
|
||||
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
|
||||
WHERE tbl_prestudentstatus.status_kurzbz IN $RELEVANT_PRESTUDENT_STATUS
|
||||
WHERE tbl_prestudentstatus.status_kurzbz IN $RELEVANT_PRESTUDENT_STATUS
|
||||
AND person_id = ps.person_id
|
||||
AND prestudent_id <> ps_finished.prestudent_id
|
||||
AND tbl_studiensemester.start::date > sem_finished.start::date)
|
||||
@@ -148,7 +111,7 @@ $filterWidgetArray = array(
|
||||
'datasetName' => 'issues',
|
||||
'filter_id' => $this->input->get('filter_id'),
|
||||
'tableUniqueId' => 'issues',
|
||||
'requiredPermissions' => 'system/issues_verwalten',
|
||||
'requiredPermissions' => 'admin',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'checkboxes' => 'issue_id',
|
||||
'columnsAliases' => array(
|
||||
@@ -169,10 +132,7 @@ $filterWidgetArray = array(
|
||||
ucfirst($this->p->t('fehlermonitoring', 'statuscode')),
|
||||
ucfirst($this->p->t('person', 'vorname')),
|
||||
ucfirst($this->p->t('person', 'nachname')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'zugehoerigkeit')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'zustaendigePersonen')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'zustaendigeOrganisationseinheiten'))
|
||||
ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig'))
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
@@ -201,26 +161,16 @@ $filterWidgetArray = array(
|
||||
$datasetRaw->{'OE'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Verarbeitet am'} == null)
|
||||
{
|
||||
$datasetRaw->{'Verarbeitet am'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Verarbeitet von'} == null)
|
||||
{
|
||||
$datasetRaw->{'Verarbeitet von'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Zugehörigkeit'} == null)
|
||||
{
|
||||
$datasetRaw->{'Zugehörigkeit'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Person Zuständigkeiten'} == null)
|
||||
{
|
||||
$datasetRaw->{'Person Zuständigkeiten'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Organisationseinheit Zuständigkeiten'} == null)
|
||||
{
|
||||
$datasetRaw->{'Organisationseinheit Zuständigkeiten'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Fehler Zuständigkeiten',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'jquerycheckboxes' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'tablesorter' => true,
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'dialoglib' => true,
|
||||
'phrases' => array(
|
||||
'ui',
|
||||
'fehlermonitoring'
|
||||
),
|
||||
'customCSSs' => array('public/css/issues/issuesZustaendigkeiten.css', 'public/css/sbadmin2/tablesort_bootstrap.css'),
|
||||
'customJSs' => array('public/js/issues/issuesZustaendigkeiten.js', 'public/js/bootstrapper.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
||||
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
|
||||
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
<?php echo $this->p->t('fehlermonitoring', 'fehlerZustaendigkeiten') ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-default">
|
||||
<table class="table table-bordered" id="fehlercodeSelectTable">
|
||||
<tr>
|
||||
<td class="tableCellNoRightBorder">
|
||||
<label for="fehlerappSelect">App</label>
|
||||
<select class="form-control" name="fehlerappSelect" id="fehlerappSelect">
|
||||
</select>
|
||||
</td>
|
||||
<td class="tableCellNoLeftBorder tableCellNoRightBorder">
|
||||
<label for="fehlercodeSelect"><?php echo $this->p->t('fehlermonitoring', 'fehlercode') ?></label>
|
||||
<select class="form-control" name="fehlercodeSelect" id="fehlercodeSelect">
|
||||
</select>
|
||||
</td>
|
||||
<td class="tableCellNoLeftBorder" id="fehlercodeInfoCell"><i class="fa fa-info-circle"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-default">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="mitarbeiterSelect"><?php echo $this->p->t('fehlermonitoring', 'zustaendigerMitarbeiter') ?></label>
|
||||
<input type="text" class="form-control" name="mitarbeiterSelect" id="mitarbeiterSelect">
|
||||
<input type="hidden" name="mitarbeiter_person_id" id="mitarbeiter_person_id">
|
||||
</td>
|
||||
<td align="center">
|
||||
<?php echo $this->p->t('fehlermonitoring', 'oder') ?>
|
||||
<br>
|
||||
<i class="fa fa-arrows-h"></i>
|
||||
</td>
|
||||
<td class="tableCellNoRightBorder">
|
||||
<label for="oeSelect"><?php echo $this->p->t('fehlermonitoring', 'organisationseinheit') ?></label>
|
||||
<select class="form-control" name="oeSelect" id="oeSelect">
|
||||
</select>
|
||||
</td>
|
||||
<td class="tableCellNoLeftBorder">
|
||||
<label for="funktionSelect"><?php echo $this->p->t('fehlermonitoring', 'funktion') ?></label>
|
||||
<select class="form-control" name="funktionSelect" id="funktionSelect">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-offset-3 col-lg-9">
|
||||
<button class="btn btn-default" id="assignZustaendigkeit">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
<?php echo $this->p->t('fehlermonitoring', 'zustaendigkeitZuweisen') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->load->view('system/issues/issuesZustaendigkeitenData.php'); ?>
|
||||
</div>
|
||||
<div class="modal fade" id="fehlerInfo" tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="fehlerInfoLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal"
|
||||
aria-hidden="true">×
|
||||
</button>
|
||||
<h4 class="modal-title" id="fehlerInfoLabel">
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="fehlerInfoContent">
|
||||
<table class="table table-condensed table-bordered">
|
||||
<tr>
|
||||
<td>
|
||||
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlercode')) ?></b>
|
||||
</td>
|
||||
<td>
|
||||
<span id="fehlercodeInfo"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlerkurzbz')) ?></b>
|
||||
</td>
|
||||
<td>
|
||||
<span id="fehlerkurzbzInfo"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')) ?></b>
|
||||
</td>
|
||||
<td>
|
||||
<span id="fehlertypInfo"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')) ?></b>
|
||||
</td>
|
||||
<td>
|
||||
<span id="fehlercodeExternInfo"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlertext')) ?></b>
|
||||
</td>
|
||||
<td>
|
||||
<span id="fehlertextInfo"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal-fade -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
|
||||
// get assigned Zustaendigkeiten
|
||||
$query = "SELECT fehlerzustaendigkeiten_id, fe.fehlercode, fe.fehlercode_extern, fehler_kurzbz, fehlertext, fehlertyp_kurzbz, fe.app,
|
||||
pers.person_id, pers.vorname, pers.nachname,
|
||||
oe.oe_kurzbz, oe.bezeichnung AS oe_bezeichnung, funk.funktion_kurzbz, funk.beschreibung AS funktion_beschreibung
|
||||
FROM system.tbl_fehler_zustaendigkeiten zst
|
||||
JOIN system.tbl_fehler fe USING (fehlercode)
|
||||
LEFT JOIN public.tbl_person pers USING (person_id)
|
||||
LEFT JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz)
|
||||
LEFT JOIN public.tbl_funktion funk USING (funktion_kurzbz)
|
||||
ORDER BY fe.fehlercode, pers.nachname, oe.bezeichnung, funk.beschreibung";
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => $query,
|
||||
'app' => 'core',
|
||||
'datasetName' => 'fehlerZustaendigkeiten',
|
||||
'filter_id' => $this->input->get('filter_id'),
|
||||
'tableUniqueId' => 'issuesZustaendigkeiten',
|
||||
'requiredPermissions' => 'admin',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'additionalColumns' => array('Delete'),
|
||||
'columnsAliases' => array(
|
||||
'ID',
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlercode')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlerkurzbz')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlertext')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')),
|
||||
'app',
|
||||
'PersonId',
|
||||
ucfirst($this->p->t('person', 'vorname')),
|
||||
ucfirst($this->p->t('person', 'nachname')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'oeKurzbz')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'oeBezeichnung')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'funktionKurzbz')),
|
||||
ucfirst($this->p->t('fehlermonitoring', 'funktionBeschreibung'))
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Delete'} =
|
||||
"<button id='".$datasetRaw->{'fehlerzustaendigkeiten_id'}."' class='btn btn-default deleteBtn'>"
|
||||
.ucfirst($this->p->t('ui', 'loeschen'))."</button>";
|
||||
|
||||
if ($datasetRaw->{'person_id'} == null)
|
||||
{
|
||||
$datasetRaw->{'person_id'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'vorname'} == null)
|
||||
{
|
||||
$datasetRaw->{'vorname'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'nachname'} == null)
|
||||
{
|
||||
$datasetRaw->{'nachname'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'oe_kurzbz'} == null)
|
||||
{
|
||||
$datasetRaw->{'oe_kurzbz'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'oe_bezeichnung'} == null)
|
||||
{
|
||||
$datasetRaw->{'oe_bezeichnung'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'funktion_kurzbz'} == null)
|
||||
{
|
||||
$datasetRaw->{'funktion_kurzbz'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'funktion_beschreibung'} == null)
|
||||
{
|
||||
$datasetRaw->{'funktion_beschreibung'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
}
|
||||
);
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
+173
-23
@@ -22,21 +22,21 @@
|
||||
*/
|
||||
session_start();
|
||||
|
||||
require_once('../../config/cis.config.inc.php');
|
||||
require_once('../../include/wochenplan.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/betriebsmittel.class.php');
|
||||
require_once('../../include/betriebsmittelperson.class.php');
|
||||
require_once('../../include/betriebsmitteltyp.class.php');
|
||||
require_once('../../include/mail.class.php');
|
||||
require_once('../../include/news.class.php');
|
||||
require_once('../../include/content.class.php');
|
||||
require_once('../../include/studiensemester.class.php');
|
||||
require_once('../../include/konto.class.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/authentication.class.php');
|
||||
require_once('../../include/addon.class.php');
|
||||
require_once('../../include/'.EXT_FKT_PATH.'/serviceterminal.inc.php');
|
||||
require_once('../../config/cis.config.inc.php');
|
||||
require_once('../../include/wochenplan.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/betriebsmittel.class.php');
|
||||
require_once('../../include/betriebsmittelperson.class.php');
|
||||
require_once('../../include/betriebsmitteltyp.class.php');
|
||||
require_once('../../include/mail.class.php');
|
||||
require_once('../../include/news.class.php');
|
||||
require_once('../../include/content.class.php');
|
||||
require_once('../../include/studiensemester.class.php');
|
||||
require_once('../../include/konto.class.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/authentication.class.php');
|
||||
require_once('../../include/addon.class.php');
|
||||
require_once('../../include/'.EXT_FKT_PATH.'/serviceterminal.inc.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
$db=false;
|
||||
@@ -679,6 +679,10 @@ function meine_uid_informationen($db,$uid,$user="")
|
||||
if ($db)
|
||||
$user_array=personen_id_read_mitarbeiter_oder_student($db,$user->person_id);
|
||||
|
||||
#echo '<hr>';
|
||||
##var_dump($user_array);
|
||||
#var_dump($_SESSION[constSESSIONNAME]["ldap_get_entries"]);
|
||||
|
||||
if (isset($user_array) && is_array($user_array) && count($user_array)>1)
|
||||
{
|
||||
$html_user_daten.='<table class="persoenlichedaten">';
|
||||
@@ -720,6 +724,54 @@ function meine_uid_informationen($db,$uid,$user="")
|
||||
|
||||
$html_user_daten.='<hr>';
|
||||
|
||||
// eMail senden nach anforderung
|
||||
/*
|
||||
$send_mail=(isset($_REQUEST['send_mail']) ? $_REQUEST['send_mail']:false);
|
||||
if ($send_mail)
|
||||
{
|
||||
$to=$uid.'@'.DOMAIN;
|
||||
$from=MAIL_CIS;
|
||||
$subject=CAMPUS_NAME.' Informationen';
|
||||
|
||||
$mail=new mail($to, $from, $subject, $html_user_daten_detail);
|
||||
if (isset($user_array) && is_array($user_array) && count($user_array)>1)
|
||||
{
|
||||
reset($user_array);
|
||||
for ($i=0;$i<count($user_array);$i++)
|
||||
{
|
||||
if ($uid!=$user_array[$i]->uid && ($user_array[$i]->aktiv='t' || ($user_array[$i]->aktiv !='f' && $user_array[$i]->aktiv)) )
|
||||
$mail->setCCRecievers($user_array[$i]->uid.'@'.DOMAIN);
|
||||
}
|
||||
}
|
||||
$mail->setHTMLContent($html_user_daten_detail);
|
||||
if ($mail->send())
|
||||
$html_user_daten.='<p>email gesendet an '.$mail->to.' '.($mail->CC_recievers?$mail->CC_recievers:'').'</p>';
|
||||
else
|
||||
$html_user_daten.='<p>email nicht gesendet an '.$mail->to.'</p>';
|
||||
}
|
||||
// Send eMail Auswahl anzeigen
|
||||
else
|
||||
{
|
||||
$farbe='gruen';
|
||||
$html_user_daten.='<table class="persoenlichedaten">';
|
||||
$html_user_daten.='<tr>';
|
||||
$html_user_daten.='<td>';
|
||||
$html_user_daten.='<a href="'.$_SERVER['PHP_SELF'].'?work=meinedaten&send_mail=x&standort_id='.$standort_id.'">';
|
||||
$html_user_daten.='<b class="'.$farbe.'_rtop">
|
||||
<b class="'.$farbe.'_r1"></b> <b class="'.$farbe.'_r2"></b> <b class="'.$farbe.'_r3"></b> <b class="'.$farbe.'_r4"></b>
|
||||
</b>
|
||||
<span class="'.$farbe.'_mitteText">';
|
||||
$html_user_daten.='Informationen per Mail senden';
|
||||
$html_user_daten.='
|
||||
</span>
|
||||
<b class="'.$farbe.'_rbottom">
|
||||
<b class="'.$farbe.'_r4"></b><b class="'.$farbe.'_r3"></b> <b class="'.$farbe.'_r2"></b> <b class="'.$farbe.'_r1"></b>
|
||||
</b>';
|
||||
$html_user_daten.='</a>';
|
||||
$html_user_daten.='</td>';
|
||||
$html_user_daten.='</tr>';
|
||||
$html_user_daten.='</table>';
|
||||
}*/
|
||||
return $html_user_daten;
|
||||
}
|
||||
#-------------------------------------------------------------------------------------------
|
||||
@@ -900,6 +952,33 @@ function meine_uid_informationen_detail($db,$uid,$count=0)
|
||||
die($db->db_last_error());
|
||||
$nr_mg=$db->db_num_rows($erg_mg);
|
||||
|
||||
// Betriebsmittel zur Person lesen
|
||||
/*
|
||||
$betriebsmittelperson=array();
|
||||
$qry="SELECT nummer,betriebsmitteltyp FROM public.vw_betriebsmittelperson where uid='".addslashes(trim($uid))."' and aktiv and benutzer_aktiv and ( retouram IS NULL ) LIMIT 50 ; ";
|
||||
if(!$result=$db->db_query($qry))
|
||||
die('Probleme beim Lesen der Benutzer uid '.$db->db_last_error());
|
||||
if ($result)
|
||||
{
|
||||
while($rows = $db->db_fetch_object($result))
|
||||
{
|
||||
$rows->asco='ASCO Datensätze gefunden';
|
||||
if (is_numeric($rows->nummer) && $mssql_verbindung)
|
||||
{
|
||||
$card_no=$rows->nummer;
|
||||
$anfrage = mssql_query('SELECT * FROM view_fh_technikum_mitarbeiterkarten_berechtigungen where card_no='.$card_no);
|
||||
if (mssql_num_rows($anfrage))
|
||||
{
|
||||
$rows->asco=array();
|
||||
while ($datensatz = mssql_fetch_object($anfrage))
|
||||
$rows->asco[]=$datensatz;
|
||||
}
|
||||
mssql_free_result($anfrage);
|
||||
}
|
||||
$betriebsmittelperson[]=$rows;
|
||||
}
|
||||
}*/
|
||||
|
||||
if ($count==0)
|
||||
{
|
||||
$html_user_daten.='<h1>Persönliche Daten</h1>';
|
||||
@@ -943,6 +1022,49 @@ function meine_uid_informationen_detail($db,$uid,$count=0)
|
||||
$html_user_daten.='<tr><td style="background-color: #E9ECEE;" align="center" colspan="2" ><b><font size="+1">Email</font></b></td></tr>';
|
||||
$html_user_daten.='<tr><td ><b>Intern</b></td><td >'.$email.'</td></tr>';
|
||||
$html_user_daten.='<tr><td ><b>Alias</b></td><td >'.$email_alias.'</td></tr>';
|
||||
/*
|
||||
|
||||
$html_user_daten.='<tr><td style="background-color: #E9ECEE;" align="center" colspan="2" ><b>Mitglied in folgenden Verteilern</b></td></tr>';
|
||||
for($i=0;$i<$nr_mg;$i++)
|
||||
{
|
||||
$row=$db->db_fetch_object($erg_mg,$i);
|
||||
|
||||
$html_user_daten.='<tr>';
|
||||
$html_user_daten.='<td valign="top"><a class="Item" href="mailto:'.trim(strtolower($row->gruppe_kurzbz)).'@'.DOMAIN.'">'.strtolower($row->gruppe_kurzbz).' </td>';
|
||||
$html_user_daten.='<td >'.$row->beschreibung.' </td>';
|
||||
$html_user_daten.='</tr>';
|
||||
}
|
||||
|
||||
if (isset($matrikelnr))
|
||||
{
|
||||
$html_user_daten.='<TR><TD valign="top"><A class="Item" href="mailto:'.strtolower(trim($stgkz)).'_std@'.DOMAIN.'">'.strtolower($stgkz).'_std </TD>';
|
||||
$html_user_daten.="\n<TD > Alle Studierdenden von $stgbez</TD><TD></TD></TR>";
|
||||
$html_user_daten.='<TR><TD valign="top">'.strtolower($stgkz).$semester.' </TD>';
|
||||
$html_user_daten.="\n<TD > Alle Studierenden von $stgkz $semester</TD><TD></TD></TR>";
|
||||
$html_user_daten.='<TR><TD valign="top"><A class="Item" href="mailto:'.strtolower(trim($stgkz)).trim($semester).strtolower(trim($verband)).'@'.DOMAIN.'">'.strtolower($stgkz).$semester.strtolower($verband).' </TD>';
|
||||
$html_user_daten.="\n<TD > Alle Studierenden von $stgkz $semester$verband</TD><TD></TD></TR>";
|
||||
$html_user_daten.='<TR><TD valign="top"><A class="Item" href="mailto:'.strtolower(trim($stgkz)).trim($semester).strtolower(trim($verband)).trim($gruppe).'@'.DOMAIN.'">'.strtolower($stgkz).$semester.strtolower($verband).$gruppe.' </TD>';
|
||||
$html_user_daten.="\n<TD > Alle Studierenden von $stgkz $semester$verband$gruppe</TD><TD></TD></TR>";
|
||||
}
|
||||
$html_user_daten.='</table> </td>';
|
||||
|
||||
$html_user_daten.='<td valign="top" width="50%"><table width="100%">';
|
||||
if ($stud_num_rows==1)
|
||||
{
|
||||
$html_user_daten.='<tr><td colspan="2" align="center" style="background-color: #E9ECEE;"><b><font size="+1">StudentIn</font></b></td></tr>';
|
||||
$html_user_daten.="<td colspan='2' >
|
||||
Studiengang: $stgbez<br>
|
||||
Semester: $semester<br>
|
||||
Verband: $verband<br>
|
||||
Gruppe: $gruppe<br>
|
||||
Matrikelnummer: $matrikelnr";
|
||||
$html_user_daten.='</td></tr>';
|
||||
}
|
||||
else if ($lekt_num_rows==1)
|
||||
{
|
||||
$html_user_daten.='<tr><td colspan="2" align="center" style="background-color: #E9ECEE;"><b><font size="+1">Lektor </font></b></td></tr>';
|
||||
$html_user_daten.='<td colspan="2"><b>Kurzzeichen: </b>'.$kurzbz.'<br><b>Standort: </b>'.$ort.'<br><b>'.($tel!=''?'Telefon TW:</b> '.$vorwahl.' '.$tel:'').'</td></tr>';
|
||||
}*/
|
||||
|
||||
$html_user_daten.='</table>';
|
||||
$html_user_daten.=' </td></tr></table>';
|
||||
@@ -974,6 +1096,30 @@ function alle_uid_stundenplan_informationen($db,$uid,$user_array="")
|
||||
return $html_liste_raum;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Kalenderwoche und Tage Initialisieren
|
||||
// ------------------------------------------------------------------------------------------
|
||||
/*
|
||||
$date = date('d');
|
||||
$month = date('m');
|
||||
$year = date('y');
|
||||
$weekday = date('w');
|
||||
$kalenderweek = ((int)date('W')<10?'0'.(int)date('W'):date('W'));
|
||||
|
||||
// Montag ermitteln
|
||||
if($weekday == 0)
|
||||
{
|
||||
$datum=mktime(0, 0, 0, $month, $date-$weekday -6, $year);
|
||||
$ersterTagMonat=date('m', mktime(0, 0, 0, $month, $date-$weekday -6, $year));
|
||||
$ersterTag=date('d', mktime(0, 0, 0, $month, $date-$weekday -6, $year));
|
||||
}
|
||||
else
|
||||
{
|
||||
$datum=mktime(0, 0, 0, $month, $date-$weekday +1, $year);
|
||||
$ersterTagMonat=date('m', mktime(0, 0, 0, $month, $date-$weekday +1, $year));
|
||||
$ersterTag=date('d', mktime(0, 0, 0, $month, $date-$weekday +1, $year));
|
||||
}
|
||||
*/
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Alle Termine zum User lesen
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@@ -1188,19 +1334,18 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
||||
$qry.=" SELECT DISTINCT ";
|
||||
$qry.=" tbl_ortraumtyp.ort_kurzbz ";
|
||||
$qry.=" ,tbl_ort.bezeichnung ,tbl_ort.aktiv ";
|
||||
$qry.=" , (SELECT 'gesperrt'::text FROM public.tbl_ortraumtyp WHERE raumtyp_kurzbz='Gesperrt' AND ort_kurzbz=tbl_ort.ort_kurzbz) as gesperrt";
|
||||
$qry.=" FROM tbl_raumtyp , tbl_ortraumtyp , tbl_ort ";
|
||||
$qry.=" WHERE tbl_ortraumtyp.raumtyp_kurzbz=tbl_raumtyp.raumtyp_kurzbz ";
|
||||
$qry.=" AND tbl_ort.ort_kurzbz=tbl_ortraumtyp.ort_kurzbz ";
|
||||
$qry.=" AND tbl_ort.aktiv ";
|
||||
$qry.=" AND lower(tbl_raumtyp.raumtyp_kurzbz) like lower('%".$db->db_escape(trim($raumtyp_kurzbz))."%') ";
|
||||
if($standort_id!='')
|
||||
$qry.=" AND (tbl_ort.standort_id=".$db->db_add_param($standort_id, FHC_INTEGER)." OR tbl_ort.standort_id is null)";
|
||||
$qry.=" AND (tbl_ort.standort_id=".$db->db_add_param($standort_id, FHC_INTEGER).' OR tbl_ort.standort_id is null)';
|
||||
$qry.=" order by tbl_ortraumtyp.ort_kurzbz ";
|
||||
$qry.=" ; ";
|
||||
|
||||
if(!$result=$db->db_query($qry))
|
||||
die('Probleme beim lesen der Raumtyptabelle ');
|
||||
die('Probleme beim lesen der Raumtyptabelle '.$db->db_last_error());
|
||||
$num_rows_stunde=$db->db_num_rows($result);
|
||||
|
||||
if($num_rows_stunde==0)
|
||||
@@ -1227,6 +1372,7 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
||||
// Raumreservierungen fuer Aktive Raumauswahl
|
||||
// --------------------------------------------------------------
|
||||
|
||||
|
||||
// Die aktive Stunde ermitteln - zum lesen welcher Raum jetzt besetzt ist - aktive Lehreinheit
|
||||
$row_stunde=array();
|
||||
|
||||
@@ -1236,6 +1382,9 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
||||
$qry.=" WHERE ".$db->db_add_param(constAktuelleZeitHHMi,FHC_STRING)." between to_char(tbl_stunde.beginn, 'HH24MI') and to_char(tbl_stunde.ende, 'HH24MI') ";
|
||||
$qry.=" ORDER BY stunde LIMIT 1 ; ";
|
||||
|
||||
# $qry.=" WHERE '". constAktuelleZeitHH."' between to_char(tbl_stunde.beginn, 'HH24') and to_char(tbl_stunde.ende, 'HH24') ";
|
||||
# $qry.=" ORDER BY stunde desc LIMIT 1; ";
|
||||
|
||||
if(!$result=$db->db_query($qry))
|
||||
die('Probleme beim lesen der Raumtyptabelle '.$db->db_last_error());
|
||||
|
||||
@@ -1287,8 +1436,8 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
||||
$farbe="gruen";
|
||||
}
|
||||
|
||||
if ($row_raum[$i]->gesperrt=="gesperrt")
|
||||
$farbe="rot";
|
||||
# if ($farbe=="orange")
|
||||
# var_dump($info);
|
||||
|
||||
// Nach 4 Raumanzeigen eine Neuezeile erzeugen
|
||||
$html_liste_raum.=($i==0 || $i%4?"":"</tr><tr>");
|
||||
@@ -1312,7 +1461,7 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
||||
|
||||
$html_liste_raum.='<td><table><tr><td><span class="gruen_mitteText"> </span></td><td>Mindestens nächsten 2 Einheiten frei</td></tr></table></td>';
|
||||
$html_liste_raum.='<td><table><tr><td><span class="orange_mitteText"> </span></td><td>Derzeit frei</td></tr></table></td>';
|
||||
$html_liste_raum.='<td><table><tr><td><span class="rot_mitteText"> </span></td><td>Raum derzeit besetzt / gesperrt</td></tr></table></td>';
|
||||
$html_liste_raum.='<td><table><tr><td><span class="rot_mitteText"> </span></td><td>Raum derzeit besetzt</td></tr></table></td>';
|
||||
$html_liste_raum.='</tr>';
|
||||
$html_liste_raum.='</table>';
|
||||
$html_liste_raum.='<hr>';
|
||||
@@ -1357,6 +1506,7 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
||||
// dh. Letztes Ende ist gleich Start aktueller Datensatz
|
||||
if ($lastEnde && $row->time_beginn!=$lastEnde)
|
||||
{
|
||||
# echo "<p>Zeit korr. Funktion:alle_raum_informationen ".$row->beginn_show." wird zu ".$lastShowEnde."</p>";
|
||||
$row->time_beginn=$lastEnde;
|
||||
}
|
||||
|
||||
@@ -1750,7 +1900,7 @@ function uid_read_mitarbeiter_oder_student($db,$uid)
|
||||
// Wenn kein Mitarbeiter pruefen ob Student
|
||||
$qry="SELECT uid,person_id,anrede,titelpre,vorname,vornamen,nachname,aktiv FROM campus.vw_student where uid=".$db->db_add_param(trim($uid), FHC_STRING)." LIMIT 1 ; ";
|
||||
if(!$result=$db->db_query($qry))
|
||||
die('Probleme beim Lesen der Studierenden ');
|
||||
die('Probleme beim Lesen der Studierenden '.$db->db_last_error());
|
||||
if ($num_rows_stunde=$db->db_num_rows($result))
|
||||
{
|
||||
while($rows = $db->db_fetch_object($result))
|
||||
@@ -1826,7 +1976,7 @@ function read_create_html_news($db,$fachbereich_kurzbz,$studiengang_kz,$semester
|
||||
{
|
||||
if(defined('CIS_INFOSCREEN_NEWS_ANZEIGEN') && CIS_INFOSCREEN_NEWS_ANZEIGEN==false)
|
||||
return '';
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Lesen Newstickerzeilen
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -169,22 +169,21 @@ echo '
|
||||
echo '<!-- Last content:'.$lastinfoscreencontent.' ID:'.$infoscreen_id.' IP:'.$ip.'-->';
|
||||
if($infoscreen_id!='' && isset($content[$aktuellerContentIdx]))
|
||||
{
|
||||
|
||||
echo '<center style="height: 100%"><iframe id="content" src="../../cms/content.php?content_id='.$content[$aktuellerContentIdx].'" ></iframe></center>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ' <table style="width: 100%; height: 100%">
|
||||
<tr>
|
||||
<td style="height: 80%; vertical-align: center; text-align: center">
|
||||
<img style="height: 900px" src="../../skin/styles/'.EXT_FKT_PATH.'/logo_200x400.png" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height: 20%; vertical-align: bottom; text-align: right; color: #CCCCCC; padding: 50px">'.$ip.'</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
echo '<br><br><br>
|
||||
<center>
|
||||
<h1>Informationsbildschirm - '.CAMPUS_NAME.'</h1>
|
||||
<br><br><br>
|
||||
Dieser Informationsbildschirm wurde noch nicht registriert
|
||||
<br><br>
|
||||
IP-Adresse:'.$ip.'
|
||||
</center>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
@@ -48,11 +48,11 @@ if(check_lektor($user))
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<script type="text/javascript">
|
||||
@@ -175,23 +175,16 @@ if(check_lektor($user))
|
||||
|
||||
<?php
|
||||
$zeilenzaehl=0;
|
||||
$sql_query = "SELECT vorname, nachname, telefonklappe, kontakt, ort_kurzbz, beschreibung, vw_mitarbeiter.standort_id, uid
|
||||
$sql_query = "SELECT vorname, nachname, telefonklappe, kontakt, ort_kurzbz, beschreibung, vw_mitarbeiter.standort_id
|
||||
FROM campus.vw_mitarbeiter
|
||||
JOIN public.tbl_benutzerfunktion USING (uid)
|
||||
JOIN public.tbl_funktion USING (funktion_kurzbz)
|
||||
JOIN public.tbl_kontakt USING (person_id)
|
||||
WHERE funktion_kurzbz='brandbeauftragt'
|
||||
AND (
|
||||
datum_von <= 'now()'
|
||||
OR datum_von IS NULL
|
||||
)
|
||||
AND (
|
||||
datum_bis >= 'now()'
|
||||
OR datum_bis IS NULL
|
||||
)
|
||||
AND (datum_bis>='now()' OR datum_bis IS NULL)
|
||||
AND campus.vw_mitarbeiter.aktiv=TRUE
|
||||
AND vw_mitarbeiter.standort_id IS NOT NULL
|
||||
AND kontakttyp='firmenhandy'
|
||||
AND kontakt LIKE '%61925%'
|
||||
ORDER BY funktion_kurzbz";
|
||||
$result = $db->db_query($sql_query);
|
||||
if ($db->db_num_rows($result) > 0)
|
||||
@@ -209,7 +202,7 @@ if(check_lektor($user))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td width="40%"><a href="../profile/index.php?uid='.$row->uid.'">'.$row->nachname.'</a></td>
|
||||
<td width="40%">'.$row->nachname.'</td>
|
||||
<td width="30%">'.$row->vorname.'</td>
|
||||
<td ><nobr>'.$row->kontakt.'</nobr></td>
|
||||
</tr>';
|
||||
@@ -217,6 +210,23 @@ if(check_lektor($user))
|
||||
echo '
|
||||
</tbody></table>';
|
||||
}
|
||||
// An der FHTW wird als Übergangsloesung statisch die Fa. HEALTH COUNSULT als Brandschutzbeauftragte angezeigt
|
||||
if ($db->db_num_rows($result) == 0 && CAMPUS_NAME == 'FH Technikum Wien')
|
||||
{
|
||||
echo '<h2 style="margin-top:0px;">'.$p->t("notfallbestimmungen/brandschutzbeauftragte").'</h2>';
|
||||
echo '<table class="tablesorter" id="t2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Nummer</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>HEALT COUNSULT - Sicherheitstechnik GmbH</td>
|
||||
<td ><nobr>0650/30 96 909</nobr></td>
|
||||
</tr>
|
||||
</tbody></table>';
|
||||
}
|
||||
?>
|
||||
|
||||
<!--Rektorat auslesen-->
|
||||
|
||||
@@ -68,7 +68,7 @@ isset($_GET['lehreinheit_id']) ? $lehreinheit = $_GET['lehreinheit_id'] : $lehre
|
||||
$stg = new studiengang();
|
||||
$stg->load($lv->studiengang_kz);
|
||||
|
||||
$doc = new dokument_export('Anwesenheitslist', $stg->oe_kurzbz);
|
||||
$doc = new dokument_export('Anwesenheitslist');
|
||||
|
||||
$lehrelisthelper = new LehreListHelper($db, $studiensemester, $lvid, $lv, $stg, $lehreinheit);
|
||||
$arr_lehrende = $lehrelisthelper->getArr_Lehrende();
|
||||
|
||||
@@ -233,21 +233,12 @@ if (isset($_REQUEST["submit"]))
|
||||
continue;
|
||||
}
|
||||
$punkte=str_replace(',','.', $punkte);
|
||||
|
||||
//check ob statt Matrikelnummer nicht bereits student_uid (Moodle Grade Import) vorliegt..
|
||||
//UID ermitteln
|
||||
$student = new student();
|
||||
if (!$student->checkIfValidStudentUID($matrikelnummer))
|
||||
if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer))
|
||||
{
|
||||
//UID ermitteln
|
||||
if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer))
|
||||
{
|
||||
$response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$student_uid = $matrikelnummer;
|
||||
$response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Hole Zeugnisnote wenn schon eine eingetragen ist
|
||||
|
||||
@@ -803,7 +803,6 @@ if (defined('CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN') && CIS_ANWESENHEITSLIST
|
||||
{
|
||||
$hrefpath = "../notenliste.xls.php?stg=$stg_obj->studiengang_kz&lvid=$lvid&stsem=$stsem";
|
||||
echo "<br><a class='Item' href='" . $hrefpath . "'>" . $p->t('benotungstool/notenlisteImport') . "</a>";
|
||||
|
||||
}
|
||||
|
||||
// eingetragene lv-gesamtnoten freigeben
|
||||
|
||||
@@ -37,6 +37,7 @@ require_once('../../../include/erhalter.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
|
||||
|
||||
$doc = new dokument_export('fotoliste');
|
||||
$output = 'pdf';
|
||||
$show_all_fotos = false;
|
||||
|
||||
@@ -61,8 +62,6 @@ $lv->load($lvid);
|
||||
$stg = new studiengang();
|
||||
$stg->load($lv->studiengang_kz);
|
||||
|
||||
$doc = new dokument_export('fotoliste', $stg->oe_kurzbz);
|
||||
|
||||
$berechtigung = new benutzerberechtigung();
|
||||
$berechtigung->getBerechtigungen($user);
|
||||
|
||||
@@ -103,7 +102,6 @@ $gruppen_string = '';
|
||||
$gruppen_string_arr = array();
|
||||
$stg_typ = $stg->typ;
|
||||
$stg_bezeichnung = $stg->bezeichnung;
|
||||
$lv_bezeichnung = '';
|
||||
|
||||
//structure overall lehrveranstaltungs data
|
||||
if ($result = $db->db_query($qry)) {
|
||||
@@ -155,7 +153,6 @@ $qry = 'SELECT DISTINCT ON
|
||||
(nachname, vorname, person_id)
|
||||
vorname,
|
||||
nachname,
|
||||
wahlname,
|
||||
matrikelnr,
|
||||
tbl_studentlehrverband.semester,
|
||||
tbl_studentlehrverband.verband,
|
||||
@@ -240,16 +237,6 @@ if ($result = $db->db_query($qry)) {
|
||||
if ($row->stg_kz_student == $a_o_kz) //Außerordentliche Studierende
|
||||
$zusatz .= '(a.o.)';
|
||||
|
||||
//wenn Wahlname vorhanden, wird dieser anstelle des Vornamens angezeigt
|
||||
if ($row->wahlname != '')
|
||||
{
|
||||
$vorname = $row->wahlname;
|
||||
}
|
||||
else
|
||||
{
|
||||
$vorname = $row->vorname;
|
||||
}
|
||||
|
||||
//allow admin and assistenz to see ALL fotos (even if locked by user)
|
||||
if ($show_all_fotos)
|
||||
$row->foto_sperre = 'f';
|
||||
@@ -284,7 +271,7 @@ if ($result = $db->db_query($qry)) {
|
||||
|
||||
//add studierenden data for XML
|
||||
$data[] = array('studierende' => array(
|
||||
'vorname' => $vorname,
|
||||
'vorname' => $row->vorname,
|
||||
'nachname' => mb_strtoupper($row->nachname, 'UTF-8'),
|
||||
'personenkennzeichen' => trim($row->matrikelnr),
|
||||
'geschlecht' => $row->geschlecht,
|
||||
|
||||
@@ -102,7 +102,6 @@ if (isset($_GET["handbuch"])){
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/jquery.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../../vendor/components/jqueryui/themes/base/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
|
||||
@@ -136,7 +136,7 @@ if (! check_student($user))
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = "SELECT vw_student.vorname, vw_student.nachname, vw_student.wahlname, vw_student.prestudent_id, tbl_studiengang.studiengang_kz
|
||||
$qry = "SELECT vw_student.vorname, vw_student.nachname, vw_student.prestudent_id, tbl_studiengang.studiengang_kz
|
||||
FROM public.tbl_studiengang JOIN campus.vw_student USING (studiengang_kz)
|
||||
WHERE campus.vw_student.uid = " . $db->db_add_param($user) . ";";
|
||||
|
||||
@@ -148,7 +148,6 @@ else
|
||||
|
||||
$vorname = $row->vorname;
|
||||
$nachname = $row->nachname;
|
||||
$wahlname = $row->wahlname;
|
||||
$prestudent_id = $row->prestudent_id;
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->load($row->studiengang_kz);
|
||||
@@ -314,7 +313,7 @@ else
|
||||
// Noten ohne Wert werden entfernen
|
||||
if(isset($notenarr[$row->note]['notenwert']))
|
||||
{
|
||||
$notenSummenArray[$row->lehrveranstaltung_id]['notenwert'] = $notenarr[$row->note]['notenwert'];
|
||||
$notenSummenArray[$row->lehrveranstaltung_id]['notenwert'] = $notenarr[$row->note]['notenwert'];
|
||||
$notenSummenArray[$row->lehrveranstaltung_id]['ects'] = $row->ects;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ else
|
||||
//Lektoren ermitteln
|
||||
|
||||
$qry = "SELECT
|
||||
distinct vorname, nachname, wahlname
|
||||
distinct vorname, nachname
|
||||
FROM
|
||||
campus.vw_benutzer, lehre.tbl_lehreinheit, lehre.tbl_lehreinheitmitarbeiter
|
||||
WHERE
|
||||
@@ -211,7 +211,7 @@ else
|
||||
$qry = "
|
||||
SELECT
|
||||
distinct on(nachname, vorname, person_id)
|
||||
vorname, nachname, wahlname, matrikelnr, person_id, tbl_student.student_uid as uid,
|
||||
vorname, nachname, matrikelnr, person_id, tbl_student.student_uid as uid,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe,
|
||||
(SELECT status_kurzbz
|
||||
FROM public.tbl_prestudentstatus
|
||||
@@ -277,8 +277,6 @@ else
|
||||
$worksheet->write($lines,1,$elem->uid);
|
||||
$worksheet->write($lines,2,$elem->nachname.$inc);
|
||||
$worksheet->write($lines,3,$elem->vorname);
|
||||
//wenn Wahlname vorhanden überschreibt dieser den Vornamen
|
||||
$worksheet->write($lines,3,$elem->wahlname);
|
||||
$worksheet->write($lines,4,'="'.$elem->semester.$elem->verband.$elem->gruppe.'"');
|
||||
$worksheet->write($lines,5,'="'.trim($elem->matrikelnr).'"',$format_highlight);
|
||||
$worksheet->write($lines,6, $note, $format_highlightright);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
/*
|
||||
* GUI fuer die FreeBusy Verwaltung
|
||||
*
|
||||
*
|
||||
* Mit diesem Tool koennen FreeBusy URLs aus verschiedenen Quellen zu einer
|
||||
* FreeBusy URL zusammengefasst werden
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ require_once('../../../include/benutzerberechtigung.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
|
||||
|
||||
$user = get_uid();
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
@@ -60,23 +60,23 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
<link rel="stylesheet" href="../../../skin/jquery.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<title>'.$p->t('freebusy/titel').'</title>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
sortList: [[0,1]],
|
||||
widgets: [\'zebra\']
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function seturl()
|
||||
{
|
||||
url = $("#typ option:selected").attr("url");
|
||||
@@ -116,25 +116,25 @@ if($action=='delete')
|
||||
elseif($action=='save')
|
||||
{
|
||||
//Speichern von Eintraegen
|
||||
|
||||
|
||||
$id = (isset($_POST['id'])?$_POST['id']:'');
|
||||
$aktiv = isset($_POST['aktiv']);
|
||||
|
||||
|
||||
if(isset($_POST['bezeichnung']))
|
||||
$bezeichnung = $_POST['bezeichnung'];
|
||||
else
|
||||
die($p->t('global/fehlerBeiDerParameteruebergabe'));
|
||||
|
||||
|
||||
if(isset($_POST['typ']))
|
||||
$typ = $_POST['typ'];
|
||||
else
|
||||
die($p->t('global/fehlerBeiDerParameteruebergabe'));
|
||||
|
||||
|
||||
if(isset($_POST['url']))
|
||||
$url = $_POST['url'];
|
||||
else
|
||||
die($p->t('global/fehlerBeiDerParameteruebergabe'));
|
||||
|
||||
|
||||
//Pruefen ob die URL geoeffnet werden kann
|
||||
$fp = @fopen($url,'r');
|
||||
if (!$fp)
|
||||
@@ -142,7 +142,7 @@ elseif($action=='save')
|
||||
else
|
||||
{
|
||||
fclose($fp);
|
||||
|
||||
|
||||
$fb = new freebusy();
|
||||
if($id!='')
|
||||
{
|
||||
@@ -150,8 +150,8 @@ elseif($action=='save')
|
||||
die($p->t('global/fehleraufgetreten'));
|
||||
if($fb->uid!=$user)
|
||||
die($p->t('global/keineBerechtigungZumAendernDesDatensatzes'));
|
||||
|
||||
|
||||
|
||||
|
||||
$fb->new=false;
|
||||
}
|
||||
else
|
||||
@@ -161,20 +161,20 @@ elseif($action=='save')
|
||||
$fb->insertvon = $user;
|
||||
$fb->uid = $user;
|
||||
}
|
||||
|
||||
|
||||
$fb->updateamum = date('Y-m-d H:i:s');
|
||||
$fb->updatevon = $user;
|
||||
$fb->bezeichnung = $bezeichnung;
|
||||
$fb->url = $url;
|
||||
$fb->freebusytyp_kurzbz = $typ;
|
||||
$fb->aktiv = $aktiv;
|
||||
|
||||
|
||||
if($fb->save())
|
||||
echo '<span class="ok">'.$p->t('global/erfolgreichgespeichert').'</span>';
|
||||
else
|
||||
echo '<span class="error">'.$p->t('global/fehleraufgetreten').'</span>';
|
||||
echo '<span class="error">'.$p->t('global/fehleraufgetreten').'</span>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Tabelle mit den vorhandenen Eintraegen anzeigen
|
||||
@@ -201,17 +201,7 @@ echo '<table id="myTable" class="tablesorter">
|
||||
echo '<td></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
|
||||
//zeitsperren
|
||||
echo '<tr>';
|
||||
echo '<td>'.$p->t('freebusy/ZeitsperrenBezeichnung').'</td>';
|
||||
echo '<td>'.$p->t('freebusy/ZeitsperrenTyp').'</td>';
|
||||
echo '<td></td>';
|
||||
echo '<td>'.$p->t('global/ja').'</td>';
|
||||
echo '<td></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
foreach($fb->result as $row)
|
||||
{
|
||||
$typ = new freebusy();
|
||||
@@ -233,7 +223,7 @@ echo '<a href="'.$_SERVER['PHP_SELF'].'?action=neu">'.$p->t('freebusy/neuerEintr
|
||||
if($action=='edit' || $action=='neu')
|
||||
{
|
||||
$fb = new freebusy();
|
||||
|
||||
|
||||
if($action=='neu')
|
||||
{
|
||||
$new = true;
|
||||
@@ -246,7 +236,7 @@ if($action=='edit' || $action=='neu')
|
||||
if(!$fb->load($id))
|
||||
die($p->t('global/fehlerBeimLadenDesDatensatzes'));
|
||||
}
|
||||
|
||||
|
||||
echo '<form action="'.$_SERVER['PHP_SELF'].'?action=save" method="POST">';
|
||||
echo '<input type="hidden" name="id" value="'.$fb->freebusy_id.'" />';
|
||||
echo '<table>
|
||||
@@ -269,7 +259,7 @@ if($action=='edit' || $action=='neu')
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
|
||||
|
||||
$vorlage = mb_str_replace('$uid',$user, $row->url_vorlage);
|
||||
echo '<OPTION value="'.$db->convert_html_chars($row->freebusytyp_kurzbz).'" '.$selected.' url="'.$db->convert_html_chars($vorlage).'">'.$db->convert_html_chars($row->bezeichnung),'</OPTION>';
|
||||
}
|
||||
@@ -285,4 +275,4 @@ if($action=='edit' || $action=='neu')
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -33,7 +33,6 @@ require_once('../../../include/mail.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/sprache.class.php');
|
||||
require_once('../../../include/zeitaufzeichnung.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$lang = new sprache();
|
||||
@@ -271,59 +270,20 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
|
||||
}
|
||||
|
||||
//Prüfen, ob eine Zeitaufzeichnung vorhanden ist und ggf Abbrechen
|
||||
$error = false;
|
||||
for ($i = 0; $i < count($akette); $i++)
|
||||
//Pruefen ob bereits ein Urlaub in den markierten Bereichen vorhanden ist und ggf Abbrechen
|
||||
//Das Problem sollte nur beim manuellen Refresh der Seite auftreten
|
||||
$error=false;
|
||||
for($i=0;$i<count($akette);$i++)
|
||||
{
|
||||
$za = new zeitaufzeichnung();
|
||||
$vonDatum = new DateTime($akette[$i]);
|
||||
$bisDatum = new DateTime($ekette[$i]);
|
||||
$zeitsperre = new zeitsperre();
|
||||
|
||||
if ($za->existsZeitaufzeichnung($uid, $vonDatum->format('d.m.Y'), $bisDatum->format('d.m.Y')))
|
||||
if($zeitsperre->UrlaubEingetragen($uid, $akette[$i], $ekette[$i]))
|
||||
{
|
||||
$error = true;
|
||||
$vgmail .= '<br><span class="error">'.$p->t('zeitsperre/zeitaufzeichnungVorhanden'). ' '.
|
||||
$vonDatum->format('d.m.Y'). ' - '. $bisDatum->format('d.m.Y'). '</span>';
|
||||
$vgmail.='<br><span class="error">'.$p->t('zeitsperre/urlaubBereitsEingetragen').'</span>';
|
||||
$error=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Prüfen ob eine ganztägige Zeitsperre eingetragen ist und ggf abbrechen
|
||||
$daysToCheck = array();
|
||||
for ($i = 0; $i < count($akette); $i++)
|
||||
{
|
||||
$zeitsperre = new zeitsperre();
|
||||
$vonDatum = new DateTime($akette[$i]);
|
||||
$bisDatum = new DateTime($ekette[$i]);
|
||||
|
||||
//add here to array, weil in der foreach-Schleife, das bisdatum nicht inkludiert ist
|
||||
$daysToCheck[] = $bisDatum->format("Y-m-d");
|
||||
|
||||
$daterange = new DatePeriod($vonDatum, new DateInterval('P1D'), $bisDatum);
|
||||
foreach($daterange as $date)
|
||||
{
|
||||
$daysToCheck[] = $date->format("Y-m-d");
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($daysToCheck AS $date)
|
||||
{
|
||||
$zeitsperre->getSperreByDate($uid, $date, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN);
|
||||
|
||||
foreach ($zeitsperre->result as $z)
|
||||
{
|
||||
if ($z->zeitsperretyp_kurzbz)
|
||||
{
|
||||
$error = true;
|
||||
|
||||
$z->zeitsperretyp_kurzbz == 'Urlaub' ?
|
||||
$vgmail.='<br><span class="error">'.$p->t('zeitsperre/urlaubBereitsEingetragen').'</span>' :
|
||||
$vgmail .= '<br><span class="error">'.$p->t('zeitsperre/zeitsperreEingetragen',[$date, $z->zeitsperretyp_kurzbz]). '</span>';
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
@@ -834,13 +794,13 @@ for ($i=0;$i<6;$i++)
|
||||
echo '<b>'.$tage[$j+7*$i].'</b><br>';
|
||||
if(strlen(stristr($tage[$j+7*$i],"."))>0)
|
||||
{
|
||||
echo '<input type="checkbox" name="wtag[]"
|
||||
value="'.date("Y-m-d",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"
|
||||
echo '<input type="checkbox" name="wtag[]"
|
||||
value="'.date("Y-m-d",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"
|
||||
id="'.date("d.m.Y",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<input type="checkbox" name="wtag[]" value="'.date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"
|
||||
echo '<input type="checkbox" name="wtag[]" value="'.date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"
|
||||
id="'.date("d.m.Y",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"></td>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ function showHideBezeichnungDropDown()
|
||||
}
|
||||
else if (dd.options[dd.selectedIndex].value == 'DienstF')
|
||||
{
|
||||
sp.innerHTML = '<font color="red"><b>Dienstfreistellungen</b> nur in Absprache mit HR Service eintragen!</font><br><input type="text" name="bezeichnung" maxlength="32" size="32" value="">';
|
||||
sp.innerHTML = '<font color="red"><b>Dienstfreistellungen</b> nur in Absprache mit Personalservice eintragen!</font><br><input type="text" name="bezeichnung" maxlength="32" size="32" value="">';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ if (defined('LOG_CONTENT') && LOG_CONTENT==true)
|
||||
//Easter Egg
|
||||
$easteregg = array ('antwort','leben','universum','rest','answer','universe','life','everything');
|
||||
$easteregg_intersect = array_intersect(array_map('strtolower',$searchItems), $easteregg);
|
||||
if (count($easteregg_intersect)==3)
|
||||
if (count($easteregg_intersect)==4)
|
||||
{
|
||||
echo '<table width="100%"><tr><td align="center"><br><br><br><p style="align:center; font-size: 2000%;"><strong>42</strong></p></td></tr></table>';
|
||||
exit;
|
||||
@@ -178,25 +178,20 @@ function searchPerson($searchItems)
|
||||
echo '<tr>';
|
||||
//echo '<td>',$row->titelpre,'</td>';
|
||||
echo '<td>',$row->anrede,'</td>';
|
||||
|
||||
if ($row->wahlname)
|
||||
echo '<td>',$row->wahlname, ' ' ,$row->vorname, '</td>';
|
||||
else
|
||||
echo '<td>',$row->vorname, '</td>';
|
||||
|
||||
echo '<td>',$row->vorname,'</td>';
|
||||
echo '<td>';
|
||||
if(!defined('CIS_SUCHE_PROFIL_ANZEIGEN'))
|
||||
echo '<a href="../profile/index.php?uid=',$row->uid,'" title="',$row->titelpre,' ',$row->vorname,' ',$row->wahlname, ' ',$row->nachname,' ',$row->titelpost,'">',$row->nachname,'</a>';
|
||||
echo '<a href="../profile/index.php?uid=',$row->uid,'" title="',$row->titelpre,' ',$row->vorname,' ',$row->nachname,' ',$row->titelpost,'">',$row->nachname,'</a>';
|
||||
else if(!CIS_SUCHE_PROFIL_ANZEIGEN)
|
||||
{
|
||||
$mitarbeiter = new Mitarbeiter($uid);
|
||||
if($mitarbeiter->errormsg === NULL)
|
||||
echo '<a href="../profile/index.php?uid=',$row->uid,'" title="',$row->titelpre,' ',$row->vorname,' ',$row->wahlname, ' ',$row->nachname,' ',$row->titelpost,'">',$row->nachname,'</a>';
|
||||
echo '<a href="../profile/index.php?uid=',$row->uid,'" title="',$row->titelpre,' ',$row->vorname,' ',$row->nachname,' ',$row->titelpost,'">',$row->nachname,'</a>';
|
||||
else
|
||||
echo $row->nachname;
|
||||
}
|
||||
else
|
||||
echo '<a href="../profile/index.php?uid=',$row->uid,'" title="',$row->titelpre,' ',$row->vorname,' ',$row->wahlname,' ',$row->nachname,' ',$row->titelpost,'">',$row->nachname,'</a>';
|
||||
echo '<a href="../profile/index.php?uid=',$row->uid,'" title="',$row->titelpre,' ',$row->vorname,' ',$row->nachname,' ',$row->titelpost,'">',$row->nachname,'</a>';
|
||||
if($row->aktiv==false)
|
||||
echo '<span style="color: red"> (ausgeschieden)</span>';
|
||||
elseif($bisverwendung->beschausmasscode=='5')
|
||||
@@ -280,7 +275,7 @@ function searchOE($searchItems)
|
||||
$oe->result[] = new organisationseinheit($row->oe_kurzbz);
|
||||
}
|
||||
|
||||
if(is_array($oe->result) && count($oe->result)>0)
|
||||
if(count($oe->result)>0)
|
||||
{
|
||||
echo '<h2 style="padding-bottom: 10px;">',$p->t('global/organisationseinheiten'),'</h2>';
|
||||
echo '
|
||||
|
||||
@@ -158,7 +158,7 @@ $angezeigte_tage = '50';
|
||||
|
||||
$zs = new zeitsperre();
|
||||
if ($alle)
|
||||
$zs->getZeitsperrenForZeitaufzeichnung($user,'360');
|
||||
$zs->getZeitsperrenForZeitaufzeichnung($user,'180');
|
||||
else
|
||||
$zs->getZeitsperrenForZeitaufzeichnung($user,$angezeigte_tage);
|
||||
|
||||
@@ -1440,7 +1440,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
else
|
||||
{
|
||||
if ($alle==true)
|
||||
$za->getListeUserFull($user, '360');
|
||||
$za->getListeUserFull($user, '');
|
||||
else
|
||||
$za->getListeUserFull($user, $angezeigte_tage);
|
||||
}
|
||||
|
||||
@@ -105,26 +105,6 @@ else
|
||||
|
||||
$ical->importFreeBusy($doc, 'LVPLAN');
|
||||
}
|
||||
|
||||
//Zeitsperren
|
||||
$fp = fopen(APP_ROOT.'cis/public/freebusy_zeitsperren.php/'.$uid,'r');
|
||||
if (!$fp)
|
||||
{
|
||||
echo "URL kann nicht geoeffnet werden<br />\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$doc = '';
|
||||
while (!feof($fp))
|
||||
{
|
||||
$line = fgets($fp);
|
||||
$doc.=$line;
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
$ical->importFreeBusy($doc, 'Zeitsperren');
|
||||
}
|
||||
|
||||
echo $ical->getFreeBusy();
|
||||
echo "\nEND:VCALENDAR";
|
||||
?>
|
||||
|
||||
@@ -37,7 +37,6 @@ require_once('../../include/gebiet.class.php');
|
||||
require_once('../../include/sprache.class.php');
|
||||
require_once '../../include/phrasen.class.php';
|
||||
require_once '../../include/reihungstest.class.php';
|
||||
require_once '../../include/pruefling.class.php';
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
@@ -158,12 +157,6 @@ echo '
|
||||
if(!isset($_SESSION['pruefling_id']))
|
||||
die($p->t('testtool/bitteZuerstAnmelden'));
|
||||
|
||||
$pruefling = new pruefling();
|
||||
$pruefling->load($_SESSION['pruefling_id']);
|
||||
|
||||
if ($pruefling->gesperrt === 't')
|
||||
die("<script>document.location.href='prueflinggesperrt.php';</script>");
|
||||
|
||||
$gebiet = new gebiet($gebiet_id);
|
||||
|
||||
if($gebiet->level_start!='')
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once('../../config/cis.config.inc.php');
|
||||
require_once('../../include/basis_db.class.php');
|
||||
require_once('../../include/sprache.class.php');
|
||||
require_once '../../include/phrasen.class.php';
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
|
||||
// Start session
|
||||
session_start();
|
||||
|
||||
// If language is changed by language select menu, reset language variables
|
||||
if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
|
||||
{
|
||||
$_SESSION['sprache_user'] = $_GET['sprache_user'];
|
||||
$sprache_user = $_GET['sprache_user'];
|
||||
}
|
||||
|
||||
// Set language variable
|
||||
$sprache_user = (isset($_SESSION['sprache_user']) && !empty($_SESSION['sprache_user'])) ? $_SESSION['sprache_user'] : DEFAULT_LANGUAGE;
|
||||
$p = new phrasen($sprache_user);
|
||||
|
||||
?>
|
||||
<!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">
|
||||
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<br><br><br><br><br>
|
||||
<center><h2><?php echo $p->t('testtool/prueflingGesperrt');?></h2>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
@@ -175,7 +175,7 @@ SELECT
|
||||
SELECT
|
||||
'Verlinkung von '||content_id AS art
|
||||
FROM campus.tbl_contentsprache
|
||||
WHERE content::text LIKE '%content.php?content_id='||content.content_id
|
||||
WHERE content::text LIKE '%content.php?content_id='||content.content_id||'%'
|
||||
/*WHERE content::text ~* '[\w\d\s]*content\.php\?content_id=1245[\w\d\s]*'*/
|
||||
) verwendung
|
||||
) AS verwendung_in,
|
||||
|
||||
@@ -258,9 +258,6 @@ define('STIP_USER_PASSWORD','password');
|
||||
// Array mit Usern die nicht Kollidieren
|
||||
define('KOLLISIONSFREIE_USER',serialize(array('_DummyLektor')));
|
||||
|
||||
// UID des Dummy Lektors
|
||||
define('DUMMY_LEKTOR_UID','_DummyLektor');
|
||||
|
||||
// Soll der Lageplan am Infoterminal angezeigt werden (true|false)
|
||||
//define('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN', true);
|
||||
|
||||
|
||||
@@ -263,7 +263,4 @@ define('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK', serialize(
|
||||
|
||||
// Spezialnoten die am Zeunigs und Diplomasupplement ignoriert werden
|
||||
define('ZEUGNISNOTE_NICHT_ANZEIGEN',serialize(array('iar', 'nz')));
|
||||
|
||||
//Default Lehrmodus
|
||||
define ('DEFAULT_LEHRMODUS','regulaer');
|
||||
?>
|
||||
|
||||
@@ -496,7 +496,7 @@ if(!$error)
|
||||
elseif(isset($_POST['stsem_aktuell']))
|
||||
{
|
||||
$stsem = new studiensemester();
|
||||
$studiensemester_kurzbz = $stsem->getNearest();
|
||||
$studiensemester_kurzbz = $stsem->getakt();
|
||||
|
||||
$variable->name = 'semester_aktuell';
|
||||
$variable->wert = $studiensemester_kurzbz;
|
||||
|
||||
@@ -1477,7 +1477,7 @@ if(!$error)
|
||||
$lema_new->insertamum = date('Y-m-d H:i:s');
|
||||
$lema_new->insertvon = $user;
|
||||
$lema_new->ext_id = $row->ext_id;
|
||||
$lema_new->vertrag_id = '';
|
||||
$lema_new->vertrag_id = $row->vertrag_id;
|
||||
|
||||
if (!$lema_new->save(true))
|
||||
{
|
||||
|
||||
@@ -74,7 +74,6 @@ if(!$error)
|
||||
$mitarbeiter->titelpre = $_POST['titelpre'];
|
||||
$mitarbeiter->titelpost = $_POST['titelpost'];
|
||||
$mitarbeiter->vorname = $_POST['vorname'];
|
||||
$mitarbeiter->wahlname = $_POST['wahlname'];
|
||||
$mitarbeiter->vornamen = $_POST['vornamen'];
|
||||
$mitarbeiter->nachname = $_POST['nachname'];
|
||||
$mitarbeiter->gebdatum = $_POST['geburtsdatum'];
|
||||
@@ -182,7 +181,7 @@ if(!$error)
|
||||
$verwendung->azgrelevant = false;
|
||||
else
|
||||
$verwendung->azgrelevant = '';
|
||||
|
||||
|
||||
if($_POST['homeoffice']=='true')
|
||||
$verwendung->homeoffice = true;
|
||||
elseif($_POST['homeoffice']=='false')
|
||||
|
||||
@@ -85,10 +85,6 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<label value="Vornamen" control="mitarbeiter-detail-textbox-vornamen"/>
|
||||
<textbox id="mitarbeiter-detail-textbox-vornamen" disabled="true" maxlength="128" oninput="MitarbeiterDetailValueChange()"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Wahlname" control="mitarbeiter-detail-textbox-wahlname"/>
|
||||
<textbox id="mitarbeiter-detail-textbox-wahlname" disabled="true" maxlength="128" oninput="MitarbeiterDetailValueChange()"/>
|
||||
</row>
|
||||
<row <?php echo ($rechte->isBerechtigt('mitarbeiter/persoenlich'))?'':'hidden="true"'; ?>>
|
||||
<label value="Geburtsdatum" control="mitarbeiter-detail-textbox-geburtsdatum" />
|
||||
<hbox>
|
||||
|
||||
@@ -414,7 +414,6 @@ function MitarbeiterDetailDisableFields(val)
|
||||
document.getElementById('mitarbeiter-detail-textbox-titelpost').disabled=val;
|
||||
document.getElementById('mitarbeiter-detail-textbox-nachname').disabled=val;
|
||||
document.getElementById('mitarbeiter-detail-textbox-vorname').disabled=val;
|
||||
document.getElementById('mitarbeiter-detail-textbox-wahlname').disabled=val;
|
||||
document.getElementById('mitarbeiter-detail-textbox-vornamen').disabled=val;
|
||||
document.getElementById('mitarbeiter-detail-textbox-geburtsdatum').disabled=val;
|
||||
document.getElementById('mitarbeiter-detail-textbox-geburtsort').disabled=val;
|
||||
@@ -536,7 +535,6 @@ function MitarbeiterAuswahl()
|
||||
titelpre=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titelpre" ));
|
||||
titelpost=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titelpost" ));
|
||||
vorname=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#vorname" ));
|
||||
wahlname=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#wahlname" ));
|
||||
vornamen=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#vornamen" ));
|
||||
nachname=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#nachname" ));
|
||||
geburtsdatum=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#geburtsdatum" ));
|
||||
@@ -578,7 +576,6 @@ function MitarbeiterAuswahl()
|
||||
document.getElementById('mitarbeiter-detail-textbox-titelpre').value=titelpre;
|
||||
document.getElementById('mitarbeiter-detail-textbox-titelpost').value=titelpost;
|
||||
document.getElementById('mitarbeiter-detail-textbox-vorname').value=vorname;
|
||||
document.getElementById('mitarbeiter-detail-textbox-wahlname').value=wahlname;
|
||||
document.getElementById('mitarbeiter-detail-textbox-vornamen').value=vornamen;
|
||||
document.getElementById('mitarbeiter-detail-textbox-nachname').value=nachname;
|
||||
document.getElementById('mitarbeiter-detail-textbox-geburtsdatum').value=geburtsdatum;
|
||||
@@ -634,7 +631,7 @@ function MitarbeiterAuswahl()
|
||||
document.getElementById('mitarbeiter-detail-textbox-alias').value=alias;
|
||||
|
||||
// ***** KONTAKTE *****
|
||||
document.getElementById('mitarbeiter-kontakt').setAttribute('src','kontakt.xul.php?person_id='+person_id+'&'+gettimestamp());
|
||||
document.getElementById('mitarbeiter-kontakt').setAttribute('src','kontakt.xul.php?person_id='+person_id);
|
||||
|
||||
// ***** BETRIEBSMITTEL *****
|
||||
document.getElementById('mitarbeiter-betriebsmittel').setAttribute('src','betriebsmitteloverlay.xul.php?person_id='+person_id+'&uid='+uid);
|
||||
@@ -821,7 +818,6 @@ function MitarbeiterSave()
|
||||
titelpre = document.getElementById('mitarbeiter-detail-textbox-titelpre').value;
|
||||
titelpost = document.getElementById('mitarbeiter-detail-textbox-titelpost').value;
|
||||
vorname = document.getElementById('mitarbeiter-detail-textbox-vorname').value;
|
||||
wahlname = document.getElementById('mitarbeiter-detail-textbox-wahlname').value;
|
||||
vornamen = document.getElementById('mitarbeiter-detail-textbox-vornamen').value;
|
||||
nachname = document.getElementById('mitarbeiter-detail-textbox-nachname').value;
|
||||
geburtsdatum = document.getElementById('mitarbeiter-detail-textbox-geburtsdatum').value;
|
||||
@@ -877,7 +873,6 @@ function MitarbeiterSave()
|
||||
req.add('titelpre', titelpre);
|
||||
req.add('titelpost', titelpost);
|
||||
req.add('vorname', vorname);
|
||||
req.add('wahlname', wahlname);
|
||||
req.add('vornamen', vornamen);
|
||||
req.add('nachname', nachname);
|
||||
req.add('geburtsdatum', ConvertDateToISO(geburtsdatum));
|
||||
@@ -993,7 +988,6 @@ function MitarbeiterDetailgetSpaltenname(id)
|
||||
if(id=='mitarbeiter-treecol-titelpre') return 'titelpre';
|
||||
if(id=='mitarbeiter-treecol-vorname') return 'vorname';
|
||||
if(id=='mitarbeiter-treecol-vornamen') return 'vornamen';
|
||||
if(id=='mitarbeiter-treecol-wahlname') return 'wahlname';
|
||||
if(id=='mitarbeiter-treecol-nachname') return 'nachname';
|
||||
if(id=='mitarbeiter-treecol-titelpost') return 'titelpost';
|
||||
if(id=='mitarbeiter-treecol-personalnummer') return 'personalnummer';
|
||||
|
||||
@@ -111,13 +111,9 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/mitarbeiter/mitarbeitervertragover
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname" onclick="MitarbeiterTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-treecol-wahlname" label="Wahlname" flex="1" persist="hidden, width, ordinal" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#wahlname" onclick="MitarbeiterTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-treecol-vornamen" label="Vornamen" flex="1" persist="hidden, width, ordinal" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#wahlname" onclick="MitarbeiterTreeSort()"/>
|
||||
sort="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vornamen" onclick="MitarbeiterTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="mitarbeiter-treecol-titelpost" label="TitelPost" flex="1" persist="hidden, width, ordinal" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
@@ -212,8 +208,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/mitarbeiter/mitarbeitervertragover
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpre" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#wahlname" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vornamen" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vornamen" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/mitarbeiter/rdf#aktiv" label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpost" />
|
||||
<?php
|
||||
if($rechte->isBerechtigt('mitarbeiter/persoenlich'))
|
||||
|
||||
@@ -181,9 +181,7 @@ SELECT tbl_lehrveranstaltung.bezeichnung AS lf_bezeichnung,
|
||||
AND tbl_lehrveranstaltung.lehrform_kurzbz = slv.lehrform_kurzbz
|
||||
AND sle.studiensemester_kurzbz = " . $db->db_add_param($previousStsem) . "
|
||||
) AS vorjahr_lektor,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.las,
|
||||
tbl_lehrveranstaltung.alvs
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz
|
||||
FROM lehre.tbl_lehrveranstaltung
|
||||
JOIN lehre.tbl_lehreinheit USING (lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_lehreinheitmitarbeiter USING (lehreinheit_id)
|
||||
@@ -276,7 +274,7 @@ $maxlength[$spalte]=9;
|
||||
$worksheet->write($zeile,++$spalte,"LV-Nummer", $format_bold);
|
||||
$maxlength[$spalte]=9;
|
||||
|
||||
$worksheet->write($zeile,++$spalte,"Lehrauftragsstunden", $format_bold);
|
||||
$worksheet->write($zeile,++$spalte,"Semesterstunden", $format_bold);
|
||||
$maxlength[$spalte]=15;
|
||||
|
||||
$worksheet->write($zeile,++$spalte,"ECTS", $format_bold);
|
||||
@@ -297,14 +295,6 @@ $maxlength[$spalte]=10;
|
||||
$worksheet->write($zeile,++$spalte,"Start in KW", $format_bold);
|
||||
$maxlength[$spalte]=10;
|
||||
|
||||
$worksheet->write($zeile,++$spalte,"LAS der LV", $format_bold);
|
||||
$maxlength[$spalte]=10;
|
||||
|
||||
$worksheet->write($zeile,++$spalte,"ALVS der LV", $format_bold);
|
||||
$maxlength[$spalte]=10;
|
||||
|
||||
$worksheet->write($zeile,++$spalte,"Anzahl Studierende", $format_bold);
|
||||
$maxlength[$spalte]=16;
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
@@ -455,26 +445,6 @@ if($result = $db->db_query($qry))
|
||||
|
||||
//Start in KW
|
||||
$worksheet->write($zeile,++$spalte,$row->start_kw);
|
||||
|
||||
//LAS der LV
|
||||
$worksheet->write($zeile,++$spalte,$row->las);
|
||||
|
||||
//ALVS der LV
|
||||
$worksheet->write($zeile,++$spalte,$row->alvs);
|
||||
|
||||
// Anzahl Studierende in Lehreinheit
|
||||
$anzahlStudierende = 0;
|
||||
$qry_anz_std = "SELECT count(DISTINCT uid) as anzahl FROM campus.vw_student_lehrveranstaltung WHERE lehreinheit_id=".$db->db_add_param($row->lehreinheit_id, FHC_INTEGER);
|
||||
|
||||
if($result_anz_std = $db->db_query($qry_anz_std))
|
||||
{
|
||||
if ($row_anz_std = $db->db_fetch_object($result_anz_std))
|
||||
{
|
||||
$anzahlStudierende = $row_anz_std->anzahl;
|
||||
}
|
||||
}
|
||||
|
||||
$worksheet->write($zeile,++$spalte,$anzahlStudierende);
|
||||
}
|
||||
|
||||
//Betreuungen
|
||||
|
||||
@@ -95,7 +95,6 @@ if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz') && !$r
|
||||
$data = '';
|
||||
$error = true;
|
||||
}
|
||||
$check_statusaenderung_berechtigung = 'student/keine_studstatuspruefung';
|
||||
|
||||
// *** FUNKTIONEN ***
|
||||
|
||||
@@ -373,175 +372,6 @@ function isBuchungAllowedToChange($buchung_obj)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Prüft für einen Prestudenten, ob eine bestimmte Statusänderung valide ist.
|
||||
* @param $prestudent_id
|
||||
* @param $status_kurzbz des neuen/bearbeiteten Status
|
||||
* @param $new_status_studiensemester Studiensemester des neuen/zu ändernen Status
|
||||
* @param $new_status_datum Datum des neuen/zu ändernen Status
|
||||
* @param $new_status_ausbildungssemester Ausbildungssemester des neuen/zu ändernen Status
|
||||
* @param $old_status_studiensemester Studiensemester des alten Status, leer wenn neuer Status
|
||||
* @param $old_status_ausbildungssemester Ausbildungssemester des alten Status, leer wenn neuer Status
|
||||
* @return array
|
||||
*/
|
||||
function checkStatusaenderung(
|
||||
$prestudent_id, $status_kurzbz, $new_status_studiensemester, $new_status_datum, $new_status_ausbildungssemester,
|
||||
$old_status_studiensemester = '', $old_status_ausbildungssemester = ''
|
||||
)
|
||||
{
|
||||
global $db;
|
||||
// Es ist ein neuer Status wenn es kein altes Semester gibt
|
||||
$isNewStatus = $old_status_studiensemester == '' && $old_status_ausbildungssemester == '';
|
||||
// status_kurzbz für Endstatus
|
||||
$endstatusArr = array('Absolvent', 'Abbrecher');
|
||||
// Datum des neuen Status setzen
|
||||
$new_status_datum = new DateTime($new_status_datum);
|
||||
|
||||
// Wenn neuer Status
|
||||
if ($isNewStatus)
|
||||
{
|
||||
// Datum des neuen Status darf nicht in Vergangenheit liegen, sonst Probleme wenn neues Datum < Bismeldedatum
|
||||
$current_date = new DateTime('today');
|
||||
if ($new_status_datum < $current_date)
|
||||
{
|
||||
return array(
|
||||
'error' => true,
|
||||
'errormsg' => 'Datum eines neuen Statuseintrags darf nicht in der Vergangenheit liegen'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// start des Studiensemesters holen
|
||||
$studiensemester = new studiensemester();
|
||||
$studiensemester->load($new_status_studiensemester);
|
||||
$new_status_semesterstart = new DateTime($studiensemester->start);
|
||||
|
||||
// Alle bisherigen prestudentstatus nach Datum sortiert
|
||||
$qry = "SELECT status_kurzbz, studiensemester_kurzbz, ausbildungssemester, datum, sem.start AS studiensemester_start
|
||||
FROM public.tbl_prestudentstatus pss
|
||||
JOIN public.tbl_studiensemester sem USING (studiensemester_kurzbz)
|
||||
WHERE prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
|
||||
// zu ändernden Status rausfiltern wenn Status bearbeitet wird
|
||||
if (!$isNewStatus)
|
||||
{
|
||||
$qry .= " AND NOT (
|
||||
status_kurzbz=".$db->db_add_param($status_kurzbz)
|
||||
." AND studiensemester_kurzbz=".$db->db_add_param($old_status_studiensemester)
|
||||
." AND ausbildungssemester=".$db->db_add_param($old_status_ausbildungssemester, FHC_INTEGER)."
|
||||
)";
|
||||
}
|
||||
|
||||
$qry .= " ORDER BY datum DESC, pss.insertamum DESC, pss.ext_id DESC";
|
||||
|
||||
$statusArr = array();
|
||||
if ($result = $db->db_query($qry))
|
||||
{
|
||||
$newStatusInserted = false;
|
||||
|
||||
// für jeden Status
|
||||
while ($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$studiensemester_start = new DateTime($row->studiensemester_start);
|
||||
$status_datum = new DateTime($row->datum);
|
||||
|
||||
// Neuer/editierter Statuseintrag nach bestehendem Statuseintrag
|
||||
if ($new_status_datum >= $status_datum && $new_status_semesterstart >= $studiensemester_start)
|
||||
{
|
||||
if (!$newStatusInserted)
|
||||
{
|
||||
// neuer Status erstmals größer als Datum eines bestehenden Status -> neuen Status einfügen
|
||||
$new_status = new stdClass();
|
||||
$new_status->status_kurzbz = $status_kurzbz;
|
||||
$new_status->studiensemester_kurzbz = $new_status_studiensemester;
|
||||
$new_status->datum = $new_status_datum;
|
||||
$new_status->ausbildungssemester = $new_status_ausbildungssemester;
|
||||
$statusArr[] = $new_status;
|
||||
$newStatusInserted = true;
|
||||
}
|
||||
|
||||
// Gültige Zeitabfolge, bestehenden Status hinzufügen
|
||||
$statusArr[] = $row;
|
||||
}
|
||||
// oder Neuer/editierter Statuseintrag nach bestehendem Statuseintrag
|
||||
elseif ($new_status_datum <= $status_datum && $new_status_semesterstart <= $studiensemester_start)
|
||||
{
|
||||
// Gültige Zeitabfolge, bestehenden Status hinzufügen
|
||||
$statusArr[] = $row;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Zeitabfolge ungültig, Fehler
|
||||
return array(
|
||||
'error' => true,
|
||||
'errormsg' => 'Datum des Statuseintrags muss nach dem Statusdatum,'
|
||||
.' Semesterstartdatum nach Semesterstartdatum des vorherigen Statuseintrags sein'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Prüfungen den Prestudentstatus betreffend
|
||||
// Über alle gespeicherten Status gehen und Statusabfolge prüfen
|
||||
for ($i = 0; $i < count($statusArr); $i++)
|
||||
{
|
||||
$curr_status = $statusArr[$i];
|
||||
$curr_status_kurzbz = $curr_status->status_kurzbz;
|
||||
$curr_status_ausbildungssemester = $curr_status->ausbildungssemester;
|
||||
$next_idx = $i - 1; //absteigend sortiert, nächster Status ist vorheriger Eintrag
|
||||
$next_status = isset($statusArr[$next_idx]) ? $statusArr[$next_idx] : null;
|
||||
|
||||
// Abbrecher- oder Absolventenstatus muss Endstatus sein
|
||||
if (isset($next_status) && in_array($curr_status_kurzbz, $endstatusArr))
|
||||
{
|
||||
return array(
|
||||
'error' => true,
|
||||
'errormsg' => 'Nach Abbrecher- und Absolventenstatus darf kein anderer Status mehr eingetragen werden'
|
||||
);
|
||||
}
|
||||
|
||||
// wenn Unterbrecher auf Unterbrecher folgt, muss Ausbildungssemester gleich sein
|
||||
if (
|
||||
$curr_status_kurzbz == 'Unterbrecher' && isset($next_status) && $next_status->status_kurzbz == 'Unterbrecher'
|
||||
&& $curr_status_ausbildungssemester != $next_status->ausbildungssemester
|
||||
)
|
||||
{
|
||||
return array(
|
||||
'error' => true,
|
||||
'errormsg' => 'Aufeinanderfolgende Unterbrecher müssen gleiches Ausbildungssemester haben'
|
||||
);
|
||||
}
|
||||
|
||||
// wenn Abbrecher auf Unterbrecher folgt, muss Ausbildungssemester gleich sein
|
||||
if (
|
||||
isset($next_status) && $curr_status_kurzbz == 'Unterbrecher'
|
||||
&& $next_status->status_kurzbz == 'Abbrecher' && $curr_status_ausbildungssemester != $next_status->ausbildungssemester
|
||||
)
|
||||
{
|
||||
return array(
|
||||
'error' => true,
|
||||
'errormsg' => 'Unterbrecher und folgender Abbrecher müssen gleiches Ausbildungssemester haben'
|
||||
);
|
||||
}
|
||||
|
||||
// keine Studenten nach Diplomand Status
|
||||
if (
|
||||
isset($next_status) && $curr_status_kurzbz == 'Diplomand' && $next_status->status_kurzbz == 'Student'
|
||||
)
|
||||
{
|
||||
return array(
|
||||
'error' => true,
|
||||
'errormsg' => 'Nach Diplomantenstatus darf kein Studentenstatus mehr eingetragen werden'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return array('error' => true, 'errormsg' => 'Fehler bei Statusänderungcheck');
|
||||
|
||||
return array('error' => false, 'errormsg' => '');
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
|
||||
@@ -573,7 +403,7 @@ if(!$error)
|
||||
$return = false;
|
||||
$errormsg = 'Geburtsdatum ist nicht korrekt.';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
@@ -582,7 +412,6 @@ if(!$error)
|
||||
$student->titelpre = $_POST['titelpre'];
|
||||
$student->titelpost = $_POST['titelpost'];
|
||||
$student->vorname = $_POST['vorname'];
|
||||
$student->wahlname = $_POST['wahlname'];
|
||||
$student->vornamen = $_POST['vornamen'];
|
||||
$student->nachname = $_POST['nachname'];
|
||||
$student->gebdatum = $_POST['geburtsdatum'];
|
||||
@@ -736,7 +565,6 @@ if(!$error)
|
||||
$person->titelpost = $_POST['titelpost'];
|
||||
$person->vorname = $_POST['vorname'];
|
||||
$person->vornamen = $_POST['vornamen'];
|
||||
$person->wahlname = $_POST['wahlname'];
|
||||
$person->nachname = $_POST['nachname'];
|
||||
$person->gebdatum = $_POST['geburtsdatum'];
|
||||
$person->gebort = $_POST['geburtsort'];
|
||||
@@ -820,12 +648,12 @@ if(!$error)
|
||||
$prestudent->zgvort = $_POST['zgvort'];
|
||||
$prestudent->zgvdatum = $_POST['zgvdatum'];
|
||||
$prestudent->zgvnation = $_POST['zgvnation'];
|
||||
$prestudent->zgv_erfuellt = $_POST['zgv_erfuellt'];
|
||||
$prestudent->zgv_erfuellt = $_POST['zgv_erfuellt'];
|
||||
$prestudent->zgvmas_code = $_POST['zgvmas_code'];
|
||||
$prestudent->zgvmaort = $_POST['zgvmaort'];
|
||||
$prestudent->zgvmadatum = $_POST['zgvmadatum'];
|
||||
$prestudent->zgvmanation = $_POST['zgvmanation'];
|
||||
$prestudent->zgvmas_erfuellt = $_POST['zgvmas_erfuellt'];
|
||||
$prestudent->zgvmas_erfuellt = $_POST['zgvmas_erfuellt'];
|
||||
$prestudent->zgvdoktor_code = $_POST['zgvdoktor_code'];
|
||||
$prestudent->zgvdoktorort = $_POST['zgvdoktorort'];
|
||||
$prestudent->zgvdoktordatum = $_POST['zgvdoktordatum'];
|
||||
@@ -980,28 +808,6 @@ if(!$error)
|
||||
}
|
||||
}
|
||||
|
||||
// wenn keine spezielle Berechtiung zur Umgebung, Statusänderung Checks durchführen
|
||||
if (!$rechte->isBerechtigt($check_statusaenderung_berechtigung))
|
||||
{
|
||||
$new_status_datum = isset($_POST['datum']) ? $_POST['datum'] : date('Y-m-d');
|
||||
|
||||
$check_statusaenderung_result = checkStatusaenderung(
|
||||
$prestudent_id,
|
||||
$_POST['status_kurzbz'],
|
||||
$studiensemester,
|
||||
$new_status_datum,
|
||||
$sem
|
||||
);
|
||||
|
||||
if (isset($check_statusaenderung_result['error']) && $check_statusaenderung_result['error'] === true)
|
||||
{
|
||||
$return = false;
|
||||
$error = true;
|
||||
$errormsg .= isset($check_statusaenderung_result['errormsg']) ? $check_statusaenderung_result['errormsg'] : '';
|
||||
$anzahl_fehler++;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
$prestd_neu = new prestudent();
|
||||
@@ -1197,7 +1003,7 @@ if(!$error)
|
||||
isset($_POST['prestudent_id']) && is_numeric($_POST['prestudent_id']) &&
|
||||
isset($_POST['ausbildungssemester']) && is_numeric($_POST['ausbildungssemester']))
|
||||
{
|
||||
if($_POST['status_kurzbz']=='Student' && !$rechte->isBerechtigt('admin', null, 'suid') && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid'))
|
||||
if($_POST['status_kurzbz']=='Student' && !$rechte->isBerechtigt('admin', null, 'suid'))
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Studentenrolle kann nur durch den Administrator geloescht werden';
|
||||
@@ -1213,7 +1019,7 @@ if(!$error)
|
||||
if($row->anzahl<=1)
|
||||
{
|
||||
$deletePrestudent = true;
|
||||
if (!$rechte->isBerechtigt('admin', null, 'suid') && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid'))
|
||||
if (!$rechte->isBerechtigt('admin', null, 'suid'))
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Die letzte Rolle kann nur durch den Administrator geloescht werden';
|
||||
@@ -1501,28 +1307,6 @@ if(!$error)
|
||||
$rolle->new = false;
|
||||
}
|
||||
|
||||
// Statuschecks durchführen wenn keine spezielle Berechtigung zur Umgehung
|
||||
if (!$rechte->isBerechtigt($check_statusaenderung_berechtigung))
|
||||
{
|
||||
// allgemeine Prüfung bei Änderung oder Hinzufügen eines Status, inkludiert alle Status
|
||||
$check_statusaenderung_result = checkStatusaenderung(
|
||||
$_POST['prestudent_id'],
|
||||
$_POST['status_kurzbz'],
|
||||
$_POST['studiensemester_kurzbz'],
|
||||
$_POST['datum'],
|
||||
$_POST['ausbildungssemester'],
|
||||
$_POST['studiensemester_old'],
|
||||
$_POST['ausbildungssemester_old']
|
||||
);
|
||||
|
||||
if (isset($check_statusaenderung_result['error']) && $check_statusaenderung_result['error'] === true)
|
||||
{
|
||||
$return = false;
|
||||
$error = true;
|
||||
$errormsg = isset($check_statusaenderung_result['errormsg']) ? $check_statusaenderung_result['errormsg'] : '';
|
||||
}
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
// Bei Studenten wird der Studentlehrverband Eintrag angelegt/korrigiert
|
||||
@@ -2577,7 +2361,7 @@ if(!$error)
|
||||
{
|
||||
if ($dokument_kurzbz === 'Sonst' && $sonst !== 0)
|
||||
continue;
|
||||
|
||||
|
||||
if($dokument_kurzbz!='')
|
||||
{
|
||||
$dok = new dokument();
|
||||
@@ -2590,7 +2374,7 @@ if(!$error)
|
||||
$dok->new = true;
|
||||
if ($dokument_kurzbz === 'Sonst')
|
||||
$sonst++;
|
||||
|
||||
|
||||
|
||||
if(!$dok->save())
|
||||
{
|
||||
@@ -3128,7 +2912,6 @@ if(!$error)
|
||||
$bisio->bisio_id = (isset($_POST['bisio_id'])?$_POST['bisio_id']:'');
|
||||
$bisio->mobilitaetsprogramm_code = $_POST['mobilitaetsprogramm_code'];
|
||||
$bisio->nation_code = $_POST['nation_code'];
|
||||
$bisio->herkunftsland_code = $_POST['herkunftsland_code'];
|
||||
$bisio->von = $_POST['von'];
|
||||
$bisio->bis = $_POST['bis'];
|
||||
$bisio->student_uid = $_POST['student_uid'];
|
||||
|
||||
@@ -226,28 +226,17 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<row>
|
||||
<label value="Vorsitz" control="student-abschlusspruefung-menulist-vorsitz" />
|
||||
<menulist id="student-abschlusspruefung-menulist-vorsitz"
|
||||
xmlns:MITARBEITER_AKTIV="http://www.technikum-wien.at/mitarbeiter/rdf#"
|
||||
editable="true" disabled="true"
|
||||
datasources="rdf:null" flex="1"
|
||||
ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
oninput="StudentAbschlusspruefungMenulistMitarbeiterLoad(this)">
|
||||
<template>
|
||||
<rule MITARBEITER_AKTIV:aktiv='inaktiv'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
||||
label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpre rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpost ( rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid )"
|
||||
myvalue="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
||||
uri="rdf:*" style="color: grey;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
||||
label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpre rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpost ( rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid )"
|
||||
myvalue="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
||||
label="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#nachname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#vorname rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpre rdf:http://www.technikum-wien.at/mitarbeiter/rdf#titelpost"
|
||||
myvalue="rdf:http://www.technikum-wien.at/mitarbeiter/rdf#uid"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<label value="PrueferIn 1" id="student-abschlusspruefung-label-pruefer1" control="student-abschlusspruefung-menulist-pruefer1" />
|
||||
|
||||
@@ -71,10 +71,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<row>
|
||||
<label value="Person ID" control="student-detail-textbox-person_id"/>
|
||||
<hbox><textbox id="student-detail-textbox-person_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||
<?php $hideZugangscode = (defined('ACTIVE_ADDONS') && strpos(ACTIVE_ADDONS, 'bewerbung') !== false) ? '':' hidden="true"'; ?>
|
||||
<label value="Zugangscode" control="student-detail-zugangscode" <?php echo $hideZugangscode; ?>/>
|
||||
<label value="Zugangscode" control="student-detail-zugangscode"/>
|
||||
<label id="label-student-detail-link_bewerbungstool" hidden="true" value=""></label>
|
||||
<label class="text-link" href="#" id="label-student-detail-zugangscode" value="" <?php echo $hideZugangscode; ?> onclick="window.open(document.getElementById('label-student-detail-link_bewerbungstool').value)"/>
|
||||
<label class="text-link" href="#" id="label-student-detail-zugangscode" value="" onclick="window.open(document.getElementById('label-student-detail-link_bewerbungstool').value)"/>
|
||||
<?php $hideBpk = $rechte->isBerechtigt('student/bpk') ? '':' hidden="true"'; ?>
|
||||
<label value="BPK" control="student-detail-textbox-bpk"<?php echo $hideBpk; ?>/>
|
||||
<hbox><textbox id="student-detail-textbox-bpk" disabled="true" maxlength="28" size="50"<?php echo $hideBpk; ?>/></hbox>
|
||||
@@ -95,10 +94,6 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<label value="Vornamen" control="student-detail-textbox-vornamen"/>
|
||||
<textbox id="student-detail-textbox-vornamen" disabled="true" maxlength="128"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Wahlname" control="student-detail-textbox-wahlname"/>
|
||||
<textbox id="student-detail-textbox-wahlname" disabled="true" maxlength="128"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Geburtsdatum" control="student-detail-textbox-geburtsdatum"/>
|
||||
<hbox>
|
||||
@@ -307,14 +302,17 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<menuitem label="Status vorrücken" oncommand="StudentPrestudentRolleVorruecken();" id="student-prestudent-rolle-tree-popup-move_forward" hidden="false"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
<hbox hidden="true">
|
||||
<toolbox flex="1">
|
||||
<label value="Neu"/>
|
||||
<checkbox id="student-prestudent-checkbox-new" checked="false" />
|
||||
<label value="studiengang_kz"/>
|
||||
<textbox id="student-prestudent-textbox-studiengang_kz"/>
|
||||
</toolbox>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="Neu"/>
|
||||
<checkbox id="student-prestudent-checkbox-new" checked="false" />
|
||||
<label value="Person_id"/>
|
||||
<textbox id="student-prestudent-textbox-person_id" disabled="true"/>
|
||||
<label value="Prestudent_id"/>
|
||||
<textbox id="student-prestudent-textbox-prestudent_id" disabled="true"/>
|
||||
<label value="studiengang_kz"/>
|
||||
<textbox id="student-prestudent-textbox-studiengang_kz" disabled="true"/>
|
||||
</vbox>
|
||||
|
||||
<groupbox id="student-detail-groupbox-zgv">
|
||||
<caption id="student-detail-groupbox-caption" label="Zugangsvoraussetzung" />
|
||||
<grid id="student-prestudent-grid-zgv" style="margin:4px;" flex="1">
|
||||
@@ -331,44 +329,18 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<?php
|
||||
$hidden = 'hidden="true"';
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
if($rechte->isBerechtigt('admin'))
|
||||
$hidden = '';
|
||||
?>
|
||||
<row <?php echo $hidden ?>>
|
||||
<label value="Prestudent_id"/>
|
||||
<hbox><textbox id="student-prestudent-textbox-prestudent_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||
<label value="Person_id"/>
|
||||
<hbox><textbox id="student-prestudent-textbox-person_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="ZGV" control="student-prestudent-menulist-zgvcode"/>
|
||||
<menulist id="student-prestudent-menulist-zgvcode" disabled="true"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/zgv.rdf.php?optional=true" flex="1"
|
||||
ref="http://www.technikum-wien.at/zgv/alle"
|
||||
xmlns:ZGV="http://www.technikum-wien.at/zgv/rdf#"
|
||||
style="min-width: 130px">
|
||||
<template>
|
||||
<rule ZGV:aktiv='f'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgv/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgv/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
style="text-decoration:line-through;"
|
||||
/>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgv/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgv/rdf#kurzbz"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgv/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgv/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
<label value="ZGV Ort" control="student-prestudent-textbox-zgvort"/>
|
||||
@@ -419,26 +391,14 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<menulist id="student-prestudent-menulist-zgvmastercode" disabled="true"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/zgvmaster.rdf.php?optional=true" flex="1"
|
||||
ref="http://www.technikum-wien.at/zgvmaster/alle"
|
||||
xmlns:ZGVMASTER="http://www.technikum-wien.at/zgvmaster/rdf#"
|
||||
style="min-width: 130px" >
|
||||
<template>
|
||||
<rule ZGVMASTER:aktiv='f'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgvmaster/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgvmaster/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
style="text-decoration:line-through;"
|
||||
/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgvmaster/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgvmaster/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgvmaster/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgvmaster/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<label value="ZGV Master Ort" control="student-prestudent-textbox-zgvmasterort"/>
|
||||
@@ -491,26 +451,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<label value="ZGV Doktor" control="student-prestudent-menulist-zgvdoktorcode"/>
|
||||
<menulist id="student-prestudent-menulist-zgvdoktorcode" disabled="true"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/zgvdoktor.rdf.php?optional=true" flex="1"
|
||||
ref="http://www.technikum-wien.at/zgvdoktor/alle"
|
||||
xmlns:ZGVDOKTOR="http://www.technikum-wien.at/zgvdoktor/rdf#">
|
||||
ref="http://www.technikum-wien.at/zgvdoktor/alle" >
|
||||
<template>
|
||||
<rule ZGVDOKTOR:aktiv='f'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgvdoktor/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgvdoktor/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
style="text-decoration:line-through;"
|
||||
/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgvdoktor/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgvdoktor/rdf#kurzbz"
|
||||
uri="rdf:*"
|
||||
/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zgvdoktor/rdf#code"
|
||||
label="rdf:http://www.technikum-wien.at/zgvdoktor/rdf#kurzbz"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
<label value="ZGV Doktor Ort" control="student-prestudent-textbox-zgvdoktorort"/>
|
||||
@@ -679,7 +626,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<checkbox id="student-prestudent-checkbox-bismelden" checked="true" disabled="true"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<label value="Duales Studium" control="student-prestudent-checkbox-dual"/>
|
||||
<label value="Dual" control="student-prestudent-checkbox-dual"/>
|
||||
<checkbox id="student-prestudent-checkbox-dual" checked="false" disabled="true"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
|
||||
@@ -131,7 +131,7 @@ else
|
||||
echo '<menuitem label="Student" oncommand="StudentUnterbrecherZuStudent()" disabled="false" tooltiptext="Status ändern auf Student"/>';
|
||||
if ($id == 'interessent-toolbar-zustudent')
|
||||
echo '<menuitem label="Student" oncommand="InteressentzuStudent()" disabled="false" tooltiptext="Status ändern auf Student"/>';
|
||||
|
||||
|
||||
foreach($gruende[$status_kurzbz] as $row)
|
||||
{
|
||||
$commandWithID = str_replace('STATUSGRUNDID',$row['statusgrund_id'],$command);
|
||||
@@ -270,10 +270,6 @@ else
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#vorname" onclick="StudentTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-treecol-wahlname" label="Wahlname" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#wahlname" onclick="StudentTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-treecol-vornamen" label="Vornamen" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#vornamen" onclick="StudentTreeSort()"/>
|
||||
@@ -440,7 +436,6 @@ else
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#titelpre" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#nachname" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#vorname" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#wahlname" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#vornamen" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#titelpost" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#svnr" />
|
||||
|
||||
@@ -171,20 +171,6 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Herkunftsland" control="student-io-menulist-herkunftsland"/>
|
||||
<menulist id="student-io-menulist-herkunftsland" disabled="true"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/nation.rdf.php" flex="1"
|
||||
ref="http://www.technikum-wien.at/nation/liste" >
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/nation/rdf#nation_code"
|
||||
label="rdf:http://www.technikum-wien.at/nation/rdf#kurztext"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Zweck" control="student-io-menulist-zweck"/>
|
||||
<vbox>
|
||||
|
||||
@@ -727,7 +727,6 @@ function StudentDetailReset()
|
||||
document.getElementById('student-detail-textbox-titelpre').value='';
|
||||
document.getElementById('student-detail-textbox-titelpost').value='';
|
||||
document.getElementById('student-detail-textbox-vorname').value='';
|
||||
document.getElementById('student-detail-textbox-wahlname').value='';
|
||||
document.getElementById('student-detail-textbox-vornamen').value='';
|
||||
document.getElementById('student-detail-textbox-nachname').value='';
|
||||
document.getElementById('student-detail-textbox-geburtsdatum').value='';
|
||||
@@ -760,7 +759,6 @@ function StudentDetailDisableFields(val)
|
||||
document.getElementById('student-detail-textbox-titelpre').disabled=val;
|
||||
document.getElementById('student-detail-textbox-titelpost').disabled=val;
|
||||
document.getElementById('student-detail-textbox-vorname').disabled=val;
|
||||
document.getElementById('student-detail-textbox-wahlname').disabled=val;
|
||||
document.getElementById('student-detail-textbox-vornamen').disabled=val;
|
||||
document.getElementById('student-detail-textbox-nachname').disabled=val;
|
||||
document.getElementById('student-detail-textbox-geburtsdatum').disabled=val;
|
||||
@@ -801,7 +799,6 @@ function StudentDetailSave()
|
||||
titelpre = document.getElementById('student-detail-textbox-titelpre').value;
|
||||
titelpost = document.getElementById('student-detail-textbox-titelpost').value;
|
||||
vorname = document.getElementById('student-detail-textbox-vorname').value;
|
||||
wahlname = document.getElementById('student-detail-textbox-wahlname').value;
|
||||
vornamen = document.getElementById('student-detail-textbox-vornamen').value;
|
||||
nachname = document.getElementById('student-detail-textbox-nachname').value;
|
||||
geburtsdatum = document.getElementById('student-detail-textbox-geburtsdatum').value;
|
||||
@@ -860,7 +857,6 @@ function StudentDetailSave()
|
||||
req.add('titelpre', titelpre);
|
||||
req.add('titelpost', titelpost);
|
||||
req.add('vorname', vorname);
|
||||
req.add('wahlname', wahlname);
|
||||
req.add('vornamen', vornamen);
|
||||
req.add('nachname', nachname);
|
||||
req.add('geburtsdatum', ConvertDateToISO(geburtsdatum));
|
||||
@@ -1029,10 +1025,7 @@ function StudentCount()
|
||||
// ****
|
||||
function StudentAuswahl()
|
||||
{
|
||||
var tree=document.getElementById('student-tree');
|
||||
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||
|
||||
document.getElementById('student-toolbar-label-anzahl').value = 'Anzahl: ' + StudentCount() + '/' + items;
|
||||
document.getElementById('student-toolbar-label-anzahl').value = 'Anzahl: ' + StudentCount();
|
||||
|
||||
if(!StudentTreeLoadDataOnSelect)
|
||||
{
|
||||
@@ -1108,7 +1101,6 @@ function StudentAuswahl()
|
||||
titelpre=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titelpre" ));
|
||||
titelpost=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titelpost" ));
|
||||
vorname=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#vorname" ));
|
||||
wahlname=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#wahlname" ));
|
||||
vornamen=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#vornamen" ));
|
||||
nachname=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#nachname" ));
|
||||
geburtsdatum=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#geburtsdatum" ));
|
||||
@@ -1152,7 +1144,6 @@ function StudentAuswahl()
|
||||
document.getElementById('student-detail-textbox-titelpre').value=titelpre;
|
||||
document.getElementById('student-detail-textbox-titelpost').value=titelpost;
|
||||
document.getElementById('student-detail-textbox-vorname').value=vorname;
|
||||
document.getElementById('student-detail-textbox-wahlname').value=wahlname;
|
||||
document.getElementById('student-detail-textbox-vornamen').value=vornamen;
|
||||
document.getElementById('student-detail-textbox-nachname').value=nachname;
|
||||
document.getElementById('student-detail-textbox-geburtsdatum').value=geburtsdatum;
|
||||
@@ -3511,7 +3502,6 @@ function StudentIOAuswahl()
|
||||
|
||||
mobilitaetsprogramm_code = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#mobilitaetsprogramm_code" ));
|
||||
nation_code = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#nation_code" ));
|
||||
herkunftsland_code = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#herkunftsland_code" ));
|
||||
von = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#von" ));
|
||||
bis = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bis" ));
|
||||
zweck_code = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zweck_code" ));
|
||||
@@ -3586,7 +3576,6 @@ function StudentIOAuswahl()
|
||||
|
||||
document.getElementById('student-io-menulist-mobilitaetsprogramm').value=mobilitaetsprogramm_code;
|
||||
document.getElementById('student-io-menulist-nation').value=nation_code;
|
||||
document.getElementById('student-io-menulist-herkunftsland').value=herkunftsland_code;
|
||||
document.getElementById('student-io-textbox-von').value=von;
|
||||
document.getElementById('student-io-textbox-bis').value=bis;
|
||||
document.getElementById('student-io-detail-textbox-uid').value=student_uid;
|
||||
@@ -3821,7 +3810,6 @@ function StudentIODetailDisableFields(val)
|
||||
document.getElementById('student-io-textbox-bis').disabled=val;
|
||||
document.getElementById('student-io-menulist-mobilitaetsprogramm').disabled=val;
|
||||
document.getElementById('student-io-menulist-nation').disabled=val;
|
||||
document.getElementById('student-io-menulist-herkunftsland').disabled=val;
|
||||
document.getElementById('student-io-menulist-zweck').disabled=val;
|
||||
document.getElementById('student-io-button-speichern').disabled=val;
|
||||
document.getElementById('student-io-menulist-lehrveranstaltung').disabled=val;
|
||||
@@ -3847,7 +3835,6 @@ function StudentIOResetFileds()
|
||||
document.getElementById('student-io-menulist-mobilitaetsprogramm').value='7';
|
||||
document.getElementById('student-io-menulist-zweck').value='2';
|
||||
document.getElementById('student-io-menulist-nation').value='A';
|
||||
document.getElementById('student-io-menulist-herkunftsland').value='A';
|
||||
document.getElementById('student-io-textbox-ort').value='';
|
||||
document.getElementById('student-io-textbox-universitaet').value='';
|
||||
document.getElementById('student-io-textbox-ects_angerechnet').value='';
|
||||
@@ -3865,7 +3852,6 @@ function StudentIODetailSpeichern()
|
||||
bis = document.getElementById('student-io-textbox-bis').value;
|
||||
mobilitaetsprogramm = document.getElementById('student-io-menulist-mobilitaetsprogramm').value;
|
||||
nation_code = document.getElementById('student-io-menulist-nation').value;
|
||||
herkunftsland_code = document.getElementById('student-io-menulist-herkunftsland').value;
|
||||
zweck_code = document.getElementById('student-io-menulist-zweck').value;
|
||||
uid = document.getElementById('student-io-detail-textbox-uid').value;
|
||||
neu = document.getElementById('student-io-detail-checkbox-neu').checked;
|
||||
@@ -3903,7 +3889,6 @@ function StudentIODetailSpeichern()
|
||||
req.add('bis', ConvertDateToISO(bis));
|
||||
req.add('mobilitaetsprogramm_code', mobilitaetsprogramm);
|
||||
req.add('nation_code', nation_code);
|
||||
req.add('herkunftsland_code', herkunftsland_code);
|
||||
req.add('zweck_code', zweck_code);
|
||||
req.add('student_uid', uid);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
@@ -4041,7 +4026,6 @@ function StudentIONeu()
|
||||
req.add('bis', ConvertDateToISO(defaultdatum));
|
||||
req.add('mobilitaetsprogramm_code', mobilitaetsprogramm);
|
||||
req.add('nation_code', 'A');
|
||||
req.add('herkunftsland_code', 'A');
|
||||
req.add('student_uid', uid);
|
||||
req.add('studiengang_kz', stg_kz);
|
||||
req.add('lehreinheit_id', '');
|
||||
|
||||
@@ -160,6 +160,8 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<vbox hidden="true">
|
||||
<label value="Neu"/>
|
||||
<checkbox id="student-projektarbeit-checkbox-neu" checked="true" />
|
||||
<label value="Projektarbeit ID"/>
|
||||
<textbox id="student-projektarbeit-textbox-projektarbeit_id" disabled="true"/>
|
||||
</vbox>
|
||||
<groupbox flex="1">
|
||||
<caption label="Details"/>
|
||||
@@ -169,10 +171,6 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Projektarbeit ID" control="student-projektarbeit-textbox-projektarbeit_id"/>
|
||||
<hbox><textbox id="student-projektarbeit-textbox-projektarbeit_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Titel" control="student-projektarbeit-textbox-titel"/>
|
||||
<textbox id="student-projektarbeit-textbox-titel" disabled="true" maxlength="1024" />
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user