Commit Graph

98 Commits

Author SHA1 Message Date
Andreas Österreicher 0738f28144 Merge branch 'master' into feature-7434/Messages_Neue_Felder_zu_eingeloggtem_User_ergaenzen 2020-11-25 14:52:22 +01:00
Paolo 6e5c555a40 Fixed MessageLib->_sendNoticeEmail 2020-11-23 16:19:23 +01:00
Paolo 451e0e7843 Fixed MessageLib->_sendNoticeEmails: date and array comparisons 2020-11-19 00:09:53 +01:00
Paolo 9d2c004c6d Checks if the benutzer exists MessageLib->_sendNoticeEmails 2020-11-18 08:51:48 +01:00
Paolo 443caa91f2 Messaging sysntem: the internal email account is used only if the user
account is older then 24 hours
2020-11-09 10:45:25 +01:00
Cris 634401485a Renamed 'Meine Felder'-msg names and small method adaptation to retrieve fields
Signed-off-by: Cris <hainberg@technikum-wien.at>
2020-05-28 09:42:51 +02:00
Cris a5e0c9ca5a Added logic to provide fields of logged in user in Messaging system
Signed-off-by: Cris <hainberg@technikum-wien.at>
2020-05-27 11:52:12 +02:00
Paolo 88fc901bf7 - Added new config entry ou_function_whitelist in message.php
- Added new constant CFG_OU_FUNCTION_WHITELIST in library MessageLib
- MessageLib->getOeKurzbz now filters out organization units based on config entry ou_function_whitelist
- Removed redundant templates in Vorlage_widget
2020-03-06 16:56:27 +01:00
Paolo 34b6581849 - Renamed BenutzerfunktionModel->getByPersonId to getActiveFunctionsByPersonId
- BenutzerfunktionModel->getActiveFunctionsByPersonId changed query to get only active functions
- Removed commented code
2020-02-26 17:22:59 +01:00
Paolo a50cc6cba8 - jobs/MailJob->sendAllMessageEmailNotices changed since parameter default value
- Moved ALT_OE from MessageLib to CL/Messages_model
- MessageLib->_setSentError renamed to _updatedRecipientNoticeEmailInfo
- MessageLib->_sendNoticeEmail changed to have more information about a not sent notice email
- Recipient_model->getNotSentMessages now does not retrieve messages with notice email send failure
2020-02-25 16:41:27 +01:00
Paolo 304d7727f0 - CL/Messages_model-> sendReply applied workaround for Infocenter
- MailJob now extends JOB_Controller and writes logs in DB
- MailJob->sendMessages renamed to sendAllMessageEmailNotices
- sendAllMessageEmailNotices now accept new parameter since to restrict number of messages
- MessageLib->sendAllEmailNotices now accept new parameter since and adapted to use new MessageLib->_sendNoticeEmails
- Recipient_model->getMessages renamed to getNotSentMessages
- Now accepts only limit and since as parameters
- Changed query to retrieve only message ids
2020-02-21 16:59:25 +01:00
Paolo 0db611ed27 - Added new config entry in mail config file called enable_debug
- If enable_debug is true then info about the mail are logged into the CI error logs
- Fixed queries to get sent and received messages with Recipient_model, now messages for which a notice email was not sent are retrieved and messages are sorted by insertamum
- CL/Messages_model:
	- Before setting a message as read check if a record is already present
	- If the recipient is a prestudent then in table tbl_msg_message oe_kurzbz is set with the ou of the prestudent
	- The sender id (person_id) now is get from the currently logged user also when replying
- MessageLib->_sendNoticeEmails checks that the message was sent only from FAS (NOT from infocenter)
2020-02-18 15:19:58 +01:00
Paolo b94aad14fb - Added new config entris for messaging: ou_receivers_no_notice and ou_receivers_private
- MessageLib:
	- Renamed method sendAllNotices to sendAllEmailNotices
	- Renamed method _sendOneNotice to _sendNoticeEmails
	- Renamed method _sendNotice to _sendNoticeEmail
	- If the recipient contact is empty is not anymore a blocking error
