mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -10,6 +10,8 @@ documents/
|
||||
.project
|
||||
.buildpath
|
||||
application/config/development/
|
||||
application/config/testing/
|
||||
application/config/production
|
||||
application/extensions/
|
||||
application/controllers/extensions/
|
||||
application/config/extensions/
|
||||
@@ -30,3 +32,4 @@ tests/codeception/tests/acceptance.suite.yml
|
||||
tests/codeception/tests/unit.suite.yml
|
||||
/sparks/*
|
||||
/webdav/google.php
|
||||
system/sql/
|
||||
|
||||
@@ -56,7 +56,7 @@ $config['roles'] = array
|
||||
'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung',
|
||||
'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster',
|
||||
'lehre/studienplan','system/filters','fs/dms','basis/message','basis/benutzerrolle', 'basis/sprache',
|
||||
'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang'
|
||||
'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang', 'basis/bewerbungstermine'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -229,9 +229,10 @@ class InfoCenter extends VileSci_Controller
|
||||
$studienordnung = $this->PrestudentstatusModel->getStudienordnungWithZgvText($prestudent_id);
|
||||
|
||||
$prestudentdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
|
||||
$studiengangkurzbz = $prestudentdata['studiengang_kurzbz'];
|
||||
$studiengangbezeichnung = $prestudentdata['studiengang_bezeichnung'];
|
||||
|
||||
$data = array('studiengang_bezeichnung' => $studiengangbezeichnung, 'data' => null);
|
||||
$data = array('studiengang_bezeichnung' => $studiengangbezeichnung, 'studiengang_kurzbz' => $studiengangkurzbz, 'data' => null);
|
||||
|
||||
if (hasData($studienordnung))
|
||||
{
|
||||
|
||||
@@ -4,6 +4,10 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class FHC_Controller extends CI_Controller
|
||||
{
|
||||
const FHC_CONTROLLER_ID = 'fhc_controller_id'; // name of the parameter used to identify uniquely a call to a controller
|
||||
|
||||
private $_controllerId; // contains the unique identifier of a call to a controller
|
||||
|
||||
/**
|
||||
* Standard construct for all the controllers, loads the authentication system
|
||||
*/
|
||||
@@ -11,6 +15,8 @@ class FHC_Controller extends CI_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->_controllerId = null; // set _controllerId as null by default
|
||||
|
||||
$this->load->helper('fhcauth');
|
||||
}
|
||||
|
||||
@@ -23,4 +29,34 @@ class FHC_Controller extends CI_Controller
|
||||
{
|
||||
$this->load->library('PhrasesLib', array($categories, $language), 'p');
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unique id for the called controller
|
||||
* NOTE: it is only working with HTTP GET request, not neeaded with POST
|
||||
* because the first call to the controller is via HTTP GET,
|
||||
* therefore a fhc_controller_id is already generated
|
||||
*/
|
||||
protected function setControllerId()
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET')
|
||||
{
|
||||
$this->_controllerId = $this->input->get(self::FHC_CONTROLLER_ID);
|
||||
|
||||
if (!isset($this->_controllerId) || empty($this->_controllerId))
|
||||
{
|
||||
$this->_controllerId = uniqid(); // generate a unique id
|
||||
// Redirect to the same URL, but giving FHC_CONTROLLER_ID as HTTP GET parameter
|
||||
header(sprintf('Location: %s?%s=%s', $_SERVER['REQUEST_URI'], self::FHC_CONTROLLER_ID, $this->_controllerId));
|
||||
exit; // terminate immediately the execution of this controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of the property _controllerId
|
||||
*/
|
||||
protected function getControllerId()
|
||||
{
|
||||
return $this->_controllerId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,19 @@ class DocumentLib
|
||||
case 'application/vnd.ms-word':
|
||||
case 'application/vnd.oasis.opendocument.text':
|
||||
case 'text/plain':
|
||||
$this->convert($filename, $outFile, 'pdf');
|
||||
return success($outFile);
|
||||
// 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))
|
||||
{
|
||||
return success($outFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($ret->retval);
|
||||
}
|
||||
case 'application/pdf':
|
||||
return success($filename);
|
||||
default:
|
||||
|
||||
@@ -21,7 +21,9 @@ class Geschaeftsjahr_model extends DB_Model
|
||||
$query = 'SELECT *
|
||||
FROM public.tbl_geschaeftsjahr
|
||||
WHERE start <= now()
|
||||
AND ende >= now()';
|
||||
AND ende >= now()
|
||||
ORDER BY start DESC
|
||||
LIMIT 1';
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
SELECT zeitpunkt
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\', \'Interessent rejected\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
@@ -23,7 +23,7 @@
|
||||
SELECT insertvon
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\', \'Interessent rejected\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<tbody>
|
||||
<?php foreach ($notizen as $notiz): ?>
|
||||
<tr data-toggle="tooltip"
|
||||
title="<?php echo isset($notiz->text) ? strip_tags($notiz->text) : '' ?>">
|
||||
title="<?php echo isset($notiz->text) ? strip_tags($notiz->text) : '' ?>" style="cursor: pointer">
|
||||
<td><?php echo date_format(date_create($notiz->insertamum), 'd.m.Y H:i:s') ?></td>
|
||||
<td style="cursor: pointer"><?php echo html_escape($notiz->titel) ?></td>
|
||||
<td><?php echo html_escape($notiz->titel) ?></td>
|
||||
<td><?php echo $notiz->verfasser_uid ?></td>
|
||||
<td style="display: none"><?php echo $notiz->notiz_id ?></td>
|
||||
</tr>
|
||||
|
||||
@@ -17,7 +17,7 @@ $this->load->view(
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">Zugangsvoraussetzungen <?php echo $studiengang_bezeichnung; ?></h3>
|
||||
<h3 class="page-header">Zugangsvoraussetzungen <?php echo $studiengang_kurzbz; ?> - <?php echo $studiengang_bezeichnung; ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="data">
|
||||
|
||||
@@ -2,14 +2,20 @@
|
||||
<?php
|
||||
foreach ($zgvpruefungen as $zgvpruefung):
|
||||
$infoonly = $zgvpruefung->infoonly;
|
||||
//set bootstrap columns
|
||||
//set bootstrap columns for zgv form
|
||||
$columns = array(4, 3, 2, 3);
|
||||
$headercolumns = array(7, 5);
|
||||
if (!$infoonly && isset($zgvpruefung->prestudentstatus->bewerbungsnachfrist) && isset($zgvpruefung->prestudentstatus->bewerbungstermin))
|
||||
{
|
||||
$headercolumns[0] = 5;
|
||||
$headercolumns[1] = 7;
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
<div class="col-xs-<?php echo $headercolumns[0]; ?>">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse"
|
||||
href="#collapse<?php echo $zgvpruefung->prestudent_id ?>"><?php echo $zgvpruefung->studiengang.' - '.$zgvpruefung->studiengangbezeichnung.' | '.(isset($zgvpruefung->prestudentstatus->status_kurzbz) ? $zgvpruefung->prestudentstatus->status_kurzbz : '');
|
||||
@@ -19,13 +25,13 @@
|
||||
<?php if (isset($zgvpruefung->prestudentstatus->status_kurzbz) && $zgvpruefung->prestudentstatus->status_kurzbz === 'Interessent'/* && !$infoonly*/): ?>
|
||||
<?php if ($infoonly): ?>
|
||||
<?php if (isset($zgvpruefung->prestudentstatus->bestaetigtam)): ?>
|
||||
<div class="col-xs-5 text-right">
|
||||
<div class="col-xs-<?php echo $headercolumns[1]; ?> text-right">
|
||||
<i class="fa fa-check" style="color: green"></i>
|
||||
<?= $this->p->t('global', 'anStudiengangFreigegeben') ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="col-xs-5 text-right">
|
||||
<div class="col-xs-<?php echo $headercolumns[1]; ?> text-right">
|
||||
<?php echo ucfirst($this->p->t('infocenter','bewerbung')) . ' ' . $this->p->t('global','abgeschickt') . ': '.(isset($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum) ? '<i class="fa fa-check" style="color:green"></i>' : '<i class="fa fa-times" style="color:red"></i>'); ?>
|
||||
<?php echo (isset($zgvpruefung->prestudentstatus->bewerbungsnachfrist) ? ' | ' . $this->p->t('infocenter', 'nachfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungsnachfrist), 'd.m.Y') : ''); ?>
|
||||
<?php echo (isset($zgvpruefung->prestudentstatus->bewerbungstermin) ? ' | ' . $this->p->t('infocenter', 'bewerbungsfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungstermin), 'd.m.Y') : ''); ?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// Retrives the URL path of the called controller + controller method
|
||||
// Retrives the URL path of the called controller + called controller method
|
||||
// NOTE: placed here because it doesn't work inside functions
|
||||
$calledPath = $this->router->directory.$this->router->class;
|
||||
$calledMethod = $this->router->method;
|
||||
@@ -15,6 +15,7 @@ $customJSs = isset($customJSs) ? $customJSs : null;
|
||||
// By default set the parameters to false
|
||||
$jquery = isset($jquery) ? $jquery : false;
|
||||
$jqueryui = isset($jqueryui) ? $jqueryui : false;
|
||||
$ajaxlib = isset($ajaxlib) ? $ajaxlib : false;
|
||||
$bootstrap = isset($bootstrap) ? $bootstrap : false;
|
||||
$fontawesome = isset($fontawesome) ? $fontawesome : false;
|
||||
$tablesorter = isset($tablesorter) ? $tablesorter : false;
|
||||
@@ -141,12 +142,15 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
// jQuery UI CSS
|
||||
if ($jqueryui === true) _generateCSSsInclude('vendor/components/jqueryui/themes/base/jquery-ui.min.css');
|
||||
|
||||
// bootstrap CSS
|
||||
// Bootstrap CSS
|
||||
if ($bootstrap === true) _generateCSSsInclude('vendor/twbs/bootstrap/dist/css/bootstrap.min.css');
|
||||
|
||||
// font awesome CSS
|
||||
// Font Awesome CSS
|
||||
if ($fontawesome === true) _generateCSSsInclude('vendor/components/font-awesome/css/font-awesome.min.css');
|
||||
|
||||
// AjaxLib CSS
|
||||
if ($ajaxlib === true) _generateCSSsInclude('public/css/AjaxLib.css');
|
||||
|
||||
// Table sorter CSS
|
||||
if ($tablesorter === true)
|
||||
{
|
||||
@@ -154,7 +158,7 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
_generateCSSsInclude('vendor/mottie/tablesorter/dist/css/jquery.tablesorter.pager.min.css');
|
||||
}
|
||||
|
||||
// sb admin template CSS
|
||||
// SB Admin 2 template CSS
|
||||
if ($sbadmintemplate === true)
|
||||
{
|
||||
_generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.css');
|
||||
@@ -164,10 +168,11 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
// Eventually required CSS
|
||||
_generateCSSsInclude($customCSSs); // Eventually required CSS
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// Javascripts
|
||||
|
||||
// Generates the global object to pass useful parms to the other javascripts
|
||||
// Generates the global object to pass useful parameters to other javascripts
|
||||
// NOTE: must be called before any other JS include
|
||||
_generateJSDataStorageObject($calledPath, $calledMethod);
|
||||
|
||||
@@ -178,11 +183,13 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
if ($jqueryui === true)
|
||||
{
|
||||
_generateJSsInclude('vendor/components/jqueryui/jquery-ui.min.js');
|
||||
//datepicker german language file
|
||||
_generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js');
|
||||
_generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js'); // datepicker german language file
|
||||
}
|
||||
|
||||
// bootstrap JS
|
||||
// AjaxLib JS
|
||||
if ($ajaxlib === true) _generateJSsInclude('public/js/AjaxLib.js');
|
||||
|
||||
// Bootstrap JS
|
||||
if ($bootstrap === true) _generateJSsInclude('vendor/twbs/bootstrap/dist/js/bootstrap.min.js');
|
||||
|
||||
// Table sorter JS
|
||||
@@ -193,10 +200,10 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
_generateJSsInclude('vendor/mottie/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js');
|
||||
}
|
||||
|
||||
//tinymce JS
|
||||
// Tinymce JS
|
||||
if($tinymce === true) _generateJSsInclude('vendor/tinymce/tinymce/tinymce.min.js') ;
|
||||
|
||||
// sb admin template JS
|
||||
// SB Admin 2 template JS
|
||||
if ($sbadmintemplate === true)
|
||||
{
|
||||
_generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.js');
|
||||
|
||||
@@ -288,10 +288,6 @@ else
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#matrikelnummer" onclick="StudentTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-treecol-prestudent_id" label="PreStudentID" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#prestudent_id" onclick="StudentTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-treecol-person_id" label="PersonID" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#person_id" onclick="StudentTreeSort()"/>
|
||||
@@ -379,7 +375,11 @@ else
|
||||
<treecol id="student-treecol-studienplan" label="Studienplan" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#studienplan_bezeichnung" onclick="StudentTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-treecol-prestudent_id" label="PreStudentID" flex="1" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#prestudent_id" onclick="StudentTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-treecol-mentor" label="Mentor" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/student/rdf#mentor" onclick="StudentTreeSort()"/>
|
||||
@@ -414,7 +414,6 @@ else
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#studiengang" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#studiengang_kz" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#matrikelnummer" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#prestudent_id" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#person_id" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#status" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#status_datum" />
|
||||
@@ -439,6 +438,7 @@ else
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#dual_bezeichnung" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#matr_nr" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#studienplan_bezeichnung" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#prestudent_id" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#mentor" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#aktiv" />
|
||||
<treecell properties="Aktiv_rdf:http://www.technikum-wien.at/student/rdf#aktiv" label="rdf:http://www.technikum-wien.at/student/rdf#geburtsdatum_iso" />
|
||||
|
||||
@@ -832,16 +832,21 @@ class dokument extends basis_db
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
if ($this->db_num_rows($result) > 0)
|
||||
{
|
||||
$stg_obj = new basis_db();
|
||||
$stg_obj->kuerzel = $row->kuerzel;
|
||||
$stg_obj->bezeichnung = $row->bezeichnung;
|
||||
$stg_obj->studiengang_kz = $row->studiengang_kz;
|
||||
|
||||
$this->result[] = $stg_obj;
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$stg_obj = new basis_db();
|
||||
$stg_obj->kuerzel = $row->kuerzel;
|
||||
$stg_obj->bezeichnung = $row->bezeichnung;
|
||||
$stg_obj->studiengang_kz = $row->studiengang_kz;
|
||||
|
||||
$this->result[] = $stg_obj;
|
||||
}
|
||||
return $stg_obj;
|
||||
}
|
||||
return $stg_obj;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -45,13 +45,13 @@ class personlog extends basis_db
|
||||
|
||||
/**
|
||||
* Erstellt einen Log Eintrag zu einer Person
|
||||
* @param $person_id ID der Person.
|
||||
* @param $logtype_kurzbz Typ des Logeintrages
|
||||
* @param $logdata Array mit den zusaetzlichen Logdaten zu diesem Typ.
|
||||
* @param $taetigkeit_kurzbz Kurzbz der Verarbeitungstaetigkeit.
|
||||
* @param $app Applikation von der dieser Logeintrag stammt.
|
||||
* @param $oe_kurzbz Kurzbz der Organisationseinheit. (optional)
|
||||
* @param $user User der die Aktion durchgefuehrt hat. (optional)
|
||||
* @param integer $person_id ID der Person.
|
||||
* @param string $logtype_kurzbz Typ des Logeintrages
|
||||
* @param array $logdata Array mit den zusaetzlichen Logdaten zu diesem Typ.
|
||||
* @param string $taetigkeit_kurzbz Kurzbz der Verarbeitungstaetigkeit.
|
||||
* @param string $app Applikation von der dieser Logeintrag stammt.
|
||||
* @param string $oe_kurzbz Kurzbz der Organisationseinheit. (optional)
|
||||
* @param string $user User der die Aktion durchgefuehrt hat. (optional)
|
||||
* @return boolean true wenn erfolgreich, false im Fehlerfall.
|
||||
*/
|
||||
public function log($person_id, $logtype_kurzbz, $logdata, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null)
|
||||
@@ -77,5 +77,30 @@ class personlog extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht alle Logeinträge vom Typ "Precessstate" mit Namen "Parked" der übergebenen Person_id, die in der Zukunft liegen.
|
||||
* @param integer $person_id ID der Person, deren geparkter Logeintrag gelöscht werden soll.
|
||||
* @return boolean true wenn erfolgreich, false im Fehlerfall.
|
||||
*/
|
||||
public function deleteParked($person_id)
|
||||
{
|
||||
$qry = "DELETE
|
||||
FROM system.tbl_log
|
||||
WHERE logtype_kurzbz = 'Processstate'
|
||||
AND person_id = ".$this->db_add_param($person_id)."
|
||||
AND logdata ->> 'name' = 'Parked'
|
||||
AND zeitpunkt >= now();";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Löschen des geparkten Logeintrages';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -634,24 +634,37 @@ or not exists
|
||||
FROM
|
||||
lehre.tbl_lehreinheitmitarbeiter m,
|
||||
lehre.tbl_lehreinheit l
|
||||
JOIN
|
||||
lehre.tbl_lehrveranstaltung lv using (lehrveranstaltung_id)
|
||||
JOIN
|
||||
public.tbl_studiengang s using (studiengang_kz)
|
||||
WHERE
|
||||
$where AND
|
||||
$where_sem AND
|
||||
l.lehreinheit_id = m.lehreinheit_id AND
|
||||
m.stundensatz * m.semesterstunden > 0
|
||||
m.stundensatz * m.semesterstunden > 0 AND
|
||||
s.typ not in ('l') AND
|
||||
lv.studiengang_kz > 0
|
||||
UNION
|
||||
SELECT sum(pb.stunden) AS semstunden
|
||||
FROM
|
||||
lehre.tbl_projektarbeit pa,
|
||||
lehre.tbl_projektbetreuer pb,
|
||||
lehre.tbl_lehreinheit l,
|
||||
public.tbl_benutzer b
|
||||
public.tbl_benutzer b,
|
||||
lehre.tbl_lehreinheit l
|
||||
JOIN
|
||||
lehre.tbl_lehrveranstaltung lv using (lehrveranstaltung_id)
|
||||
JOIN
|
||||
public.tbl_studiengang s using (studiengang_kz)
|
||||
|
||||
WHERE
|
||||
pa.lehreinheit_id = l.lehreinheit_id AND
|
||||
pb.projektarbeit_id = pa.projektarbeit_id AND
|
||||
pb.person_id = b.person_id AND
|
||||
b.uid = ".$this->db_add_param($user)." AND
|
||||
pb.stunden * pb.stundensatz > 0 AND
|
||||
s.typ not in ('l') AND
|
||||
lv.studiengang_kz > 0 AND
|
||||
$where_sem
|
||||
) AS semstunden
|
||||
";
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
.veil {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 98%;
|
||||
width: 99%;
|
||||
background-color: white;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
background-image: url("/public/imgages/loader.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,449 @@
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package
|
||||
* @author
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link https://fhcomplete.org
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Configs
|
||||
|
||||
// To see debug messages into the browser console set this parameter as true
|
||||
const DEBUG = false;
|
||||
|
||||
// Default veil timeout (milliseconds)
|
||||
const VEIL_TIMEOUT = 1000;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Constants
|
||||
|
||||
// Success
|
||||
const SUCCESS = 0;
|
||||
|
||||
// Properties present in a response
|
||||
const CODE = "error";
|
||||
const RESPONSE = "retval";
|
||||
|
||||
// HTTP method parameters
|
||||
const HTTP_GET_METHOD = "GET";
|
||||
const HTTP_POST_METHOD = "POST";
|
||||
|
||||
const REMOTE_CONTROLLER = "remoteController";
|
||||
|
||||
const FHC_CONTROLLER_ID = "fhc_controller_id";
|
||||
|
||||
/**
|
||||
* Definition and initialization of object FHC_Ajax_Client
|
||||
*/
|
||||
var FHC_Ajax_Client = {
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Properties
|
||||
|
||||
_veilCallersCounter: 0, // count the number of callers that want to activate the veil
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Performs a call using the HTTP GET method
|
||||
* controllerParameters is an object
|
||||
* ajaxCallParameters is an object
|
||||
*/
|
||||
ajaxCallGet: function(remoteController, controllerParameters, ajaxCallParameters) {
|
||||
FHC_Ajax_Client._ajaxCall(remoteController, controllerParameters, HTTP_GET_METHOD, ajaxCallParameters);
|
||||
},
|
||||
|
||||
/**
|
||||
* Performs a call using the HTTP POST method
|
||||
* controllerParameters is an object
|
||||
* ajaxCallParameters is an object
|
||||
*/
|
||||
ajaxCallPost: function(remoteController, controllerParameters, ajaxCallParameters) {
|
||||
FHC_Ajax_Client._ajaxCall(remoteController, controllerParameters, HTTP_POST_METHOD, ajaxCallParameters);
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if the response is a success
|
||||
*/
|
||||
isSuccess: function(response) {
|
||||
var isSuccess = false;
|
||||
|
||||
if (jQuery.type(response) == "object" && response.hasOwnProperty(CODE) && response.hasOwnProperty(RESPONSE))
|
||||
{
|
||||
if (response.error == SUCCESS)
|
||||
{
|
||||
isSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
return isSuccess;
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if the response is an error
|
||||
*/
|
||||
isError: function(response) {
|
||||
return !FHC_Ajax_Client.isSuccess(response);
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if the response has data
|
||||
*/
|
||||
hasData: function(response) {
|
||||
var hasData = false;
|
||||
|
||||
if (FHC_Ajax_Client.isSuccess(response))
|
||||
{
|
||||
if ((jQuery.type(response.retval) == "object" && !jQuery.isEmptyObject(response.retval))
|
||||
|| (jQuery.isArray(response.retval) && response.retval.length > 0)
|
||||
|| (jQuery.type(response.retval) == "string" && response.retval.trim() != "")
|
||||
|| jQuery.type(response.retval) == "number")
|
||||
{
|
||||
hasData = true;
|
||||
}
|
||||
}
|
||||
|
||||
return hasData;
|
||||
},
|
||||
|
||||
/**
|
||||
* Retrives data from response object
|
||||
*/
|
||||
getData: function(response) {
|
||||
var data = null;
|
||||
|
||||
if (FHC_Ajax_Client.hasData(response))
|
||||
{
|
||||
data = response.retval;
|
||||
}
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Retrives code from response object
|
||||
*/
|
||||
getCode: function(response) {
|
||||
var code = 1; // Generic error
|
||||
|
||||
if (jQuery.type(response) == "object" && response.hasOwnProperty(CODE))
|
||||
{
|
||||
if (response.error == SUCCESS)
|
||||
{
|
||||
isSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
},
|
||||
|
||||
/**
|
||||
* Show a veil
|
||||
*/
|
||||
showVeil: function(veilTimeout) {
|
||||
if (typeof veilTimeout == "number")
|
||||
{
|
||||
FHC_Ajax_Client._veilTimeout = veilTimeout;
|
||||
}
|
||||
else
|
||||
{
|
||||
FHC_Ajax_Client._veilTimeout = VEIL_TIMEOUT;
|
||||
}
|
||||
FHC_Ajax_Client._showVeil();
|
||||
},
|
||||
|
||||
/**
|
||||
* Hide a veil that was shown before
|
||||
*/
|
||||
hideVeil: function() {
|
||||
FHC_Ajax_Client._hideVeil();
|
||||
},
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Generate the router URI using the connection parameters
|
||||
*/
|
||||
_generateRouterURI: function(remoteController) {
|
||||
var uri = null;
|
||||
|
||||
// Checks if global JS object FHC_JS_DATA_STORAGE_OBJECT exists
|
||||
if (typeof FHC_JS_DATA_STORAGE_OBJECT !== "undefined")
|
||||
{
|
||||
uri = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/" + remoteController;
|
||||
}
|
||||
|
||||
return uri;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method to print debug info after a controller has been called
|
||||
*/
|
||||
_printDebug: function(parameters, response, errorThrown) {
|
||||
|
||||
if (DEBUG === true) // If global const DEBUG is true, but really true!
|
||||
{
|
||||
// Print info about called controller
|
||||
console.log("Called controller: " + parameters.remoteController);
|
||||
console.log("Call parameters:"); // parameters given to this call
|
||||
console.log(parameters);
|
||||
|
||||
if (response != null) // if there is a response...
|
||||
{
|
||||
console.log("Controller Response:");
|
||||
console.log(response); // ...print it
|
||||
}
|
||||
if (errorThrown != null) // if there is a jQuery error...
|
||||
{
|
||||
console.log("jQuery error:");
|
||||
console.log(errorThrown); // ...print it
|
||||
}
|
||||
console.log("--------------------------------------------------------------------------------------------");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method to call if the ajax call has succeeded
|
||||
*/
|
||||
_onSuccess: function(response, textStatus, jqXHR) {
|
||||
|
||||
FHC_Ajax_Client._printDebug(this._data, response); // debug time!
|
||||
|
||||
// Call the success callback saved in _successCallback property
|
||||
// NOTE: this is not referred to FHC_Ajax_Client but to the ajax object
|
||||
this._successCallback(response);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method to call if the ajax call has raised an error
|
||||
*/
|
||||
_onError: function(jqXHR, textStatus, errorThrown) {
|
||||
|
||||
FHC_Ajax_Client._printDebug(this._data, null, errorThrown); // debug time!
|
||||
|
||||
// Call the error callback saved in _errorCallback property
|
||||
// NOTE: this is not referred to FHC_Ajax_Client but to the ajax object
|
||||
this._errorCallback(jqXHR, textStatus, errorThrown);
|
||||
},
|
||||
|
||||
/**
|
||||
* Instantiate a new object and copy in it the properties from the parameter
|
||||
*/
|
||||
_cpObjProps: function(obj) {
|
||||
var returnObj = {};
|
||||
|
||||
for (var prop in obj)
|
||||
{
|
||||
returnObj[prop] = obj[prop];
|
||||
}
|
||||
|
||||
return returnObj;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method to show the veil
|
||||
*/
|
||||
_showVeil: function() {
|
||||
if (FHC_Ajax_Client._veilCallersCounter == 0)
|
||||
{
|
||||
$("<div class=\"veil\"></div>").appendTo('body');
|
||||
}
|
||||
|
||||
FHC_Ajax_Client._veilCallersCounter++;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method to hide the veil
|
||||
*/
|
||||
_hideVeil: function() {
|
||||
window.setTimeout(function() {
|
||||
if (FHC_Ajax_Client._veilCallersCounter >= 0)
|
||||
{
|
||||
if (FHC_Ajax_Client._veilCallersCounter > 0)
|
||||
{
|
||||
FHC_Ajax_Client._veilCallersCounter--;
|
||||
}
|
||||
|
||||
if (FHC_Ajax_Client._veilCallersCounter == 0)
|
||||
{
|
||||
$(".veil").remove();
|
||||
}
|
||||
}
|
||||
},
|
||||
this._veilTimeout);
|
||||
},
|
||||
|
||||
/**
|
||||
* Retrives parameters from URL query string (HTTP GET parameters)
|
||||
*/
|
||||
_getUrlParameter: function(sParam) {
|
||||
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
i;
|
||||
|
||||
for (i = 0; i < sURLVariables.length; i++)
|
||||
{
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
|
||||
if (sParameterName[0] === sParam)
|
||||
{
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks call parameters, if they are present and are valid
|
||||
* It generates and returns all the parameters needed to perform an ajax remote call
|
||||
* NOTE: console.error is used here because those are not messages for the final user,
|
||||
* but for the web interface developer
|
||||
*/
|
||||
_checkAndGenerateAjaxParams: function(remoteController, controllerParameters, type, ajaxCallParameters) {
|
||||
|
||||
var valid = true; // by default they are ok (we want to trust you, please do not betray it)
|
||||
|
||||
// Returned parameters
|
||||
var ajaxParameters = {
|
||||
cache: false, // data are never cached by the browser
|
||||
dataType: "json", // always json!
|
||||
type: type // set HTTP method, GET or POST
|
||||
};
|
||||
|
||||
// remoteController must be a NON-empty string
|
||||
if (typeof remoteController == "string" && remoteController.trim() != "")
|
||||
{
|
||||
// Is it possible to generate the URL
|
||||
if ((url = FHC_Ajax_Client._generateRouterURI(remoteController)) != null)
|
||||
{
|
||||
ajaxParameters.url = url;
|
||||
}
|
||||
else // but it could fail
|
||||
{
|
||||
console.error("FHC_JS_DATA_STORAGE_OBJECT is not present");
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
else // otherwise is NOT possible to generate the URL
|
||||
{
|
||||
console.error("Invalid remoteController parameter");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
// controllerParameters must be an object
|
||||
if (typeof controllerParameters == "object")
|
||||
{
|
||||
// Copy the properties of controllerParameters into a new object
|
||||
var data = FHC_Ajax_Client._cpObjProps(controllerParameters);
|
||||
// Remote controller
|
||||
data[REMOTE_CONTROLLER] = remoteController;
|
||||
// fhc_controller_id is given if present
|
||||
data[FHC_CONTROLLER_ID] = FHC_Ajax_Client._getUrlParameter(FHC_CONTROLLER_ID);
|
||||
|
||||
// Stores them into ajaxParameters
|
||||
// NOTE: property data is not possible to get later,
|
||||
// so the variable data is saved also in _data and it will be used later
|
||||
ajaxParameters.data = data;
|
||||
ajaxParameters._data = data;
|
||||
}
|
||||
else
|
||||
{
|
||||
console.error("Invalid controller parameters, must be an object");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
||||
// Checks if ajaxCallParameters is an object
|
||||
if (typeof ajaxCallParameters == "object")
|
||||
{
|
||||
// If present, errorCallback must be a function
|
||||
if (ajaxCallParameters.hasOwnProperty("errorCallback"))
|
||||
{
|
||||
if (typeof ajaxCallParameters.errorCallback == "function")
|
||||
{
|
||||
ajaxParameters._errorCallback = ajaxCallParameters.errorCallback; // save as property the callback error
|
||||
ajaxParameters.error = FHC_Ajax_Client._onError; // function to call if an error occurred
|
||||
}
|
||||
else
|
||||
{
|
||||
console.error("Invalid errorCallback, it must be a function");
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
// If present, successCallback must be a function
|
||||
if (ajaxCallParameters.hasOwnProperty("successCallback"))
|
||||
{
|
||||
if (typeof ajaxCallParameters.successCallback == "function")
|
||||
{
|
||||
ajaxParameters._successCallback = ajaxCallParameters.successCallback; // save as property the callback success
|
||||
ajaxParameters.success = FHC_Ajax_Client._onSuccess; // function to call if succeeded
|
||||
}
|
||||
else
|
||||
{
|
||||
console.error("Invalid successCallback, it must be a function");
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
// If present, veilTimeout must be a number and cannot be less then 0 or greater then 60000
|
||||
if (ajaxCallParameters.hasOwnProperty("veilTimeout") && typeof ajaxCallParameters.veilTimeout == "number")
|
||||
{
|
||||
if (ajaxCallParameters.veilTimeout > 0 && ajaxCallParameters.veilTimeout < 60000)
|
||||
{
|
||||
ajaxParameters._veilTimeout = ajaxCallParameters.veilTimeout;
|
||||
ajaxParameters.beforeSend = FHC_Ajax_Client._showVeil;
|
||||
ajaxParameters.complete = FHC_Ajax_Client._hideVeil;
|
||||
}
|
||||
else if(ajaxCallParameters.veilTimeout == 0)
|
||||
{
|
||||
// veil is disabled
|
||||
}
|
||||
else
|
||||
{
|
||||
console.error("Invalid veilTimeout parameter, must be a number >= 0 and <= 60000");
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
else // is not present or the value is invalid
|
||||
{
|
||||
ajaxParameters._veilTimeout = VEIL_TIMEOUT;
|
||||
ajaxParameters.beforeSend = FHC_Ajax_Client._showVeil;
|
||||
ajaxParameters.complete = FHC_Ajax_Client._hideVeil;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid === false)
|
||||
{
|
||||
ajaxParameters = null;
|
||||
}
|
||||
|
||||
return ajaxParameters;
|
||||
},
|
||||
|
||||
/**
|
||||
* Performs a call to the server were the CI PHP layer is running
|
||||
* - remoteController: alias of the core controller to call
|
||||
* - controllerParameters: parameters to give to the called controller
|
||||
* - type: POST or GET HTTP method
|
||||
* - ajaxCallParameters is an object and could contains:
|
||||
* - errorCallback: function to call after an error has been raised
|
||||
* - successCallback: function to call after succeeded
|
||||
* - veilTimeout: veil timeout
|
||||
*/
|
||||
_ajaxCall: function(remoteController, controllerParameters, type, ajaxCallParameters) {
|
||||
// Retrives the parameters for the ajax call
|
||||
var ajaxParameters = FHC_Ajax_Client._checkAndGenerateAjaxParams(remoteController, controllerParameters, type, ajaxCallParameters);
|
||||
|
||||
// Checks the given parameters if they are present and are valid
|
||||
if (ajaxParameters != null)
|
||||
{
|
||||
$.ajax(ajaxParameters); // ajax call
|
||||
}
|
||||
}
|
||||
};
|
||||
Vendored
+4
-6
@@ -1,10 +1,8 @@
|
||||
/*
|
||||
file for adding bootstrap classes, e.g. in case usage of non-bootstrap widgets in a bootstrap page
|
||||
AVOID USING THIS IF POSSIBLE
|
||||
/**
|
||||
* To add bootstrap classes, e.g. in case usage of non-bootstrap widgets in a bootstrap page
|
||||
* NOTE: avoid using this if possible
|
||||
*/
|
||||
$(document).ready(
|
||||
function()
|
||||
{
|
||||
$(document).ready(function() {
|
||||
$("input[type=text], select").addClass("form-control");
|
||||
$("button, input[type=button]").addClass("btn btn-default");
|
||||
$("table").addClass("table-condensed");
|
||||
|
||||
@@ -94,6 +94,7 @@ if (($files = glob($slq_import_path.'/*.sql')) != false)
|
||||
{
|
||||
$mailcontent .= '<h3>Die Abfrage der Datei "'.$filename.'" hat folgenden Fehler geliefert:</h3>';
|
||||
$mailcontent .= '<span class="error">'.$db->db_last_error () . '</span><br>';
|
||||
$mailcontent .= '<pre>'.$sql.'</pre><br>';
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -101,18 +102,22 @@ if (($files = glob($slq_import_path.'/*.sql')) != false)
|
||||
if ($db->db_num_rows($result) > 0)
|
||||
{
|
||||
$mailcontent .= '<h3>Die Abfrage der Datei "'.$filename.'" hat folgendes Ergebnis geliefert:</h3>';
|
||||
|
||||
// Wenn zu viele Datensätze retourniert werden, abbrechen und Meldung ausgeben
|
||||
if ($db->db_num_rows($result) > 1000)
|
||||
$mailcontent .= '<span class="error">ACHTUNG! Es wurden mehr als 1000 Datensätze zurückgegeben</span><br>';
|
||||
|
||||
$mailcontent .= '<table class="table"><thead><tr>';
|
||||
foreach($db->db_fetch_object($result) AS $key => $value)
|
||||
$array = array();
|
||||
$object = $db->db_fetch_object($result);
|
||||
$row_array = get_object_vars($object);
|
||||
foreach($row_array AS $key => $value)
|
||||
{
|
||||
$mailcontent .= '<th>'.$key.'</th>';
|
||||
continue;
|
||||
}
|
||||
$mailcontent .= '</tr></thead><tbody>';
|
||||
$counter = 0; // Wenn mehr als 1000 Datensätze retourniert werden, abbrechen
|
||||
$result = $db->db_query ($sql);
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
if ($counter == 1000)
|
||||
@@ -126,7 +131,7 @@ if (($files = glob($slq_import_path.'/*.sql')) != false)
|
||||
$mailcontent .= '</tr>';
|
||||
$counter++;
|
||||
}
|
||||
$mailcontent .= '</tr></tbody></table>';
|
||||
$mailcontent .= '</tbody></table>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,12 +151,12 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//DE" "http://www
|
||||
<h2>Reihungstest - Administration</h2>';
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 's'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
die($rechte->errormsg.' <a href="reihungstest_administration.php">Seite neu laden</a>');
|
||||
|
||||
if(isset($_POST['personzuteilen']))
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'sui'))
|
||||
die('<span class="error">Sie haben keine Berechtigung für diese Aktion. <a href="reihungstest_administration.php">Seite neu laden</a></span>');
|
||||
die($rechte->errormsg.' <a href="reihungstest_administration.php">Seite neu laden</a>');
|
||||
|
||||
$prestudent = new prestudent();
|
||||
if($prestudent->load($_POST['prestudent_id']))
|
||||
@@ -333,7 +333,7 @@ echo ' <input type="submit" value="Dieses Teilgebiet l&ou
|
||||
if(isset($_POST['deleteteilgebiet']))
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die('<span class="error">Sie haben keine Berechtigung für diese Aktion. <a href="reihungstest_administration.php">Seite neu laden</a></span>');
|
||||
die($rechte->errormsg.' <a href="reihungstest_administration.php">Seite neu laden</a>');
|
||||
|
||||
if(isset($_POST['prestudent']) && isset($_POST['gebiet']) &&
|
||||
is_numeric($_POST['prestudent']) && is_numeric($_POST['gebiet']))
|
||||
@@ -591,7 +591,7 @@ echo '<hr><br><a href="'.$_SERVER['PHP_SELF'].'?action=deletedummyanswers" oncli
|
||||
if(isset($_GET['action']) && $_GET['action']=='deletedummyanswers')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die('<span class="error">Sie haben keine Berechtigung für diese Aktion. <a href="reihungstest_administration.php">Seite neu laden</a></span>');
|
||||
die($rechte->errormsg.' <a href="reihungstest_administration.php">Seite neu laden</a>');
|
||||
|
||||
$qry = "DELETE FROM testtool.tbl_antwort WHERE pruefling_id=(SELECT pruefling_id FROM testtool.tbl_pruefling WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT).");
|
||||
DELETE FROM testtool.tbl_pruefling_frage where pruefling_id=(SELECT pruefling_id FROM testtool.tbl_pruefling WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT).");";
|
||||
@@ -606,7 +606,7 @@ echo '<br><br>';
|
||||
if(isset($_POST['savedummystg']) && isset($_POST['stg']))
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'su'))
|
||||
die('<span class="error">Sie haben keine Berechtigung für diese Aktion. <a href="reihungstest_administration.php">Seite neu laden</a></span>');
|
||||
die($rechte->errormsg.' <a href="reihungstest_administration.php">Seite neu laden</a>');
|
||||
|
||||
$qry = "UPDATE public.tbl_prestudent SET studiengang_kz=".$db->db_add_param($_POST['stg'])." WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT).";
|
||||
UPDATE testtool.tbl_pruefling SET studiengang_kz=".$db->db_add_param($_POST['stg'])." WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT).";";
|
||||
@@ -859,7 +859,7 @@ echo 'Freigeschaltene Reihungstests:';
|
||||
if(isset($_GET['action']) && $_GET['action']=='sperren')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'su'))
|
||||
die('<span class="error">Sie haben keine Berechtigung für diese Aktion. <a href="reihungstest_administration.php">Seite neu laden</a></span>');
|
||||
die($rechte->errormsg.' <a href="reihungstest_administration.php">Seite neu laden</a>');
|
||||
|
||||
$rt = new reihungstest();
|
||||
if($rt->load($_GET['reihungstest_id']))
|
||||
|
||||
@@ -2169,8 +2169,10 @@ if($reihungstest_id!='')
|
||||
|
||||
if ($item->prestudent_id == $row->prestudent_id && $rt_letztes_login < $rt_antrittstermin)
|
||||
{
|
||||
$rt_in_anderen_stg .= '(Letzter '.$studiengang->kuerzel_arr[$pruefling->studiengang_kz].'-Antritt: '.$datum_obj->formatDatum($rt_letztes_login, 'd.m.Y').',<br>';
|
||||
$rt_in_anderen_stg .= '<a href="reihungstest_administration.php">absolvierte RT-Gebiete entsperren</a>)<br>';
|
||||
$rt_in_anderen_stg .= '(Letzter '.$studiengang->kuerzel_arr[$pruefling->studiengang_kz].'-Antritt: '.$datum_obj->formatDatum($rt_letztes_login, 'd.m.Y');
|
||||
if($rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
$rt_in_anderen_stg .= ',<br><a href="reihungstest_administration.php">absolvierte RT-Gebiete entsperren</a>';
|
||||
$rt_in_anderen_stg .= ')<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ $rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('assistenz'))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
die($rechte->errormsg);
|
||||
|
||||
if(isset($_GET['studiengang_kz']))
|
||||
$stg_kz = $_GET['studiengang_kz'];
|
||||
@@ -62,7 +62,7 @@ if(isset($_GET['action']) && $_GET['action']=='save')
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->load($studiengang_kz);
|
||||
if(!$rechte->isBerechtigt('assistenz', $studiengang->oe_kurzbz, 'suid'))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
die($rechte->errormsg);
|
||||
|
||||
$bezeichnung = $_POST['bezeichnung'];
|
||||
$english = $_POST['english'];
|
||||
@@ -127,15 +127,18 @@ echo '<form method="GET">
|
||||
Studiengang: <SELECT name="studiengang_kz">';
|
||||
foreach($stg->result as $row)
|
||||
{
|
||||
if($stg_kz=='')
|
||||
$stg_kz=$row->studiengang_kz;
|
||||
|
||||
if($stg_kz==$row->studiengang_kz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
|
||||
echo '<OPTION value="'.$row->studiengang_kz.'" '.$selected.'>'.$row->kuerzel.' - '.$row->kurzbzlang.'</OPTION>';
|
||||
if (in_array($row->studiengang_kz, $stg_arr))
|
||||
{
|
||||
if($stg_kz=='')
|
||||
$stg_kz=$row->studiengang_kz;
|
||||
|
||||
if($stg_kz==$row->studiengang_kz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
|
||||
echo '<OPTION value="'.$row->studiengang_kz.'" '.$selected.'>'.$row->kuerzel.' - '.$row->bezeichnung.'</OPTION>';
|
||||
}
|
||||
}
|
||||
echo '</SELECT><input type="submit" value="Anzeigen" /></form>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user