added zgv ueberpruefung

This commit is contained in:
ma0048
2021-03-23 09:25:24 +01:00
parent 5da754c9db
commit 287cddf926
16 changed files with 1010 additions and 13 deletions
+9
View File
@@ -62,6 +62,15 @@ $config['navigation_header'] = array(
'lehre/lehrauftrag_bestellen:r',
'lehre/lehrauftrag_erteilen:r'
)
),
'zgvueberpruefung' => array(
'link' => site_url('system/infocenter/ZGVUeberpruefung'),
'description' => 'ZGV Überprüfung',
'expand' => true,
'sort' => 50,
'requiredPermissions' => array(
'lehre/zgvpruefung:r'
)
)
)
),
@@ -12,6 +12,7 @@ class InfoCenter extends Auth_Controller
const APP = 'infocenter';
const TAETIGKEIT = 'bewerbung';
const FREIGABE_MAIL_VORLAGE = 'InfocenterMailFreigabeAssistenz';
const ZGVPRUEFUNG_MAIL_VORLAGE = 'InfocenterMailZgvUeberpruefung';
const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller
const INDEX_PAGE = 'index';
@@ -85,6 +86,7 @@ class InfoCenter extends Auth_Controller
'freigegeben' => 'infocenter:r',
'reihungstestAbsolviert' => 'infocenter:r',
'showDetails' => 'infocenter:r',
'showZGVDetails' => 'infocenter:r',
'unlockPerson' => 'infocenter:rw',
'saveFormalGeprueft' => 'infocenter:rw',
'getPrestudentData' => 'infocenter:r',
@@ -92,6 +94,8 @@ class InfoCenter extends Auth_Controller
'getZgvInfoForPrestudent' => 'infocenter:r',
'saveBewPriorisierung' => 'infocenter:rw',
'saveZgvPruefung' => 'infocenter:rw',
'zgvRueckfragen' => 'infocenter:rw',
'zgvStatusUpdate' => 'infocenter:rw',
'saveAbsage' => 'infocenter:rw',
'saveFreigabe' => 'infocenter:rw',
'getNotiz' => 'infocenter:r',
@@ -117,6 +121,8 @@ class InfoCenter extends Auth_Controller
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$this->load->model('crm/Statusgrund_model', 'StatusgrundModel');
$this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel');
$this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel');
$this->load->model('person/Notiz_model', 'NotizModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->model('system/Message_model', 'MessageModel');
@@ -178,6 +184,63 @@ class InfoCenter extends Auth_Controller
$this->load->view('system/infocenter/infocenterReihungstestAbsolviert.php');
}
/**
* Prestudenten/ZGV übersicht
* Holt sich die Informationen zu den ZGV vom Prestudenten und zeigt die dann an
*/
public function showZGVDetails()
{
$prestudent_id = $this->input->get('prestudent_id');
if (!is_numeric($prestudent_id))
show_error('prestudent id is not numeric!');
$prestudentexists = $this->PrestudentModel->load($prestudent_id);
if (isError($prestudentexists))
show_error(getError($prestudentexists));
if (!hasData($prestudentexists))
show_error('Prestudent does not exist!');
$zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id));
if (isError($zgvExist))
show_error(getError($zgvExist));
if (!hasData($zgvExist))
show_error('ZGV does not exist!');
$this->ZGVPruefungStatusModel->addOrder('datum', 'DESC');
$this->ZGVPruefungStatusModel->addLimit(1);
$statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id));
if (isError($statusZGV))
show_error(getError($statusZGV));
if (!hasData($statusZGV))
show_error('ZGV has no status.');
$statusZGV = array('status' => $statusZGV->retval[0]->status);
$origin_page = $this->input->get(self::ORIGIN_PAGE);
$persondata = $this->_loadPersonData($prestudentexists->retval[0]->person_id);
$prestudent_id = array('prestudent_id' => $prestudent_id);
$data = array_merge(
$persondata,
$prestudent_id,
$statusZGV
);
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
$data[self::ORIGIN_PAGE] = $origin_page;
$data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID);
$this->load->view('system/infocenter/infocenterZgvDetails.php', $data);
}
/**
* Personal details page of the InfoCenter tool
* Initialization function, gets person and prestudent data and loads the view with the data
@@ -429,6 +492,180 @@ class InfoCenter extends Auth_Controller
$this->outputJson($json);
}
/**
* Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang
*/
private function sendZgvMail($mail){
$data = array(
'DataTest' => 'getestet.'
);
$this->load->helper('hlp_sancho');
sendSanchoMail(
self::ZGVPRUEFUNG_MAIL_VORLAGE,
$data,
$mail,
'ZGV Ueberpruefung',
'sancho_header_min_bw.jpg',
'sancho_footer_min_bw.jpg'
);
return true;
}
/**
* Der Status von den ZGV wird geupdated
*/
public function zgvStatusUpdate()
{
$prestudent_id = $this->input->post('prestudent_id');
$person_id = $this->input->post('person_id');
$status = $this->input->post('status');
if (isEmptyString($prestudent_id) && isEmptyString($person_id) && isEmptyString($status))
return $this->outputJsonError('Some data is missing');
$zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id));
if (!hasData($zgv))
return $this->outputJsonError('ZGV nicht gefunden');
$zgv = getData($zgv);
$this->ZGVPruefungStatusModel->addOrder('datum', 'DESC');
$this->ZGVPruefungStatusModel->addLimit(1);
$statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id));
if (!hasData($statusZGV))
return $this->outputJsonError('ZGV-Status nicht gefunden');
$statusZGV = getData($statusZGV);
if ($statusZGV[0]->status === 'rejected' && $status === 'rejected')
return $this->outputJsonError('Bereits abgelehnt worden');
elseif ($statusZGV[0]->status === 'accepted' && $status === 'accepted')
return $this->outputJsonError('Bereits akzeptiert worden');
$insert = $this->ZGVPruefungStatusModel->insert(
array(
'zgvpruefung_id' => $zgv[0]->zgvpruefung_id,
'status' => $status
)
);
$update = $this->ZGVPruefungModel->update(
$zgv[0]->zgvpruefung_id,
array(
'updateamum' => date('Y-m-d H:i:s'),
'updatevon' => $this->_uid
)
);
if (isError($insert) && isError($update))
return $this->outputJsonError('Fehler beim Speichern');
$personInfos = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
$this->outputJsonSuccess(
array
(
'msg' => 'Erfolgreich gespeichert',
'person_id' => $personInfos['person_id']
)
);
}
/**
* Fügt einen neuen ZGV Status hinzu oder updated einen bestehenden
* Falls es erfolgreich war, sendet er die Mail raus
*/
public function zgvRueckfragen()
{
$prestudent_id = $this->input->post('prestudent_id');
$person_id = $this->input->post('person_id');
if (isEmptyString($prestudent_id) && isEmptyString($person_id))
return $this->outputJsonError('Prestudentid OR/AND Personid missing');
$zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id));
$sg = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
$mail = $sg['studiengang_mail'];
if (hasData($zgv))
{
$zgv = getData($zgv);
$this->ZGVPruefungStatusModel->addOrder('datum', 'DESC');
$this->ZGVPruefungStatusModel->addLimit(1);
$statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id));
if (!hasData($statusZGV))
return $this->outputJsonError('ZGV-Status nicht gefunden');
$statusZGV = getData($statusZGV);
if ($statusZGV[0]->status === 'pruefung_stg')
return $this->outputJsonError('Bereits in Prüfung');
$insert = $this->ZGVPruefungStatusModel->insert(
array(
'zgvpruefung_id' => $zgv[0]->zgvpruefung_id,
'status' => 'pruefung_stg'
)
);
$update = $this->ZGVPruefungModel->update(
$zgv[0]->zgvpruefung_id,
array(
'updateamum' => date('Y-m-d H:i:s'),
'updatevon' => $this->_uid
)
);
if (isSuccess($insert) && isSuccess($update))
$mailStatus = $this->sendZgvMail($mail);
elseif (isError($insert) && isError($update))
return $this->outputJsonError('Fehler beim Speichern');
}else
{
$insert = $this->ZGVPruefungModel->insert(
array(
'prestudent_id' => $prestudent_id,
'insertamum' => date('Y-m-d H:i:s'),
'insertvon' => $this->_uid
)
);
if (isSuccess($insert))
{
$zgvpruefung_id = $this->ZGVPruefungModel->db->insert_id();
$result = $this->ZGVPruefungStatusModel->insert(
array(
'zgvpruefung_id' => $zgvpruefung_id,
'status' => 'pruefung_stg'
)
);
if (isSuccess($result))
$mailStatus = $this->sendZgvMail($mail);
elseif (isError($result))
return $this->outputJsonError('Fehler beim Speichern');
}
}
if ($mailStatus)
{
$this->outputJsonSuccess(
array
(
'msg' => 'Erfolgreich gespeichert',
'person_id' => $sg['person_id']
)
);
}
}
/**
* Saves Absage for Prestudent including the reason for the Absage (statusgrund).
* inserts Studiensemester and Ausbildungssemester for the new Absage of (chronologically) last status.
@@ -1421,8 +1658,20 @@ class InfoCenter extends Auth_Controller
$zgvpruefung->changedown = $this->PrestudentModel->checkPrioChange($zgvpruefung->prestudent_id, $studiensemester, 1);
}
}
$zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $zgvpruefung->prestudent_id));
$zgvpruefungen[] = $zgvpruefung;
if (isSuccess($zgvExist) && hasData($zgvExist))
{
$this->ZGVPruefungStatusModel->addOrder('datum', 'DESC');
$this->ZGVPruefungStatusModel->addLimit(1);
$statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id));
if (isSuccess($statusZGV) && hasData($statusZGV))
$zgvpruefung->statusZGV = $statusZGV->retval[0]->status;
}
$zgvpruefungen[] = $zgvpruefung;
}
$this->_sortPrestudents($zgvpruefungen);
@@ -1545,8 +1794,9 @@ class InfoCenter extends Auth_Controller
$person_id = $prestudentdata->person_id;
$studiengang_kurzbz = $prestudentdata->studiengang;
$studiengang_bezeichnung = $prestudentdata->studiengangbezeichnung;
$studiengang_mail = $prestudentdata->studiengangmail;
return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung);
return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung, 'studiengang_mail' => $studiengang_mail);
}
/**
@@ -0,0 +1,33 @@
<?php
class ZGVUeberpruefung extends Auth_Controller
{
private $_uid; // uid of the logged user
/**
* Constructor
*/
public function __construct()
{
// Set required permissions
parent::__construct(
array(
'index' => 'lehre/zgvpruefung:r',
)
);
$this->load->library('WidgetLib');
$this->setControllerId(); // sets the controller id
}
public function index()
{
try{
$this->load->view('system/infocenter/infocenterZgvUeberpruefung.php');
}catch(Exception $e)
{
var_dump($e);
}
}
}
@@ -0,0 +1,17 @@
<?php
class ZGVPruefungStatus_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_zgvpruefungstatus_status';
$this->pk = 'zgv_pruefung_status_id';
$this->hasSequence = true;
}
}
@@ -0,0 +1,17 @@
<?php
class ZGVPruefung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_zgvpruefung';
$this->pk = 'zgvpruefung_id';
$this->hasSequence = true;
}
}
@@ -6,7 +6,10 @@
<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('infocenter','ausstellungsnation')) ?></th>
<th><?php echo ucfirst($this->p->t('infocenter','formalGeprueft')) ?></th>
<?php
if (!isset($formalReadonly))
echo "<th>" . ucfirst($this->p->t('infocenter','formalGeprueft')) . "</th>"
?>
</tr>
</thead>
<tbody>
@@ -21,13 +24,17 @@
<td><?php echo $dokument->dokument_bezeichnung ?></td>
<td><?php echo date_format(date_create($dokument->erstelltam), 'd.m.Y') ?></td>
<td><?php echo $dokument->langtext ?></td>
<td>
<input type="checkbox" class="form-check-input prchbox"
id="prchkbx_<?php echo $dokument->akte_id ?>" <?php echo $geprueft ?>>
<span id="formalgeprueftam_<?php echo $dokument->akte_id ?>">
<?php echo isset($dokument->formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?>
</span>
</td>
<?php
if (!isset($formalReadonly)) :
?>
<td>
<input type="checkbox" class="form-check-input prchbox"
id="prchkbx_<?php echo $dokument->akte_id ?>" <?php echo $geprueft ?>>
<span id="formalgeprueftam_<?php echo $dokument->akte_id ?>">
<?php echo isset($dokument->formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?>
</span>
</td>
<?php endif ?>
</tr>
<?php endforeach ?>
</tbody>
@@ -0,0 +1,203 @@
<?php
$this->load->view(
'templates/FHC-Header',
array(
'title' => 'InfocenterZgvDetails',
'jquery' => true,
'bootstrap' => true,
'fontawesome' => true,
'jqueryui' => true,
'dialoglib' => true,
'ajaxlib' => true,
'tablesorter' => true,
'tinymce' => true,
'sbadmintemplate' => true,
'addons' => true,
'navigationwidget' => true,
'udfs' => true,
'widgets' => true,
'customCSSs' => array(
'public/css/sbadmin2/admintemplate.css',
'public/css/sbadmin2/tablesort_bootstrap.css',
'public/css/infocenter/infocenterDetails.css'
),
'customJSs' => array(
'public/js/bootstrapper.js',
'public/js/tablesort/tablesort.js',
'public/js/infocenter/messageList.js',
'public/js/infocenter/infocenterDetails.js'
),
'phrases' => array(
'infocenter' => array(
'notizHinzufuegen',
'notizAendern',
'nichtsZumEntfernen',
'fehlerBeimEntfernen',
'zgvInPruefung',
'zgvAkzeptiert',
'zgvAbgelehnt'
),
'ui' => array(
'gespeichert',
'fehlerBeimSpeichern'
),
'global' => array(
'bis',
'zeilen'
)
)
)
);
?>
<body>
<div id="wrapper">
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
<div id="page-wrapper">
<div class="container-fluid">
<input type="hidden" id="hiddenpersonid" value="<?php echo $stammdaten->person_id ?>">
<div class="row<?php if ($lockedbyother) echo ' alert-danger' ?>">
<div class="col-lg-8">
<h3 class="page-header">
Infocenter Details: <?php echo $stammdaten->vorname.' '.$stammdaten->nachname ?>
</h3>
</div>
<div class="col-lg-4">
<div class="headerright text-right">
<?php
if (isset($lockedby)):
echo $this->p->t('global', 'wirdBearbeitetVon').': ';
echo $lockedby;
if ($origin_page == 'index'):
$unlockpath = 'unlockPerson/'.$stammdaten->person_id;
$unlockpath .= '?fhc_controller_id='.$fhc_controller_id;
$unlockpath .= '&filter_id='.$prev_filter_id;
?>
&nbsp;&nbsp;
<a href="<?php echo $unlockpath; ?>">
<i class="fa fa-sign-out"></i>&nbsp;<?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
</a>
<?php endif; ?>
<?php else: ?>
&nbsp;
<?php endif; ?>
</div>
</div>
</div>
<br/>
<section>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading text-center">
<h4><?php echo ucfirst($this->p->t('global', 'stammdaten')) ?></h4>
</div>
<div class="panel-body">
<?php
$this->load->view('system/infocenter/stammdaten.php'); ?>
<?php $this->load->view('system/infocenter/anmerkungenZurBewerbung.php'); ?>
</div> <!-- ./panel-body -->
</div> <!-- ./panel -->
</div> <!-- ./main column -->
</div> <!-- ./main row -->
</section>
<section>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<a name="DokPruef"></a><!-- anchor for jumping to the section -->
<div class="panel-heading text-center">
<h4>
<?php echo ucfirst($this->p->t('infocenter', 'dokumentenpruefung')) ?>
</h4>
</div>
<div class="panel-body">
<?php $this->load->view('system/infocenter/dokpruefung.php', array('formalReadonly' => true)); ?>
</div> <!-- ./panel-body -->
<div class="panel-body">
<button type="button" class="btn btn-default zgvAkzeptieren" id="zgvAkzeptieren_<?php echo $prestudent_id ?>">
<?php echo $this->p->t('infocenter', 'zgvAkzeptieren') ?>
</button>
<button type="button" class="btn btn-default zgvAblehnen" id="zgvAblehnen_<?php echo $prestudent_id ?>">
<?php echo $this->p->t('infocenter', 'zgvAblehnen') ?>
</button>
<span id="zgvStatusText">
<?php
switch ($status)
{
case 'pruefung_stg' :
echo $this->p->t('infocenter', 'zgvInPruefung');
break;
case 'accepted' :
echo $this->p->t('infocenter', 'zgvAkzeptiert');
break;
case 'rejected' :
echo $this->p->t('infocenter', 'zgvAbgelehnt');
break;
}
?>
</span>
</input>
</div>
</div> <!-- ./panel -->
</div> <!-- ./column -->
</div> <!-- ./row -->
</section>
<section>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading text-center">
<a name="Nachrichten"></a>
<h4 class="text-center">
<?php echo ucfirst($this->p->t('global', 'nachrichten')) ?>
</h4>
</div>
<div class="panel-body">
<div class="row" id="messagelist">
<?php
$this->load->view('system/infocenter/messageList.php', $messages);
?>
</div>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading text-center">
<a name="NotizAkt"></a>
<h4 class="text-center">
<?php echo ucfirst($this->p->t('global', 'notizen'))?>
</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-12">
<div id="addnotiz">
<?php $this->load->view('system/infocenter/addNotiz.php'); ?>
</div>
<div id="notizen">
<?php $this->load->view('system/infocenter/notizen.php'); ?>
</div>
</div>
</div> <!-- ./row -->
</div> <!-- ./panel-body -->
</div> <!-- ./panel -->
</div> <!-- ./main column -->
</div> <!-- ./main row -->
</section>
</div> <!-- ./container-fluid-->
</div> <!-- ./page-wrapper-->
</div> <!-- ./wrapper -->
<button id="scrollToTop" title="Go to top"><i class="fa fa-chevron-up"></i></button>
</body>
<?php $this->load->view('templates/FHC-Footer'); ?>
@@ -0,0 +1,49 @@
<?php
$this->load->view(
'templates/FHC-Header',
array(
'title' => 'Info Center',
'jquery' => true,
'jqueryui' => true,
'jquerycheckboxes' => true,
'bootstrap' => true,
'fontawesome' => true,
'sbadmintemplate' => true,
'tablesorter' => true,
'ajaxlib' => true,
'filterwidget' => true,
'navigationwidget' => true,
'phrases' => array(
'person' => array('vorname', 'nachname'),
'global' => array('mailAnXversandt'),
'ui' => array('bitteEintragWaehlen')
),
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterZgv.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">
ZGV Überprüfung
</h3>
</div>
</div>
<div>
<?php $this->load->view('system/infocenter/infocenterZgvUeberpruefungData.php'); ?>
</div>
</div>
</div>
</div>
</body>
<?php $this->load->view('templates/FHC-Footer'); ?>
@@ -0,0 +1,63 @@
<?php
$APP = '\'infocenter\'';
$INTERESSENT_STATUS = '\'Interessent\'';
$TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\'';
$LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\'';
$STATUS = '\'pruefung_stg\'';
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
$oeKurz = $rechte->getOEkurzbz('lehre/zgvpruefung');
$oeKurz = '\''. implode('\',\'', $oeKurz) . '\'';
$query = '
SELECT
ps.prestudent_id AS "PreStudentID",
p.vorname AS "Vorname",
p.nachname AS "Nachname",
sg.kurzbzlang AS "Studiengang"
FROM public.tbl_zgvpruefungstatus_status zgvstatus
JOIN public.tbl_zgvpruefung zgv USING (zgvpruefung_id)
JOIN public.tbl_prestudent ps USING (prestudent_id)
JOIN public.tbl_person p USING(person_id)
JOIN public.tbl_studiengang sg USING(studiengang_kz)
WHERE zgvstatus.status = ' . $STATUS . '
AND oe_kurzbz IN ('. $oeKurz .')
AND zgvstatus.datum IN (
SELECT MAX(zgvstatus.datum)
FROM public.tbl_zgvpruefungstatus_status zgvstatus GROUP BY zgvstatus.zgvpruefung_id)
ORDER BY ps.prestudent_id
';
$filterWidgetArray = array(
'query' => $query,
'app' => 'infocenter',
'datasetName' => 'zgvUeberpruefung',
'filter_id' => $this->input->get('filter_id'),
'requiredPermissions' => 'infocenter',
'datasetRepresentation' => 'tablesorter',
'additionalColumns' => array('Details'),
'hideOptions' => true,
'columnsAliases' => array(
),
'formatRow' => function($datasetRaw) {
/* NOTE: Dont use $this here for PHP Version compatibility */
$datasetRaw->{'Details'} = sprintf(
'<a href="%s?prestudent_id=%s&origin_page=%s&fhc_controller_id=%s&prev_filter_id=%s">Details</a>',
site_url('system/infocenter/InfoCenter/showZGVDetails'),
$datasetRaw->{'PreStudentID'},
'zgvUeberpruefung',
(isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''),
(isset($_GET['filter_id']) ? $_GET['filter_id'] : '')
);
return $datasetRaw;
},
);
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
?>
@@ -311,12 +311,34 @@
</form>
<?php if (!$infoonly): ?>
<div class="row">
<div class="col-xs-6 text-left">
<div class="col-xs-8 text-left">
<button type="button" class="btn btn-default zgvUebernehmen" id="zgvUebernehmen_<?php echo $zgvpruefung->prestudent_id ?>">
<?php echo $this->p->t('infocenter', 'letzteZgvUebernehmen') ?>
</button>
<button type="button" class="btn btn-default zgvRueckfragen" id="zgvRueckfragen_<?php echo $zgvpruefung->prestudent_id ?>">
<?php echo $this->p->t('infocenter', 'zgvRueckfragen') ?>
</button>
<span id="zgvStatusText">
<?php
if (isset($zgvpruefung->statusZGV))
{
switch ($zgvpruefung->statusZGV)
{
case 'pruefung_stg' :
echo $this->p->t('infocenter', 'zgvInPruefung');
break;
case 'accepted' :
echo $this->p->t('infocenter', 'zgvAkzeptiert');
break;
case 'rejected' :
echo $this->p->t('infocenter', 'zgvAbgelehnt');
break;
}
}
?>
</span>
</div>
<div class="col-xs-6 text-right">
<div class="col-xs-4 text-right">
<button type="submit" class="btn btn-default saveZgv" id="zgvSpeichern_<?php echo $zgvpruefung->prestudent_id ?>">
<?php echo $this->p->t('ui', 'speichern') ?>
</button>
+99
View File
@@ -221,6 +221,71 @@ var InfocenterDetails = {
}
);
},
zgvRueckfragen: function(data)
{
FHC_AjaxClient.ajaxCallPost(
CALLED_PATH + '/zgvRueckfragen',
data,
{
successCallback: function(data, textStatus, jqXHR)
{
if (FHC_AjaxClient.hasData(data))
{
var response = FHC_AjaxClient.getData(data);
var date = new Date();
date.setDate(date.getDate() + 14);
var dd = date.getDate();
var mm = date.getMonth() + 1;
var y = date.getFullYear();
var formatedDate = mm + '/'+ dd + '/'+ y;
InfocenterDetails.setPersonOnHold(response.person_id, formatedDate);
$('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', 'zgvInPruefung'));
InfocenterDetails._refreshZgv();
FHC_DialogLib.alertSuccess(response.msg);
} else if(FHC_AjaxClient.isError(data))
FHC_DialogLib.alertError(FHC_AjaxClient.getError(data));
},
errorCallback: function(jqXHR, textStatus, errorThrown)
{
FHC_DialogLib.alertError((jqXHR.responseText));
}
}
);
},
zgvStatusUpdate: function(data)
{
var status = data.status;
FHC_AjaxClient.ajaxCallPost(
CALLED_PATH + '/zgvStatusUpdate',
data,
{
successCallback: function(data, textStatus, jqXHR)
{
if (FHC_AjaxClient.hasData(data))
{
var response = FHC_AjaxClient.getData(data)
FHC_DialogLib.alertSuccess(response.msg);
InfocenterDetails.removePersonOnHold(response.person_id);
if (status === 'rejected')
var p = 'zgvAbgelehnt'
else if (status === 'accepted')
var p = 'zgvAkzeptiert';
$('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', p));
} else if (FHC_AjaxClient.isError(data))
FHC_DialogLib.alertError(FHC_AjaxClient.getError(data));
},
errorCallback: function(jqXHR, textStatus, errorThrown)
{
FHC_DialogLib.alertError((jqXHR.responseText));
}
}
);
},
saveZgv: function(data)
{
var zgvError = function(){
@@ -746,6 +811,40 @@ var InfocenterDetails = {
InfocenterDetails.zgvUebernehmen(personid, prestudentid, btn);
});
$('.zgvRueckfragen').click(function ()
{
//var btn = $(this);
var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id);
//$('#zgvUebernehmenNotice').remove();
var data = {
'person_id' : personid,
'prestudent_id' : prestudentid
}
InfocenterDetails.zgvRueckfragen(data);
});
$('.zgvAkzeptieren').click(function (){
var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id);
var data = {
'person_id' : personid,
'prestudent_id' : prestudentid,
'status' : 'accepted'
}
InfocenterDetails.zgvStatusUpdate(data);
});
$('.zgvAblehnen').click(function (){
var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id);
var data = {
'person_id' : personid,
'prestudent_id' : prestudentid,
'status' : 'rejected'
}
InfocenterDetails.zgvStatusUpdate(data);
});
//zgv speichern
$(".saveZgv").click(function ()
{
+1 -1
View File
@@ -54,7 +54,7 @@ $data = array
'rolle_kurzbz' => 'admin',
'berechtigung' => array
(
'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', 'basis/organisationseinheit', 'basis/ort', 'basis/orgform', 'basis/person', 'basis/planner', 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/tempus', 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', 'lehre/vorrueckung', 'lv-plan', 'lv-plan/gruppenentfernen', 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', 'student/vorrueckung', 'system/developer', 'system/loginasuser', 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', 'wawi/storno'
'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', 'basis/organisationseinheit', 'basis/ort', 'basis/orgform', 'basis/person', 'basis/planner', 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/tempus', 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', 'lehre/vorrueckung', 'lehre/zgvpruefung', 'lv-plan', 'lv-plan/gruppenentfernen', 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', 'student/vorrueckung', 'system/developer', 'system/loginasuser', 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', 'wawi/storno'
)
)
);
+1
View File
@@ -162,6 +162,7 @@ $berechtigungen = array(
array('lehre/studienordnungInaktiv','Studienordnung Inaktiv'),
array('lehre/studienplan','Studienplan'),
array('lehre/vorrueckung','Lehreinheitenvorrückung'),
array('lehre/zgvpruefung','Berechtigung um ZGV Überprüfungen vorzunehmen'),
array('lv-plan','Stundenplan'),
array('lv-plan/gruppenentfernen','Erlaut das Entfernen von Gruppen aus LVPlan vom FAS aus'),
array('lv-plan/lektorentfernen','Erlaut das Entfernen von Lektoren aus LVPlan vom FAS aus'),
+99
View File
@@ -4700,6 +4700,102 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht
}
}
// Add table zgvpruefungstatus
if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus LIMIT 1;"))
{
$qry = "
CREATE TABLE public.tbl_zgvpruefungstatus
(
status_kurzbz character varying(32),
bezeichnung character varying(256)
);
ALTER TABLE public.tbl_zgvpruefungstatus ADD CONSTRAINT status_kurzbz PRIMARY KEY (status_kurzbz);
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('pruefung_stg', 'Wird vom Studiengang geprüft');
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('rejected', 'Vom Studiengang abgelehnt');
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted', 'Vom Studiengang akzeptiert');
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus TO vilesci;
GRANT SELECT ON public.tbl_zgvpruefungstatus TO web;
";
if(!$db->db_query($qry))
echo '<strong>public.tbl_zgvpruefungstatus: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_zgvpruefungstatus: Tabelle hinzugefuegt<br>';
}
// Add table zgvpruefung
if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefung LIMIT 1;"))
{
$qry = "
CREATE TABLE public.tbl_zgvpruefung
(
zgvpruefung_id integer NOT NULL,
prestudent_id integer NOT NULL,
insertamum timestamp without time zone,
insertvon character varying(32),
updateamum timestamp without time zone,
updatevon character varying(32)
);
CREATE SEQUENCE public.tbl_zgvpruefung_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.tbl_zgvpruefung ADD CONSTRAINT pk_tbl_zgvpruefung PRIMARY KEY (zgvpruefung_id);
ALTER TABLE public.tbl_zgvpruefung ALTER COLUMN zgvpruefung_id SET DEFAULT nextval('public.tbl_zgvpruefung_id_seq');
ALTER TABLE public.tbl_zgvpruefung ADD CONSTRAINT fk_tbl_zgvpruefung_student FOREIGN KEY (prestudent_id) REFERENCES public.tbl_prestudent (prestudent_id) ON DELETE RESTRICT ON UPDATE CASCADE;
GRANT SELECT, UPDATE ON public.tbl_zgvpruefung_id_seq TO vilesci;
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefung TO vilesci;
GRANT SELECT ON public.tbl_zgvpruefung TO web;
";
if(!$db->db_query($qry))
echo '<strong>public.tbl_zgvpruefung: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_zgvpruefung: Tabelle hinzugefuegt<br>';
}
// Add table zgvpruefungstatus_status
if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus_status LIMIT 1;"))
{
$qry = "
CREATE TABLE public.tbl_zgvpruefungstatus_status
(
zgv_pruefung_status_id integer NOT NULL,
zgvpruefung_id integer NOT NULL,
status character varying(32),
datum timestamp without time zone DEFAULT now()
);
CREATE SEQUENCE public.tbl_zgvpruefungstatus_status_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT pk_tbl_zgvpruefungstatus_status PRIMARY KEY (zgv_pruefung_status_id);
ALTER TABLE public.tbl_zgvpruefungstatus_status ALTER COLUMN zgv_pruefung_status_id SET DEFAULT nextval('tbl_zgvpruefungstatus_status_id_seq');
ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT fk_tbl_zgvpruefung_zgvpruefung FOREIGN KEY (zgvpruefung_id) REFERENCES public.tbl_zgvpruefung (zgvpruefung_id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT fk_tbl_zgvpruefung_status FOREIGN KEY (status) REFERENCES public.tbl_zgvpruefungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
GRANT SELECT, UPDATE ON public.tbl_zgvpruefungstatus_status_id_seq TO vilesci;
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus_status TO vilesci;
GRANT SELECT ON public.tbl_zgvpruefungstatus_status TO web;
";
if(!$db->db_query($qry))
echo '<strong>public.tbl_zgvpruefungstatus_status: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_zgvpruefungstatus_status: Tabelle hinzugefuegt<br>';
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -4940,6 +5036,9 @@ $tabellen=array(
"public.tbl_vorlage" => array("vorlage_kurzbz","bezeichnung","anmerkung","mimetype","attribute","archivierbar","signierbar","stud_selfservice","dokument_kurzbz","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_vorlagedokument" => array("vorlagedokument_id","sort","vorlagestudiengang_id","dokument_kurzbz"),
"public.tbl_vorlagestudiengang" => array("vorlagestudiengang_id","vorlage_kurzbz","studiengang_kz","version","text","oe_kurzbz","style","berechtigung","anmerkung_vorlagestudiengang","aktiv","sprache","subject","orgform_kurzbz","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_zgvpruefungstatus" => array("status_kurzbz","bezeichnung"),
"public.tbl_zgvpruefung" => array("zgvpruefung_id","prestudent_id","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_zgvpruefungstatus_status" => array("zgv_pruefung_status_id","zgvpruefung_id","status","datum"),
"testtool.tbl_ablauf" => array("ablauf_id","gebiet_id","studiengang_kz","reihung","gewicht","semester", "insertamum","insertvon","updateamum", "updatevon","ablauf_vorgaben_id","studienplan_id"),
"testtool.tbl_ablauf_vorgaben" => array("ablauf_vorgaben_id","studiengang_kz","sprache","sprachwahl","content_id","insertamum","insertvon","updateamum", "updatevon"),
"testtool.tbl_antwort" => array("antwort_id","pruefling_id","vorschlag_id"),
+8
View File
@@ -401,6 +401,14 @@ $filters = array(
',
'oe_kurzbz' => null,
),
array(
'app' => 'infocenter',
'dataset_name' => 'zgvUeberpruefung',
'filter_kurzbz' => 'zgvUeberpruefung',
'description' => '{ZGV Übersicht}',
'sort' => 4,
),
array(
'app' => 'budget',
'dataset_name' => 'budgetoverview',
+120
View File
@@ -3006,6 +3006,126 @@ $phrases = array(
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',
'phrase' => 'zgvRueckfragen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'ZGV Prüfung beantragen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'apply for a ZGV examination',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',
'phrase' => 'zgvAkzeptieren',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Dokumente akzeptieren',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'accept documents',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',
'phrase' => 'zgvAblehnen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Dokumente ablehnen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'reject documents',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',
'phrase' => 'zgvInPruefung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'ZGV noch in Prüfung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'ZGV still in review',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',
'phrase' => 'zgvAkzeptiert',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Dokumente akzeptiert',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'accepted documents',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',
'phrase' => 'zgvAbgelehnt',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Dokumente abgelehnt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'rejected documents',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'infocenter',
'category' => 'infocenter',