ÿØÿà JFIF    ÿÛ „  ( %!1"%)+...383-7(-.+  -%%--------+------------/----------------------------ÿÀ  ¶" ÿÄ     ÿÄ @    !1AQaq‘¡"±ÁÑð2’BRráS‚ñ3b¢CT²Ò #cÿÄ    ÿÄ '   1!AQ2a"‘±#ÿÚ   ? ò(/p‘—–¢·,M|¯G»R£üešT. ôŸEoCFñ‡ 4ÔkåóxR|µÁ¨ÓDà!Ç´µ˜‡p ÍQ‹§!þž^õWsŒy  åÁ§$á«%ºq˜™JyyË0y«^Ϗ -3ÃÏËÈ£Æ\P’ä„s&•‹Üs üô'àWt¹pñCp$bÚF`·7.^)¾!)ÒÙ˜–ÅÏš^h¾ø³·ìe±ŒaeÖ—Í,e=B}Jéߦ$$½—šÙÜCC¯¶è8β–Åkèwx LÉngT±æ¹£Ócœ¿Í/©Éÿ ‰ÚCÒ­mq;Tt¶–}0"zÖPcd1š­¤tˆ„ÐÓâqú[™öUCŠ2޿د­É(¸ßúçšmW,Ò ºf‹Ån™ÄLêÁ8üÁkÁ€L¥ÍuJ1œôrÂSŒÓöt!7EUíïb)AËi¬â-ÙHk8òÁiXYwÅ)O^"ÇØriÛô{»wRUKÙÏÚlÓ¬€‚’שT ] ªb—ÊîKC^×M“xùäñz¬zJ× {4[¹M'IÆeH1LCWÕ]œûº WDæà°OÅ‚¹c²ÞuA–rL`HšpCez‡V’— Ž‚Ë„–ñ­'µR0ÕÖ=À:±G»C\nÆÉ5*¢ †3šhQ4ýÒi$Õ1"Ü]¢p-q3zcQ$ªö¨¥æf›‘»´ÝÚHá„e²JÇ–iÊ:·à¬Øc5Åk»Laª*wi [0Ówk ¦a¦0Õ²ÅÅ‚T¸’³q:Æ<¹ú Ò˜Æ}2VE•Ѐp¡Ô3Úº …h³^LJºçì¥Ánó|˜ÖˆÎˆ+« ¦dø‘Mº–d\ªDðÛ„Ì×LÝ——Ð9Ç|•FèçVm™¨€™3õS–9Äå¢<̉Ìm¢±`·º˜&Z²ž Ë®D«¶»6™‰©­HÈ Àá«h­i³04æ’hxœi3ï¨(ÓL·†‹¶ËpŒ ƒÜÒ? :õdsÀ –3æÓ·Üjâ¬9—]8n¼&]I F£¼…ì–—Œ0v°LǐÅfÛ2TÖ’aµ˜N@ÖBSÏ^à´4-±°b×nÈÈœÆD=KdŒø…ÄÈK,›ÖR§fjü$^ÔÎ!„6^ s:Üun\ôkCÞò÷<—Lúl Í›G¹ÀPá¼Nc¡šÒ…ÙWͳœ±vÊáЄ×9‹P‰cEØ‘™›µŸP<×g1 º©Ø¬wiÁ^l5× I/';Ë+´Z‡ÓÄFÕp[Èð’ HÄ ó 9¬Dl4“é±Ï”V=^Hð;žLädÉa‚°Ë,#/Ž~²BÔÛ QãñQtIeórVB,ÏÂf‹4#Μc‹É3ZIÖ Œ¢¥·üxa‡Ãçè„jŠ[5 Ä!U?,3žÎ×…ðdÓ÷háŠA‰ìÄ4÷ÃÜZÃE{‰®+W\ZÍE[‰»µk»MÝ­`¢©†˜ÃV‹-f¢¡†¢a«eŠ%«Y¨©q%jâd,Ôq`) ¤¦…šˆ ¦E>0Ùb²t–Ÿ  ÷jsςҒKÈcø(é›;k(’#ôŒQ ™C> õ³M9óºÆµ¤çâ;uÀ)5>RÔ¸fÓ~Ȧ—’-$fe«"FâUˆÊwµPÏu w+"åÉó¨6s™Û9(À¨ù©hE°½†n`m~“@©›p!Vkhµ Á1šbEqqÊ@ºèl›2 –Yã%‘‚hÛ{a¶‡ÅÞM²¬çL34®Çl]®‹ŽØŒm'RÜe35æöˆ­Á­ cP9šeÁköo´L³Ì=p8]”‡B¶,šº|ɏdzXˆØk*ÇÚ{#ñ‰pã(€¶‡9ý'šÜ³½¯kƒ†Â’ëSOƒ•Å®H6+a¢µˆ‹Y¨b˜b+XˆÖ!°u!¢"µˆˆn2ˆ Å0Ä`Å Ô®c(ÓÜGº•Ä»Œ âWî%q.áÐÄ÷î%umÍ£+ÜQ,Vn¦-GphU¸¢X­&,Gt ·K¢ÅÅ·¥RÄÊÉbKn N­R2g$VµÕó Qr#–ÓZUÏð0ÎtÙÀœz ëöo“Îk¯n„T°"SÞ+³/…€½"ižãO%Í%&Δâ‘ËØ´IˆÓ°Ë‰ÞM3.™yçÁzit›`4C`k¢¼á!álÄï sÂ[×!¤l¾æo"ƒIÔ'@ªu)3›ô®“@Z à¾] üœ'‡4¸PÞkÁ-qÄH‰ÓÍBd´ÿ —¹°ÄA&ÊUC„öz‚‚RæŠtf¬>˜ÑidšEçÑL÷áý¡V±h§­c¿¥¨ƒ@g¼…Ýö^ÞËc.ž„æ“I[ ª+·zÐÒÚ,½Ð»¶€C›7jk$๖€Ž¾ÅÙpp¶ÍþéΤ ½ØÎŒq ñpæžÅ¥#Øâ49ÃÂK^MYV“,¶Éz_òæ:…;Õ«¦I3âJ£¤û5$7Èxün\â]Êe¯(Ÿ&Ž‹¶2<6Ćf× æ¢ƱqWı[(ÙÂŽç‚T7¨@ÈÉÍß‚ïÙ"&3TYlGށ†)†#5ŠA©^T2ÆÁ†)©†©†¤yGXÁ†©"†)©¼ÅV WS†#©]R–r‹q5ÕbâWþBh¯u+ªÅÄ×ü„nÑ^êkªÁj‰jeœWˆÕÕ`µDµ2Ì+Ä µDµµ5Ô{¤Þ0RF’H÷AÛ<ÊÁ§ ƈæ0Ñ£ê4 öÚµ[¬/1²€â<-¬šö²r×0o×w ´xÐÒË„ g01¬„åEM蛇Ã\6µE›‘fÙO k÷CºnÓ1`iîÒ² áÂ!ÑLÄÿ ³¬\õ*:M=Ç»c‹2[‰ØsÕLò\ŒK L^™üÄN\¶#» Ç\……ßïIœÉ$¸ÎñÍ®ÔHÇ Ûí/´>Li”„†g^$ 7NÍÑÑ2M2ªNg=k½Ð}Ÿl6‡ —JWˆ”ÞéT·+µ¦üÂFè¢Vs6ýÆ4»2+2IÝ9ô9®ÇGÙÇ1+Ä8;*Õ§ž½D*îÑWÚçá3Ma¤·ˆ¥t}š²Ü…Q+Æüµ8HíS”üxGéÁˆ¦Ël„éÈ 5 µÄƒ6äÜ(kIš¯S†fÖ&¸®×v|Äyˆ*禌Éù@7-®Ä[]ÎÖ¿ê`º…=:…žJVnݳvðÖKE¼‚ »mà ÷f®:Ë ™–4rð¡4` ܹçž~‹C=œ…¾Ïj|VDtK.ƒ"9 Ï ­–éXá³6WÒïIL-Ї Ç PK\ styles.cssnu[.block_search_forums .searchform { text-align: center; } .block_search_forums .searchform img { vertical-align: middle; } .block_search_forums .searchform img.resize { width: 1em; height: 1.1em; } .block_search_forums .invisiblefieldset { display: block; }PK\J&6h db/access.phpnu[. /** * Search forums block caps. * * @package block_search_forums * @copyright Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $capabilities = array( 'block/search_forums:addinstance' => array( 'riskbitmask' => RISK_SPAM | RISK_XSS, 'captype' => 'write', 'contextlevel' => CONTEXT_BLOCK, 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW ), 'clonepermissionsfrom' => 'moodle/site:manageblocks' ), ); PK\uklang/en/block_search_forums.phpnu[. /** * Strings for component 'block_search_forums', language 'en', branch 'MOODLE_20_STABLE' * * @package block_search_forums * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['advancedsearch'] = 'Advanced search'; $string['pluginname'] = 'Search forums'; $string['search_forums:addinstance'] = 'Add a new search forums block'; $string['privacy:metadata'] = 'The Search forums block only shows data stored in other locations.'; PK\AC version.phpnu[. /** * Version details * * @package block_search_forums * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2025040800; // Requires this Moodle version. $plugin->component = 'block_search_forums'; // Full name of the plugin (used for diagnostics) $plugin->dependencies = ['mod_forum' => 2025040800]; PK\J85classes/privacy/provider.phpnu[. /** * Privacy Subsystem implementation for block_search_forums. * * @package block_search_forums * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_search_forums\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for block_search_forums implementing null_provider. * * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider { /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ public static function get_reason(): string { return 'privacy:metadata'; } } PK\w5//classes/output/renderer.phpnu[. /** * Block search forums renderer. * * @package block_search_forums * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_search_forums\output; defined('MOODLE_INTERNAL') || die(); use plugin_renderer_base; use renderable; /** * Block search forums renderer. * * @package block_search_forums * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class renderer extends plugin_renderer_base { /** * Render search form. * * @param renderable $searchform The search form. * @return string */ public function render_search_form(renderable $searchform) { return $this->render_from_template('block_search_forums/search_form', $searchform->export_for_template($this)); } } PK\<classes/output/search_form.phpnu[. /** * Search form renderable. * * @package block_search_forums * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_search_forums\output; defined('MOODLE_INTERNAL') || die(); use help_icon; use moodle_url; use renderable; use renderer_base; use templatable; /** * Search form renderable class. * * @package block_search_forums * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class search_form implements renderable, templatable { /** @var int The course ID. */ protected $courseid; /** @var moodle_url The form action URL. */ protected $actionurl; /** @var help_icon The help icon. */ protected $helpicon; /** * Constructor. * * @param int $courseid The course ID. */ public function __construct($courseid) { $this->courseid = $courseid; $this->actionurl = new moodle_url('/mod/forum/search.php', ['id' => $courseid]); $this->helpicon = new help_icon('search', 'core'); } public function export_for_template(renderer_base $output) { $data = [ 'action' => $this->actionurl, 'helpicon' => $this->helpicon->export_for_template($output), 'hiddenfields' => (object) ['name' => 'id', 'value' => $this->courseid], 'inputname' => 'search', 'searchstring' => get_string('search') ]; return $data; } } PK\I&templates/search_form.mustachenu[{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template block_search_forums/search_form This template renders the search form. Example context (json): { "action": "https://moodle.local/admin/search.php", "inputname": "search", "searchstring": "Search settings", "value": "policy", "hiddenfields": [ { "name": "course", "value": "11" } ], "helpicon": "" } }}
{{>core/search_input}}
{{#str}}advancedsearch, block_search_forums{{/str}} {{#helpicon}} {{>core/help_icon}} {{/helpicon}}
PK\Uj j .tests/behat/block_search_forums_course.featurenu[@block @block_search_forums @mod_forum Feature: The search forums block allows users to search for forum posts on course page In order to search for a forum post As a user I can use the search forums block Background: Given the following "users" exist: | username | firstname | lastname | email | idnumber | | teacher1 | Teacher | 1 | teacher1@example.com | T1 | | student1 | Student | 1 | student1@example.com | S1 | And the following "courses" exist: | fullname | shortname | category | | Course 1 | C1 | 0 | And the following "course enrolments" exist: | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | news_items | Course | C1 | course-view-* | side-pre | | search_forums | Course | C1 | course-view-* | side-pre | And I am on the "Course 1" "course editing" page logged in as teacher1 And I set the field "id_newsitems" to "1" And I press "Save and display" And the following "mod_forum > discussions" exist: | user | forum | name | message | | teacher1 | Announcements | My subject | My message | Scenario: Use the search forum block in a course without any forum posts Given I am on the "Course 1" course page logged in as student1 When I set the field "Search" to "Moodle" And I press "Search" Then I should see "No posts" Scenario: Use the search forum block in a course with a hidden forum and search for posts Given I am on the "Announcements" "forum activity editing" page logged in as teacher1 And I expand all fieldsets And I set the field "id_visible" to "0" And I press "Save and return to course" When I am on the "Course 1" course page logged in as student1 And "Search forums" "block" should exist And I set the field "Search" to "message" And I press "Search" Then I should see "No posts" Scenario: Use the search forum block in a course and search for posts Given I am on the "Course 1" course page logged in as student1 And "Search forums" "block" should exist And I set the field "Search" to "message" And I press "Search" Then I should see "My subject" PK\ARrXX1tests/behat/block_search_forums_frontpage.featurenu[@block @block_search_forums @mod_forum Feature: The search forums block allows users to search for forum posts on frontpage In order to search for a forum post As an administrator I can add the search forums block Background: Given the following "users" exist: | username | firstname | lastname | email | idnumber | | student1 | Student | 1 | student1@example.com | S1 | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | search_forums | System | 1 | site-index | side-pre | Scenario: Use the search forum block on the frontpage and search for posts as a user Given I log in as "student1" And I am on site homepage When I set the field "Search" to "Moodle" And I press "Search" Then I should see "No posts" Scenario: Use the search forum block on the frontpage and search for posts as a guest Given I log in as "guest" And I am on site homepage When I set the field "Search" to "Moodle" And I press "Search" Then I should see "No posts" PK\Pޝblock_search_forums.phpnu[. /** * Block to search forum posts. * * @package block_search_forums * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_search_forums extends block_base { function init() { $this->title = get_string('pluginname', 'block_search_forums'); } function get_content() { global $CFG, $OUTPUT; if($this->content !== NULL) { return $this->content; } $this->content = new stdClass; $this->content->footer = ''; if (empty($this->instance)) { $this->content->text = ''; return $this->content; } $output = $this->page->get_renderer('block_search_forums'); $searchform = new \block_search_forums\output\search_form($this->page->course->id); $this->content->text = $output->render($searchform); return $this->content; } function applicable_formats() { return array('site' => true, 'course' => true); } /** * Returns the role that best describes the forum search block. * * @return string */ public function get_aria_role() { return 'search'; } } PK\ styles.cssnu[PK\J&6h Qdb/access.phpnu[PK\uklang/en/block_search_forums.phpnu[PK\AC  version.phpnu[PK\J85classes/privacy/provider.phpnu[PK\w5//!classes/output/renderer.phpnu[PK\<classes/output/search_form.phpnu[PK\I&&templates/search_form.mustachenu[PK\Uj j .,tests/behat/block_search_forums_course.featurenu[PK\ARrXX1w6tests/behat/block_search_forums_frontpage.featurenu[PK\Pޝ0;block_search_forums.phpnu[PK C