Compare commits

..

14 Commits

Author SHA1 Message Date
ma0068 765884b0dc add also insert statement for dashboard.tbl_dashboard_widget 2026-06-11 16:07:49 +02:00
ma0068 fe8cf9bc83 new widget CIS4 MA Widget
- db-update for new widget studstatus
- different view for stgL and stgA
- update phrases
2026-06-11 15:34:45 +02:00
Andreas Österreicher 2f90112e4d Merge branch 'rc_reihungstest' 2026-06-01 10:58:33 +02:00
Andreas Österreicher 774eb90bcc Merge branch 'feature-76918/reihungstest_gebiete_nur_von_abegschickten_studiengaengen' into rc_reihungstest 2026-06-01 09:46:12 +02:00
Andreas Österreicher 1def930147 Merge branch 'feature-76920/reihungstest_fertig_nachricht_anzeigen_wenn_alle_gebiete_abgeschlossen_wurden' into rc_reihungstest 2026-06-01 09:11:02 +02:00
Andreas Österreicher 30b8a406a5 Merge branch 'feature-75888/reihungstest_mehrfachdurchfuehrung' into rc_reihungstest 2026-06-01 09:10:35 +02:00
Andreas Österreicher 093842274e Merge branch 'feature-75887/reihungstest_constructor_popups' into rc_reihungstest 2026-06-01 09:05:22 +02:00
ma0048 fd2f4187fa wording angepasst 2026-05-27 12:34:04 +02:00
ma0048 b2bebb7fa3 alle gebiete wurden gestartet meldung 2026-05-26 13:32:21 +02:00
ma0048 e32cce57fe gebiete nur von abgeschickten stg 2026-05-26 13:26:16 +02:00
ma0048 bf5ab6b7dd nur prestudent mit dem bewerber status beruecksichtigen 2026-05-05 15:19:57 +02:00
ma0048 13e8a1a9f6 bug fixed + infocenter performance 2026-04-16 14:21:02 +02:00
ma0048 36beb927f1 rt login zusaetzlicher check, ob die anmeldung mit dem prestudent studienplan uebereinstimmt 2026-03-16 09:51:08 +01:00
ma0048 ee41b2b68d alert und confirm auf dialog umgebaut 2026-03-16 09:40:40 +01:00
25 changed files with 708 additions and 331 deletions
-45
View File
@@ -1,45 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
$config['stv_menu'] = array(
'library' => 'treemenu/StvMenuLib',
'children' => array(
'stg' => array(
'library' => 'treemenu/StgLib',
/*
'children' => array(
'pre' => array(
'library' => 'treemenu/PrestudentLib'
),
'sem' => array(
'library' => 'treemenu/AusbSemesterLib',
'children' => array(
'vbd' => array(
'library' => 'treemenu/VerbandLib'
)
)
),
'orgform' => array(
'library' => 'treemenu/OrgFormLib',
'children' => array(
'pre' => array(
'library' => 'treemenu/PrestudentLib'
),
'sem' => array(
'library' => 'treemenu/AusbSemesterLib',
'children' => array(
'vbd' => array(
'library' => 'treemenu/VerbandLib'
)
)
)
)
)
)
*/
),
'inout' => array(
'library' => 'treemenu/InOutLib'
),
)
);
@@ -0,0 +1,145 @@
<?php
/**
* Copyright (C) 2026 fhcomplete.org
*
* 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 3 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, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
class StudstatusAntraege extends FHCAPI_Controller
{
/**
* Object initialization
*/
public function __construct()
{
parent::__construct([
'getTodos' => self::PERM_LOGGED
]);
//load models
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* gets all todos of antraegen of the user with stg leitungsfunction
* or list of open antraege for user with assistance function
* @access public
* @return array || []
*/
public function getTodos()
{
$uid = getAuthUID();
//at first get studiengang with leitungsfunktion
$result = $this->BenutzerfunktionModel->getSTGLByUID($uid);
if(hasData($result))
{
$funktionen = getData($result);
$studiengaenge = [];
foreach ($funktionen as $funktion) {
$studiengaenge[] = $funktion->studiengang_kz;
}
$dataAntrage = [];
$result = $this->StudierendenantragModel->getOpenAntraegeForStgl($studiengaenge);
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
$dataAntrage[] = getData($result) ?: [];
$statusRole = 1;
$this->terminateWithSuccess([count($dataAntrage) > 0 ? $dataAntrage[0] : $dataAntrage, $statusRole]);
}
//TODO delete after check if needed or not
//get studiengaenge of assistance (regarding benutzerfunktion)
//$result = $this->BenutzerfunktionModel->getSTGAssByUID($uid);
/* if(hasData($result)) {
$statusRole = 2;
$funktionen = getData($result);
$studiengaenge = [];
foreach ($funktionen as $funktion) {
$studiengaenge[] = $funktion->studiengang_kz;
}
$ci->addMeta('stgAss', $studiengaenge);
$dataAntrage = [];
foreach ($studiengaenge as $studiengang)
{
$result = $this->StudierendenantragModel->getOpenAntraegeForAss($studiengang);
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
if(hasData($result)) {
$dataAntrage[] = getData($result);
$statusRole = 2;
}
}
}
else
{
$statusRole = 0;
$dataAntrage = [];
//$this->terminateWithSuccess([[], $statusRole]);
}*/
//get studiengaenge of assistance (regarding rights)
$stgAss = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
if(!is_array($stgAss))
{
$statusRole = 0;
$this->terminateWithSuccess([[], $statusRole]);
}
else {
$statusRole = 2;
$studiengaenge = [];
foreach ($stgAss as $stg) {
$studiengaenge[] = (int) $stg;
}
$dataAntrage = [];
$result = $this->StudierendenantragModel->getOpenAntraegeForAss($studiengaenge);
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
if(hasData($result)) {
$dataAntrage[] = getData($result);
$statusRole = 2;
}
$this->terminateWithSuccess([count($dataAntrage) > 0 ? $dataAntrage[0] : $dataAntrage, $statusRole]);
}
}
}
@@ -1,109 +0,0 @@
<?php
/**
* Copyright (C) 2024 fhcomplete.org
*
* 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 3 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, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* This controller operates between (interface) the JS (GUI) and the back-end
* Provides data to the ajax get calls about verbände
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
*/
class TreeMenu extends FHCAPI_Controller
{
protected $treemenuconfig;
public function __construct()
{
parent::__construct([
'fullMenu' => ['admin:r', 'assistenz:r'],
'partMenu' => ['admin:r', 'assistenz:r'],
]);
}
public function fullMenu($treemenu=null)
{
if(is_null($treemenu))
{
$this->terminateWithError('missing parameter treemenu.');
}
$this->loadMenuConfig($treemenu);
$bhdebug = (object) array(
'treemenu' => $treemenu,
'treemenuconfig' => $this->treemenuconfig
);
$this->addMeta('bhdebug', $bhdebug);
$data = array();
$this->terminateWithSuccess($data);
}
public function partMenu($treemenu=null)
{
if(is_null($treemenu))
{
$this->terminateWithError('missing parameter treemenu.');
}
$this->loadMenuConfig($treemenu);
$startconfig = $this->findStartLib($this->treemenuconfig, array_keys($this->uri->uri_to_assoc(7)));
$libpath = $startconfig['library'];
$children = isset($startconfig['children']) ? $startconfig['children'] : array();
$libname = basename($startconfig['library']);
$this->load->library(
$libpath,
$children,
$libname
);
$bhdebug = (object) array(
'treemenu' => $treemenu,
'treemenuconfig' => $this->treemenuconfig,
'uri' => $this->uri->uri_to_assoc(7),
'libpath' => $libpath,
'libname' => $libname,
'children' => $children,
'startconfig' => $startconfig
);
$this->addMeta('bhdebug', $bhdebug);
//$this->addMeta('bhci', $this);
$data = $this->$libname->getSubMenu();
$this->terminateWithSuccess($data);
}
protected function findStartLib($config, $uri)
{
$level = array_shift($uri);
if(is_null($level)) {
return $config;
}
return $this->findStartLib($config['children'][$level], $uri);
}
protected function loadMenuConfig($treemenu)
{
$this->config->load('treemenu/' . $treemenu . '.php');
$this->treemenuconfig = $this->config->item($treemenu);
}
}
@@ -1,42 +0,0 @@
<?php
require_once APPPATH . 'libraries/treemenu/TreeMenuLib.php';
/**
* Description of InOutLib
*
* @author bambi
*/
class InOutLib extends TreeMenuLib
{
public function getNodes()
{
return [
[
'name' => 'International',
'link' => 'inout',
'children' => [
[
'name' => 'Incoming',
'link' => 'inout/incoming',
'leaf' => true
],
[
'name' => 'Outgoing',
'link' => 'inout/outgoing',
'leaf' => true
],
[
'name' => 'Gemeinsame Studien',
'link' => 'inout/gemeinsamestudien',
'leaf' => true
]
]
]
];
}
public function getSubMenu()
{
return [];
}
}
-38
View File
@@ -1,38 +0,0 @@
<?php
require_once APPPATH . 'libraries/treemenu/TreeMenuLib.php';
/**
* Description of InOutLib
*
* @author bambi
*/
class StgLib extends TreeMenuLib
{
public function getNodes()
{
$this->ci->load->model('organisation/Studiengang_model', 'StudiengangModel');
$res = $this->ci->StudiengangModel->loadWhere(array('aktiv' => true));
$stgs = hasData($res) ? getData($res) : array();
$this->ci->addMeta('bhstg', $stgs);
$nodes = array_map(
function($stg) {
return array(
'name' => strtoupper($stg->typ . $stg->kurzbz) . ' ' . $stg->bezeichnung,
'link' => 'stg/' . $stg->studiengang_kz,
'leaf' => false
);
},
$stgs
);
return $nodes;
}
public function getSubMenu()
{
return [
'StgLib' => 'test123'
];
}
}
@@ -1,23 +0,0 @@
<?php
require_once APPPATH . 'libraries/treemenu/TreeMenuLib.php';
/**
* Description of StvMenuLib
*
* @author bambi
*/
class StvMenuLib extends TreeMenuLib
{
public function getSubMenu()
{
$nodes = array();
foreach($this->children_config as $childconfig)
{
$childlib = basename($childconfig['library']);
$childnodes = $this->ci->$childlib->getNodes();
$nodes = array_merge($nodes, $childnodes);
}
return $nodes;
}
}
@@ -1,39 +0,0 @@
<?php
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
*/
/**
* Description of InOutLib
*
* @author bambi
*/
abstract class TreeMenuLib
{
protected $ci;
protected $children_config;
public function __construct($children_config)
{
$this->ci =& get_instance();
$this->children_config = $children_config;
foreach($this->children_config as $child_config)
{
$grandchildren_config = isset($child_config['children']) ? $child_config['children'] : [];
$this->ci->load->library($child_config['library'], $grandchildren_config, basename($child_config['library']));
}
}
public function getNode($name)
{
$node = array(
'name' => $name
);
return $node;
}
public abstract function getSubMenu();
}
@@ -490,4 +490,75 @@ class Studierendenantrag_model extends DB_Model
return hasData($this->load());
}
/**
* Loads all todos for a certain studiengangsleiter
*
* @param integer $stg_kz
*
* @return stdClass
*/
public function getOpenAntraegeForStgl($stg_kz)
{
$qry = "
SELECT
studierendenantrag_id,
prestudent_id,
typ,
person.nachname,
person.vorname,
ps.studiengang_kz
FROM campus.tbl_studierendenantrag a
JOIN public.tbl_prestudent ps USING (prestudent_id)
JOIN public.tbl_person person USING (person_id)
WHERE studiengang_kz in ?
AND (
(typ IN ('Abmeldung', 'AbmeldungStgl', 'Unterbrechung')
AND campus.get_status_studierendenantrag(a.studierendenantrag_id) = 'Erstellt')
OR
(typ = 'Wiederholung'
AND campus.get_status_studierendenantrag(a.studierendenantrag_id) = 'Lvszugewiesen')
)
ORDER BY typ;
";
$params = array($stg_kz);
return $this->execQuery($qry, $params);
}
/**
* Lists all open antraege for a certain stg
*
* @param Array $stg_kz
*
* @return stdClass
*/
public function getOpenAntraegeForAss($stg_kz)
{
$qry = "
SELECT
UPPER(stg.typ) || UPPER(stg.kurzbz) || ' ' || stg.bezeichnung AS studiengang,
COUNT(*) AS anzahl
FROM campus.tbl_studierendenantrag
JOIN public.tbl_prestudent p USING (prestudent_id)
JOIN public.tbl_studiengang stg ON p.studiengang_kz=stg.studiengang_kz
JOIN campus.tbl_studierendenantrag_status as s ON campus.get_status_id_studierendenantrag(campus.tbl_studierendenantrag.studierendenantrag_id) = studierendenantrag_status_id
JOIN campus.tbl_studierendenantrag_statustyp as st USING (studierendenantrag_statustyp_kurzbz)
WHERE (
s.studierendenantrag_statustyp_kurzbz NOT IN('Zurueckgezogen', 'Genehmigt', 'Abgelehnt', 'EinspruchAbgelehnt', 'Abgemeldet', 'Pause', 'EmailVersandt')
OR (
s.studierendenantrag_statustyp_kurzbz = 'Genehmigt'
AND tbl_studierendenantrag.typ = 'AbmeldungStgl'
)
)
AND p.studiengang_kz IN ?
GROUP BY studiengang
ORDER BY studiengang
"
;
$params = array($stg_kz);
return $this->execQuery($qry, $params);
}
}
@@ -321,6 +321,40 @@ class Benutzerfunktion_model extends DB_Model
return $record;
}
/**
* Get active Assistenz(en) of the user by UID.
* @param $uid
*/
public function getSTGAssByUID($uid)
{
$query = '
SELECT
uid,
oe_kurzbz,
studiengang_kz,
typ,
tbl_studiengang.bezeichnung
FROM
public.tbl_benutzerfunktion
JOIN public.tbl_studiengang USING (oe_kurzbz)
WHERE
funktion_kurzbz = \'ass\'
AND (datum_von IS NULL OR datum_von <= now())
AND (datum_bis IS NULL OR datum_bis >= now())
AND uid = ?
ORDER BY
oe_kurzbz
';
$parameters_array = array();
if (is_string($uid))
{
$parameters_array[] = $uid;
}
return $this->execQuery($query, $parameters_array);
}
function updateBenutzerfunktion($funktionJson)
{
$funktionJson['updatevon'] = getAuthUID();
@@ -315,22 +315,15 @@
WHERE tpl.app = '.$APP.'
) pl USING(person_id)
LEFT JOIN (
SELECT
SELECT DISTINCT ON (tbl_rueckstellung.person_id)
tbl_rueckstellung.person_id,
tbl_rueckstellung.datum_bis,
tbl_rueckstellung.status_kurzbz,
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
FROM public.tbl_rueckstellung
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
WHERE tbl_rueckstellung.rueckstellung_id =
(
SELECT srueck.rueckstellung_id
FROM public.tbl_rueckstellung srueck
WHERE srueck.person_id = tbl_rueckstellung.person_id
AND datum_bis >= NOW()
ORDER BY srueck.datum_bis DESC LIMIT 1
)
WHERE tbl_rueckstellung.datum_bis >= NOW()
ORDER BY tbl_rueckstellung.person_id, tbl_rueckstellung.datum_bis DESC
) rueck ON rueck.person_id = p.person_id
WHERE
EXISTS (
@@ -24,22 +24,15 @@ $query = '
WHERE tpl.app = '.$APP.'
) pl ON p.person_id = pl.person_id
LEFT JOIN (
SELECT
SELECT DISTINCT ON (tbl_rueckstellung.person_id)
tbl_rueckstellung.person_id,
tbl_rueckstellung.datum_bis,
tbl_rueckstellung.status_kurzbz,
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
FROM public.tbl_rueckstellung
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
WHERE tbl_rueckstellung.rueckstellung_id =
(
SELECT srueck.rueckstellung_id
FROM public.tbl_rueckstellung srueck
WHERE srueck.person_id = tbl_rueckstellung.person_id
AND datum_bis >= NOW()
ORDER BY srueck.datum_bis DESC LIMIT 1
)
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
WHERE tbl_rueckstellung.datum_bis >= NOW()
ORDER BY tbl_rueckstellung.person_id, tbl_rueckstellung.datum_bis DESC
) rueck ON rueck.person_id = p.person_id
WHERE p.person_id NOT IN (SELECT person_id FROM public.tbl_prestudent)';
+75 -11
View File
@@ -80,9 +80,17 @@ echo '
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<link rel="stylesheet" href="../../vendor/components/jqueryui/themes/base/jquery-ui.min.css" type="text/css" />
<link rel="stylesheet" href="../../vendor/twbs/bootstrap3/dist/css/bootstrap.min.css" type="text/css"/>
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css" />
<style>
.ui-dialog-titlebar-close
{
visibility: hidden !important;
}
</style>
<script type="text/javascript" src="../../vendor/components/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
<script type="text/javascript" src="../../vendor/twbs/bootstrap3/dist/js/bootstrap.min.js"></script>
<script language="Javascript" type="text/javascript">
//<![CDATA[
@@ -131,22 +139,78 @@ echo '
}
}
function GebietStarten(bezeichnung,stunde,minute,sekunde,gebiet_id)
function GebietStarten(bezeichnung, stunde, minute, sekunde, gebiet_id)
{
var check = confirm(<?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?>+' '+stunde+'h '+minute+'m '+sekunde+'s');
if (check == true) {
var sprache_user = <?php echo "'".$sprache_user."'"?>;
document.location.href = 'frage.php?gebiet_id='+gebiet_id+'&start=true';
}
else {
return false;
let message = <?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?> + ' ' + stunde + 'h ' + minute + 'm ' + sekunde + 's';
let title = <?php echo "'".$p->t('testtool/startGebiet')."'"?>;
let abbrechen = <?php echo "'".$p->t('testtool/abbrechen')."'"?>;
if ($('#gebiet-dialog').length === 0)
{
$('body').append(
'<div id="gebiet-dialog" title="' + title + '">' +
'<p id="gebiet-dialog-msg">' + message + '</p>' +
'</div>'
);
}
$('#gebiet-dialog').dialog({
modal: true,
width: 400,
resizable: false,
buttons: [
{
text: 'OK',
click: function() {
$(this).dialog('close');
document.location.href = 'frage.php?gebiet_id=' + gebiet_id + '&start=true';
}
},
{
text: abbrechen,
click: function() {
$(this).dialog('close');
}
}
]
});
}
let letzteFrageBestaetigt = false;
function letzteFrage()
{
alert(<?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>);
return true;
if (letzteFrageBestaetigt)
return true;
let message = <?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>;
if ($('#fertig-dialog').length === 0)
{
$('body').append(
'<div id="fertig-dialog">' +
'<p>' + message + '</p>' +
'</div>'
);
}
$('#fertig-dialog').dialog({
modal: true,
width: 400,
resizable: false,
buttons: [
{
text: 'OK',
click: function() {
$(this).dialog('close');
letzteFrageBestaetigt = true;
$('[name="submitantwort"]').click();
}
}
]
});
return false;
}
$(document).ready(function () {
@@ -647,7 +711,7 @@ if($frage->frage_id!='')
}
$letzte = $frage->getNextFrage($gebiet_id, $_SESSION['pruefling_id'], $frage_id, $demo);
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&amp;frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"letzteFrage()\"":"").">";
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&amp;frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"return letzteFrage()\"":"").">";
echo '
<div class="row text-center">
<table class="table" style="width: 600px; margin-left: auto; margin-right: auto;">
+22
View File
@@ -44,6 +44,27 @@ if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
$sprache_user = (isset($_SESSION['sprache_user']) && !empty($_SESSION['sprache_user'])) ? $_SESSION['sprache_user'] : DEFAULT_LANGUAGE;
$p = new phrasen($sprache_user);
$showInfo = false;
if (isset($_SESSION['alleGebiete']))
{
$alleGebiete = array_map('intval', $_SESSION['alleGebiete']);
$pruefling_id = $_SESSION['pruefling_id'];
$qry = "SELECT COUNT(DISTINCT gebiet_id) as anzahl
FROM testtool.tbl_pruefling_frage
JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id IN (". implode(',', $alleGebiete) .")
AND pruefling_id = ". $pruefling_id ."
";
$result = $db->db_query($qry);
$anzahlGebiete = $db->db_fetch_object($result);
if ((int)$anzahlGebiete->anzahl === count($alleGebiete))
$showInfo = true;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -69,6 +90,7 @@ $p = new phrasen($sprache_user);
<body>
<br><br><br><br><br>
<center><h2><?php echo $p->t('testtool/zeitAbgelaufen');?></h2>
<h3><?php echo ($showInfo ? ($p->t('testtool/alleGebietGestartet') . "<br />" . $p->t('testtool/alleGebieteGestartetInfo')) : ''); ?></h3>
</center>
</body>
</html>
+11 -2
View File
@@ -142,7 +142,9 @@ if (isset($_REQUEST['prestudent']))
}
if ($reihungstest_id != '' && $rt->load($reihungstest_id))
{
if ($rt->freigeschaltet)
$pruefling_exist = new Pruefling();
$alreadyInRT = $pruefling_exist->personAlreadyInRT($ps->person_id, $rt->reihungstest_id, $ps->prestudent_id);
if ($rt->freigeschaltet && !$alreadyInRT)
{
// regenerate Session ID after Login
session_regenerate_id();
@@ -282,7 +284,14 @@ if (isset($_REQUEST['prestudent']))
}
else
{
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
if ($alreadyInRT)
{
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtRegistriert').'</div>';
}
else
{
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
}
}
}
else
+24
View File
@@ -187,6 +187,7 @@ else if (isset($_SESSION['pruefling_id']))
}
$qry .= "
AND ps_status.bewerbung_abgeschicktamum IS NOT NULL
/* Order to get last semester when using distinct on */
ORDER BY
@@ -405,6 +406,29 @@ else if (isset($_SESSION['pruefling_id']))
echo '</table>';
}
if (isset($_SESSION['pruefling_id']) && !empty($_SESSION['alleGebiete']))
{
$alleGebiete = array_map('intval', $_SESSION['alleGebiete']);
$pruefling_id = (int)$_SESSION['pruefling_id'];
$qry = "SELECT COUNT(DISTINCT gebiet_id) AS anzahl
FROM testtool.tbl_pruefling_frage
JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id IN (". implode(',', $alleGebiete) .")
AND pruefling_id = ". $pruefling_id;
$result_check = $db->db_query($qry);
$row_check = $db->db_fetch_object($result_check);
if ((int)$row_check->anzahl === count($alleGebiete))
{
echo '<tr><td>
<div class="alert alert-success small" style="margin-left: 20px; width: 170px; margin-top: 3px;" role="alert">
<strong>'.$p->t('testtool/alleGebietGestartet').'</strong>
</div>
</td></tr>';
}
}
// Link zum Logout
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
+26
View File
@@ -584,6 +584,32 @@ class pruefling extends basis_db
$qry .= " LIMIT 1";
if($result = $this->db_query($qry))
{
if ($this->db_num_rows($result) == 0)
return false;
else
return true;
}
else
{
$this->errormsg = 'Fehler bei einer Abfrage';
return false;
}
}
public function personAlreadyInRT($person_id, $reihungstest_id, $prestudent_id)
{
$qry = "SELECT tbl_prestudent.prestudent_id
FROM public.tbl_rt_person
JOIN public.tbl_prestudent ON tbl_prestudent.person_id = tbl_rt_person.person_id
JOIN public.tbl_prestudentstatus ON tbl_prestudent.prestudent_id = tbl_prestudentstatus.prestudent_id AND status_kurzbz = 'Bewerber'
AND tbl_prestudentstatus.studienplan_id = tbl_rt_person.studienplan_id
WHERE tbl_rt_person.person_id = " . $this->db_add_param($person_id) . "
AND tbl_rt_person.rt_id = " . $this->db_add_param($reihungstest_id) . "
AND tbl_prestudent.prestudent_id != " . $this->db_add_param($prestudent_id) . "
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) = 'Bewerber'
LIMIT 1";
if($result = $this->db_query($qry))
{
if ($this->db_num_rows($result) == 0)
+5
View File
@@ -17,6 +17,7 @@ $this->phrasen['testtool/basic']='Basic';
$this->phrasen['testtool/basisgebiete']='Basisgebiete';
$this->phrasen['testtool/semester']='Semester';
$this->phrasen['testtool/reihungstestNichtFreigeschalten']='Der zuteilte Reihungstest ist noch nicht freigeschaltet';
$this->phrasen['testtool/reihungstestNichtRegistriert']='Sie sind für den Reihungstest nicht registriert';
$this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='Der Reihungstest dem Sie zugeteilt sind, kann nicht geladen werden. Melden Sie sich bitte bei der Reihungstestaufsicht.';
$this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Ihr Geburtsdatum stimmt nicht mit unseren Daten überein. Bitte wenden Sie sich an die Aufsichtsperson';
$this->phrasen['testtool/home']='Home';
@@ -31,10 +32,14 @@ $this->phrasen['testtool/keineAntwort']='Keine Antwort';
$this->phrasen['testtool/speichernUndWeiter']='Speichern und weiter';
$this->phrasen['testtool/alleFragenBeantwortet']='GLÜCKWUNSCH! \n\nSie haben alle Fragen in der zur Verfügung stehenden Zeit beantwortet. \nNutzen Sie die verbleibende Zeit, um Ihre Antworten zu kontrollieren oder fahren Sie mit dem nächsten Teilgebiet fort.';
$this->phrasen['testtool/zeitAbgelaufen']='Die Maximalzeit für dieses Gebiet ist abgelaufen, oder alle Fragen wurden beantwortet';
$this->phrasen['testtool/alleGebietGestartet']='Sie haben alle Gebiete bearbeitet.';
$this->phrasen['testtool/alleGebieteGestartetInfo']='Sie können sich nun ausloggen und den Browser schließen.';
$this->phrasen['testtool/spracheDerTestfragen']='Gewünschte Sprache der Testfragen';
$this->phrasen['testtool/einleitung']='Einleitung';
$this->phrasen['testtool/blaettern']='Blättern';
$this->phrasen['testtool/demo']='Demobeispiel ansehen';
$this->phrasen['testtool/abbrechen']='Abbrechen';
$this->phrasen['testtool/startGebiet']='Gebiet starten';
$this->phrasen['testtool/okKlickenUmZuStarten']='Klicken Sie OK um dieses Gebiet zu starten. \nSie haben für die Bearbeitung ein Zeitlimit von';
$this->phrasen['testtool/bitteZuerstAnmelden']='Bitte zuerst anmelden!';
$this->phrasen['testtool/fehlerBeimGenerierenDesFragenpools']='Fehler beim generieren des Fragenpools';
+5
View File
@@ -17,6 +17,7 @@ $this->phrasen['testtool/basic']='Basic';
$this->phrasen['testtool/basisgebiete']='Basic test';
$this->phrasen['testtool/semester']='Semester';
$this->phrasen['testtool/reihungstestNichtFreigeschalten']='The entrance examination assigned has not yet been activated.';
$this->phrasen['testtool/reihungstestNichtRegistriert']='You are not registered for the placement test.';
$this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='The placement test you are assigned to could not be loaded. Please contact the placement test supervisior.';
$this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Your date of birth does not correspond to the data we have. Please speak to the supervisor. ';
$this->phrasen['testtool/home']='Home';
@@ -31,10 +32,14 @@ $this->phrasen['testtool/keineAntwort']='No Answer';
$this->phrasen['testtool/speichernUndWeiter']='Save and next';
$this->phrasen['testtool/alleFragenBeantwortet']='CONGRATULATIONS!\n\nYou have answered all the questions in the time allowed.\n Use the remaining time to check your answers or continue to the next section.';
$this->phrasen['testtool/zeitAbgelaufen']='The time for this part has expired or you have answered all the questions.';
$this->phrasen['testtool/alleGebietGestartet']='You have worked on all sections.';
$this->phrasen['testtool/alleGebieteGestartetInfo']='You can now log out and close the browser.';
$this->phrasen['testtool/spracheDerTestfragen']='Desired language of questions';
$this->phrasen['testtool/einleitung']='Introduction';
$this->phrasen['testtool/blaettern']='Browse';
$this->phrasen['testtool/demo']='See an example';
$this->phrasen['testtool/abbrechen']='Cancel';
$this->phrasen['testtool/startGebiet']='Start the section';
$this->phrasen['testtool/okKlickenUmZuStarten']='Click OK to start this section. \nYou have a timelimit of';
$this->phrasen['testtool/bitteZuerstAnmelden']='Please log in first!';
$this->phrasen['testtool/fehlerBeimGenerierenDesFragenpools']='Error in generating the pool of questions.';
@@ -0,0 +1,25 @@
/**
* Copyright (C) 2026 fhcomplete.org
*
* 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 3 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, see <https://www.gnu.org/licenses/>.
*/
export default {
getTodos() {
return {
method: 'get',
url: '/api/frontend/v1/StudstatusAntraege/getTodos'
};
},
};
@@ -0,0 +1,75 @@
import AbstractWidget from './Abstract.js';
import ApiStudstatus from '../../api/factory/widget/studstatus.js';
export default {
name: "WidgetStudstatus",
mixins: [AbstractWidget],
data(){
return {
statusData: [],
role: 0
};
},
mounted(){
this.getTodos();
},
computed: {
countTodosLeitung(){
return this.statusData.length;
},
countTodosAss(){
return this.statusData.reduce(
(sum, item) => sum + item.anzahl,
0
);
},
linkStudstatus(){
return (
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
"/lehre/Studierendenantrag/leitung/"
);
},
},
methods: {
getTodos(){
this.$api
.call(ApiStudstatus.getTodos())
.then(result => {
this.statusData = result.data[0];
this.role = result.data[1];
})
.catch(this.$fhcAlert.handleSystemError);
}
},
template:/*html*/`
<div class="p-3 w-100 h-100 overflow-auto" style="padding: 1rem 1rem;">
<div v-if="role== 0">
{{$p.t('dashboard','noPermissionStudstatus')}}
</div>
<div v-else-if="role==1 && countTodosLeitung">
<p><span class="fw-bold">{{countTodosLeitung}} {{$p.t('dashboard','antraegeToEdit')}}: </span> </p>
<div v-for="status in statusData">
<span class="fw-bold">{{status.typ}}</span> {{status.vorname}} {{status.nachname}} ({{status.prestudent_id}})
</div>
</div>
<div v-else-if="role==2 && countTodosAss">
<span class="fw-bold">{{countTodosAss}} {{$p.t('dashboard','antraegeOpen')}}:</span>
<br><br>
<div v-for="status in statusData">
{{status.studiengang}} ({{status.anzahl}})
</div>
</div>
<div v-else>
{{$p.t('dashboard','antraegeNoOpen')}}
</div>
<div v-if="role!=0" class="mt-3">
<a :href="linkStudstatus" target='blank'>{{$p.t('dashboard','linkVerwaltungStudstatus')}}</a>
</div>
</div>
`
};
@@ -21,7 +21,7 @@ export default {
studierendenantragId: Number,
infoArray: Array,
statusMsg: String,
statusSeverity: String
statusSeverity: String,
},
data() {
return {
+2
View File
@@ -94,6 +94,8 @@ require_once('dbupdate_3.4/71399_dashboard_update_widget_paths.php');
require_once('dbupdate_3.4/71645_studvw_messagetab_ladezeit.php');
require_once('dbupdate_3.4/71566_studienordnungsdokument_neuer_organisationseinheitstyp_programm.php');
require_once('dbupdate_3.4/70376_lohnguide.php');
require_once('dbupdate_3.4/75888_reihungstest_mehrfachdurchfuehrung.php');
require_once('dbupdate_3.4/77048_cis4_mitarbeiter_studstatus_widget.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -0,0 +1,15 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_benutzerfunktion_uid'"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = "CREATE INDEX idx_tbl_benutzerfunktion_uid ON public.tbl_benutzerfunktion USING btree (uid)";
if (! $db->db_query($qry))
echo '<strong>idx_tbl_benutzerfunktion_uid: ' . $db->db_last_error() . '</strong><br>';
else
echo 'Index idx_tbl_benutzerfunktion_uid angelegt<br>';
}
}
@@ -0,0 +1,63 @@
<?php
// neues widget mit widget_kurzbz = 'studstatus' als Zeile hinzufügen
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz= 'studstatus';"))
{
if($db->db_num_rows($result) == 0)
{
$qry = "
INSERT INTO dashboard.tbl_widget (
widget_id,
widget_kurzbz,
beschreibung,
arguments,
setup
)
VALUES (
9,
'studstatus',
'Widget Todos Studierendenstatus',
'{
\"css\": \"d-flex justify-content-center align-items-center h-100\",
\"title\": \"Tasks Studstatus\"
}'::jsonb,
'{
\"file\": \"public/js/components/DashboardWidget/StudStatus.js\",
\"icon\": \"/skin/images/fh_technikum_wien_illustration_klein.png\",
\"name\": \"Studierendenstatus\",
\"width\": {
\"max\": 2,
\"min\": 1
},
\"height\": {
\"max\": 2,
\"min\": 1
},
\"hideFooter\": true
}'::jsonb
);";
if(!$db->db_query($qry))
echo '<strong>dashboard.tbl_widget: '.$db->db_last_error().'</strong><br>';
else
echo '<br>dashboard.tbl_widget: Widget studstatus hinzugefuegt!<br>';
}
}
// neuer eintrag in dashboard.tbl_dashboard_widget
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_dashboard_widget WHERE dashboard_id= 1 AND widget_id = 9;"))
{
if($db->db_num_rows($result) == 0)
{
$qry = "
INSERT INTO
dashboard.tbl_dashboard_widget (dashboard_id, widget_id)
VALUES
(1, 9);
";
}
if(!$db->db_query($qry))
echo '<strong>dashboard.tbl_dashboard_widget: '.$db->db_last_error().'</strong><br>';
else
echo '<br>dashboard.tbl_dashboard_widget: Widget studstatus hinzugefuegt!<br>';
}
+102
View File
@@ -58177,6 +58177,108 @@ I have been informed that I am under no obligation to consent to the transmissio
)
),
// ### Phrases Dashboard Admin END
// ### Phrases Dashboard Studstatus Widget START
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'antraegeToEdit',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'zu bearbeitende Studierendenanträge',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student applications to be processed',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'antraegeOpen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'offene Studierendenanträge',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'open student applications',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'antraegeNoOpen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Keine offenen Studierendenanträge',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No open student applications',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'linkVerwaltungStudstatus',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Zur Verwaltung des Studierendenstatus',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Link to the administration of the student status',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'noPermissionStudstatus',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Keine Berechtigung für Bearbeitung von Studierendenanträgen.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No permission to process student applications.',
'description' => '',
'insertvon' => 'system'
)
)
),
// ### Phrases Dashboard Studstatus Widget END
);