Merge remote-tracking branch 'origin/master'

This commit is contained in:
Cris
2018-05-16 15:44:24 +02:00
25 changed files with 656 additions and 76 deletions
+1 -1
View File
@@ -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))
{
+36
View File
@@ -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;
}
}
+13 -2
View File
@@ -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') : ''); ?>
+17 -10
View File
@@ -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');