mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Merge branch 'master' into feature-16190/Issues_automatisches_Beheben
This commit is contained in:
@@ -22,8 +22,8 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
// Set required permissions
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'download' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'index' => 'lehre/anrechnung_genehmigen:r',
|
||||
'download' => 'lehre/anrechnung_genehmigen:r',
|
||||
'approve' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'reject' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw',
|
||||
@@ -81,7 +81,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read the Anrechnung
|
||||
self::_checkIfEntitledToReadAnrechnung($anrechnung_id);
|
||||
$this->_checkIfEntitledToReadAnrechnung($anrechnung_id);
|
||||
|
||||
// Get Anrechung data
|
||||
$anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
|
||||
@@ -99,11 +99,16 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
// Get Genehmigung data
|
||||
$genehmigungData = $this->anrechnunglib->getGenehmigungData($anrechnung_id);
|
||||
|
||||
$hasReadOnlyAccess =
|
||||
$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $antragData->studiengang_kz)
|
||||
&& !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid', $antragData->studiengang_kz);
|
||||
|
||||
$viewData = array(
|
||||
'antragData' => $antragData,
|
||||
'anrechnungData' => $anrechnungData,
|
||||
'empfehlungData' => $empfehlungData,
|
||||
'genehmigungData' => $genehmigungData
|
||||
'genehmigungData' => $genehmigungData,
|
||||
'hasReadOnlyAccess' => $hasReadOnlyAccess
|
||||
);
|
||||
|
||||
$this->load->view('lehre/anrechnung/approveAnrechnungDetail.php', $viewData);
|
||||
@@ -385,7 +390,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
@@ -421,26 +426,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
'lehrveranstaltung_id' => getData($result)[0]->lehrveranstaltung_id
|
||||
));
|
||||
|
||||
if(!hasData($result))
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
$studiengang_kz = getData($result)[0]->studiengang_kz;
|
||||
|
||||
// Get STGL
|
||||
$result = $this->StudiengangModel->getLeitung(getData($result)[0]->studiengang_kz);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $stgl)
|
||||
{
|
||||
if ($stgl->uid == $this->_uid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
show_error('You are not entitled to read this Anrechnung');
|
||||
// Check if user is entitled
|
||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||
{
|
||||
show_error('You are not entitled to read this page');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -460,23 +452,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
'lehrveranstaltung_id' => $result->lehrveranstaltung_id
|
||||
));
|
||||
|
||||
if(!$result = getData($result)[0])
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
$studiengang_kz = getData($result)[0]->studiengang_kz;
|
||||
|
||||
// Get STGL
|
||||
$result = $this->StudiengangModel->getLeitung($result->studiengang_kz);
|
||||
|
||||
if($result = getData($result)[0])
|
||||
{
|
||||
if ($result->uid == $this->_uid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
// Check if user is entitled
|
||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||
{
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
const BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN = 'lehre/anrechnung_genehmigen';
|
||||
|
||||
const BERECHTIGUNG_ANRECHNUNG_ANLEGEN = 'lehre/anrechnung_anlegen';
|
||||
|
||||
const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht';
|
||||
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
|
||||
@@ -19,8 +20,8 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
// Set required permissions
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'download' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'index' => 'lehre/anrechnung_genehmigen:r',
|
||||
'download' => 'lehre/anrechnung_genehmigen:r',
|
||||
'approve' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'reject' => 'lehre/anrechnung_genehmigen:rw',
|
||||
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw'
|
||||
@@ -76,10 +77,19 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error(getError($studiengang_kz_arr));
|
||||
}
|
||||
|
||||
|
||||
$hasReadOnlyAccess =
|
||||
$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's')
|
||||
&& !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid');
|
||||
|
||||
// This permission is checked here to disable create Anrechnung button, if permission is not given
|
||||
$hasCreateAnrechnungAccess = $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_ANLEGEN, 's');
|
||||
|
||||
$viewData = array(
|
||||
'studiensemester_selected' => $studiensemester_kurzbz,
|
||||
'studiengaenge_entitled' => $studiengang_kz_arr
|
||||
'studiengaenge_entitled' => $studiengang_kz_arr,
|
||||
'hasReadOnlyAccess' => $hasReadOnlyAccess,
|
||||
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess
|
||||
);
|
||||
|
||||
$this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
|
||||
@@ -239,7 +249,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
}
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
@@ -281,22 +291,14 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error('Failed loading Lehrveranstaltung');
|
||||
}
|
||||
|
||||
$studiengang_kz = $result->studiengang_kz;
|
||||
|
||||
// Get STGL
|
||||
$result = $this->StudiengangModel->getLeitung($result->studiengang_kz);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
foreach (getData($result) as $stgl)
|
||||
{
|
||||
if ($stgl->uid == $this->_uid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
// Check if user is entitled
|
||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||
{
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Get Anrechung data
|
||||
$anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
|
||||
|
||||
|
||||
// Get Antrag data
|
||||
$antragData = $this->anrechnunglib->getAntragData(
|
||||
$anrechnungData->prestudent_id,
|
||||
@@ -110,7 +110,7 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
// Get lectors person data
|
||||
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
|
||||
{
|
||||
@@ -218,10 +218,10 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
|
||||
// Download file
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
@@ -320,7 +320,12 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
foreach ($studiengang_kz_arr as $studiengang_kz)
|
||||
{
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
$stgmail = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
if(isSuccess($stgmail) && hasData($stgmail))
|
||||
list ($to, $vorname) = getData($stgmail)[0];
|
||||
else
|
||||
show_error ('Failed retrieving DegreeProgram Mail');
|
||||
|
||||
// Get full name of lector
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
@@ -361,24 +366,28 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
$result = $this->StudiengangModel->getLeitung($stg_kz);
|
||||
|
||||
// Get STGL mail address, if available
|
||||
if (hasData($result))
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->uid. '@'. DOMAIN,
|
||||
$result->retval[0]->vorname
|
||||
);
|
||||
));
|
||||
}
|
||||
// ...otherwise get assistance mail address
|
||||
else
|
||||
{
|
||||
$result = $this->StudiengangModel->load($stg_kz);
|
||||
|
||||
if (hasData($result))
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->email,
|
||||
''
|
||||
);
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('Keine E-Mail für diesen Stg gefunden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
const BERECHTIGUNG_ANRECHNUNG_EMPFEHLEN = 'lehre/anrechnung_empfehlen';
|
||||
|
||||
|
||||
const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht';
|
||||
|
||||
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF';
|
||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor';
|
||||
const ANRECHNUNGSTATUS_APPROVED = 'approved';
|
||||
const ANRECHNUNGSTATUS_REJECTED = 'rejected';
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// Set required permissions
|
||||
@@ -25,24 +25,24 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'dontRecommend' => 'lehre/anrechnung_empfehlen:rw'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Load models
|
||||
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
|
||||
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
|
||||
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
|
||||
// Load libraries
|
||||
$this->load->library('WidgetLib');
|
||||
$this->load->library('PermissionLib');
|
||||
$this->load->library('AnrechnungLib');
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
|
||||
// Load helpers
|
||||
$this->load->helper('form');
|
||||
$this->load->helper('url');
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
@@ -54,12 +54,12 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'table'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->_setAuthUID();
|
||||
|
||||
|
||||
$this->setControllerId();
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Get study semester
|
||||
@@ -70,14 +70,14 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
$studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
|
||||
$viewData = array(
|
||||
'studiensemester_selected' => $studiensemester_kurzbz
|
||||
);
|
||||
|
||||
|
||||
$this->load->view('lehre/anrechnung/reviewAnrechnungUebersicht.php', $viewData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recommend Anrechnungen.
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isset($json) && !isEmptyArray($json))
|
||||
{
|
||||
@@ -123,19 +123,19 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Dont recommend Anrechnungen.
|
||||
*/
|
||||
public function dontRecommend()
|
||||
{
|
||||
$data = $this->input->post('data');
|
||||
|
||||
|
||||
if(isEmptyArray($data))
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
foreach ($data as $item)
|
||||
{
|
||||
// Approve Anrechnung
|
||||
@@ -149,7 +149,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isset($json) && !isEmptyArray($json))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error('Failed sending emails');
|
||||
}
|
||||
|
||||
|
||||
return $this->outputJsonSuccess($json);
|
||||
}
|
||||
else
|
||||
@@ -166,7 +166,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Download and open uploaded document (Nachweisdokument).
|
||||
*/
|
||||
@@ -178,28 +178,28 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
show_error('Wrong parameter');
|
||||
}
|
||||
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
|
||||
// Download file
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the UID of the logged user and checks if it is valid
|
||||
*/
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
|
||||
if (!$this->_uid) show_error('User authentification failed');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if user is entitled to read dms doc
|
||||
* @param $dms_id
|
||||
@@ -207,15 +207,15 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
private function _checkIfEntitledToReadDMSDoc($dms_id)
|
||||
{
|
||||
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
||||
|
||||
|
||||
if(!$result = getData($result)[0])
|
||||
{
|
||||
show_error('Failed retrieving Anrechnung');
|
||||
}
|
||||
|
||||
|
||||
$result = $this->LehrveranstaltungModel
|
||||
->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
|
||||
|
||||
|
||||
if($result = getData($result))
|
||||
{
|
||||
$entitled_lector_arr = array_column($result, 'uid');
|
||||
@@ -225,10 +225,10 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send mails to STGL (if not present then to STGL assistance)
|
||||
* @param $mail_params
|
||||
@@ -239,36 +239,41 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
{
|
||||
// Get studiengaenge
|
||||
$studiengang_kz_arr = array();
|
||||
|
||||
|
||||
foreach ($mail_params as $item)
|
||||
{
|
||||
$this->AnrechnungModel->addSelect('studiengang_kz');
|
||||
$this->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id');
|
||||
|
||||
|
||||
$studiengang_kz_arr[]= $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiengang_kz;
|
||||
}
|
||||
|
||||
|
||||
$studiengang_kz_arr = array_unique($studiengang_kz_arr);
|
||||
|
||||
|
||||
// Send mail to STGL of each studiengang
|
||||
foreach ($studiengang_kz_arr as $studiengang_kz)
|
||||
{
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
$stgmail = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
if(isSuccess($stgmail) && hasData($stgmail))
|
||||
list ($to, $vorname) = getData($stgmail)[0];
|
||||
else
|
||||
show_error ('Failed retrieving DegreeProgram Mail');
|
||||
|
||||
// Get full name of lector
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid)))
|
||||
{
|
||||
show_error ('Failed retrieving person');
|
||||
}
|
||||
|
||||
|
||||
// Link to Antrag genehmigen
|
||||
$url =
|
||||
CIS_ROOT. 'cis/index.php?menu='.
|
||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||
CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
|
||||
|
||||
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'vorname' => $vorname,
|
||||
@@ -276,7 +281,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'empfehlung' => $empfehlung ? 'positive' : 'negative',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAbgeben',
|
||||
$body_fields,
|
||||
@@ -284,37 +289,41 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
||||
'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Get STGL mail address, if available, otherwise get assistance mail address
|
||||
private function _getSTGLMailAddress($stg_kz)
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$result = $this->StudiengangModel->getLeitung($stg_kz);
|
||||
|
||||
|
||||
// Get STGL mail address, if available
|
||||
if (hasData($result))
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->uid. '@'. DOMAIN,
|
||||
$result->retval[0]->vorname
|
||||
);
|
||||
));
|
||||
}
|
||||
// ...otherwise get assistance mail address
|
||||
else
|
||||
{
|
||||
$result = $this->StudiengangModel->load($stg_kz);
|
||||
|
||||
if (hasData($result))
|
||||
|
||||
if (isSuccess($result) && hasData($result))
|
||||
{
|
||||
return array(
|
||||
return success(array(
|
||||
$result->retval[0]->email,
|
||||
''
|
||||
);
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('Keine E-Mail für diesen Stg gefunden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -560,8 +560,10 @@ class InfoCenter extends Auth_Controller
|
||||
/**
|
||||
* Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang
|
||||
*/
|
||||
private function sendZgvMail($mail, $typ){
|
||||
private function sendZgvMail($mail, $typ, $person){
|
||||
$data = array(
|
||||
'vorname' => $person->vorname,
|
||||
'nachname' => $person->nachname,
|
||||
'link' => site_url('system/infocenter/ZGVUeberpruefung')
|
||||
);
|
||||
|
||||
@@ -657,6 +659,16 @@ class InfoCenter extends Auth_Controller
|
||||
if (isEmptyString($prestudent_id) || isEmptyString($person_id))
|
||||
$this->terminateWithJsonError('Prestudentid OR/AND Personid missing');
|
||||
|
||||
$person = $this->PersonModel->load($person_id);
|
||||
|
||||
if (isError($person))
|
||||
$this->terminateWithJsonError(getError($person));
|
||||
|
||||
if (!hasData($person))
|
||||
$this->terminateWithJsonError('Person existiert nicht.');
|
||||
|
||||
$person = getData($person)[0];
|
||||
|
||||
$zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id);
|
||||
|
||||
$data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
|
||||
@@ -688,7 +700,7 @@ class InfoCenter extends Auth_Controller
|
||||
$this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg'));
|
||||
|
||||
if (isSuccess($insert))
|
||||
$this->sendZgvMail($mail, $typ);
|
||||
$this->sendZgvMail($mail, $typ, $person);
|
||||
elseif (isError($insert))
|
||||
$this->terminateWithJsonError('Fehler beim Speichern');
|
||||
}else
|
||||
@@ -714,7 +726,7 @@ class InfoCenter extends Auth_Controller
|
||||
$this->_log($person_id, 'newzgv', array($zgvpruefung_id));
|
||||
|
||||
if (isSuccess($result))
|
||||
$this->sendZgvMail($mail, $typ);
|
||||
$this->sendZgvMail($mail, $typ, $person);
|
||||
elseif (isError($result))
|
||||
$this->terminateWithJsonError('Fehler beim Speichern');
|
||||
}
|
||||
@@ -1708,9 +1720,15 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
if (isset($locked->retval[0]->uid))
|
||||
{
|
||||
$lockedby = $locked->retval[0]->uid;
|
||||
if ($lockedby !== $this->_uid)
|
||||
if (!$lockedby = getData($this->PersonModel->getFullName($locked->retval[0]->uid)))
|
||||
{
|
||||
show_error('Failed retrieving person');
|
||||
}
|
||||
|
||||
if ($locked->retval[0]->uid !== $this->_uid)
|
||||
{
|
||||
$lockedbyother = true;
|
||||
}
|
||||
}
|
||||
|
||||
$stammdaten = $this->PersonModel->getPersonStammdaten($person_id, true);
|
||||
|
||||
@@ -89,6 +89,7 @@ class AnrechnungLib
|
||||
$antrag_data->vorname = $person->vorname;
|
||||
$antrag_data->nachname = $person->nachname;
|
||||
$antrag_data->matrikelnr = $student->matrikelnr;
|
||||
$antrag_data->studiengang_kz = $studiengang->studiengang_kz;
|
||||
$antrag_data->stg_bezeichnung = $studiengang->bezeichnung;
|
||||
$antrag_data->lektoren = $lv_lektoren_arr;
|
||||
$antrag_data->zgv = $latest_zgv_bezeichnung;
|
||||
|
||||
@@ -448,10 +448,11 @@ class Studiengang_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($typ));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Studiengangsleitung
|
||||
* @param null $studiengang_kz
|
||||
* Get Studiengangsleitung/en of Studiengang/Studiengaenge.
|
||||
*
|
||||
* @param null $studiengang_kz Numeric or Array
|
||||
* @return array
|
||||
*/
|
||||
public function getLeitung($studiengang_kz = null)
|
||||
@@ -460,7 +461,12 @@ class Studiengang_model extends DB_Model
|
||||
$this->addJoin('public.tbl_benutzerfunktion', 'oe_kurzbz');
|
||||
$this->addJoin('public.tbl_benutzer', 'uid');
|
||||
$this->addJoin('public.tbl_person', 'person_id');
|
||||
|
||||
|
||||
if (!is_numeric($studiengang_kz) && !is_array($studiengang_kz))
|
||||
{
|
||||
return error('Studiengangskennzahl ungültig');
|
||||
}
|
||||
|
||||
if (is_null($studiengang_kz))
|
||||
{
|
||||
$condition = '
|
||||
@@ -469,16 +475,21 @@ class Studiengang_model extends DB_Model
|
||||
AND ( datum_bis >= NOW() OR datum_bis IS NULL )
|
||||
';
|
||||
}
|
||||
elseif (is_numeric($studiengang_kz))
|
||||
elseif (is_numeric($studiengang_kz) || is_array($studiengang_kz))
|
||||
{
|
||||
if (is_array($studiengang_kz))
|
||||
{
|
||||
$studiengang_kz = array_map(array($this,'escape'), $studiengang_kz);
|
||||
$studiengang_kz = implode(', ', $studiengang_kz);
|
||||
}
|
||||
$condition = '
|
||||
funktion_kurzbz = \'Leitung\'
|
||||
AND ( datum_von <= NOW() OR datum_von IS NULL )
|
||||
AND ( datum_bis >= NOW() OR datum_bis IS NULL )
|
||||
AND studiengang_kz = ' . $this->db->escape($studiengang_kz)
|
||||
AND studiengang_kz IN (' . $studiengang_kz. ')';
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
return $this->loadWhere($condition);
|
||||
}
|
||||
|
||||
|
||||
@@ -268,16 +268,61 @@ class Person_model extends DB_Model
|
||||
|
||||
public function checkDuplicate($person_id)
|
||||
{
|
||||
$qry = "SELECT sp.person_id
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN public.tbl_person sp ON p.vorname = sp.vorname
|
||||
AND p.nachname = sp.nachname
|
||||
AND p.gebdatum = sp.gebdatum
|
||||
JOIN public.tbl_prestudent ps ON sp.person_id = ps.person_id
|
||||
JOIN public.tbl_prestudentstatus pss ON ps.prestudent_id = pss.prestudent_id
|
||||
WHERE p.person_id = ? AND sp.person_id != ? AND pss.status_kurzbz = ?";
|
||||
$qry = "SELECT person_id
|
||||
FROM public.tbl_prestudent p
|
||||
JOIN
|
||||
(
|
||||
SELECT DISTINCT ON(prestudent_id) *
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id IN
|
||||
(
|
||||
SELECT prestudent_id
|
||||
FROM public.tbl_prestudent
|
||||
WHERE person_id IN
|
||||
(
|
||||
SELECT p2.person_id
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_person p2
|
||||
ON p.vorname = p2.vorname
|
||||
AND p.nachname = p2.nachname
|
||||
AND p.gebdatum = p2.gebdatum
|
||||
AND p.person_id = ?
|
||||
)
|
||||
)
|
||||
ORDER BY prestudent_id, datum DESC, insertamum DESC
|
||||
) ps USING(prestudent_id)
|
||||
JOIN public.tbl_status USING(status_kurzbz)
|
||||
WHERE status_kurzbz = 'Interessent'
|
||||
AND studiengang_kz IN
|
||||
(
|
||||
SELECT studiengang_kz
|
||||
FROM public.tbl_prestudent p
|
||||
JOIN
|
||||
(
|
||||
SELECT DISTINCT ON(prestudent_id) *
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id IN
|
||||
(
|
||||
SELECT prestudent_id
|
||||
FROM public.tbl_prestudent
|
||||
WHERE person_id IN
|
||||
(
|
||||
SELECT p2.person_id
|
||||
FROM public.tbl_person p
|
||||
JOIN public.tbl_person p2
|
||||
ON p.vorname = p2.vorname
|
||||
AND p.nachname = p2.nachname
|
||||
AND p.gebdatum = p2.gebdatum
|
||||
AND p.person_id = ?
|
||||
)
|
||||
)
|
||||
ORDER BY prestudent_id, datum DESC, insertamum DESC
|
||||
) ps USING(prestudent_id)
|
||||
JOIN public.tbl_status USING(status_kurzbz)
|
||||
WHERE status_kurzbz = 'Abbrecher'
|
||||
)
|
||||
";
|
||||
|
||||
|
||||
return $this->execQuery($qry, array($person_id, $person_id, 'Abbrecher'));
|
||||
return $this->execQuery($qry, array($person_id, $person_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ $this->load->view(
|
||||
'bitteBegruendungAngeben',
|
||||
'empfehlungWurdeAngefordert',
|
||||
'anrechnungenWurdenGenehmigt',
|
||||
'anrechnungenWurdenAbgelehnt'
|
||||
'anrechnungenWurdenAbgelehnt',
|
||||
'nurLeseberechtigung'
|
||||
),
|
||||
'person' => array(
|
||||
'student',
|
||||
@@ -72,7 +73,7 @@ $this->load->view(
|
||||
</div>
|
||||
<!--end header -->
|
||||
|
||||
<div class="row">
|
||||
<div class="row" id="approveAnrechnungDetail-generell" data-readonly="<?php echo json_encode($hasReadOnlyAccess)?>">
|
||||
<div class="col-xs-8">
|
||||
<!-- Antragsdaten -->
|
||||
<div class="row">
|
||||
|
||||
@@ -48,7 +48,8 @@ $this->load->view(
|
||||
'empfehlungWurdeAngefordert',
|
||||
'empfehlungWurdeAngefordertAusnahmeWoKeineLektoren',
|
||||
'anrechnungenWurdenGenehmigt',
|
||||
'anrechnungenWurdenAbgelehnt'
|
||||
'anrechnungenWurdenAbgelehnt',
|
||||
'nurLeseberechtigung'
|
||||
),
|
||||
'person' => array(
|
||||
'student',
|
||||
@@ -101,7 +102,7 @@ $this->load->view(
|
||||
<!-- dropdown studiensemester -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="formApproveAnrechnungUebersicht" class="form-inline" action="" method="get">
|
||||
<form id="formApproveAnrechnungUebersicht" class="form-inline" action="" method="get" data-readonly="<?php echo json_encode($hasReadOnlyAccess)?>" data-createaccess="<?php echo json_encode($hasCreateAnrechnungAccess)?>">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
@@ -226,7 +227,7 @@ $this->load->view(
|
||||
class='fa fa-times'></i>
|
||||
</button>
|
||||
</div>
|
||||
<a type="button" class="btn btn-default" style="margin-left: 20px;" href='<?php echo site_url('lehre/anrechnung/createAnrechnung') ?>' target='_blank'>
|
||||
<a type="button" id="approveAnrechnungUebersicht-create-anrechnung" class="btn btn-default" style="margin-left: 20px;" href='<?php echo site_url('lehre/anrechnung/createAnrechnung') ?>' target='_blank'>
|
||||
<i class='fa fa-plus' aria-hidden='true'></i> <?php echo $this->p->t('global', 'antragAnlegen'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -414,6 +414,10 @@
|
||||
{
|
||||
$datasetRaw->{'OnholdDate'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'OnholdDate'} = date_format(date_create($datasetRaw->{'OnholdDate'}), 'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAbgeschickt'} == null)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
$STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\'';
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$IDENTITY = '\'identity\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -245,7 +246,15 @@ $query = '
|
||||
LIMIT 1
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "InfoCenterMitarbeiter"
|
||||
) AS "InfoCenterMitarbeiter",
|
||||
(
|
||||
SELECT akte.akte_id
|
||||
FROM public.tbl_akte akte
|
||||
JOIN public.tbl_dokument USING (dokument_kurzbz)
|
||||
WHERE akte.person_id = p.person_id
|
||||
AND dokument_kurzbz = '. $IDENTITY .'
|
||||
LIMIT 1
|
||||
) AS "AktenId"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (
|
||||
SELECT tpl.person_id,
|
||||
@@ -317,7 +326,8 @@ $query = '
|
||||
'Reihungstest date',
|
||||
'ZGV Nation BA',
|
||||
'ZGV Nation MA',
|
||||
'InfoCenter Mitarbeiter'
|
||||
'InfoCenter Mitarbeiter',
|
||||
'Identitätsnachweis'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
@@ -425,6 +435,19 @@ $query = '
|
||||
$datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'AktenId'} !== null)
|
||||
{
|
||||
$datasetRaw->{'AktenId'} = sprintf(
|
||||
'<a href="outputAkteContent/%s">Identitätsnachweis</a>',
|
||||
$datasetRaw->{'AktenId'}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'AktenId'} = '-';
|
||||
}
|
||||
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
@@ -37,6 +37,11 @@ else
|
||||
$ip = $_SERVER["REMOTE_ADDR"];
|
||||
}
|
||||
|
||||
if(isset($_GET['norefresh']))
|
||||
$norefresh = true;
|
||||
else
|
||||
$norefresh = false;
|
||||
|
||||
$infoscreen = new infoscreen();
|
||||
$i=-1;
|
||||
$refreshzeit = 40; // Default Refreshzeit
|
||||
@@ -90,9 +95,12 @@ if(isset($infoscreen_content) && isset($infoscreen_content[$aktuellerContentIdx]
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="refresh" content="',$refreshzeit,'">
|
||||
<link href="../../skin/infoscreen.css" rel="stylesheet" type="text/css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
|
||||
if (!$norefresh)
|
||||
{
|
||||
echo '<meta http-equiv="refresh" content="',$refreshzeit,'">';
|
||||
}
|
||||
echo ' <link href="../../skin/infoscreen.css" rel="stylesheet" type="text/css">
|
||||
';
|
||||
|
||||
//Skript fuer den automatischen bildlauf
|
||||
|
||||
@@ -55,7 +55,7 @@ if (isset($_GET['logout']) && $_GET['logout'] == true)
|
||||
|
||||
echo '
|
||||
<script language="Javascript">
|
||||
location = location.pathname; // clean the login.php-url from querystring
|
||||
location = "logout.html"; // clean the login.php-url from querystring
|
||||
parent.menu.location = parent.menu.location.pathname; // clean the menu.php-url from querystring
|
||||
parent.topbar.location = parent.topbar.location.pathname; // clean the topbar.php-url from querystring
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>TestTool - FH Technikum Wien</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-xs-11">
|
||||
<div class="row" style="margin-bottom: 20px; margin-top: 3%;">
|
||||
<div class="col-xs-6 text-center" style="border-right: 1px solid lightgrey; float: left">
|
||||
<h1 style="white-space: normal">Vielen Dank für die Teilnahme an unserem Aufnahmeverfahren.</h1>
|
||||
<br/><br/>
|
||||
Die zuständige Assistenz wird sich in den nächsten Tagen bei Ihnen melden.
|
||||
<br/><br/>
|
||||
<a href="login.php" class="btn btn-default">Zurück zur Startseite</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center" style="float: left">
|
||||
<h1 style="white-space: normal">Thank you for participating in our admission procedure.</h1>
|
||||
<br/><br/>
|
||||
The assistant in charge will contact you in the next few days.
|
||||
<br/><br/>
|
||||
<a href="login.php" class="btn btn-default">Back to startpage</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1247,15 +1247,16 @@ class reihungstest extends basis_db
|
||||
*/
|
||||
public function getReihungstestPersonDatum($prestudent_id, $datum)
|
||||
{
|
||||
$qry = "SELECT
|
||||
tbl_rt_person.*
|
||||
FROM
|
||||
public.tbl_rt_person
|
||||
JOIN public.tbl_prestudent USING(person_id)
|
||||
JOIN public.tbl_reihungstest ON(tbl_reihungstest.reihungstest_id=tbl_rt_person.rt_id)
|
||||
WHERE
|
||||
tbl_prestudent.prestudent_id = ".$this->db_add_param($prestudent_id)."
|
||||
AND tbl_reihungstest.datum=".$this->db_add_param($datum);
|
||||
$qry = "SELECT rt_person.*
|
||||
FROM tbl_prestudent ps
|
||||
JOIN tbl_prestudentstatus pss ON ps.prestudent_id = pss.prestudent_id
|
||||
JOIN tbl_rt_person rt_person ON ps.person_id = rt_person.person_id
|
||||
JOIN tbl_reihungstest rt ON rt_person.rt_id = rt.reihungstest_id
|
||||
JOIN tbl_rt_studienplan rtstp ON rt.reihungstest_id = rtstp.reihungstest_id
|
||||
WHERE ps.prestudent_id = ".$this->db_add_param($prestudent_id)."
|
||||
AND rtstp.studienplan_id = pss.studienplan_id
|
||||
AND rt.datum=".$this->db_add_param($datum);
|
||||
|
||||
if ($result = $this->db_query($qry))
|
||||
{
|
||||
while ($row = $this->db_fetch_object($result))
|
||||
|
||||
@@ -553,6 +553,12 @@ class statistik extends basis_db
|
||||
{
|
||||
$name = $this->db_field_name($this->data,$spalte);
|
||||
$this->html.= '<td>'.$this->convert_html_chars($row->$name).'</td>';
|
||||
// Umwandeln von Punkt in Komma bei Float-Werten
|
||||
if (is_numeric($row->$name))
|
||||
{
|
||||
if (strpos($row->$name,'.') != false)
|
||||
$row->$name = number_format($row->$name,2,",","");
|
||||
}
|
||||
$this->csv.= '"'.$row->$name.'",';
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ $(function(){
|
||||
|
||||
const genehmigung_panel = $('#approveAnrechnungDetail-genehmigung-panel');
|
||||
const begruendung_panel = $('#approveAnrechnungDetail-begruendung-panel');
|
||||
const hasReadOnlyAccess = $('#approveAnrechnungDetail-generell').data('readonly');
|
||||
|
||||
// Pruefen ob Promise unterstuetzt wird
|
||||
// Tabulator funktioniert nicht mit IE
|
||||
@@ -21,6 +22,11 @@ $(function(){
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasReadOnlyAccess)
|
||||
{
|
||||
approveAnrechnungDetail.disableEditElements();
|
||||
}
|
||||
|
||||
// Set status alert color
|
||||
approveAnrechnungDetail.setStatusAlertColor();
|
||||
|
||||
@@ -417,6 +423,34 @@ var approveAnrechnungDetail = {
|
||||
}
|
||||
);
|
||||
},
|
||||
disableEditElements: function()
|
||||
{
|
||||
// Disable:
|
||||
// ...button Empfehlung anfordern
|
||||
$('#approveAnrechnungDetail-request-recommendation')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Empfehlung zuruecknehmen
|
||||
$('#approveAnrechnungDetail-withdraw-request-recommedation')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Genehmigen
|
||||
$('#approveAnrechnungDetail-approve-anrechnung-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Ablehnen
|
||||
$('#approveAnrechnungDetail-reject-anrechnung-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Genehmigung zurücknehmen
|
||||
$('#approveAnrechnungDetail-withdraw-anrechnung-approvement')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ... form Empfehlungsnotiz
|
||||
$('#form-empfehlungNotiz :input')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
},
|
||||
copyIntoTextarea: function(elem){
|
||||
|
||||
// Find closest textarea
|
||||
|
||||
@@ -148,6 +148,8 @@ $(function(){
|
||||
|
||||
const genehmigung_panel = $('#approveAnrechnungUebersicht-genehmigung-panel');
|
||||
const begruendung_panel = $('#approveAnrechnungUebersicht-begruendung-panel');
|
||||
const hasReadOnlyAccess = $('#formApproveAnrechnungUebersicht').data('readonly');
|
||||
const hasCreateAnrechnungAccess = $('#formApproveAnrechnungUebersicht').data('createaccess');
|
||||
|
||||
// Pruefen ob Promise unterstuetzt wird
|
||||
// Tabulator funktioniert nicht mit IE
|
||||
@@ -165,6 +167,16 @@ $(function(){
|
||||
$('#tableWidgetTabulator').tabulator('redraw', true);
|
||||
});
|
||||
|
||||
if (hasReadOnlyAccess)
|
||||
{
|
||||
approveAnrechnung.disableEditElements();
|
||||
}
|
||||
|
||||
if (!hasCreateAnrechnungAccess)
|
||||
{
|
||||
approveAnrechnung.disableCreateAnrechnungButton();
|
||||
}
|
||||
|
||||
// Set status alert color
|
||||
approveAnrechnung.setStatusAlertColor();
|
||||
|
||||
@@ -517,6 +529,30 @@ var approveAnrechnung = {
|
||||
$('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning');
|
||||
}
|
||||
},
|
||||
disableEditElements: function()
|
||||
{
|
||||
// Disable:
|
||||
// ...button Empfehlung anfordern
|
||||
$('#approveAnrechnungUebersicht-request-recommendation')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Ablehnen
|
||||
$('#approveAnrechnungUebersicht-reject-anrechnungen-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
// ...button Genehmigen
|
||||
$('#approveAnrechnungUebersicht-approve-anrechnungen-ask')
|
||||
.prop('disabled', true)
|
||||
.attr('title', FHC_PhrasesLib.t("ui", "nurLeseberechtigung"));
|
||||
|
||||
},
|
||||
disableCreateAnrechnungButton: function()
|
||||
{
|
||||
// Disable button Antrag anlegen
|
||||
$('#approveAnrechnungUebersicht-create-anrechnung')
|
||||
.removeAttr('href')
|
||||
.css({'color': 'grey', 'pointer-events': 'none'}); // property disabled does not work for <a> link
|
||||
},
|
||||
copyIntoTextarea: function(elem){
|
||||
|
||||
// Find closest textarea
|
||||
|
||||
@@ -158,7 +158,7 @@ foreach($uid_arr as $uid)
|
||||
echo "\t\t<ects_pro_semester_studienplan><![CDATA[".($studienplan->regelstudiendauer!=0?$studienplan->ects_stpl/$studienplan->regelstudiendauer:0)."]]></ects_pro_semester_studienplan>";
|
||||
|
||||
echo "\t\t<aktuellesJahr><![CDATA[".date('Y')."]]></aktuellesJahr>";
|
||||
$status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,null,null))?$prestudent->status_kurzbz:'';
|
||||
$status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,$studiensemester,null))?$prestudent->status_kurzbz:'';
|
||||
$abbrecher = false;
|
||||
$absolvent = false;
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ $filters = array(
|
||||
{"name": "ZGVNation"},
|
||||
{"name": "ZGVMNation"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "Studiensemester"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "LastActionType"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "InfoCenterMitarbeiter"},
|
||||
{"name": "LockUser"}
|
||||
{"name": "LockUser"},
|
||||
{"name": "OnholdDate"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
@@ -311,6 +311,7 @@ $filters = array(
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "AktenId"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "LastActionType"},
|
||||
|
||||
@@ -896,13 +896,13 @@ $phrases = array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'BewerberIn bereits vorhanden',
|
||||
'text' => 'BewerberIn möglicherweise vorhanden',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Applicant already available',
|
||||
'text' => 'Applicant maybe available',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -13694,7 +13694,27 @@ array(
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'nurLeseberechtigung',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Nur Leseberechtigung",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Read-Only Access",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -86,9 +86,22 @@ $(document).ready(function()
|
||||
$("#t3").tablesorter(
|
||||
{
|
||||
sortList: [[1,0],[2,0],[3,0]],
|
||||
widgets: ["zebra"],
|
||||
widgets: ["zebra", "filter", "stickyHeaders"],
|
||||
headers: {8:{sorter:false}},
|
||||
emptyTo: "emptyMax"
|
||||
emptyTo: "emptyMax",
|
||||
widgetOptions : { filter_functions:
|
||||
{
|
||||
// Add select menu to this column
|
||||
6 : {
|
||||
"Ja" : function(e, n, f, i, $r, c, data) { return /Ja/.test(e); },
|
||||
"Nein" : function(e, n, f, i, $r, c, data) { return /Nein/.test(e); }
|
||||
},
|
||||
7 : {
|
||||
"Aktiv" : function(e, n, f, i, $r, c, data) { return $r.find("div").hasClass( "buttonGreen" ); },
|
||||
"Inaktiv" : function(e, n, f, i, $r, c, data) { return $r.find("div").hasClass( "buttonRed" ) || $r.find("div").hasClass( "buttonYellow" ); }
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#t4").tablesorter(
|
||||
{
|
||||
@@ -528,8 +541,22 @@ if($rolle_kurzbz != '')
|
||||
|
||||
if(isset($rollen->result) && count($rollen->result) != 0)
|
||||
{
|
||||
// Anzahl uniquer UIDs ermitteln
|
||||
$berechtigungen_array_uids = sizeof(array_column($rollen->result, null, 'uid'));
|
||||
|
||||
$htmlstr .= "<h3>".$berechtigung_kurzbz."</h3>\n";
|
||||
$htmlstr .= "<div style='font-size: 9pt'>".count($rollen->result)." Einträge</div>";
|
||||
$htmlstr .= "<div style='font-size: 9pt'>".$berechtigungen_array_uids." UIDs</div>";
|
||||
$htmlstr .= "<table id='t3' class='tablesorter'><thead><tr>\n";
|
||||
$htmlstr .= "<th>Rolle</th><th>Funktion</th><th>Nachname</th><th>Vorname</th><th>UID</th><th>Art</th><th>Benutzer Aktiv</th><th>Status</th><th>Aktion</th>";
|
||||
$htmlstr .= " <th>Rolle</th>
|
||||
<th>Funktion</th>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th>UID</th>
|
||||
<th>Art</th>
|
||||
<th>Benutzer Aktiv</th>
|
||||
<th>Status</th>
|
||||
<th>Aktion</th>";
|
||||
$htmlstr .= "</tr></thead><tbody>\n";
|
||||
|
||||
foreach($rollen->result as $row)
|
||||
@@ -541,35 +568,16 @@ if($rolle_kurzbz != '')
|
||||
|
||||
if ($row->ende!='' && strtotime($row->ende) < $heute)
|
||||
{
|
||||
$color1 = '#f79c9c';
|
||||
$color2 = '#cc0202';
|
||||
$status = '<div class="buttonRed"></div>';
|
||||
}
|
||||
elseif ($row->start!='' && strtotime($row->start) > $heute)
|
||||
{
|
||||
$color1 = '#faf7b9';
|
||||
$color2 = '#cfde00';
|
||||
$status = '<div class="buttonYellow"></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$color1 = '#d1fab9';
|
||||
$color2 = '#00de00';
|
||||
$status = '<div class="buttonGreen"></div>';
|
||||
}
|
||||
$status='<div style="
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: '.$color1.';
|
||||
background-image: -webkit-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: -moz-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: -ms-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: -o-linear-gradient(top, '.$color1.', '.$color2.');
|
||||
background-image: linear-gradient(to bottom, '.$color1.', '.$color2.');
|
||||
-webkit-border-radius: 10;
|
||||
-moz-border-radius: 10;
|
||||
border-radius: 10px;
|
||||
|
||||
border: solid #999 1px;
|
||||
text-decoration: none;
|
||||
"></div>';
|
||||
|
||||
$htmlstr .= ' <tr>';
|
||||
$htmlstr .= ' <td>'.$row->rolle_kurzbz.'</td>';
|
||||
|
||||
Reference in New Issue
Block a user