Commit Graph

68 Commits

Author SHA1 Message Date
Andreas Österreicher 0a23698b7e Fixed Loading of UDF Fields in FAS if there are only UDF Fields for
Persons
2018-12-19 07:35:16 +01:00
Paolo 08af558e8f - Better code in application/libraries/LogLib.php
- Added private property debugMode to application/core/DB_Model.php
- application/core/DB_Model.php now loads Loglib
- Added private method _logLastQuery to application/core/DB_Model.php
- Placed _logLastQuery in DB_Model methods: insert, update, delete, loadWhere, loadTree, execQuery
- DB_Model method load now calls method loadWhere
2018-11-21 14:59:31 +01:00
Paolo 46e85a2317 Merge branch 'master' into permissions 2018-06-28 14:52:09 +02:00
Paolo 25e66bf9dd - Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper
- Adapted the code in application/* to use as much as possible this two new functions
- Removed the php function empty almost everywhere
2018-06-27 15:06:04 +02:00
Paolo 9d5c9b443e Merge branch 'master' into permissions 2018-04-18 17:35:33 +02:00
Paolo 4152a67d8f - Removed permission system from DB_Model and FHC_Model
- Removed method _isEntitled from DB_Model
- Removed method isEntitled from DHC_Model
2018-03-29 12:15:12 +02:00
Andreas Österreicher 68f934a5d0 Removed Budget Tables from Core -> moved to Extension
Fixed Problem during Extension installation
2018-03-15 06:53:50 +01:00
Paolo 72bb40e786 - Added method escapeLike to DB_Model to escape strings for LIKE operator
- Added JS include jqueryui to InfoCenter
- Added left join to system.tbl_person_lock in infocenterData.php
- Added field LockDate to InfoCenter filter
- Added parameter markRow to InfoCenter filter
- Added DragNDrop to FilterWidget to sort/remove the selected filter fields
- FilterWidget now display the name of the loaded filter if available
- Added the property "name" to the jsonb of filters to display the name of the loaded filter
- Added the static method displayFilterName to the FilterWidget to display the name of the loaded filter
- The collapsible panel in FilterWidget now shows/hides the fields selection, the filter operators and the inputs to save the custom filter
- The GUI remembers if the collapsible panel should be closed or open
- Added the "Apply" button to the filter operators
- Added the markRow parameter to the FilterWidget, used to mark a row if one or more conditions are matched
- Added the alternativeMarkRowClass to use a different class to mark a row
- Added the public static function markRow to the FilterWidget
2018-02-21 17:48:03 +01:00
Paolo a7582c8868 - Method execReadOnlyQuery of DB_Model has a less strict check about the query statement
- Added a first management of the type date
2017-12-05 17:39:31 +01:00
Paolo ee3998f62e - Changed system/dbupdate_3.3.php to create table system.tbl_filters and what its needed
- Added model system/Filters_model to manage system.tbl_filters
- Removed method execQuery from model system/UDF_model
- Added property executedQueryMetaData to DB_Model
- Added property executedQueryListFields to DB_Model
- Added method getExecutedQueryListFields to DB_Model
- Added method getExecutedQueryMetaData to DB_Model
- Added method execReadOnlyQuery to DB_Model to execute read only queries from outside a model
- Changed DB_Model method _toPhp to store infos about an executed query into properties executedQueryMetaData and executedQueryListFields
- Updated library UDFLib to use execReadOnlyQuery
- Added widget FilterWidget to render and manage a filter into VileSci
- Added views widgets/filter/selectFields, widgets/filter/selectFilters and widgets/filter/tableDataset used by FilterWidget
2017-11-22 12:08:54 +01:00
Andreas Österreicher 39392d7c18 - Added Cronjob for correcting Studienplan in Status
- Modified persmission lib to not check persmissions on CLI
- Modified Cronjobs to be able to start CI Jobs
2017-10-24 11:13:59 +02:00
Paolo d1fa93a2b6 DB_model bugfix:
- update method now is using _manageUDFs instead of directly UDFLib->manageUDFs
- _manageUDFs method now accept the id as third parameter
- if the third parameter of _manageUDFs is null the getUDFs is not
called
- If id parameter of method load is null now a correct parameter is given to
get_where
2017-08-23 10:47:12 +02:00
Paolo d8cd786079 - application/core/* -> CS compliant
- application/libraries/* -> CS compliant
- FHC_Model isEntitled method now return error() or success()
- Updated all code that uses isEntitled method from FHC_Model
- Removed Squiz.PHP.DisallowSizeFunctionsInLoops from CS ruleset
- Removed depracated method replace from DB_Model
- Removed unused method pgArrayPhp from DB_Model
- Renamed method arrayMergeIndex to _arrayCombine in DB_Model and set as private
- Added method _manageUDFs to DB_Model (a wrapper for UDFLib->manageUDFs)
2017-08-22 16:24:51 +02:00
Paolo b50aab2d33 - Moved all code related to UDF from DB_Model to UDFLib
- Changed method getUDFs in DB_Model
- Removed method getUDF
- Moved method _getUDFsDefinitions to UDF_model and renamed to getUDFsDefinitions
- Updated model UDF_model
- Updated controller system/UDF
- Updated DB_Model to be more CS compliant
2017-08-18 15:50:59 +02:00
Paolo 226eda73e5 - Added comments to DB_Model
- Method _manageUDFs using a temp variable to store result from _validateUDFs
2017-08-09 16:20:10 +02:00
Paolo 973b74ce7e $validate variable reset on every loop 2017-08-09 15:55:32 +02:00
Paolo 9ee1820ac3 - Not to check the required attribute for them all together, but only if the UDF is present in the given parameters.
Update of UDF should work in the same way as the update of regular columns.
- Required rules:
    - If required === false && value to be saved == (null || false) => validation avoided
    - If required == false && value to be saved != null => validation performed
    - If required == true => validation performed && value cannot be null
    - If required == true && value to be saved == (null || false) => raise error: required field
    - If raised error required field => validation is not performed
2017-08-09 15:21:19 +02:00
Paolo 68189bb7a5 - If required == false and a null value is given for a UDF, then no
validation is performed
- No validation is performed for checkboxes
- Better workaround in UDF_Model
2017-08-02 17:02:39 +02:00
Paolo 66de1e18f8 - Removed /core from URL
- If UDf are not set in DB UDF view will not display them
- Removed placeholder from multiple dropdown widget
- Dropdown widget has null value as placeholder
- Added permission system/udf to checksystem
2017-08-01 18:25:23 +02:00
Paolo 59045e1136 Added private method _fillMissingChkboxUDF to UDF_model.
It checks if UDF checkboxes are NOT posted and sets theirs values to
false
2017-07-28 18:36:08 +02:00
Paolo 994c4e1d36 If a UDF is of type checkbox, convert the string value to a boolean 2017-07-28 17:21:01 +02:00
Paolo 28be99c952 In case a table is updated and UDF are present in that table,
the method _manageUDFs will preserve the UDF values that
are NOT given as parameters.
Updates only the wanted UDF, without overwriting the others.
2017-07-28 17:00:42 +02:00
Paolo dab6515038 - Added widgets.css
- Better widgets HTML format
- Changed required attribute to udf-required
2017-07-21 15:02:04 +02:00
Paolo 3abfcbc429 - Better naming convention for variables
- Method toPhp has a more strict check about UDF
- Added constant UDF_FIELD_JSON_DESCRIPTION
- Added new code comments and improved the old ones
- Improved code formatting
- UDF validation now checks also the required fields
- UDF validation now checks also if the UDF value is an array or an
object and discard them
- Method _getUDFs renamed to _getUDFsDefinitions
2017-06-30 13:31:21 +02:00
Paolo d3a675bf52 Testing phase 2017-06-28 12:04:41 +02:00
Paolo be9fc8121e - Added exit codes for udf validation to constants.php
- Added messages for udf validation to fhc_model_lang
- Added MAX_LENGTH and MIN_LENGTH to UDFWidgetTpl in WidgetLib
- UDF validation second version in DB_Model
2017-06-23 18:54:34 +02:00
Stefan Puraner a7d3214dd6 fixed return value of method '_manageUDFs' 2017-06-22 11:32:56 +02:00
Paolo 950da84cf3 - Added constant EXIT_VALIDATION_UDF into constants.php
- Added message 'fhc_'.EXIT_VALIDATION_UDF into fhc_model_lang
- Added method _validateUDFs into DB_Model
- Renamed _manageUDF to _manageUDFs into DB_Model
- Renamed _getUDFParamters to _getUDFs into DB_Model
- Introduced first version of UDF validation
2017-06-21 11:05:20 +02:00
Paolo b73bf1dd32 - Added method listFields to DB_Model
- Added method fieldExists to DB_Model
2017-06-19 12:39:08 +02:00
Paolo 3ac8d7d604 - Added parameter decode to API /system/UDF/UDF to decode json
- UDF bugfix: now it checks if a table has the column udf_values before
performing an insert or update
2017-06-19 12:15:28 +02:00
Paolo e8d395f4f1 UDF update and insert bug fix 2017-06-14 16:18:43 +02:00
Paolo 86a1eb876e UDF update bug fix 2017-06-14 15:24:08 +02:00
Paolo 294c65a9bf Added controller UDF to read UDFs definitions
UDFs update&insert second version
2017-06-09 15:45:33 +02:00
Paolo 30c31211aa Added insert and update for UDFs, first version 2017-06-08 18:26:32 +02:00
Paolo e143aa8815 1st preview 2017-05-09 18:14:18 +02:00
Paolo a5aea17fa6 UDF fields are present in json output as other fields 2017-05-08 18:46:38 +02:00
Paolo a2d2296f33 - Added method addGroupBy to DB_Model
- Changed the query present in method getPrestudentMultiAssign of Prestudent_model
2017-04-05 16:58:23 +02:00
Paolo 4984b69366 - DB_Model: workaround for CI_DB_driver->_list_columns (if there are two
tables with the same name in two different schemas, it returns a list of
fields from the two tables)
- DB_Model: changed loadTree to use the new method _list_columns
- DB_Model: added the method getSchemaAndTable
- Updated Studiengang_model to specify the schema when using the
loadTree method
- Studiengang_model: removed the titel parameter from method getAppliedStudiengang
- Studiengang2 controller removed the titel parameter from method getAppliedStudiengang
2017-04-04 18:27:31 +02:00
Paolo 2c4595005b DB_Model->_isEntitled: now if the user is not entitled to perform an
operation the query is reset
2017-03-23 11:51:18 +01:00
Paolo 1615470a8f Third version of the VileSci interface that allows easily to add more prestudent
to a group or change their stufe
2017-03-21 18:29:25 +01:00
bison-paolo bf677f717e Added method addForm to DB_Model 2017-02-15 12:50:50 +01:00
bison-paolo 8d9a8b6478 Changed method loadTree of DB_Model to be compatible to older php versions than 5.5 2017-02-09 11:01:29 +01:00
bison-paolo 0a19cbfba4 - Changed the routes used to call the controllers, now accept also
capital names
- Now method getStudiengangBewerbung of controller Studiengang returns
also data relative to the table lehre.tbl_akadgrad
- Fixes and enhancements of method loadTree of DB_Model.
2016-11-25 15:09:19 +01:00
bison-paolo 5087826891 - phpC(d)I
- Renamed method chkRights to _isEntitled in model DB_Model
- Updated models where it was needed
2016-10-20 16:37:52 +02:00
bison-paolo f3b79cd731 - Added method chkRights to DB_Model
- Added method toPhp to DB_Model to convert array and boolean types from PostgresSQL to php
- Added method execQuery to DB_Model to execute a query (it calls toPhp)
- Added method pgsqlArrayToPhpArray to convert a pgsql array to php
- Updated DB_Model methods to using chkRights (and toPhp where it is needed)
- Removed methods escapeArray and _pgsqlArrayToPhpArray from controller APIv1_Controller
- Removed escapeArray from controllers Dokumentstudiengang and Dokument
- Updated models to use execQuery (and chkRights where it is needed)
2016-10-17 17:07:51 +02:00
bison-paolo 8e0ca12deb - All permission functionalities now are in the library PermissionLib
- All return messages functions are in the message helper and it is loaded by the core classes
- Added the missing constant FHC_NOPK
- Updated all the interested classes with the new permission method
- Updated all the interested classes with the new return message functions
2016-10-13 17:53:12 +02:00
bison 0b5644d6f1 - Added method getStudiengangBewerbung to controller Studiengang2
- Renamed method loadList to loadTree
- Improved method loadTree
- Added method getStudiengangBewerbung to model Studiengang_model
2016-09-06 15:52:34 +02:00
bison 7e71681d26 - Added method loadList to model DB_model
- Added method getStudienplan to model Studiengang_model
- Changes in method getStudiengangStudienplan of controller Studiengang2
2016-08-26 14:21:04 +02:00
paolo 2568d8f912 - Removed the parameter "sprache" from controller Message
- Added method escape to class DB_Model
- Changed method sendMessageVorlage of MessageLib to send messages trying
to use the same language of the receiver, and improved message errors
- Added OrganisationseinheitLib to handle a recursive search using in the
organisation tree
- Removed from PhrasesLib the method loadVorlagetext because is already
present in VorlageLib
- Changed method loadVorlagetext of VorlageLib, now it searches the template
using the organisation tree
- Added method getOneLevel to model Organisationseinheit_model to get one
level of the organisation tree
2016-07-15 13:38:09 +02:00
paolo 79230cd85d Added function getBerechtigungKurzbz to model FHC_Model.
Using this function will be avoided the notice "Undefined index".
All models have been adapted.
2016-07-07 16:42:04 +02:00