mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Merge branch 'master' into feature-16354/TinyMCE_move_to_new_version
This commit is contained in:
@@ -120,11 +120,18 @@ $config['navigation_header'] = array(
|
||||
'sort' => 30,
|
||||
'requiredPermissions' => 'system/issues_verwalten:r'
|
||||
),
|
||||
'plausichecks' => array(
|
||||
'link' => site_url('system/issues/Plausichecks'),
|
||||
'description' => 'Plausichecks',
|
||||
'expand' => true,
|
||||
'sort' => 40,
|
||||
'requiredPermissions' => 'system/issues_verwalten:r'
|
||||
),
|
||||
'gruppenmanagement' => array(
|
||||
'link' => site_url('person/Gruppenmanagement'),
|
||||
'description' => 'Gruppenmanagement',
|
||||
'expand' => true,
|
||||
'sort' => 40,
|
||||
'sort' => 50,
|
||||
'requiredPermissions' => 'lehre/gruppenmanager:r'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -22,7 +22,32 @@ class IssueResolver extends IssueResolver_Controller
|
||||
'CORE_INOUT_0003' => 'CORE_INOUT_0003',
|
||||
'CORE_INOUT_0004' => 'CORE_INOUT_0004',
|
||||
'CORE_INOUT_0005' => 'CORE_INOUT_0005',
|
||||
'CORE_INOUT_0006' => 'CORE_INOUT_0006'
|
||||
'CORE_INOUT_0006' => 'CORE_INOUT_0006',
|
||||
'CORE_INOUT_0007' => 'CORE_INOUT_0007',
|
||||
'CORE_INOUT_0008' => 'CORE_INOUT_0008',
|
||||
'CORE_INOUT_0009' => 'CORE_INOUT_0009',
|
||||
'CORE_STG_0001' => 'CORE_STG_0001',
|
||||
'CORE_STG_0002' => 'CORE_STG_0002',
|
||||
'CORE_STG_0003' => 'CORE_STG_0003',
|
||||
'CORE_STG_0004' => 'CORE_STG_0004',
|
||||
'CORE_STUDENTSTATUS_0001' => 'CORE_STUDENTSTATUS_0001',
|
||||
'CORE_STUDENTSTATUS_0002' => 'CORE_STUDENTSTATUS_0002',
|
||||
'CORE_STUDENTSTATUS_0003' => 'CORE_STUDENTSTATUS_0003',
|
||||
'CORE_STUDENTSTATUS_0004' => 'CORE_STUDENTSTATUS_0004',
|
||||
'CORE_STUDENTSTATUS_0005' => 'CORE_STUDENTSTATUS_0005',
|
||||
'CORE_STUDENTSTATUS_0006' => 'CORE_STUDENTSTATUS_0006',
|
||||
'CORE_STUDENTSTATUS_0007' => 'CORE_STUDENTSTATUS_0007',
|
||||
'CORE_STUDENTSTATUS_0008' => 'CORE_STUDENTSTATUS_0008',
|
||||
'CORE_STUDENTSTATUS_0009' => 'CORE_STUDENTSTATUS_0009',
|
||||
'CORE_STUDENTSTATUS_0010' => 'CORE_STUDENTSTATUS_0010',
|
||||
'CORE_STUDENTSTATUS_0011' => 'CORE_STUDENTSTATUS_0011',
|
||||
'CORE_STUDENTSTATUS_0012' => 'CORE_STUDENTSTATUS_0012',
|
||||
'CORE_STUDENTSTATUS_0013' => 'CORE_STUDENTSTATUS_0013',
|
||||
'CORE_STUDENTSTATUS_0014' => 'CORE_STUDENTSTATUS_0014',
|
||||
'CORE_PERSON_0001' => 'CORE_PERSON_0001',
|
||||
'CORE_PERSON_0002' => 'CORE_PERSON_0002',
|
||||
'CORE_PERSON_0003' => 'CORE_PERSON_0003',
|
||||
'CORE_PERSON_0004' => 'CORE_PERSON_0004'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Job for producing Plausicheck issues
|
||||
*/
|
||||
class PlausiIssueProducer extends JOB_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->load->library('issues/PlausicheckProducerLib');
|
||||
$this->load->library('IssuesLib');
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs issue production job.
|
||||
* @param studiensemester_kurzbz string job is run for students of a certain semester.
|
||||
* @param studiengang_kz int job is run for students of certain Studiengang.
|
||||
*/
|
||||
public function run($studiensemester_kurzbz = null, $studiengang_kz = null)
|
||||
{
|
||||
$fehlerKurzbz = $this->plausicheckproducerlib->getFehlerKurzbz();
|
||||
|
||||
$this->logInfo("Plausicheck issue producer job started");
|
||||
|
||||
// get the data returned by Plausicheck
|
||||
foreach ($fehlerKurzbz as $fehler_kurzbz)
|
||||
{
|
||||
// execute the check
|
||||
$this->logInfo("Checking " . $fehler_kurzbz . "...");
|
||||
$plausicheckRes = $this->plausicheckproducerlib->producePlausicheckIssue($fehler_kurzbz, $studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($plausicheckRes)) $this->logError(getError($plausicheckRes));
|
||||
|
||||
if (hasData($plausicheckRes))
|
||||
{
|
||||
$plausicheckData = getData($plausicheckRes);
|
||||
|
||||
foreach ($plausicheckData as $plausiData)
|
||||
{
|
||||
// get the data needed for issue production
|
||||
$person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null;
|
||||
$oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null;
|
||||
$fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null;
|
||||
$resolution_params = isset($plausiData['resolution_params']) ? $plausiData['resolution_params'] : null;
|
||||
|
||||
// write the issue
|
||||
$addIssueRes = $this->issueslib->addFhcIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params);
|
||||
|
||||
// log if error, or log info if inserted new issue
|
||||
if (isError($addIssueRes))
|
||||
$this->logError(getError($addIssueRes));
|
||||
elseif (hasData($addIssueRes) && is_integer(getData($addIssueRes)))
|
||||
$this->logInfo("Plausicheck issue " . $fehler_kurzbz . " successfully produced, person_id: " . $person_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->logInfo("Plausicheck issue producer job stopped");
|
||||
}
|
||||
}
|
||||
@@ -121,6 +121,7 @@ class InfoCenter extends Auth_Controller
|
||||
'unlockPerson' => 'infocenter:rw',
|
||||
'saveFormalGeprueft' => 'infocenter:rw',
|
||||
'saveDocTyp' => 'infocenter:rw',
|
||||
'updateStammdaten' => 'infocenter:rw',
|
||||
'saveNachreichung' => 'infocenter:rw',
|
||||
'getPrestudentData' => 'infocenter:r',
|
||||
'getLastPrestudentWithZgvJson' => 'infocenter:r',
|
||||
@@ -172,11 +173,16 @@ class InfoCenter extends Auth_Controller
|
||||
$this->load->model('codex/Zgv_model', 'ZgvModel');
|
||||
$this->load->model('codex/Zgvmaster_model', 'ZgvmasterModel');
|
||||
$this->load->model('codex/Nation_model', 'NationModel');
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
$this->load->model('person/Geschlecht_model', 'GeschlechtModel');
|
||||
$this->load->model('person/adresse_model', 'AdresseModel');
|
||||
|
||||
// Loads libraries
|
||||
$this->load->library('PersonLogLib');
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
$this->load->config('infocenter');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
@@ -1111,14 +1117,14 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
public function reloadDoks($person_id)
|
||||
{
|
||||
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true);
|
||||
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true, false);
|
||||
|
||||
$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);
|
||||
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false, false);
|
||||
|
||||
$this->DokumentModel->addOrder('bezeichnung');
|
||||
$dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load())));
|
||||
@@ -1320,6 +1326,126 @@ class InfoCenter extends Auth_Controller
|
||||
$this->outputJsonSuccess('success');
|
||||
}
|
||||
|
||||
public function updateStammdaten()
|
||||
{
|
||||
if (isEmptyString($this->input->post('nachname')) ||
|
||||
isEmptyString($this->input->post('geschlecht')) ||
|
||||
isEmptyString($this->input->post('gebdatum')))
|
||||
{
|
||||
$this->terminateWithJsonError($this->p->t('infocenter', 'stammdatenFeldFehlt'));
|
||||
}
|
||||
|
||||
$datum = explode('.', $this->input->post('gebdatum'));
|
||||
|
||||
if (!checkdate($datum[1], $datum[0], $datum[2]))
|
||||
{
|
||||
$this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig'));
|
||||
}
|
||||
|
||||
$person_id = $this->input->post('personid');
|
||||
|
||||
$update = $this->PersonModel->update(
|
||||
array
|
||||
(
|
||||
'person_id' => $person_id
|
||||
),
|
||||
array
|
||||
(
|
||||
'titelpre' => isEmptyString($this->input->post('titelpre')) ? null : $this->input->post('titelpre'),
|
||||
'vorname' => isEmptyString($this->input->post('vorname')) ? null : $this->input->post('vorname'),
|
||||
'nachname' => $this->input->post('nachname'),
|
||||
'titelpost' => isEmptyString($this->input->post('titelpost')) ? null : $this->input->post('titelpost'),
|
||||
'gebdatum' => isEmptyString($this->input->post('gebdatum')) ? null : date("Y-m-d", strtotime($this->input->post('gebdatum'))),
|
||||
'svnr' => isEmptyString($this->input->post('svnr')) ? null : $this->input->post('svnr'),
|
||||
'staatsbuergerschaft' => isEmptyString($this->input->post('buergerschaft')) ? null : $this->input->post('buergerschaft'),
|
||||
'geschlecht' => $this->input->post('geschlecht'),
|
||||
'geburtsnation' => isEmptyString($this->input->post('gebnation')) ? null : $this->input->post('gebnation'),
|
||||
'gebort' => isEmptyString($this->input->post('gebort')) ? null : $this->input->post('gebort'),
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($update))
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
|
||||
|
||||
$kontakte = $this->input->post('kontakt');
|
||||
foreach ($kontakte as $kontakt)
|
||||
{
|
||||
$kontaktExists = $this->KontaktModel->loadWhere(array(
|
||||
'kontakt_id' => $kontakt['id'],
|
||||
'person_id' => $person_id,
|
||||
));
|
||||
|
||||
if (hasData($kontaktExists))
|
||||
{
|
||||
$kontaktExists = getData($kontaktExists)[0];
|
||||
|
||||
if ($kontaktExists->kontakt === $kontakt['value'])
|
||||
continue;
|
||||
|
||||
$update = $this->KontaktModel->update(
|
||||
array
|
||||
(
|
||||
'kontakt_id' => $kontakt['id']
|
||||
),
|
||||
array
|
||||
(
|
||||
'kontakt' => isEmptyString($kontakt['value']) ? null : $kontakt['value'],
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($update))
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
|
||||
}
|
||||
}
|
||||
|
||||
$adressen = $this->input->post('adresse');
|
||||
|
||||
foreach ($adressen as $adresse)
|
||||
{
|
||||
$adresseExists = $this->AdresseModel->loadWhere(array(
|
||||
'adresse_id' => $adresse['id'],
|
||||
'person_id' => $person_id,
|
||||
));
|
||||
|
||||
if (hasData($adresseExists))
|
||||
{
|
||||
$adresse = $adresse['value'];
|
||||
$adresseExists = getData($adresseExists)[0];
|
||||
if ($adresseExists->strasse !== $adresse['strasse'] ||
|
||||
$adresseExists->plz !== $adresse['plz'] ||
|
||||
$adresseExists->ort !== $adresse['ort'] ||
|
||||
$adresseExists->nation !== $adresse['nation'])
|
||||
{
|
||||
$update = $this->AdresseModel->update(
|
||||
array
|
||||
(
|
||||
'adresse_id' => $adresseExists->adresse_id
|
||||
),
|
||||
array
|
||||
(
|
||||
'strasse' => isEmptyString($adresse['strasse']) ? null : $adresse['strasse'],
|
||||
'plz' => isEmptyString($adresse['plz']) ? null : $adresse['plz'],
|
||||
'ort' => isEmptyString($adresse['ort']) ? null : $adresse['ort'],
|
||||
'nation' => isEmptyString($adresse['nation']) ? null : $adresse['nation'],
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($update))
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess('Success');
|
||||
}
|
||||
|
||||
public function saveNachreichung($person_id)
|
||||
{
|
||||
$nachreichungAm = $this->input->post('nachreichungAm');
|
||||
@@ -1794,14 +1920,14 @@ class InfoCenter extends Auth_Controller
|
||||
if (!isset($stammdaten->retval))
|
||||
return null;
|
||||
|
||||
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false);
|
||||
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false, false);
|
||||
|
||||
if (isError($dokumente))
|
||||
{
|
||||
show_error(getError($dokumente));
|
||||
}
|
||||
|
||||
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true);
|
||||
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true, false);
|
||||
|
||||
if (isError($dokumente_nachgereicht))
|
||||
{
|
||||
@@ -1996,6 +2122,12 @@ class InfoCenter extends Auth_Controller
|
||||
$this->NationModel->addOrder('langtext');
|
||||
$allNations = getData($this->NationModel->load());
|
||||
|
||||
|
||||
$additional_stg = explode(',', ($this->config->item('infocenter_studiengang_kz')));
|
||||
|
||||
$this->GeschlechtModel->addOrder('sort');
|
||||
$allGenders = getData($this->GeschlechtModel->load());
|
||||
|
||||
$data = array (
|
||||
'zgvpruefungen' => $zgvpruefungen,
|
||||
'abwstatusgruende' => $abwstatusgruende,
|
||||
@@ -2004,6 +2136,8 @@ class InfoCenter extends Auth_Controller
|
||||
'all_zgvs' => $allZGVs,
|
||||
'all_zgvs_master' => $allZGVsMaster,
|
||||
'all_nations' => $allNations,
|
||||
'additional_stg' => $additional_stg,
|
||||
'all_genders' => $allGenders
|
||||
);
|
||||
|
||||
return $data;
|
||||
@@ -2164,8 +2298,8 @@ class InfoCenter extends Auth_Controller
|
||||
$prestudentstatus = $prestudent->prestudentstatus;
|
||||
$person_id = $prestudent->person_id;
|
||||
$person = $this->PersonModel->getPersonStammdaten($person_id, true)->retval;
|
||||
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false)->retval;
|
||||
$dokumenteNachzureichen = $this->AkteModel->getAktenWithDokInfo($person_id, null, true)->retval;
|
||||
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false, false)->retval;
|
||||
$dokumenteNachzureichen = $this->AkteModel->getAktenWithDokInfo($person_id, null, true, false)->retval;
|
||||
|
||||
//fill mail variables
|
||||
$interessentbez = $person->geschlecht == 'm' ? 'Ein Interessent' : 'Eine Interessentin';
|
||||
@@ -2262,12 +2396,10 @@ 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']);
|
||||
$stg_typ = $this->getStudienArtBerechtigung(['b', 'm']);
|
||||
|
||||
if (hasData($stg_typ))
|
||||
if (!is_null($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);
|
||||
@@ -2283,15 +2415,16 @@ class InfoCenter extends Auth_Controller
|
||||
$this->outputJsonSuccess(null);
|
||||
}
|
||||
|
||||
public function getStudienArtBerechtigung()
|
||||
public function getStudienArtBerechtigung($typ = null)
|
||||
{
|
||||
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
|
||||
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm', 'l']);
|
||||
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, $typ);
|
||||
return getData($stg_typ);
|
||||
}
|
||||
|
||||
public function getStudienartData()
|
||||
{
|
||||
$this->outputJsonSuccess($this->getStudienArtBerechtigung());
|
||||
$this->outputJsonSuccess($this->getStudienArtBerechtigung(['b', 'm', 'l']));
|
||||
}
|
||||
|
||||
public function saveAbsageForAll()
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Plausichecks extends Auth_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => array('system/issues_verwalten:r'),
|
||||
'runChecks' => array('system/issues_verwalten:r')
|
||||
)
|
||||
);
|
||||
|
||||
// Load libraries
|
||||
$this->load->library('issues/PlausicheckProducerLib');
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
// Load models
|
||||
$this->load->model('system/Fehler_model', 'FehlerModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
}
|
||||
|
||||
/*
|
||||
* Get data for filtering the plausichecks and load the view.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$filterData = $this->_getFilterData();
|
||||
$this->load->view('system/issues/plausichecks', $filterData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate plausichecks run.
|
||||
*/
|
||||
public function runChecks()
|
||||
{
|
||||
$studiensemester_kurzbz = $this->input->get('studiensemester_kurzbz');
|
||||
$studiengang_kz = $this->input->get('studiengang_kz');
|
||||
$fehler_kurzbz = $this->input->get('fehler_kurzbz');
|
||||
|
||||
// issues array for passing issue texts
|
||||
$issueTexts = array();
|
||||
// all fehler kurzbz which are going to be checked
|
||||
$fehlerKurzbz = !isEmptyString($fehler_kurzbz) ? array($fehler_kurzbz) : $this->plausicheckproducerlib->getFehlerKurzbz();
|
||||
// set Studiengang to null if not passed
|
||||
if (isEmptyString($studiengang_kz)) $studiengang_kz = null;
|
||||
|
||||
// get the data returned by Plausicheck
|
||||
foreach ($fehlerKurzbz as $fehler_kurzbz)
|
||||
{
|
||||
// execute the check
|
||||
$issueTexts[$fehler_kurzbz] = array();
|
||||
$plausicheckRes = $this->plausicheckproducerlib->producePlausicheckIssue($fehler_kurzbz, $studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($plausicheckRes)) $this->terminateWithJsonError(getError($plausicheckRes));
|
||||
|
||||
if (hasData($plausicheckRes))
|
||||
{
|
||||
$plausicheckData = getData($plausicheckRes);
|
||||
|
||||
foreach ($plausicheckData as $plausiData)
|
||||
{
|
||||
// get the data needed for issue production
|
||||
$person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null;
|
||||
$oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null;
|
||||
$fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null;
|
||||
$resolution_params = isset($plausiData['resolution_params']) ? $plausiData['resolution_params'] : null;
|
||||
|
||||
// get Text of the Fehler
|
||||
$this->FehlerModel->addSelect('fehlertext');
|
||||
$fehlerRes = $this->FehlerModel->loadWhere(array('fehler_kurzbz' => $fehler_kurzbz));
|
||||
|
||||
if (isError($fehlerRes)) $this->outputJsonError(getError($fehlerRes));
|
||||
|
||||
// optionally replace fehler parameters in text, output the fehlertext
|
||||
if (hasData($fehlerRes))
|
||||
{
|
||||
$fehlerText = getData($fehlerRes)[0]->fehlertext;
|
||||
|
||||
if (!isEmptyArray($fehlertext_params))
|
||||
{
|
||||
if (count($fehlertext_params) != substr_count($fehlerText, '%s'))
|
||||
$this->terminateWithJsonError('Wrong number of parameters for Fehlertext, fehler_kurzbz ' . $fehler_kurzbz);
|
||||
|
||||
$fehlerText = vsprintf($fehlerText, $fehlertext_params);
|
||||
}
|
||||
|
||||
if (isset($person_id)) $fehlerText .= "; person_id: $person_id";
|
||||
if (isset($oe_kurzbz)) $fehlerText .= "; oe_kurzbz: $oe_kurzbz";
|
||||
$issueTexts[$fehler_kurzbz][] = $fehlerText;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess($issueTexts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data needed for filtering for limiting checks.
|
||||
*/
|
||||
private function _getFilterData()
|
||||
{
|
||||
$this->StudiensemesterModel->addOrder('start', 'DESC');
|
||||
$studiensemesterRes = $this->StudiensemesterModel->load();
|
||||
|
||||
if (isError($studiensemesterRes)) show_error(getError($studiensemesterRes));
|
||||
|
||||
$currSemRes = $this->StudiensemesterModel->getAkt();
|
||||
|
||||
if (isError($currSemRes)) show_error(getError($currSemRes));
|
||||
|
||||
$this->StudiengangModel->addSelect('studiengang_kz, tbl_studiengang.bezeichnung, tbl_studiengang.typ,
|
||||
tbl_studiengangstyp.bezeichnung AS typbezeichnung, UPPER(tbl_studiengang.typ::varchar(1) || tbl_studiengang.kurzbz) as kuerzel');
|
||||
$this->StudiengangModel->addJoin('public.tbl_studiengangstyp', 'typ');
|
||||
$this->StudiengangModel->addOrder('kuerzel, tbl_studiengang.bezeichnung, studiengang_kz');
|
||||
$studiengaengeRes = $this->StudiengangModel->loadWhere(array('aktiv' => true));
|
||||
|
||||
if (isError($studiengaengeRes)) show_error(getError($studiengaengeRes));
|
||||
|
||||
$fehlerKurzbz = $this->plausicheckproducerlib->getFehlerKurzbz();
|
||||
|
||||
return array(
|
||||
'semester' => hasData($studiensemesterRes) ? getData($studiensemesterRes) : array(),
|
||||
'currsemester' => hasData($currSemRes) ? getData($currSemRes) : array(),
|
||||
'studiengaenge' => hasData($studiengaengeRes) ? getData($studiengaengeRes) : array(),
|
||||
'fehler' => $fehlerKurzbz
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Interface defining method to implement for issue producer (from core and extensions)
|
||||
*/
|
||||
interface IIssueExistsChecker
|
||||
{
|
||||
/**
|
||||
* Checks if an issue exists.
|
||||
* @param array $params parameters needed for issue detection
|
||||
* @return object with success(true) if issue exists, success(false) otherwise
|
||||
*/
|
||||
public function checkIfIssueExists($paramsForChecking);
|
||||
|
||||
/**
|
||||
* Produces an issue.
|
||||
* @param array $params parameters needed for issue detection
|
||||
* @return object with success(true) if issue exists, success(false) otherwise
|
||||
*/
|
||||
//public function produceIssue($person_id, $oe_kurzbz, $paramsForProducing);
|
||||
}
|
||||
@@ -5,7 +5,8 @@
|
||||
*/
|
||||
abstract class IssueResolver_Controller extends JOB_Controller
|
||||
{
|
||||
const ISSUES_FOLDER = 'issues';
|
||||
const CI_PATH = 'application';
|
||||
const ISSUE_RESOLVERS_FOLDER = 'issues/resolvers';
|
||||
const CHECK_ISSUE_RESOLVED_METHOD_NAME = 'checkIfIssueIsResolved';
|
||||
|
||||
protected $_codeLibMappings;
|
||||
@@ -43,71 +44,68 @@ abstract class IssueResolver_Controller extends JOB_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$openIssues = getData($openIssuesRes);
|
||||
|
||||
foreach ($openIssues as $issue)
|
||||
{
|
||||
if (isset($this->_codeLibMappings[$issue->fehlercode]))
|
||||
// ignore if Fehlercode is not in libmappings (shouldn't be checked)
|
||||
if (!isset($this->_codeLibMappings[$issue->fehlercode])) continue;
|
||||
|
||||
$libName = $this->_codeLibMappings[$issue->fehlercode];
|
||||
|
||||
// add person id and oe kurzbz automatically as params, merge it with additional params
|
||||
// decode bewerbung_parameter into assoc array
|
||||
$params = array_merge(
|
||||
array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz),
|
||||
isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array()
|
||||
);
|
||||
|
||||
// if called from extension (extension name set), path includes extension names, otherwise it is the core library folder
|
||||
$libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : '';
|
||||
$issuesLibPath = $libRootPath . self::ISSUE_RESOLVERS_FOLDER . '/';
|
||||
$issuesLibFilePath = DOC_ROOT . self::CI_PATH . '/' . $libRootPath . 'libraries/' . self::ISSUE_RESOLVERS_FOLDER . '/' . $libName . '.php';
|
||||
|
||||
// check if library file exists
|
||||
if (!file_exists($issuesLibFilePath))
|
||||
{
|
||||
$libName = $this->_codeLibMappings[$issue->fehlercode];
|
||||
// log error and continue with next issue if not
|
||||
$this->logError("Issue library file " . $issuesLibFilePath . " does not exist");
|
||||
continue;
|
||||
}
|
||||
|
||||
// add person id and oe kurzbz automatically as params, merge it with additional params
|
||||
// decode bewerbung_parameter into assoc array
|
||||
$params = array_merge(
|
||||
array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz),
|
||||
isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array()
|
||||
);
|
||||
// load library connected to fehlercode
|
||||
$this->load->library($issuesLibPath . $libName);
|
||||
|
||||
// if called from extension (extension name set), path includes extension names, otherwise it is the core library folder
|
||||
$libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : '';
|
||||
$issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/';
|
||||
$issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php';
|
||||
$lowercaseLibName = mb_strtolower($libName);
|
||||
|
||||
// check if library file exists
|
||||
if (!file_exists($issuesLibFilePath))
|
||||
// check if method is defined in library class
|
||||
if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_RESOLVED_METHOD_NAME)))
|
||||
{
|
||||
// log error and continue with next issue if not
|
||||
$this->logError("Method " . self::CHECK_ISSUE_RESOLVED_METHOD_NAME . " is not defined in library $lowercaseLibName");
|
||||
continue;
|
||||
}
|
||||
|
||||
// call the function for checking for issue resolution
|
||||
$issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_RESOLVED_METHOD_NAME}($params);
|
||||
|
||||
if (isError($issueResolvedRes))
|
||||
{
|
||||
$this->logError(getError($issueResolvedRes));
|
||||
}
|
||||
else
|
||||
{
|
||||
$issueResolvedData = getData($issueResolvedRes);
|
||||
|
||||
if ($issueResolvedData === true)
|
||||
{
|
||||
// log error and continue with next issue if not
|
||||
$this->logError("Issue library file " . $issuesLibFilePath . " does not exist");
|
||||
continue;
|
||||
}
|
||||
// set issue to resolved if needed
|
||||
$behobenRes = $this->issueslib->setBehoben($issue->issue_id, null);
|
||||
|
||||
// load library connected to fehlercode
|
||||
$this->load->library(
|
||||
$issuesLibPath . $libName
|
||||
);
|
||||
|
||||
$lowercaseLibName = mb_strtolower($libName);
|
||||
|
||||
// check if method is defined in libary class
|
||||
if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_RESOLVED_METHOD_NAME)))
|
||||
{
|
||||
// log error and continue with next issue if not
|
||||
$this->logError("Method " . self::CHECK_ISSUE_RESOLVED_METHOD_NAME . " is not defined in library $lowercaseLibName");
|
||||
continue;
|
||||
}
|
||||
|
||||
// call the function for checking for issue resolution
|
||||
$issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_RESOLVED_METHOD_NAME}($params);
|
||||
|
||||
if (isError($issueResolvedRes))
|
||||
{
|
||||
$this->logError(getError($issueResolvedRes));
|
||||
}
|
||||
else
|
||||
{
|
||||
$issueResolvedData = getData($issueResolvedRes);
|
||||
|
||||
if ($issueResolvedData === true)
|
||||
{
|
||||
// set issue to resolved if needed
|
||||
$behobenRes = $this->issueslib->setBehoben($issue->issue_id, null);
|
||||
|
||||
if (isError($behobenRes))
|
||||
$this->logError(getError($behobenRes));
|
||||
else
|
||||
$this->logInfo("Issue " . $issue->issue_id . " successfully resolved");
|
||||
}
|
||||
if (isError($behobenRes))
|
||||
$this->logError(getError($behobenRes));
|
||||
else
|
||||
$this->logInfo("Issue " . $issue->issue_id . " successfully resolved");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
<?php
|
||||
/* Copyright (C) 2022 fhcomplete.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../../vendor/nategood/httpful/bootstrap.php');
|
||||
|
||||
use \ZipArchive as ZipArchive;
|
||||
|
||||
/**
|
||||
* Simple client to convert documents using Docsbox
|
||||
*/
|
||||
class DocsboxLib
|
||||
{
|
||||
const ERROR = 1;
|
||||
const SUCCESS = 0;
|
||||
const STATUS_FINISHED = 'finished'; // Docsbox status when a document conversion ended
|
||||
const STATUS_QUEUED = 'queued'; // Docsbox status when a file has been queued for the conversion
|
||||
const STATUS_STARTED = 'started'; // Docsbox status when a file has started being worked
|
||||
const STATUS_WORKING = 'working'; // Docsbox status when a file is being converted
|
||||
const OUTPUT_FILENAME = 'out.zip.pdf'; // File name used by docsbox to save a converted document
|
||||
|
||||
const DEFAULT_FORMAT = 'pdf'; // Default supported format
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
// Public static methods
|
||||
|
||||
/**
|
||||
* Static method used to convert a document using a Docsbox installation (local/remote) over the network
|
||||
* It return 0 on success and any other integer on error
|
||||
* NOTE: currently format is not supported
|
||||
*/
|
||||
public static function convert($inputFileName, $outputFileName, $format)
|
||||
{
|
||||
// If a format has not been given
|
||||
if (($format == null) || ($format != null && ctype_space($format) === true)) $format = self::DEFAULT_FORMAT;
|
||||
|
||||
// Posts the file to docsbox
|
||||
$queueId = self::_postFile($inputFileName);
|
||||
// If an error occurred
|
||||
if ($queueId == null) return self::ERROR;
|
||||
|
||||
// Checks and waits if the file has been converted
|
||||
$resultUrl = self::_checkConvertion($queueId);
|
||||
// If an error occurred
|
||||
if ($resultUrl == null) return self::ERROR;
|
||||
|
||||
// Download and rename the converted file
|
||||
$downloaded = self::_downloadFile($resultUrl, $outputFileName);
|
||||
// If an error occurred
|
||||
if (!$downloaded) return self::ERROR;
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
// Private static methods
|
||||
|
||||
/**
|
||||
* Posts the given file to a Docsboxserver and checks the response to return a valid queue id
|
||||
* On failure it returns a null value
|
||||
*/
|
||||
private static function _postFile($inputFileName)
|
||||
{
|
||||
$queueId = null;
|
||||
|
||||
try
|
||||
{
|
||||
// Posts the given file and expects a response in JSON format
|
||||
$postFileResponse = \Httpful\Request::post(DOCSBOX_SERVER.DOCSBOX_PATH_API)
|
||||
->attach(array('file' => $inputFileName))
|
||||
->expectsJson()
|
||||
->send();
|
||||
|
||||
// Checks that:
|
||||
// - the response is not empty
|
||||
// - the reponse body has the property id
|
||||
// - the property id is a valid string
|
||||
// - the reponse body has the property status
|
||||
// - docsbox queued the conversion of the posted file
|
||||
if (is_object($postFileResponse)
|
||||
&& isset($postFileResponse->body)
|
||||
&& isset($postFileResponse->body->id)
|
||||
&& $postFileResponse->body->id != '' && $postFileResponse->body->id != null
|
||||
&& isset($postFileResponse->body->status)
|
||||
&& $postFileResponse->body->status == self::STATUS_QUEUED)
|
||||
{
|
||||
$queueId = $postFileResponse->body->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If docsbox refused to convert the posted file
|
||||
if (isset($postFileResponse->body->status)
|
||||
&& $postFileResponse->body->status != self::STATUS_QUEUED)
|
||||
{
|
||||
error_log(
|
||||
'Docsbox did not queue the posted file. Returned status: '.
|
||||
$postFileResponse->body->status
|
||||
);
|
||||
}
|
||||
else // any other generic error
|
||||
{
|
||||
error_log(
|
||||
'An error occurred while posting to docsbox. Response: '.
|
||||
print_r($postFileResponse, 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception
|
||||
{
|
||||
error_log($cee->getMessage());
|
||||
}
|
||||
catch (Exception $e) // any other exception
|
||||
{
|
||||
error_log($e->getMessage());
|
||||
}
|
||||
|
||||
return $queueId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the status of the file convertion identified by the given queue element id
|
||||
* A URL is returned with the path where it is possible to download the converted file
|
||||
* If an error occurred then a null value is returned
|
||||
*/
|
||||
private static function _checkConvertion($queueId)
|
||||
{
|
||||
$resultUrl = null;
|
||||
$startConvertionsTime = time(); // time when the file conversion has started
|
||||
|
||||
// Until a timeout has occurred
|
||||
while (time() - $startConvertionsTime <= DOCSBOX_CONVERSION_TIMEOUT)
|
||||
{
|
||||
sleep(DOCSBOX_WAITING_SLEEP_TIME); // takes a nap on every round
|
||||
|
||||
try
|
||||
{
|
||||
// Calls the docsbox server to check the status of the
|
||||
// file conversion using the provided queue id
|
||||
// it expects a response in JSON format
|
||||
$getStatusResponse = \Httpful\Request::get(DOCSBOX_SERVER.DOCSBOX_PATH_API.$queueId)
|
||||
->expectsJson()
|
||||
->send();
|
||||
|
||||
// Checks that:
|
||||
// - the response is not empty
|
||||
// - the reponse body has the property id
|
||||
// - the property id is a valid string
|
||||
// - the reponse body has the property status
|
||||
// - docsbox is working the conversion of the posted file
|
||||
if (is_object($getStatusResponse)
|
||||
&& isset($getStatusResponse->body->id)
|
||||
&& $getStatusResponse->body->id != '' && $getStatusResponse->body->id != null
|
||||
&& isset($getStatusResponse->body->status))
|
||||
{
|
||||
// Checks that docsbox has finished working on the file conversion
|
||||
// and that there is a valid resultUrl property
|
||||
if ($getStatusResponse->body->status == self::STATUS_FINISHED
|
||||
&& isset($getStatusResponse->body->result_url)
|
||||
&& $getStatusResponse->body->result_url != ''
|
||||
&& $getStatusResponse->body->result_url != null)
|
||||
{
|
||||
$resultUrl = $getStatusResponse->body->result_url;
|
||||
break;
|
||||
}
|
||||
// Just started or still working on it
|
||||
elseif ($getStatusResponse->body->status == self::STATUS_WORKING
|
||||
|| $getStatusResponse->body->status == self::STATUS_STARTED)
|
||||
{
|
||||
// go on!
|
||||
}
|
||||
else // any other status is abnormal
|
||||
{
|
||||
error_log(
|
||||
'Not valid status for queue element: '.$queueId.'. Response: '.
|
||||
print_r($getStatusResponse, 1)
|
||||
);
|
||||
break; // interrupt the loop on error
|
||||
}
|
||||
}
|
||||
else // if the response from the docsbox server is not valid
|
||||
{
|
||||
error_log(
|
||||
'An error occurred while checking the docsbox activity. Response: '.
|
||||
print_r($getStatusResponse, 1)
|
||||
);
|
||||
break; // interrupt the loop on error
|
||||
}
|
||||
}
|
||||
catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception
|
||||
{
|
||||
error_log($cee->getMessage());
|
||||
break; // interrupt the loop on error
|
||||
}
|
||||
catch (Exception $e) // any other exception
|
||||
{
|
||||
error_log($e->getMessage());
|
||||
break; // interrupt the loop on error
|
||||
}
|
||||
}
|
||||
|
||||
return $resultUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Download the converted file using the provided URL, unzip it, and renames it into the provided file name
|
||||
*/
|
||||
private static function _downloadFile($resultUrl, $outputFileName)
|
||||
{
|
||||
$downloaded = false; // pessimistic assumption
|
||||
|
||||
try
|
||||
{
|
||||
// Download the file
|
||||
$getFileResponse = \Httpful\Request::get(DOCSBOX_SERVER.$resultUrl)->send();
|
||||
|
||||
// If the downloaded file content is valid and not empty
|
||||
if (isset($getFileResponse->body)
|
||||
&& $getFileResponse->body != null
|
||||
&& $getFileResponse->body != '')
|
||||
{
|
||||
// Output directory where to unzip the downloaded zip file
|
||||
$outputDirectory = dirname($outputFileName);
|
||||
// The path and name of the downloaded zip file
|
||||
$temporaryDownloadedZip = sys_get_temp_dir().'/'.basename($resultUrl);
|
||||
|
||||
// Write the file content into a temporary directory and file
|
||||
if (file_put_contents($temporaryDownloadedZip, $getFileResponse->body) != false)
|
||||
{
|
||||
$zipArchive = new ZipArchive;
|
||||
|
||||
// Open and extract the dowloaded zip file into the directory of the output file
|
||||
if ($zipArchive->open($temporaryDownloadedZip) === true
|
||||
&& $zipArchive->extractTo($outputDirectory) === true
|
||||
&& $zipArchive->close() === true)
|
||||
{
|
||||
// Opened, extracted and closed!
|
||||
|
||||
// Rename the extracted file to the given output file name
|
||||
if (rename($outputDirectory.'/'.self::OUTPUT_FILENAME, $outputFileName))
|
||||
{
|
||||
$downloaded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
error_log(
|
||||
'An error occurred while renaming the extracted file: '.
|
||||
$outputDirectory.'/'.self::OUTPUT_FILENAME.' into: '.
|
||||
$outputFileName
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error_log(
|
||||
'An error occurred while working the dowloaded zip file: '.
|
||||
$temporaryDownloadedZip
|
||||
);
|
||||
}
|
||||
}
|
||||
else // if an error occurred while writing
|
||||
{
|
||||
error_log(
|
||||
'An error occurred while writing the file content to: '.
|
||||
$temporaryDownloadedZip
|
||||
);
|
||||
}
|
||||
}
|
||||
else // if the downloaded file is not valid
|
||||
{
|
||||
error_log(
|
||||
'An error occurred while downloading the file from the docsbox server: '.
|
||||
print_r($getFileResponse, 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
catch(\Httpful\Exception\ConnectionErrorException $cee)
|
||||
{
|
||||
error_log($cee->getMessage());
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
error_log($e->getMessage());
|
||||
}
|
||||
|
||||
return $downloaded;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,20 +14,28 @@ class DocumentLib
|
||||
// Gets CI instance
|
||||
$this->ci =& get_instance();
|
||||
|
||||
exec('unoconv --version', $ret_arr);
|
||||
|
||||
if(isset($ret_arr[0]))
|
||||
// Which document converter has to be used
|
||||
if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true)
|
||||
{
|
||||
$hlp = explode(' ', $ret_arr[0]);
|
||||
if(isset($hlp[1]))
|
||||
{
|
||||
$this->unoconv_version = $hlp[1];
|
||||
}
|
||||
else
|
||||
show_error('Could not get Unoconv Version');
|
||||
// Use docsbox!!
|
||||
}
|
||||
else
|
||||
show_error('Unoconv not found - Please install Unoconv');
|
||||
{
|
||||
exec('unoconv --version', $ret_arr);
|
||||
|
||||
if(isset($ret_arr[0]))
|
||||
{
|
||||
$hlp = explode(' ', $ret_arr[0]);
|
||||
if(isset($hlp[1]))
|
||||
{
|
||||
$this->unoconv_version = $hlp[1];
|
||||
}
|
||||
else
|
||||
show_error('Could not get Unoconv Version');
|
||||
}
|
||||
else
|
||||
show_error('Unoconv not found - Please install Unoconv');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,9 +65,16 @@ class DocumentLib
|
||||
case 'application/vnd.ms-word':
|
||||
case 'application/vnd.oasis.opendocument.text':
|
||||
case 'text/plain':
|
||||
// Unoconv Version 0.6 seems to fail on converting TXT Files
|
||||
if ($this->unoconv_version == '0.6')
|
||||
return error();
|
||||
if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true)
|
||||
{
|
||||
// Use docsbox
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unoconv Version 0.6 seems to fail on converting TXT Files
|
||||
if ($this->unoconv_version == '0.6')
|
||||
return error();
|
||||
}
|
||||
|
||||
$ret = $this->convert($filename, $outFile, 'pdf');
|
||||
if(isSuccess($ret))
|
||||
@@ -105,6 +120,7 @@ class DocumentLib
|
||||
|
||||
finfo_close($finfo);
|
||||
|
||||
$out = null;
|
||||
exec($cmd, $out, $ret);
|
||||
if ($ret != 0)
|
||||
{
|
||||
@@ -123,13 +139,26 @@ class DocumentLib
|
||||
*/
|
||||
public function convert($inFile, $outFile, $format)
|
||||
{
|
||||
if ($this->unoconv_version == '0.6')
|
||||
$command = 'unoconv -f %1$s %3$s > %2$s';
|
||||
else
|
||||
$command = 'unoconv -f %s --output %s %s 2>&1';
|
||||
$command = sprintf($command, $format, $outFile, $inFile);
|
||||
$ret = 0;
|
||||
|
||||
exec($command, $out, $ret);
|
||||
// If it is set to use docsbox
|
||||
if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true)
|
||||
{
|
||||
require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php');
|
||||
|
||||
$ret = DocsboxLib::convert($inFile, $outFile, $format);
|
||||
}
|
||||
else // otherwise use unoconv
|
||||
{
|
||||
if ($this->unoconv_version == '0.6')
|
||||
$command = 'unoconv -f %1$s %3$s > %2$s';
|
||||
else
|
||||
$command = 'unoconv -f %s --output %s %s 2>&1';
|
||||
$command = sprintf($command, $format, $outFile, $inFile);
|
||||
|
||||
$out = null;
|
||||
exec($command, $out, $ret);
|
||||
}
|
||||
|
||||
if ($ret != 0)
|
||||
{
|
||||
@@ -191,6 +220,7 @@ class DocumentLib
|
||||
$cmd .= '/countspaces { [ exch { dup 32 ne { pop } if } forall ] length } bind def >> ';
|
||||
$cmd .= 'setpagedevice viewJPEG"';
|
||||
|
||||
$out = null;
|
||||
exec($cmd, $out, $ret);
|
||||
if ($ret != 0)
|
||||
{
|
||||
|
||||
@@ -169,6 +169,9 @@ class IssuesLib
|
||||
return $this->_changeIssueStatus($issue_id, $data, $user);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Changes status of an issue.
|
||||
* @param int $issue_id
|
||||
@@ -215,8 +218,15 @@ class IssuesLib
|
||||
* @param string $inhalt_extern
|
||||
* @return object success or error
|
||||
*/
|
||||
private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null, $fehlercode_extern = null, $inhalt_extern = null)
|
||||
{
|
||||
private function _addIssue(
|
||||
$fehlercode,
|
||||
$person_id = null,
|
||||
$oe_kurzbz = null,
|
||||
$fehlertext_params = null,
|
||||
$resolution_params = null,
|
||||
$fehlercode_extern = null,
|
||||
$inhalt_extern = null
|
||||
) {
|
||||
if (isEmptyString($person_id) && isEmptyString($oe_kurzbz))
|
||||
return error("Person_id or oe_kurzbz must be set.");
|
||||
|
||||
@@ -226,7 +236,15 @@ class IssuesLib
|
||||
if (hasData($fehlerRes))
|
||||
{
|
||||
$fehlertextVorlage = getData($fehlerRes)[0]->fehlertext;
|
||||
$fehlertext = isEmptyArray($fehlertext_params) ? $fehlertextVorlage : vsprintf($fehlertextVorlage, $fehlertext_params);
|
||||
|
||||
$fehlertext = $fehlertextVorlage;
|
||||
if (!isEmptyArray($fehlertext_params))
|
||||
{
|
||||
if (count($fehlertext_params) != substr_count($fehlertextVorlage, '%s'))
|
||||
return error('Wrong number of parameters for Fehlertext, fehler_kurzbz ' . $fehlercode);
|
||||
|
||||
$fehlertext = vsprintf($fehlertextVorlage, $fehlertext_params);
|
||||
}
|
||||
|
||||
$openIssuesCountRes = $this->_ci->IssueModel->getOpenIssueCount($fehlercode, $person_id, $oe_kurzbz, $fehlercode_extern);
|
||||
|
||||
@@ -252,6 +270,7 @@ class IssuesLib
|
||||
return error("Invalid parameters for resolution");
|
||||
}
|
||||
|
||||
// insert new issue
|
||||
return $this->_ci->IssueModel->insert(
|
||||
array(
|
||||
'fehlercode' => $fehlercode,
|
||||
@@ -267,8 +286,8 @@ class IssuesLib
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
return success($openIssueCount);
|
||||
else // return success if issue already exists
|
||||
return success("Issue already exists");
|
||||
}
|
||||
else
|
||||
return error("Number of open issues could not be determined");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class PlausicheckProducerLib
|
||||
{
|
||||
const CI_LIBRARY_PATH = 'application/libraries';
|
||||
const PLAUSI_ISSUES_FOLDER = 'issues/plausichecks';
|
||||
const EXECUTE_PLAUSI_CHECK_METHOD_NAME = 'executePlausiCheck';
|
||||
|
||||
private $_ci; // ci instance
|
||||
private $_currentStudiensemester; // current Studiensemester
|
||||
|
||||
// set fehler which can be produced by the job
|
||||
// structure: fehler_kurzbz => class (library) name for resolving
|
||||
private $_fehlerLibMappings = array(
|
||||
'AbbrecherAktiv' => 'AbbrecherAktiv',
|
||||
'AbschlussstatusFehlt' => 'AbschlussstatusFehlt',
|
||||
'AktSemesterNull' => 'AktSemesterNull',
|
||||
'AktiverStudentOhneStatus' => 'AktiverStudentOhneStatus',
|
||||
'AusbildungssemPrestudentUngleichAusbildungssemStatus' => 'AusbildungssemPrestudentUngleichAusbildungssemStatus',
|
||||
'BewerberNichtZumRtAngetreten' => 'BewerberNichtZumRtAngetreten',
|
||||
'DatumAbschlusspruefungFehlt' => 'DatumAbschlusspruefungFehlt',
|
||||
'DatumSponsionFehlt' => 'DatumSponsionFehlt',
|
||||
'DatumStudiensemesterFalscheReihenfolge' => 'DatumStudiensemesterFalscheReihenfolge',
|
||||
'FalscheAnzahlAbschlusspruefungen' => 'FalscheAnzahlAbschlusspruefungen',
|
||||
'FalscheAnzahlHeimatadressen' => 'FalscheAnzahlHeimatadressen',
|
||||
'FalscheAnzahlZustelladressen' => 'FalscheAnzahlZustelladressen',
|
||||
'GbDatumWeitZurueck' => 'GbDatumWeitZurueck',
|
||||
'InaktiverStudentAktiverStatus' => 'InaktiverStudentAktiverStatus',
|
||||
'IncomingHeimatNationOesterreich' => 'IncomingHeimatNationOesterreich',
|
||||
'IncomingOhneIoDatensatz' => 'IncomingOhneIoDatensatz',
|
||||
'IncomingOrGsFoerderrelevant' => 'IncomingOrGsFoerderrelevant',
|
||||
'InskriptionVorLetzerBismeldung' => 'InskriptionVorLetzerBismeldung',
|
||||
'NationNichtOesterreichAberGemeinde' => 'NationNichtOesterreichAberGemeinde',
|
||||
'OrgformStgUngleichOrgformPrestudent' => 'OrgformStgUngleichOrgformPrestudent',
|
||||
'PrestudentMischformOhneOrgform' => 'PrestudentMischformOhneOrgform',
|
||||
'StgPrestudentUngleichStgStudienplan' => 'StgPrestudentUngleichStgStudienplan',
|
||||
'StgPrestudentUngleichStgStudent' => 'StgPrestudentUngleichStgStudent',
|
||||
'StudentstatusNachAbbrecher' => 'StudentstatusNachAbbrecher'
|
||||
//'StudienplanUngueltig' => 'StudienplanUngueltig'
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_ci =& get_instance(); // get ci instance
|
||||
|
||||
// load models
|
||||
$this->_ci->load->model('organisation/studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
// get current Studiensemester
|
||||
$studiensemesterRes = $this->_ci->StudiensemesterModel->getAkt();
|
||||
if (hasData($studiensemesterRes)) $this->_currentStudiensemester = getData($studiensemesterRes)[0]->studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes check for a fehler_kurzbz, returns the result.
|
||||
* @param $fehler_kurzbz string
|
||||
* @param $studiensemester_kurzbz string optionally needed for issue production
|
||||
* @param $studiengang_kz int optionally needed for issue production
|
||||
*/
|
||||
public function producePlausicheckIssue($fehler_kurzbz, $studiensemester_kurzbz = null, $studiengang_kz = null)
|
||||
{
|
||||
$libName = $this->_fehlerLibMappings[$fehler_kurzbz];
|
||||
|
||||
// get Studiensemester
|
||||
if (isEmptyString($studiensemester_kurzbz)) $studiensemester_kurzbz = $this->_currentStudiensemester;
|
||||
|
||||
// get path of library for issue to be produced
|
||||
$issuesLibPath = DOC_ROOT . self::CI_LIBRARY_PATH . '/' . self::PLAUSI_ISSUES_FOLDER . '/';
|
||||
$issuesLibFilePath = $issuesLibPath . $libName . '.php';
|
||||
|
||||
// check if library file exists
|
||||
if (!file_exists($issuesLibFilePath)) return error("Issue library file " . $issuesLibFilePath . " does not exist");
|
||||
|
||||
// load library connected to fehlercode
|
||||
$this->_ci->load->library(self::PLAUSI_ISSUES_FOLDER . '/'.$libName);
|
||||
|
||||
$lowercaseLibName = mb_strtolower($libName);
|
||||
|
||||
// check if method is defined in library class
|
||||
if (!is_callable(array($this->_ci->{$lowercaseLibName}, self::EXECUTE_PLAUSI_CHECK_METHOD_NAME)))
|
||||
return error("Method " . self::EXECUTE_PLAUSI_CHECK_METHOD_NAME . " is not defined in library $lowercaseLibName");
|
||||
|
||||
// pass the data needed for issue check
|
||||
$paramsForCheck = array(
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'studiengang_kz' => $studiengang_kz
|
||||
);
|
||||
|
||||
// call the function for checking for issue production
|
||||
return $this->_ci->{$lowercaseLibName}->{self::EXECUTE_PLAUSI_CHECK_METHOD_NAME}($paramsForCheck);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all fehler_kurzbz for fehler which need to be checked.
|
||||
*/
|
||||
public function getFehlerKurzbz()
|
||||
{
|
||||
return array_keys($this->_fehlerLibMappings);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AbbrecherAktiv extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getAbbrecherAktiv($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AbschlussstatusFehlt extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getAbschlussstatusFehlt($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AktSemesterNull extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getAktSemesterNull($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AktiverStudentOhneStatus extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getAktiverStudentOhneStatus($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AusbildungssemPrestudentUngleichAusbildungssemStatus extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getAusbildungssemPrestudentUngleichAusbildungssemStatus(
|
||||
$studiensemester_kurzbz,
|
||||
$studiengang_kz
|
||||
);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'status_ausbildungssemester' => $prestudent->status_ausbildungssemester,
|
||||
'student_ausbildungssemester' => $prestudent->student_ausbildungssemester,
|
||||
'student_uid' => $prestudent->student_uid,
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class BewerberNichtZumRtAngetreten extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getBewerberNichtZumRtAngetreten($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array(
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz,
|
||||
'prestudent_id' => $prestudent->prestudent_id
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class DatumAbschlusspruefungFehlt extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getDatumAbschlusspruefungFehlt($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'abschlusspruefung_id' => $prestudent->abschlusspruefung_id
|
||||
),
|
||||
'resolution_params' => array('abschlusspruefung_id' => $prestudent->abschlusspruefung_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class DatumSponsionFehlt extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getDatumSponsionFehlt($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'abschlusspruefung_id' => $prestudent->abschlusspruefung_id
|
||||
),
|
||||
'resolution_params' => array('abschlusspruefung_id' => $prestudent->abschlusspruefung_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class DatumStudiensemesterFalscheReihenfolge extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getDatumStudiensemesterFalscheReihenfolge($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class FalscheAnzahlAbschlusspruefungen extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getFalscheAnzahlAbschlusspruefungen($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class FalscheAnzahlHeimatadressen extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$personRes = $this->_ci->plausichecklib->getFalscheAnzahlHeimatadressen($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$persons = getData($personRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($persons as $person)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $person->person_id,
|
||||
'resolution_params' => array('person_id' => $person->person_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class FalscheAnzahlZustelladressen extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$personRes = $this->_ci->plausichecklib->getFalscheAnzahlZustelladressen($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$persons = getData($personRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($persons as $person)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $person->person_id,
|
||||
'resolution_params' => array('person_id' => $person->person_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class GbDatumWeitZurueck extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$personRes = $this->_ci->plausichecklib->getGbDatumWeitZurueck($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$persons = getData($personRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($persons as $person)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $person->person_id,
|
||||
'resolution_params' => array('person_id' => $person->person_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class InaktiverStudentAktiverStatus extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getInaktiverStudentAktiverStatus($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class IncomingHeimatNationOesterreich extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$personRes = $this->_ci->plausichecklib->getIncomingHeimatNationOesterreich($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$persons = getData($personRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($persons as $person)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $person->person_id,
|
||||
'resolution_params' => array('person_id' => $person->person_id, 'studiensemester_kurzbz' => $studiensemester_kurzbz)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class IncomingOhneIoDatensatz extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getIncomingOhneIoDatensatz($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class IncomingOrGsFoerderrelevant extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getIncomingOrGsFoerderrelevant($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class InskriptionVorLetzerBismeldung extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getInskriptionVorLetzerBismeldung($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'datum_bismeldung' => date_format(date_create($prestudent->datum_bismeldung), 'd.m.Y'),
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class NationNichtOesterreichAberGemeinde extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$personRes = $this->_ci->plausichecklib->getNationNichtOesterreichAberGemeinde($studiengang_kz);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$persons = getData($personRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($persons as $person)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $person->person_id,
|
||||
'fehlertext_params' => array('gemeinde' => $person->gemeinde, 'adresse_id' => $person->adresse_id),
|
||||
'resolution_params' => array('adresse_id' => $person->adresse_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class OrgformStgUngleichOrgformPrestudent extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getOrgformStgUngleichOrgformPrestudent($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'student_studiengang' => $prestudent->student_studiengang,
|
||||
'student_orgform' => $prestudent->student_orgform,
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class defining ressources and method to use for plausicheck issue producer
|
||||
*/
|
||||
abstract class PlausiChecker
|
||||
{
|
||||
protected $_ci; // code igniter instance
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// load libraries
|
||||
$this->_ci->load->library('issues/PlausicheckLib'); // load plausicheck library
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a plausi check.
|
||||
* @param $paramsForChecking array parameters needed for executing the check
|
||||
* @return array with objects which failed the plausi check
|
||||
*/
|
||||
abstract public function executePlausiCheck($paramsForChecking);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class PrestudentMischformOhneOrgform extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getPrestudentMischformOhneOrgform($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StgPrestudentUngleichStgStudent extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudent($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StgPrestudentUngleichStgStudienplan extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudienplan($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id, 'studienplan' => $prestudent->studienplan),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id, 'studienordnung_id' => $prestudent->studienordnung_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StudentstatusNachAbbrecher extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getStudentstatusNachAbbrecher($studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('PlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StudienplanUngueltig extends PlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
// pass parameters needed for plausicheck
|
||||
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
|
||||
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getStudienplanUngueltig($studiensemester_kurzbz, $studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array(
|
||||
'studienplan' => $prestudent->studienplan,
|
||||
'ausbildungssemester' => $prestudent->ausbildungssemester,
|
||||
'prestudent_id' => $prestudent->prestudent_id
|
||||
),
|
||||
'resolution_params' => array(
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return the results
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
-1
@@ -15,7 +15,6 @@ class CORE_INOUT_0006 implements IIssueResolvedChecker
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->model('codex/Bisio_model', 'BisioModel');
|
||||
//$this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
|
||||
|
||||
// get all Zwecke
|
||||
$this->_ci->BisioModel->addSelect('ects_erworben');
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_INOUT_0007 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
|
||||
return error('Person Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getIncomingHeimatNationOesterreich($params['studiensemester_kurzbz'], null, $params['issue_person_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_INOUT_0008 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getIncomingOhneIoDatensatz(null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming or external GS student should not be foerderrelevant.
|
||||
*/
|
||||
class CORE_INOUT_0009 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getIncomingOrGsFoerderrelevant(null, null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_PERSON_0001 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
|
||||
return error('Person Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getGbDatumWeitZurueck(null, null, $params['issue_person_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_PERSON_0002 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
|
||||
return error('Person Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getNationNichtOesterreichAberGemeinde(null, $params['issue_person_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_PERSON_0003 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
|
||||
return error('Person Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getFalscheAnzahlHeimatadressen(null, null, $params['issue_person_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_PERSON_0004 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
|
||||
return error('Person Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getFalscheAnzahlZustelladressen(null, null, $params['issue_person_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STG_0001 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudent(null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STG_0002 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getOrgformStgUngleichOrgformPrestudent($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STG_0003 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getPrestudentMischformOhneOrgform($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STG_0004 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studienordnung_id']) || !is_numeric($params['studienordnung_id']))
|
||||
return error('Studienordnung Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudienplan(null, $params['prestudent_id'], $params['studienordnung_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0001 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getAbbrecherAktiv(null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0002 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getStudentstatusNachAbbrecher(null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0003 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getAusbildungssemPrestudentUngleichAusbildungssemStatus($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0004 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getInaktiverStudentAktiverStatus($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0005 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getInskriptionVorLetzerBismeldung($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0006 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getDatumStudiensemesterFalscheReihenfolge(null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0007 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getAktiverStudentOhneStatus(null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0008 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getStudienplanUngueltig($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0009 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getFalscheAnzahlAbschlusspruefungen(null, null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0010 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['abschlusspruefung_id']) || !is_numeric($params['abschlusspruefung_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getDatumAbschlusspruefungFehlt(null, null, $params['abschlusspruefung_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0011 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['abschlusspruefung_id']) || !is_numeric($params['abschlusspruefung_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getDatumSponsionFehlt(null, null, $params['abschlusspruefung_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0012 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getBewerberNichtZumRtAngetreten($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0013 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
|
||||
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getAktSemesterNull($params['studiensemester_kurzbz'], null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Incoming shouldn't have austrian home address.
|
||||
*/
|
||||
class CORE_STUDENTSTATUS_0014 implements IIssueResolvedChecker
|
||||
{
|
||||
public function checkIfIssueIsResolved($params)
|
||||
{
|
||||
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
|
||||
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib');
|
||||
|
||||
// check if issue persists
|
||||
$checkRes = $this->_ci->plausichecklib->getAbschlussstatusFehlt(null, null, $params['prestudent_id']);
|
||||
|
||||
if (isError($checkRes)) return $checkRes;
|
||||
|
||||
if (hasData($checkRes))
|
||||
return success(false); // not resolved if issue is still present
|
||||
else
|
||||
return success(true); // resolved otherwise
|
||||
}
|
||||
}
|
||||
@@ -128,8 +128,8 @@ class Messages_model extends CI_Model
|
||||
{
|
||||
$ouOptions .= sprintf(
|
||||
"\n".'<option value="%s">%s</option>',
|
||||
is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : self::ALT_OE,
|
||||
$ou->bezeichnung . (is_numeric($ou->prestudent_id) ? '' : ' *')
|
||||
($ou->typ === 'l' ? $ou->oe_kurzbz : (is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : self::ALT_OE)),
|
||||
$ou->bezeichnung . ((is_numeric($ou->prestudent_id) || $ou->typ === 'l' ) ? '' : ' *')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ class Akte_model extends DB_Model
|
||||
* @param bool $nachgereicht if true, retrieves only nachgereichte Dokumente. if false, only not nachgereichte. default: null, all Dokumente
|
||||
* @return array
|
||||
*/
|
||||
public function getAktenWithDokInfo($person_id, $dokument_kurzbz = null, $nachgereicht = null)
|
||||
public function getAktenWithDokInfo($person_id, $dokument_kurzbz = null, $nachgereicht = null, $archiv = null)
|
||||
{
|
||||
$this->addSelect('public.tbl_akte.*, bezeichnung_mehrsprachig, dokumentbeschreibung_mehrsprachig, public.tbl_dokument.bezeichnung as dokument_bezeichnung, bis.tbl_nation.*, ausstellungsdetails');
|
||||
$this->addJoin('public.tbl_dokument', 'dokument_kurzbz');
|
||||
@@ -184,6 +184,9 @@ class Akte_model extends DB_Model
|
||||
if(is_bool($nachgereicht))
|
||||
$where['nachgereicht'] = $nachgereicht;
|
||||
|
||||
if (is_bool($archiv))
|
||||
$where['archiv'] = $archiv;
|
||||
|
||||
$dokumente = $this->loadWhere($where);
|
||||
|
||||
if($dokumente->error) return $dokumente;
|
||||
|
||||
@@ -309,13 +309,39 @@ class Prestudent_model extends DB_Model
|
||||
*/
|
||||
public function getLastPrestudent($person_id, $withzgv = false)
|
||||
{
|
||||
$qry = 'SELECT * FROM public.tbl_prestudent
|
||||
WHERE person_id = ?
|
||||
$qry = 'SELECT * FROM public.tbl_prestudent ps
|
||||
%s
|
||||
WHERE ps.person_id = ?
|
||||
ORDER BY updateamum DESC NULLS LAST, insertamum DESC NULLS LAST
|
||||
LIMIT 1';
|
||||
|
||||
$zgvwhere = $withzgv === true ? 'AND zgv_code IS NOT NULL' : '';
|
||||
$zgvwhere = '';
|
||||
if ($withzgv === true)
|
||||
{
|
||||
$zgvwhere = '
|
||||
LEFT JOIN (
|
||||
SELECT ps2.zgvmas_code,
|
||||
ps2.zgvmanation,
|
||||
ps2.zgvmadatum,
|
||||
ps2.zgvmaort,
|
||||
ps2.zgvmas_erfuellt,
|
||||
ps2.person_id
|
||||
FROM tbl_prestudent ps2
|
||||
WHERE zgvmas_code IS NOT NULL
|
||||
ORDER BY updateamum DESC NULLS LAST, insertamum DESC NULLS LAST
|
||||
) zgvmas ON zgvmas.person_id = ps.person_id
|
||||
LEFT JOIN (
|
||||
SELECT ps2.zgv_code,
|
||||
ps2.zgvnation,
|
||||
ps2.zgvdatum,
|
||||
ps2.zgvort,
|
||||
ps2.zgv_erfuellt,
|
||||
ps2.person_id
|
||||
FROM tbl_prestudent ps2
|
||||
WHERE zgv_code IS NOT NULL
|
||||
ORDER BY updateamum DESC NULLS LAST, insertamum DESC NULLS LAST
|
||||
)zgv ON zgv.person_id = ps.person_id';
|
||||
}
|
||||
|
||||
$qry = sprintf($qry, $zgvwhere);
|
||||
|
||||
@@ -560,9 +586,10 @@ class Prestudent_model extends DB_Model
|
||||
o.bezeichnung,
|
||||
(CASE
|
||||
WHEN sg.typ = \'b\' THEN ps.prestudent_id
|
||||
WHEN sg.typ = \'m\' THEN ps.prestudent_id
|
||||
WHEN sg.typ = \'m\' THEN mps.prestudent_id
|
||||
ELSE NULL
|
||||
END) AS prestudent_id
|
||||
END) AS prestudent_id,
|
||||
sg.typ
|
||||
FROM public.tbl_prestudent p
|
||||
JOIN public.tbl_studiengang sg USING(studiengang_kz)
|
||||
JOIN public.tbl_organisationseinheit o USING(oe_kurzbz)
|
||||
@@ -571,11 +598,17 @@ class Prestudent_model extends DB_Model
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE status_kurzbz = \'Bewerber\'
|
||||
) ps USING(prestudent_id)
|
||||
LEFT JOIN (
|
||||
SELECT prestudent_id
|
||||
FROM public.tbl_prestudentstatus
|
||||
WHERE status_kurzbz = \'Interessent\' AND bestaetigtam IS NOT NULL
|
||||
) mps ON p.prestudent_id = mps.prestudent_id
|
||||
WHERE p.person_id = ?
|
||||
GROUP BY o.oe_kurzbz,
|
||||
o.bezeichnung,
|
||||
sg.typ,
|
||||
ps.prestudent_id,
|
||||
mps.prestudent_id,
|
||||
p.prestudent_id
|
||||
ORDER BY o.bezeichnung';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
class Paabgabe_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -11,4 +10,24 @@ class Paabgabe_model extends DB_Model
|
||||
$this->dbTable = 'campus.tbl_paabgabe';
|
||||
$this->pk = 'paabgabe_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets last Endabgabe of a Projektarbeit, including filename.
|
||||
* @param int $projektarbeit_id
|
||||
* @return object
|
||||
*/
|
||||
public function getEndabgabe($projektarbeit_id)
|
||||
{
|
||||
$qry = "SELECT paabgabe_id, student_uid, paabg.datum, paabg.abgabedatum, projekttyp_kurzbz, titel, titel_english,
|
||||
paabgabe_id || '_' || student_uid || '.pdf' AS filename
|
||||
FROM campus.tbl_paabgabe paabg
|
||||
JOIN lehre.tbl_projektarbeit USING (projektarbeit_id)
|
||||
WHERE projektarbeit_id = ?
|
||||
AND paabgabetyp_kurzbz = 'end'
|
||||
AND paabg.abgabedatum IS NOT NULL
|
||||
ORDER BY paabg.abgabedatum, paabg.datum DESC
|
||||
LIMIT 1";
|
||||
|
||||
return $this->execQuery($qry, array($projektarbeit_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,18 +54,28 @@ class Projektbetreuer_model extends DB_Model
|
||||
$qry = "SELECT DISTINCT ON (pers.person_id) pers.person_id, betreuerart_kurzbz, vorname, nachname,
|
||||
trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name,
|
||||
anrede, titelpre, titelpost, gebdatum, geschlecht, pa.projekttyp_kurzbz,
|
||||
ben.uid, ben.alias, ma.personalnummer, mitarbeiter_uid, student_uid
|
||||
FROM lehre.tbl_projektarbeit pa
|
||||
JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
|
||||
JOIN public.tbl_person pers USING (person_id)
|
||||
LEFT JOIN public.tbl_benutzer ben USING (person_id)
|
||||
LEFT JOIN public.tbl_mitarbeiter ma ON ben.uid = ma.mitarbeiter_uid
|
||||
WHERE ben.aktiv
|
||||
AND projektarbeit_id = ?
|
||||
AND betreuerart_kurzbz = ?
|
||||
ORDER BY pers.person_id, CASE WHEN ma.mitarbeiter_uid IS NULL THEN 1 ELSE 0 END, /*Mitarbeiter account first*/
|
||||
CASE WHEN ben.uid IS NULL THEN 1 ELSE 0 END, /*user with account first*/
|
||||
ben.insertamum";
|
||||
ben.uid, ben.alias, ma.personalnummer, mitarbeiter_uid, student_uid,
|
||||
(
|
||||
SELECT kontakt
|
||||
FROM public.tbl_kontakt
|
||||
WHERE kontakttyp = 'email'
|
||||
AND person_id = pers.person_id
|
||||
ORDER BY
|
||||
CASE WHEN zustellung THEN 0 ELSE 1 END,
|
||||
insertamum DESC NULLS LAST
|
||||
LIMIT 1
|
||||
) AS private_email
|
||||
FROM lehre.tbl_projektarbeit pa
|
||||
JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
|
||||
JOIN public.tbl_person pers USING (person_id)
|
||||
LEFT JOIN public.tbl_benutzer ben USING (person_id)
|
||||
LEFT JOIN public.tbl_mitarbeiter ma ON ben.uid = ma.mitarbeiter_uid
|
||||
WHERE (ben.aktiv OR ben.aktiv IS NULL)
|
||||
AND projektarbeit_id = ?
|
||||
AND betreuerart_kurzbz = ?
|
||||
ORDER BY pers.person_id, CASE WHEN ma.mitarbeiter_uid IS NULL THEN 1 ELSE 0 END, /*Mitarbeiter account first*/
|
||||
CASE WHEN ben.uid IS NULL THEN 1 ELSE 0 END, /*user with account first*/
|
||||
ben.insertamum";
|
||||
|
||||
return $this->execQuery($qry, array($projektarbeit_id, $betreuerart_kurzbz));
|
||||
}
|
||||
@@ -77,14 +87,14 @@ class Projektbetreuer_model extends DB_Model
|
||||
*/
|
||||
public function getBetreuerByToken($zugangstoken)
|
||||
{
|
||||
$qry = '
|
||||
$qry = "
|
||||
SELECT tbl_projektbetreuer.person_id, tbl_projektbetreuer.projektarbeit_id, student_uid
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
JOIN lehre.tbl_projektarbeit USING (projektarbeit_id)
|
||||
WHERE zugangstoken = ? AND zugangstoken_gueltigbis >= NOW()
|
||||
ORDER BY tbl_projektbetreuer.insertamum DESC, projektarbeit_id DESC
|
||||
LIMIT 1
|
||||
';
|
||||
";
|
||||
|
||||
return $this->execQuery($qry, array($zugangstoken));
|
||||
}
|
||||
@@ -96,31 +106,60 @@ class Projektbetreuer_model extends DB_Model
|
||||
* @param $student_uid string uid des Studenten der Arbeit abgibt
|
||||
* @return object | bool
|
||||
*/
|
||||
public function getZweitbegutachterWithToken($erstbegutachter_person_id, $projektarbeit_id, $student_uid)
|
||||
public function getZweitbegutachterWithToken($erstbegutachter_person_id, $projektarbeit_id, $student_uid, $zweitbegutachter_person_id = null)
|
||||
{
|
||||
$qry_betr = "SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid, kontakt,
|
||||
trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name,
|
||||
CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum
|
||||
FROM lehre.tbl_projektbetreuer betr
|
||||
JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id
|
||||
JOIN public.tbl_person pers ON betr.person_id = pers.person_id
|
||||
LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true
|
||||
LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id
|
||||
LEFT JOIN campus.tbl_paabgabe abg ON betr.projektarbeit_id = abg.projektarbeit_id AND abg.paabgabetyp_kurzbz = 'end'
|
||||
WHERE betr.betreuerart_kurzbz = 'Zweitbegutachter'
|
||||
AND betr.projektarbeit_id = ?
|
||||
AND parb.student_uid = ?
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM lehre.tbl_projektbetreuer
|
||||
WHERE person_id = ?
|
||||
AND betreuerart_kurzbz = 'Erstbegutachter'
|
||||
AND projektarbeit_id = betr.projektarbeit_id
|
||||
)
|
||||
AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL)
|
||||
ORDER BY betr.insertamum DESC
|
||||
LIMIT 1";
|
||||
$params = array($erstbegutachter_person_id, $erstbegutachter_person_id, $projektarbeit_id, $student_uid);
|
||||
|
||||
return $this->execQuery($qry_betr, array($projektarbeit_id, $student_uid, $erstbegutachter_person_id));
|
||||
$qry_betr = "SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid,
|
||||
trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name,
|
||||
CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, kontakt,
|
||||
abg.abgabedatum, betr.betreuerart_kurzbz
|
||||
FROM lehre.tbl_projektbetreuer betr
|
||||
JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id
|
||||
JOIN public.tbl_person pers ON betr.person_id = pers.person_id
|
||||
LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true
|
||||
LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id
|
||||
LEFT JOIN campus.tbl_paabgabe abg ON betr.projektarbeit_id = abg.projektarbeit_id AND abg.paabgabetyp_kurzbz = 'end'
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
betr.betreuerart_kurzbz = 'Zweitbegutachter'
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM lehre.tbl_projektbetreuer
|
||||
WHERE person_id = ?
|
||||
AND betreuerart_kurzbz = 'Erstbegutachter'
|
||||
AND projektarbeit_id = betr.projektarbeit_id
|
||||
)
|
||||
)
|
||||
OR /* either Zweitbegutachter of masterarbeit, or Kommissionsprüfer if Kommission */
|
||||
(
|
||||
betr.betreuerart_kurzbz = 'Senatsmitglied'
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM lehre.tbl_projektbetreuer
|
||||
WHERE person_id = ?
|
||||
AND betreuerart_kurzbz = 'Senatsvorsitz'
|
||||
AND projektarbeit_id = betr.projektarbeit_id
|
||||
)
|
||||
)
|
||||
)
|
||||
AND betr.projektarbeit_id = ?
|
||||
AND parb.student_uid = ?
|
||||
AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL)";
|
||||
|
||||
if (isset($zweitbegutachter_person_id))
|
||||
{
|
||||
$qry_betr .= " AND betr.person_id = ?";
|
||||
$params[] = $zweitbegutachter_person_id;
|
||||
}
|
||||
|
||||
$qry_betr .= " ORDER BY betr.person_id DESC,
|
||||
(CASE WHEN EXISTS ( /* if multiple accounts, prioritize mitarbeiter */
|
||||
SELECT 1 FROM public.tbl_mitarbeiter ma
|
||||
WHERE ma.mitarbeiter_uid = tbl_benutzer.uid
|
||||
) THEN 0 ELSE 1 END), betr.insertamum DESC
|
||||
LIMIT 1";
|
||||
|
||||
return $this->execQuery($qry_betr, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,23 +170,23 @@ class Projektbetreuer_model extends DB_Model
|
||||
*/
|
||||
public function generateZweitbegutachterToken($zweitbegutachter_person_id, $projektarbeit_id)
|
||||
{
|
||||
$betreuerUidQry = "SELECT uid, zugangstoken, zugangstoken_gueltigbis, tbl_projektbetreuer.person_id
|
||||
$betreuerUidQry = "SELECT uid, zugangstoken, zugangstoken_gueltigbis, tbl_projektbetreuer.person_id, betreuerart_kurzbz
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
LEFT JOIN public.tbl_benutzer USING(person_id)
|
||||
WHERE projektarbeit_id = ?
|
||||
AND tbl_projektbetreuer.person_id = ?
|
||||
AND betreuerart_kurzbz = 'Zweitbegutachter'
|
||||
AND betreuerart_kurzbz IN ('Zweitbegutachter', 'Senatsmitglied')
|
||||
LIMIT 1";
|
||||
|
||||
$betreueruidres = $this->execQuery($betreuerUidQry, array($projektarbeit_id, $zweitbegutachter_person_id));
|
||||
$betreueruidRes = $this->execQuery($betreuerUidQry, array($projektarbeit_id, $zweitbegutachter_person_id));
|
||||
|
||||
if (!hasData($betreueruidres))
|
||||
if (!hasData($betreueruidRes))
|
||||
return error('Zweitbegutachter nicht gefunden');
|
||||
|
||||
$row_betr = getData($betreueruidres)[0];
|
||||
$zweitbetreuer = getData($betreueruidRes)[0];
|
||||
|
||||
if (!isset($row_betr->uid))
|
||||
if (!isset($zweitbetreuer->uid))
|
||||
{
|
||||
do {
|
||||
$token = generateToken(16);
|
||||
@@ -156,8 +195,8 @@ class Projektbetreuer_model extends DB_Model
|
||||
|
||||
$result = $this->update(
|
||||
array('projektarbeit_id' => $projektarbeit_id,
|
||||
'person_id' => $row_betr->person_id,
|
||||
'betreuerart_kurzbz' => 'Zweitbegutachter'),
|
||||
'person_id' => $zweitbetreuer->person_id,
|
||||
'betreuerart_kurzbz' => $zweitbetreuer->betreuerart_kurzbz),
|
||||
array('zugangstoken' => $token,
|
||||
'zugangstoken_gueltigbis' => date('Y-m-d', strtotime('+1 year')))
|
||||
);
|
||||
@@ -167,4 +206,29 @@ class Projektbetreuer_model extends DB_Model
|
||||
else
|
||||
return success("Account vorhanden, kein Token benötigt");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets betreuerart of a Betreuer for a Projektarbeit.
|
||||
* Main Betreuer are prioritized (normally one Betreuer should be assigned to a Projektarbeit another time with a different Betreuerart).
|
||||
* @param int projektarbeit_id
|
||||
* @param int betreuer_person_id
|
||||
* @return object success or error
|
||||
*/
|
||||
public function getBetreuerart($projektarbeit_id, $betreuer_person_id)
|
||||
{
|
||||
$qry = "SELECT betreuerart_kurzbz
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
WHERE projektarbeit_id = ?
|
||||
AND person_id = ?
|
||||
ORDER BY CASE WHEN betreuerart_kurzbz = 'Senatsvorsitz' THEN 1 /*Senatsvorsitz has priority*/
|
||||
WHEN betreuerart_kurzbz = 'Begutachter' THEN 2
|
||||
WHEN betreuerart_kurzbz = 'Erstbegutachter' THEN 3
|
||||
WHEN betreuerart_kurzbz = 'Zweitbegutachter' THEN 4
|
||||
WHEN betreuerart_kurzbz = 'Senatsmitglied' THEN 5
|
||||
ELSE 5
|
||||
END, insertamum DESC
|
||||
LIMIT 1";
|
||||
|
||||
return $this->execQuery($qry, array($projektarbeit_id, $betreuer_person_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,13 +508,20 @@ class Studiengang_model extends DB_Model
|
||||
return $this->execQuery($query, array($typ, $semester));
|
||||
}
|
||||
|
||||
public function getStudiengangTyp($studiengang_kz, $typ)
|
||||
public function getStudiengangTyp($studiengang_kz, $typ = null)
|
||||
{
|
||||
$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 ?";
|
||||
WHERE studiengang_kz IN ?";
|
||||
|
||||
return $this->execQuery($query, array($studiengang_kz, $typ));
|
||||
$params[] = $studiengang_kz;
|
||||
|
||||
if (!is_null($typ))
|
||||
{
|
||||
$query .= " AND sgt.typ IN ?";
|
||||
$params[] = $typ;
|
||||
}
|
||||
|
||||
return $this->execQuery($query, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
class Geschlecht_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'public.tbl_geschlecht';
|
||||
$this->pk = 'geschlecht';
|
||||
}
|
||||
}
|
||||
@@ -213,11 +213,7 @@ $filterWidgetArray = array(
|
||||
begruendung: {headerFilter:"input", visible: true},
|
||||
student: {headerFilter:"input"},
|
||||
zgv: {visible: false, headerFilter:"input"},
|
||||
dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{
|
||||
labelField:"dokument_bezeichnung",
|
||||
url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id},
|
||||
target:"_blank"
|
||||
}},
|
||||
dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams: paramLookup_dokBez},
|
||||
anmerkung_student: {headerFilter:"input"},
|
||||
antragsdatum: {align:"center", headerFilter:"input", mutator: mut_formatStringDate},
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
|
||||
|
||||
@@ -47,7 +47,7 @@ $query = '
|
||||
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (anrechnung_id)
|
||||
JOIN lehre.tbl_anrechnung_begruendung AS begruendung USING (begruendung_id)
|
||||
)
|
||||
|
||||
|
||||
SELECT DISTINCT ON (anrechnungen.*, lema.mitarbeiter_uid) anrechnungen.*,
|
||||
array_to_json(anrechnungstatus.bezeichnung_mehrsprachig::varchar[])->>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung"
|
||||
FROM anrechnungen
|
||||
@@ -134,11 +134,7 @@ $filterWidgetArray = array(
|
||||
student: {headerFilter:"input"},
|
||||
begruendung: {headerFilter:"input"},
|
||||
zgv: {visible: false, headerFilter:"input"},
|
||||
dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{
|
||||
labelField:"dokument_bezeichnung",
|
||||
url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id},
|
||||
target:"_blank"
|
||||
}},
|
||||
dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams: paramLookup_dokBez},
|
||||
anmerkung_student: {headerFilter:"input"},
|
||||
antragsdatum: {align:"center", headerFilter:"input", mutator: mut_formatStringDate},
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
|
||||
@@ -149,4 +145,4 @@ $filterWidgetArray = array(
|
||||
|
||||
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
'public/js/infocenter/messageList.js',
|
||||
'public/js/infocenter/infocenterDetails.js',
|
||||
'public/js/infocenter/zgvUeberpruefung.js',
|
||||
'public/js/infocenter/docUeberpruefung.js'
|
||||
'public/js/infocenter/docUeberpruefung.js',
|
||||
'public/js/infocenter/stammdaten.js'
|
||||
),
|
||||
'phrases' => array(
|
||||
'infocenter' => array(
|
||||
|
||||
@@ -1,60 +1,104 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6 table-responsive">
|
||||
<div class="col-lg-6 table-responsive stammdaten_form">
|
||||
<table class="table">
|
||||
<?php if (!empty($stammdaten->titelpre)): ?>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','titelpre')) ?></strong></td>
|
||||
<td><?php echo $stammdaten->titelpre ?></td>
|
||||
<td>
|
||||
<div class='stammdaten' id="titelpre"><?php echo $stammdaten->titelpre ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','vorname')) ?></strong></td>
|
||||
<td><?php echo $stammdaten->vorname ?></td>
|
||||
<td>
|
||||
<div class='stammdaten' id="vorname"><?php echo $stammdaten->vorname ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','nachname')) ?></strong></td>
|
||||
<td>
|
||||
<?php echo $stammdaten->nachname ?></td>
|
||||
<div class='stammdaten' id="nachname"><?php echo $stammdaten->nachname ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','titelpost')) ?></strong></td>
|
||||
<td>
|
||||
<div class='stammdaten' id="titelpost"><?php echo $stammdaten->titelpost ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (!empty($stammdaten->titelpost)): ?>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','titelpost')) ?></strong></td>
|
||||
<td><?php echo $stammdaten->titelpost ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','geburtsdatum')) ?></strong></td>
|
||||
<td>
|
||||
<?php echo date_format(date_create($stammdaten->gebdatum), 'd.m.Y') ?></td>
|
||||
<div class='stammdaten' id="gebdatum"><?php echo date_format(date_create($stammdaten->gebdatum), 'd.m.Y') ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','svnr')) ?></strong></td>
|
||||
<td>
|
||||
<?php echo $stammdaten->svnr ?></td>
|
||||
<div class='stammdaten' id="svnr"><?php echo $stammdaten->svnr ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','staatsbuergerschaft')) ?></strong></td>
|
||||
<td>
|
||||
<?php echo $stammdaten->staatsbuergerschaft ?></td>
|
||||
<select id="buergerschaft" disabled>
|
||||
<?php
|
||||
foreach ($all_nations as $nation)
|
||||
{
|
||||
$selected = '';
|
||||
if ($nation->nation_code === $stammdaten->staatsbuergerschaft_code)
|
||||
$selected = 'selected';
|
||||
echo "<option value='". $nation->nation_code ."' " . $selected . ">". $nation->langtext . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','geschlecht')) ?></strong></td>
|
||||
<td>
|
||||
<?php echo $stammdaten->geschlecht ?></td>
|
||||
<?php
|
||||
$language = getUserLanguage() == 'German' ? 0 : 1;
|
||||
?>
|
||||
<select id="geschlecht" disabled>
|
||||
<?php
|
||||
foreach ($all_genders as $gender)
|
||||
{
|
||||
$selected = '';
|
||||
if ($gender->geschlecht === $stammdaten->geschlecht)
|
||||
$selected = 'selected';
|
||||
echo "<option value='". $gender->geschlecht ."' " . $selected . ">". ucfirst($gender->bezeichnung_mehrsprachig[$language]) . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','geburtsnation')) ?></strong></td>
|
||||
<td>
|
||||
<?php echo $stammdaten->geburtsnation ?></td>
|
||||
<select id="gebnation" disabled>
|
||||
|
||||
<?php
|
||||
foreach ($all_nations as $nation)
|
||||
{
|
||||
$selected = '';
|
||||
if ($nation->nation_code === $stammdaten->geburtsnation_code)
|
||||
$selected = 'selected';
|
||||
echo "<option value='". $nation->nation_code ."' " . $selected . ">". $nation->langtext . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo ucfirst($this->p->t('person','geburtsort')) ?></strong></td>
|
||||
<td><?php echo $stammdaten->gebort ?></td>
|
||||
<td>
|
||||
<div class='stammdaten' id="gebort"><?php echo $stammdaten->gebort ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6 table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<table class="table table-bordered stammdaten_form">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4" class="text-center"><?php echo ucfirst($this->p->t('global','kontakt')) ?></th>
|
||||
@@ -78,7 +122,7 @@
|
||||
<td><?php echo ucfirst($kontakt->kontakttyp) ?></td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<?php echo '<span class="'.$kontakt->kontakttyp.'">';?>
|
||||
<?php echo '<span class="kontakt '.$kontakt->kontakttyp.'" data-id="'. $kontakt->kontakt_id .'" data-value="' . $kontakt->kontakt .'">';?>
|
||||
<?php if ($kontakt->kontakttyp === 'email'): ?>
|
||||
<a href="mailto:<?php echo $kontakt->kontakt; ?>" target="_top">
|
||||
<?php $lastMailAdress = $kontakt->kontakt;
|
||||
@@ -99,8 +143,30 @@
|
||||
<?php echo ucfirst($this->p->t('person','adresse')) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo isset($adresse) ? $adresse->strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?>
|
||||
<?php echo isset($adresse->nationkurztext) ? '<br />'.$adresse->nationkurztext : '' ?>
|
||||
<?php if (isset($adresse)): ?>
|
||||
<div class="row adresse col-sm-12" data-id="<?php echo $adresse->adresse_id ?>">
|
||||
<div class="float-left" data-value="<?php echo $adresse->strasse ?>" data-type="strasse"><?php echo $adresse->strasse ?></div>
|
||||
|
||||
<div class="float-left" data-value="<?php echo $adresse->plz ?>" data-type="plz"><?php echo $adresse->plz ?></div>
|
||||
|
||||
<div class="float-left" data-value="<?php echo $adresse->ort ?>" data-type="ort"><?php echo $adresse->ort ?></div>
|
||||
|
||||
<?php if (isset($adresse->nationkurztext)): ?>
|
||||
<select id="nation_<?php echo $adresse->adresse_id ?>" disabled>
|
||||
<?php
|
||||
foreach ($all_nations as $nation)
|
||||
{
|
||||
$selected = '';
|
||||
if ($nation->nation_code === $adresse->nation)
|
||||
$selected = 'selected';
|
||||
echo "<option value='". $nation->nation_code ."' " . $selected . ">". $nation->langtext . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo ($adresse->heimatadresse === true ? 'Heimatadresse' : '').
|
||||
@@ -126,6 +192,16 @@
|
||||
target='_blank'><i class="glyphicon glyphicon-new-window"></i> <?php echo $this->p->t('infocenter','zugangBewerbung') ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="col-xs-6">
|
||||
<a class="editStammdaten">
|
||||
<i class="fa fa-edit"></i> <?php echo $this->p->t('ui','bearbeiten'); ?></a>
|
||||
<div class="editActionStammdaten" style="display:none">
|
||||
<a class="cancelStammdaten">
|
||||
<i class="fa fa-trash"></i> <?php echo $this->p->t('ui','abbrechen');?></a>
|
||||
<a class="saveStammdaten">
|
||||
<i class="fa fa-save"></i> <?php echo $this->p->t('ui','speichern'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<?php
|
||||
$unique_studsemester = array();
|
||||
$first = true;
|
||||
$fit_programme_studiengaenge = array(10021, 10027);
|
||||
$fit_programme_studiengaenge = $additional_stg;
|
||||
foreach ($zgvpruefungen as $zgvpruefung):
|
||||
$infoonly = $zgvpruefung->infoonly;
|
||||
$studiengangkurzbz = $studiengangbezeichnung = $studiengangtyp = '';
|
||||
|
||||
@@ -56,7 +56,7 @@ $query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern
|
||||
WHERE person_id = pers.person_id
|
||||
ORDER BY prestudent_id DESC
|
||||
) prestudents
|
||||
WHERE last_status IN ('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')
|
||||
WHERE last_status IN ('Abgewiesener','Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')
|
||||
GROUP BY person_id
|
||||
LIMIT 1;
|
||||
) AS \"Zugehörigkeit\",
|
||||
@@ -89,7 +89,9 @@ $query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern
|
||||
LEFT JOIN public.tbl_funktion fu USING (funktion_kurzbz)
|
||||
WHERE fehlercode = fr.fehlercode
|
||||
GROUP BY fehlercode
|
||||
) AS \"Organisationseinheit Zuständigkeiten\"
|
||||
) AS \"Organisationseinheit Zuständigkeiten\",
|
||||
pers.bpk AS \"BPK\",
|
||||
pers.matr_nr AS \"Matrikelnummer\"
|
||||
FROM system.tbl_issue iss
|
||||
JOIN system.tbl_fehler fr USING (fehlercode)
|
||||
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
|
||||
@@ -130,16 +132,17 @@ if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
||||
)";
|
||||
}
|
||||
|
||||
$query .= " ORDER BY CASE
|
||||
WHEN iss.status_kurzbz = '".IssuesLib::STATUS_NEU."' THEN 0
|
||||
WHEN iss.status_kurzbz = '".IssuesLib::STATUS_IN_BEARBEITUNG."' THEN 1
|
||||
ELSE 2
|
||||
END,
|
||||
$query .= " ORDER BY
|
||||
CASE
|
||||
WHEN fehlertyp_kurzbz = '".IssuesLib::ERRORTYPE_CODE."' THEN 0
|
||||
WHEN fehlertyp_kurzbz = '".IssuesLib::WARNINGTYPE_CODE."' THEN 1
|
||||
ELSE 2
|
||||
END,
|
||||
CASE
|
||||
WHEN iss.status_kurzbz = '".IssuesLib::STATUS_NEU."' THEN 0
|
||||
WHEN iss.status_kurzbz = '".IssuesLib::STATUS_IN_BEARBEITUNG."' THEN 1
|
||||
ELSE 2
|
||||
END,
|
||||
datum DESC, fehlercode, issue_id DESC";
|
||||
|
||||
$filterWidgetArray = array(
|
||||
@@ -172,7 +175,9 @@ $filterWidgetArray = array(
|
||||
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', 'zustaendigeOrganisationseinheiten')),
|
||||
'BPK',
|
||||
'Matrikelnummer'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
@@ -221,6 +226,16 @@ $filterWidgetArray = array(
|
||||
$datasetRaw->{'Organisationseinheit Zuständigkeiten'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'BPK'} == null)
|
||||
{
|
||||
$datasetRaw->{'BPK'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Matrikelnummer'} == null)
|
||||
{
|
||||
$datasetRaw->{'Matrikelnummer'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Plausichecks',
|
||||
'jquery3' => true,
|
||||
'jqueryui1' => true,
|
||||
'jquerycheckboxes' => true,
|
||||
'bootstrap3' => true,
|
||||
'fontawesome4' => true,
|
||||
'sbadmintemplate3' => true,
|
||||
'ajaxlib' => true,
|
||||
'navigationwidget' => true,
|
||||
'dialoglib' => true,
|
||||
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css'),
|
||||
'customJSs' => array('public/js/issues/plausichecks.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<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">
|
||||
Plausichecks
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 form-group">
|
||||
<label>Studiensemester</label>
|
||||
<select class="form-control" name="studiensemester" id="studiensemester">
|
||||
<?php
|
||||
foreach ($semester as $sem):
|
||||
$selected = $sem->studiensemester_kurzbz === $currsemester[0]->studiensemester_kurzbz ? ' selected=""' : '';
|
||||
?>
|
||||
<option value="<?php echo $sem->studiensemester_kurzbz ?>"<?php echo $selected ?>>
|
||||
<?php echo $sem->studiensemester_kurzbz ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-4 form-group">
|
||||
<label>Studiengang</label>
|
||||
<select class="form-control" name="studiengang_kz" id="studiengang_kz">
|
||||
<option value="" selected="selected">Alle</option>';
|
||||
<?php
|
||||
$typ = '';
|
||||
foreach ($studiengaenge as $studiengang):
|
||||
if ($typ != $studiengang->typ || $typ == '')
|
||||
{
|
||||
if ($typ != '')
|
||||
echo '</optgroup>';
|
||||
|
||||
echo '<optgroup label = "'.($studiengang->typbezeichnung !== '' ? $studiengang->typbezeichnung : $studiengang).'">';
|
||||
}
|
||||
$typ = $studiengang->typ;
|
||||
?>
|
||||
<option value="<?php echo $studiengang->studiengang_kz ?>">
|
||||
<?php echo $studiengang->kuerzel . ' - ' . $studiengang->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-3 col-lg-4 form-group">
|
||||
<label>Fehler</label>
|
||||
<select class="form-control" name="fehler_kurzbz" id="fehler_kurzbz">
|
||||
<option value="" selected="selected">Alle</option>';
|
||||
<?php foreach ($fehler as $fehler_kurzbz):?>
|
||||
<option value="<?php echo $fehler_kurzbz ?>">
|
||||
<?php echo $fehler_kurzbz ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-3 col-lg-2 form-group text-right">
|
||||
<label> </label>
|
||||
<br />
|
||||
<button class="btn btn-default" id="plausistart">Checks starten</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="well well-sm wellminheight">
|
||||
<h4 class="text-center">Output:</h4>
|
||||
<div id="plausioutput" class="panel panel-body">
|
||||
<div id="plausioutput-text">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -61,8 +61,10 @@ $sql_query = "SELECT
|
||||
FROM
|
||||
(SELECT tbl_person.vorname, tbl_person.nachname, tbl_studiengang.typ, tbl_studiengang.kurzbz,
|
||||
tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung, tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id,
|
||||
tbl_projektbetreuer.betreuerart_kurzbz, tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz
|
||||
FROM lehre.tbl_projektarbeit LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id)
|
||||
tbl_projektbetreuer.betreuerart_kurzbz, tbl_betreuerart.beschreibung AS betreuerart_beschreibung, tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz
|
||||
FROM lehre.tbl_projektarbeit
|
||||
LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id)
|
||||
LEFT JOIN lehre.tbl_betreuerart using(betreuerart_kurzbz)
|
||||
LEFT JOIN public.tbl_benutzer on(uid=student_uid)
|
||||
LEFT JOIN public.tbl_student on(public.tbl_benutzer.uid=public.tbl_student.student_uid)
|
||||
LEFT JOIN public.tbl_person on(tbl_benutzer.person_id=tbl_person.person_id)
|
||||
@@ -75,8 +77,7 @@ $sql_query = "SELECT
|
||||
WHERE public.tbl_benutzer.person_id=lehre.tbl_projektbetreuer.person_id
|
||||
AND public.tbl_benutzer.uid=".$db->db_add_param($getuid).")
|
||||
".($showall?'':' AND public.tbl_benutzer.aktiv AND lehre.tbl_projektarbeit.note IS NULL ')."
|
||||
AND (betreuerart_kurzbz='Betreuer' OR betreuerart_kurzbz='Begutachter' OR betreuerart_kurzbz='Erstbegutachter'
|
||||
OR betreuerart_kurzbz='Zweitbegutachter' OR betreuerart_kurzbz='Erstbetreuer')
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Zweitbegutachter', 'Erstbetreuer', 'Senatsvorsitz', 'Senatsmitglied')
|
||||
ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy
|
||||
ORDER BY nachname";
|
||||
|
||||
@@ -112,7 +113,7 @@ else
|
||||
$htmlstr .= " <td>".strtoupper($row->typ.$row->kurzbz)."</td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->studiensemester_kurzbz)."</td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->titel)."</td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->betreuerart_kurzbz)."</td>\n";
|
||||
$htmlstr .= " <td>".($row->betreuerart_beschreibung == null ? $db->convert_html_chars($row->betreuerart_kurzbz) : $db->convert_html_chars($row->betreuerart_beschreibung))."</td>\n";
|
||||
$htmlstr .= " </tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@@ -127,11 +128,11 @@ echo '
|
||||
<title>'.$p->t('abgabetool/abgabetool').'</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" 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/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
@@ -119,11 +119,12 @@ if(!$projektarbeit_obj->load($projektarbeit_id))
|
||||
die('Fehler beim Laden der Projektarbeit');
|
||||
$titel = $projektarbeit_obj->titel;
|
||||
$student_uid = $projektarbeit_obj->student_uid;
|
||||
$projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz;
|
||||
|
||||
// paarbeit sollte nur ab bestimmten Zeitpunkt online bewertet werden
|
||||
$num_rows_sem = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id);
|
||||
$paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id);
|
||||
|
||||
if(!is_numeric($num_rows_sem) || $num_rows_sem < 0)
|
||||
if(!is_numeric($paIsCurrent) || $paIsCurrent < 0)
|
||||
{
|
||||
echo "<font color=\"#FF0000\">".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."</font><br> ";
|
||||
}
|
||||
@@ -143,27 +144,28 @@ if($num_rows_endupload < 0)
|
||||
}
|
||||
|
||||
// Zweitbegutachter holen
|
||||
if($betreuerart=="Erstbegutachter")
|
||||
if(in_array($betreuerart, array('Erstbegutachter', 'Senatsvorsitz')))
|
||||
{
|
||||
$projektbetreuer = new projektbetreuer();
|
||||
$alleBegutachter = $projektbetreuer->getProjektbetreuer($projektarbeit_id);
|
||||
$alleBegutachter = new projektbetreuer();
|
||||
$alleBegutachterRes = $alleBegutachter->getProjektbetreuer($projektarbeit_id);
|
||||
|
||||
if ($alleBegutachter)
|
||||
if ($alleBegutachterRes)
|
||||
{
|
||||
$alleBegutachterResults = $projektbetreuer->result;
|
||||
|
||||
foreach ($alleBegutachterResults as $begutachter)
|
||||
$zweitbetreuerArr = array();
|
||||
foreach ($alleBegutachter->result as $begutachter)
|
||||
{
|
||||
if ($begutachter->betreuerart_kurzbz == "Erstbegutachter")
|
||||
if (in_array($begutachter->betreuerart_kurzbz, array('Erstbegutachter', 'Senatsvorsitz')))
|
||||
{
|
||||
// dem Erstbetreuer zugewiesene Zweitbetreuer holen
|
||||
$erstbetreuer_id = $begutachter->person_id;
|
||||
$zweitbegutachter = $projektbetreuer->getZweitbegutachterWithToken($erstbetreuer_id, $projektarbeit_id, $student_uid);
|
||||
break;
|
||||
$zweitbegutachter = new projektbetreuer();
|
||||
$zweitbegutachterRes = $zweitbegutachter->getZweitbegutachterWithToken($erstbetreuer_id, $projektarbeit_id, $student_uid);
|
||||
if ($zweitbegutachterRes) $zweitbetreuerArr = array_merge($zweitbetreuerArr, $zweitbegutachter->result);
|
||||
}
|
||||
}
|
||||
|
||||
// Mail mit Token an Zweitbegutachter senden
|
||||
if ($zweitbegutachter && $num_rows_sem >= 1 && isset($_GET['zweitbegutachtertoken']))
|
||||
if (count($zweitbetreuerArr) > 0 && $paIsCurrent >= 1 && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id']))
|
||||
{
|
||||
$qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid);
|
||||
if(!$result_std=$db->db_query($qry_std))
|
||||
@@ -173,15 +175,24 @@ if($betreuerart=="Erstbegutachter")
|
||||
else
|
||||
{
|
||||
$row_std=@$db->db_fetch_object($result_std);
|
||||
$mailres = sendZweitbegutachterMail($zweitbegutachter, $erstbetreuer_id, $row_std);
|
||||
foreach ($zweitbetreuerArr as $zbg)
|
||||
{
|
||||
// if Zweitbetreuer is the one for which token was requested, send mail
|
||||
if ($zbg->person_id == $_GET['zweitbetreuer_person_id'])
|
||||
{
|
||||
$mailres = sendZweitbegutachterMail($zbg, $erstbetreuer_id, $row_std, $projekttyp_kurzbz);
|
||||
|
||||
if ($mailres)
|
||||
{
|
||||
echo "<br><span style='color: green; '>".$p->t('abgabetool/zweitbegutachterMailGesendet', $zweitbegutachter->email)."</span><br> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<font color=\"#FF0000\">".$p->t('abgabetool/fehlerMailZweitBegutachter')." Mail: ".$zweitbegutachter->email."</font><br> ";
|
||||
if ($mailres)
|
||||
{
|
||||
echo "<br><span style='color: green; '>"
|
||||
.$p->t('abgabetool/zweitbegutachterMailGesendet', array($zbg->voller_name, $zbg->email))
|
||||
."</span><br> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<font color=\"#FF0000\">".$p->t('abgabetool/fehlerMailZweitBegutachter')." Mail: ".$zbg->email."</font><br> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,12 +225,14 @@ echo '
|
||||
cursor: pointer;
|
||||
outline: inherit;
|
||||
}
|
||||
|
||||
#zweitbetrmailicon {
|
||||
top: 4px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#tokenmailicon {
|
||||
top: 2px;
|
||||
height: 15px;
|
||||
@@ -227,6 +240,9 @@ echo '
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.warningtext {
|
||||
color: #8a6d3b;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script language="Javascript">
|
||||
@@ -465,12 +481,13 @@ $htmlstr .= "<table id='beurteilungheadertable' width=100%>\n";
|
||||
$htmlstr .= "<tr><td style='font-size:16px'>".$p->t('abgabetool/student').": <b>".$db->convert_html_chars($studentenname)."</b></td>";
|
||||
$htmlstr .= "<td width=10% align=center>";
|
||||
|
||||
$semester_benotbar = $num_rows_sem >= 1;
|
||||
$semester_benotbar = $paIsCurrent >= 1;
|
||||
$endupload_vorhanden = $num_rows_endupload >= 1;
|
||||
|
||||
if ($semester_benotbar && $endupload_vorhanden)
|
||||
{
|
||||
$htmlstr .= "<form action='../../../index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung' title='Benotungsformular' target='_blank' method='GET'>";
|
||||
$beurtPfad = $betreuerart == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$htmlstr .= "<form action='../../../index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/".$beurtPfad."' title='Benotungsformular' target='_blank' method='GET'>";
|
||||
$htmlstr .= "<input type='hidden' name='projektarbeit_id' value='".$projektarbeit_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='uid' value='".$uid."'>\n";
|
||||
$htmlstr .= "<input type='submit' name='note' value='".$p->t('abgabetool/benoten')."'></form>";
|
||||
@@ -496,32 +513,51 @@ else
|
||||
{
|
||||
$htmlstr .= "<td> </td></tr>";
|
||||
}
|
||||
$htmlstr .= "<tr><td style='font-size:16px'>" . $p->t('abgabetool/titel') . ": <b>".$db->convert_html_chars($titel)."<b></td><td></td><td valign=\"right\"><a href='abgabe_student_frameset.php?uid=$uid' target='_blank'>".$p->t('abgabetool/studentenansicht')."</a></td>";
|
||||
$htmlstr .= "<tr>
|
||||
<td style='font-size:16px'>" . $p->t('abgabetool/titel') . ": <b>".$db->convert_html_chars($titel)."<b></td>
|
||||
<td align='center' class='warningtext'>".(isset($quick_info) ? $quick_info : '')."</td>
|
||||
<td valign=\"right\"><a href='abgabe_student_frameset.php?uid=$uid' target='_blank'>".$p->t('abgabetool/studentenansicht')."</a></td>";
|
||||
$htmlstr .= "</tr>\n";
|
||||
if (isset($zweitbegutachter) && $zweitbegutachter) // wenn es Zweitbegutachter gibt
|
||||
|
||||
if (isset($zweitbetreuerArr) && is_array($zweitbetreuerArr)) // wenn es Zweitbetreuer gibt
|
||||
{
|
||||
// Zweitbegutachter anzeigen
|
||||
// Zweitbetreuer anzeigen
|
||||
$htmlstr .= "<tr>\n";
|
||||
$htmlstr .= "<td style='font-size:16px'>" . $p->t('abgabetool/zweitBegutachter') . ": <b>" . $zweitbegutachter->voller_name . "</b>";
|
||||
|
||||
// keine Mail -> Fehler anzeigen
|
||||
if (!isset($zweitbegutachter->email))
|
||||
$htmlstr .= " <img src='../../../skin/images/exclamation.png' title='" . $p->t('abgabetool/zweitBegutachterEmailFehlt') . "' alt='" . $p->t('abgabetool/zweitBegutachterEmailFehlt') . "'/>";
|
||||
|
||||
// Token senden button wenn Zweitbegutachter extern ist und Projektarbeit nicht für altes Semester ist
|
||||
if (isset($zweitbegutachter->email) && !isset($zweitbegutachter->uid) && $num_rows_sem >= 1)
|
||||
$htmlstr .= "<td style='font-size:16px'>";
|
||||
$bart = '';
|
||||
foreach($zweitbetreuerArr as $zweitbetreuer)
|
||||
{
|
||||
$htmlstr .= "<form action='" . htmlspecialchars($_SERVER['PHP_SELF']) . "' method='GET' style='display: inline'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='uid' value='" . $student_uid . "'>";
|
||||
$htmlstr .= "<input type='hidden' name='projektarbeit_id' value='" . $projektarbeit_id . "'>";
|
||||
$htmlstr .= "<input type='hidden' name='betreuerart' value='" . $betreuerart . "'>";
|
||||
$htmlstr .= " <a href='mailto:".$zweitbegutachter->email."'><img id='zweitbetrmailicon' src='../../../skin/images/email.png'
|
||||
title='" . $p->t('abgabetool/zweitbetreuerMailSenden', $zweitbegutachter->email) . "' alt='" . $p->t('abgabetool/zweitbetreuerMailSenden', $zweitbegutachter->email) . "'/></a>\n";
|
||||
$htmlstr .= " <button type='submit' name='zweitbegutachtertoken' title='" . $p->t('abgabetool/zweitbetreuerTokenMailSenden') . "'>
|
||||
<img id='tokenmailicon' src='../../../skin/images/repeat.png' alt='" . $p->t('abgabetool/zweitbetreuerTokenMailSenden') . "'/></button>\n";
|
||||
$htmlstr .= "</form>";
|
||||
}
|
||||
if ($bart !== $zweitbetreuer->betreuerart_kurzbz)
|
||||
{
|
||||
$htmlstr .= ($zweitbetreuer->betreuerart_kurzbz == 'Senatsmitglied' ? $p->t('abgabetool/senatsMitglied') : $p->t('abgabetool/zweitBegutachter'));
|
||||
$htmlstr .= ": ";
|
||||
$bart = $zweitbetreuer->betreuerart_kurzbz;
|
||||
}
|
||||
else
|
||||
$htmlstr .= ", ";
|
||||
|
||||
$htmlstr .= "<b>" . $zweitbetreuer->voller_name . "</b>";
|
||||
|
||||
// keine Mail -> Fehler anzeigen
|
||||
if (!isset($zweitbetreuer->email))
|
||||
$htmlstr .= " <img src='../../../skin/images/exclamation.png' title='" . $p->t('abgabetool/zweitBegutachterEmailFehlt') . "' alt='" . $p->t('abgabetool/zweitBegutachterEmailFehlt') . "'/>";
|
||||
|
||||
// Token senden button wenn Zweitbegutachter extern ist und Projektarbeit nicht für altes Semester ist
|
||||
if (isset($zweitbetreuer->email) && !isset($zweitbetreuer->uid) && $paIsCurrent >= 1)
|
||||
{
|
||||
$htmlstr .= "<form action='" . htmlspecialchars($_SERVER['PHP_SELF']) . "' method='GET' style='display: inline'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='uid' value='" . $student_uid . "'>";
|
||||
$htmlstr .= "<input type='hidden' name='projektarbeit_id' value='" . $projektarbeit_id . "'>";
|
||||
$htmlstr .= "<input type='hidden' name='betreuerart' value='" . $betreuerart . "'>";
|
||||
$htmlstr .= "<input type='hidden' name='zweitbetreuer_person_id' value='" . $zweitbetreuer->person_id . "'>";
|
||||
$htmlstr .= " <a href='mailto:".$zweitbetreuer->email."'><img id='zweitbetrmailicon' src='../../../skin/images/email.png'
|
||||
title='" . $p->t('abgabetool/zweitbetreuerMailSenden', array($zweitbetreuer->voller_name, $zweitbetreuer->email)) . "'
|
||||
alt='" . $p->t('abgabetool/zweitbetreuerMailSenden', array($zweitbetreuer->voller_name, $zweitbetreuer->email)) . "'/></a>\n";
|
||||
$htmlstr .= " <button type='submit' name='zweitbegutachtertoken' title='" . $p->t('abgabetool/zweitbetreuerTokenMailSenden') . "'>
|
||||
<img id='tokenmailicon' src='../../../skin/images/repeat.png' alt='" . $p->t('abgabetool/zweitbetreuerTokenMailSenden') . "'/></button>";
|
||||
$htmlstr .= "</form>";
|
||||
}
|
||||
}
|
||||
$htmlstr .= "</td>\n";
|
||||
$htmlstr .= "<td></td>\n";
|
||||
$htmlstr .= "<td></td>\n";
|
||||
@@ -545,122 +581,122 @@ $htmlstr .= "<tr>
|
||||
<td></td>
|
||||
</tr>\n";
|
||||
$result=@$db->db_query($qry);
|
||||
while ($row=@$db->db_fetch_object($result))
|
||||
while ($row=@$db->db_fetch_object($result))
|
||||
{
|
||||
$htmlstr .= "<form action='".$_SERVER['PHP_SELF']."' method='POST' name='".$row->projektarbeit_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='projektarbeit_id' value='".$row->projektarbeit_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='paabgabe_id' value='".$row->paabgabe_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='uid' value='".$uid."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='betreuerart' value='".$betreuerart."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='command' value='update'>\n";
|
||||
$htmlstr .= "<tr id='".$row->projektarbeit_id."'>\n";
|
||||
if(!$row->abgabedatum)
|
||||
{
|
||||
$htmlstr .= "<form action='".$_SERVER['PHP_SELF']."' method='POST' name='".$row->projektarbeit_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='projektarbeit_id' value='".$row->projektarbeit_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='paabgabe_id' value='".$row->paabgabe_id."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='uid' value='".$uid."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='betreuerart' value='".$betreuerart."'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='command' value='update'>\n";
|
||||
$htmlstr .= "<tr id='".$row->projektarbeit_id."'>\n";
|
||||
if ($row->datum<date('Y-m-d'))
|
||||
{
|
||||
//Termin vorbei - weiß auf rot
|
||||
$bgcol='#FF0000';
|
||||
$fcol='#FFFFFF';
|
||||
}
|
||||
elseif (($row->datum>=date('Y-m-d')) && ($row->datum<date('Y-m-d',mktime(0, 0, 0, date("m") , date("d")+11, date("Y")))))
|
||||
{
|
||||
//Termin nahe - schwarz auf gelb
|
||||
$bgcol='#FFFF00';
|
||||
$fcol='#000000';
|
||||
}
|
||||
else
|
||||
{
|
||||
//"normaler" Termin - schwarz auf weiß
|
||||
$bgcol='#FFFFFF';
|
||||
$fcol='#000000';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row->abgabedatum>$row->datum)
|
||||
{
|
||||
//Abgabe nach Termin - weiß auf hellrot
|
||||
$bgcol='#EA7B7B';
|
||||
$fcol='#FFFFFF';
|
||||
}
|
||||
else
|
||||
{
|
||||
//Abgabe vor Termin - schwarz auf grün
|
||||
$bgcol='#00FF00';
|
||||
$fcol='#000000';
|
||||
}
|
||||
}
|
||||
//$htmlstr .= "<td><input type='checkbox' name='fixtermin' ".($row->fixtermin=='t'?'checked=\"checked\"':'')." >";
|
||||
//$htmlstr .= "<td><input type='checkbox' name='fixtermin' ".($row->fixtermin=='t'?'checked="checked" style="background-color:#FF0000;"':'')." disabled>";
|
||||
if($row->fixtermin=='t')
|
||||
{
|
||||
$htmlstr .= "<td><img src='../../../skin/images/bullet_red.png' alt='J' title='".$p->t('abgabetool/fixerAbgabetermin')."' border=0></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= "<td><img src='../../../skin/images/bullet_green.png' alt='N' title='".$p->t('abgabetool/variablerAbgabetermin')."' border=0></td>";
|
||||
}
|
||||
$htmlstr .= " </td>\n";
|
||||
$htmlstr .= " <td><input type='text' name='datum' style='background-color:".$bgcol.";font-weight:bold; color:".$fcol." ' value='".$datum_obj->formatDatum($row->datum,'d.m.Y')."' size='10' maxlegth='10'></td>\n";
|
||||
$htmlstr .= " <td><select name='paabgabetyp_kurzbz'>\n";
|
||||
//$htmlstr .= " <option value=''> </option>";
|
||||
$qry_typ="SELECT * FROM campus.tbl_paabgabetyp";
|
||||
$result_typ=@$db->db_query($qry_typ);
|
||||
while ($row_typ=@$db->db_fetch_object($result_typ))
|
||||
{
|
||||
if($row->paabgabetyp_kurzbz==$row_typ->paabgabetyp_kurzbz)
|
||||
{
|
||||
$htmlstr .= " <option value='".$row_typ->paabgabetyp_kurzbz."' selected>$row_typ->bezeichnung</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row_typ->paabgabetyp_kurzbz!='end' && $row_typ->paabgabetyp_kurzbz!='note' && $row_typ->paabgabetyp_kurzbz!='enda')
|
||||
{
|
||||
$htmlstr .= " <option value='".$row_typ->paabgabetyp_kurzbz."'>$row_typ->bezeichnung</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$htmlstr .= " </select></td>\n";
|
||||
$htmlstr .= " <td><input type='text' name='kurzbz' value='".htmlspecialchars($row->kurzbz,ENT_QUOTES)."' size='60' maxlegth='256'></td>\n";
|
||||
$htmlstr .= " <td>".($row->abgabedatum==''?' ':$datum_obj->formatDatum($row->abgabedatum,'d.m.Y'))."</td>\n";
|
||||
if($user==$row->insertvon && $betreuerart!="Zweitbegutachter")
|
||||
{
|
||||
$htmlstr .= " <td><input type='submit' name='schick' value='".$p->t('global/speichern')."' title='".$p->t('abgabetool/terminaenderungSpeichern')."'></td>";
|
||||
|
||||
if(!$row->abgabedatum)
|
||||
{
|
||||
if ($row->datum<date('Y-m-d'))
|
||||
{
|
||||
//Termin vorbei - weiß auf rot
|
||||
$bgcol='#FF0000';
|
||||
$fcol='#FFFFFF';
|
||||
}
|
||||
elseif (($row->datum>=date('Y-m-d')) && ($row->datum<date('Y-m-d',mktime(0, 0, 0, date("m") , date("d")+11, date("Y")))))
|
||||
{
|
||||
//Termin nahe - schwarz auf gelb
|
||||
$bgcol='#FFFF00';
|
||||
$fcol='#000000';
|
||||
}
|
||||
else
|
||||
{
|
||||
//"normaler" Termin - schwarz auf weiß
|
||||
$bgcol='#FFFFFF';
|
||||
$fcol='#000000';
|
||||
}
|
||||
$htmlstr .= " <td><input type='submit' name='del' value='".$p->t('global/loeschen')."' onclick='return confdel()' title='".$p->t('abgabetool/terminLoeschen')."'></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row->abgabedatum>$row->datum)
|
||||
{
|
||||
//Abgabe nach Termin - weiß auf hellrot
|
||||
$bgcol='#EA7B7B';
|
||||
$fcol='#FFFFFF';
|
||||
}
|
||||
else
|
||||
{
|
||||
//Abgabe vor Termin - schwarz auf grün
|
||||
$bgcol='#00FF00';
|
||||
$fcol='#000000';
|
||||
}
|
||||
$htmlstr .= " <td> </td>";
|
||||
}
|
||||
//$htmlstr .= "<td><input type='checkbox' name='fixtermin' ".($row->fixtermin=='t'?'checked=\"checked\"':'')." >";
|
||||
//$htmlstr .= "<td><input type='checkbox' name='fixtermin' ".($row->fixtermin=='t'?'checked="checked" style="background-color:#FF0000;"':'')." disabled>";
|
||||
if($row->fixtermin=='t')
|
||||
{
|
||||
$htmlstr .= "<td><img src='../../../skin/images/bullet_red.png' alt='J' title='".$p->t('abgabetool/fixerAbgabetermin')."' border=0></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= "<td><img src='../../../skin/images/bullet_green.png' alt='N' title='".$p->t('abgabetool/variablerAbgabetermin')."' border=0></td>";
|
||||
}
|
||||
$htmlstr .= " </td>\n";
|
||||
$htmlstr .= " <td><input type='text' name='datum' style='background-color:".$bgcol.";font-weight:bold; color:".$fcol." ' value='".$datum_obj->formatDatum($row->datum,'d.m.Y')."' size='10' maxlegth='10'></td>\n";
|
||||
$htmlstr .= " <td><select name='paabgabetyp_kurzbz'>\n";
|
||||
//$htmlstr .= " <option value=''> </option>";
|
||||
$qry_typ="SELECT * FROM campus.tbl_paabgabetyp";
|
||||
$result_typ=@$db->db_query($qry_typ);
|
||||
while ($row_typ=@$db->db_fetch_object($result_typ))
|
||||
{
|
||||
if($row->paabgabetyp_kurzbz==$row_typ->paabgabetyp_kurzbz)
|
||||
{
|
||||
$htmlstr .= " <option value='".$row_typ->paabgabetyp_kurzbz."' selected>$row_typ->bezeichnung</option>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row_typ->paabgabetyp_kurzbz!='end' && $row_typ->paabgabetyp_kurzbz!='note' && $row_typ->paabgabetyp_kurzbz!='enda')
|
||||
{
|
||||
$htmlstr .= " <option value='".$row_typ->paabgabetyp_kurzbz."'>$row_typ->bezeichnung</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$htmlstr .= " </select></td>\n";
|
||||
$htmlstr .= " <td><input type='text' name='kurzbz' value='".htmlspecialchars($row->kurzbz,ENT_QUOTES)."' size='60' maxlegth='256'></td>\n";
|
||||
$htmlstr .= " <td>".($row->abgabedatum==''?' ':$datum_obj->formatDatum($row->abgabedatum,'d.m.Y'))."</td>\n";
|
||||
if($user==$row->insertvon && $betreuerart!="Zweitbegutachter")
|
||||
{
|
||||
$htmlstr .= " <td><input type='submit' name='schick' value='".$p->t('global/speichern')."' title='".$p->t('abgabetool/terminaenderungSpeichern')."'></td>";
|
||||
|
||||
if(!$row->abgabedatum)
|
||||
{
|
||||
$htmlstr .= " <td><input type='submit' name='del' value='".$p->t('global/loeschen')."' onclick='return confdel()' title='".$p->t('abgabetool/terminLoeschen')."'></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td><td> </td>";
|
||||
}
|
||||
if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf'))
|
||||
{
|
||||
$htmlstr .= " <td><a href='".$_SERVER['PHP_SELF']."?id=".$row->paabgabe_id."&uid=$uid' target='_blank'><img src='../../../skin/images/pdf.ico' alt='PDF' title='".$p->t('abgabetool/abgegebeneDatei')."' border=0></a></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td>";
|
||||
}
|
||||
if($row->abgabedatum && $row->paabgabetyp_kurzbz=="end")
|
||||
{
|
||||
$htmlstr .= " <td><a href='abgabe_lektor_zusatz.php?paabgabe_id=".$row->paabgabe_id."&uid=$uid&projektarbeit_id=$projektarbeit_id' target='_blank'><img src='../../../skin/images/folder.gif' alt='zusätzliche Daten' title='".$p->t('abgabetool/kontrolleZusatzdaten')."' border=0></a></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td>";
|
||||
}
|
||||
$htmlstr .= " </tr>\n";
|
||||
|
||||
|
||||
$htmlstr .= "</form>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td><td> </td>";
|
||||
}
|
||||
if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf'))
|
||||
{
|
||||
$htmlstr .= " <td><a href='".$_SERVER['PHP_SELF']."?id=".$row->paabgabe_id."&uid=$uid' target='_blank'><img src='../../../skin/images/pdf.ico' alt='PDF' title='".$p->t('abgabetool/abgegebeneDatei')."' border=0></a></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td>";
|
||||
}
|
||||
if($row->abgabedatum && $row->paabgabetyp_kurzbz=="end")
|
||||
{
|
||||
$htmlstr .= " <td><a href='abgabe_lektor_zusatz.php?paabgabe_id=".$row->paabgabe_id."&uid=$uid&projektarbeit_id=$projektarbeit_id' target='_blank'><img src='../../../skin/images/folder.gif' alt='zusätzliche Daten' title='".$p->t('abgabetool/kontrolleZusatzdaten')."' border=0></a></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= " <td> </td>";
|
||||
}
|
||||
$htmlstr .= " </tr>\n";
|
||||
|
||||
|
||||
$htmlstr .= "</form>\n";
|
||||
}
|
||||
|
||||
//Eingabezeile fuer neuen Termin
|
||||
$htmlstr .= '<form action="'.htmlspecialchars($_SERVER['PHP_SELF']).'" method="POST" name="'.$db->convert_html_chars($projektarbeit_id).'">'."\n";
|
||||
@@ -708,7 +744,7 @@ echo $htmlstr;
|
||||
* @param object $student
|
||||
* @return bool|projektbetreuer|void|null
|
||||
*/
|
||||
function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, $student)
|
||||
function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, $student, $projekttyp_kurzbz)
|
||||
{
|
||||
if (!isset($zweitbegutachter->email) || $zweitbegutachter->email == '')
|
||||
return false;
|
||||
@@ -721,12 +757,20 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id,
|
||||
if (!$projektbetreuer)
|
||||
return $projektbetreuer;
|
||||
|
||||
$zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($erstbegutachter_person_id, $zweitbegutachter->projektarbeit_id, $student->uid);
|
||||
$zweitbetrRes = $projektbetreuer->getZweitbegutachterWithToken(
|
||||
$erstbegutachter_person_id,
|
||||
$zweitbegutachter->projektarbeit_id,
|
||||
$student->uid,
|
||||
$zweitbegutachter->person_id
|
||||
);
|
||||
|
||||
if ($zweitbetr)
|
||||
if ($zweitbetrRes && isset($projektbetreuer->result[0]))
|
||||
{
|
||||
$zweitbetr = $projektbetreuer->result[0];
|
||||
$intern = isset($zweitbetr->uid);
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung";
|
||||
$mail_link_path = $zweitbetr->betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$mail_subject = $projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung';
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/$mail_link_path";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$zweitbegutachter->projektarbeit_id."&uid=".$student->uid;
|
||||
$mail_link = $intern ? $mail_fulllink : $mail_baselink;
|
||||
|
||||
@@ -745,7 +789,7 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id,
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$maildata,
|
||||
$zweitbetr->email,
|
||||
"Masterarbeitsbetreuung",
|
||||
$mail_subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg'
|
||||
);
|
||||
|
||||
@@ -1,248 +1,278 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
|
||||
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/student.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung'));
|
||||
|
||||
$getuid=get_uid();
|
||||
$uid=$getuid;
|
||||
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
//Studentenansicht
|
||||
$uid = $_GET['uid'];
|
||||
//Rechte Pruefen
|
||||
$allowed=false;
|
||||
|
||||
$student = new student();
|
||||
if(!$student->load($uid))
|
||||
die($p->t('global/fehlerBeimErmittelnDerUID'));
|
||||
|
||||
$stg_obj = new studiengang();
|
||||
if(!$stg_obj->load($student->studiengang_kz))
|
||||
die($p->t('global/fehlerBeimLesenAusDatenbank'));
|
||||
|
||||
//Berechtigung ueber das Berechtigungssystem
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($getuid);
|
||||
if($rechte->isBerechtigt('lehre/abgabetool',$stg_obj->oe_kurzbz,'s'))
|
||||
$allowed=true;
|
||||
|
||||
//oder Lektor mit Betreuung dieses Studenten
|
||||
$qry = "SELECT 1
|
||||
FROM
|
||||
lehre.tbl_projektarbeit
|
||||
JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
JOIN campus.vw_benutzer on(vw_benutzer.person_id=tbl_projektbetreuer.person_id)
|
||||
WHERE
|
||||
tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." AND
|
||||
vw_benutzer.uid=".$db->db_add_param($getuid).";";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($db->db_num_rows($result)>0)
|
||||
{
|
||||
$allowed=true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$allowed)
|
||||
{
|
||||
die($p->t('abgabetool/keineBerechtigungStudentenansicht'));
|
||||
}
|
||||
}
|
||||
$htmlstr = '';
|
||||
$htmlstr1 = '';
|
||||
$vorname='';
|
||||
$nachname='';
|
||||
$zweitbetreuer = '';
|
||||
|
||||
$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname,
|
||||
(SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname,
|
||||
(SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre,
|
||||
(SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost,
|
||||
(SELECT person_id FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id,
|
||||
(SELECT betreuerart_kurzbz FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz,
|
||||
tbl_projektbetreuer.person_id AS betreuer_person_id,
|
||||
tbl_projekttyp.bezeichnung AS prjbez, *,
|
||||
lehre.tbl_projektbetreuer.note as note,
|
||||
public.tbl_benutzer.aktiv as aktiv,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuer_person_id = tbl_projektbetreuer.person_id) AS babgeschickt,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_abgeschickt
|
||||
FROM lehre.tbl_projektarbeit
|
||||
LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
LEFT JOIN public.tbl_benutzer ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id)
|
||||
LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
|
||||
WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND (tbl_projektbetreuer.betreuerart_kurzbz='Betreuer'
|
||||
OR tbl_projektbetreuer.betreuerart_kurzbz='Begutachter'
|
||||
OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbetreuer'
|
||||
OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbegutachter')
|
||||
AND tbl_projektarbeit.student_uid=".$db->db_add_param($uid)."
|
||||
ORDER BY studiensemester_kurzbz desc, tbl_lehrveranstaltung.kurzbz";
|
||||
|
||||
//AND tbl_projektarbeit.student_uid='$getuid' 'ie07m102';
|
||||
if(!$erg=$db->db_query($sql_query))
|
||||
{
|
||||
$errormsg=$p->t('global/fehlerBeimLesenAusDatenbank');
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= "<form name='formular'><input type='hidden' name='check' value=''></form><table id='t1' class='tablesorter'>\n";
|
||||
$htmlstr .= "<thead><tr>\n";
|
||||
$htmlstr .= "
|
||||
<th>".$p->t('abgabetool/details')."</th>
|
||||
<th>".$p->t('lvplan/sem')."</th>
|
||||
<th>".$p->t('lvplan/stg')."</th>
|
||||
<th>".$p->t('global/mail')."</th>
|
||||
<th>".$p->t('abgabetool/betreuer')."</th>
|
||||
<th>".$p->t('abgabetool/typ')."</th>
|
||||
<th>".$p->t('abgabetool/titel')."</th>
|
||||
<!--<th>".$p->t('abgabetool/betreuerart')."</th>-->";
|
||||
$htmlstr .= "</tr></thead><tbody>\n";
|
||||
$i = 0;
|
||||
while($row=$db->db_fetch_object($erg))
|
||||
{
|
||||
$htmlstr1 = '';
|
||||
$zweitbetreuer_obj = new person();
|
||||
if ($zweitbetreuer_obj->load($row->zweitbetreuer_person_id))
|
||||
{
|
||||
$zweitbetreuer = ', <b>'.$db->convert_html_chars($row->zweitbetreuer_betreuerart_kurzbz).'</b>: '.$zweitbetreuer_obj->titelpre.' '.$zweitbetreuer_obj->vorname.' '.$zweitbetreuer_obj->nachname.' '.$zweitbetreuer_obj->titelpost;
|
||||
}
|
||||
$htmlstr1 = '<b>'.$db->convert_html_chars($row->betreuerart_kurzbz).'</b>: ';
|
||||
$vorname=$row->vorname;
|
||||
$nachname=$row->nachname;
|
||||
$uid=$row->uid;
|
||||
($row->btitelpre!=''?$htmlstr1 .= $row->btitelpre.' ':$htmlstr1 .= '');
|
||||
$htmlstr1 .= $row->bvorname.' '.$row->bnachname;
|
||||
($row->btitelpost!=''?$htmlstr1 .= ' '.$row->btitelpost:$htmlstr1 .= '');
|
||||
$htmlstr1 .= $zweitbetreuer;
|
||||
$htmlstr .= " <tr>\n"; //class='liste".($i%2)."'
|
||||
|
||||
if (is_null($row->note) && $row->aktiv === 't')
|
||||
$htmlstr .= " <td><a href='abgabe_student_details.php?uid=".$row->uid."&projektarbeit_id=".$row->projektarbeit_id."&bid=".$row->betreuer_person_id."' target='as_detail' title='Details anzeigen'>".$p->t('abgabetool/upload')."</a></td>\n";
|
||||
elseif (!is_null($row->babgeschickt) || !is_null($row->zweitbetreuer_abgeschickt))
|
||||
{
|
||||
$htmlstr .= "<td>";
|
||||
|
||||
if (!is_null($row->babgeschickt))
|
||||
$htmlstr .= "<a href='../pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz=" . $row->betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->betreuer_person_id ."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungErstDownload')."</a>";
|
||||
|
||||
if (!is_null($row->babgeschickt) && !is_null($row->zweitbetreuer_abgeschickt))
|
||||
$htmlstr .= "/";
|
||||
|
||||
if (!is_null($row->zweitbetreuer_abgeschickt))
|
||||
$htmlstr .= "<a href='../pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz=" . $row->zweitbetreuer_betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->zweitbetreuer_person_id."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungZweitDownload')."</a>";
|
||||
|
||||
$htmlstr .= "</td>";
|
||||
} else
|
||||
{
|
||||
$htmlstr .= "<td></td>";
|
||||
}
|
||||
|
||||
|
||||
$htmlstr .= " <td>".$row->studiensemester_kurzbz."</td>\n";
|
||||
$htmlstr .= " <td>".strtoupper($row->typ.$row->kurzbz)."</td>\n";
|
||||
$htmlstr .= " <td align= center>";
|
||||
|
||||
$qry_betr="SELECT mitarbeiter_uid FROM public.tbl_person
|
||||
JOIN public.tbl_benutzer USING(person_id)
|
||||
JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid)
|
||||
WHERE person_id=".$db->db_add_param($row->betreuer_person_id, FHC_INTEGER).";";
|
||||
if($result_betr=$db->db_query($qry_betr))
|
||||
{
|
||||
if($row_betr=$db->db_fetch_object($result_betr))
|
||||
{
|
||||
$htmlstr.="<a href='mailto:$row_betr->mitarbeiter_uid@".DOMAIN."?subject=Betreuung%20".$row->prjbez."%20von%20".$row->vorname."%20".$row->nachname."'><img src='../../../skin/images/email.png' alt='email' title='".$p->t('abgabetool/emailAnBetreuer')."'></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr.="UID unknown!";
|
||||
}
|
||||
}
|
||||
$htmlstr .= " </td>";
|
||||
$htmlstr .= " <td>".$htmlstr1." </td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->prjbez)."</td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->titel)."</td>\n";
|
||||
// $htmlstr .= " <td>".$db->convert_html_chars($row->betreuerart_kurzbz)."</td>\n";
|
||||
$htmlstr .= " </tr>\n";
|
||||
$i++;
|
||||
}
|
||||
$htmlstr .= "</tbody></table>\n";
|
||||
}
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Abgabesystem_Studentensicht</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" 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/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[4,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>';
|
||||
|
||||
echo '<h1><div style="float:left">'.$p->t('abgabetool/ueberschrift');
|
||||
if(trim($uid)!='')
|
||||
echo " ($uid $vorname $nachname)</div> <div style='text-align:right'><a href='".$p->t('dms_link/abgabetoolStudentHandbuch')."' target='_blank'><img src='../../../skin/images/information.png' alt='Anleitung' title='Anleitung Abgabetool' border=0> ".$p->t('global/handbuch')."</a></div>";
|
||||
echo '</h1>';
|
||||
echo $htmlstr;
|
||||
echo '</body>
|
||||
</html>';
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2009 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
|
||||
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/student.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/projektbetreuer.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung'));
|
||||
|
||||
$getuid=get_uid();
|
||||
$uid=$getuid;
|
||||
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
//Studentenansicht
|
||||
$uid = $_GET['uid'];
|
||||
//Rechte Pruefen
|
||||
$allowed=false;
|
||||
|
||||
$student = new student();
|
||||
if(!$student->load($uid))
|
||||
die($p->t('global/fehlerBeimErmittelnDerUID'));
|
||||
|
||||
$stg_obj = new studiengang();
|
||||
if(!$stg_obj->load($student->studiengang_kz))
|
||||
die($p->t('global/fehlerBeimLesenAusDatenbank'));
|
||||
|
||||
//Berechtigung ueber das Berechtigungssystem
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($getuid);
|
||||
if($rechte->isBerechtigt('lehre/abgabetool',$stg_obj->oe_kurzbz,'s'))
|
||||
$allowed=true;
|
||||
|
||||
//oder Lektor mit Betreuung dieses Studenten
|
||||
$qry = "SELECT 1
|
||||
FROM
|
||||
lehre.tbl_projektarbeit
|
||||
JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
JOIN campus.vw_benutzer on(vw_benutzer.person_id=tbl_projektbetreuer.person_id)
|
||||
WHERE
|
||||
tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." AND
|
||||
vw_benutzer.uid=".$db->db_add_param($getuid).";";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($db->db_num_rows($result)>0)
|
||||
{
|
||||
$allowed=true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$allowed)
|
||||
{
|
||||
die($p->t('abgabetool/keineBerechtigungStudentenansicht'));
|
||||
}
|
||||
}
|
||||
$htmlstr = '';
|
||||
$htmlstr1 = '';
|
||||
$vorname='';
|
||||
$nachname='';
|
||||
$zweitbetreuer = '';
|
||||
$senatsmitglied = '';
|
||||
|
||||
$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname,
|
||||
(SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname,
|
||||
(SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre,
|
||||
(SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost,
|
||||
tbl_betreuerart.beschreibung AS betreuerart_beschreibung,
|
||||
(SELECT person_id FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id,
|
||||
(SELECT betreuerart_kurzbz FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz,
|
||||
(SELECT tbl_betreuerart.beschreibung FROM lehre.tbl_projektbetreuer JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz) WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied') LIMIT 1) AS zweitbetreuer_betreuerart_beschreibung,
|
||||
tbl_projektbetreuer.person_id AS betreuer_person_id,
|
||||
tbl_projekttyp.bezeichnung AS prjbez, *,
|
||||
lehre.tbl_projektbetreuer.note as note,
|
||||
public.tbl_benutzer.aktiv as aktiv,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuer_person_id = tbl_projektbetreuer.person_id) AS babgeschickt,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_abgeschickt
|
||||
FROM lehre.tbl_projektarbeit
|
||||
LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
LEFT JOIN public.tbl_benutzer ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id)
|
||||
LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
|
||||
LEFT JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz)
|
||||
WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz')
|
||||
AND tbl_projektarbeit.student_uid=".$db->db_add_param($uid)."
|
||||
ORDER BY studiensemester_kurzbz desc, tbl_lehrveranstaltung.kurzbz";
|
||||
|
||||
//AND tbl_projektarbeit.student_uid='$getuid' 'ie07m102';
|
||||
if(!$erg=$db->db_query($sql_query))
|
||||
{
|
||||
$errormsg=$p->t('global/fehlerBeimLesenAusDatenbank');
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr .= "<form name='formular'><input type='hidden' name='check' value=''></form><table id='t1' class='tablesorter'>\n";
|
||||
$htmlstr .= "<thead><tr>\n";
|
||||
$htmlstr .= "
|
||||
<th>".$p->t('abgabetool/details')."</th>
|
||||
<th>".$p->t('lvplan/sem')."</th>
|
||||
<th>".$p->t('lvplan/stg')."</th>
|
||||
<th>".$p->t('global/mail')."</th>
|
||||
<th>".$p->t('abgabetool/betreuer')."</th>
|
||||
<th>".$p->t('abgabetool/typ')."</th>
|
||||
<th>".$p->t('abgabetool/titel')."</th>
|
||||
<!--<th>".$p->t('abgabetool/betreuerart')."</th>-->";
|
||||
$htmlstr .= "</tr></thead><tbody>\n";
|
||||
$i = 0;
|
||||
while($row=$db->db_fetch_object($erg))
|
||||
{
|
||||
// get zweitbetreuer, if any
|
||||
$htmlstr1 = '';
|
||||
$zweitbetreuer_obj = new person();
|
||||
if ($zweitbetreuer_obj->load($row->zweitbetreuer_person_id))
|
||||
{
|
||||
$zweitbetreuer = ', <b>'.$db->convert_html_chars($row->zweitbetreuer_betreuerart_kurzbz).'</b>: '.$zweitbetreuer_obj->titelpre.' '.$zweitbetreuer_obj->vorname.' '.$zweitbetreuer_obj->nachname.' '.$zweitbetreuer_obj->titelpost;
|
||||
}
|
||||
|
||||
// get senatsmitglied, if any
|
||||
if ($row->betreuerart_kurzbz == 'Senatsvorsitz')
|
||||
{
|
||||
// write beschreibung of Betreuerart for Senatsvorsitz
|
||||
$htmlstr1 = '<b>'.$db->convert_html_chars($row->betreuerart_beschreibung).'</b>: ';
|
||||
|
||||
$senatsmitglied_obj = new projektbetreuer();
|
||||
$senatsmitgliedRes = $senatsmitglied_obj->getZweitbegutachterWithToken($row->betreuer_person_id, $row->projektarbeit_id, $row->uid);
|
||||
if ($senatsmitgliedRes)
|
||||
{
|
||||
$senatsmitglied .= ', <b>'.$db->convert_html_chars($row->zweitbetreuer_betreuerart_beschreibung).'</b>: ';
|
||||
$first = true;
|
||||
foreach($senatsmitglied_obj->result as $spr)
|
||||
{
|
||||
if (!$first)
|
||||
$senatsmitglied .= ', ';
|
||||
$senatsmitglied .= $spr->voller_name;
|
||||
$first = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$htmlstr1 = '<b>'.$db->convert_html_chars($row->betreuerart_kurzbz).'</b>: ';
|
||||
|
||||
$vorname=$row->vorname;
|
||||
$nachname=$row->nachname;
|
||||
$uid=$row->uid;
|
||||
|
||||
($row->btitelpre!=''?$htmlstr1 .= $row->btitelpre.' ':$htmlstr1 .= '');
|
||||
$htmlstr1 .= $row->bvorname.' '.$row->bnachname;
|
||||
($row->btitelpost!=''?$htmlstr1 .= ' '.$row->btitelpost:$htmlstr1 .= '');
|
||||
$htmlstr1 .= $zweitbetreuer;
|
||||
$htmlstr1 .= $senatsmitglied;
|
||||
$htmlstr .= " <tr>\n"; //class='liste".($i%2)."'
|
||||
|
||||
if (is_null($row->note) && $row->aktiv === 't')
|
||||
$htmlstr .= " <td><a href='abgabe_student_details.php?uid=".$row->uid."&projektarbeit_id=".$row->projektarbeit_id."&bid=".$row->betreuer_person_id."' target='as_detail' title='Details anzeigen'>".$p->t('abgabetool/upload')."</a></td>\n";
|
||||
elseif (!is_null($row->babgeschickt) || !is_null($row->zweitbetreuer_abgeschickt))
|
||||
{
|
||||
$htmlstr .= "<td>";
|
||||
|
||||
if (!is_null($row->babgeschickt))
|
||||
$htmlstr .= "<a href='../pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz=" . $row->betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->betreuer_person_id ."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungErstDownload')."</a>";
|
||||
|
||||
if (!is_null($row->babgeschickt) && !is_null($row->zweitbetreuer_abgeschickt))
|
||||
$htmlstr .= "/";
|
||||
|
||||
if (!is_null($row->zweitbetreuer_abgeschickt))
|
||||
$htmlstr .= "<a href='../pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz=" . $row->zweitbetreuer_betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->zweitbetreuer_person_id."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungZweitDownload')."</a>";
|
||||
|
||||
$htmlstr .= "</td>";
|
||||
} else
|
||||
{
|
||||
$htmlstr .= "<td>".$row->note."</td>";
|
||||
}
|
||||
|
||||
|
||||
$htmlstr .= " <td>".$row->studiensemester_kurzbz."</td>\n";
|
||||
$htmlstr .= " <td>".strtoupper($row->typ.$row->kurzbz)."</td>\n";
|
||||
$htmlstr .= " <td align= center>";
|
||||
|
||||
$qry_betr="SELECT mitarbeiter_uid FROM public.tbl_person
|
||||
JOIN public.tbl_benutzer USING(person_id)
|
||||
JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid)
|
||||
WHERE person_id=".$db->db_add_param($row->betreuer_person_id, FHC_INTEGER).";";
|
||||
if($result_betr=$db->db_query($qry_betr))
|
||||
{
|
||||
if($row_betr=$db->db_fetch_object($result_betr))
|
||||
{
|
||||
$htmlstr.="<a href='mailto:$row_betr->mitarbeiter_uid@".DOMAIN."?subject=Betreuung%20".$row->prjbez."%20von%20".$row->vorname."%20".$row->nachname."'><img src='../../../skin/images/email.png' alt='email' title='".$p->t('abgabetool/emailAnBetreuer')."'></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstr.="UID unknown!";
|
||||
}
|
||||
}
|
||||
$htmlstr .= " </td>";
|
||||
$htmlstr .= " <td>".$htmlstr1." </td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->prjbez)."</td>\n";
|
||||
$htmlstr .= " <td>".$db->convert_html_chars($row->titel)."</td>\n";
|
||||
// $htmlstr .= " <td>".$db->convert_html_chars($row->betreuerart_kurzbz)."</td>\n";
|
||||
$htmlstr .= " </tr>\n";
|
||||
$i++;
|
||||
}
|
||||
$htmlstr .= "</tbody></table>\n";
|
||||
}
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Abgabesystem_Studentensicht</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" 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/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[4,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>';
|
||||
|
||||
echo '<h1><div style="float:left">'.$p->t('abgabetool/ueberschrift');
|
||||
if(trim($uid)!='')
|
||||
echo " ($uid $vorname $nachname)</div> <div style='text-align:right'><a href='".$p->t('dms_link/abgabetoolStudentHandbuch')."' target='_blank'><img src='../../../skin/images/information.png' alt='Anleitung' title='Anleitung Abgabetool' border=0> ".$p->t('global/handbuch')."</a></div>";
|
||||
echo '</h1>';
|
||||
echo $htmlstr;
|
||||
echo '</body>
|
||||
</html>';
|
||||
?>
|
||||
|
||||
@@ -433,8 +433,10 @@ if($command=="update" && $error!=true)
|
||||
$row_std=$db->db_fetch_object($result_std);
|
||||
|
||||
// 1. Begutachter mail ohne Token
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung";
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$row_std->uid;
|
||||
$projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz;
|
||||
$subject = $projektarbeit_obj->projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung';
|
||||
$abgabetyp = $paabgabetyp_kurzbz == 'end' ? 'Endabgabe' : 'Zwischenabgabe';
|
||||
|
||||
$maildata = array();
|
||||
@@ -452,7 +454,7 @@ if($command=="update" && $error!=true)
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$maildata,
|
||||
$row_betr->mitarbeiter_uid."@".DOMAIN,
|
||||
"Bachelor-/Masterarbeitsbetreuung",
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
$user."@".DOMAIN);
|
||||
@@ -465,48 +467,66 @@ if($command=="update" && $error!=true)
|
||||
// 2. Begutachter mail, wenn Endabgabe, mit Token wenn extern
|
||||
if ($paabgabetyp_kurzbz == 'end')
|
||||
{
|
||||
$projektbetreuer = new projektbetreuer();
|
||||
$zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid);
|
||||
// Zweitbegutachter holen
|
||||
$zweitbegutachter = new projektbetreuer();
|
||||
$zweitbegutachterRes = $zweitbegutachter->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid);
|
||||
|
||||
if ($zweitbetr)
|
||||
if ($zweitbegutachterRes)
|
||||
{
|
||||
$tokenGenRes = $projektbetreuer->generateZweitbegutachterToken($zweitbetr->person_id, $projektarbeit_id);
|
||||
$zweitbegutachterResults = $zweitbegutachter->result;
|
||||
|
||||
if (!$tokenGenRes)
|
||||
echo "<font color=\"#FF0000\">" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "</font><br> ";
|
||||
|
||||
$zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid);
|
||||
|
||||
if (!$zweitbetr)
|
||||
echo "<font color=\"#FF0000\">" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "</font><br> ";
|
||||
|
||||
$intern = isset($zweitbetr->uid);
|
||||
$mail_link = $intern ? $mail_fulllink : $mail_baselink;
|
||||
|
||||
$zweitbetmaildata = array();
|
||||
$zweitbetmaildata['geehrt'] = "geehrte" . ($zweitbetr->anrede == "Herr" ? "r" : "");
|
||||
$zweitbetmaildata['anrede'] = $zweitbetr->anrede;
|
||||
$zweitbetmaildata['betreuer_voller_name'] = $zweitbetr->voller_name;
|
||||
$zweitbetmaildata['student_anrede'] = $maildata['student_anrede'];
|
||||
$zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name'];
|
||||
$zweitbetmaildata['abgabetyp'] = $abgabetyp;
|
||||
$zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : "";
|
||||
$zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "<p><a href='$mail_link'>Zur Beurteilung der Arbeit</a></p>" : "";
|
||||
$zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($zweitbetr->zugangstoken) && !$intern ? "<p>Zugangstoken: " . $zweitbetr->zugangstoken . "</p>" : "";
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$zweitbetmaildata,
|
||||
$zweitbetr->email,
|
||||
"Masterarbeitsbetreuung",
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
$user . "@" . DOMAIN
|
||||
);
|
||||
|
||||
if (!$mailres)
|
||||
foreach ($zweitbegutachterResults as $begutachter)
|
||||
{
|
||||
echo "<font color=\"#FF0000\">" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "</font><br> ";
|
||||
// token generieren, wenn noch nicht vorhanden und notwendig (wird in methode überprüft)
|
||||
$tokenGenRes = $zweitbegutachter->generateZweitbegutachterToken($begutachter->person_id, $projektarbeit_id);
|
||||
|
||||
if (!$tokenGenRes)
|
||||
echo "<font color=\"#FF0000\">" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "</font><br> ";
|
||||
|
||||
// Zweitbegutachter (evtl. mit Token) holen
|
||||
$zweitbegutachterMitToken = new projektbetreuer();
|
||||
$begutachterMitTokenRes = $zweitbegutachterMitToken->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid, $begutachter->person_id);
|
||||
|
||||
if (!$begutachterMitTokenRes)
|
||||
echo "<font color=\"#FF0000\">" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "</font><br> ";
|
||||
|
||||
// Email an Zweitbegutachter senden
|
||||
if (isset($zweitbegutachterMitToken->result[0]))
|
||||
{
|
||||
$begutachterMitToken = $zweitbegutachterMitToken->result[0];
|
||||
|
||||
$path = $begutachterMitToken->betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/$path";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$row_std->uid;
|
||||
$intern = isset($begutachterMitToken->uid);
|
||||
$mail_link = $intern ? $mail_fulllink : $mail_baselink;
|
||||
|
||||
$zweitbetmaildata = array();
|
||||
$zweitbetmaildata['geehrt'] = "geehrte" . ($begutachterMitToken->anrede == "Herr" ? "r" : "");
|
||||
$zweitbetmaildata['anrede'] = $begutachterMitToken->anrede;
|
||||
$zweitbetmaildata['betreuer_voller_name'] = $begutachterMitToken->voller_name;
|
||||
$zweitbetmaildata['student_anrede'] = $maildata['student_anrede'];
|
||||
$zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name'];
|
||||
$zweitbetmaildata['abgabetyp'] = $abgabetyp;
|
||||
$zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : "";
|
||||
$zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "<p><a href='$mail_link'>Zur Beurteilung der Arbeit</a></p>" : "";
|
||||
$zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($begutachterMitToken->zugangstoken) && !$intern ? "<p>Zugangstoken: " . $begutachterMitToken->zugangstoken . "</p>" : "";
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$zweitbetmaildata,
|
||||
$begutachterMitToken->email,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
$user . "@" . DOMAIN
|
||||
);
|
||||
|
||||
if (!$mailres)
|
||||
{
|
||||
echo "<font color=\"#FF0000\">" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "</font><br> ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -922,7 +922,7 @@ if (isset($_REQUEST["freigabe"]) && ($_REQUEST["freigabe"] == 1))
|
||||
$name = $mit->anrede.' '.$mit->vorname.' '.$mit->nachname.' ('.$mit->kurzbz.')';
|
||||
|
||||
$betreff = 'Notenfreigabe ' . $lv->bezeichnung . ' ' . $lv->orgform_kurzbz . ' - ' . $studienplan_bezeichnung;
|
||||
$mail = new mail($adressen, 'vilesci@' . DOMAIN, $betreff, '');
|
||||
$mail = new mail($adressen, 'no-reply@' . DOMAIN, $betreff, '');
|
||||
$htmlcontent = "<html>
|
||||
<body>
|
||||
$name hat neue Noten für die Lehrveranstaltung\n\n<br>
|
||||
@@ -931,10 +931,10 @@ if (isset($_REQUEST["freigabe"]) && ($_REQUEST["freigabe"] == 1))
|
||||
<br>eingetragen.\n<br><br>
|
||||
Die Noten können jetzt ins Zeugnis übernommen werden.\n";
|
||||
|
||||
$htmlcontent .= $studlist;
|
||||
$htmlcontent .= $studlist;
|
||||
|
||||
$htmlcontent.= "
|
||||
<br>Anzahl der Noten:" . $neuenoten . "
|
||||
<br>Anzahl der Noten: " . $neuenoten . "
|
||||
<br><br>" . $p->t('abgabetool/mailVerschicktAn') . ": " . $adressen . "
|
||||
</body></html>";
|
||||
$mail->setHTMLContent($htmlcontent);
|
||||
|
||||
@@ -180,7 +180,8 @@ $qry = 'SELECT DISTINCT ON
|
||||
tbl_person.matr_nr,
|
||||
tbl_person.geschlecht,
|
||||
tbl_person.foto,
|
||||
tbl_person.foto_sperre
|
||||
tbl_person.foto_sperre,
|
||||
(tbl_bisio.bis::timestamp - tbl_bisio.von::timestamp) as daysout
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung
|
||||
JOIN public.tbl_benutzer USING(uid)
|
||||
@@ -200,7 +201,7 @@ $qry = 'SELECT DISTINCT ON
|
||||
if ($lehreinheit != '')
|
||||
$qry .= ' AND vw_student_lehrveranstaltung.lehreinheit_id=' . $db->db_add_param($lehreinheit, FHC_INTEGER);
|
||||
|
||||
$qry .= ' ORDER BY nachname, vorname, person_id, tbl_bisio.bis DESC';
|
||||
$qry .= ' ORDER BY nachname, vorname, person_id, daysout DESC';
|
||||
|
||||
$stsem_obj = new studiensemester();
|
||||
$stsem_obj->load($studiensemester);
|
||||
@@ -289,7 +290,7 @@ if ($result = $db->db_query($qry)) {
|
||||
'personenkennzeichen' => trim($row->matrikelnr),
|
||||
'geschlecht' => $row->geschlecht,
|
||||
'foto_gesperrt' => $row->foto_sperre, // f/t
|
||||
'foto_url' => $foto_url,
|
||||
'foto_url' => 'Pictures/' . trim($row->person_id) . '.jpg',
|
||||
'studiengruppe' => $student_studiengruppe,
|
||||
'verband' => trim($row->verband),
|
||||
'gruppe' => trim($row->gruppe),
|
||||
|
||||
@@ -353,10 +353,9 @@ function writePruefungsTable(e, data, anmeldung)
|
||||
var time = termin[1].substring(0,5);
|
||||
termin = termin[0].split("-");
|
||||
|
||||
// Wie viele Monate vor Prüfungen dürfen sich Studierende anmelden?
|
||||
// Sperre "deaktiviert" indem man sich 24 Monate vorher anmelden darf
|
||||
// Studierende dürfen sich 2 Monate vor Prüfungen anmelden
|
||||
var minimumFrist = new Date(termin[0], termin[1]-1,termin[2]);
|
||||
minimumFrist.setMonth(minimumFrist.getMonth() - 24);
|
||||
minimumFrist.setMonth(minimumFrist.getMonth() - 2);
|
||||
|
||||
termin = new Date(termin[0], termin[1]-1,termin[2]);
|
||||
var frist = termin;
|
||||
|
||||
@@ -150,14 +150,14 @@ if (isset($_GET['betreuerart_kurzbz']))
|
||||
if (isset($_GET['xsl']) && $_GET['xsl'] == 'Zahlung')
|
||||
{
|
||||
$requestdata = $_SERVER['QUERY_STRING'];
|
||||
|
||||
|
||||
$log = new Webservicelog();
|
||||
$log->webservicetyp_kurzbz = 'content';
|
||||
$log->request_id = isset($_GET['buchungsnummern']) && !empty($_GET['buchungsnummern']) ? $_GET['buchungsnummern'] : NULL;
|
||||
$log->beschreibung = 'Zahlungsbestaetigungsdownload';
|
||||
$log->request_data = $requestdata;
|
||||
$log->execute_user = get_uid();
|
||||
|
||||
|
||||
$log->save(true);
|
||||
}
|
||||
|
||||
@@ -207,6 +207,7 @@ if (isset($_GET['xsl']) && ($_GET['xsl'] === 'Projektbeurteilung'))
|
||||
switch ($_GET['betreuerart_kurzbz'])
|
||||
{
|
||||
case 'Begutachter' :
|
||||
case 'Senatsvorsitz' :
|
||||
$xsl = 'ProjektBeurteilungBA';
|
||||
break;
|
||||
case 'Erstbegutachter' :
|
||||
|
||||
+248
-206
@@ -16,8 +16,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
|
||||
* Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Seite zum Eintragen von Urlaubstagen
|
||||
@@ -30,11 +31,13 @@ require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../include/mail.class.php');
|
||||
require_once('../../../include/sancho.inc.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');
|
||||
|
||||
$datum_obj = new datum();
|
||||
$sprache = getSprache();
|
||||
$lang = new sprache();
|
||||
$lang->load($sprache);
|
||||
@@ -49,8 +52,8 @@ $mehrarbeitsstunden = '0';
|
||||
$anspruch = '25';
|
||||
$zaehl=1;
|
||||
$tage=array(); //Array Tage für Kalenderanzeige
|
||||
$hgfarbe=array_fill(0,44,'#E9ECEE'); //Array mit Hintegrundfarben der Kalenderfelder
|
||||
$datensatz=array_fill(0,44,0);
|
||||
$hgfarbe=array_fill(0, 44, '#E9ECEE'); //Array mit Hintegrundfarben der Kalenderfelder
|
||||
$datensatz=array_fill(0, 44, 0);
|
||||
$freigabevon=array();
|
||||
$freigabeamum=array();
|
||||
$vertretung_uid=array();
|
||||
@@ -60,26 +63,26 @@ $erreichbarkeit_kurzbz=array();
|
||||
//$monatsname = array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
|
||||
|
||||
$jahre = array(); //Array Jahreszahlen für Auswahl (immer aktuelles Jahr und die 4 nächsten Jahre)
|
||||
$akette=array_fill(0,1,0);
|
||||
$ekette=array_fill(0,1,0);
|
||||
$links='';
|
||||
$rechts='';
|
||||
$tag=array();
|
||||
$vertretung='';
|
||||
$erreichbar='';
|
||||
$vgmail='';
|
||||
$vtmail='';
|
||||
$spmonat=array();
|
||||
$hgchange=false;
|
||||
$wvon='';
|
||||
$wbis='';
|
||||
$datensatz='';
|
||||
$t=getdate();
|
||||
$akette = array_fill(0, 1, 0);
|
||||
$ekette = array_fill(0, 1, 0);
|
||||
$links = '';
|
||||
$rechts = '';
|
||||
$tag = array();
|
||||
$vertretung = '';
|
||||
$erreichbar = '';
|
||||
$vgmail = '';
|
||||
$vtmail = '';
|
||||
$spmonat = array();
|
||||
$hgchange = false;
|
||||
$wvon = '';
|
||||
$wbis = '';
|
||||
$datensatz = '';
|
||||
$t = getdate();
|
||||
$uid = get_uid();
|
||||
$taste=0;
|
||||
$taste = 0;
|
||||
|
||||
$ma= new mitarbeiter();
|
||||
for($i=0;$i<6;$i++)
|
||||
$ma = new mitarbeiter();
|
||||
for($i = 0; $i<6; $i++)
|
||||
{
|
||||
$jahre[$i]="$t[year]"+($i-1);
|
||||
}
|
||||
@@ -118,14 +121,13 @@ else
|
||||
}
|
||||
if (isset($_GET['hgfarbe']))
|
||||
{
|
||||
$hgfarbe=explode(",",$_GET['hgfarbe']);
|
||||
$hgfarbe=explode(",", $_GET['hgfarbe']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (!isset($_GET['spmonat']))
|
||||
{
|
||||
for($i=0;$i<44;$i++)
|
||||
for($i=0; $i<44; $i++)
|
||||
{
|
||||
if(!isset($hgfarbe[$i]) || $hgfarbe[$i]!='#FFFC7F')
|
||||
$hgfarbe[$i]='#E9ECEE';
|
||||
@@ -167,71 +169,76 @@ if (isset($_GET['rechts_x']) || isset($_POST['rechts_x']))
|
||||
|
||||
//Bereits freigegebenen Eintrag löschen
|
||||
//Eintragung löschen
|
||||
if((isset($_GET['delete']) && isset($_GET['informSupervisor'])) || (isset($_POST['delete']) && isset($_POST['informSupervisor'])))
|
||||
{
|
||||
$zeitsperre = new zeitsperre();
|
||||
$zeitsperre->load($_GET['delete']);
|
||||
|
||||
$vondatum = $zeitsperre->getVonDatum();
|
||||
$bisdatum = $zeitsperre->getBisDatum();
|
||||
|
||||
if(!$zeitsperre->delete($_GET['delete']))
|
||||
echo $zeitsperre->errormsg;
|
||||
|
||||
//Mail an Vorgesetzten
|
||||
$prsn = new person();
|
||||
|
||||
$vorgesetzter = $ma->getVorgesetzte($uid);
|
||||
if($vorgesetzter)
|
||||
{
|
||||
$to='';
|
||||
$fullName ='';
|
||||
foreach($ma->vorgesetzte as $vg)
|
||||
{
|
||||
if($to!='')
|
||||
{
|
||||
$to.=', '.$vg.'@'.DOMAIN;
|
||||
$name = $prsn->getFullNameFromBenutzer($vg);
|
||||
$fullName.=', '.$name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$to.=$vg.'@'.DOMAIN;
|
||||
$name = $prsn->getFullNameFromBenutzer($vg);
|
||||
$fullName.=$name;
|
||||
}
|
||||
}
|
||||
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($uid);
|
||||
$message = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n".
|
||||
$p->t('urlaubstool/xHatUrlaubGeloescht',array($benutzer->nachname,$benutzer->vorname)).":\n";
|
||||
$message.= $p->t('urlaubstool/von')." ".date("d.m.Y", strtotime($vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($bisdatum))."\n";
|
||||
|
||||
|
||||
$mail = new mail($to, 'vilesci@'.DOMAIN,$p->t('urlaubstool/freigegebenerUrlaubGeloescht'), $message);
|
||||
if($mail->send())
|
||||
{
|
||||
$vgmail="<span style='color:green;'>".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName))."</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$vgmail="<br><span class='error'>".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!</span>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$vgmail="<br><span class='error'>".$p->t('urlaubstool/konnteKeinFreigabemailVersendetWerden')."</span>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Eintragung löschen
|
||||
if((isset($_GET['delete']) || isset($_POST['delete'])))
|
||||
if(isset($_GET['delete']))
|
||||
{
|
||||
$zeitsperre = new zeitsperre();
|
||||
$zeitsperre->load($_GET['delete']);
|
||||
|
||||
$vondatum = $zeitsperre->getVonDatum();
|
||||
$bisdatum = $zeitsperre->getBisDatum();
|
||||
$vondatum = $datum_obj->formatDatum($vondatum, 'd.m.Y');
|
||||
$bisdatum = $datum_obj->formatDatum($bisdatum, 'd.m.Y');
|
||||
|
||||
if(!$zeitsperre->delete($_GET['delete']))
|
||||
{
|
||||
echo $zeitsperre->errormsg;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Mail an Vorgesetzten
|
||||
$prsn = new person();
|
||||
|
||||
$vorgesetzter = $ma->getVorgesetzte($uid);
|
||||
if($vorgesetzter)
|
||||
{
|
||||
$to='';
|
||||
$fullName ='';
|
||||
foreach($ma->vorgesetzte as $vg)
|
||||
{
|
||||
if($to!='')
|
||||
{
|
||||
$to.=', '.$vg.'@'.DOMAIN;
|
||||
$name = $prsn->getFullNameFromBenutzer($vg);
|
||||
$fullName.=', '.$name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$to.=$vg.'@'.DOMAIN;
|
||||
$name = $prsn->getFullNameFromBenutzer($vg);
|
||||
$fullName.=$name;
|
||||
}
|
||||
}
|
||||
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($uid);
|
||||
|
||||
//new sanchomail
|
||||
$nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname;
|
||||
$beschreibung = $zeitsperre->bezeichnung;
|
||||
$subject = "Urlaub wurde gelöscht";
|
||||
$mailvorlage = 'Sancho_Mail_Urlaub_Loeschen';
|
||||
|
||||
$from='vilesci@'.DOMAIN;
|
||||
|
||||
//Sanchomail mit Vorlage Sancho Mail Urlaub
|
||||
$template_data = array(
|
||||
'vorgesetzter' => $fullName,
|
||||
'nameMitarbeiter' => $nameMitarbeiter,
|
||||
'beschreibung' =>$beschreibung,
|
||||
'vonDatum' => $vondatum,
|
||||
'bisDatum' => $bisdatum
|
||||
);
|
||||
|
||||
if (sendSanchoMail($mailvorlage, $template_data, $to, $subject))
|
||||
{
|
||||
$vgmail="<span style='color:green;'>".$p->t('urlaubstool/VorgesetzteInformiert', array($fullName))."</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$vgmail="<br><span class='error'>".$p->t('urlaubstool/fehlerBeimSendenAufgetreten', array($fullName))."!</span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Eintragung speichern
|
||||
@@ -255,10 +262,10 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
$wtag=$_GET['wtag'];
|
||||
$akette[0]=$wtag[0];
|
||||
$ekette[0]=$wtag[0];
|
||||
for($i=1,$j=0;$i<count($wtag);$i++)
|
||||
for($i=1, $j=0; $i<count($wtag); $i++)
|
||||
{
|
||||
//ketten bilden
|
||||
if($wtag[$i]==date("Y-m-d",strtotime("+1 Day",strtotime($wtag[$i-1]))))
|
||||
if($wtag[$i]==date("Y-m-d", strtotime("+1 Day", strtotime($wtag[$i-1]))))
|
||||
{
|
||||
$ekette[$j]=$wtag[$i];
|
||||
}
|
||||
@@ -268,7 +275,6 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
$akette[$j]=$wtag[$i];
|
||||
$ekette[$j]=$wtag[$i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Prüfen, ob eine Zeitaufzeichnung vorhanden ist und ggf Abbrechen
|
||||
@@ -293,7 +299,7 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
for ($i = 0; $i < count($akette); $i++)
|
||||
{
|
||||
$zeitsperre = new zeitsperre();
|
||||
$vonDatum = new DateTime($akette[$i]);
|
||||
$vonDatum = new DateTime($akette[$i]);
|
||||
$bisDatum = new DateTime($ekette[$i]);
|
||||
|
||||
//add here to array, weil in der foreach-Schleife, das bisdatum nicht inkludiert ist
|
||||
@@ -301,34 +307,34 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
|
||||
$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);
|
||||
$daysToCheck[] = $date->format("Y-m-d");
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($zeitsperre->result as $z)
|
||||
foreach ($daysToCheck as $date)
|
||||
{
|
||||
$zeitsperre->getSperreByDate($uid, $date, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN);
|
||||
|
||||
foreach ($zeitsperre->result as $z)
|
||||
{
|
||||
if ($z->zeitsperretyp_kurzbz)
|
||||
{
|
||||
if ($z->zeitsperretyp_kurzbz)
|
||||
{
|
||||
$error = true;
|
||||
$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>';
|
||||
$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;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
for($i=0;$i<count($akette);$i++)
|
||||
for($i=0; $i<count($akette); $i++)
|
||||
{
|
||||
$zeitsperre = new zeitsperre();
|
||||
|
||||
@@ -354,12 +360,11 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
$error = true;
|
||||
echo $zeitsperre->errormsg;
|
||||
}
|
||||
|
||||
}
|
||||
if(!$error)
|
||||
{
|
||||
//Mail an Vorgesetzten
|
||||
$prsn = new person();
|
||||
$prsn = new person();
|
||||
|
||||
$vorgesetzter = $ma->getVorgesetzte($uid);
|
||||
if($vorgesetzter)
|
||||
@@ -384,31 +389,67 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($uid);
|
||||
$message = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n".
|
||||
$p->t('urlaubstool/xHatNeuenUrlaubEingetragen',array($benutzer->nachname,$benutzer->vorname)).":\n";
|
||||
|
||||
for($i=0;$i<count($akette);$i++)
|
||||
$nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname;
|
||||
$beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung);
|
||||
|
||||
// $message = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n".
|
||||
// $p->t('urlaubstool/xHatNeuenUrlaubEingetragen',array($benutzer->nachname,$benutzer->vorname)).":\n";
|
||||
|
||||
for($i=0; $i<count($akette); $i++)
|
||||
{
|
||||
$message.= $p->t('urlaubstool/von')." ".date("d.m.Y", strtotime($akette[$i]))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($ekette[$i]))."\n";
|
||||
$von = date("d.m.Y", strtotime($akette[$i]));
|
||||
$bis = date("d.m.Y", strtotime($ekette[$i]));
|
||||
}
|
||||
|
||||
|
||||
//Ab September wird das neue Jahr uebergeben
|
||||
if(date("m",strtotime($akette[0]))>=9)
|
||||
$jahr = date("Y", strtotime($akette[0]))+1;
|
||||
else
|
||||
$jahr = date("Y", strtotime($akette[0]));
|
||||
if(date("m", strtotime($akette[0]))>=9)
|
||||
$jahr = date("Y", strtotime($akette[0]))+1;
|
||||
else
|
||||
$jahr = date("Y", strtotime($akette[0]));
|
||||
|
||||
$message.="\n".$p->t('urlaubstool/sieKoennenDiesenUnterFolgenderAdresseFreigeben').":\n".
|
||||
APP_ROOT."cis/private/profile/urlaubsfreigabe.php?uid=$uid&year=".$jahr;
|
||||
$link = " <a href=". APP_ROOT."cis/private/profile/urlaubsfreigabe.php?uid=$uid&year=".$jahr .">Link Urlaubstool</a> ";
|
||||
|
||||
$mail = new mail($to, 'vilesci@'.DOMAIN,$p->t('urlaubstool/freigabeansuchenUrlaub'), $message);
|
||||
if($mail->send())
|
||||
$subject = "Freigabeansuchen Urlaub";
|
||||
$mailvorlage = 'Sancho_Mail_Urlaub_Neu';
|
||||
|
||||
$from='vilesci@'.DOMAIN;
|
||||
|
||||
// Überprüfen, ob addon casetime aktiv ist
|
||||
$addon_obj = new addon();
|
||||
$addoncasetime = $addon_obj->checkActiveAddon("casetime");
|
||||
$urlaubssaldo = "";
|
||||
if($addoncasetime)
|
||||
{
|
||||
$vgmail="<span style='color:green;'>".$p->t('urlaubstool/freigabemailWurdeVersandt',array($fullName))."</span>";
|
||||
require_once('../../../addons/casetime/config.inc.php');
|
||||
require_once('../../../addons/casetime/include/functions.inc.php');
|
||||
$urlaubssaldo = getCastTimeUrlaubssaldo($uid);
|
||||
$urlaubssaldo = $urlaubssaldo->{'AktuellerStand'};
|
||||
}
|
||||
|
||||
//Sanchomail mit Vorlage Sancho Mail Urlaub Neu
|
||||
$template_data = array(
|
||||
'vorgesetzter' => $fullName,
|
||||
'nameMitarbeiter' => $nameMitarbeiter,
|
||||
'beschreibung' =>$beschreibung,
|
||||
'vonDatum' => $von,
|
||||
'bisDatum' => $bis,
|
||||
'Link'=> $link,
|
||||
'urlaubssaldo' => $urlaubssaldo
|
||||
);
|
||||
|
||||
|
||||
if (sendSanchoMail($mailvorlage, $template_data, $to, $subject))
|
||||
|
||||
// $mail = new mail($to, 'vilesci@'.DOMAIN,$p->t('urlaubstool/freigabeansuchenUrlaub'), $message);
|
||||
//if($mail->send())
|
||||
{
|
||||
$vgmail="<span style='color:green;'>".$p->t('urlaubstool/freigabemailWurdeVersandt', array($fullName))."</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$vgmail="<br><span class='error'>".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($to))."!</span>";
|
||||
$vgmail="<br><span class='error'>".$p->t('urlaubstool/fehlerBeimSendenAufgetreten', array($to))."!</span>";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -422,14 +463,13 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Eintragungen laden
|
||||
if ((isset($wmonat) || isset($wmonat))&&(isset($wjahr) || isset($wjahr)))
|
||||
if ((isset($wmonat) || isset($wmonat)) && (isset($wjahr) || isset($wjahr)))
|
||||
{
|
||||
//Urlaubstageage markieren
|
||||
$mbeginn=mktime(0, 0, 0, ($wmonat+1) , 1, $jahre[$wjahr]);
|
||||
$mbeginn=mktime(0, 0, 0, ($wmonat+1), 1, $jahre[$wjahr]);
|
||||
$ttt=getdate($mbeginn);
|
||||
$wotag="$ttt[wday]";
|
||||
if ($wotag==0)
|
||||
@@ -447,22 +487,22 @@ if ((isset($wmonat) || isset($wmonat))&&(isset($wjahr) || isset($wjahr)))
|
||||
}
|
||||
//$wvon=date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , 1, $jahre[$wjahr]));
|
||||
//$wbis=date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $mende, $jahre[$wjahr]));
|
||||
$ttt=getdate(mktime(0, 0, 0, ($wmonat+1) , $mende, $jahre[$wjahr]));
|
||||
$ttt=getdate(mktime(0, 0, 0, ($wmonat+1), $mende, $jahre[$wjahr]));
|
||||
if($wmonat==0)
|
||||
{
|
||||
$wvon=date("Y-m-d",mktime(0, 0, 0, 12 , $mendev-($wotag-1), ($jahre[$wjahr])-1));
|
||||
$wvon=date("Y-m-d", mktime(0, 0, 0, 12, $mendev-($wotag-1), ($jahre[$wjahr])-1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$wvon=date("Y-m-d",mktime(0, 0, 0, ($wmonat) , $mendev-($wotag-1), ($jahre[$wjahr])));
|
||||
$wvon=date("Y-m-d", mktime(0, 0, 0, ($wmonat), $mendev-($wotag-1), ($jahre[$wjahr])));
|
||||
}
|
||||
if($wmonat==11)
|
||||
{
|
||||
$wbis=date("Y-m-d",mktime(0, 0, 0, 1 , (7-($ttt['wday']==0?7:$ttt['wday'])), $jahre[$wjahr]+1));
|
||||
$wbis=date("Y-m-d", mktime(0, 0, 0, 1, (7-($ttt['wday']==0?7:$ttt['wday'])), $jahre[$wjahr]+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$wbis=date("Y-m-d",mktime(0, 0, 0, ($wmonat+2) , (7-($ttt['wday']==0?7:$ttt['wday'])), $jahre[$wjahr]));
|
||||
$wbis=date("Y-m-d", mktime(0, 0, 0, ($wmonat+2), (7-($ttt['wday']==0?7:$ttt['wday'])), $jahre[$wjahr]));
|
||||
}
|
||||
$qry="SELECT * FROM campus.tbl_zeitsperre
|
||||
WHERE zeitsperretyp_kurzbz='Urlaub'
|
||||
@@ -477,19 +517,19 @@ if ((isset($wmonat) || isset($wmonat))&&(isset($wjahr) || isset($wjahr)))
|
||||
{
|
||||
//echo " ".$row->vondatum;
|
||||
//echo "-".$row->bisdatum;
|
||||
for($i=1;$i<=$mende+($wotag-1)+(7-($ttt['wday']==0?7:$ttt['wday']));$i++)
|
||||
for($i=1; $i<=$mende+($wotag-1)+(7-($ttt['wday']==0?7:$ttt['wday'])); $i++)
|
||||
{
|
||||
if(date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $i-$wotag+1, $jahre[$wjahr]))>=$row->vondatum
|
||||
&& date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $i-$wotag+1, $jahre[$wjahr]))<=$row->bisdatum)
|
||||
if(date("Y-m-d", mktime(0, 0, 0, ($wmonat+1), $i-$wotag+1, $jahre[$wjahr]))>=$row->vondatum
|
||||
&& date("Y-m-d", mktime(0, 0, 0, ($wmonat+1), $i-$wotag+1, $jahre[$wjahr]))<=$row->bisdatum)
|
||||
{
|
||||
if($row->freigabevon!='' && $row->vondatum<=date("Y-m-d",time()))
|
||||
if($row->freigabevon!='' && $row->vondatum<=date("Y-m-d", time()))
|
||||
{
|
||||
$hgfarbe[$i]='#bbb';
|
||||
}
|
||||
elseif ($row->freigabevon!='' && $row->vondatum>date("Y-m-d",time()))
|
||||
{
|
||||
elseif ($row->freigabevon!='' && $row->vondatum>date("Y-m-d", time()))
|
||||
{
|
||||
$hgfarbe[$i]='#CDDDEE';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$hgfarbe[$i]='#FFFC7F';
|
||||
@@ -513,7 +553,7 @@ if ((isset($wmonat) || isset($wmonat))&&(isset($wjahr) || isset($wjahr)))
|
||||
}
|
||||
}
|
||||
}
|
||||
for($i=$mende+$wotag+(7-($ttt['wday']==0?7:$ttt['wday']));$i<44;$i++)
|
||||
for($i=$mende+$wotag+(7-($ttt['wday']==0?7:$ttt['wday'])); $i<44; $i++)
|
||||
{
|
||||
$hgfarbe[$i]='#E9ECEE';
|
||||
$datensatz[$i]=0;
|
||||
@@ -567,58 +607,60 @@ echo '
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
?>
|
||||
<script language="Javascript">
|
||||
function conf_del()
|
||||
{
|
||||
return confirm('<?php echo $p->t('urlaubstool/eintragWirklichLoeschen');?>');
|
||||
}
|
||||
|
||||
function checkval()
|
||||
?>
|
||||
<script language="Javascript">
|
||||
function conf_del()
|
||||
{
|
||||
return confirm('<?php echo $p->t('urlaubstool/eintragWirklichLoeschen');?>');
|
||||
}
|
||||
|
||||
function checkval()
|
||||
{
|
||||
if(document.getElementById('vertretung_uid').value=='')
|
||||
{
|
||||
alert('<?php echo $p->t('urlaubstool/zuerstVertretungAuswaehlen');?>');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#vertretung").autocomplete({
|
||||
source: "urlaubstool_autocomplete.php?autocomplete=mitarbeiter",
|
||||
minLength:2,
|
||||
response: function(event, ui)
|
||||
{
|
||||
//Value und Label fuer die Anzeige setzen
|
||||
for(i in ui.content)
|
||||
{
|
||||
if(document.getElementById('vertretung_uid').value=='')
|
||||
{
|
||||
alert('<?php echo $p->t('urlaubstool/zuerstVertretungAuswaehlen');?>');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
ui.content[i].value=ui.content[i].uid;
|
||||
ui.content[i].label=ui.content[i].vorname+" "+ui.content[i].nachname+" ("+ui.content[i].uid+")";
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#vertretung").autocomplete({
|
||||
source: "urlaubstool_autocomplete.php?autocomplete=mitarbeiter",
|
||||
minLength:2,
|
||||
response: function(event, ui)
|
||||
{
|
||||
//Value und Label fuer die Anzeige setzen
|
||||
for(i in ui.content)
|
||||
{
|
||||
ui.content[i].value=ui.content[i].uid;
|
||||
ui.content[i].label=ui.content[i].vorname+" "+ui.content[i].nachname+" ("+ui.content[i].uid+")";
|
||||
}
|
||||
},
|
||||
select: function(event, ui)
|
||||
{
|
||||
//Ausgeaehlte Ressource zuweisen und Textfeld wieder leeren
|
||||
$("#vertretung").val(ui.item.uid);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.urlaube th, .urlaube td, .urlaube
|
||||
{
|
||||
-moz-border-radius:10px;
|
||||
-khtml-border-radius:10px;
|
||||
}
|
||||
</style>
|
||||
<title><?php echo $p->t('urlaubstool/urlaubstool');?></title>
|
||||
</head>
|
||||
},
|
||||
select: function(event, ui)
|
||||
{
|
||||
//Ausgeaehlte Ressource zuweisen und Textfeld wieder leeren
|
||||
$("#vertretung").val(ui.item.uid);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.urlaube th, .urlaube td, .urlaube
|
||||
{
|
||||
-moz-border-radius:10px;
|
||||
-khtml-border-radius:10px;
|
||||
}
|
||||
</style>
|
||||
<title><?php echo $p->t('urlaubstool/urlaubstool');?></title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
echo "<H1>".$p->t('urlaubstool/urlaubstool')." (".$uid.")</H1>";
|
||||
|
||||
|
||||
//Anzeige Resturlaubsberechnung
|
||||
echo '<table width="100%">';
|
||||
echo '<tr><td colspan=2>';
|
||||
@@ -664,7 +706,7 @@ echo '
|
||||
style="vertical-align: middle;" alt="links">
|
||||
<SELECT name="wmonat">';
|
||||
|
||||
for($i=0;$i<12;$i++)
|
||||
for($i=0; $i<12; $i++)
|
||||
{
|
||||
if($wmonat==$i)
|
||||
{
|
||||
@@ -680,7 +722,7 @@ echo "</SELECT>\n";
|
||||
|
||||
echo ' <INPUT name="rechts" type="image" src="../../../skin/images/right_lvplan.png" style="vertical-align: middle;" alt="rechts">';
|
||||
echo ' <SELECT name="wjahr">';
|
||||
for($i=0;$i<5;$i++)
|
||||
for($i=0; $i<5; $i++)
|
||||
{
|
||||
if($wjahr==$i)
|
||||
{
|
||||
@@ -725,7 +767,7 @@ if($result = $db->db_query($qry))
|
||||
echo '</SELECT>';
|
||||
|
||||
//Tage
|
||||
$mbeginn=mktime(0, 0, 0, ($wmonat+1) , 1, $jahre[$wjahr]);
|
||||
$mbeginn=mktime(0, 0, 0, ($wmonat+1), 1, $jahre[$wjahr]);
|
||||
$ttt=getdate($mbeginn);
|
||||
$wotag="$ttt[wday]";
|
||||
if ($wotag==0)
|
||||
@@ -742,9 +784,9 @@ else
|
||||
{
|
||||
$mendev = cal_days_in_month(CAL_GREGORIAN, ($wmonat), $jahre[$wjahr]);
|
||||
}
|
||||
$ttt=getdate(mktime(0, 0, 0, ($wmonat+1) , $mende, $jahre[$wjahr]));
|
||||
$ttt=getdate(mktime(0, 0, 0, ($wmonat+1), $mende, $jahre[$wjahr]));
|
||||
//echo "monatsende:".$mende;
|
||||
for($i=1;$i<43;$i++)
|
||||
for($i=1; $i<43; $i++)
|
||||
{
|
||||
if($i>=$wotag && $zaehl<=$mende)
|
||||
{
|
||||
@@ -755,22 +797,22 @@ for($i=1;$i<43;$i++)
|
||||
{
|
||||
if($wmonat==0)
|
||||
{
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, 12 , $mendev+$i-($wotag-1), $jahre[$wjahr]-1));
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, 12, $mendev+$i-($wotag-1), $jahre[$wjahr]-1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat) , $mendev+$i-($wotag-1), $jahre[$wjahr]));
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat), $mendev+$i-($wotag-1), $jahre[$wjahr]));
|
||||
}
|
||||
}
|
||||
elseif ($i>$mende && $i<=$mende+($wotag-1)+(7-($ttt['wday']==0?7:$ttt['wday'])))
|
||||
{
|
||||
if($wmonat==11)
|
||||
{
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, 1 , $i-$mende-$wotag+1, $jahre[$wjahr+1]));
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, 1, $i-$mende-$wotag+1, $jahre[$wjahr+1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat+2) , $i-$mende-$wotag+1, $jahre[$wjahr]));
|
||||
$tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat+2), $i-$mende-$wotag+1, $jahre[$wjahr]));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -788,17 +830,17 @@ echo ' <input type="submit" name="speichern" value="'.$p->t('urlaubstool/eintrag
|
||||
<table border=0 width="95%" align="left" class="urlaube">
|
||||
<tr>';
|
||||
|
||||
for($i=1;$i<=7;$i++)
|
||||
for($i=1; $i<=7; $i++)
|
||||
echo "\n".'<th style="width:14%; background-color: #A5AFB6">'.$tagbez[$lang->index][$i].'</th>';
|
||||
|
||||
echo '</tr>';
|
||||
for ($i=0;$i<6;$i++)
|
||||
for ($i=0; $i<6; $i++)
|
||||
{
|
||||
echo "\n".'<tr height="50" style="font-family:Arial,sans-serif; font-size:30px; color:black">';
|
||||
for ($j=1;$j<8;$j++)
|
||||
for ($j=1; $j<8; $j++)
|
||||
{
|
||||
echo "\n";
|
||||
if(strlen(stristr($tage[$j+7*$i],"."))>0)
|
||||
if(strlen(stristr($tage[$j+7*$i], "."))>0)
|
||||
{
|
||||
if($j%6==0 || $j==7)
|
||||
{
|
||||
@@ -822,7 +864,7 @@ for ($i=0;$i<6;$i++)
|
||||
}
|
||||
if($tage[$j+7*$i]!='')
|
||||
{
|
||||
if($hgfarbe[$j+7*$i]=='#FFFC7F' )//|| $hgfarbe[$j+7*$i]=='#CDDDEE')
|
||||
if($hgfarbe[$j+7*$i]=='#FFFC7F')//|| $hgfarbe[$j+7*$i]=='#CDDDEE')
|
||||
{
|
||||
echo '<b title='.$p->t('urlaubstool/vertretung').': '.$vertretung_uid[$j+7*$i].' - '.$p->t('urlaubstool/erreichbar').': '.$erreichbarkeit_kurzbz[$j+7*$i].'">'.$tage[$j+7*$i].'</b><br>';;
|
||||
$k=$j+7*$i;
|
||||
@@ -832,16 +874,16 @@ for ($i=0;$i<6;$i++)
|
||||
elseif($hgfarbe[$j+7*$i]=='#E9ECEE')
|
||||
{
|
||||
echo '<b>'.$tage[$j+7*$i].'</b><br>';
|
||||
if(strlen(stristr($tage[$j+7*$i],"."))>0)
|
||||
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))).'"
|
||||
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>';
|
||||
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])).'"
|
||||
id="'.date("d.m.Y",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"></td>';
|
||||
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>';
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -853,12 +895,12 @@ for ($i=0;$i<6;$i++)
|
||||
}
|
||||
elseif(isset($freigabeamum[$j+7*$i]))
|
||||
{
|
||||
echo '<img src="../../../skin/images/flag-green.png" alt="freigegeben" title="'.$p->t('urlaubstool/freigegebenDurch', array($freigabevon[$j+7*$i])).': '.$freigabevon[$j+7*$i].'"><span> </span>';
|
||||
echo '<img src="../../../skin/images/flag-green.png" alt="freigegeben" title="'.$p->t('urlaubstool/freigegebenDurch', array($freigabevon[$j+7*$i])).': '.$freigabevon[$j+7*$i].'"><span> </span>';
|
||||
if($hgfarbe[$j+7*$i]=='#CDDDEE')
|
||||
{
|
||||
$k=$j+7*$i;
|
||||
echo "<a href='$PHP_SELF?wmonat=$wmonat&wjahr=$wjahr&delete=$datensatz[$k]&informSupervisor=True' onclick='return conf_del()'>";
|
||||
echo '<img src="../../../skin/images/delete_x.png" alt="loeschen" title="'.$p->t('urlaubstool/eintragungLoeschen').'"></a></td>';
|
||||
echo "<a href='$PHP_SELF?wmonat=$wmonat&wjahr=$wjahr&delete=$datensatz[$k]' onclick='return conf_del()'>";
|
||||
echo '<img src="../../../skin/images/delete_x.png" alt="loeschen" title="'.$p->t('urlaubstool/eintragungLoeschen').'"></a></td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -31,6 +31,7 @@ require_once('../../../include/person.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../include/mail.class.php');
|
||||
require_once('../../../include/sancho.inc.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/zeitaufzeichnung.class.php');
|
||||
@@ -65,6 +66,7 @@ if(isset($_GET['uid']))
|
||||
die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte'));
|
||||
}
|
||||
}
|
||||
|
||||
$datum_obj = new datum();
|
||||
$ma= new mitarbeiter();
|
||||
|
||||
@@ -100,6 +102,7 @@ $num_rows_stunde=$db->db_num_rows($result_stunde);
|
||||
<link href="../../../vendor/fgelinas/timepicker/jquery.ui.timepicker.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../../skin/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css">
|
||||
<?php
|
||||
|
||||
// ADDONS laden
|
||||
$addon_obj = new addon();
|
||||
$addon_obj->loadAddons();
|
||||
@@ -109,6 +112,9 @@ foreach($addon_obj->result as $addon)
|
||||
echo '<script type="application/x-javascript" src="../../../addons/'.$addon->kurzbz.'/cis/init.js.php" ></script>';
|
||||
}
|
||||
|
||||
// Überprüfen, ob addon casetime aktiv ist
|
||||
$addoncasetime = $addon_obj->checkActiveAddon("casetime");
|
||||
|
||||
// Wenn Seite fertig geladen ist Addons aufrufen
|
||||
echo '
|
||||
<script>
|
||||
@@ -119,7 +125,8 @@ $( document ).ready(function()
|
||||
{
|
||||
for(i in addon)
|
||||
{
|
||||
addon[i].init("cis/private/profile/zeitsperre_resturlaub.php", {uid:\''.$uid.'\', holiDays: holiDays});
|
||||
|
||||
addon[i].init("cis/private/profile/zeitsperre_resturlaub.php", {uid:\''.$uid.'\', holiDays: holiDays});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,6 +165,7 @@ $( document ).ready(function()
|
||||
}
|
||||
return [true, ""];
|
||||
}
|
||||
|
||||
</script>';
|
||||
|
||||
?>
|
||||
@@ -316,6 +324,10 @@ function showHideStudeDropDown()
|
||||
{
|
||||
document.getElementById('vonStd').style.visibility = 'hidden';
|
||||
document.getElementById('bisStd').style.visibility = 'hidden';
|
||||
|
||||
// Stunde entfernen
|
||||
document.getElementById('vonstunde').selectedIndex = 0;
|
||||
document.getElementById('bisstunde').selectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -339,6 +351,17 @@ function showHideStudeDropDown()
|
||||
|
||||
<?php
|
||||
|
||||
$zeitsaldo = "";
|
||||
$urlaubssaldo = "";
|
||||
if($addoncasetime)
|
||||
{
|
||||
require_once('../../../addons/casetime/config.inc.php');
|
||||
require_once('../../../addons/casetime/include/functions.inc.php');
|
||||
$zeitsaldo = getCaseTimeZeitsaldo($uid);
|
||||
$zeitsaldo = formatZeitsaldo($zeitsaldo);
|
||||
$urlaubssaldo = getCastTimeUrlaubssaldo($uid);
|
||||
$urlaubssaldo = $urlaubssaldo->{'AktuellerStand'};
|
||||
}
|
||||
|
||||
//Zeitsperre Speichern
|
||||
if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_sperre'))
|
||||
@@ -502,17 +525,24 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_
|
||||
$zeitsperre->updateamum = date('Y-m-d H:i:s');
|
||||
$zeitsperre->updatevon = $uid;
|
||||
|
||||
// Zeitsperretyp Beschreibung
|
||||
$zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz);
|
||||
$zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung;
|
||||
|
||||
if($zeitsperre->save())
|
||||
{
|
||||
echo "<h3>".$p->t('global/erfolgreichgespeichert')."</h3>";
|
||||
if(URLAUB_TOOLS)
|
||||
{
|
||||
if($zeitsperre->new && $zeitsperre->zeitsperretyp_kurzbz=='Urlaub')
|
||||
//Beim Anlegen von neuen Urlauben oder neuem Zeitausgleich wird ein Mail an den Vorgesetzten versendet
|
||||
if($zeitsperre->new && ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub' || $zeitsperre->zeitsperretyp_kurzbz == 'ZA')
|
||||
|| !$zeitsperre->new && $zeitsperre->zeitsperretyp_kurzbz == 'ZA')
|
||||
{
|
||||
//Beim Anlegen von neuen Urlauben wird ein Mail an den Vorgesetzten versendet um diesen Freizugeben
|
||||
$prsn = new person();
|
||||
|
||||
$vorgesetzter = $ma->getVorgesetzte($uid);
|
||||
$vorgesetzter = $ma->getVorgesetzte($uid);
|
||||
|
||||
if($vorgesetzter)
|
||||
{
|
||||
$to='';
|
||||
@@ -531,21 +561,75 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_
|
||||
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($uid);
|
||||
$nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname;
|
||||
$beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung);
|
||||
|
||||
if($datum_obj->formatDatum($zeitsperre->vondatum, 'm')>=9)
|
||||
$jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y')+1;
|
||||
else
|
||||
$jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y');
|
||||
|
||||
$message = "Dies ist eine automatische Mail! \n".
|
||||
"$benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:\n".
|
||||
"$zeitsperre->bezeichnung von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y')." bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y')."\n\n".
|
||||
"Sie können diesen unter folgender Adresse freigeben:\n".
|
||||
APP_ROOT."cis/private/profile/urlaubsfreigabe.php?uid=$uid&year=".$jahr;
|
||||
$from='vilesci@'.DOMAIN;
|
||||
$mail = new mail($to, $from, 'Freigabeansuchen', $message);
|
||||
if($mail->send())
|
||||
$von = $datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y');
|
||||
$bis = $datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y');
|
||||
|
||||
// Wenn ein neuer Urlaub eingetragen wurde, Freigabemail-Text
|
||||
if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub')
|
||||
{
|
||||
echo "<br><b>".$p->t('urlaubstool/freigabemailWurdeVersandt',array($fullName))."</b>";
|
||||
$link = " <a href=". APP_ROOT."cis/private/profile/urlaubsfreigabe.php?uid=$uid&year=".$jahr .">Link Urlaubstool</a> ";
|
||||
|
||||
$subject = "Freigabeansuchen Urlaub";
|
||||
$mailvorlage = 'Sancho_Mail_Urlaub_Neu';
|
||||
|
||||
$template_data = array(
|
||||
'vorgesetzter' => $fullName,
|
||||
'nameMitarbeiter' => $nameMitarbeiter,
|
||||
'beschreibung' =>$beschreibung,
|
||||
'vonDatum' => $von,
|
||||
'bisDatum' => $bis,
|
||||
'Link'=> $link,
|
||||
'urlaubssaldo' => $urlaubssaldo
|
||||
);
|
||||
}
|
||||
|
||||
// Wenn ein Zeitausgleich eingetragen wurde...
|
||||
if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA')
|
||||
{
|
||||
// ...Mail-Text für neuen Zeitausgleich
|
||||
if ($zeitsperre->new)
|
||||
{
|
||||
$subject = $p->t('urlaubstool/zeitausgleichNeu');
|
||||
$mailvorlage = 'Sancho_Content_Zeitausgleich';
|
||||
}
|
||||
// ...Mail-Text für geaenderten Zeitausgleich
|
||||
else
|
||||
{
|
||||
$subject = $subject = $p->t('urlaubstool/zeitausgleichGeaendert');
|
||||
$mailvorlage = 'Sancho_Content_ZA_Aendern';
|
||||
}
|
||||
$template_data = array(
|
||||
'vorgesetzter' => $fullName,
|
||||
'nameMitarbeiter' => $nameMitarbeiter,
|
||||
'beschreibung' =>$beschreibung,
|
||||
'vonDatum' => $von,
|
||||
'bisDatum' => $bis,
|
||||
'Saldo'=> $zeitsaldo
|
||||
);
|
||||
}
|
||||
|
||||
$from='vilesci@'.DOMAIN;
|
||||
|
||||
//Sanchomail mit Vorlage Sancho Mail Zeitausgleich
|
||||
if (sendSanchoMail($mailvorlage, $template_data, $to, $subject))
|
||||
{
|
||||
if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub')
|
||||
{
|
||||
echo "<br><b>". $p->t('urlaubstool/freigabemailWurdeVersandt', array($fullName)). "</b>";
|
||||
}
|
||||
|
||||
if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA')
|
||||
{
|
||||
echo "<br><b>". $p->t('urlaubstool/VorgesetzteInformiert', array($fullName)). "</b>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -572,8 +656,15 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor
|
||||
$zeitsperre = new zeitsperre();
|
||||
$zeitsperre->load($_GET['id']);
|
||||
|
||||
$vondatum = $zeitsperre->getVonDatum();
|
||||
$bisdatum = $zeitsperre->getBisDatum();
|
||||
$zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz);
|
||||
$zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung;
|
||||
|
||||
$vonDatum = $zeitsperre->getVonDatum();
|
||||
$bisDatum = $zeitsperre->getBisDatum();
|
||||
|
||||
$vonDatum = $datum_obj->formatDatum($vonDatum ,'d.m.Y');
|
||||
$bisDatum = $datum_obj->formatDatum($bisDatum,'d.m.Y');
|
||||
|
||||
|
||||
if(!$zeitsperre->delete($_GET['id']))
|
||||
echo $zeitsperre->errormsg;
|
||||
@@ -604,16 +695,32 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor
|
||||
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($uid);
|
||||
$message = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n".
|
||||
$p->t('urlaubstool/xHatUrlaubGeloescht',array($benutzer->nachname,$benutzer->vorname)).":\n";
|
||||
$nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname;
|
||||
$beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung);
|
||||
|
||||
if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub')
|
||||
{
|
||||
$subject = $p->t('urlaubstool/UrlaubGeloescht');
|
||||
$mailvorlage = 'Sancho_Mail_Urlaub_Loeschen';
|
||||
}
|
||||
|
||||
$message.= $p->t('urlaubstool/von')." ".date("d.m.Y", strtotime($vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($bisdatum))."\n";
|
||||
if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA')
|
||||
{
|
||||
$subject = $p->t('urlaubstool/zeitausgleichGeloescht');
|
||||
$mailvorlage = 'Sancho_Mail_ZA_loeschen';
|
||||
}
|
||||
|
||||
$template_data = array(
|
||||
'vorgesetzter' => $fullName,
|
||||
'nameMitarbeiter' => $nameMitarbeiter,
|
||||
'beschreibung' =>$beschreibung,
|
||||
'vonDatum' => $vonDatum,
|
||||
'bisDatum' => $bisDatum
|
||||
);
|
||||
|
||||
$mail = new mail($to, 'vilesci@'.DOMAIN,$p->t('urlaubstool/freigegebenerUrlaubGeloescht'), $message);
|
||||
if($mail->send())
|
||||
if (sendSanchoMail($mailvorlage, $template_data, $to, $subject))
|
||||
{
|
||||
echo "<b>" . $p->t('global/erfolgreichgelöscht') . '</b><br>';
|
||||
echo "<br><b>".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName))."</b>";
|
||||
}
|
||||
else
|
||||
@@ -621,6 +728,7 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor
|
||||
echo "<br><span class='error'>".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!</span>";
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$vgmail="<br><span class='error'>".$p->t('urlaubstool/konnteKeinFreigabemailVersendetWerden')."</span>";
|
||||
@@ -632,6 +740,7 @@ if(isset($_GET['type']) && $_GET['type']=='delete_sperre' && !isset($_GET['infor
|
||||
{
|
||||
$zeit = new zeitsperre();
|
||||
$zeit->load($_GET['id']);
|
||||
|
||||
//pruefen ob die person die den datensatz loeschen will auch der
|
||||
//besitzer dieses datensatzes ist
|
||||
if($zeit->mitarbeiter_uid==$uid)
|
||||
@@ -698,7 +807,7 @@ if(count($zeit->result)>0)
|
||||
$content_table.="<td><a href='$PHP_SELF?type=edit&id=$row->zeitsperre_id' class='Item'>".$p->t('zeitsperre/edit')."</a></td>";
|
||||
if ($row->vondatum < $gesperrt_bis AND in_array($row->zeitsperretyp_kurzbz,$typen_arr))
|
||||
$content_table .= '<td> </td>';
|
||||
else if($row->vondatum>=date("Y-m-d",time()) && $row->zeitsperretyp_kurzbz=='Urlaub')
|
||||
else if($row->vondatum>=date("Y-m-d",time()) && ($row->zeitsperretyp_kurzbz=='Urlaub' || $row->zeitsperretyp_kurzbz == 'ZA'))
|
||||
{
|
||||
$content_table.="\n<td><a href='$PHP_SELF?type=delete_sperre&id=$row->zeitsperre_id&informSupervisor=True' onclick='return conf_del()' class='Item'>".$p->t('zeitsperre/loeschen')."</a></td>";
|
||||
}
|
||||
@@ -779,7 +888,7 @@ $content_form.= '<tr><td>'.$p->t('global/von').'</td><td><input'.$style.' type="
|
||||
//dropdown fuer vonstunde
|
||||
$content_form.= $p->t('zeitsperre/stundeInklusive');
|
||||
|
||||
$content_form.= " <SELECT name='vonstunde'$style>\n";
|
||||
$content_form.= " <SELECT id='vonstunde' name='vonstunde'$style>\n";
|
||||
if($zeitsperre->vonstunde=='')
|
||||
$content_form.= "<OPTION value='' selectd>*</OPTION>\n";
|
||||
else
|
||||
@@ -800,7 +909,7 @@ $content_form.= "</SELECT></td></tr>";
|
||||
$content_form.= '<tr><td>'.$p->t('global/bis').'</td><td><input'.$style.' type="text" '.$class.' size="10" maxlength="10" name="bisdatum" id="bisdatum" value="'.($zeitsperre->bisdatum!=''?date('d.m.Y',$datum_obj->mktime_fromdate($zeitsperre->bisdatum)):(!isset($_POST['bisdatum'])?date('d.m.Y'):$_POST['bisdatum'])).'"'.$readonly.'></td><td id="bisStd" style="text-align:right;"> ';
|
||||
//dropdown fuer bisstunde
|
||||
$content_form.= $p->t('zeitsperre/stundeInklusive');
|
||||
$content_form.= " <SELECT name='bisstunde'$style>\n";
|
||||
$content_form.= " <SELECT id='bisstunde' name='bisstunde'$style>\n";
|
||||
|
||||
if($zeitsperre->bisstunde=='')
|
||||
$content_form.= "<OPTION value='' selectd>*</OPTION>\n";
|
||||
@@ -836,6 +945,10 @@ if($result = $db->db_query($qry))
|
||||
}
|
||||
$content_form.= '</SELECT></td></tr>';
|
||||
|
||||
//$content_form.= '<tr><td>'.$p->t('global/bezeichnung').'</td>
|
||||
//<td colspan="2"><span id="dienstv_span"><input'.$style.' type="text" size="32" name="bezeichnung" maxlength="32" value="'.$zeitsperre->bezeichnung.'"'.$readonly.'></span></td></tr>';
|
||||
|
||||
|
||||
$content_form.= "<tr><td>".$p->t('urlaubstool/erreichbarkeit')."</td><td><SELECT name='erreichbarkeit'>";
|
||||
foreach ($erreichbarkeit_arr as $erreichbarkeit_key=>$erreichbarkeit_beschreibung)
|
||||
{
|
||||
@@ -847,8 +960,12 @@ foreach ($erreichbarkeit_arr as $erreichbarkeit_key=>$erreichbarkeit_beschreibun
|
||||
|
||||
$content_form.= '</SELECT></td>';
|
||||
|
||||
|
||||
|
||||
$content_form.= '<td style="text-align:right;">';
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
$content_form.= "<input type='submit' name='submit_zeitsperre' value='".$p->t('global/speichern')."'>";
|
||||
|
||||
@@ -875,6 +992,7 @@ echo '</table>';
|
||||
?>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
|
||||
<body>
|
||||
</html>
|
||||
<?php echo '<script>showHideStudeDropDown();</script>'; ?>
|
||||
|
||||
@@ -605,9 +605,14 @@ echo '
|
||||
{
|
||||
projphasenhtml += "<option value = \'" + json[i].projektphase_id + "\'>";
|
||||
projphasenhtml += json[i].bezeichnung;
|
||||
|
||||
if(json[i].start != \'\' && json[i].ende !=\'\')
|
||||
{
|
||||
projphasenhtml += " ( "+json[i].start+" - "+json[i].ende+" )";
|
||||
projphasenhtml += " ( "+json[i].start+" - "+json[i].ende+ " )";
|
||||
}
|
||||
if (!json[i].zeitaufzeichnung_erlaubt)
|
||||
{
|
||||
projphasenhtml += " ---AP NICHT bebuchbar---";
|
||||
}
|
||||
projphasenhtml += "<\/option>";
|
||||
}
|
||||
@@ -665,6 +670,7 @@ echo '
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Pausenblock
|
||||
|
||||
function checkPausenblock()
|
||||
@@ -840,6 +846,10 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$projektph_of_user = new projektphase();
|
||||
$projektphasen = $projektph_of_user->getProjectphaseForMitarbeiter($user);
|
||||
|
||||
$phaseBebuchbar = $projektph_of_user->getPhasenZA($projektphase_id);
|
||||
$projekt = new projekt();
|
||||
$projekt->load($projekt_kurzbz);
|
||||
|
||||
if ($_FILES['csv']['error'] == 0 && isset($_POST['import']))
|
||||
{
|
||||
$zeit_csv_import = new zeitaufzeichnung_import_csv($p, $user, $sperrdatum, $_FILES['csv']['tmp_name']);
|
||||
@@ -848,9 +858,11 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
}
|
||||
else if ($datum->formatDatum($von, $format='Y-m-d H:i:s') < $sperrdatum)
|
||||
echo '<span id="triggerPhasenReset" style="color:#ff0000"><b>' .$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum</b></span>';
|
||||
|
||||
// NOTE(chris): Save
|
||||
else if (isset($_POST['save']) || isset($_POST['edit']))
|
||||
{
|
||||
|
||||
$zeit_post_import = new zeitaufzeichnung_import_post($p, $user, isset($_POST['edit']), [
|
||||
'aktivitaet_kurzbz' => $aktivitaet_kurzbz,
|
||||
'beschreibung' => $beschreibung,
|
||||
@@ -867,6 +879,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
'von_pause' => $von_pause,
|
||||
'zeitaufzeichnung_id' => $zeitaufzeichnung_id,
|
||||
]);
|
||||
|
||||
$zeit_post_import->import();
|
||||
echo $zeit_post_import->OutputToHTML();
|
||||
if (!$zeit_post_import->hasErrors() && !$zeit_post_import->hasWarnings())
|
||||
@@ -1239,7 +1252,8 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung). $phasentext.'</option>';
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung).
|
||||
$phasentext. '</option>';
|
||||
}
|
||||
echo '</SELECT></span>';
|
||||
}
|
||||
@@ -1379,7 +1393,27 @@ if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
}
|
||||
}
|
||||
echo '</table>';
|
||||
echo '</td><td valign="top"><span id="zeitsaldo"></span><br><br>';
|
||||
echo '</td><td valign="top"><span id="zeitsaldo"></span><br>';
|
||||
|
||||
if (defined('DEFAULT_ALLIN_DIENSTVERTRAG') && DEFAULT_ALLIN_DIENSTVERTRAG != '')
|
||||
{
|
||||
$bisver = new bisverwendung();
|
||||
$bisver->getLastVerwendung($user);
|
||||
// $ba1code = $bisver->ba1code;
|
||||
$ba1code = null;
|
||||
|
||||
if (in_array($bisver->ba1code, DEFAULT_ALLIN_DIENSTVERTRAG))
|
||||
{
|
||||
echo '<span id="saldoAllin"></span><br><br>';
|
||||
}
|
||||
else
|
||||
echo '<br>';
|
||||
}
|
||||
else
|
||||
echo '<br>';
|
||||
|
||||
|
||||
|
||||
|
||||
if (!$adminView)
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@ if (isset($_GET['projekt_kurzbz']))
|
||||
$item['bezeichnung'] = $row->bezeichnung;
|
||||
$item['start'] = $datum_obj->formatDatum($row->start, 'd.m.Y');
|
||||
$item['ende'] = $datum_obj->formatDatum($row->ende, 'd.m.Y');
|
||||
$item['zeitaufzeichnung_erlaubt'] = $row->zeitaufzeichnung;
|
||||
$result_obj[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user