mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
Merge branch 'master' into feature-10450/DVUH_requestMatrikelnummer
# Conflicts: # application/models/crm/Prestudent_model.php # system/dbupdate_3.3.php
This commit is contained in:
@@ -9,6 +9,13 @@
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["checkbox", "textfield", "textarea", "date", "dropdown", "multipledropdown"]
|
||||
},
|
||||
"requiredPermissions": {
|
||||
"type": "array"
|
||||
},
|
||||
"description": {
|
||||
"type": "array",
|
||||
},
|
||||
@@ -18,10 +25,6 @@
|
||||
"title": {
|
||||
"type": "array",
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["checkbox", "textfield", "textarea", "date", "dropdown", "multipledropdown"]
|
||||
},
|
||||
"sort": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -67,5 +70,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["type", "name"]
|
||||
}
|
||||
"required": ["type", "name", "requiredPermissions"]
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Get Anrechung data
|
||||
$anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
|
||||
|
||||
|
||||
// Get Antrag data
|
||||
$antragData = $this->anrechnunglib->getAntragData(
|
||||
$anrechnungData->prestudent_id,
|
||||
@@ -98,7 +98,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Get Genehmigung data
|
||||
$genehmigungData = $this->anrechnunglib->getGenehmigungData($anrechnung_id);
|
||||
|
||||
|
||||
$viewData = array(
|
||||
'antragData' => $antragData,
|
||||
'anrechnungData' => $anrechnungData,
|
||||
@@ -121,13 +121,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
// Get STGLs person data
|
||||
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
|
||||
{
|
||||
show_error('Failed retrieving person data');
|
||||
}
|
||||
|
||||
|
||||
// Approve Anrechnung
|
||||
foreach ($data as $item)
|
||||
{
|
||||
@@ -166,13 +166,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
// Get STGLs person data
|
||||
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
|
||||
{
|
||||
show_error('Failed retrieving person data');
|
||||
}
|
||||
|
||||
|
||||
// Reject Anrechnung
|
||||
foreach ($data as $item)
|
||||
{
|
||||
@@ -210,10 +210,10 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||
}
|
||||
|
||||
|
||||
$retval = array();
|
||||
$counter = 0;
|
||||
|
||||
|
||||
foreach ($data as $item)
|
||||
{
|
||||
// Check if Anrechnungs-LV has lector
|
||||
@@ -221,18 +221,18 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
// Count up LV with no lector
|
||||
$counter++;
|
||||
|
||||
|
||||
// Break, if LV has no lector
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Get full name of LV Leitung.
|
||||
// If LV Leitung is not present, get full name of LV lectors.
|
||||
$lector_arr = $this->anrechnunglib->getLectors($item['anrechnung_id']);
|
||||
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
|
||||
? implode(', ', array_column($lector_arr, 'fullname'))
|
||||
: '';
|
||||
|
||||
|
||||
// Request Recommendation
|
||||
if($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))
|
||||
{
|
||||
@@ -246,7 +246,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send mails to lectors
|
||||
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
|
||||
@@ -255,11 +255,11 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
if (!isEmptyArray($retval))
|
||||
{
|
||||
self::_sendSanchoMailToLectors($retval);
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
return $this->outputJsonSuccess($retval);
|
||||
}
|
||||
|
||||
|
||||
// Output json to ajax
|
||||
if (isEmptyArray($retval) && $counter > 0)
|
||||
{
|
||||
@@ -267,22 +267,22 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Withdraw approved / rejected Anrechnung and reset to 'inProgressDP'.
|
||||
*/
|
||||
public function withdraw()
|
||||
{
|
||||
$anrechnung_id = $this->input->post('anrechnung_id');
|
||||
|
||||
|
||||
if (!is_numeric($anrechnung_id))
|
||||
{
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'errorFelderFehlen'));
|
||||
}
|
||||
|
||||
|
||||
// Delete last status approved / rejected.
|
||||
// If last status is 'approved', Genehmigung is resetted.
|
||||
$result = $this->AnrechnungModel->withdrawApprovement($anrechnung_id);
|
||||
@@ -291,13 +291,13 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
{
|
||||
$this->terminateWithJsonError(getError($result));
|
||||
}
|
||||
|
||||
|
||||
// Success output to AJAX
|
||||
$this->outputJsonSuccess(array(
|
||||
'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Withdraw request for reommendation and reset to 'inProgressDP'.
|
||||
* This is only possible if the lector has not provided a recommendation yet.
|
||||
@@ -305,69 +305,69 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
public function withdrawRequestRecommendation()
|
||||
{
|
||||
$anrechnung_id = $this->input->post('anrechnung_id');
|
||||
|
||||
|
||||
if (!is_numeric($anrechnung_id))
|
||||
{
|
||||
show_error('Wrong parameter.');
|
||||
}
|
||||
|
||||
|
||||
// Get boolean empfehlung of given Anrechnung
|
||||
if (!$result = getData($this->AnrechnungModel->load($anrechnung_id))[0])
|
||||
{
|
||||
show_error('Failed loading Anrechnung');
|
||||
}
|
||||
|
||||
|
||||
$empfehlung = $result->empfehlung_anrechnung;
|
||||
|
||||
|
||||
// Get last Anrechnungstatus
|
||||
if (!$result = getData($this->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0])
|
||||
{
|
||||
show_error('Failed loading last Anrechnungstatus');
|
||||
}
|
||||
|
||||
|
||||
$last_status = $result->status_kurzbz;
|
||||
$anrechnungstatus_id = $result->anrechnungstatus_id;
|
||||
|
||||
|
||||
// Return if Anrechnung was not waiting for recommendation or if Anrechnung has already been recommended
|
||||
if ($last_status != self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR && !is_null($empfehlung))
|
||||
if ($last_status != self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR || !is_null($empfehlung))
|
||||
{
|
||||
return $this->outputJsonError('No recommendation to withdraw.');
|
||||
}
|
||||
|
||||
|
||||
// Reset status to 'inProgressDP'
|
||||
$result = $this->AnrechnungModel->deleteAnrechnungstatus($anrechnungstatus_id);
|
||||
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError('Could not withdraw this application.');
|
||||
}
|
||||
|
||||
|
||||
// Success output to AJAX
|
||||
return $this->outputJsonSuccess(array(
|
||||
'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function saveEmpfehlungsNotiz()
|
||||
{
|
||||
$anrechnung_id = $this->input->post('anrechnung_id');
|
||||
$notiz_id = $this->input->post('notiz_id');
|
||||
$empfehlungstext = $this->input->post('empfehlung_text');
|
||||
|
||||
|
||||
// Validate data
|
||||
if (isEmptyString($anrechnung_id))
|
||||
{
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'systemFehler'));
|
||||
}
|
||||
|
||||
|
||||
// Save Empfehlungstext
|
||||
$result = self::_saveEmpfehlungsNotiz($anrechnung_id, $empfehlungstext, $notiz_id);
|
||||
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
|
||||
}
|
||||
|
||||
|
||||
// Output success message
|
||||
$this->outputJsonSuccess($this->p->t('ui', 'gespeichert'));
|
||||
}
|
||||
@@ -386,10 +386,10 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
|
||||
// Check if user is entitled to read dms doc
|
||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
||||
|
||||
|
||||
// Set filename to be used on downlaod
|
||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||
|
||||
|
||||
// Download file
|
||||
$this->dmslib->download($dms_id, $filename);
|
||||
}
|
||||
@@ -475,7 +475,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
|
||||
show_error('You are not entitled to read this document');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
|
||||
* @param $mail_params
|
||||
@@ -503,8 +503,8 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
||||
* **/
|
||||
$lector_arr = $this->_getLectors($anrechnung_arr);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Send mail to lectors
|
||||
foreach ($lector_arr as $lector)
|
||||
@@ -594,11 +594,11 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
return $lector_arr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function _saveEmpfehlungsNotiz($anrechnung_id, $empfehlungstext, $notiz_id)
|
||||
{
|
||||
$this->load->model('person/Notiz_model', 'NotizModel');
|
||||
|
||||
|
||||
if (!isEmptyString($notiz_id))
|
||||
{
|
||||
return $this->NotizModel->update(
|
||||
@@ -610,15 +610,15 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return $this->NotizModel->addNotizForAnrechnung(
|
||||
$anrechnung_id,
|
||||
self::ANRECHNUNG_NOTIZTITEL_EMPFEHLUNGSNOTIZ_BY_STGL,
|
||||
trim($empfehlungstext),
|
||||
$this->_uid
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class FAS_UDF extends Auth_Controller
|
||||
|
||||
if (isset($person_id) && is_numeric($person_id))
|
||||
{
|
||||
if ($this->PersonModel->hasUDF())
|
||||
if ($this->PersonModel->udfsExistAndDefined())
|
||||
{
|
||||
$personUdfs = $this->PersonModel->getUDFs($person_id);
|
||||
$data['person_id'] = $person_id;
|
||||
@@ -41,7 +41,7 @@ class FAS_UDF extends Auth_Controller
|
||||
|
||||
if (isset($prestudent_id) && is_numeric($prestudent_id))
|
||||
{
|
||||
if ($this->PrestudentModel->hasUDF())
|
||||
if ($this->PrestudentModel->udfsExistAndDefined())
|
||||
{
|
||||
$prestudentUdfs = $this->PrestudentModel->getUDFs($prestudent_id);
|
||||
$data['prestudent_id'] = $prestudent_id;
|
||||
|
||||
@@ -26,9 +26,6 @@ class UDF extends FHC_Controller
|
||||
|
||||
// Loads the UDFLib with HTTP GET/POST parameters
|
||||
$this->_loadUDFLib();
|
||||
|
||||
// Checks if the caller is allow to use this UDF widget
|
||||
$this->_isAllowed();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
@@ -39,7 +36,6 @@ class UDF extends FHC_Controller
|
||||
*/
|
||||
public function saveUDFs()
|
||||
{
|
||||
$udfUniqueId = $this->input->post(self::UDF_UNIQUE_ID);
|
||||
$udfs = $this->input->post(UDFLib::UDFS_ARG_NAME);
|
||||
|
||||
if (!isEmptyString($udfs))
|
||||
@@ -47,7 +43,7 @@ class UDF extends FHC_Controller
|
||||
$jsonDecodedUDF = json_decode($udfs);
|
||||
if ($jsonDecodedUDF != null)
|
||||
{
|
||||
$this->outputJson($this->udflib->saveUDFs($udfUniqueId, $jsonDecodedUDF));
|
||||
$this->outputJson($this->udflib->saveUDFs($jsonDecodedUDF));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -63,17 +59,6 @@ class UDF extends FHC_Controller
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Checks if the user is allowed to use this UDFWidget
|
||||
*/
|
||||
private function _isAllowed()
|
||||
{
|
||||
if (!$this->udflib->isAllowed())
|
||||
{
|
||||
$this->terminateWithJsonError('You are not allowed to access to this content');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the UDFLib with the UDF_UNIQUE_ID parameter
|
||||
* If the parameter UDF_UNIQUE_ID is not given then the execution of the controller is terminated and
|
||||
@@ -105,3 +90,4 @@ class UDF extends FHC_Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class DB_Model extends CI_Model
|
||||
if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL);
|
||||
|
||||
// If this table has UDF and the validation of them is ok
|
||||
if (isError($validate = $this->_manageUDFs($data, $this->dbTable))) return $validate;
|
||||
if (isError($validate = $this->_prepareUDFsWrite($data, $this->dbTable))) return $validate;
|
||||
|
||||
// DB-INSERT
|
||||
$insert = $this->db->insert($this->dbTable, $data);
|
||||
@@ -137,7 +137,7 @@ class DB_Model extends CI_Model
|
||||
if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL);
|
||||
|
||||
// If this table has UDF and the validation of them is ok
|
||||
if (isError($validate = $this->_manageUDFs($data, $this->dbTable, $id))) return $validate;
|
||||
if (isError($validate = $this->_prepareUDFsWrite($data, $this->dbTable, $id))) return $validate;
|
||||
|
||||
$tmpId = $id;
|
||||
|
||||
@@ -670,6 +670,7 @@ class DB_Model extends CI_Model
|
||||
/**
|
||||
* Returns all the UDF contained in this table ($dbTable)
|
||||
* If no UDF are present, an empty array will be returned
|
||||
* NOTE: only the UDFs that the logged user is allowed to read are loaded by this method
|
||||
*/
|
||||
public function getUDFs($id, $udfName = null)
|
||||
{
|
||||
@@ -700,9 +701,9 @@ class DB_Model extends CI_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this table has the field udf_values
|
||||
* Checks if this table has the field udf_values and if there is a UDF definition for this table
|
||||
*/
|
||||
public function hasUDF()
|
||||
public function udfsExistAndDefined()
|
||||
{
|
||||
if ($this->fieldExists(UDFLib::COLUMN_NAME))
|
||||
{
|
||||
@@ -844,25 +845,25 @@ class DB_Model extends CI_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method for UDFLib->manageUDFs
|
||||
* Wrapper method for UDFLib->prepareUDFsWrite
|
||||
*/
|
||||
private function _manageUDFs(&$data, $schemaAndTable, $id = null)
|
||||
private function _prepareUDFsWrite(&$data, $schemaAndTable, $id = null)
|
||||
{
|
||||
$manageUDFs = success();
|
||||
$prepareUDFsWrite = success();
|
||||
|
||||
if ($this->hasUDF())
|
||||
if ($this->udfsExistAndDefined())
|
||||
{
|
||||
if ($id != null)
|
||||
{
|
||||
$manageUDFs = $this->udflib->manageUDFs($data, $this->dbTable, $this->getUDFs($id));
|
||||
$prepareUDFsWrite = $this->udflib->prepareUDFsWrite($data, $this->dbTable, $this->_getUDFsNoPerms($id));
|
||||
}
|
||||
else
|
||||
{
|
||||
$manageUDFs = $this->udflib->manageUDFs($data, $this->dbTable);
|
||||
$prepareUDFsWrite = $this->udflib->prepareUDFsWrite($data, $this->dbTable);
|
||||
}
|
||||
}
|
||||
|
||||
return $manageUDFs;
|
||||
return $prepareUDFsWrite;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -874,9 +875,10 @@ class DB_Model extends CI_Model
|
||||
*/
|
||||
private function _toPhp($result)
|
||||
{
|
||||
$udfs = false; // if UDFs are inside the given result set
|
||||
$toPhp = $result; // if there is nothing to convert then return the result from DB
|
||||
|
||||
// If it's an object its fields will be parsed to find booleans and arrays types
|
||||
// If it's an object its fields will be parsed to find booleans, arrays and UDFs types
|
||||
if (is_object($result))
|
||||
{
|
||||
$toBeConverterdArray = array(); // Fields to be converted
|
||||
@@ -884,40 +886,48 @@ class DB_Model extends CI_Model
|
||||
$this->executedQueryMetaData = $result->field_data(); // Fields information
|
||||
$this->executedQueryListFields = $result->list_fields(); // List of the retrieved fields
|
||||
|
||||
for ($i = 0; $i < count($this->executedQueryMetaData); $i++) // Looking for booleans and arrays
|
||||
// Looking for booleans, arrays and UDFs
|
||||
foreach ($this->executedQueryMetaData as $eqmd)
|
||||
{
|
||||
// If array type, boolean type OR a UDF
|
||||
if (strpos($this->executedQueryMetaData[$i]->type, DB_Model::PGSQL_ARRAY_TYPE) !== false
|
||||
|| $this->executedQueryMetaData[$i]->type == DB_Model::PGSQL_BOOLEAN_TYPE
|
||||
|| $this->udflib->isUDFColumn($this->executedQueryMetaData[$i]->name, $this->executedQueryMetaData[$i]->type))
|
||||
if (strpos($eqmd->type, DB_Model::PGSQL_ARRAY_TYPE) !== false
|
||||
|| $eqmd->type == DB_Model::PGSQL_BOOLEAN_TYPE
|
||||
|| $this->udflib->isUDFColumn($eqmd->name, $eqmd->type))
|
||||
{
|
||||
// Name and type of the field to be converted
|
||||
$toBeConverted = new stdClass();
|
||||
// Set the type of the field to be converted
|
||||
$toBeConverted->type = $this->executedQueryMetaData[$i]->type;
|
||||
// Set the name of the field to be converted
|
||||
$toBeConverted->name = $this->executedQueryMetaData[$i]->name;
|
||||
// Add the field to be converted to $toBeConverterdArray
|
||||
array_push($toBeConverterdArray, $toBeConverted);
|
||||
// If UDFs are inside this result set
|
||||
if ($this->udflib->isUDFColumn($eqmd->name, $eqmd->type))
|
||||
{
|
||||
$udfs = true;
|
||||
}
|
||||
else // all the other cases
|
||||
{
|
||||
// Name and type of the field to be converted
|
||||
$toBeConverted = new stdClass();
|
||||
// Set the type of the field to be converted
|
||||
$toBeConverted->type = $eqmd->type;
|
||||
// Set the name of the field to be converted
|
||||
$toBeConverted->name = $eqmd->name;
|
||||
// Add the field to be converted to $toBeConverterdArray
|
||||
array_push($toBeConverterdArray, $toBeConverted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If there is something to convert, otherwhise don't lose time
|
||||
if (count($toBeConverterdArray) > 0)
|
||||
{
|
||||
// Returns the array of objects, each of them represents a DB record
|
||||
$resultsArray = $result->result();
|
||||
// Looping on results
|
||||
for ($i = 0; $i < count($resultsArray); $i++)
|
||||
{
|
||||
// Single element
|
||||
$resultElement = $resultsArray[$i];
|
||||
// Looping on fields to be converted
|
||||
for ($j = 0; $j < count($toBeConverterdArray); $j++)
|
||||
{
|
||||
// Single element
|
||||
$toBeConverted = $toBeConverterdArray[$j];
|
||||
// Returns the array of objects, each of them represents a DB record
|
||||
$resultsArray = $result->result();
|
||||
|
||||
// If in this result set there are UDFs then prepare them
|
||||
if ($udfs) $this->udflib->prepareUDFsRead($resultsArray, $this->dbTable);
|
||||
|
||||
// If there is something to convert, otherwhise don't waste time
|
||||
if (!isEmptyArray($toBeConverterdArray))
|
||||
{
|
||||
// Looping on results
|
||||
foreach ($resultsArray as $resultElement)
|
||||
{
|
||||
// Looping on fields to be converted
|
||||
foreach ($toBeConverterdArray as $toBeConverted)
|
||||
{
|
||||
// Array type
|
||||
if (strpos($toBeConverted->type, DB_Model::PGSQL_ARRAY_TYPE) !== false)
|
||||
{
|
||||
@@ -931,30 +941,12 @@ class DB_Model extends CI_Model
|
||||
{
|
||||
$resultElement->{$toBeConverted->name} = $this->pgBoolPhp($resultElement->{$toBeConverted->name});
|
||||
}
|
||||
// UDF
|
||||
elseif ($this->udflib->isUDFColumn($toBeConverted->name, $toBeConverted->type))
|
||||
{
|
||||
$jsonValues = json_decode($resultElement->{$toBeConverted->name}); // decode UDFs values
|
||||
if ($jsonValues != null) // if decode is ok
|
||||
{
|
||||
// For every UDF
|
||||
foreach ($jsonValues as $key => $value)
|
||||
{
|
||||
$resultElement->{$key} = $value; // create a new element called like the UDF
|
||||
}
|
||||
}
|
||||
unset($resultElement->{UDFLib::COLUMN_NAME}); // remove udf_values from the response
|
||||
}
|
||||
}
|
||||
}
|
||||
// Returns DB data as an array
|
||||
$toPhp = $resultsArray;
|
||||
}
|
||||
// And returns DB data as an array
|
||||
else
|
||||
{
|
||||
$toPhp = $result->result();
|
||||
}
|
||||
|
||||
// Returns DB data as an array
|
||||
$toPhp = $resultsArray;
|
||||
}
|
||||
|
||||
return $toPhp;
|
||||
@@ -998,4 +990,48 @@ class DB_Model extends CI_Model
|
||||
{
|
||||
if ($this->debugMode) $this->loglib->logDebug($this->db->last_query());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the UDF contained in this table ($dbTable)
|
||||
* If no UDF are present, an empty array will be returned
|
||||
* NOTE: it returns all the UDFs, does _not_ check the permissions
|
||||
*/
|
||||
private function _getUDFsNoPerms($id)
|
||||
{
|
||||
$udfs = array();
|
||||
|
||||
$this->db->select(UDFLib::COLUMN_NAME, true); // get only the UDF column
|
||||
|
||||
// Primary key management
|
||||
$tmpId = $id;
|
||||
|
||||
// Check for composite Primary Key
|
||||
if (is_array($id))
|
||||
{
|
||||
if (isset($id[0]))
|
||||
{
|
||||
$tmpId = $this->_arrayCombine($this->pk, $id);
|
||||
}
|
||||
}
|
||||
elseif ($id != null)
|
||||
{
|
||||
$tmpId = array($this->pk => $id);
|
||||
}
|
||||
|
||||
// Read the record from the table
|
||||
$result = $this->db->get_where($this->dbTable, $tmpId);
|
||||
|
||||
// If was a success and there are data
|
||||
if ($result && count($result->result()) == 1)
|
||||
{
|
||||
// Get the UDF column and decode it from JSON
|
||||
$jsonValues = json_decode($result->result()[0]->{UDFLib::COLUMN_NAME});
|
||||
|
||||
// If the JSON convertion was fine convert the object to an array
|
||||
if ($jsonValues != null) $udfs = get_object_vars($jsonValues);
|
||||
}
|
||||
|
||||
return $udfs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+295
-126
@@ -30,13 +30,14 @@ class UDFLib
|
||||
// ...to specify permissions that are needed to use this TableWidget
|
||||
const REQUIRED_PERMISSIONS_PARAMETER = 'requiredPermissions';
|
||||
|
||||
const PERMISSION_TABLE_METHOD = 'UDFWidget'; // Name for fake method to be checked by the PermissionLib
|
||||
const PERMISSION_TYPE_READ = 'r';
|
||||
const PERMISSION_TYPE_WRITE = 'w';
|
||||
|
||||
// ...to specify the primary key name and value
|
||||
const PRIMARY_KEY_NAME = 'primaryKeyName';
|
||||
const PRIMARY_KEY_VALUE = 'primaryKeyValue';
|
||||
|
||||
const PERMISSION_TABLE_METHOD = 'UDFWidget'; // Name for fake method to be checked by the PermissionLib
|
||||
const PERMISSION_TYPE = 'rw';
|
||||
|
||||
// HTML components
|
||||
const LABEL = 'title';
|
||||
const TITLE = 'description';
|
||||
@@ -76,10 +77,10 @@ class UDFLib
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* UDFWidget
|
||||
*/
|
||||
public function UDFWidget($args, $htmlArgs = array())
|
||||
{
|
||||
* UDFWidget
|
||||
*/
|
||||
public function UDFWidget($args, $htmlArgs = array())
|
||||
{
|
||||
if ((isset($args[self::SCHEMA_ARG_NAME]) && !isEmptyString($args[self::SCHEMA_ARG_NAME]))
|
||||
&& (isset($args[self::TABLE_ARG_NAME]) && !isEmptyString($args[self::TABLE_ARG_NAME])))
|
||||
{
|
||||
@@ -112,16 +113,17 @@ class UDFLib
|
||||
show_error(self::TABLE_ARG_NAME.' parameter is missing!');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* It renders the HTML of the UDF
|
||||
*
|
||||
* NOTE: When this method is called $widgetData contains different data from
|
||||
* parameter $args in the constructor
|
||||
*/
|
||||
public function displayUDFWidget(&$widgetData)
|
||||
public function displayUDFWidget(&$widgetData)
|
||||
{
|
||||
$field = null;
|
||||
$schema = $widgetData[self::SCHEMA_ARG_NAME]; // schema attribute
|
||||
$table = $widgetData[self::TABLE_ARG_NAME]; // table attribute
|
||||
|
||||
@@ -133,7 +135,7 @@ class UDFLib
|
||||
$udfResults = $this->_loadUDF($schema, $table); // loads UDF definition
|
||||
if (hasData($udfResults))
|
||||
{
|
||||
$udf = $udfResults->retval[0]; // only one record is loaded
|
||||
$udf = getData($udfResults)[0]; // only one record is loaded
|
||||
if (isset($udf->jsons))
|
||||
{
|
||||
$jsonSchemas = json_decode($udf->jsons); // decode the json schema
|
||||
@@ -155,7 +157,7 @@ class UDFLib
|
||||
$found = false; // used to check if the field is found or not in the json schema
|
||||
|
||||
$this->_sortJsonSchemas($jsonSchemasArray); // Sort the list of UDF by sort property
|
||||
|
||||
|
||||
// Loops through json schemas
|
||||
foreach ($jsonSchemasArray as $jsonSchema)
|
||||
{
|
||||
@@ -169,21 +171,37 @@ class UDFLib
|
||||
{
|
||||
show_error(sprintf('%s.%s: Attribute "name" not present in the json schema', $schema, $table));
|
||||
}
|
||||
// If the requiredPermissions property is not present then show an error
|
||||
if (!isset($jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
{
|
||||
show_error(sprintf('%s.%s: Attribute "requiredPermissions" not present in the json schema', $schema, $table));
|
||||
}
|
||||
|
||||
// Set the required permissions for this UDF
|
||||
$this->_setRequiredPermissions($jsonSchema->{self::NAME}, $jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER});
|
||||
|
||||
// If a UDF is specified and is present in the json schemas list or no UDF is specified
|
||||
if ((isset($field) && $field == $jsonSchema->{self::NAME}) || !isset($field))
|
||||
{
|
||||
// Set attributes using phrases
|
||||
$this->_setAttributesWithPhrases($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
// If the user has the permissions to read this field
|
||||
if ($this->_readAllowed($jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
{
|
||||
// Set attributes using phrases
|
||||
$this->_setAttributesWithPhrases($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
|
||||
// Set validation attributes
|
||||
$this->_setValidationAttributes($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
// Set validation attributes
|
||||
$this->_setValidationAttributes($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
|
||||
// Set name and id attributes
|
||||
$this->_setNameAndId($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
// Set name and id attributes
|
||||
$this->_setNameAndId($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
|
||||
// Render the HTML for this UDF
|
||||
$this->_render($jsonSchema, $widgetData);
|
||||
// Set if the field is in read only mode
|
||||
$this->_setReadOnly($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]);
|
||||
|
||||
// Render the HTML for this UDF
|
||||
$this->_render($jsonSchema, $widgetData);
|
||||
}
|
||||
// otherwise the UDF is not displayed
|
||||
|
||||
// If a UDf is specified and it was found then stop looking through this list
|
||||
if (isset($field) && $field == $jsonSchema->{self::NAME})
|
||||
@@ -213,12 +231,97 @@ class UDFLib
|
||||
show_error(sprintf('%s.%s: Does not contain "jsons" field', $schema, $table));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage UDFs
|
||||
* UDFs permissions check and convertion to read them from database
|
||||
*/
|
||||
public function manageUDFs(&$data, $schemaAndTable, $udfValues = null)
|
||||
public function prepareUDFsRead(&$data, $schemaAndTable, $udfValues = null)
|
||||
{
|
||||
$this->_ci->load->model('system/UDF_model', 'UDFModel');
|
||||
|
||||
// Retrieves UDFs definitions for this table
|
||||
$resultUDFsDefinitions = $this->_ci->UDFModel->getUDFsDefinitions($schemaAndTable);
|
||||
|
||||
// If an error occurred while reading from database
|
||||
if (isError($resultUDFsDefinitions))
|
||||
{
|
||||
$data = array(); // then set data as an empty array
|
||||
return; // and exit from this method
|
||||
}
|
||||
|
||||
// If there are no UDFs defined for this table the return
|
||||
if (!hasData($resultUDFsDefinitions)) return;
|
||||
|
||||
// If not an error and has data, decodes json that define the UDFs for this table
|
||||
$decodedUDFDefinitions = json_decode(
|
||||
getData($resultUDFsDefinitions)[0]->{self::COLUMN_JSON_DESCRIPTION}
|
||||
);
|
||||
|
||||
// Looping on results, resultElement is an object that represent a database record
|
||||
foreach ($data as $resultElement)
|
||||
{
|
||||
// Decode the JSON column udf_values
|
||||
$udfColumn = json_decode($resultElement->{self::COLUMN_NAME});
|
||||
|
||||
// If this is not a valid JSON then skip to the next database record
|
||||
if ($udfColumn == null) continue;
|
||||
|
||||
// For each UDF column of this database record
|
||||
foreach (get_object_vars($udfColumn) as $columnName => $columnValue)
|
||||
{
|
||||
$udfColumnToBeRemoved = $columnName; // let's try to remove it
|
||||
|
||||
// Loops through the UDFs definitions
|
||||
foreach ($decodedUDFDefinitions as $decodedUDFDefinition)
|
||||
{
|
||||
// If the column exists in the UDF definition
|
||||
if ($columnName == $decodedUDFDefinition->{self::NAME})
|
||||
{
|
||||
$udfColumnToBeRemoved = null; // then keep it
|
||||
}
|
||||
}
|
||||
|
||||
// If in this record have been found a _not_ defined UDF then remove it
|
||||
if (!isEmptyString($udfColumnToBeRemoved)) unset($udfColumn->{$udfColumnToBeRemoved});
|
||||
}
|
||||
|
||||
// Loops through the UDFs definitions
|
||||
foreach ($decodedUDFDefinitions as $decodedUDFDefinition)
|
||||
{
|
||||
// Checks if the requiredPermissions is available and it is a valid array or a valid string
|
||||
if (isset($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
&& (!isEmptyArray($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
|| !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})))
|
||||
{
|
||||
// Then check if the user has the permissions to read such UDF
|
||||
if (!$this->_readAllowed($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
{
|
||||
// If not then remove the UDF from the result set
|
||||
unset($udfColumn->{$decodedUDFDefinition->{self::NAME}});
|
||||
}
|
||||
}
|
||||
else // If not then remove the UDF from the result set
|
||||
{
|
||||
unset($udfColumn->{$decodedUDFDefinition->{self::NAME}});
|
||||
}
|
||||
}
|
||||
|
||||
// Add the defined and permitted UDF columns to the record set
|
||||
foreach (get_object_vars($udfColumn) as $columnName => $columnValue)
|
||||
{
|
||||
$resultElement->{$columnName} = $columnValue;
|
||||
}
|
||||
}
|
||||
|
||||
// And finally remove the UDFs column
|
||||
unset($resultElement->{self::COLUMN_NAME});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDFs validation and permissions check to write them into database
|
||||
*/
|
||||
public function prepareUDFsWrite(&$data, $schemaAndTable, $udfValues = null)
|
||||
{
|
||||
$validate = success(true); // returned value
|
||||
// Contains a list of validation errors for the UDFs that have not passed the validation
|
||||
@@ -241,18 +344,34 @@ class UDFLib
|
||||
|
||||
// Decodes json that define the UDFs for this table
|
||||
$decodedUDFDefinitions = json_decode(
|
||||
$resultUDFsDefinitions->retval[0]->{self::COLUMN_JSON_DESCRIPTION}
|
||||
getData($resultUDFsDefinitions)[0]->{self::COLUMN_JSON_DESCRIPTION}
|
||||
);
|
||||
|
||||
// Loops through the UDFs definitions
|
||||
for ($i = 0; $i < count($decodedUDFDefinitions); $i++)
|
||||
foreach ($decodedUDFDefinitions as $decodedUDFDefinition)
|
||||
{
|
||||
$decodedUDFDefinition = $decodedUDFDefinitions[$i]; // Definition of a single UDF
|
||||
// Checks if the requiredPermissions is available and it is a valid array or a valid string
|
||||
if (isset($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
&& (!isEmptyArray($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})
|
||||
|| !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})))
|
||||
{
|
||||
// Then check if the user has the permissions to write such UDF
|
||||
if (!$this->_writeAllowed($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
{
|
||||
// If the logged user has no permissions then remove the UDF
|
||||
unset($udfsParameters[$decodedUDFDefinition->{self::NAME}]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If no permissions have been defined for this UDF then remove it
|
||||
unset($udfsParameters[$decodedUDFDefinition->{self::NAME}]);
|
||||
}
|
||||
|
||||
// Loops through the UDFs values that should be stored
|
||||
foreach ($udfsParameters as $key => $val)
|
||||
{
|
||||
$tmpValidate = success(true); // temporary variable used to store the returned value from _validateUDFs
|
||||
$tmpValidateArray = array(); // temporary variable used to store the returned value from _validateUDFs
|
||||
|
||||
// If this is the definition of this UDF
|
||||
if ($decodedUDFDefinition->{self::NAME} == $key)
|
||||
@@ -314,7 +433,7 @@ class UDFLib
|
||||
|
||||
if ($toBeValidated === true) // Checks if validation should be performed
|
||||
{
|
||||
$tmpValidate = $this->_validateUDFs(
|
||||
$tmpValidateArray = $this->_validateUDFs(
|
||||
$decodedUDFDefinition->{self::VALIDATION},
|
||||
$decodedUDFDefinition->{self::NAME},
|
||||
$val
|
||||
@@ -324,13 +443,13 @@ class UDFLib
|
||||
}
|
||||
|
||||
// If validation is ok copy the value that is to be stored into $toBeStoredUDFsArray
|
||||
if (isSuccess($tmpValidate))
|
||||
if (isEmptyArray($tmpValidateArray))
|
||||
{
|
||||
$toBeStoredUDFsArray[$key] = $val;
|
||||
}
|
||||
else // otherwise store the validation error in $notValidUDFsArray
|
||||
else // otherwise store the validation errors in $notValidUDFsArray
|
||||
{
|
||||
$notValidUDFsArray[] = $tmpValidate;
|
||||
$notValidUDFsArray = array_merge($notValidUDFsArray, $tmpValidateArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -344,11 +463,11 @@ class UDFLib
|
||||
}
|
||||
|
||||
// If the validation of all the supplied UDFs is ok
|
||||
if (count($notValidUDFsArray) == 0)
|
||||
if (isEmptyArray($notValidUDFsArray))
|
||||
{
|
||||
// An update is performed, then in this case it preserves the values
|
||||
// of the UDF that are not updated
|
||||
if (is_array($udfValues) && count($udfValues) > 0)
|
||||
if (!isEmptyArray($udfValues))
|
||||
{
|
||||
foreach ($udfValues as $fieldName => $fieldValue)
|
||||
{
|
||||
@@ -379,7 +498,7 @@ class UDFLib
|
||||
/**
|
||||
* isUDFColumn
|
||||
*/
|
||||
public function isUDFColumn($columnName, $columnType)
|
||||
public function isUDFColumn($columnName, $columnType = self::COLUMN_TYPE)
|
||||
{
|
||||
$isUDFColumn = false;
|
||||
|
||||
@@ -466,7 +585,7 @@ class UDFLib
|
||||
/**
|
||||
* Save UDFs
|
||||
*/
|
||||
public function saveUDFs($udfUniqueId, $udfs)
|
||||
public function saveUDFs($udfs)
|
||||
{
|
||||
// Read the all session for this udf widget
|
||||
$session = $this->getSession();
|
||||
@@ -490,30 +609,80 @@ class UDFLib
|
||||
// Returns the result of the database update operation to save UDFs
|
||||
return $dbModel->update(
|
||||
array($session[self::PRIMARY_KEY_NAME] => $session[self::PRIMARY_KEY_VALUE]),
|
||||
(array)$udfs
|
||||
get_object_vars($udfs)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if at least one of the permissions given as parameter (requiredPermissions) belongs
|
||||
* to the authenticated user, if confirmed then is allowed to use this UDFWidget.
|
||||
* If the parameter requiredPermissions is NOT given or is not present in the session,
|
||||
* then NO one is allow to use this UDFWidget
|
||||
* Wrapper method to permissionlib->hasAtLeastOne
|
||||
*/
|
||||
public function isAllowed($requiredPermissions = null)
|
||||
{
|
||||
$this->_ci->load->library('PermissionLib'); // Load permission library
|
||||
|
||||
// Gets the required permissions from the session if they are not provided as parameter
|
||||
$rq = $requiredPermissions;
|
||||
if ($rq == null) $rq = $this->getSessionElement(self::REQUIRED_PERMISSIONS_PARAMETER);
|
||||
|
||||
return $this->_ci->permissionlib->hasAtLeastOne($rq, self::PERMISSION_TABLE_METHOD, self::PERMISSION_TYPE);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
//
|
||||
|
||||
/**
|
||||
* Checks if at least one of the permissions given as parameter belongs to the authenticated user in read mode
|
||||
* Wrapper method to permissionlib->hasAtLeastOne
|
||||
*/
|
||||
private function _readAllowed($requiredPermissions)
|
||||
{
|
||||
$readAllowed = false;
|
||||
|
||||
// If the user is logged then it is possible to check the permissions
|
||||
if (isLogged())
|
||||
{
|
||||
$this->_ci->load->library('PermissionLib'); // Load permission library
|
||||
|
||||
$readAllowed = $this->_ci->permissionlib->hasAtLeastOne(
|
||||
$requiredPermissions,
|
||||
self::PERMISSION_TABLE_METHOD,
|
||||
self::PERMISSION_TYPE_READ
|
||||
);
|
||||
} // otherwise it is not possible to check the permissions
|
||||
|
||||
return $readAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if at least one of the permissions given as parameter belongs to the authenticated user in write mode
|
||||
* Wrapper method to permissionlib->hasAtLeastOne
|
||||
*/
|
||||
private function _writeAllowed($requiredPermissions)
|
||||
{
|
||||
$writeAllowed = false;
|
||||
|
||||
// If the user is logged then it is possible to check the permissions
|
||||
if (isLogged())
|
||||
{
|
||||
$this->_ci->load->library('PermissionLib'); // Load permission library
|
||||
|
||||
$writeAllowed = $this->_ci->permissionlib->hasAtLeastOne(
|
||||
$requiredPermissions,
|
||||
self::PERMISSION_TABLE_METHOD,
|
||||
self::PERMISSION_TYPE_WRITE
|
||||
);
|
||||
} // otherwise it is not possible to check the permissions
|
||||
|
||||
return $writeAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an array of required permissions for a UDF into the session
|
||||
*/
|
||||
private function _setRequiredPermissions($udfName, $permissions)
|
||||
{
|
||||
// Get the session for this UDFWidget
|
||||
$session = $this->getSession();
|
||||
|
||||
// If does _not_ exist yet in the session
|
||||
if (!isset($session[self::REQUIRED_PERMISSIONS_PARAMETER]))
|
||||
{
|
||||
$session[self::REQUIRED_PERMISSIONS_PARAMETER] = array();
|
||||
}
|
||||
|
||||
// Set the required permission in the session for this UDFWidget
|
||||
$session[self::REQUIRED_PERMISSIONS_PARAMETER][$udfName] = $permissions;
|
||||
|
||||
// Write into the session
|
||||
$this->setSession($session);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the block for UDFs
|
||||
@@ -544,12 +713,12 @@ class UDFLib
|
||||
{
|
||||
$udfsParameters = array();
|
||||
|
||||
foreach ($data as $key => $val)
|
||||
foreach ($data as $columnName => $columnValue)
|
||||
{
|
||||
if (substr($key, 0, 4) == self::COLUMN_PREFIX)
|
||||
if ($this->isUDFColumn($columnName))
|
||||
{
|
||||
$udfsParameters[$key] = $val; // stores UDF value into property UDFs
|
||||
unset($data[$key]); // remove from data
|
||||
$udfsParameters[$columnName] = $columnValue; // stores UDF value into property UDFs
|
||||
unset($data[$columnName]); // remove from data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,29 +814,39 @@ class UDFLib
|
||||
}
|
||||
}
|
||||
|
||||
// If no UDF validation errors were raised, it's a success!!
|
||||
if (count($returnArrayValidation) == 0)
|
||||
{
|
||||
$returnArrayValidation = success(true);
|
||||
}
|
||||
|
||||
return $returnArrayValidation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the name and id attribute of the HTML element
|
||||
*/
|
||||
private function _setNameAndId($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
/**
|
||||
* Disable the HTML element if in read only mode
|
||||
*/
|
||||
private function _setReadOnly($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
// If write permissions _not_ exist then set the field as disabled
|
||||
if (!$this->_writeAllowed($jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER}))
|
||||
{
|
||||
$htmlParameters[HTMLWidget::DISABLED] = HTMLWidget::DISABLED; // any values is fine
|
||||
}
|
||||
else // otherwise restore to default
|
||||
{
|
||||
if (isset($htmlParameters[HTMLWidget::DISABLED])) unset($htmlParameters[HTMLWidget::DISABLED]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the name and id attribute of the HTML element
|
||||
*/
|
||||
private function _setNameAndId($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
$htmlParameters[HTMLWidget::HTML_ID] = $jsonSchema->{self::NAME};
|
||||
$htmlParameters[HTMLWidget::HTML_NAME] = $jsonSchema->{self::NAME};
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the list of UDF by sort property
|
||||
*/
|
||||
private function _sortJsonSchemas(&$jsonSchemasArray)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the list of UDF by sort property
|
||||
*/
|
||||
private function _sortJsonSchemas(&$jsonSchemasArray)
|
||||
{
|
||||
usort($jsonSchemasArray, function ($a, $b) {
|
||||
if (!isset($a->{self::SORT}))
|
||||
{
|
||||
@@ -684,13 +863,13 @@ class UDFLib
|
||||
|
||||
return ($a->{self::SORT} < $b->{self::SORT}) ? -1 : 1;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the UDF description by the given schema and table
|
||||
*/
|
||||
private function _loadUDF($schema, $table)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the UDF description by the given schema and table
|
||||
*/
|
||||
private function _loadUDF($schema, $table)
|
||||
{
|
||||
// Loads UDF model
|
||||
$this->_ci->load->model('system/UDF_model', 'UDFModel');
|
||||
|
||||
@@ -703,18 +882,7 @@ class UDFLib
|
||||
|
||||
if (isError($udfResults))
|
||||
{
|
||||
if (is_object($udfResults) && isset($udfResults->retval))
|
||||
{
|
||||
show_error(getError($udfResults));
|
||||
}
|
||||
elseif (is_string($udfResults))
|
||||
{
|
||||
show_error($udfResults);
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('UDFWidget: generic error occurred');
|
||||
}
|
||||
show_error(getError($udfResults));
|
||||
}
|
||||
elseif (!hasData($udfResults))
|
||||
{
|
||||
@@ -722,13 +890,13 @@ class UDFLib
|
||||
}
|
||||
|
||||
return $udfResults;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the HTML for the UDF
|
||||
*/
|
||||
private function _render($jsonSchema, &$widgetData)
|
||||
{
|
||||
/**
|
||||
* Render the HTML for the UDF
|
||||
*/
|
||||
private function _render($jsonSchema, &$widgetData)
|
||||
{
|
||||
// Checkbox
|
||||
if ($jsonSchema->{self::TYPE} == 'checkbox')
|
||||
{
|
||||
@@ -759,11 +927,11 @@ class UDFLib
|
||||
{
|
||||
$this->_renderDropdown($jsonSchema, $widgetData, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a dropdown element
|
||||
*/
|
||||
/**
|
||||
* Renders a dropdown element
|
||||
*/
|
||||
private function _renderDropdown($jsonSchema, &$widgetData, $multiple = false)
|
||||
{
|
||||
// Selected element/s
|
||||
@@ -792,7 +960,7 @@ class UDFLib
|
||||
$queryResult = $this->_ci->UDFModel->execReadOnlyQuery($jsonSchema->{self::LIST_VALUES}->sql);
|
||||
if (hasData($queryResult))
|
||||
{
|
||||
$parameters = $queryResult->retval;
|
||||
$parameters = getData($queryResult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,8 +973,8 @@ class UDFLib
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a textarea element
|
||||
*/
|
||||
* Renders a textarea element
|
||||
*/
|
||||
private function _renderTextarea($jsonSchema, &$widgetData)
|
||||
{
|
||||
$text = null; // text value
|
||||
@@ -823,8 +991,8 @@ class UDFLib
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders an input text element
|
||||
*/
|
||||
* Renders an input text element
|
||||
*/
|
||||
private function _renderTextfield($jsonSchema, &$widgetData)
|
||||
{
|
||||
$text = null; // text value
|
||||
@@ -841,8 +1009,8 @@ class UDFLib
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a checkbox element
|
||||
*/
|
||||
* Renders a checkbox element
|
||||
*/
|
||||
private function _renderCheckbox($jsonSchema, &$widgetData)
|
||||
{
|
||||
// Set checkbox value if present in the DB
|
||||
@@ -861,11 +1029,11 @@ class UDFLib
|
||||
$checkboxWidgetUDF->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the attributes of the HTML element using the phrases system
|
||||
*/
|
||||
private function _setAttributesWithPhrases($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
/**
|
||||
* Sets the attributes of the HTML element using the phrases system
|
||||
*/
|
||||
private function _setAttributesWithPhrases($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
// By default set to null all the attributes
|
||||
$htmlParameters[HTMLWidget::LABEL] = null;
|
||||
$htmlParameters[HTMLWidget::TITLE] = null;
|
||||
@@ -893,7 +1061,7 @@ class UDFLib
|
||||
);
|
||||
if (hasData($tmpResult))
|
||||
{
|
||||
$htmlParameters[HTMLWidget::LABEL] = $tmpResult->retval[0]->text;
|
||||
$htmlParameters[HTMLWidget::LABEL] = getData($tmpResult)[0]->text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -911,7 +1079,7 @@ class UDFLib
|
||||
);
|
||||
if (hasData($tmpResult))
|
||||
{
|
||||
$htmlParameters[HTMLWidget::TITLE] = $tmpResult->retval[0]->text;
|
||||
$htmlParameters[HTMLWidget::TITLE] = getData($tmpResult)[0]->text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -929,17 +1097,17 @@ class UDFLib
|
||||
);
|
||||
if (hasData($tmpResult))
|
||||
{
|
||||
$htmlParameters[HTMLWidget::PLACEHOLDER] = $tmpResult->retval[0]->text;
|
||||
$htmlParameters[HTMLWidget::PLACEHOLDER] = getData($tmpResult)[0]->text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the validation attributes of the HTML element using the configuration inside the json schema
|
||||
*/
|
||||
private function _setValidationAttributes($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
/**
|
||||
* Sets the validation attributes of the HTML element using the configuration inside the json schema
|
||||
*/
|
||||
private function _setValidationAttributes($jsonSchema, &$htmlParameters)
|
||||
{
|
||||
// Validation attributes set by default to null
|
||||
$htmlParameters[HTMLWidget::REGEX] = null;
|
||||
$htmlParameters[HTMLWidget::REQUIRED] = null;
|
||||
@@ -998,3 +1166,4 @@ class UDFLib
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,8 @@ class Prestudent_model extends DB_Model
|
||||
|
||||
$prestudentdata->prestudentstatus = $lastStatusData;
|
||||
|
||||
if ($this->hasUDF())
|
||||
|
||||
if ($this->udfsExistAndDefined())
|
||||
{
|
||||
$prestudentdata->prestudentUdfs = $this->getUDFs($prestudent_id);
|
||||
}
|
||||
|
||||
@@ -169,18 +169,34 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
*/
|
||||
public function getLecturersByLv($studiensemester_kurzbz, $lehrveranstaltung_id)
|
||||
{
|
||||
$query = "SELECT * FROM (SELECT distinct on(uid) vorname, nachname, tbl_benutzer.uid as uid,
|
||||
CASE WHEN lehrfunktion_kurzbz='LV-Leitung' THEN true ELSE false END as lvleiter
|
||||
FROM lehre.tbl_lehreinheit, lehre.tbl_lehreinheitmitarbeiter, public.tbl_benutzer, public.tbl_person
|
||||
WHERE
|
||||
tbl_lehreinheit.lehreinheit_id=tbl_lehreinheitmitarbeiter.lehreinheit_id AND
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid=tbl_benutzer.uid AND
|
||||
tbl_person.person_id=tbl_benutzer.person_id AND
|
||||
lehrveranstaltung_id=? AND
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid NOT like '_Dummy%' AND
|
||||
tbl_benutzer.aktiv=true AND tbl_person.aktiv=true AND
|
||||
studiensemester_kurzbz=?) AS a
|
||||
ORDER BY lvleiter DESC, nachname, vorname";
|
||||
$query = "SELECT
|
||||
*
|
||||
FROM
|
||||
(SELECT distinct on(uid) vorname, nachname, tbl_benutzer.uid as uid,
|
||||
CASE WHEN
|
||||
EXISTS(
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
lehre.tbl_lehreinheitmitarbeiter lvllem
|
||||
JOIN lehre.tbl_lehreinheit lvlle USING(lehreinheit_id)
|
||||
WHERE
|
||||
lehrfunktion_kurzbz='LV-Leitung'
|
||||
AND lehrveranstaltung_id=tbl_lehreinheit.lehrveranstaltung_id
|
||||
AND studiensemester_kurzbz=tbl_lehreinheit.studiensemester_kurzbz
|
||||
AND mitarbeiter_uid=tbl_benutzer.uid
|
||||
) THEN true ELSE false END as lvleiter
|
||||
FROM lehre.tbl_lehreinheit, lehre.tbl_lehreinheitmitarbeiter, public.tbl_benutzer, public.tbl_person
|
||||
WHERE
|
||||
tbl_lehreinheit.lehreinheit_id=tbl_lehreinheitmitarbeiter.lehreinheit_id AND
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid=tbl_benutzer.uid AND
|
||||
tbl_person.person_id=tbl_benutzer.person_id AND
|
||||
lehrveranstaltung_id=? AND
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid NOT like '_Dummy%' AND
|
||||
tbl_benutzer.aktiv=true AND tbl_person.aktiv=true AND
|
||||
studiensemester_kurzbz=?
|
||||
) AS a
|
||||
ORDER BY lvleiter DESC, nachname, vorname";
|
||||
|
||||
return $this->execQuery($query, array($lehrveranstaltung_id, $studiensemester_kurzbz));
|
||||
}
|
||||
@@ -273,7 +289,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, $parametersarray);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets Lehrveranstaltung and its Lehreinheiten (multiple rows possible).
|
||||
* Returns empty array if student has no Lehrveranstaltung.
|
||||
@@ -290,7 +306,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
AND studiensemester_kurzbz = ?
|
||||
AND lehrveranstaltung_id = ?;
|
||||
';
|
||||
|
||||
|
||||
return $this->execQuery($query, array($uid, $studiensemester_kurzbz, $lehrveranstaltung_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::UDF_UNIQUE_ID => 'fasPersonUDFs',
|
||||
UDFLib::REQUIRED_PERMISSIONS_PARAMETER => 'basis/person',
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_person',
|
||||
UDFLib::PRIMARY_KEY_NAME => 'person_id',
|
||||
@@ -70,7 +69,6 @@
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::UDF_UNIQUE_ID => 'fasPrestudentUDFs',
|
||||
UDFLib::REQUIRED_PERMISSIONS_PARAMETER => 'basis/person',
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_prestudent',
|
||||
UDFLib::PRIMARY_KEY_NAME => 'prestudent_id',
|
||||
@@ -109,3 +107,4 @@
|
||||
</body>
|
||||
|
||||
<?php $this->load->view("templates/footer"); ?>
|
||||
|
||||
|
||||
@@ -341,7 +341,6 @@
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
UDFLib::UDF_UNIQUE_ID => 'infocenterPrestudentUDFs_'.$zgvpruefung->prestudent_id,
|
||||
UDFLib::REQUIRED_PERMISSIONS_PARAMETER => 'infocenter',
|
||||
UDFLib::SCHEMA_ARG_NAME => 'public',
|
||||
UDFLib::TABLE_ARG_NAME => 'tbl_prestudent',
|
||||
UDFLib::PRIMARY_KEY_NAME => 'prestudent_id',
|
||||
@@ -553,3 +552,4 @@
|
||||
endforeach; // end foreach zgvpruefungen
|
||||
?>
|
||||
</div><!-- /.panel-group -->
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
<head>
|
||||
<title><?php printPageTitle($title); ?></title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<?php
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::HTML_NAME); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REQUIRED); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::TITLE); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::DISABLED, false); ?>
|
||||
<?php
|
||||
$checked = '';
|
||||
if (${CheckboxWidget::VALUE_FIELD} === true)
|
||||
@@ -38,4 +39,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MAX_VALUE); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REGEX); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::TITLE); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::DISABLED, false); ?>
|
||||
>
|
||||
<?php
|
||||
$elements = ${DropdownWidget::WIDGET_DATA_ELEMENTS_ARRAY_NAME};
|
||||
@@ -72,3 +73,4 @@
|
||||
</div>
|
||||
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
|
||||
|
||||
@@ -29,9 +29,11 @@
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MAX_LENGTH); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REGEX); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::TITLE); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::DISABLED, false); ?>
|
||||
><?php echo ${TextareaWidget::TEXT}; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
|
||||
|
||||
@@ -31,10 +31,12 @@
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::MAX_LENGTH); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::REGEX); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::TITLE); ?>
|
||||
<?php HTMLWidget::printAttribute(${HTMLWidget::HTML_ARG_NAME}, HTMLWidget::DISABLED, false); ?>
|
||||
value="<?php echo ${TextfieldWidget::VALUE}; ?>"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
<?php HTMLWidget::printEndBlock(${HTMLWidget::HTML_ARG_NAME}); ?>
|
||||
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
class HTMLWidget extends Widget
|
||||
{
|
||||
// The name of the array present in the data array given to the view that will render this widget
|
||||
const HTML_ARG_NAME = 'HTML';
|
||||
const HTML_ARG_NAME = 'HTML';
|
||||
const HTML_DEFAULT_VALUE = ''; // Default value of the html element
|
||||
const HTML_NAME = 'name'; // HTML name attribute
|
||||
const HTML_ID = 'id'; // HTML id attribute
|
||||
|
||||
// External block definition
|
||||
const EXTERNAL_BLOCK = 'externalBlock'; // External block name
|
||||
const EXTERNAL_START_BLOCK_HTML_TAG = '<div>'; // External block start tag
|
||||
const EXTERNAL_END_BLOCK_HTML_TAG = '</div>'; // External block end tag
|
||||
|
||||
// HTML attributes
|
||||
const LABEL = 'title';
|
||||
const HTML_NAME = 'name'; // HTML name attribute
|
||||
const HTML_ID = 'id'; // HTML id attribute
|
||||
|
||||
// External block definition
|
||||
const EXTERNAL_BLOCK = 'externalBlock'; // External block name
|
||||
const EXTERNAL_START_BLOCK_HTML_TAG = '<div>'; // External block start tag
|
||||
const EXTERNAL_END_BLOCK_HTML_TAG = '</div>'; // External block end tag
|
||||
|
||||
// HTML attributes
|
||||
const LABEL = 'title';
|
||||
const REGEX = 'regex';
|
||||
const TITLE = 'description';
|
||||
const REQUIRED = 'required-field';
|
||||
@@ -26,11 +26,12 @@ class HTMLWidget extends Widget
|
||||
const MAX_LENGTH = 'max-length';
|
||||
const MIN_LENGTH = 'min-length';
|
||||
const PLACEHOLDER = 'placeholder';
|
||||
const DISABLED = 'disabled';
|
||||
|
||||
/**
|
||||
* It gets also the htmlArgs array as parameter, it will be used to set the HTML properties
|
||||
*/
|
||||
public function __construct($name, $args = array(), $htmlArgs = array())
|
||||
/**
|
||||
* It gets also the htmlArgs array as parameter, it will be used to set the HTML properties
|
||||
*/
|
||||
public function __construct($name, $args = array(), $htmlArgs = array())
|
||||
{
|
||||
parent::__construct($name, $args);
|
||||
|
||||
@@ -38,11 +39,11 @@ class HTMLWidget extends Widget
|
||||
$this->_setHtmlProperties($htmlArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialising html properties, such as the id and name attributes of the HTML element
|
||||
*/
|
||||
private function _setHtmlProperties($htmlArgs)
|
||||
{
|
||||
/**
|
||||
* Initialising html properties, such as the id and name attributes of the HTML element
|
||||
*/
|
||||
private function _setHtmlProperties($htmlArgs)
|
||||
{
|
||||
// If $htmlArgs wasn't already stored in $this->_args
|
||||
if (!isset($this->_args[HTMLWidget::HTML_ARG_NAME]))
|
||||
{
|
||||
@@ -58,9 +59,9 @@ class HTMLWidget extends Widget
|
||||
$this->_args[HTMLWidget::HTML_ARG_NAME][$argName] = $argValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Prints an attribute name and eventually also the value extracted from $htmlArgs
|
||||
* Set $isValuePresent to false the value should not be displayed
|
||||
*/
|
||||
@@ -113,3 +114,4 @@ class HTMLWidget extends Widget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
*/
|
||||
class UDFWidget extends HTMLWidget
|
||||
{
|
||||
private $_requiredPermissions; // The required permissions to use this UDF widget
|
||||
|
||||
private $_schema; // Schema name
|
||||
private $_table; // Table name
|
||||
private $_primaryKeyName; // Primary key name
|
||||
@@ -26,26 +24,16 @@ class UDFWidget extends HTMLWidget
|
||||
|
||||
$this->_initUDFWidget($args); // checks parameters and initialize properties
|
||||
|
||||
// Let's start if it's allowed
|
||||
// NOTE: If it is NOT allowed then no data are loaded
|
||||
if ($this->udflib->isAllowed($this->_requiredPermissions))
|
||||
{
|
||||
$this->_startUDFWidget($args[UDFLib::UDF_UNIQUE_ID]);
|
||||
}
|
||||
$this->_startUDFWidget($args[UDFLib::UDF_UNIQUE_ID]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the WidgetLib, it renders the HTML of the UDF
|
||||
*/
|
||||
public function display($widgetData)
|
||||
public function display($widgetData)
|
||||
{
|
||||
// Let's start if it's allowed
|
||||
// NOTE: If it is NOT allowed then no data are loaded
|
||||
if ($this->_ci->udflib->isAllowed($this->_requiredPermissions))
|
||||
{
|
||||
$this->_ci->udflib->displayUDFWidget($widgetData);
|
||||
}
|
||||
}
|
||||
$this->_ci->udflib->displayUDFWidget($widgetData);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
@@ -60,18 +48,11 @@ class UDFWidget extends HTMLWidget
|
||||
// If here then everything is ok
|
||||
|
||||
// Initialize class properties
|
||||
$this->_requiredPermissions = null;
|
||||
$this->_schema = null;
|
||||
$this->_table = null;
|
||||
$this->_primaryKeyName = null;
|
||||
$this->_primaryKeyValue = null;
|
||||
|
||||
// Retrieved the required permissions parameter if present
|
||||
if (isset($args[UDFLib::REQUIRED_PERMISSIONS_PARAMETER]))
|
||||
{
|
||||
$this->_requiredPermissions = $args[UDFLib::REQUIRED_PERMISSIONS_PARAMETER];
|
||||
}
|
||||
|
||||
// Retrieved the
|
||||
if (isset($args[UDFLib::SCHEMA_ARG_NAME]))
|
||||
{
|
||||
@@ -113,11 +94,6 @@ class UDFWidget extends HTMLWidget
|
||||
show_error('The parameter "'.UDFLib::UDF_UNIQUE_ID.'" must be specified');
|
||||
}
|
||||
|
||||
if (!isset($args[UDFLib::REQUIRED_PERMISSIONS_PARAMETER]))
|
||||
{
|
||||
show_error('The parameter "'.UDFLib::REQUIRED_PERMISSIONS_PARAMETER.'" must be specified');
|
||||
}
|
||||
|
||||
if (!isset($args[UDFLib::SCHEMA_ARG_NAME]))
|
||||
{
|
||||
show_error('The parameter "'.UDFLib::SCHEMA_ARG_NAME.'" must be specified');
|
||||
@@ -149,7 +125,6 @@ class UDFWidget extends HTMLWidget
|
||||
$this->udflib->setSession(
|
||||
array(
|
||||
UDFLib::UDF_UNIQUE_ID => $udfUniqueId, // table unique id
|
||||
UDFLib::REQUIRED_PERMISSIONS_PARAMETER => $this->_requiredPermissions, //
|
||||
UDFLib::SCHEMA_ARG_NAME => $this->_schema, //
|
||||
UDFLib::TABLE_ARG_NAME => $this->_table, //
|
||||
UDFLib::PRIMARY_KEY_NAME => $this->_primaryKeyName, //
|
||||
@@ -158,3 +133,4 @@ class UDFWidget extends HTMLWidget
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
* Manfred Kindl <kindlm@technikum.wien.at>
|
||||
* Gerald Raab <raab@technikum-wien.at>
|
||||
* Alexei Karpenko <karpenko@technikum-wien.at>
|
||||
* Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
@@ -44,6 +45,7 @@ require_once('../../../include/bisverwendung.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
|
||||
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
$sprache_obj = new sprache();
|
||||
@@ -88,7 +90,7 @@ $fieldheadings = array(
|
||||
'oe1' => $p->t("zeitaufzeichnung/oe"), 'oe2' => $p->t("zeitaufzeichnung/oe").'2', 'aktivitaet' => $p->t("zeitaufzeichnung/aktivitaet"),
|
||||
'service' => $p->t("zeitaufzeichnung/service"), 'start' => $p->t("zeitaufzeichnung/start"), 'ende' => $p->t("zeitaufzeichnung/ende"),
|
||||
'dauer' => $p->t("zeitaufzeichnung/dauer"), 'kunde' => $p->t("zeitaufzeichnung/kunde"), 'beschreibung' => $p->t("global/beschreibung"), 'aktion' => $p->t("global/aktion"),
|
||||
'datum' => $p->t("global/datum")
|
||||
'datum' => $p->t("global/datum"),'homeoffice' => $p->t("zeitaufzeichnung/homeoffice")
|
||||
);
|
||||
|
||||
if ($rechte->isBerechtigt('basis/servicezeitaufzeichnung'))
|
||||
@@ -131,10 +133,13 @@ $bis_datum = (isset($_REQUEST['bis_datum'])?$_REQUEST['bis_datum']:date('d.m.Y')
|
||||
$bis_uhrzeit = (isset($_POST['bis_uhrzeit'])?$_POST['bis_uhrzeit']:date('H:i',mktime(date('H'), date('i')+10)));
|
||||
$bis = $bis_datum.' '.$bis_uhrzeit;
|
||||
|
||||
$homeoffice = (isset($_POST['homeoffice'])?true:false);
|
||||
$pause_von = (isset($_POST['pause_von'])?$_POST['pause_von']:date('H:i'));
|
||||
$pause_bis = (isset($_POST['pause_bis'])?$_POST['pause_bis']:date('H:i'));
|
||||
$von_pause = $von_datum.' '.$pause_von;
|
||||
$bis_pause = $bis_datum.' '.$pause_bis;
|
||||
$homeofficeChecked = '';
|
||||
//$reload = false;
|
||||
|
||||
$beschreibung = (isset($_POST['beschreibung'])?$_POST['beschreibung']:'');
|
||||
$service_id = (isset($_POST['service_id'])?$_POST['service_id']:'');
|
||||
@@ -221,7 +226,7 @@ echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
resetProjekt()
|
||||
//resetProjekt()
|
||||
$( ".datepicker_datum" ).datepicker({
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
@@ -274,10 +279,38 @@ echo '
|
||||
$("#projekt").change(
|
||||
function()
|
||||
{
|
||||
getProjektphasen($(this).val());
|
||||
var uid = $("#uidpass").val();
|
||||
getProjektphasen($(this).val(),uid);
|
||||
}
|
||||
)
|
||||
|
||||
useCheckedDate();
|
||||
|
||||
$("#von_datum").change(
|
||||
function()
|
||||
{
|
||||
var uid = $("#uidpass").val();
|
||||
var Datum = $(this).val();
|
||||
Tag=Datum.substring(0,2);
|
||||
Monat=Datum.substring(3,5);
|
||||
Jahr=Datum.substring(6,10);
|
||||
var day = Jahr + "-" + Monat + "-" + Tag;
|
||||
checkBisverwendung(day,uid);
|
||||
}
|
||||
)
|
||||
|
||||
function isVisible()
|
||||
{
|
||||
resetPhasen()
|
||||
}
|
||||
|
||||
$("#triggerPhasenReset").bind("isVisible", isVisible);
|
||||
|
||||
$("#triggerPhasenReset").show("slow", function()
|
||||
{
|
||||
$(this).trigger("isVisible");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function setbisdatum()
|
||||
@@ -516,14 +549,20 @@ echo '
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function resetProjekt()
|
||||
{
|
||||
$("#projekt").val("");
|
||||
$("#projektphaseformgroup").hide();
|
||||
}
|
||||
|
||||
function getProjektphasen(projekt_kurzbz)
|
||||
function resetPhasen()
|
||||
{
|
||||
var uid = $("#uidpass").val();
|
||||
getProjektphasen($("#projekt").val(),uid);
|
||||
}
|
||||
|
||||
function getProjektphasen(projekt_kurzbz, uid)
|
||||
{
|
||||
$.ajax
|
||||
(
|
||||
@@ -533,7 +572,9 @@ echo '
|
||||
dataType: "json",
|
||||
data:
|
||||
{
|
||||
"uid":uid,
|
||||
"projekt_kurzbz":projekt_kurzbz
|
||||
|
||||
},
|
||||
success: function(json)
|
||||
{
|
||||
@@ -572,6 +613,48 @@ echo '
|
||||
);
|
||||
}
|
||||
|
||||
function appendProjektphasenzeiten(projektphase_id)
|
||||
{
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
type: "GET",
|
||||
url: "zeitaufzeichnung_projektphasenzeiten.php",
|
||||
dataType: "json",
|
||||
data:
|
||||
{
|
||||
"projektphase_id":projektphase_id
|
||||
|
||||
},
|
||||
success: function(json)
|
||||
{
|
||||
//append Projektphasenzeiten if any
|
||||
if (json.length > 0)
|
||||
{
|
||||
var projphasenhtml = "";
|
||||
for (var i = 0; i < json.length; i++)
|
||||
{
|
||||
projphasenhtml += "<option value = \'" + json[i].projektphase_id + "\'>";
|
||||
projphasenhtml += json[i].bezeichnung;
|
||||
if(json[i].start != \'\' && json[i].ende !=\'\')
|
||||
{
|
||||
projphasenhtml += " ( "+json[i].start+" - "+json[i].ende+" )";
|
||||
}
|
||||
projphasenhtml += "<\/option>";
|
||||
}
|
||||
|
||||
$("#projektphase").append(projphasenhtml);
|
||||
$("#projektphaseformgroup").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#projektphaseformgroup").hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Pausenblock
|
||||
|
||||
function checkPausenblock()
|
||||
@@ -651,6 +734,40 @@ echo '
|
||||
$("#pause_von").val("");
|
||||
$("#pause_bis").val("");
|
||||
}
|
||||
|
||||
function useCheckedDate(){
|
||||
var uid = $("#uidpass").val();
|
||||
var Datum = $("#von_datum").val();
|
||||
Tag=Datum.substring(0,2);
|
||||
Monat=Datum.substring(3,5);
|
||||
Jahr=Datum.substring(6,10);
|
||||
var checkedDay = Jahr + "-" + Monat + "-" + Tag;
|
||||
checkBisverwendung(checkedDay, uid);
|
||||
}
|
||||
|
||||
function checkBisverwendung(day, uid)
|
||||
{
|
||||
$.ajax({
|
||||
url: "zeitaufzeichnung_bisverwendung.php",
|
||||
data: {
|
||||
day: day,
|
||||
uid: uid
|
||||
},
|
||||
success: function (result)
|
||||
{
|
||||
if (result==\'true\')
|
||||
{
|
||||
$("#homeofficeBlock").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#homeofficeBlock").hide();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -806,6 +923,39 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$zeit->projektphase_id = $data[7];
|
||||
if (isset($data[8]))
|
||||
$zeit->service_id = $data[8];
|
||||
if (isset($data[9]))
|
||||
{
|
||||
if (strtolower($data[9] == 'true'))
|
||||
{
|
||||
// check, ob homeoffice gemäß Bisverwendung
|
||||
$verwendung = new bisverwendung();
|
||||
$verwendung->getVerwendungDatum($data[0],$vonCSV);
|
||||
|
||||
foreach ($verwendung->result as $v)
|
||||
// echo "homeoffice für Tag " . $vonCSV . " ". $v->homeoffice . " " . $v->bisverwendung_id . "<br>";
|
||||
|
||||
if ($v->homeoffice)
|
||||
{
|
||||
|
||||
// echo "homeoffice erlaubt <br>";
|
||||
$zeit->homeoffice = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span style="color:orange"><b>'.$p->t("zeitaufzeichnung/homeofficeNichtErlaubt", ($vonCSV)) .'</b></span><br>';
|
||||
|
||||
$zeit->homeoffice = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeit->homeoffice = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeit->homeoffice = false;
|
||||
}
|
||||
$tag = $datum->formatDatum($data[2], $format='Y-m-d');
|
||||
|
||||
if(!in_array($tag, $importtage_array))
|
||||
@@ -829,6 +979,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$pause->start = $ende_vorher;
|
||||
$pause->ende = $zeit->start;
|
||||
$pause->beschreibung = '';
|
||||
$pause->homeoffice = $homeoffice;
|
||||
if(!$pause->save())
|
||||
{
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg.'</b></span><br>';
|
||||
@@ -908,6 +1059,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$zeit->updatevon = $user;
|
||||
$zeit->projekt_kurzbz = $projekt_kurzbz;
|
||||
$zeit->projektphase_id = $projektphase_id;
|
||||
$zeit->homeoffice = $homeoffice;
|
||||
$zeit->service_id = $service_id;
|
||||
$zeit->kunde_uid = $kunde_uid;
|
||||
$saveerror = 0;
|
||||
@@ -924,8 +1076,10 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
}
|
||||
elseif (!$projectphase->checkProjectphaseInCorrectTime($projektphase_id, $datum->formatDatum($von, $format='Y-m-d'), $datum->formatDatum($bis, $format='Y-m-d')))
|
||||
{
|
||||
echo '<span style="color:red"><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt.</b></span><br>';
|
||||
echo '<p id="triggerPhasenReset"><span style="color:red" ><b>'.$p->t("global/fehlerBeimSpeichernDerDaten").':
|
||||
Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt.</b></span></p><br>';
|
||||
$saveerror = 1;
|
||||
|
||||
}
|
||||
elseif (abs($von-$bis)>0 && $aktivitaet_kurzbz!="DienstreiseMT")
|
||||
{
|
||||
@@ -968,6 +1122,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import']))
|
||||
$pause->insertvon = $user;
|
||||
$pause->uid = $user;
|
||||
$pause->aktivitaet_kurzbz = 'Pause';
|
||||
$pause->homeoffice = $homeoffice;
|
||||
$pause->start = $datum->formatDatum($von_pause, $format='Y-m-d H:i:s');
|
||||
$pause->ende = $datum->formatDatum($bis_pause, $format='Y-m-d H:i:s');
|
||||
$pause->beschreibung = '';
|
||||
@@ -1055,13 +1210,12 @@ else
|
||||
echo '<b> </b>';
|
||||
|
||||
//Laden der Daten zum aendern
|
||||
if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
if (isset($_GET['type']) && $_GET['type'] == 'edit')
|
||||
{
|
||||
$zeit = new zeitaufzeichnung();
|
||||
|
||||
if($zeit->load($zeitaufzeichnung_id))
|
||||
if ($zeit->load($zeitaufzeichnung_id))
|
||||
{
|
||||
if($zeit->uid==$user)
|
||||
if ($zeit->uid == $user)
|
||||
{
|
||||
$uid = $zeit->uid;
|
||||
$aktivitaet_kurzbz = $zeit->aktivitaet_kurzbz;
|
||||
@@ -1072,13 +1226,15 @@ if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
$oe_kurzbz_2 = $zeit->oe_kurzbz_2;
|
||||
$projekt_kurzbz = $zeit->projekt_kurzbz;
|
||||
$projektphase_id = $zeit->projektphase_id;
|
||||
$homeoffice = $zeit->homeoffice;
|
||||
$homeoffice[0] == 't' ? $homeofficeChecked = 'checked' : $homeofficeChecked = '';
|
||||
$service_id = $zeit->service_id;
|
||||
$kunde_uid = $zeit->kunde_uid;
|
||||
|
||||
$projektphase = new projektphase();
|
||||
|
||||
$projektphasen = array();
|
||||
if($projektphase->getProjektphasen($projekt_kurzbz))
|
||||
|
||||
if ($projektphase->getProjectphaseForMitarbeiterByKurzBz($uid, $projekt_kurzbz))
|
||||
{
|
||||
foreach ($projektphase->result as $row)
|
||||
{
|
||||
@@ -1089,15 +1245,16 @@ if(isset($_GET['type']) && $_GET['type']=='edit')
|
||||
else
|
||||
{
|
||||
echo "<b>".$p->t("global/keineBerechtigungZumAendernDesDatensatzes")."</b>";
|
||||
$zeitaufzeichnung_id='';
|
||||
$zeitaufzeichnung_id = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Projekte holen zu denen der Benutzer zugeteilt ist
|
||||
$projekt = new projekt();
|
||||
|
||||
if($projekt->getProjekteMitarbeiter($user, true))
|
||||
if ($projekt->getProjekteMitarbeiter($user, true))
|
||||
{
|
||||
//if(count($projekt->result)>0)
|
||||
//{
|
||||
@@ -1324,36 +1481,48 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($row_projekt->projekt_kurzbz).'" '.$selected.'>'.$db->convert_html_chars($row_projekt->titel).'</option>';
|
||||
}
|
||||
echo '</SELECT><!--<input type="button" value="'.$p->t("zeitaufzeichnung/uebersicht").'" onclick="loaduebersicht();">-->';
|
||||
|
||||
//Projektphase
|
||||
$showprojphases = isset($projektphasen) && is_array($projektphasen) && count($projektphasen) > 0 && $projektfound;
|
||||
$hiddentext = $showprojphases ? "" : " style='display:none'";
|
||||
|
||||
echo
|
||||
'<span id="projektphaseformgroup"'.$hiddentext.'> '.
|
||||
$p->t("zeitaufzeichnung/projektphase").'
|
||||
<SELECT name="projektphase" id="projektphase">
|
||||
<OPTION value="" id="projektphasekeineausw">-- '.$p->t('zeitaufzeichnung/keineAuswahl').' --</OPTION>';
|
||||
|
||||
if ($showprojphases)
|
||||
{
|
||||
foreach ($projektphasen as $projektphase)
|
||||
{
|
||||
if ($projektphase_id == $projektphase->projektphase_id/* || $filter == $row_projekt->projekt_kurzbz*/)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung).'</option>';
|
||||
}
|
||||
echo '</SELECT></span>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '</SELECT><!--<input type="button" value="'.$p->t("zeitaufzeichnung/uebersicht").'" onclick="loaduebersicht();">-->';
|
||||
|
||||
if ($za_simple == 0)
|
||||
//Projektphase
|
||||
$showprojphases = isset($projektphasen) && is_array($projektphasen) && count($projektphasen) > 0 && $projektfound;
|
||||
$hiddentext = $showprojphases ? "" : " style='display:none'";
|
||||
|
||||
echo
|
||||
'<span id="projektphaseformgroup"'.$hiddentext.'> '.
|
||||
$p->t("zeitaufzeichnung/projektphase").'
|
||||
<SELECT name="projektphase" id="projektphase">
|
||||
<OPTION value="" id="projektphasekeineausw">-- '.$p->t('zeitaufzeichnung/keineAuswahl').' --</OPTION>';
|
||||
|
||||
if ($showprojphases)
|
||||
{
|
||||
foreach ($projektphasen as $projektphase)
|
||||
{
|
||||
if (($projektphase->start != "" ) && ($projektphase->ende != " "))
|
||||
{
|
||||
$phasentext = " (". $datum->formatDatum($projektphase->start, 'd.m.Y'). " - ".
|
||||
$datum->formatDatum($projektphase->ende, 'd.m.Y'). ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
$phasentext = '';
|
||||
}
|
||||
|
||||
if ($projektphase_id == $projektphase->projektphase_id/* || $filter == $row_projekt->projekt_kurzbz*/)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($projektphase->projektphase_id).'" '.$selected.'>'.$db->convert_html_chars($projektphase->bezeichnung). $phasentext.'</option>';
|
||||
}
|
||||
echo '</SELECT></span>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
||||
echo "<input type ='hidden' value='$user'id=uidpass>";
|
||||
|
||||
if ($za_simple == 0)
|
||||
{
|
||||
// Service
|
||||
echo '<tr>
|
||||
@@ -1402,6 +1571,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
$von_ts = $datum->mktime_fromtimestamp($datum->formatDatum($von, $format='Y-m-d H:i:s'));
|
||||
$bis_ts = $datum->mktime_fromtimestamp($datum->formatDatum($bis, $format='Y-m-d H:i:s'));
|
||||
$diff = $bis_ts - $von_ts;
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$p->t("global/von").' - '.$p->t("global/bis").'</td>
|
||||
@@ -1444,6 +1614,20 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
//Homeoffice Checkbox
|
||||
echo '
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td colspan="1">
|
||||
<span id="homeofficeBlock">
|
||||
<input type="checkbox" name="homeoffice" id="homeoffice" '. $homeofficeChecked . '>Homeoffice</input>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
';
|
||||
|
||||
//Beschreibung
|
||||
echo '<tr><td>'.$p->t("global/beschreibung").'</td><td colspan="3"><textarea style="font-size: 13px" name="beschreibung" cols="60" maxlength="256">'.$db->convert_html_chars($beschreibung).'</textarea></td></tr>';
|
||||
echo '<tr><td></td><td></td><td></td><td align="right">';
|
||||
@@ -1505,7 +1689,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
echo '<a href="?normal" style="text-decoration:none"><input type="button" value="'.$p->t('zeitaufzeichnung/xTageAnsicht', array($angezeigte_tage)).'"></a>';
|
||||
else
|
||||
echo '<a href="?alle" style="text-decoration:none"><input type="button" value="'.$p->t('zeitaufzeichnung/alleAnzeigen').'"></a>';
|
||||
//echo '<input type="submit" value="'.($alle===true?$p->t('zeitaufzeichnung/xTageAnsicht', array($angezeigte_tage)):$p->t('zeitaufzeichnung/alleAnzeigen')).'" name="'.($alle===true?'normal':'alle').'">';
|
||||
//echo '<input type="submit" value="'.($alle===true?$p->t('zeitaufzeichnung/xTageAnsicht', array(fehlt!)):$p->t('zeitaufzeichnung/alleAnzeigen')).'" name="'.($alle===true?'normal':'alle').'">';
|
||||
|
||||
$za = new zeitaufzeichnung();
|
||||
if(isset($_GET['filter']))
|
||||
@@ -1621,6 +1805,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
elseif ($tagessaldo > 18000 && $tagessaldo < 19800 && $pausesumme < $tagessaldo - 18000)
|
||||
$pausefehlt_str = '<span style="color:red; font-weight:bold;">-- Pause fehlt oder zu kurz --</span>';
|
||||
|
||||
|
||||
$tagessaldo = date('H:i', ($tagessaldo));
|
||||
$colspan = ($za_simple)?6:8;
|
||||
echo '<tr id="tag_row_'.$datum->formatDatum($tag,'d_m_Y').'"><td '.$style.' colspan="'.$colspan.'")>';
|
||||
@@ -1770,6 +1955,11 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
$style = 'style="border-top: 3px solid #8DBDD8; border-bottom: 3px solid #8DBDD8"';
|
||||
if ($row->aktivitaet_kurzbz=='Pause' || $row->aktivitaet_kurzbz=='LehreExtern'|| $row->aktivitaet_kurzbz=='Ersatzruhe')
|
||||
$style .= ' style="color: grey;"';
|
||||
if($db->convert_html_chars($row->homeoffice)=='t')
|
||||
{
|
||||
$homeoffice = " - Homeoffice";
|
||||
}else
|
||||
$homeoffice="";
|
||||
$summe = $row->summe;
|
||||
$service = new service();
|
||||
$service->load($row->service_id);
|
||||
@@ -1785,7 +1975,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
{
|
||||
echo '<td '.$style.' > '.$db->convert_html_chars($row->oe_kurzbz_2).'</td>';
|
||||
}
|
||||
echo '<td '.$style.'>'.$db->convert_html_chars($row->aktivitaet_kurzbz).'</td>';
|
||||
echo '<td '.$style.'>'.$db->convert_html_chars($row->aktivitaet_kurzbz).($homeoffice).'</td>';
|
||||
if(!$za_simple)
|
||||
{
|
||||
echo '<td '.$style.' title = "'.$service->bezeichnung.'" > '.StringCut($db->convert_html_chars($service->bezeichnung),20,null,'...').' </td>';
|
||||
@@ -1919,8 +2109,8 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false)
|
||||
$datum = new datum();
|
||||
$csvData = array();
|
||||
//headers schreiben
|
||||
$csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'])
|
||||
: array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung']);
|
||||
$csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'], $fieldheadings['homeoffice'])
|
||||
: array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung'], $fieldheadings['homeoffice']);
|
||||
foreach ($rawdata as $zeitauf)
|
||||
{
|
||||
//Newline characters bei Beschreibung ersetzen
|
||||
@@ -1933,13 +2123,13 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false)
|
||||
if($za_simple)
|
||||
{
|
||||
$csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'),
|
||||
$bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung);
|
||||
$bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung, $zeitauf->homeoffice);
|
||||
}
|
||||
else
|
||||
{
|
||||
$servicebez = ($service->load($zeitauf->service_id))?$service->bezeichnung:"";
|
||||
$csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'), $bisdatum,
|
||||
$zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->oe_kurzbz_2, $zeitauf->aktivitaet_kurzbz, $servicebez, $zeitauf->kunde_uid, $beschreibung);
|
||||
$zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->oe_kurzbz_2, $zeitauf->aktivitaet_kurzbz, $servicebez, $zeitauf->kunde_uid, $beschreibung, $zeitauf->homeoffice);
|
||||
}
|
||||
}
|
||||
return $csvData;
|
||||
@@ -2014,7 +2204,7 @@ function getDataForProjectOverviewCSV($user)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
$titel = $prjp->projekt_kurzbz;
|
||||
$titel = $prjp->projekttitel;
|
||||
$projekt_kurzbz = $prjp->projekt_kurzbz;
|
||||
$projekt_phase = $prjp->bezeichnung;
|
||||
$projekt_phase_id = $prjp->projektphase_id;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Author: Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Checks, if there is the possibility for homeoffice for the given bisverwendung of
|
||||
* a certain date.
|
||||
*/
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/globals.inc.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/Excel/excel.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../include/zeitaufzeichnung.class.php');
|
||||
require_once('../../../include/projekt.class.php');
|
||||
require_once('../../../include/bisverwendung.class.php');
|
||||
|
||||
if ((isset($_GET['uid'])) && (isset($_GET['day'])))
|
||||
{
|
||||
$uid = get_uid();
|
||||
|
||||
//Wenn User Administrator ist und UID uebergeben wurde, dann die Zeitaufzeichnung
|
||||
//des uebergebenen Users anzeigen
|
||||
if (isset($_GET['uid']) && $_GET['uid'] != $uid)
|
||||
{
|
||||
$p = new phrasen();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if ($rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$uid = $_GET['uid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte'));
|
||||
}
|
||||
}
|
||||
|
||||
$day = $_GET['day'];
|
||||
|
||||
$verwendung = new bisverwendung();
|
||||
|
||||
$verwendung->getVerwendungDatum($uid, $day);
|
||||
$homeoffice = false;
|
||||
|
||||
foreach ($verwendung->result as $v)
|
||||
{
|
||||
if ($v->homeoffice)
|
||||
{
|
||||
$homeoffice = true;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($homeoffice);
|
||||
|
||||
}
|
||||
@@ -559,9 +559,11 @@ $totalworktimewidth = 13;
|
||||
$worktimewidth = 14;
|
||||
$timecolumnswidth = 2 * $daywidth + $totalworktimewidth + $worktimewidth;
|
||||
|
||||
if ($nrProjects < 1)//no projekts - merge all cells and write notice
|
||||
if ($nrProjects < 1) //no projekts - write notice
|
||||
{
|
||||
$projektnames[] = "Keine Projekte vorhanden";
|
||||
$worksheet =& $workbook->addWorksheet('Tabelle');
|
||||
$worksheet->setInputEncoding('utf-8');
|
||||
$worksheet->write(0,0,'Für diesen Zeitraum sind keine Projekte zugeordnet');
|
||||
}
|
||||
|
||||
foreach ($projektnames as $projektname)
|
||||
|
||||
@@ -1,18 +1,59 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Oliver Hacker <hacker@technikum-wien.at>
|
||||
Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/basis_db.class.php');
|
||||
require_once('../../../include/projektphase.class.php');
|
||||
require_once('../../../include/datum.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
//Wenn User Administrator ist und UID uebergeben wurde, dann die Phasen
|
||||
//des uebergebenen Users anzeigen
|
||||
if (isset($_GET['uid']) && $user != $_GET['uid'])
|
||||
{
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if ($rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$user = $_GET['uid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$p = new phrasen();
|
||||
die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte'));
|
||||
}
|
||||
}
|
||||
|
||||
$datum_obj = new datum();
|
||||
|
||||
if(isset($_GET['projekt_kurzbz'])) // TODO maybe check that phasen only shown if projekt is projekt of logged in user
|
||||
if (isset($_GET['projekt_kurzbz']))
|
||||
{
|
||||
$projekt_kurzbz = $_GET['projekt_kurzbz'];
|
||||
$projektphase = new projektphase();
|
||||
@@ -28,12 +69,12 @@ if(isset($_GET['projekt_kurzbz'])) // TODO maybe check that phasen only shown if
|
||||
array_push($pp_user_ids, $pp_user->projektphase_id);
|
||||
}
|
||||
|
||||
if($projektphase->getProjektphasen($projekt_kurzbz))
|
||||
if ($projektphase->getProjektphasen($projekt_kurzbz))
|
||||
{
|
||||
$result_obj = array();
|
||||
foreach($projektphase->result as $row)
|
||||
foreach ($projektphase->result as $row)
|
||||
{
|
||||
if(in_array($row->projektphase_id, $pp_user_ids))
|
||||
if (in_array($row->projektphase_id, $pp_user_ids))
|
||||
{
|
||||
$item['projektphase_id'] = $row->projektphase_id;
|
||||
$item['bezeichnung'] = $row->bezeichnung;
|
||||
|
||||
@@ -104,9 +104,11 @@ if(isset($_GET['show']))
|
||||
SELECT
|
||||
distinct on(tbl_frage.frage_id) *, tbl_gebiet.kurzbz as gebiet
|
||||
FROM
|
||||
testtool.tbl_frage
|
||||
JOIN testtool.tbl_ablauf USING(gebiet_id)
|
||||
JOIN testtool.tbl_frage_sprache USING(frage_id)
|
||||
testtool.tbl_frage ";
|
||||
if($stg_kz!='')
|
||||
$qry.=" JOIN testtool.tbl_ablauf USING(gebiet_id) ";
|
||||
|
||||
$qry.=" JOIN testtool.tbl_frage_sprache USING(frage_id)
|
||||
JOIN testtool.tbl_gebiet USING(gebiet_id)
|
||||
WHERE
|
||||
demo=false";
|
||||
|
||||
+736
-734
File diff suppressed because it is too large
Load Diff
+28
-1
@@ -332,6 +332,7 @@ if (isset($_POST['fileupload']))
|
||||
$dms_id = $_POST['dms_id'];
|
||||
$beschreibung = $_POST['beschreibung'];
|
||||
$schlagworte = $_POST['schlagworte'];
|
||||
$mimetype = isset($_POST['mimetype']) ? $_POST['mimetype'] : '';
|
||||
$cis_suche = isset($_POST['cis_suche']) ? true : false;
|
||||
$ext = pathinfo($_FILES['userfile']['name'], PATHINFO_EXTENSION);
|
||||
$filename = uniqid();
|
||||
@@ -363,7 +364,14 @@ if (isset($_POST['fileupload']))
|
||||
|
||||
$dms->insertamum = date('Y-m-d H:i:s');
|
||||
$dms->insertvon = $user;
|
||||
$dms->mimetype = finfo_file($finfo, $uploadfile); // Davor deprecated: $_FILES['userfile']['type'];
|
||||
if ($mimetype != '')
|
||||
{
|
||||
$dms->mimetype = $mimetype;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dms->mimetype = finfo_file($finfo, $uploadfile);
|
||||
}
|
||||
$dms->filename = $filename;
|
||||
$dms->name = $_FILES['userfile']['name'];
|
||||
$dms->beschreibung = $beschreibung;
|
||||
@@ -404,6 +412,7 @@ if (isset($_POST['action']) && $_POST['action'] == 'rename')
|
||||
$version = $_POST['version'];
|
||||
$beschreibung = $_POST['beschreibung'];
|
||||
$schlagworte = $_POST['schlagworte'];
|
||||
$mimetype = isset($_POST['mimetype']) ? $_POST['mimetype'] : '';
|
||||
$cis_suche = isset($_POST['cis_suche']) ? true : false;
|
||||
|
||||
$dms = new dms();
|
||||
@@ -413,6 +422,14 @@ if (isset($_POST['action']) && $_POST['action'] == 'rename')
|
||||
$dms->beschreibung = $beschreibung;
|
||||
$dms->schlagworte = $schlagworte;
|
||||
$dms->cis_suche = $cis_suche;
|
||||
if ($mimetype != '')
|
||||
{
|
||||
$dms->mimetype = $mimetype;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dms->mimetype = finfo_file($finfo, $uploadfile);
|
||||
}
|
||||
$dms->updateamum = date('Y-m-d H:i:s');
|
||||
$dms->updatevon = $user;
|
||||
|
||||
@@ -1012,6 +1029,10 @@ else
|
||||
<td>Schlagworte<br/>(Semikolon getrennt)</td>
|
||||
<td><textarea name="schlagworte" id="schlagworte-textarea" rows="2" cols="80" style="font-size: small;"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mimetype</td>
|
||||
<td><input type="text" name="mimetype" id="mimetype-input" size="50" maxlength="256" style="font-size: small;" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CIS-Suche</td>
|
||||
<td><input type="checkbox" id="cis_suche_checkbox" name="cis_suche"></td>
|
||||
@@ -1088,6 +1109,7 @@ function drawAllVersions($id)
|
||||
<th>CIS-Suche</th>
|
||||
<th>Kategorie</th>
|
||||
<th>Filename intern</th>
|
||||
<th>Mimetype</th>
|
||||
<th>Datum</th>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
@@ -1102,6 +1124,7 @@ function drawAllVersions($id)
|
||||
<td style="padding: 1px; vertical-align:middle">'.($dms_help->cis_suche == 'true'?'Ja':'Nein').'</td>
|
||||
<td style="padding: 1px; vertical-align:middle" align="center">'.$dms_help->kategorie_kurzbz.'</td>
|
||||
<td style="padding: 1px; vertical-align:middle" align="center">'.$dms_help->filename.'</td>
|
||||
<td style="padding: 1px; vertical-align:middle" align="center">'.$dms_help->mimetype.'</td>
|
||||
<td style="padding: 1px; vertical-align:middle">'.$dms_help->insertamum.'</td>
|
||||
<td style="padding: 1px; vertical-align:middle;">'.$dms_help->insertvon.'</td>
|
||||
<td style="padding: 1px; vertical-align:middle;">
|
||||
@@ -1568,6 +1591,10 @@ function drawRenameForm($dms_id, $version, $page = NULL, $dpp = NULL, $searching
|
||||
<td>Schlagworte<br/>(Semikolon getrennt):</td>
|
||||
<td><textarea name="schlagworte" rows="2" cols="80" style="font-size: small;">'.$dms->convert_html_chars($dms->schlagworte).'</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mimetype</td>
|
||||
<td><input type="text" name="mimetype" size="80" maxlength="256" style="font-size: small;" value="'.$dms->convert_html_chars($dms->mimetype).'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CIS-Suche:</td>
|
||||
<td><input type="checkbox" name="cis_suche" '.($dms->cis_suche == 'true'?'checked="checked"':'').'></td>
|
||||
|
||||
@@ -365,7 +365,7 @@ if(!$error)
|
||||
{
|
||||
if($row->summe>$max_stunden)
|
||||
{
|
||||
if(!$fixangestellt)
|
||||
if(!$fixangestellt && !$rechte->isBerechtigt('admin'))
|
||||
{
|
||||
if(!LehrauftragAufFirma($lem->mitarbeiter_uid))
|
||||
{
|
||||
@@ -624,7 +624,7 @@ if(!$error)
|
||||
if($row_std = $db->db_fetch_object($result_std))
|
||||
{
|
||||
//Grenze ueberschritten
|
||||
if($row_std->summe>=$max_stunden)
|
||||
if($row_std->summe>=$max_stunden && !$rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$return = false;
|
||||
$error = true;
|
||||
|
||||
@@ -159,7 +159,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/lehrveranstaltungnotenov
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#gruppen"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-treecol-lektoren" label="Lektoren" flex="5" hidden="false" persist="hidden, width, ordinal"
|
||||
<treecol id="lehrveranstaltung-treecol-lektoren" label="Lehrende" flex="5" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#lektoren"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
|
||||
@@ -181,6 +181,13 @@ if(!$error)
|
||||
$verwendung->azgrelevant = false;
|
||||
else
|
||||
$verwendung->azgrelevant = '';
|
||||
|
||||
if($_POST['homeoffice']=='true')
|
||||
$verwendung->homeoffice = true;
|
||||
elseif($_POST['homeoffice']=='false')
|
||||
$verwendung->homeoffice = false;
|
||||
else
|
||||
$verwendung->homeoffice = '';
|
||||
|
||||
if($verwendung->save())
|
||||
{
|
||||
|
||||
@@ -1234,6 +1234,7 @@ function MitarbeiterVerwendungSpeichern(dialog, bisverwendung_id, mitarbeiter_ui
|
||||
inkludierte_lehre = dialog.getElementById('mitarbeiter-verwendung-detail-textbox-inkludierte_lehre').value;
|
||||
zeitaufzeichnungspflichtig = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked;
|
||||
azgrelevant = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked;
|
||||
homeoffice = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-homeoffice').checked;
|
||||
|
||||
if(verwendung_code=='1')
|
||||
{
|
||||
@@ -1293,6 +1294,7 @@ function MitarbeiterVerwendungSpeichern(dialog, bisverwendung_id, mitarbeiter_ui
|
||||
req.add('inkludierte_lehre', inkludierte_lehre);
|
||||
req.add('zeitaufzeichnungspflichtig', zeitaufzeichnungspflichtig);
|
||||
req.add('azgrelevant', azgrelevant);
|
||||
req.add('homeoffice', homeoffice);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
inkludierte_lehre = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#inkludierte_lehre" ));
|
||||
zeitaufzeichnungspflichtig = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnungspflichtig" ));
|
||||
azgrelevant = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#azgrelevant" ));
|
||||
homeoffice = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#homeoffice" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,6 +90,7 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
|
||||
fixangestellt = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#fixangestellt" ));
|
||||
azgrelevant = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#azgrelevant" ));
|
||||
homeoffice = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#homeoffice" ));
|
||||
//neuer Datensatz wird angelegt
|
||||
MitarbeiterVerwendungDetailNeu='true';
|
||||
|
||||
@@ -121,6 +123,15 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
{
|
||||
azgrelevant='Ja';
|
||||
}
|
||||
|
||||
if (!homeoffice)
|
||||
{
|
||||
homeoffice='Nein';
|
||||
}
|
||||
else
|
||||
{
|
||||
homeoffice='Ja';
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('mitarbeiter-verwendung-detail-menulist-beschart1').value=ba1code;
|
||||
@@ -151,6 +162,11 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id)
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=false;
|
||||
else
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=true;
|
||||
|
||||
if(homeoffice=='Nein')
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-homeoffice').checked=false;
|
||||
else
|
||||
document.getElementById('mitarbeiter-verwendung-detail-checkbox-homeoffice').checked=true;
|
||||
MitarbeiterVerwendungDetailToggleHauptberuf();
|
||||
MitarbeiterVerwendungVerwendungChange();
|
||||
}
|
||||
|
||||
@@ -170,6 +170,10 @@ echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type
|
||||
<row>
|
||||
<label value="AZG-relevant" control="mitarbeiter-verwendung-detail-checkbox-azgrelevant"/>
|
||||
<checkbox id="mitarbeiter-verwendung-detail-checkbox-azgrelevant"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Homeoffice" control="mitarbeiter-verwendung-detail-checkbox-homeoffice"/>
|
||||
<checkbox id="mitarbeiter-verwendung-detail-checkbox-homeoffice"/>
|
||||
</row>
|
||||
<row>
|
||||
<spacer />
|
||||
|
||||
@@ -73,8 +73,16 @@ $rechte->getBerechtigungen($user);
|
||||
|
||||
if($studiengang_kz != '')
|
||||
{
|
||||
if(!$rechte->isBerechtigt('assistenz', $studiengang_kz, 's'))
|
||||
die($rechte->errormsg);
|
||||
$studiengang_kz_arr = explode(',',$studiengang_kz);
|
||||
foreach ($studiengang_kz_arr AS $kennzahl)
|
||||
{
|
||||
if (!is_numeric($kennzahl))
|
||||
{
|
||||
die($kennzahl.' is not an iteger value');
|
||||
}
|
||||
if(!$rechte->isBerechtigt('assistenz', $kennzahl, 's'))
|
||||
die($rechte->errormsg);
|
||||
}
|
||||
}
|
||||
elseif($oe_kurzbz!='')
|
||||
{
|
||||
@@ -162,7 +170,7 @@ JOIN lehre.tbl_lehreinheitmitarbeiter USING (lehreinheit_id)
|
||||
WHERE tbl_lehreinheit.studiensemester_kurzbz = ".$db->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
if($studiengang_kz!='')
|
||||
$qry.=" AND tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER);
|
||||
$qry.=" AND tbl_lehrveranstaltung.studiengang_kz IN (".$studiengang_kz.")";
|
||||
|
||||
if($oe_kurzbz!='')
|
||||
$qry.=" AND tbl_lehrveranstaltung.oe_kurzbz=".$db->db_add_param($oe_kurzbz);
|
||||
@@ -421,7 +429,7 @@ if($result = $db->db_query($qry))
|
||||
$qry.=" AND tbl_lehrveranstaltung.oe_kurzbz=".$db->db_add_param($oe_kurzbz);
|
||||
|
||||
if($studiengang_kz!='')
|
||||
$qry.=" AND tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER);
|
||||
$qry.=" AND tbl_lehrveranstaltung.studiengang_kz IN(".$studiengang_kz.")";
|
||||
|
||||
if($semester!='')
|
||||
$qry.=" AND tbl_lehrveranstaltung.semester=".$db->db_add_param($semester, FHC_INTEGER);
|
||||
|
||||
@@ -48,6 +48,7 @@ class bisverwendung extends basis_db
|
||||
public $inkludierte_lehre;
|
||||
public $zeitaufzeichnungspflichtig;
|
||||
public $azgrelevant;
|
||||
public $homeoffice;
|
||||
|
||||
public $ba1bez;
|
||||
public $ba2bez;
|
||||
@@ -124,6 +125,7 @@ class bisverwendung extends basis_db
|
||||
$this->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$this->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$this->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -257,13 +259,22 @@ class bisverwendung extends basis_db
|
||||
{
|
||||
$azgrelevant = 'null';
|
||||
}
|
||||
if(is_bool($this->homeoffice))
|
||||
{
|
||||
$homeoffice = $this->db_add_param($this->homeoffice, FHC_BOOLEAN);
|
||||
}
|
||||
else
|
||||
{
|
||||
$homeoffice = 'null';
|
||||
}
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = "BEGIN;INSERT INTO bis.tbl_bisverwendung (ba1code, ba2code, beschausmasscode,
|
||||
verwendung_code, mitarbeiter_uid, hauptberufcode, hauptberuflich, habilitation, beginn, ende, vertragsstunden,
|
||||
updateamum, updatevon, insertamum, insertvon, dv_art, inkludierte_lehre, zeitaufzeichnungspflichtig, azgrelevant) VALUES (".
|
||||
updateamum, updatevon, insertamum, insertvon, dv_art, inkludierte_lehre, zeitaufzeichnungspflichtig,
|
||||
azgrelevant, homeoffice) VALUES (".
|
||||
$this->db_add_param($this->ba1code, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->ba2code, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->beschausmasscode, FHC_INTEGER).', '.
|
||||
@@ -282,7 +293,8 @@ class bisverwendung extends basis_db
|
||||
$this->db_add_param($this->dv_art).','.
|
||||
$this->db_add_param($this->inkludierte_lehre).','.
|
||||
$zeitaufzeichnungspflichtig.','.
|
||||
$azgrelevant. ');';
|
||||
$azgrelevant.','.
|
||||
$homeoffice. ');';
|
||||
|
||||
}
|
||||
else
|
||||
@@ -307,7 +319,8 @@ class bisverwendung extends basis_db
|
||||
" dv_art=".$this->db_add_param($this->dv_art).",".
|
||||
" inkludierte_lehre=".$this->db_add_param($this->inkludierte_lehre).",".
|
||||
" zeitaufzeichnungspflichtig=". $zeitaufzeichnungspflichtig.",".
|
||||
" azgrelevant =". $azgrelevant.
|
||||
" azgrelevant =". $azgrelevant.",".
|
||||
" homeoffice =". $homeoffice.
|
||||
" WHERE bisverwendung_id=".$this->db_add_param($this->bisverwendung_id, FHC_INTEGER);
|
||||
}
|
||||
|
||||
@@ -401,6 +414,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
@@ -458,6 +472,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -517,6 +532,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -571,6 +587,7 @@ class bisverwendung extends basis_db
|
||||
$this->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$this->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$this->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -625,6 +642,7 @@ class bisverwendung extends basis_db
|
||||
$this->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$this->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$this->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -688,6 +706,7 @@ class bisverwendung extends basis_db
|
||||
$obj->inkludierte_lehre = $row->inkludierte_lehre;
|
||||
$obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig);
|
||||
$obj->azgrelevant = $this->db_parse_bool($row->azgrelevant);
|
||||
$obj->homeoffice = $this->db_parse_bool($row->homeoffice);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 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 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Manuela Thamer <manuela.thamer@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__). '/basis_db.class.php');
|
||||
require_once(dirname(__FILE__). '/sprache.class.php');
|
||||
require_once(dirname(__FILE__). '/functions.inc.php');
|
||||
|
||||
class lehrmodus extends basis_db
|
||||
{
|
||||
//Objekt Lehrmodus
|
||||
public $result = array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $lehrmodus_kurzbz;
|
||||
public $bezeichnung_mehrsprachig;
|
||||
public $aktiv;
|
||||
|
||||
/**
|
||||
* Konstruktor - Laedt optional einen Lehrmodus
|
||||
* @param lehrmodus_kurbz Lehrmodus der geladen werden soll
|
||||
*/
|
||||
public function __construct($lehrmodus_kurzbz = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($lehrmodus_kurzbz != null)
|
||||
$this->load($lehrmodus_kurzbz);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert alle Lehrmodi aus der table tbl_lehrmodus
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$sprache = new sprache();
|
||||
$qry = "SELECT *, ".$sprache->getSprachQuery('bezeichnung_mehrsprachig')."
|
||||
FROM lehre.tbl_lehrmodus";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$lehrmodus = new lehrmodus();
|
||||
|
||||
$lehrmodus->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lehrmodus->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$lehrmodus->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
|
||||
$this->result[] = $lehrmodus;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt einen Lehrmodus
|
||||
* @param lehrmodus_kurzbz ID des Datensatzes der zu laden ist
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($lehrmodus_kurzbz)
|
||||
{
|
||||
$sprache = new sprache();
|
||||
$qry = "SELECT
|
||||
*,".$sprache->getSprachQuery('bezeichnung_mehrsprachig')."
|
||||
FROM
|
||||
lehre.tbl_lehrmodus
|
||||
WHERE
|
||||
lehrmodus_kurzbz=".$this->db_add_param($lehrmodus_kurzbz).";";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Lesen vom Lehrmodus';
|
||||
return false;
|
||||
}
|
||||
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$this->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig',$row);
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Es ist kein Lehrmodus mit dieser ID vorhanden';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Baut die Datenstruktur für senden als JSON Objekt auf
|
||||
*/
|
||||
// public function cleanResult()
|
||||
// {
|
||||
// $data = array();
|
||||
// if(count($this->result)>0)
|
||||
// {
|
||||
// foreach ($this->result as $lm)
|
||||
// {
|
||||
// $obj = new stdClass();
|
||||
// $obj->lehrmodus_kurzbz = $lm->lehrmodus_kurzbz;
|
||||
// $data[] = $obj;
|
||||
// }
|
||||
// }
|
||||
// return $data;
|
||||
// }
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -58,6 +58,7 @@ class lehrveranstaltung extends basis_db
|
||||
public $bezeichnung_english; // varchar(256)
|
||||
public $orgform_kurzbz; // varchar(3)
|
||||
public $lehrtyp_kurzbz; // varchar(32)
|
||||
public $lehrmodus_kurzbz; //varchar(32)
|
||||
public $oe_kurzbz; // varchar(32)
|
||||
public $raumtyp_kurzbz; // varchar(16)
|
||||
public $anzahlsemester; // smallint
|
||||
@@ -68,6 +69,7 @@ class lehrveranstaltung extends basis_db
|
||||
public $farbe;
|
||||
public $lehrauftrag=true;
|
||||
|
||||
|
||||
public $studienplan_lehrveranstaltung_id;
|
||||
public $studienplan_lehrveranstaltung_id_parent;
|
||||
public $stpllv_pflicht=true;
|
||||
@@ -147,6 +149,7 @@ class lehrveranstaltung extends basis_db
|
||||
$this->bezeichnung_english = $row->bezeichnung_english;
|
||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$this->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$this->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$this->oe_kurzbz = $row->oe_kurzbz;
|
||||
$this->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$this->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -225,6 +228,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -258,10 +262,12 @@ class lehrveranstaltung extends basis_db
|
||||
* @param $sort smallint Sortierung
|
||||
* @param $oe_kurzbz string Organisationseinheit
|
||||
* @param $lehrtyp string lehrtyp_kurzbz
|
||||
* @param $lehrmodus string lehrmodus_kurzbz
|
||||
* @param $orgform string Organisationsform
|
||||
* @param $lehrmodus string lehrmodus_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load_lva($studiengang_kz=null, $semester = null, $lehreverzeichnis = null, $lehre = null, $aktiv = null, $sort = null, $oe_kurzbz=null, $lehrtyp=null, $orgform=null)
|
||||
public function load_lva($studiengang_kz=null, $semester = null, $lehreverzeichnis = null, $lehre = null, $aktiv = null, $sort = null, $oe_kurzbz=null, $lehrtyp=null, $lehrmodus=null, $orgform=null)
|
||||
{
|
||||
//Variablen pruefen
|
||||
if($semester == "null")
|
||||
@@ -320,6 +326,9 @@ class lehrveranstaltung extends basis_db
|
||||
if(!is_null($lehrtyp))
|
||||
$qry .= " AND lehrtyp_kurzbz=".$this->db_add_param($lehrtyp);
|
||||
|
||||
if(!is_null($lehrmodus))
|
||||
$qry .= " AND lehrmodus_kurzbz=".$this->db_add_param($lehrmodus);
|
||||
|
||||
if(!is_null($orgform) && $orgform!='')
|
||||
$qry .= " AND orgform_kurzbz=".$this->db_add_param($orgform);
|
||||
|
||||
@@ -369,6 +378,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -497,6 +507,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -578,6 +589,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -740,40 +752,41 @@ class lehrveranstaltung extends basis_db
|
||||
semester, ects, semesterstunden, anmerkung, lehre, lehreverzeichnis, aktiv, insertamum,
|
||||
insertvon, planfaktor, planlektoren, planpersonalkosten, plankostenprolektor, updateamum, updatevon, sort,
|
||||
zeugnis, projektarbeit, sprache, koordinator, bezeichnung_english, orgform_kurzbz, incoming, lehrtyp_kurzbz, oe_kurzbz,
|
||||
raumtyp_kurzbz, anzahlsemester, semesterwochen, lvnr, semester_alternativ, farbe,sws,lvs,alvs,lvps,las,benotung,lvinfo, lehrauftrag) VALUES (' .
|
||||
$this->db_add_param($this->studiengang_kz) . ', ' .
|
||||
$this->db_add_param($this->bezeichnung) . ', ' .
|
||||
$this->db_add_param($this->kurzbz) . ', ' .
|
||||
$this->db_add_param($this->lehrform_kurzbz) . ', ' .
|
||||
$this->db_add_param($this->semester) . ', ' .
|
||||
$this->db_add_param($this->ects) . ', ' .
|
||||
$this->db_add_param($this->semesterstunden) . ', ' .
|
||||
$this->db_add_param($this->anmerkung) . ', ' .
|
||||
$this->db_add_param($this->lehre, FHC_BOOLEAN) . ',' .
|
||||
$this->db_add_param($this->lehreverzeichnis) . ', ' .
|
||||
$this->db_add_param($this->aktiv, FHC_BOOLEAN) . ', ' .
|
||||
$this->db_add_param($this->insertamum) . ', ' .
|
||||
$this->db_add_param($this->insertvon) . ', ' .
|
||||
$this->db_add_param($this->planfaktor) . ', ' .
|
||||
$this->db_add_param($this->planlektoren) . ', ' .
|
||||
$this->db_add_param($this->planpersonalkosten) . ', ' .
|
||||
$this->db_add_param($this->plankostenprolektor) . ', ' .
|
||||
$this->db_add_param($this->updateamum) . ', ' .
|
||||
$this->db_add_param($this->updatevon) . ',' .
|
||||
$this->db_add_param($this->sort) . ',' .
|
||||
$this->db_add_param($this->zeugnis, FHC_BOOLEAN) . ',' .
|
||||
$this->db_add_param($this->projektarbeit, FHC_BOOLEAN) . ',' .
|
||||
$this->db_add_param($this->sprache) . ',' .
|
||||
$this->db_add_param($this->koordinator) . ',' .
|
||||
$this->db_add_param($this->bezeichnung_english) . ',' .
|
||||
$this->db_add_param($this->orgform_kurzbz) . ',' .
|
||||
$this->db_add_param($this->incoming) . ',' .
|
||||
$this->db_add_param($this->lehrtyp_kurzbz) . ',' .
|
||||
$this->db_add_param($this->oe_kurzbz) . ',' .
|
||||
$this->db_add_param($this->raumtyp_kurzbz) . ',' .
|
||||
$this->db_add_param($this->anzahlsemester) . ',' .
|
||||
$this->db_add_param($this->semesterwochen) . ',' .
|
||||
$this->db_add_param($this->lvnr) .','.
|
||||
raumtyp_kurzbz, anzahlsemester, semesterwochen, lvnr, semester_alternativ, farbe,sws,lvs,alvs,lvps,las,benotung,lvinfo,
|
||||
lehrauftrag, lehrmodus_kurzbz) VALUES ('.
|
||||
$this->db_add_param($this->studiengang_kz). ', '.
|
||||
$this->db_add_param($this->bezeichnung). ', '.
|
||||
$this->db_add_param($this->kurzbz). ', '.
|
||||
$this->db_add_param($this->lehrform_kurzbz). ', '.
|
||||
$this->db_add_param($this->semester). ', '.
|
||||
$this->db_add_param($this->ects). ', '.
|
||||
$this->db_add_param($this->semesterstunden). ', '.
|
||||
$this->db_add_param($this->anmerkung). ', '.
|
||||
$this->db_add_param($this->lehre, FHC_BOOLEAN). ','.
|
||||
$this->db_add_param($this->lehreverzeichnis). ', '.
|
||||
$this->db_add_param($this->aktiv, FHC_BOOLEAN). ', '.
|
||||
$this->db_add_param($this->insertamum). ', '.
|
||||
$this->db_add_param($this->insertvon). ', '.
|
||||
$this->db_add_param($this->planfaktor). ', '.
|
||||
$this->db_add_param($this->planlektoren). ', '.
|
||||
$this->db_add_param($this->planpersonalkosten). ', '.
|
||||
$this->db_add_param($this->plankostenprolektor). ', '.
|
||||
$this->db_add_param($this->updateamum). ', '.
|
||||
$this->db_add_param($this->updatevon). ','.
|
||||
$this->db_add_param($this->sort). ','.
|
||||
$this->db_add_param($this->zeugnis, FHC_BOOLEAN). ','.
|
||||
$this->db_add_param($this->projektarbeit, FHC_BOOLEAN). ','.
|
||||
$this->db_add_param($this->sprache). ','.
|
||||
$this->db_add_param($this->koordinator). ','.
|
||||
$this->db_add_param($this->bezeichnung_english). ','.
|
||||
$this->db_add_param($this->orgform_kurzbz). ','.
|
||||
$this->db_add_param($this->incoming).','.
|
||||
$this->db_add_param($this->lehrtyp_kurzbz).','.
|
||||
$this->db_add_param($this->oe_kurzbz). ','.
|
||||
$this->db_add_param($this->raumtyp_kurzbz). ','.
|
||||
$this->db_add_param($this->anzahlsemester). ','.
|
||||
$this->db_add_param($this->semesterwochen). ','.
|
||||
$this->db_add_param($this->lvnr).','.
|
||||
$this->db_add_param($this->semester_alternativ).','.
|
||||
$this->db_add_param($this->farbe).','.
|
||||
$this->db_add_param($this->sws).','.
|
||||
@@ -783,7 +796,8 @@ class lehrveranstaltung extends basis_db
|
||||
$this->db_add_param($this->las).','.
|
||||
$this->db_add_param($this->benotung, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->lvinfo, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->lehrauftrag, FHC_BOOLEAN)
|
||||
$this->db_add_param($this->lehrauftrag, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->lehrmodus_kurzbz)
|
||||
.');';
|
||||
}
|
||||
else
|
||||
@@ -823,6 +837,7 @@ class lehrveranstaltung extends basis_db
|
||||
'bezeichnung_english=' . $this->db_add_param($this->bezeichnung_english) . ',' .
|
||||
'orgform_kurzbz=' . $this->db_add_param($this->orgform_kurzbz) . ',' .
|
||||
'lehrtyp_kurzbz=' . $this->db_add_param($this->lehrtyp_kurzbz) . ',' .
|
||||
'lehrmodus_kurzbz=' . $this->db_add_param($this->lehrmodus_kurzbz) . ',' .
|
||||
'oe_kurzbz=' . $this->db_add_param($this->oe_kurzbz) . ',' .
|
||||
'raumtyp_kurzbz=' . $this->db_add_param($this->raumtyp_kurzbz) . ',' .
|
||||
'anzahlsemester=' . $this->db_add_param($this->anzahlsemester, FHC_INTEGER) . ',' .
|
||||
@@ -936,6 +951,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -1029,6 +1045,7 @@ class lehrveranstaltung extends basis_db
|
||||
$l->bezeichnung_english = $row->bezeichnung_english;
|
||||
$l->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$l->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$l->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$l->oe_kurzbz = $row->oe_kurzbz;
|
||||
$l->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$l->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -1111,6 +1128,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -1209,6 +1227,7 @@ class lehrveranstaltung extends basis_db
|
||||
$obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -1333,6 +1352,7 @@ class lehrveranstaltung extends basis_db
|
||||
$obj->ects = $lv->ects;
|
||||
$obj->semesterstunden = $lv->semesterstunden;
|
||||
$obj->lehrtyp_kurzbz = $lv->lehrtyp_kurzbz;
|
||||
$obj->lehrmodus_kurzbz = $lv->lehrmodus_kurzbz;
|
||||
$obj->studienplan_lehrveranstaltung_id = $lv->studienplan_lehrveranstaltung_id;
|
||||
$obj->stpllv_semester = $lv->stpllv_semester;
|
||||
$obj->stpllv_pflicht = $lv->stpllv_pflicht;
|
||||
@@ -1398,6 +1418,7 @@ class lehrveranstaltung extends basis_db
|
||||
$obj->semesterstunden = $lv->semesterstunden;
|
||||
$obj->studienplan_lehrveranstaltung_id = $lv->studienplan_lehrveranstaltung_id;
|
||||
$obj->lehrtyp_kurzbz = $lv->lehrtyp_kurzbz;
|
||||
$obj->lehrmodus_kurzbz = $lv->lehrmodus_kurzbz;
|
||||
$obj->stpllv_semester = $lv->stpllv_semester;
|
||||
$obj->stpllv_pflicht = $lv->stpllv_pflicht;
|
||||
$obj->stpllv_koordinator = $lv->stpllv_koordinator;
|
||||
@@ -1550,6 +1571,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->farbe = $row->farbe;
|
||||
$lv_obj->benotung = $this->db_parse_bool($row->benotung);
|
||||
$lv_obj->lvinfo = $this->db_parse_bool($row->lvinfo);
|
||||
@@ -1635,6 +1657,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->farbe = $row->farbe;
|
||||
$lv_obj->benotung = $this->db_parse_bool($row->benotung);
|
||||
$lv_obj->lvinfo = $this->db_parse_bool($row->lvinfo);
|
||||
@@ -1750,6 +1773,9 @@ class lehrveranstaltung extends basis_db
|
||||
if(!is_null($lehrtyp))
|
||||
$qry .= " AND lehrtyp_kurzbz=".$this->db_add_param($lehrtyp);
|
||||
|
||||
if(!is_null($lehrmodus))
|
||||
$qry .= " AND lehrmodus_kurzbz=".$this->db_add_param($lehrmodus);
|
||||
|
||||
if(!is_null($semester))
|
||||
$qry .= " AND semester=".$this->db_add_param ($semester);
|
||||
|
||||
@@ -1800,6 +1826,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->lvnr = $row->lvnr;
|
||||
$lv_obj->semester_alternativ = $row->semester_alternativ;
|
||||
$lv_obj->farbe = $row->farbe;
|
||||
@@ -1925,6 +1952,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -2051,6 +2079,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$lv_obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$lv_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$lv_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$lv_obj->anzahlsemester = $row->anzahlsemester;
|
||||
@@ -2272,6 +2301,11 @@ class lehrveranstaltung extends basis_db
|
||||
$qry.=" AND tbl_lehrveranstaltung.lehrtyp_kurzbz=" . $this->db_add_param($lehrtyp_kurzbz, FHC_STRING);
|
||||
}
|
||||
|
||||
if (!is_null($lehrmodus_kurzbz))
|
||||
{
|
||||
$qry.=" AND tbl_lehrveranstaltung.lehrmodus_kurzbz=" . $this->db_add_param($lehrmodus_kurzbz, FHC_STRING);
|
||||
}
|
||||
|
||||
if (!is_null($semester))
|
||||
{
|
||||
$qry.=" AND tbl_studienplan_lehrveranstaltung.semester=" . $this->db_add_param($semester, FHC_INTEGER);
|
||||
@@ -2315,6 +2349,7 @@ class lehrveranstaltung extends basis_db
|
||||
$obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
$obj->lehrmodus_kurzbz = $row->lehrmodus_kurzbz;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
$obj->anzahlsemester = $row->anzahlsemester;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
require_once(dirname(__FILE__).'/person.class.php');
|
||||
require_once(dirname(__FILE__).'/benutzer.class.php');
|
||||
require_once(dirname(__FILE__).'/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/udf.class.php');
|
||||
require_once(dirname(__FILE__).'/udf.class.php'); // required only to check if UDFs are defined
|
||||
|
||||
class mitarbeiter extends benutzer
|
||||
{
|
||||
|
||||
@@ -688,7 +688,7 @@ public function getFortschritt($projektphase_id)
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
DISTINCT tbl_projektphase.*
|
||||
DISTINCT tbl_projektphase.*,tbl_projekt.titel
|
||||
FROM
|
||||
fue.tbl_projektphase
|
||||
JOIN fue.tbl_projekt USING (projekt_kurzbz)
|
||||
@@ -718,6 +718,7 @@ public function getFortschritt($projektphase_id)
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->typ = $row->typ;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
$obj->projekttitel = $row->titel;
|
||||
$obj->start = $row->start;
|
||||
$obj->ende = $row->ende;
|
||||
$obj->personentage = $row->personentage;
|
||||
|
||||
@@ -185,7 +185,8 @@ class pruefungsanmeldung extends basis_db {
|
||||
$qry = 'SELECT * FROM campus.tbl_pruefungsanmeldung pa '
|
||||
. 'JOIN campus.tbl_pruefungstermin pt ON pa.pruefungstermin_id=pt.pruefungstermin_id '
|
||||
. 'JOIN campus.tbl_pruefung p ON p.pruefung_id=pt.pruefung_id '
|
||||
. 'WHERE uid='.$this->db_add_param($uid);
|
||||
. 'WHERE uid='.$this->db_add_param($uid) . ' '
|
||||
. 'AND p.storniert=false';
|
||||
|
||||
if($studiensemester_kurzbz != null)
|
||||
{
|
||||
|
||||
@@ -510,6 +510,7 @@ class statistik extends basis_db
|
||||
$this->html='';
|
||||
$this->csv='';
|
||||
$this->json=array();
|
||||
set_time_limit(60);
|
||||
|
||||
if($this->sql!='')
|
||||
{
|
||||
|
||||
+50
-18
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009 Technikum-Wien
|
||||
/* Copyright (C) 2009-2021 fhcomplete.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
@@ -15,11 +15,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Bison Paolo <bison@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/../config/global.config.inc.php');
|
||||
require_once(dirname(__FILE__).'/benutzerberechtigung.class.php');
|
||||
|
||||
/**
|
||||
* Used to export UDF in MS Excel format
|
||||
@@ -286,14 +286,21 @@ class UDF extends basis_db
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of associative arrays that contains the couple name and title related to an UDF
|
||||
* These data are retrived from the UDF definitions given as parameter
|
||||
*/
|
||||
private function _getUDFDefinition($jsons)
|
||||
{
|
||||
/**
|
||||
* Returns an array of associative arrays that contains the couple name and title related to an UDF
|
||||
* These data are retrived from the UDF definitions given as parameter
|
||||
*/
|
||||
private function _getUDFDefinition($jsons)
|
||||
{
|
||||
$names = array();
|
||||
$uid = get_uid(); // get the UID of the logged person
|
||||
|
||||
if ($uid == null) return names(); // if no logged then it is not possible to loads UDFs
|
||||
|
||||
// Gets the permissions for the logged user
|
||||
$berechtigung = new benutzerberechtigung();
|
||||
$berechtigung->getBerechtigungen($uid);
|
||||
|
||||
if ($jsons != null && ($jsonsDecoded = json_decode($jsons)) != null)
|
||||
{
|
||||
if (is_object($jsonsDecoded) || is_array($jsonsDecoded))
|
||||
@@ -305,27 +312,51 @@ class UDF extends basis_db
|
||||
|
||||
$this->_sortJsonSchemas($jsonsDecoded);
|
||||
|
||||
foreach($jsonsDecoded as $udfJsonShema)
|
||||
foreach ($jsonsDecoded as $udfJsonShema)
|
||||
{
|
||||
if (isset($udfJsonShema->name) && isset($udfJsonShema->title))
|
||||
// Checks if the requiredPermissions property exists
|
||||
if (isset($udfJsonShema->requiredPermissions))
|
||||
{
|
||||
$tmpArray = array('name' => $udfJsonShema->name, 'title' => $udfJsonShema->title);
|
||||
$isAllowed = false;
|
||||
|
||||
if (isset($udfJsonShema->type)
|
||||
&& ($udfJsonShema->type == 'dropdown' || $udfJsonShema->type == 'multipledropdown')
|
||||
&& isset($udfJsonShema->listValues) && isset($udfJsonShema->listValues->enum))
|
||||
// If requiredPermissions is an array check if at least one of the permissions belongs to the logged user
|
||||
if (is_array($udfJsonShema->requiredPermissions))
|
||||
{
|
||||
$tmpArray['enum'] = $udfJsonShema->listValues->enum;
|
||||
foreach ($udfJsonShema->requiredPermissions as $permission)
|
||||
{
|
||||
$isAllowed = $berechtigung->isBerechtigt($permission);
|
||||
if ($isAllowed === true) break;
|
||||
}
|
||||
}
|
||||
else // otherwise check it directly
|
||||
{
|
||||
$isAllowed = $berechtigung->isBerechtigt($udfJsonShema->requiredPermissions);
|
||||
}
|
||||
|
||||
$names[] = $tmpArray;
|
||||
}
|
||||
// If the logged user has at least one of the required permissions
|
||||
if ($isAllowed === true)
|
||||
{
|
||||
if (isset($udfJsonShema->name) && isset($udfJsonShema->title))
|
||||
{
|
||||
$tmpArray = array('name' => $udfJsonShema->name, 'title' => $udfJsonShema->title);
|
||||
|
||||
if (isset($udfJsonShema->type)
|
||||
&& ($udfJsonShema->type == 'dropdown' || $udfJsonShema->type == 'multipledropdown')
|
||||
&& isset($udfJsonShema->listValues) && isset($udfJsonShema->listValues->enum))
|
||||
{
|
||||
$tmpArray['enum'] = $udfJsonShema->listValues->enum;
|
||||
}
|
||||
|
||||
$names[] = $tmpArray;
|
||||
}
|
||||
} // otherwise this UDF is discarted because the requiredPermissions is mandatory
|
||||
} // otherwise this UDF is discarted because the requiredPermissions is mandatory
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $names;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads UDf titles from phrases
|
||||
@@ -374,3 +405,4 @@ class UDF extends basis_db
|
||||
return $titles;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ class zeitaufzeichnung extends basis_db
|
||||
public $ext_id; // bigint
|
||||
public $service_id; // integer
|
||||
public $kunde_uid; // varchar(32)
|
||||
public $homeoffice; // bool
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
@@ -104,6 +105,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->service_id = $row->service_id;
|
||||
$this->kunde_uid = $row->kunde_uid;
|
||||
$this->homeoffice = $row->homeoffice;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -203,7 +205,7 @@ class zeitaufzeichnung extends basis_db
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN;INSERT INTO campus.tbl_zeitaufzeichnung (uid, aktivitaet_kurzbz, start, ende, beschreibung,
|
||||
oe_kurzbz_1, oe_kurzbz_2, insertamum, insertvon, updateamum, updatevon, projekt_kurzbz, projektphase_id, service_id, kunde_uid) VALUES('.
|
||||
oe_kurzbz_1, oe_kurzbz_2, insertamum, insertvon, updateamum, updatevon, projekt_kurzbz, projektphase_id, service_id, homeoffice, kunde_uid) VALUES('.
|
||||
$this->db_add_param($this->uid).', '.
|
||||
$this->db_add_param($this->aktivitaet_kurzbz).', '.
|
||||
$this->db_add_param($this->start).', '.
|
||||
@@ -218,6 +220,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
$this->db_add_param($this->projektphase_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->service_id).', '.
|
||||
$this->db_add_param($this->homeoffice, FHC_BOOLEAN).', '.
|
||||
$this->db_add_param($this->kunde_uid).');';
|
||||
}
|
||||
else
|
||||
@@ -244,6 +247,7 @@ class zeitaufzeichnung extends basis_db
|
||||
' projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
' projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).', '.
|
||||
' service_id='.$this->db_add_param($this->service_id).', '.
|
||||
' homeoffice ='.$this->db_add_param($this->homeoffice, FHC_BOOLEAN).', '.
|
||||
' kunde_uid='.$this->db_add_param($this->kunde_uid).' '.
|
||||
'WHERE zeitaufzeichnung_id='.$this->db_add_param($this->zeitaufzeichnung_id, FHC_INTEGER, false);
|
||||
}
|
||||
@@ -349,6 +353,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
@@ -430,6 +435,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
@@ -491,6 +497,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
@@ -556,6 +563,7 @@ class zeitaufzeichnung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->homeoffice = $row->homeoffice;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->service_id = $row->service_id;
|
||||
$obj->kunde_uid = $row->kunde_uid;
|
||||
|
||||
@@ -7,6 +7,7 @@ $this->phrasen['zeitaufzeichnung/projekt']='Projekt';
|
||||
$this->phrasen['zeitaufzeichnung/projektphase']='Projektphase';
|
||||
$this->phrasen['zeitaufzeichnung/keineAuswahl']='keine Auswahl';
|
||||
$this->phrasen['zeitaufzeichnung/aktivitaet']='Aktivität';
|
||||
$this->phrasen['zeitaufzeichnung/homeoffice']='Homeoffice';
|
||||
$this->phrasen['zeitaufzeichnung/id']='ID';
|
||||
$this->phrasen['zeitaufzeichnung/user']='User';
|
||||
$this->phrasen['zeitaufzeichnung/start']='Start';
|
||||
@@ -63,3 +64,4 @@ $this->phrasen['zeitaufzeichnung/projektphase']='AP';
|
||||
$this->phrasen['zeitaufzeichnung/pauseEinfuegen']='Pause automatisch einfügen';
|
||||
$this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Zeitraum zu kurz für automatische Pause';
|
||||
$this->phrasen['zeitaufzeichnung/supportAnfragen']='<p><hr>Supportanfragen unter<br><a href="mailto:zeiterfassung@technikum-wien.at">zeiterfassung@technikum-wien.at</a></p>';
|
||||
$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice für den Tag %s nicht erlaubt';
|
||||
|
||||
@@ -7,6 +7,7 @@ $this->phrasen['zeitaufzeichnung/projekt']='Project';
|
||||
$this->phrasen['zeitaufzeichnung/projektphase']='Projectphase';
|
||||
$this->phrasen['zeitaufzeichnung/keineAuswahl']='no selection';
|
||||
$this->phrasen['zeitaufzeichnung/aktivitaet']='Activity';
|
||||
$this->phrasen['zeitaufzeichnung/homeoffice']='Homeoffice';
|
||||
$this->phrasen['zeitaufzeichnung/id']='ID';
|
||||
$this->phrasen['zeitaufzeichnung/user']='User';
|
||||
$this->phrasen['zeitaufzeichnung/start']='Start';
|
||||
@@ -63,3 +64,4 @@ $this->phrasen['zeitaufzeichnung/projektphase']='WP';
|
||||
$this->phrasen['zeitaufzeichnung/pauseEinfuegen']='insert break automatically';
|
||||
$this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Timeslot too short for automatic break.';
|
||||
$this->phrasen['zeitaufzeichnung/supportAnfragen']='<p><hr>Contact for support<br><a href="mailto:zeiterfassung@technikum-wien.at">zeiterfassung@technikum-wien.at</a></p>';
|
||||
$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice for day %s not allowed';
|
||||
|
||||
+14
-3
@@ -55,17 +55,27 @@ var FHC_UDFWidget = {
|
||||
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
FHC_DialogLib.alertSuccess('Done!');
|
||||
FHC_DialogLib.alertSuccess("Successfully saved");
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log(FHC_AjaxClient.getError(data));
|
||||
var msgError = "An error occurred while saving these fields:<br>";
|
||||
var errors = FHC_AjaxClient.getError(data);
|
||||
|
||||
for (var i = 0; i < errors.length; i++)
|
||||
{
|
||||
var error = errors[i];
|
||||
|
||||
msgError += FHC_AjaxClient.getError(error)+ "<br>";
|
||||
}
|
||||
|
||||
FHC_DialogLib.alertError(msgError);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
errorCallback: function(data, textStatus, jqXHR) {
|
||||
console.log('Contact the administrator');
|
||||
FHC_DialogLib.alertError("A generic error occurred, please contact the support");
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -98,3 +108,4 @@ $(document).ready(function() {
|
||||
FHC_UDFWidget.display();
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -94,6 +94,11 @@ function draw_row($row)
|
||||
$azgrelevant = $row->azgrelevant?'Ja':'Nein';
|
||||
else
|
||||
$azgrelevant = '';
|
||||
|
||||
if(is_bool($row->homeoffice))
|
||||
$homeoffice = $row->homeoffice?'Ja':'Nein';
|
||||
else
|
||||
$homeoffice = '';
|
||||
|
||||
echo '
|
||||
<RDF:li>
|
||||
@@ -125,6 +130,7 @@ function draw_row($row)
|
||||
<VERWENDUNG:inkludierte_lehre><![CDATA['.$row->inkludierte_lehre.']]></VERWENDUNG:inkludierte_lehre>
|
||||
<VERWENDUNG:zeitaufzeichnungspflichtig><![CDATA['.$zeitaufzeichnungspflichtig.']]></VERWENDUNG:zeitaufzeichnungspflichtig>
|
||||
<VERWENDUNG:azgrelevant><![CDATA['.$azgrelevant.']]></VERWENDUNG:azgrelevant>
|
||||
<VERWENDUNG:homeoffice><![CDATA['.$homeoffice.']]></VERWENDUNG:homeoffice>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
';
|
||||
|
||||
@@ -389,7 +389,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
echo "<bis>".$datum->convertISODate($row1->bis)."</bis>";
|
||||
echo "<zweck>$row1->zweck</zweck>";
|
||||
echo "<ort>$row1->ort</ort>";
|
||||
echo "<universitaet>$row1->universitaet</universitaet>";
|
||||
echo "<universitaet><![CDATA[$row1->universitaet]]></universitaet>";
|
||||
echo "</auslandssemesters>";
|
||||
}
|
||||
echo "</auslandssemester>";
|
||||
|
||||
+138
-26
@@ -404,6 +404,94 @@ function draw_prestudent($row)
|
||||
}
|
||||
}
|
||||
|
||||
function draw_empty_content()
|
||||
{
|
||||
echo '<RDF:li>
|
||||
<RDF:Description id="" about="" >
|
||||
<STUDENT:person_id><![CDATA[]]></STUDENT:person_id>
|
||||
<STUDENT:titelpre><![CDATA[]]></STUDENT:titelpre>
|
||||
<STUDENT:titelpost><![CDATA[]]></STUDENT:titelpost>
|
||||
<STUDENT:vornamen><![CDATA[]]></STUDENT:vornamen>
|
||||
<STUDENT:vorname><![CDATA[]]></STUDENT:vorname>
|
||||
<STUDENT:nachname><![CDATA[KEINE RESULTATE]]></STUDENT:nachname>
|
||||
<STUDENT:geburtsdatum><![CDATA[]]></STUDENT:geburtsdatum>
|
||||
<STUDENT:geburtsdatum_iso><![CDATA[]]></STUDENT:geburtsdatum_iso>
|
||||
<STUDENT:homepage><![CDATA[]]></STUDENT:homepage>
|
||||
<STUDENT:gebort><![CDATA[]]></STUDENT:gebort>
|
||||
<STUDENT:gebzeit><![CDATA[]]></STUDENT:gebzeit>
|
||||
<STUDENT:anmerkungen><![CDATA[]]></STUDENT:anmerkungen>
|
||||
<STUDENT:anrede><![CDATA[]]></STUDENT:anrede>
|
||||
<STUDENT:svnr><![CDATA[]]></STUDENT:svnr>
|
||||
<STUDENT:ersatzkennzeichen><![CDATA[]]></STUDENT:ersatzkennzeichen>
|
||||
<STUDENT:familienstand><![CDATA[]]></STUDENT:familienstand>
|
||||
<STUDENT:geschlecht><![CDATA[]]></STUDENT:geschlecht>
|
||||
<STUDENT:anzahlkinder><![CDATA[]]></STUDENT:anzahlkinder>
|
||||
<STUDENT:staatsbuergerschaft><![CDATA[]]></STUDENT:staatsbuergerschaft>
|
||||
<STUDENT:geburtsnation><![CDATA[]]></STUDENT:geburtsnation>
|
||||
<STUDENT:sprache><![CDATA[]]></STUDENT:sprache>
|
||||
<STUDENT:status><![CDATA[]]></STUDENT:status>
|
||||
<STUDENT:status_datum><![CDATA[]]></STUDENT:status_datum>
|
||||
<STUDENT:status_datum_iso><![CDATA[]]></STUDENT:status_datum_iso>
|
||||
<STUDENT:status_bestaetigung><![CDATA[]]></STUDENT:status_bestaetigung>
|
||||
<STUDENT:status_bestaetigung_iso><![CDATA[]]></STUDENT:status_bestaetigung_iso>
|
||||
<STUDENT:orgform><![CDATA[]]></STUDENT:orgform>
|
||||
<STUDENT:studienplan_bezeichnung><![CDATA[]]></STUDENT:studienplan_bezeichnung>
|
||||
<STUDENT:studienplan_id><![CDATA[]]></STUDENT:studienplan_id>
|
||||
<STUDENT:mail_privat><![CDATA[]]></STUDENT:mail_privat>
|
||||
<STUDENT:mail_intern><![CDATA[]]></STUDENT:mail_intern>
|
||||
<STUDENT:zugangscode><![CDATA[]]></STUDENT:zugangscode>
|
||||
<STUDENT:link_bewerbungstool><![CDATA[]]></STUDENT:link_bewerbungstool>
|
||||
|
||||
<STUDENT:aktiv><![CDATA[]]></STUDENT:aktiv>
|
||||
<STUDENT:uid><![CDATA[]]></STUDENT:uid>
|
||||
<STUDENT:matrikelnummer><![CDATA[]]></STUDENT:matrikelnummer>
|
||||
<STUDENT:alias><![CDATA[]]></STUDENT:alias>
|
||||
<STUDENT:semester><![CDATA[]]></STUDENT:semester>
|
||||
<STUDENT:verband><![CDATA[]]></STUDENT:verband>
|
||||
<STUDENT:gruppe><![CDATA[]]></STUDENT:gruppe>
|
||||
<STUDENT:studiengang_kz_student><![CDATA[]]></STUDENT:studiengang_kz_student>
|
||||
<STUDENT:matr_nr><![CDATA[]]></STUDENT:matr_nr>
|
||||
<STUDENT:studiengang_studiengangsleitung><![CDATA[]]></STUDENT:studiengang_studiengangsleitung>
|
||||
<STUDENT:anzahl_notizen><![CDATA[]]></STUDENT:anzahl_notizen>
|
||||
|
||||
<STUDENT:prestudent_id><![CDATA[]]></STUDENT:prestudent_id>
|
||||
<STUDENT:studiengang_kz_prestudent><![CDATA[]]></STUDENT:studiengang_kz_prestudent>
|
||||
<STUDENT:studiengang_kz><![CDATA[]]></STUDENT:studiengang_kz>
|
||||
<STUDENT:aufmerksamdurch_kurzbz><![CDATA[]]></STUDENT:aufmerksamdurch_kurzbz>
|
||||
<STUDENT:studiengang><![CDATA[]]></STUDENT:studiengang>
|
||||
<STUDENT:berufstaetigkeit_code><![CDATA[]]></STUDENT:berufstaetigkeit_code>
|
||||
<STUDENT:ausbildungcode><![CDATA[]]></STUDENT:ausbildungcode>
|
||||
<STUDENT:zgv_code><![CDATA[]]></STUDENT:zgv_code>
|
||||
<STUDENT:zgvort><![CDATA[]]></STUDENT:zgvort>
|
||||
<STUDENT:zgvdatum><![CDATA[]]></STUDENT:zgvdatum>
|
||||
<STUDENT:zgvdatum_iso><![CDATA[]]></STUDENT:zgvdatum_iso>
|
||||
<STUDENT:zgvnation><![CDATA[]]></STUDENT:zgvnation>
|
||||
<STUDENT:zgvmas_code><![CDATA[]]></STUDENT:zgvmas_code>
|
||||
<STUDENT:zgvmaort><![CDATA[]]></STUDENT:zgvmaort>
|
||||
<STUDENT:zgvmadatum><![CDATA[]]></STUDENT:zgvmadatum>
|
||||
<STUDENT:zgvmadatum_iso><![CDATA[]]></STUDENT:zgvmadatum_iso>
|
||||
<STUDENT:zgvmanation><![CDATA[]]></STUDENT:zgvmanation>
|
||||
<STUDENT:ausstellungsstaat><![CDATA[]]></STUDENT:ausstellungsstaat>
|
||||
<STUDENT:aufnahmeschluessel><![CDATA[]]></STUDENT:aufnahmeschluessel>
|
||||
<STUDENT:facheinschlberuf><![CDATA[]]></STUDENT:facheinschlberuf>
|
||||
<STUDENT:reihungstest_id><![CDATA[]]></STUDENT:reihungstest_id>
|
||||
<STUDENT:anmeldungreihungstest><![CDATA[]]></STUDENT:anmeldungreihungstest>
|
||||
<STUDENT:anmeldungreihungstest_iso><![CDATA[]]></STUDENT:anmeldungreihungstest_iso>
|
||||
<STUDENT:reihungstestangetreten><![CDATA[]]></STUDENT:reihungstestangetreten>
|
||||
<STUDENT:punkte><![CDATA[]]></STUDENT:punkte>
|
||||
<STUDENT:bismelden><![CDATA[]]></STUDENT:bismelden>
|
||||
<STUDENT:dual><![CDATA[]]></STUDENT:dual>
|
||||
<STUDENT:dual_bezeichnung><![CDATA[]]></STUDENT:dual_bezeichnung>
|
||||
<STUDENT:anmerkungpre><![CDATA[]]></STUDENT:anmerkungpre>
|
||||
<STUDENT:mentor><![CDATA[]]></STUDENT:mentor>
|
||||
<STUDENT:gsstudientyp_kurzbz><![CDATA[]]></STUDENT:gsstudientyp_kurzbz>
|
||||
<STUDENT:aufnahmegruppe_kurzbz><![CDATA[]]></STUDENT:aufnahmegruppe_kurzbz>
|
||||
<STUDENT:priorisierung><![CDATA[]]></STUDENT:priorisierung>
|
||||
<STUDENT:priorisierung_realtiv><![CDATA[]]></STUDENT:priorisierung_realtiv>
|
||||
</RDF:Description>
|
||||
</RDF:li>';
|
||||
}
|
||||
|
||||
// ******* Init **************************
|
||||
|
||||
|
||||
@@ -775,19 +863,22 @@ if($xmlformat=='rdf')
|
||||
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object())
|
||||
while ($row = $db->db_fetch_object())
|
||||
{
|
||||
$student=new student();
|
||||
if($uid = $student->getUid($row->prestudent_id))
|
||||
$student = new student();
|
||||
if ($uid = $student->getUid($row->prestudent_id))
|
||||
{
|
||||
//Wenn kein Eintrag fuers aktuelle Studiensemester da ist, dann
|
||||
//nochmal laden aber ohne studiensemester
|
||||
if(!$student->load($uid, $studiensemester_kurzbz))
|
||||
if (!$student->load($uid, $studiensemester_kurzbz))
|
||||
{
|
||||
$student->load($uid);
|
||||
}
|
||||
}
|
||||
$prestd = new prestudent();
|
||||
$prestd->load($row->prestudent_id);
|
||||
if($uid!='')
|
||||
|
||||
if ($uid != '')
|
||||
{
|
||||
draw_content($student);
|
||||
draw_prestudent($prestd);
|
||||
@@ -832,29 +923,38 @@ if($xmlformat=='rdf')
|
||||
matr_nr = ".$db->db_add_param($searchItems_string_orig)." OR
|
||||
svnr = ".$db->db_add_param($searchItems_string_orig).";";
|
||||
}
|
||||
if($db->db_query($qry))
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object())
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$student=new student();
|
||||
if($uid = $student->getUid($row->prestudent_id))
|
||||
draw_empty_content();
|
||||
}
|
||||
else
|
||||
{
|
||||
while ($row = $db->db_fetch_object())
|
||||
{
|
||||
//Wenn kein Eintrag fuers aktuelle Studiensemester da ist, dann
|
||||
//nochmal laden aber ohne studiensemester
|
||||
if(!$student->load($uid, $studiensemester_kurzbz))
|
||||
$student->load($uid);
|
||||
}
|
||||
$prestd = new prestudent();
|
||||
$prestd->load($row->prestudent_id);
|
||||
if($uid!='')
|
||||
{
|
||||
draw_content($student);
|
||||
draw_prestudent($prestd);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_content($prestd);
|
||||
draw_prestudent($prestd);
|
||||
$student = new student();
|
||||
if ($uid = $student->getUid($row->prestudent_id))
|
||||
{
|
||||
//Wenn kein Eintrag fuers aktuelle Studiensemester da ist, dann
|
||||
//nochmal laden aber ohne studiensemester
|
||||
if (!$student->load($uid, $studiensemester_kurzbz))
|
||||
{
|
||||
$student->load($uid);
|
||||
}
|
||||
}
|
||||
$prestd = new prestudent();
|
||||
$prestd->load($row->prestudent_id);
|
||||
if ($uid != '')
|
||||
{
|
||||
draw_content($student);
|
||||
draw_prestudent($prestd);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_content($prestd);
|
||||
draw_prestudent($prestd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -926,7 +1026,19 @@ else
|
||||
default: $typ = 'FH-Studiengang';
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM campus.vw_benutzer JOIN public.tbl_benutzerfunktion USING(uid) WHERE funktion_kurzbz='rek'";
|
||||
$qry = "SELECT *
|
||||
FROM PUBLIC.tbl_benutzerfunktion
|
||||
JOIN campus.vw_mitarbeiter USING (uid)
|
||||
WHERE funktion_kurzbz = 'rek'
|
||||
AND (
|
||||
tbl_benutzerfunktion.datum_von <= now()
|
||||
OR tbl_benutzerfunktion.datum_von IS NULL
|
||||
)
|
||||
AND (
|
||||
tbl_benutzerfunktion.datum_bis >= now()
|
||||
OR tbl_benutzerfunktion.datum_bis IS NULL
|
||||
)
|
||||
ORDER BY tbl_benutzerfunktion.insertamum DESC LIMIT 1";
|
||||
$rektor = '';
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
|
||||
@@ -154,6 +154,8 @@ foreach($uid_arr as $uid)
|
||||
echo "\t\t<studiengangSpracheEnglisch><![CDATA[".$studienplan_sprache_englisch."]]></studiengangSpracheEnglisch>";
|
||||
echo "\t\t<ects_gesamt><![CDATA[".$studienordnung->ects."]]></ects_gesamt>";
|
||||
echo "\t\t<ects_pro_semester><![CDATA[".($studienplan->regelstudiendauer!=0?$studienordnung->ects/$studienplan->regelstudiendauer:0)."]]></ects_pro_semester>";
|
||||
echo "\t\t<ects_gesamt_studienplan><![CDATA[".$studienplan->ects_stpl."]]></ects_gesamt_studienplan>";
|
||||
echo "\t\t<ects_pro_semester_studienplan><![CDATA[".($studienplan->regelstudiendauer!=0?$studienplan->ects_stpl/$studienplan->regelstudiendauer:0)."]]></ects_pro_semester_studienplan>";
|
||||
|
||||
echo "\t\t<aktuellesJahr><![CDATA[".date('Y')."]]></aktuellesJahr>";
|
||||
$status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,null,null))?$prestudent->status_kurzbz:'';
|
||||
|
||||
@@ -26,6 +26,8 @@ require_once('../include/basis_db.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/dvb.class.php');
|
||||
require_once('../include/errorhandler.class.php');
|
||||
require_once('../include/person.class.php');
|
||||
require_once('../include/adresse.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
@@ -63,12 +65,80 @@ $ausstellbehoerde = filter_input(INPUT_POST, 'ausstellbehoerde');
|
||||
$ausstellland = filter_input(INPUT_POST, 'ausstellland');
|
||||
$dokumentnr = filter_input(INPUT_POST, 'dokumentnr');
|
||||
|
||||
$getPersonData = filter_input(INPUT_POST, 'getPersonData', FILTER_VALIDATE_BOOLEAN);
|
||||
$data_person_id = filter_input(INPUT_POST, 'data_person_id');
|
||||
if ($getPersonData)
|
||||
{
|
||||
$person = new person($data_person_id);
|
||||
$adresse = new adresse();
|
||||
$adresse->loadZustellAdresse($person->person_id);
|
||||
$svnr = $person->svnr;
|
||||
if ($svnr == '' && $person->ersatzkennzeichen != '')
|
||||
{
|
||||
$svnr = $person->ersatzkennzeichen;
|
||||
}
|
||||
|
||||
echo json_encode(array(
|
||||
'status'=>'ok',
|
||||
'matrikelnummer'=>$person->matr_nr,
|
||||
'nachname'=>$person->nachname,
|
||||
'vorname'=>$person->vorname,
|
||||
'geburtsdatum'=>str_replace('-','',$person->gebdatum),
|
||||
'geschlecht'=>strtoupper($person->geschlecht),
|
||||
'postleitzahl'=>$adresse->plz,
|
||||
'staat'=>$adresse->nation,
|
||||
'sozialversicherungsnummer'=>$svnr
|
||||
));
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Datenverbund-Client</title>
|
||||
<script type="text/javascript" src="../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#getPersonDataButton').on('click', function ()
|
||||
{
|
||||
data = {
|
||||
data_person_id: $('#getPersonDataInput').val(),
|
||||
getPersonData: true
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: 'datenverbund_client.php',
|
||||
data: data,
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.status != 'ok') {
|
||||
alert(JSON.stringify(data));
|
||||
console.log(JSON.stringify(data));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('input[name="matrikelnummer"]').val(data.matrikelnummer);
|
||||
$('input[name="nachname"]').val(data.nachname);
|
||||
$('input[name="vorname"]').val(data.vorname);
|
||||
$('input[name="geburtsdatum"]').val(data.geburtsdatum);
|
||||
$('input[name="geschlecht"]').val(data.geschlecht);
|
||||
$('input[name="postleitzahl"]').val(data.postleitzahl);
|
||||
$('input[name="staat"]').val(data.staat);
|
||||
$('input[name="svnr"]').val(data.sozialversicherungsnummer);
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
alert(JSON.stringify(data));
|
||||
console.log(JSON.stringify(data));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<body>
|
||||
<h1>Testclient für Datenverbund-Webservice</h1>
|
||||
<ul>
|
||||
@@ -195,6 +265,7 @@ $dokumentnr = filter_input(INPUT_POST, 'dokumentnr');
|
||||
break;
|
||||
|
||||
case 'setMatrikelnummer':
|
||||
echo '<p><input id="getPersonDataInput" type="text" maxlength="10" size="10" placeholder="person_id"><button type="button" id="getPersonDataButton">Personendaten laden</button></p>';
|
||||
printSetMatrikelnrRows();
|
||||
printrow('staat', 'Staat', $staat, '1-3 Stellen Codex (zb A für Österreich)', 3);
|
||||
printrow('svnr', 'SVNR', $svnr);
|
||||
|
||||
+52
-15
@@ -173,7 +173,7 @@ class stip extends basis_db
|
||||
* Suche Studenten anhand PersonKz
|
||||
* @param $PersonKz
|
||||
*/
|
||||
function searchMatrikelnummerStg($Matrikelnummer, $StgKz)
|
||||
function searchMatrikelnummerStg($Matrikelnummer, $StgKz, $studSemester)
|
||||
{
|
||||
$qry = "SELECT
|
||||
prestudent_id, vorname, nachname, svnr, matrikelnr, student.studiengang_kz, person.matr_nr
|
||||
@@ -183,20 +183,35 @@ class stip extends basis_db
|
||||
JOIN public.tbl_person person using(person_id)
|
||||
WHERE
|
||||
person.matr_nr = ".$this->db_add_param($Matrikelnummer)."
|
||||
AND student.studiengang_kz=".$this->db_add_param(ltrim($StgKz,0)).";";
|
||||
AND student.studiengang_kz=".$this->db_add_param(ltrim($StgKz,0))."
|
||||
AND EXISTS(
|
||||
SELECT 1 FROM public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id=student.prestudent_id
|
||||
AND studiensemester_kurzbz=".$this->db_add_param($studSemester)."
|
||||
);";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
// wenn mehr als 1 Datensatz gefunden wird --> Fehler
|
||||
if($this->db_num_rows() == 1 )
|
||||
{
|
||||
$this->Vorname_Antwort = $row->vorname;
|
||||
$this->Familienname_Antwort = $row->nachname;
|
||||
$this->SVNR_Antwort = $row->svnr;
|
||||
$this->PersKz_Antwort = trim($row->matrikelnr);
|
||||
$this->StgKz_Antwort = str_pad($row->studiengang_kz, 4,'0', STR_PAD_LEFT);
|
||||
$this->Matrikelnummer_Antwort = $row->matr_nr;
|
||||
$this->AntwortStatusCode = 1;
|
||||
return $row->prestudent_id;
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->Vorname_Antwort = $row->vorname;
|
||||
$this->Familienname_Antwort = $row->nachname;
|
||||
$this->SVNR_Antwort = $row->svnr;
|
||||
$this->PersKz_Antwort = trim($row->matrikelnr);
|
||||
$this->StgKz_Antwort = str_pad($row->studiengang_kz, 4,'0', STR_PAD_LEFT);
|
||||
$this->Matrikelnummer_Antwort = $row->matr_nr;
|
||||
$this->AntwortStatusCode = 1;
|
||||
return $row->prestudent_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->AntwortStatusCode = 2;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,7 +230,7 @@ class stip extends basis_db
|
||||
* Suche Studenten anhand Sozialversicherungsnummer
|
||||
* @param $Svnr
|
||||
*/
|
||||
function searchSvnr($Svnr)
|
||||
function searchSvnr($Svnr, $StgKz, $studSemester)
|
||||
{
|
||||
$qry = "SELECT
|
||||
prestudent_id, vorname, nachname, svnr, matrikelnr, student.studiengang_kz, person.matr_nr
|
||||
@@ -223,7 +238,18 @@ class stip extends basis_db
|
||||
public.tbl_student student
|
||||
JOIN public.tbl_benutzer benutzer on(benutzer.uid=student.student_uid)
|
||||
JOIN public.tbl_person person using(person_id)
|
||||
WHERE person.svnr = ".$this->db_add_param($Svnr).";";
|
||||
WHERE person.svnr = ".$this->db_add_param($Svnr);
|
||||
|
||||
if ($StgKz != '')
|
||||
$qry.=" AND student.studiengang_kz=".$this->db_add_param($StgKz);
|
||||
|
||||
if ($studSemester != '')
|
||||
$qry.=" AND EXISTS(
|
||||
SELECT 1 FROM public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id=student.prestudent_id
|
||||
AND studiensemester_kurzbz=".$this->db_add_param($studSemester)."
|
||||
)";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
@@ -266,7 +292,7 @@ class stip extends basis_db
|
||||
* Suche Studenten anhand Vor- und Nachname
|
||||
* @param $Svnr
|
||||
*/
|
||||
function searchVorNachname($Vorname, $Nachname)
|
||||
function searchVorNachname($Vorname, $Nachname, $StgKz, $studSemester)
|
||||
{
|
||||
$qry = "SELECT
|
||||
prestudent_id, vorname, nachname, svnr, matrikelnr, student.studiengang_kz, person.matr_nr
|
||||
@@ -276,7 +302,18 @@ class stip extends basis_db
|
||||
JOIN public.tbl_person person using(person_id)
|
||||
WHERE
|
||||
person.vorname = ".$this->db_add_param($Vorname)."
|
||||
AND person.nachname = ".$this->db_add_param($Nachname).";";
|
||||
AND person.nachname = ".$this->db_add_param($Nachname);
|
||||
|
||||
if ($StgKz != '')
|
||||
$qry.=" AND student.studiengang_kz=".$this->db_add_param($StgKz);
|
||||
|
||||
if ($studSemester != '')
|
||||
$qry.=" AND EXISTS(
|
||||
SELECT 1 FROM public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id=student.prestudent_id
|
||||
AND studiensemester_kurzbz=".$this->db_add_param($studSemester)."
|
||||
)";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
|
||||
+3
-3
@@ -117,11 +117,11 @@ function GetStipendienbezieherStip($parameters)
|
||||
|
||||
if(!$prestudentID = $StipBezieher->searchPersonKz($BezieherStip->PersKz))
|
||||
{
|
||||
if(!$prestudentID = $StipBezieher->searchMatrikelnummerStg($BezieherStip->Matrikelnummer, $BezieherStip->StgKz))
|
||||
if(!$prestudentID = $StipBezieher->searchMatrikelnummerStg($BezieherStip->Matrikelnummer, $BezieherStip->StgKz, $studSemester))
|
||||
{
|
||||
if(!$prestudentID = $StipBezieher->searchSvnr($BezieherStip->SVNR))
|
||||
if(!$prestudentID = $StipBezieher->searchSvnr($BezieherStip->SVNR, $BezieherStip->StgKz, $studSemester))
|
||||
{
|
||||
$prestudentID = $StipBezieher->searchVorNachname($BezieherStip->Vorname, $BezieherStip->Familienname);
|
||||
$prestudentID = $StipBezieher->searchVorNachname($BezieherStip->Vorname, $BezieherStip->Familienname, $BezieherStip->StgKz, $studSemester);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+65
-12
@@ -4838,13 +4838,11 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus LIMIT 1
|
||||
status_kurzbz character varying(32),
|
||||
bezeichnung character varying(256)
|
||||
);
|
||||
|
||||
ALTER TABLE public.tbl_zgvpruefungstatus ADD CONSTRAINT status_kurzbz PRIMARY KEY (status_kurzbz);
|
||||
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('pruefung_stg', 'Wird vom Studiengang geprüft');
|
||||
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('rejected', 'Vom Studiengang abgelehnt');
|
||||
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted', 'Vom Studiengang akzeptiert');
|
||||
INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted_pruefung', 'Vom Studiengang akzeptiert mit Prüfung');
|
||||
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus TO vilesci;
|
||||
GRANT SELECT ON public.tbl_zgvpruefungstatus TO web;
|
||||
";
|
||||
@@ -4868,7 +4866,6 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefung LIMIT 1;"))
|
||||
updateamum timestamp without time zone,
|
||||
updatevon character varying(32)
|
||||
);
|
||||
|
||||
CREATE SEQUENCE public.tbl_zgvpruefung_id_seq
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
@@ -4877,11 +4874,9 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefung LIMIT 1;"))
|
||||
ALTER TABLE public.tbl_zgvpruefung ADD CONSTRAINT pk_tbl_zgvpruefung PRIMARY KEY (zgvpruefung_id);
|
||||
ALTER TABLE public.tbl_zgvpruefung ALTER COLUMN zgvpruefung_id SET DEFAULT nextval('public.tbl_zgvpruefung_id_seq');
|
||||
ALTER TABLE public.tbl_zgvpruefung ADD CONSTRAINT fk_tbl_zgvpruefung_student FOREIGN KEY (prestudent_id) REFERENCES public.tbl_prestudent (prestudent_id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
GRANT SELECT, UPDATE ON public.tbl_zgvpruefung_id_seq TO vilesci;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefung TO vilesci;
|
||||
GRANT SELECT ON public.tbl_zgvpruefung TO web;
|
||||
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
@@ -4901,18 +4896,15 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus_status
|
||||
status character varying(32),
|
||||
datum timestamp without time zone DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE SEQUENCE public.tbl_zgvpruefungstatus_status_id_seq
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;
|
||||
|
||||
ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT pk_tbl_zgvpruefungstatus_status PRIMARY KEY (zgv_pruefung_status_id);
|
||||
ALTER TABLE public.tbl_zgvpruefungstatus_status ALTER COLUMN zgv_pruefung_status_id SET DEFAULT nextval('tbl_zgvpruefungstatus_status_id_seq');
|
||||
ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT fk_tbl_zgvpruefung_zgvpruefung FOREIGN KEY (zgvpruefung_id) REFERENCES public.tbl_zgvpruefung (zgvpruefung_id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT fk_tbl_zgvpruefung_status FOREIGN KEY (status) REFERENCES public.tbl_zgvpruefungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
GRANT SELECT, UPDATE ON public.tbl_zgvpruefungstatus_status_id_seq TO vilesci;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus_status TO vilesci;
|
||||
GRANT SELECT ON public.tbl_zgvpruefungstatus_status TO web;
|
||||
@@ -4924,7 +4916,7 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus_status
|
||||
echo ' public.tbl_zgvpruefungstatus_status: Tabelle hinzugefuegt<br>';
|
||||
}
|
||||
|
||||
// Add index to system.tbl_log
|
||||
// Add index to lehre.tbl_pruefung
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_pruefung_student_uid'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
@@ -4937,6 +4929,7 @@ if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_pruef
|
||||
echo 'Index fuer lehre.pruefung.student_uid hinzugefuegt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Added Buchungstyp "ZuschussIO"
|
||||
if ($result = @$db->db_query("SELECT 1 FROM public.tbl_buchungstyp WHERE buchungstyp_kurzbz = 'ZuschussIO';"))
|
||||
{
|
||||
@@ -4962,6 +4955,29 @@ if(!@$db->db_query("SELECT statusgrund_kurzbz FROM public.tbl_status_grund LIMIT
|
||||
echo '<br>Neue Spalte statusgrund_kurzbz zu Tabelle public.tbl_status_grund hinzugefügt';
|
||||
}
|
||||
|
||||
// Add column homeoffice to bis.tbl_bisverwendung
|
||||
if (!$result = @$db->db_query("SELECT homeoffice FROM bis.tbl_bisverwendung LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE bis.tbl_bisverwendung ADD COLUMN homeoffice boolean NOT NULL DEFAULT FALSE";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>bis.tbl_bisverwendung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>bis.tbl_bisverwendung: Spalte homeoffice hinzugefuegt';
|
||||
}
|
||||
|
||||
// ADD COLUMN homeoffice to campus.tbl_zeitaufzeichnung
|
||||
if(!$result = @$db->db_query("SELECT homeoffice FROM campus.tbl_zeitaufzeichnung LIMIT 1"))
|
||||
{
|
||||
$qry = "
|
||||
ALTER TABLE campus.tbl_zeitaufzeichnung ADD COLUMN homeoffice boolean NOT NULL DEFAULT false ;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_zeitaufzeichnung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>campus.tbl_zeitaufzeichnung Spalte homeoffice hinzugefügt.';
|
||||
}
|
||||
|
||||
// INDEX idx_anrechnung_anrechnung_status_anrechnung_id
|
||||
if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'idx_anrechnung_anrechnung_status_anrechnung_id'"))
|
||||
@@ -4976,6 +4992,42 @@ if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'idx_anrechn
|
||||
}
|
||||
}
|
||||
|
||||
// Add Table lehre.tbl_lehrmodus
|
||||
if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_lehrmodus LIMIT 1;"))
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE lehre.tbl_lehrmodus
|
||||
(
|
||||
lehrmodus_kurzbz varchar(32) NOT NULL,
|
||||
bezeichnung_mehrsprachig varchar(255)[],
|
||||
aktiv boolean DEFAULT true
|
||||
);
|
||||
ALTER TABLE lehre.tbl_lehrmodus ADD CONSTRAINT pk_lehrmodus PRIMARY KEY (lehrmodus_kurzbz);
|
||||
INSERT INTO lehre.tbl_lehrmodus(lehrmodus_kurzbz, bezeichnung_mehrsprachig) VALUES('regulaer', '{\"regulaer\",\"regular\"}');
|
||||
INSERT INTO lehre.tbl_lehrmodus(lehrmodus_kurzbz, bezeichnung_mehrsprachig) VALUES('standardisiert', '{\"standardisiert\",\"standardized\"}');
|
||||
GRANT SELECT ON lehre.tbl_lehrmodus TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_lehrmodus TO vilesci;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrmodus: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_lehrmodus: Tabelle hinzugefuegt<br>';
|
||||
}
|
||||
|
||||
//Add Column lehrmodus_kurzbz to lehre.tbl_lehrveranstaltung
|
||||
if(!@$db->db_query("SELECT lehrmodus_kurzbz FROM lehre.tbl_lehrveranstaltung LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_lehrveranstaltung ADD COLUMN lehrmodus_kurzbz varchar(32);
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung ADD CONSTRAINT fk_lehrveranstaltung_lehrmodus FOREIGN KEY (lehrmodus_kurzbz) REFERENCES lehre.tbl_lehrmodus(lehrmodus_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte lehrmodus_kurzbz in lehre.tbl_lehrveranstaltung hinzugefügt';
|
||||
}
|
||||
|
||||
// Spalte matr_aktiv in tbl_person zum Markieren von noch nicht scharfgeschaltenen Matrikelnummern vom Datenverbund
|
||||
if(!$result = @$db->db_query("SELECT matr_aktiv FROM public.tbl_person LIMIT 1"))
|
||||
{
|
||||
@@ -5445,7 +5497,7 @@ $tabellen=array(
|
||||
"bis.tbl_bisio" => array("bisio_id","mobilitaetsprogramm_code","nation_code","von","bis","zweck_code","student_uid","updateamum","updatevon","insertamum","insertvon","ext_id","ort","universitaet","lehreinheit_id","ects_erworben","ects_angerechnet"),
|
||||
"bis.tbl_bisio_zweck" => array("bisio_id","zweck_code"),
|
||||
"bis.tbl_bisstandort" => array("standort_code","bezeichnung","aktiv","insertamum","insertvon","updateamum","updatevon"),
|
||||
"bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant"),
|
||||
"bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant", "homeoffice"),
|
||||
"bis.tbl_bundesland" => array("bundesland_code","kurzbz","bezeichnung"),
|
||||
"bis.tbl_entwicklungsteam" => array("mitarbeiter_uid","studiengang_kz","besqualcode","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"bis.tbl_gemeinde" => array("gemeinde_id","plz","name","ortschaftskennziffer","ortschaftsname","bulacode","bulabez","kennziffer"),
|
||||
@@ -5515,7 +5567,7 @@ $tabellen=array(
|
||||
"campus.tbl_uebung" => array("uebung_id","gewicht","punkte","angabedatei","freigabevon","freigabebis","abgabe","beispiele","statistik","bezeichnung","positiv","defaultbemerkung","lehreinheit_id","maxstd","maxbsp","liste_id","prozent","nummer","updateamum","updatevon","insertamum","insertvon"),
|
||||
"campus.tbl_veranstaltung" => array("veranstaltung_id","titel","beschreibung","veranstaltungskategorie_kurzbz","inhalt","start","ende","freigabevon","freigabeamum","updateamum","updatevon","insertamum","insertvon"),
|
||||
"campus.tbl_veranstaltungskategorie" => array("veranstaltungskategorie_kurzbz","bezeichnung","bild","farbe"),
|
||||
"campus.tbl_zeitaufzeichnung" => array("zeitaufzeichnung_id","uid","aktivitaet_kurzbz","projekt_kurzbz","start","ende","beschreibung","oe_kurzbz_1","oe_kurzbz_2","insertamum","insertvon","updateamum","updatevon","ext_id","service_id","kunde_uid","projektphase_id"),
|
||||
"campus.tbl_zeitaufzeichnung" => array("zeitaufzeichnung_id","uid","aktivitaet_kurzbz","projekt_kurzbz","start","ende","beschreibung","oe_kurzbz_1","oe_kurzbz_2","insertamum","insertvon","updateamum","updatevon","ext_id","service_id","kunde_uid","projektphase_id","homeoffice"),
|
||||
"campus.tbl_zeitaufzeichnung_gd" => array("zeitaufzeichnung_gd_id","uid","studiensemester_kurzbz","selbstverwaltete_pause","insertamum","insertvon","updateamum","updatevon"),
|
||||
"campus.tbl_zeitsperre" => array("zeitsperre_id","zeitsperretyp_kurzbz","mitarbeiter_uid","bezeichnung","vondatum","vonstunde","bisdatum","bisstunde","vertretung_uid","updateamum","updatevon","insertamum","insertvon","erreichbarkeit_kurzbz","freigabeamum","freigabevon"),
|
||||
"campus.tbl_zeitsperretyp" => array("zeitsperretyp_kurzbz","beschreibung","farbe"),
|
||||
@@ -5546,8 +5598,9 @@ $tabellen=array(
|
||||
"lehre.tbl_lehrform" => array("lehrform_kurzbz","bezeichnung","verplanen","bezeichnung_kurz","bezeichnung_lang"),
|
||||
"lehre.tbl_lehrfunktion" => array("lehrfunktion_kurzbz","beschreibung","standardfaktor","sort"),
|
||||
"lehre.tbl_lehrmittel" => array("lehrmittel_kurzbz","beschreibung","ort_kurzbz"),
|
||||
"lehre.tbl_lehrmodus" => array("lehrmodus_kurzbz","bezeichnung_mehrsprachig","aktiv"),
|
||||
"lehre.tbl_lehrtyp" => array("lehrtyp_kurzbz","bezeichnung"),
|
||||
"lehre.tbl_lehrveranstaltung" => array("lehrveranstaltung_id","kurzbz","bezeichnung","lehrform_kurzbz","studiengang_kz","semester","sprache","ects","semesterstunden","anmerkung","lehre","lehreverzeichnis","aktiv","planfaktor","planlektoren","planpersonalkosten","plankostenprolektor","koordinator","sort","zeugnis","projektarbeit","updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung_english","orgform_kurzbz","incoming","lehrtyp_kurzbz","oe_kurzbz","raumtyp_kurzbz","anzahlsemester","semesterwochen","lvnr","farbe","semester_alternativ","old_lehrfach_id","sws","lvs","alvs","lvps","las","benotung","lvinfo","lehrauftrag"),
|
||||
"lehre.tbl_lehrveranstaltung" => array("lehrveranstaltung_id","kurzbz","bezeichnung","lehrform_kurzbz","studiengang_kz","semester","sprache","ects","semesterstunden","anmerkung","lehre","lehreverzeichnis","aktiv","planfaktor","planlektoren","planpersonalkosten","plankostenprolektor","koordinator","sort","zeugnis","projektarbeit","updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung_english","orgform_kurzbz","incoming","lehrtyp_kurzbz","oe_kurzbz","raumtyp_kurzbz","anzahlsemester","semesterwochen","lvnr","farbe","semester_alternativ","old_lehrfach_id","sws","lvs","alvs","lvps","las","benotung","lvinfo","lehrauftrag","lehrmodus_kurzbz"),
|
||||
"lehre.tbl_lehrveranstaltung_kompatibel" => array("lehrveranstaltung_id","lehrveranstaltung_id_kompatibel"),
|
||||
"lehre.tbl_lvangebot" => array("lvangebot_id","lehrveranstaltung_id","studiensemester_kurzbz","gruppe_kurzbz","incomingplaetze","gesamtplaetze","anmeldefenster_start","anmeldefenster_ende","insertamum","insertvon","updateamum","updatevon"),
|
||||
"lehre.tbl_lvregel" => array("lvregel_id","lvregeltyp_kurzbz","operator","parameter","lvregel_id_parent","lehrveranstaltung_id","studienplan_lehrveranstaltung_id","insertamum","insertvon","updateamum","updatevon"),
|
||||
|
||||
@@ -12492,6 +12492,246 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => '3gNachweis',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "3G Nachweis",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "3G evidence",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'QrViaWebcam',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "QR-Code via Webcam scannen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "scan qr code via webcam",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'oder',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "oder",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "or",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'ZertifikatAlsPdfHochladen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Zertifikat als PDF hochladen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "upload certificate pdf",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'ValidierungsergebnisAktuellesGueltigkeitsdatum',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Validierungsergebnis / aktuelles Gültigkeitsdatum",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "validation result / current valid date",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'DateiZiehenUndAblegen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Datei hier hinziehen und ablegen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "drag & drop file here",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'KeinZugriffWebcam',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Zugriff auf die Webcam nicht möglich!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "webcam access denied",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'gueltigBis',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "gültig bis",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "valid to",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'ZertifikatUngueltig',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Zertifikat ungültig",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "certificate invalid",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'ZertifikatKonnteNichtGeprueftWerden',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Das Zertifikat konnte nicht verifiziert werden.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "certificate could not be verified.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => 'Laedt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Lädt",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "loading",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'eucovidqr',
|
||||
'phrase' => '3G',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Covid19 Gültigkeitsdatum",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "covid19 valid date",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
+243
-115
@@ -25,14 +25,20 @@ require_once('../../include/studiengang.class.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/fachbereich.class.php');
|
||||
require_once('../../include/organisationseinheit.class.php');
|
||||
require_once('../../include/lvinfo.class.php');
|
||||
require_once('../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../include/organisationsform.class.php');
|
||||
require_once('../../include/addon.class.php');
|
||||
require_once('../../include/sprache.class.php');
|
||||
require_once('../../include/lehrmodus.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
|
||||
//Sprache
|
||||
$sprache = getSprache();
|
||||
|
||||
$s=new studiengang();
|
||||
$s->getAll('typ, kurzbz', false);
|
||||
$studiengang=$s->result;
|
||||
@@ -64,6 +70,8 @@ if(!is_numeric($stg_kz) && $stg_kz!='')
|
||||
if(!is_numeric($semester))
|
||||
$semester = -1;
|
||||
|
||||
|
||||
|
||||
$oe_fachbereich='';
|
||||
if(isset($_REQUEST['fachbereich_kurzbz']))
|
||||
{
|
||||
@@ -79,9 +87,18 @@ if(isset($_REQUEST['fachbereich_kurzbz']))
|
||||
else
|
||||
$fachbereich_kurzbz = '';
|
||||
|
||||
|
||||
$oe_organisationseinheit='';
|
||||
if (isset($_REQUEST['oe_kurzbz']))
|
||||
{
|
||||
$oe_kurzbz = $_REQUEST['oe_kurzbz'];
|
||||
if($oe_kurzbz != '')
|
||||
{
|
||||
$oe_obj = new organisationseinheit();
|
||||
if(!$oe_obj->load($oe_kurzbz))
|
||||
die('Organisationseinheit konnte nicht geladen werden');
|
||||
$oe_organisationseinheit = $oe_obj->oe_kurzbz;
|
||||
}
|
||||
}
|
||||
else
|
||||
$oe_kurzbz='';
|
||||
@@ -163,7 +180,7 @@ if(isset($_GET['delete_lvid']))
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "Keine Berechtigung, um Lehrveranstaltung zu löschen!\n";
|
||||
echo " Keine Berechtigung, um Lehrveranstaltung zu löschen!\n";
|
||||
}
|
||||
|
||||
// Speichern der Daten
|
||||
@@ -318,7 +335,7 @@ if(isset($_POST['lvid']) && is_numeric($_POST['lvid']))
|
||||
$lv_obj = new lehrveranstaltung();
|
||||
if($lv_obj->load($_POST['lvid']))
|
||||
{
|
||||
$lv_obj->lehrform_kurzbz=$_POST['lf'];
|
||||
$lv_obj->lehrform_kurzbz = $_POST['lf'];
|
||||
$lv_obj->updateamum = date('Y-m-d H:i:s');
|
||||
$lv_obj->updatevon = $user;
|
||||
if($lv_obj->save(false))
|
||||
@@ -336,7 +353,25 @@ if(isset($_POST['lvid']) && is_numeric($_POST['lvid']))
|
||||
$lv_obj = new lehrveranstaltung();
|
||||
if($lv_obj->load($_POST['lvid']))
|
||||
{
|
||||
$lv_obj->lehrtyp_kurzbz=$_POST['lt'];
|
||||
$lv_obj->lehrtyp_kurzbz = $_POST['lt'];
|
||||
$lv_obj->updateamum = date('Y-m-d H:i:s');
|
||||
$lv_obj->updatevon = $user;
|
||||
if($lv_obj->save(false))
|
||||
exit('true');
|
||||
else
|
||||
exit('Fehler beim Speichern:'.$lv_obj->errormsg);
|
||||
}
|
||||
else
|
||||
exit('Fehler beim Laden der LV:'.$lv_obj->errormsg);
|
||||
}
|
||||
|
||||
//Lehrmodus Speichern
|
||||
if(isset($_POST['lm']))
|
||||
{
|
||||
$lv_obj = new lehrveranstaltung();
|
||||
if($lv_obj->load($_POST['lvid']))
|
||||
{
|
||||
$lv_obj->lehrmodus_kurzbz = $_POST['lm'];
|
||||
$lv_obj->updateamum = date('Y-m-d H:i:s');
|
||||
$lv_obj->updatevon = $user;
|
||||
if($lv_obj->save(false))
|
||||
@@ -408,6 +443,26 @@ if($result = $db->db_query($qry))
|
||||
}
|
||||
}
|
||||
|
||||
//Lehrmodus holen
|
||||
$qry = "
|
||||
SELECT
|
||||
lehrmodus_kurzbz,
|
||||
bezeichnung_mehrsprachig
|
||||
FROM
|
||||
lehre.tbl_lehrmodus ORDER BY lehrmodus_kurzbz";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
// $lm[$row->lehrmodus_kurzbz]['lehrmodus_kurzbz']=$row->lehrmodus_kurzbz;
|
||||
$lm_beschr = new lehrmodus();
|
||||
$lm_beschr ->load($row->lehrmodus_kurzbz);
|
||||
$lm[$row->lehrmodus_kurzbz]['bezeichnung_mehrsprachig'] = $lm_beschr->bezeichnung_mehrsprachig[$sprache];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Fachbereichskoordinatoren holen
|
||||
$fb_kurzbz='';
|
||||
if($stg_kz!='')
|
||||
@@ -456,14 +511,50 @@ if($result = $db->db_query($qry))
|
||||
}
|
||||
}
|
||||
|
||||
//Lehrveranstaltungen holen
|
||||
//Lehrveranstaltungen mit OEs holen
|
||||
$sql_query = "
|
||||
SELECT
|
||||
tbl_lehrveranstaltung.*, tbl_organisationseinheit.organisationseinheittyp_kurzbz,
|
||||
tbl_organisationseinheit.bezeichnung as oe_bezeichnung
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
LEFT JOIN lehre.tbl_lehreinheit USING (lehrveranstaltung_id)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung as lehrfach on (lehre.tbl_lehreinheit.lehrfach_id = lehrfach.lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_organisationseinheit ON (public.tbl_organisationseinheit.oe_kurzbz = lehre.tbl_lehrveranstaltung.oe_kurzbz)
|
||||
where
|
||||
true
|
||||
";
|
||||
|
||||
if($stg_kz!='')
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($stg_kz, FHC_INTEGER);
|
||||
|
||||
if($oe_kurzbz!='')
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.oe_kurzbz=".$db->db_add_param($oe_kurzbz);
|
||||
|
||||
if($semester != -1)
|
||||
$sql_query.=" AND tbl_lehrveranstaltung.semester=".$db->db_add_param($semester, FHC_INTEGER);
|
||||
|
||||
if($orgform_kurzbz != -1)
|
||||
if($orgform_kurzbz == 'none')
|
||||
$sql_query.=" AND (tbl_lehrveranstaltung.orgform_kurzbz IS NULL OR tbl_lehrveranstaltung.orgform_kurzbz='')";
|
||||
else
|
||||
$sql_query.=" AND tbl_lehrveranstaltung.orgform_kurzbz=".$db->db_add_param($orgform_kurzbz, FHC_STRING);
|
||||
|
||||
if($lehrveranstaltung_id != '')
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
|
||||
if($lehrveranstaltung_name != '')
|
||||
{
|
||||
$sql_query.= " AND (UPPER(tbl_lehrveranstaltung.bezeichnung) LIKE UPPER(".$db->db_add_param('%'.$lehrveranstaltung_name.'%', FHC_STRING).")";
|
||||
$sql_query.= " OR UPPER(tbl_lehrveranstaltung.bezeichnung_english) LIKE UPPER(".$db->db_add_param('%'.$lehrveranstaltung_name.'%', FHC_STRING).")) ";
|
||||
}
|
||||
|
||||
//Wenn nicht admin, werden erst nur die aktiven angezeigt, es koennen aber auch die inaktiven eingeblendet werden
|
||||
|
||||
$aktiv='';
|
||||
$isaktiv=trim($isaktiv);
|
||||
$aktiv = '';
|
||||
$isaktiv = trim($isaktiv);
|
||||
|
||||
if($isaktiv=='true')
|
||||
if($isaktiv == 'true')
|
||||
{
|
||||
$aktiv = ' AND tbl_lehrveranstaltung.aktiv=true';
|
||||
}
|
||||
@@ -476,43 +567,9 @@ else
|
||||
$aktiv='';
|
||||
}
|
||||
|
||||
if($fb_kurzbz !='')
|
||||
$sql_query="
|
||||
SELECT
|
||||
distinct tbl_lehrveranstaltung.*
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung as lehrfach, public.tbl_fachbereich
|
||||
WHERE
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_lehreinheit.lehrveranstaltung_id
|
||||
AND tbl_lehreinheit.lehrfach_id=lehrfach.lehrveranstaltung_id
|
||||
AND lehrfach.oe_kurzbz=tbl_fachbereich.oe_kurzbz
|
||||
AND tbl_fachbereich.fachbereich_kurzbz=".$db->db_add_param($fb_kurzbz);
|
||||
else
|
||||
$sql_query="SELECT * FROM lehre.tbl_lehrveranstaltung WHERE true";
|
||||
$sql_query .= " GROUP BY tbl_lehrveranstaltung.lehrveranstaltung_id, tbl_organisationseinheit.organisationseinheittyp_kurzbz, tbl_organisationseinheit.bezeichnung";
|
||||
|
||||
if($stg_kz!='')
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($stg_kz, FHC_INTEGER);
|
||||
//if($oe_kurzbz!='')
|
||||
// $sql_query.= " AND tbl_lehrveranstaltung.oe_kurzbz=".$db->db_add_param($oe_kurzbz);
|
||||
if($semester != -1)
|
||||
$sql_query.=" AND tbl_lehrveranstaltung.semester=".$db->db_add_param($semester, FHC_INTEGER);
|
||||
|
||||
if($orgform_kurzbz != -1)
|
||||
if($orgform_kurzbz == 'none')
|
||||
$sql_query.=" AND (tbl_lehrveranstaltung.orgform_kurzbz IS NULL OR tbl_lehrveranstaltung.orgform_kurzbz='')";
|
||||
else
|
||||
$sql_query.=" AND tbl_lehrveranstaltung.orgform_kurzbz=".$db->db_add_param($orgform_kurzbz, FHC_STRING);
|
||||
|
||||
if($lehrveranstaltung_id != '')
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
|
||||
if($lehrveranstaltung_name != '')
|
||||
{
|
||||
$sql_query.= " AND (UPPER(tbl_lehrveranstaltung.bezeichnung) LIKE UPPER(".$db->db_add_param('%'.$lehrveranstaltung_name.'%', FHC_STRING).")";
|
||||
$sql_query.= " OR UPPER(tbl_lehrveranstaltung.bezeichnung_english) LIKE UPPER(".$db->db_add_param('%'.$lehrveranstaltung_name.'%', FHC_STRING).")) ";
|
||||
}
|
||||
|
||||
$sql_query.=" $aktiv ORDER BY tbl_lehrveranstaltung.bezeichnung";
|
||||
$sql_query .= " ORDER BY tbl_lehrveranstaltung.bezeichnung";
|
||||
|
||||
if($fb_kurzbz=='' && $stg_kz=='' && $semester=='0' && $oe_kurzbz=='')
|
||||
$result_lv='';
|
||||
@@ -523,11 +580,11 @@ else
|
||||
}
|
||||
|
||||
//Studiengang DropDown
|
||||
$outp='';
|
||||
$s=array();
|
||||
$outp.="<form action='".$_SERVER['PHP_SELF']."' method='GET' onsubmit='return checksubmit();'>";
|
||||
$outp.=" Studiengang <SELECT name='stg_kz' id='select_stg_kz'>";
|
||||
$outp.="<OPTION value='' ".($stg_kz==''?'selected':'').">-- Alle --</OPTION>";
|
||||
$outp = '';
|
||||
$s = array();
|
||||
$outp .= "<form action='".$_SERVER['PHP_SELF']."' method='GET' onsubmit='return checksubmit();'>";
|
||||
$outp .= " Studiengang <SELECT name='stg_kz' id='select_stg_kz'>";
|
||||
$outp .= "<OPTION value='' ".($stg_kz == ''?'selected':'').">-- Alle --</OPTION>";
|
||||
$stg_berechtigt = $rechte->getStgKz('lehre/lehrveranstaltung:begrenzt');
|
||||
|
||||
foreach ($studiengang as $stg)
|
||||
@@ -569,25 +626,6 @@ foreach ($orgform->result as $of)
|
||||
}
|
||||
$outp.='</SELECT>';
|
||||
|
||||
//Institut DropDown
|
||||
$outp.= ' Institut <SELECT name="fachbereich_kurzbz" id="select_fachbereich_kurzbz">';
|
||||
$fachb = new fachbereich();
|
||||
$fachb->getAll();
|
||||
$outp.= "<OPTION value='' ".($fachbereich_kurzbz==''?'selected':'').">-- Alle --</OPTION>";
|
||||
$fachbereich_berechtigt = $rechte->getFbKz('lehre/lehrveranstaltung:begrenzt');
|
||||
foreach ($fachb->result as $fb)
|
||||
{
|
||||
if($fachbereich_kurzbz==$fb->fachbereich_kurzbz)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
if(in_array($fb->fachbereich_kurzbz, $fachbereich_berechtigt))
|
||||
$outp.= '<OPTION value="'.$db->convert_html_chars($fb->fachbereich_kurzbz).'" '.$selected.'>'.$db->convert_html_chars($fb->fachbereich_kurzbz).'</OPTION>';
|
||||
}
|
||||
|
||||
$outp.= '</SELECT>';
|
||||
|
||||
//if($write_admin) Von kindlm am 12.04.2013 auskommentiert, da Assistentinnen auch bei inaktiven LV's die Lehrform aendern koennen sollen
|
||||
//{
|
||||
//Aktiv DropDown
|
||||
@@ -596,37 +634,44 @@ $outp.= '</SELECT>';
|
||||
$outp.= "<OPTION value='true '".($isaktiv=='true'?'selected':'').">-- Aktiv --</OPTION>";
|
||||
$outp.= "<OPTION value='false '".($isaktiv=='false'?'selected':'').">-- Nicht aktiv --</OPTION>";
|
||||
$outp.= '</SELECT>';
|
||||
|
||||
$outp.= '<input type="submit" style="margin-left:20px;" value="Anzeigen">';
|
||||
//}
|
||||
/*else
|
||||
{
|
||||
$isaktiv='aktiv';
|
||||
}*/
|
||||
|
||||
|
||||
$outp .= '</hr><details id="detailTag" style="margin-top: 10px;"><summary style="float:right">Erweiterte Suchoptionen</summary><hr></hr>';
|
||||
|
||||
//Organisationseinheit Dropdown
|
||||
$outp.= '<br>Organisationseinheit <select name="oe_kurzbz" style="width: 200px" id="select_oe_kurzbz"><option value="">-- Alle --</option>';
|
||||
$oe=new organisationseinheit();
|
||||
$outp .= '<br>Organisationseinheit <select name="oe_kurzbz" style="width: 450px" id="select_oe_kurzbz"><option value="">-- Alle --</option>';
|
||||
$oe = new organisationseinheit();
|
||||
$oe->getAll();
|
||||
foreach($oe->result as $row)
|
||||
{
|
||||
if($oe_kurzbz==$row->oe_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
$outp.= '<option value="'.$db->convert_html_chars($row->oe_kurzbz).'" '.$selected.'>'.$db->convert_html_chars($row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung).'</option>';
|
||||
if($oe_kurzbz == $row->oe_kurzbz)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
$outp .= '<option value="'.$db->convert_html_chars($row->oe_kurzbz).'" '.$selected.'>'.$db->convert_html_chars($row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung).'</option>';
|
||||
}
|
||||
$outp.= '</select>';
|
||||
|
||||
$outp .= '</select>';
|
||||
|
||||
//Lehrveranstaltung ID Input
|
||||
$outp.= ' ID <input type="text" name="lehrveranstaltung_id" style="width: 100px" id="lehrveranstaltung_id" value="'.$lehrveranstaltung_id.'">';
|
||||
|
||||
|
||||
//Lehrveranstaltung Suche Bezeichnung
|
||||
$outp.= ' Name <input type="text" name="lehrveranstaltung_name" style="width: 400px" id="lehrveranstaltung_name"
|
||||
$outp.= ' Name <input type="text" name="lehrveranstaltung_name" style="width: 450px" id="lehrveranstaltung_name"
|
||||
value="'.$lehrveranstaltung_name.'" placeholder="Mind. 3 Zeichen. Deutsche oder Englische Bezeichnung"
|
||||
title="Platzhalter _ (EIN beliebiges Zeichen) und % (beliebig viele Zeichen) möglich">';
|
||||
|
||||
$outp.= ' <input type="submit" value="Anzeigen">';
|
||||
$outp.= ' <input type="submit" style="margin-left:20px" value="Anzeigen">';
|
||||
$outp.= '<hr></hr></details>';
|
||||
$outp.= '</form>';
|
||||
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
@@ -669,35 +714,37 @@ echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
openDetailTag();
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[2,0]],
|
||||
widgets: ["saveSort", "zebra", "filter", "stickyHeaders"],
|
||||
headers: { 4: {sorter: false, filter: false},
|
||||
5: {sorter: false, filter: false},
|
||||
11: {sorter: false, filter: false},
|
||||
6: {sorter: false, filter: false},
|
||||
13: {sorter: false, filter: false},
|
||||
14: {sorter: false, filter: false},
|
||||
17: {sorter: false, filter: false},
|
||||
18: {sorter: false, filter: false},
|
||||
15: {sorter: false, filter: false},
|
||||
16: {sorter: false, filter: false},
|
||||
19: {sorter: false, filter: false},
|
||||
20: {sorter: false, filter: false},
|
||||
21: {sorter: false, filter: false}},
|
||||
21: {sorter: false, filter: false},
|
||||
22: {sorter: false, filter: false},
|
||||
23: {sorter: false, filter: false}},
|
||||
widgetOptions : {filter_functions : {
|
||||
// Add select menu to this column
|
||||
10 : {
|
||||
"True" : function(e, n, f, i, $r, c, data) { return /t/.test(e); },
|
||||
"False" : function(e, n, f, i, $r, c, data) { return /f/.test(e); }
|
||||
},
|
||||
12 : {
|
||||
"True" : function(e, n, f, i, $r, c, data) { return /t/.test(e); },
|
||||
"False" : function(e, n, f, i, $r, c, data) { return /f/.test(e); }
|
||||
},
|
||||
15 : {
|
||||
14 : {
|
||||
"True" : function(e, n, f, i, $r, c, data) { return /t/.test(e); },
|
||||
"False" : function(e, n, f, i, $r, c, data) { return /f/.test(e); }
|
||||
},
|
||||
16 : {
|
||||
17 : {
|
||||
"True" : function(e, n, f, i, $r, c, data) { return /t/.test(e); },
|
||||
"False" : function(e, n, f, i, $r, c, data) { return /f/.test(e); }
|
||||
},
|
||||
18 : {
|
||||
"True" : function(e, n, f, i, $r, c, data) { return /t/.test(e); },
|
||||
"False" : function(e, n, f, i, $r, c, data) { return /f/.test(e); }
|
||||
}
|
||||
@@ -730,7 +777,6 @@ echo '
|
||||
}
|
||||
else
|
||||
return true;
|
||||
|
||||
}
|
||||
function changelehrevz(lvid, lehrevz)
|
||||
{
|
||||
@@ -855,6 +901,27 @@ echo '
|
||||
});
|
||||
}
|
||||
|
||||
function changelehrmodus(lvid, lm)
|
||||
{
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"lehrveranstaltung.php",
|
||||
data:{ "lvid": lvid, "lm": lm },
|
||||
success: function(data)
|
||||
{
|
||||
if(data!="true")
|
||||
alert("ERROR:"+data)
|
||||
else
|
||||
{
|
||||
$("#lm"+lvid).css("background-color", "lightgreen");
|
||||
window.setTimeout(function(){$("#lm"+lvid).css("background-color", "");}, 500);
|
||||
}
|
||||
|
||||
},
|
||||
error: function() { alert("error"); }
|
||||
});
|
||||
}
|
||||
|
||||
function copylvinfo(lvid, source_id)
|
||||
{
|
||||
$.ajax({
|
||||
@@ -922,14 +989,25 @@ echo '
|
||||
{
|
||||
return confirm("Diese Lehrveranstaltung wirklich löschen?");
|
||||
}
|
||||
|
||||
function openDetailTag()
|
||||
{
|
||||
var details = document.getElementById("detailTag");
|
||||
if(document.getElementById("lehrveranstaltung_name").value!=""
|
||||
|| document.getElementById("select_oe_kurzbz").value!=""
|
||||
|| document.getElementById("lehrveranstaltung_id").value!="")
|
||||
{
|
||||
details.open = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.tablesorter-default input.tablesorter-filter
|
||||
{
|
||||
padding: 0 4px;
|
||||
}
|
||||
table.tablesorter tbody td
|
||||
table.tablesorter tbody td
|
||||
{
|
||||
padding: 0 4px;
|
||||
}
|
||||
@@ -991,8 +1069,10 @@ if ($result_lv!=0)
|
||||
<th>Bezeichnung English</th>
|
||||
<th>Lehrform</th>
|
||||
<th>Lehrtyp</th>
|
||||
<th>Lehrmodus</th>
|
||||
<th>Stg</th>\n
|
||||
<th>Orgform</th>
|
||||
<th>Organisationseinheit</th>
|
||||
<th title='Semesterstunden'>SS</th>
|
||||
<th>ECTS</th>
|
||||
<th>Lehre</th>
|
||||
@@ -1034,48 +1114,96 @@ if ($result_lv!=0)
|
||||
else
|
||||
echo $db->convert_html_chars($row->bezeichnung);
|
||||
echo '</td>';
|
||||
|
||||
|
||||
//Bezeichnung Englisch
|
||||
echo '<td>';
|
||||
echo $db->convert_html_chars($row->bezeichnung_english);
|
||||
echo '</td>';
|
||||
|
||||
//Lehrform
|
||||
echo '<td style="white-space:nowrap;">';
|
||||
echo '<SELECT style="width:80px;" id="lf'.$row->lehrveranstaltung_id.'">';
|
||||
echo '<option value="">--</option>';
|
||||
foreach ($lf as $lehrform=>$lf_kz)
|
||||
if($write_admin)
|
||||
{
|
||||
if($lehrform==$row->lehrform_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$db->convert_html_chars($lehrform).'" '.$selected.'>'.$db->convert_html_chars($lf_kz['lehrform_kurzbz']).' '.$db->convert_html_chars($lf_kz['bezeichnung']).'</option>';
|
||||
echo '<td style="white-space:nowrap;">';
|
||||
echo '<SELECT style="width:80px;" id="lf'.$row->lehrveranstaltung_id.'">';
|
||||
echo '<option value="">--</option>';
|
||||
foreach ($lf as $lehrform=>$lf_kz)
|
||||
{
|
||||
if($lehrform == $row->lehrform_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$db->convert_html_chars($lehrform).'" '.$selected.'>'.$db->convert_html_chars($lf_kz['lehrform_kurzbz']).' '.$db->convert_html_chars($lf_kz['bezeichnung']).'</option>';
|
||||
}
|
||||
echo '</SELECT><input type="button" value="ok" id="lf'.$row->lehrveranstaltung_id.'" onclick="changelehrform(\''.$row->lehrveranstaltung_id.'\',$(\'#lf'.$row->lehrveranstaltung_id.'\').val())">';
|
||||
echo '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<td>';
|
||||
foreach ($lf as $lehrform=>$lf_kz)
|
||||
{
|
||||
if($lehrform == $row->lehrform_kurzbz)
|
||||
echo $db->convert_html_chars($lf_kz['lehrform_kurzbz']). ' '. $db->convert_html_chars($lf_kz['bezeichnung']);
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</SELECT><input type="button" value="ok" id="lf'.$row->lehrveranstaltung_id.'" onclick="changelehrform(\''.$row->lehrveranstaltung_id.'\',$(\'#lf'.$row->lehrveranstaltung_id.'\').val())">';
|
||||
echo '</td>';
|
||||
|
||||
//Lehrtyp
|
||||
echo '<td style="white-space:nowrap;">';
|
||||
echo '<SELECT id="lt'.$row->lehrveranstaltung_id.'">';
|
||||
echo '<option value="">--</option>';
|
||||
foreach ($lt as $lehrtyp=>$lt_kz)
|
||||
if($write_admin)
|
||||
{
|
||||
if($lehrtyp==$row->lehrtyp_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$db->convert_html_chars($lehrtyp).'" '.$selected.'>'.$db->convert_html_chars($lt_kz['bezeichnung']).'</option>';
|
||||
echo '<td style="white-space:nowrap;">';
|
||||
echo '<SELECT id="lt'.$row->lehrveranstaltung_id.'">';
|
||||
echo '<option value="">--</option>';
|
||||
foreach ($lt as $lehrtyp=>$lt_kz)
|
||||
{
|
||||
if($lehrtyp == $row->lehrtyp_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
echo '<option value="'.$db->convert_html_chars($lehrtyp).'" '.$selected.'>'.$db->convert_html_chars($lt_kz['bezeichnung']).'</option>';
|
||||
}
|
||||
echo '</SELECT><input type="button" value="ok" id="lf'.$row->lehrveranstaltung_id.'" onclick="changelehrtyp(\''.$row->lehrveranstaltung_id.'\',$(\'#lt'.$row->lehrveranstaltung_id.'\').val())">';
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</SELECT><input type="button" value="ok" id="lf'.$row->lehrveranstaltung_id.'" onclick="changelehrtyp(\''.$row->lehrveranstaltung_id.'\',$(\'#lt'.$row->lehrveranstaltung_id.'\').val())">';
|
||||
else
|
||||
{
|
||||
echo '<td>';
|
||||
foreach ($lt as $lehrtyp=>$lt_kz)
|
||||
{
|
||||
if($lehrtyp == $row->lehrtyp_kurzbz)
|
||||
echo $db->convert_html_chars($lt_kz['bezeichnung']);
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
//lehrmodus
|
||||
echo '<td style="white-space:nowrap;">';
|
||||
echo '<SELECT id="lm'.$row->lehrveranstaltung_id.'">';
|
||||
echo '<option value="">--</option>';
|
||||
foreach ($lm as $lehrmodus => $lm_kz)
|
||||
{
|
||||
if($lehrmodus == $row->lehrmodus_kurzbz)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="'.$db->convert_html_chars($lehrmodus).'" '.$selected.'>'
|
||||
.$db->convert_html_chars($lm_kz['bezeichnung_mehrsprachig']).'</option>';
|
||||
}
|
||||
echo '</SELECT><input type="button" value="ok" id="lf'.$row->lehrveranstaltung_id.'" onclick="changelehrmodus(\''.$row->lehrveranstaltung_id.'\',$(\'#lm'.$row->lehrveranstaltung_id.'\').val())">';
|
||||
echo '</td>';
|
||||
|
||||
//Studiengang
|
||||
echo '<td>'.$db->convert_html_chars($s[$row->studiengang_kz]->kurzbz).'</td>';
|
||||
|
||||
//Organisationsform
|
||||
echo '<td style="white-space:nowrap;">';
|
||||
echo ($row->orgform_kurzbz!=''?$db->convert_html_chars($row->orgform_kurzbz):' ');
|
||||
echo '</td>';
|
||||
|
||||
//Organisationseinheit
|
||||
echo '<td>'.($row->oe_kurzbz != ''?$db->convert_html_chars($row->organisationseinheittyp_kurzbz.' '.$row->oe_bezeichnung):'-').'</td>';
|
||||
|
||||
//Semesterstunden
|
||||
echo '<td>'.($row->semesterstunden!=''?$db->convert_html_chars($row->semesterstunden):'-').'</td>';
|
||||
//ECTS
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
require_once('../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../include/studiengang.class.php');
|
||||
require_once('../../include/lehrtyp.class.php');
|
||||
require_once('../../include/lehrmodus.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
@@ -104,6 +105,7 @@
|
||||
$lv->projektarbeit = isset($_POST['projektarbeit']);
|
||||
$lv->orgform_kurzbz = $_POST['orgform_kurzbz'];
|
||||
$lv->lehrtyp_kurzbz = $_POST['lehrtyp_kurzbz'];
|
||||
$lv->lehrmodus_kurzbz = $_POST['lehrmodus_kurzbz'];
|
||||
$lv->oe_kurzbz = $_POST['oe_kurzbz'];
|
||||
$lv->raumtyp_kurzbz = $_POST['raumtyp_kurzbz'];
|
||||
$lv->anzahlsemester = $_POST['anzahlsemester'];
|
||||
@@ -172,6 +174,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($_REQUEST['lv_id']) || isset($_REQUEST['neu']))
|
||||
{
|
||||
//wenn ein Fehler beim Speichern auftritt, dann sollen die alten Daten nochmals
|
||||
@@ -283,6 +286,26 @@
|
||||
$htmlstr .= '</select></td>
|
||||
</tr>';
|
||||
|
||||
$htmlstr .= '
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Lehrmodus*</td>
|
||||
<td><select name="lehrmodus_kurzbz"><option value="">-- keine Auswahl --</option>';
|
||||
|
||||
$lehrmodus_arr = new lehrmodus();
|
||||
$lehrmodus_arr->getAll();
|
||||
$sprache = getSprache();
|
||||
foreach ($lehrmodus_arr->result as $lehrmodus)
|
||||
{
|
||||
if ($lehrmodus->lehrmodus_kurzbz == $lv->lehrmodus_kurzbz)
|
||||
$sel = ' selected';
|
||||
else
|
||||
$sel = '';
|
||||
$htmlstr .= '<option value="'.$lehrmodus->lehrmodus_kurzbz.'" '.$sel.'>'.$lehrmodus->bezeichnung_mehrsprachig[$sprache].'</option>';
|
||||
}
|
||||
|
||||
$htmlstr .= '<tr>
|
||||
<td>Sort</td>
|
||||
<td><input type="text" name="sort" value="'.$lv->sort.'" maxlength="2"></td>
|
||||
@@ -601,6 +624,16 @@
|
||||
error = true;
|
||||
$('select[name="lehrtyp_kurzbz"]').addClass("missingFormData");
|
||||
}
|
||||
if($('select[name="lehrmodus_kurzbz"]').val() === "")
|
||||
{
|
||||
error = true;
|
||||
$('select[name="lehrmodus_kurzbz"]').addClass("missingFormData");
|
||||
}
|
||||
if($('input[name="lehreverzeichnis"]').val() === "")
|
||||
{
|
||||
error = true;
|
||||
$('input[name="lehreverzeichnis"]').addClass("missingFormData");
|
||||
}
|
||||
if($('input[name="lehreverzeichnis"]').val() === "")
|
||||
{
|
||||
error = true;
|
||||
|
||||
@@ -236,7 +236,9 @@ if (! $funktion->load ( $kurzbz )) {
|
||||
<link rel="stylesheet" href="../../skin/jquery-ui-1.9.2.custom.min.css" type="text/css">
|
||||
|
||||
<script type="text/javascript" src="../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<?php
|
||||
include("../../include/meta/jquery-tablesorter.php");
|
||||
?>
|
||||
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
@@ -265,8 +267,8 @@ if (! $funktion->load ( $kurzbz )) {
|
||||
});
|
||||
$("#t1").tablesorter({
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"],
|
||||
headers: {9:{sorter:false},10:{sorter:false}}
|
||||
widgets: ["zebra", "filter", "stickyHeaders"],
|
||||
headers: {9:{sorter:false, filter: false},10:{sorter:false, filter: false}}
|
||||
});
|
||||
$('#t1').checkboxes('range', true);
|
||||
$( ".datepicker_datumvon" ).datepicker({
|
||||
|
||||
@@ -60,7 +60,8 @@ if (!$filter->loadAll())
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[2,0]],
|
||||
widgets: ["zebra"]
|
||||
widgets: ["zebra", "filter", "stickyHeaders"],
|
||||
headers: {8: {sorter: false, filter: false}}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user