42 Commits

Author SHA1 Message Date
ma0048 f7bd49b408 - master messages an studiengang, wenn bereits bestaetigt
- lehrgang messages direkt an lehrgang
2022-10-28 10:56:02 +02:00
Paolo 8e0734ca8c Added check in CL/Messages_model->sendReply to check that $receiver_id, $relationmessage_id and $token match in the database to avoid to be able to write to anyone using a token 2022-08-30 17:31:04 +02:00
Paolo e4aa42ad58 models/CL/Messages_model->getVorlage now filters out the _not_ active
templates
2021-07-21 10:39:52 +02:00
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 596494708d CL/Messages_model->prepareHtmlRead changed to redirect to an
authenticated controller to reply to a message in case the receiver
is the the system sender
2020-06-17 14:57:01 +02:00
Cris 742c9fa857 Check that user is an active employee in message-cronjob
Signed-off-by: Cris <hainberg@technikum-wien.at>
2020-06-04 11:33:58 +02:00
Cris 8b80f2226e Added logic for cronjob to add senders fields into message body
Signed-off-by: Cris <hainberg@technikum-wien.at>
2020-06-02 15:03:31 +02:00
Cris 4f1796ee9d Added logic to add message vars data of logged in user into message body
Signed-off-by: Cris <hainberg@technikum-wien.at>
2020-05-28 09:48:31 +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 a1600c9f3a CL/Messages_model->sendImplicitTemplate now writes the person log in any case 2020-05-13 17:55:56 +02:00
Andreas Österreicher 4679701bcd Merge branch 'feature-6963/Messaging_system_hide_button_to_write' 2020-04-21 15:16:38 +02:00
Andreas Österreicher 900d93fb4d Merge branch 'feature-6789/Messaging_answer-Button_for_assistants' 2020-04-21 14:48:49 +02:00
Paolo 35970696ca CL/Messages_model->prepareHtmlRead hide reply button only if the sender
is not the system sender and are present configurations to reply
2020-03-31 21:48:55 +02:00
Paolo e038fa4f34 - system/messages/MessageClient->read now loads view system/messages/ajaxRead with $this->CLMessagesModel->prepareAjaxRead() as parameter
- view system/messages/ajaxRead.php can hide the button to write new messages
- Added new public method prepareAjaxRead to model CL/Messages_model
2020-03-31 21:28:16 +02:00
Paolo 625b0f1167 - jobs/OneTimeMessages->sendMessageToApplicantsStillWaiting now accept
new message senderId to specify the sender for all the messages
- jobs/OneTimeMessages->sendMessageToApplicantsStillWaiting adapted code
to make use of the new method CLMessagesModel->sendExplicitTemplateSenderId
- jobs/OneTimeMessages->sendMessageToApplicantsStillWaiting now logs the
number of prestudents retrieved from database
- Renamed CLMessagesModel->sendExplicitTemplate as CLMessagesModel->sendExplicitTemplateSenderId
- Added new parameter sender_id to CLMessagesModel->sendExplicitTemplateSenderId to specify the sender person id
- Added new public method sendExplicitTemplate to CLMessagesModel as
wrapper method for sendExplicitTemplateSenderId
- CLMessagesModel->sendExplicitTemplate tries to retrieve the sender id
from the authentication session
2020-03-31 20:21:18 +02:00
Paolo e3257eef25 - CL/Messages_model->sendExplicitTemplate now gets the sender id from
the configuration if the user is not logged (ex. job)
- Added new job application/controllers/jobs/OneTimeMessages.php
2020-03-30 22:44:03 +02: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
Andreas Österreicher 1ac1c118d5 Fixed Message Reply 2020-02-20 15:53:43 +01:00
Paolo 0b3d5e19a3 CL/Messages_model->sendReply now uses as sender id the logged user person id or the previous message recipient id 2020-02-20 14:39:37 +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 11f3fad1f7 Changed logic to send notice email to a message recipient 2020-02-14 19:17:09 +01:00
Paolo 6882199d0e Bugfixes to allow to write to a person or to a prestudent from different GUIs 2020-02-12 14:43:11 +01:00
Manfred Kindl 98b2abeb51 BugFix show PreStudent Variables instead of Person Variables in Msg 2020-02-12 09:40:19 +01:00
Paolo c7b33fe160 Bugfix: FAS write page person id and prestudent id are swapped 2020-02-11 16:04:08 +01:00
Paolo 53ac4d11ba Do not retrieve the degree program name from studiengang table but directly from the organization unit table
in student sent messages page and student write to organisation unit page
2020-02-04 14:42:53 +01:00
Paolo d496bf5993 When the recipient is infocenter then place a * close to the drop down description and a note under the tinymce box. 2020-02-03 16:44:29 +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 3e72f399be Infocenter is now hardcoded in recipient messages to avoid to display an empty "message to" 2020-01-22 15:04:07 +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 c62b4dc018 - Added new public method setMessageRead to system/messages/MessageClient
- system/Recipient_model methods getReceivedMessages and getSentMessages now retrieve person_id from tbl_msg_status
- Added new public method setMessageRead to CL/Messages_model
- Improved code in public/js/messaging/read.js
2019-07-04 11:15:07 +02:00
Paolo 99e541d506 Fixed receiver/sender retrieved from database 2019-06-28 19:18:18 +02: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 27ccd086ac - Added new functions getAuthFirstname and getAuthSurname to helper hlp_authentication_helper
- Added methods getReceivedMessages and getSentMessages to model system/Recipient_model.php
- Added jqueryui and dialoglib to view system/messages/ajaxRead
- Added method prepareAjaxRead to model CL/Messages_model
- Removed private method _getAuthUser from model CL/Messages_model
- Adapted code in model CL/Messages_model to use functions isLogged and getAuthPersonId
2019-06-24 17:32:31 +02:00
Paolo b364cfae06 - Moved controllers FASMessages and Messages to system/messages/
- Adapted code to use the new path
2019-06-19 15:29:17 +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 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 e1ed8b55f5 Fixed models 2019-04-26 12:51:02 +02:00
Paolo c84c484a2a Fixed models 2019-04-26 12:43:51 +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