Commit Graph

40 Commits

Author SHA1 Message Date
ma0048 9dbb5291f4 - added limit 2024-10-03 11:17:09 +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
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 c54579ef7d /system/messages/MessageClient/read sent messages: read them all 2020-02-12 16:39:00 +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 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 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 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 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 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 a5b3f0ed88 - Moved constants EMAIL_KONTAKT_TYPE and SENT_INFO_NEWLINE from config/constants.php to MessageLib
- Added function parseTemplate to helper helpers/hlp_common_helper.php
- Changed method getMessages of model models/system/Recipient_model.php
- Changed views/templates/mailHTML.php and views/templates/mailTXT.php
2019-06-13 14:09:56 +02:00
alex 95e18e1ef1 possible to answer to messages with token without login 2018-05-18 19:28:27 +02:00
Paolo d9b80b790d Removed permission system from models 2018-03-29 12:13:08 +02: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
Paolo 4f818ccb42 - Changed method getMessagesByPerson Message_model to use the given oe_kurzbz as root of the organisation unit tree
- Changed methods getStudiengangBewerbung and getAppliedStudiengangFromNowOE of model Message_model to use the given oe_kurzbz as root of the organisation unit tree
- Changed methods getMessagesByUID, getCountUnreadMessages and getMessagesByPerson of model Recipient_model to use the given oe_kurzbz as root of the organisation unit tree
2017-10-03 11:31:02 +02:00
Paolo 1d1ca17dc1 Now the organisation unit parameter for methods:
- getMessagesByPersonID
    - getMessagesByUID
    - getSentMessagesByPerson
    - getCountUnreadMessages
of controller system/Message must be the root of the organisation unit tree
2017-09-20 11:33:41 +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
bison-paolo 76046c6b94 - Bugfix Reihungstest controller
- Bugfix method getCountUnreadMessages in Recipient_model
2017-02-02 12:03:23 +01:00
bison-paolo b99123efc6 Added method getCountUnreadMessages 2016-12-20 11:28:51 +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-paolo bfaf901550 - Added new template for plain text email
- Renamed template for html email mail.php -> mailHTML.php
- Changed method getMessageByToken of Recipient_model for getting only the last message by token
- Changed method getMessages of Recipient_model for getting event the token
- Changed method send of library MailLib to add the possibility to send an alternative plain text
body for a html mail
- Changed library MessageLib to add the possibility to send emails in html/text format to inform
the users about new messages
- Added method toHTML to controller Messages
- Added new configuration entries in message.php
- Added new view messageHTML.php
2016-10-06 16:27:04 +02:00
bison-paolo 21892e1ed4 Method getMessagesByPerson of model Recipient_model now returns only the latest status of a message 2016-09-26 14:50:42 +02:00
bison-paolo a90adbda72 Task #404: GUI zum Schreiben von Nachrichten im FAS: 3rd part 2016-09-26 13:08:03 +02:00
bison-paolo 3009a03eac Task #404: GUI zum Schreiben von Nachrichten im FAS: 2nd part 2016-09-26 12:10:31 +02:00
bison d6664e74c5 - Added element email_send_immediately in configuration array in mail.php
- Renamed sendOne to sendEmail
- Added new method sendOne
- Added $message_id parameter to method getMessages of model Recipient_model
2016-08-24 13:38:47 +02:00
paolo cec2bb1a27 - Added field status in the primary key array of model MsgStatus_model
- Changes in the logic of the messaging system, now every message status
is a new entry in the table tbl_msg_status
2016-07-27 13:27:55 +02:00
paolo d3bc72539a - message_helper.php fixed
- Changes in the logic of sending email
2016-07-26 18:19:13 +02:00
Paminger eb712f4242 Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
Conflicts:
	application/core/FHC_Model.php
2016-06-10 15:41:09 +02:00