- Recipient_model->getMessageById renamed to getMessagesById, not it accepts an array of message ids, could return more results
- Fixed bug in public/js/messaging/writeReply.js to send subject value
2020-02-17 18:29:07 +01:00
Paolo 11f3fad1f7 Changed logic to send notice email to a message recipient 2020-02-14 19:17:09 +01:00
Paolo 8f908887be - Method parseMessageText of controller system/messages/Messages could accept also the prestudent_id parameter
- If prestudent_id parameter then CLMessagesModel->parseMessageTextPrestudent is called
- Fixed show_error(getData error in model CLMessagesModel
- Added new method parseMessageTextPrestudent to model CLMessagesModel
- Method _prepareHtmlWriteTemplate of model CLMessagesModel now checks if data are from a prestudent and then uses MessageLib->getMessageVarsPrestudent
- Added new method getMessageVarsPrestudent to MessageLib
- Function parseMessageText in js/messaging/messageWrite.js could call system/messages/Messages/parseMessageText with prestudent_id parameter
2020-01-24 18:13:03 +01:00
Paolo ece06bc462 Notice email for all people allowed to receive messages for an organisation unit 2019-11-06 16:34:20 +01:00
Paolo 2a4360862a - Reply Button in Inbox/outbox Page
- Write new message Button with Layer/Popup
- Degree Programs drop down displays longer name (if prestudent bestätigt (alias interessent with bestaetigtam != null ) receiver-> dp, otherwise -> infocenter)
- SQL to get OU recipient doesn't use beginn / End of function
- Always set insertvon in tbl_msg_status
- Add Multilanguage Support for Message Page (not completed yet)
- If in sent mode do not set messages as read
- Error message when there are no Messages available shouldnt be displayed
2019-10-30 18:35:46 +01:00
Paolo 34dc82766a - Renamed public/js/messaging/messageClient.js to public/js/messaging/read.js
- Added new JS public/js/messaging/write.js used in view application/views/system/messages/ajaxWrite.php
- Added new public method write, listReceivedMessages, listSentMessages and sendMessageToOU to controller system/messages/MessageClient.php
- Removed private method _getReceiversByOekurzbz from MessageLib
- Fixed method sendMessageOU of MessageLib
- Added new public method prepareAjaxWrite to model CL/Messages_model
- Fixed method prepareAjaxReadReceived of model CL/Messages_model
- Added new public method prepareAjaxReadSent to model CL/Messages_model
- Changed method CL/Messages_model->_personLog interface
- Added new public method getOrganisationunitsByPersonId to crm/Prestudent_model
- Added new public method getReceivedMessages to model system/Recipient_model
- Changed getReceivedMessages method of model system/Recipient_model
- Changed view system/messages/ajaxRead.php
- Added new view system/messages/ajaxWrite.php
2019-06-28 19:01:25 +02:00
Paolo 99570978c3 - Renamed view system/messages/messageHTML to system/messages/htmlRead
- Renamed view system/messages/messageWriteReply to system/messages/htmlWriteReply
- Removed views system/messages/messageReplySent and system/messages/messageForm
- Moved logic from controller ViewMessage to model CL/Messages_model
- Added new constants CFG_REDIRECT_VIEW_MESSAGE_URL to MessageLib
- Removed public method getPersonData from model system/MessageToken_model
- Changed query in method system/Recipient_model->getMessage to include column tbl_msg_recipient.sent
- Added new public method prepareHtmlRead to model CL/Messages_model
- Changed constant REPLY_BODY_FORMAT of model CL/Messages_model
- Added new constant NO_AUTH_UID to model CL/Messages_model
- Added new public method prepareHtmlWriteReply to model CL/Messages_model
- Changed public method sendReply of model CL/Messages_model
- Added new private method _getReplyBody to model CL/Messages_model
- Changed method _personLog of model CL/Messages_model to manage not authenticated users
2019-06-19 14:51:54 +02:00
Paolo f6e0f58b3d - Renamed view system/messages/messageSent.php to system/messages/htmlSuccess.php
- Added new view system/messages/htmlError.php
- Renamed view system/messages/messageWrite.php to system/messages/htmlWriteTemplate.php
- Added new widget views: widgets/Dropdown_widget.php and widgets/MultipleDropdown_widget.php
- Added new CSS public/css/Widgets.css
- Controller system/FASMessages:
	- Renamed method write to writeTemplate and method writeReply to writeReplyTemplate
	- Removed all the private methods and moved all the logic to model CL/Messages_model
	- Methods writeTemplate and writeReplyTemplate do not need anymore the sender id as parameter
- Controller system/Messages:
	- Renamed method write to writeTemplate
	- Renamed method send to sendImplicitTemplate
	- Renamed method sendJson to sendExplicitTemplateJson
	- Moved all the logic to model CL/Messages_model
- Adapted php and JS code to use these new methods names and interfaces
- Removed public method getIsAdmin from MessageLib
- Method _sendMessage of MessageLib now returns the saved message ids
- Added new package olifolkerd/tabulator to composer
- Added new parameter widgets to view templates/FHC-Header.php
- Added new HTML widget widgets/Dropdown_widget and widgets/MultipleDropdown_widget
- Added constants REPLY_SUBJECT_PREFIX and REPLY_BODY_PREFIX to model CL/Messages_model
- Added new public methods prepareHtmlWriteTemplatePersons, prepareHtmlWriteTemplatePrestudents, sendImplicitTemplate, sendExplicitTemplate, getVorlage, parseMessageText and getMessageFromIds to model CL/Messages_model
- Added new private methods _getAuthUser, _lowerReplaceSpaceArrayKeys, _addOeToPrestudents, _personLog and _prepareHtmlWriteTemplate to model CL/Messages_model
2019-06-18 18:25:26 +02:00
Paolo 0ef94aacda - Fixed query method getMessages in model models/system/Recipient_model.php
- Changed interface method sendMessages of job jobs/MailJob.php
- Added function terminateWithError to helper helpers/hlp_common_helper.php
- Changed method overrideConfigs of library MailLib
- Removed method getConfigs from library MailLib
- Added public method getEmailNumberToSent to library MailLib
- Changed method sendAllNotices of library MessageLib
- Renamed private method _sendNotice to _sendOneNotice in library MessageLib
- Added new private methods _loadDbNoticeEmailTemplate, _loadFsNoticeEmailTemplate and _sendNotice to library MessageLib
- Changed method _getNoticeBody in library MessageLib
- Removed methods _getNoticeHTMLBody and _getNoticeTXTBody from in library MessageLib
2019-06-13 18:23:24 +02:00
Paolo 8135c6275e - Fixed query building in method getMessages of model models/system/Recipient_model.php
- Better code in controller api/v1/system/Message.php
- Adapted controller api/v1/system/Message.php to use sendMessageUser and sendMessageUserTemplate methods from MessageLib
- Adapted model models/CL/Messages_model.php to use sendMessageUser and sendMessageUserTemplate methods from MessageLib
- Adapted model models/CL/Messages_model.php to use function parseText
- Removed constant MSG_INDX_PREFIX from MessageLib
- Added constants to MessageLib: CFG_SYSTEM_PERSON_ID, CFG_SEND_IMMEDIATELY, CFG_MESSAGE_SERVER, CFG_MESSAGE_HTML_VIEW_URL, CFG_OU_RECEIVERS, NOTICE_TEMPLATE_HTML, NOTICE_TEMPLATE_TXT, NOTICE_TEMPLATE_FALLBACK_HTML, NOTICE_TEMPLATE_FALLBACK_TXT, EMAIL_KONTAKT_TYPE and SENT_INFO_NEWLINE
- MessageLib does not load anymore library parser
- Improved MessageLib code
- Added private methodis _sendMessage, _getSender, _getNoticeBody, _getNoticeHTMLBody, _getNoticeTXTBody and _ouExists to MessageLib
- Added public methods sendMessageUser, sendMessageUserTemplate and sendMessageOU to MessageLib
- Renamed method sendAll to sendAllNotices in MessageLib
- Renamed method sendOne to _sendNotice and changed it from public to private
- Renamed method _checkReceiverId to _getReceiversByPersonId
2019-06-13 15:57:45 +02:00
Paolo d4c7f1f18d Merge branch 'master' into cleanci 2019-04-30 13:14:37 +02:00
Paolo 3b4012798f Fixed some comments typo 2019-04-30 13:13:34 +02:00
Paolo 699aca74d1 - Changed helper and language autoload
- Changed language config
- Removed never used constants
- Changed rest_language in rest config file
- Adapted models that where extending FHC_Model
- Adapted code to load hlp_return_object
- Adapted code to use exit status codes constants
2019-04-25 12:09:31 +02:00
Paolo 2d7cc09d02 - Added new model CL/Messages_model.php
- Moved logic from controllers system/Messages and ViewMessage to CL/Messages_model
- Better code
- MessageLib and PersonLogLib methods do not use anymore show_error and return success/error object
- helpers/hlp_message_helper: hasData function changed
2019-02-25 15:23:31 +01:00
Paolo e93ee71466 Removed not implemented method 2019-02-15 15:34:48 +01:00
Paolo a913482ef4 - Added private method _replaceKeys to controller system/Messages.php
- Fixed replacement of keys in the message vars array
2019-02-15 15:30:04 +01:00
Paolo fad7894ec8 Halfway commit 2019-02-08 17:20:36 +01:00
Paolo 91fbabde6f - Added new directory application/views/system/messages/
- Moved application/views/system/message* to application/views/system/messages/
- Adapted code to use those views with the new path
- Fixed function getCode in public/js/AjaxLib.js
- In public/js/messaging/messageWrite.js is now used AjaxLib.js
- Changed method parseMessageText in MessageLib.php to replace the keys of the data parameter
- Removed function write from application/controllers/system/Phrases.php
- Adapted code in application/controllers/system/Messages.php to use the changed method parseMessageText in MessageLib.php and path of the moved views
2019-02-06 18:18:57 +01:00
Paolo 2bf2cac383 - Added new method writeReply to FASMessages
- Moved logic from Messages and MessageLib to MessageLib\
- Better code in views/system/messageWrite.php
- Adapted content/messages.js.php to use writeReply
2019-02-01 12:04:20 +01:00
Paolo 306da46c80 - Removed messagelink from controller system/infocenter/InfoCenter.php
- Improved MessageLib
- Added method getMessageVarsPerson to MessageLib
- Moved JS from views/system/messageWrite.php to public/js/messaging/messageWrite.js
- Added new controller controllers/system/FASMessages.php
- Adapted content/fasoverlay.js.php and content/messages.js.php to use FASMessages
2019-01-25 17:16:57 +01:00
alex a28df53718 Infocenter changes
- new button for Freigabe zum Reihungstest, sending message to bewerber when freigabe
- button Freigabe for Studiengang with Statusgrund
- Ausbildungssemester can be saved
- Using Vorlagen for Freigabe Mail to assistance and message to bewerber
- Added Nation of address at details page
- Scroll to top button on details page
- moved messageList js to own file
2018-11-30 16:48:28 +01:00
Paolo d08eb75b5a Adapted MessageLib, PhrasesLib and UDFLib to use the function getUserLanguage from language_helper 2018-07-05 12:13:02 +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 d04b0450da - AuthLib is loaded only in fhcauth_helper, PermissionLib and REST_Controller
- Removed all the NOT usefull loads of helpers and libraries
- Fixed undefined index in controllers/system/UDF and model system/UDF_model
- APIv1_Controller now loads helper fhcauth
- FHC_Controller now loads ithe fhc and session helpers too
- Added/Fixed comments
- PermissionLib does NOT use anymore the getAuthUID function from the fhcauth helper, now relies on AuthLib directly
- REST_Controller loads directly the AuthLib when is needed
2018-06-27 13:12:46 +02:00
Paolo d4e6027c7c Removed load->helper->('message') from libs 2018-06-27 11:26:42 +02:00
Andreas Österreicher 3c7336a910 Infomails über neue Messages werden jetzt immer mit System-User versandt 2018-03-06 16:27:22 +01:00
Andreas Österreicher 34bc23b284 Bugfix für Text-Messages beim Versand von einzelnen Mails 2018-02-26 17:12:32 +01:00
Andreas Österreicher 0a8285ed03 Messaging Mail Template can be overwritten in the Database 2018-02-21 23:53:50 +01:00
Andreas Österreicher 45485ee02a Fixed Bug where wrong Messages are sent if they are not sent immediately
Messages are only sent with the Employee-Adress of the Sender instead of
the private Address. If the Sender is not an Employee, the Messages are
sent with the System-EMail
2018-02-21 23:27:24 +01:00
Andreas Österreicher 7c2445dc89 Messages im FAS werden nach Datum sortiert anstatt nach Betreff 2018-02-20 18:42:23 +01:00
Andreas Österreicher bd2318bd38 MailDebug now also "works" with invalid Mail
Fixed Typo and Intendation
2018-02-20 17:17:56 +01:00
alex 590021a8e2 fixed typo 2018-02-02 16:34:14 +01:00
Paolo 0bc0a09bf4 - Removed file system execute permission for all files (no directories)
- application/extensions file system permission now is 775
- application/logs file system permission now is 775
- Added extensions directory in application/: config, controllers, helpers, hooks, libraries, models, views and widgets
- Added view views/extensions/manage.php
- Added controller controllers/system/extensions/Manager.php
- Added library ExtensionsLib to manage extensions
- Added model models/system/Extensions_model.php
- Moved code related to print out info from MigrationLib to EPrintfLib
2017-11-13 10:45:49 +01:00
Andreas Österreicher 5cf943d586 Corrected wrong default language constant 2017-10-29 17:11:54 +01:00
Paolo 014f063391 Fixed wrong comments in MessageLib 2017-10-18 15:04:52 +02:00
Paolo 7c25d6474c Changed methods:
- getMessagesByPersonID
- getMessagesByUID
- getSentMessagesByPerson
- getCountUnreadMessages
of controller system/Message to get messages also with a given organisation unit
2017-09-19 19:02:55 +02:00
Paolo 3e74029552 If the recipient is an employee and has a UID then send the email to UID@Domain 2017-09-07 13:43:56 +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