ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ.. /** * Popup message processor * * @package message_popup * @copyright 2008 Luis Rodrigues * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later */ require_once(__DIR__ . '/../../../config.php'); //included from messagelib (how to fix?) require_once($CFG->dirroot.'/message/output/lib.php'); /** * The popup message processor * * @package message_popup * @copyright 2008 Luis Rodrigues and Martin Dougiamas * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class message_output_popup extends message_output { /** * Adds notifications to the 'message_popup_notifications' table if applicable. * * The reason for this is because we may not want to show all notifications in the notification popover. This * can happen if the popup processor was disabled when the notification was sent. If the processor is disabled this * function is never called so the notification will never be added to the 'message_popup_notifications' table. * Essentially this table is used to filter what notifications to display from the 'notifications' table. * * @param object $eventdata the event data submitted by the message sender plus $eventdata->savedmessageid * @return true if ok, false if error */ public function send_message($eventdata) { global $DB; // Prevent users from getting popup notifications from themselves (happens with forum notifications). if ($eventdata->notification) { if (($eventdata->userfrom->id != $eventdata->userto->id) || (isset($eventdata->anonymous) && $eventdata->anonymous)) { if (!$DB->record_exists('message_popup_notifications', ['notificationid' => $eventdata->savedmessageid])) { $record = new stdClass(); $record->notificationid = $eventdata->savedmessageid; $DB->insert_record('message_popup_notifications', $record); } } } return true; } /** * Creates necessary fields in the messaging config form. * * @param array $preferences An array of user preferences */ function config_form($preferences) { return null; } /** * Parses the submitted form data and saves it into preferences array. * * @param stdClass $form preferences form class * @param array $preferences preferences array */ public function process_form($form, &$preferences) { return true; } /** * Loads the config data from database to put on the form during initial form display * * @param array $preferences preferences array * @param int $userid the user id */ public function load_data(&$preferences, $userid) { global $USER; return true; } /** * Don't show this processor on the message preferences page. The user can't disable * the notifications for user-to-user messaging. * * @return bool */ public function has_message_preferences() { return false; } /** * Determines if this processor should process a message regardless of user preferences or site settings. * * @return bool */ public function force_process_messages() { global $CFG; return !empty($CFG->messaging); } /** * Remove all popup notifications up to specified time * * @param int $notificationdeletetime * @return void */ public function cleanup_all_notifications(int $notificationdeletetime): void { global $DB; $DB->delete_records_select('message_popup_notifications', 'notificationid IN (SELECT id FROM {notifications} WHERE timecreated < ?)', [$notificationdeletetime]); } /** * Remove read popup notifications up to specified time * * @param int $notificationdeletetime * @return void */ public function cleanup_read_notifications(int $notificationdeletetime): void { global $DB; $DB->delete_records_select('message_popup_notifications', 'notificationid IN (SELECT id FROM {notifications} WHERE timeread < ?)', [$notificationdeletetime]); } }