Merge branch 'master' into feature-6237/Phrases_system_MkIII

This commit is contained in:
Paolo
2022-04-12 11:01:31 +02:00
161 changed files with 60593 additions and 48778 deletions
@@ -20,6 +20,7 @@ class InfoCenter extends Auth_Controller
const INDEX_PAGE = 'index';
const FREIGEGEBEN_PAGE = 'freigegeben';
const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert';
const ABGEWIESEN_PAGE = 'abgewiesen';
const SHOW_DETAILS_PAGE = 'showDetails';
const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails';
const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung';
@@ -107,6 +108,7 @@ class InfoCenter extends Auth_Controller
array(
'index' => 'infocenter:r',
'freigegeben' => 'infocenter:r',
'abgewiesen' => 'infocenter:r',
'reihungstestAbsolviert' => 'infocenter:r',
'showDetails' => 'infocenter:r',
'showZGVDetails' => 'lehre/zgvpruefung:r',
@@ -203,6 +205,16 @@ class InfoCenter extends Auth_Controller
$this->load->view('system/infocenter/infocenterFreigegeben.php');
}
/**
* Abgewiesen page of the InfoCenter tool
*/
public function abgewiesen()
{
$this->_setNavigationMenu(self::ABGEWIESEN_PAGE); // define the navigation menu for this page
$this->load->view('system/infocenter/infocenterAbgewiesen.php');
}
/**
*
*/
@@ -548,8 +560,10 @@ class InfoCenter extends Auth_Controller
/**
* Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang
*/
private function sendZgvMail($mail, $typ){
private function sendZgvMail($mail, $typ, $person){
$data = array(
'vorname' => $person->vorname,
'nachname' => $person->nachname,
'link' => site_url('system/infocenter/ZGVUeberpruefung')
);
@@ -645,6 +659,16 @@ class InfoCenter extends Auth_Controller
if (isEmptyString($prestudent_id) || isEmptyString($person_id))
$this->terminateWithJsonError('Prestudentid OR/AND Personid missing');
$person = $this->PersonModel->load($person_id);
if (isError($person))
$this->terminateWithJsonError(getError($person));
if (!hasData($person))
$this->terminateWithJsonError('Person existiert nicht.');
$person = getData($person)[0];
$zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id);
$data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
@@ -676,7 +700,7 @@ class InfoCenter extends Auth_Controller
$this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg'));
if (isSuccess($insert))
$this->sendZgvMail($mail, $typ);
$this->sendZgvMail($mail, $typ, $person);
elseif (isError($insert))
$this->terminateWithJsonError('Fehler beim Speichern');
}else
@@ -702,7 +726,7 @@ class InfoCenter extends Auth_Controller
$this->_log($person_id, 'newzgv', array($zgvpruefung_id));
if (isSuccess($result))
$this->sendZgvMail($mail, $typ);
$this->sendZgvMail($mail, $typ, $person);
elseif (isError($result))
$this->terminateWithJsonError('Fehler beim Speichern');
}
@@ -921,7 +945,8 @@ class InfoCenter extends Auth_Controller
$this->_log($person_id, 'freigegeben', $logparams);
$this->_sendFreigabeMail($prestudent_id);
if (is_numeric($statusgrund_id) || $logdata['studiengang_typ'] === 'm')
$this->_sendFreigabeMail($prestudent_id);
}
}
}
@@ -1199,6 +1224,10 @@ class InfoCenter extends Auth_Controller
{
$this->_setNavigationMenu(self::REIHUNGSTESTABSOLVIERT_PAGE);
}
elseif (strpos($navigation_page, self::ABGEWIESEN_PAGE) !== false)
{
$this->_setNavigationMenu(self::ABGEWIESEN_PAGE);
}
$this->outputJsonSuccess('success');
}
@@ -1422,12 +1451,14 @@ class InfoCenter extends Auth_Controller
$freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
$reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
$currentFilterId = $this->input->get(self::FILTER_ID);
if (isset($currentFilterId))
{
$freigegebenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
}
$this->navigationlib->setSessionMenu(
@@ -1466,6 +1497,18 @@ class InfoCenter extends Auth_Controller
null, // subscriptLinkValue
'', // target
20 // sort
),
'abgewiesen' => $this->navigationlib->oneLevel(
'Abgewiesene', // description
$abgewiesenLink, // link
null, // children
'close', // icon
null, // subscriptDescription
false, // expand
null, // subscriptLinkClass
null, // subscriptLinkValue
'', // target
30 // sort
)
)
);
@@ -1491,6 +1534,8 @@ class InfoCenter extends Auth_Controller
}
if ($origin_page === self::ZGV_UBERPRUEFUNG_PAGE)
$link = site_url(self::ZGV_UEBERPRUEFUNG_URI);
if ($origin_page === self::ABGEWIESEN_PAGE)
$link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
if (isset($prevFilterId))
@@ -1528,6 +1573,7 @@ class InfoCenter extends Auth_Controller
$homeLink = site_url(self::INFOCENTER_URI.'/'.self::INDEX_PAGE);
$freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
$absolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
if (isset($prevFilterId))
{
@@ -1586,6 +1632,24 @@ class InfoCenter extends Auth_Controller
)
);
}
if($page == self::ABGEWIESEN_PAGE)
{
$this->navigationlib->setSessionElementMenu(
'abgewiesen',
$this->navigationlib->oneLevel(
'Abgewiesene', // description
$abgewiesenLink, // link
null, // children
'close', // icon
null, // subscriptDescription
false, // expand
null, // subscriptLinkClass
null, // subscriptLinkValue
'', // target
40 // sort
)
);
}
}
/**
@@ -1656,9 +1720,15 @@ class InfoCenter extends Auth_Controller
if (isset($locked->retval[0]->uid))
{
$lockedby = $locked->retval[0]->uid;
if ($lockedby !== $this->_uid)
if (!$lockedby = getData($this->PersonModel->getFullName($locked->retval[0]->uid)))
{
show_error('Failed retrieving person');
}
if ($locked->retval[0]->uid !== $this->_uid)
{
$lockedbyother = true;
}
}
$stammdaten = $this->PersonModel->getPersonStammdaten($person_id, true);
@@ -58,21 +58,42 @@ class Issues extends Auth_Controller
{
$issue_ids = $this->input->post('issue_ids');
$status_kurzbz = $this->input->post('status_kurzbz');
$verarbeitetvon = $this->_uid;
$user = $this->_uid;
$errors = array();
foreach ($issue_ids as $issue_id)
{
$issueRes = $this->issueslib->changeIssueStatus($issue_id, $status_kurzbz, $verarbeitetvon);
switch ($status_kurzbz)
{
case IssuesLib::STATUS_NEU:
$changeIssueMethod = 'setNeu';
break;
case IssuesLib::STATUS_IN_BEARBEITUNG:
$changeIssueMethod = 'setInBearbeitung';
break;
case IssuesLib::STATUS_BEHOBEN:
$changeIssueMethod = 'setBehoben';
break;
default:
$changeIssueMethod = null;
break;
}
if (isError($issueRes))
$errors[] = getError($issueRes);
if (isEmptyString($changeIssueMethod))
$errors[] = error("Invalid issue status given");
else
{
$issueRes = $this->issueslib->{$changeIssueMethod}($issue_id, $user);
if (isError($issueRes))
$errors[] = getError($issueRes);
}
}
if (!isEmptyArray($errors))
$this->outputJsonError(implode(", ", $errors));
else
$this->outputJsonSuccess("Status erfolgreich aktualisiert");
$this->outputJsonSuccess("Status successfully refreshed");
}
/**
@@ -133,7 +154,7 @@ class Issues extends Auth_Controller
// add oes for which there is the "manage issues" Berechtigung
if (!$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ))
show_error('Keine Berechtigung oder Fehler bei Berechtigungsprüfung');
show_error('No permission or error when checking permissions');
$all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt));