ÿØÿà 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-\7`>   db/access.phpnu[. /** * Blog menu block caps. * * @package block_blog_menu * @copyright Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $capabilities = array( 'block/blog_menu: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-\܉Wlang/en/block_blog_menu.phpnu[. /** * Strings for component 'block_blog_menu', language 'en', branch 'MOODLE_20_STABLE' * * @package block_blog_menu * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['blog_menu:addinstance'] = 'Add a new blog menu block'; $string['pluginname'] = 'Blog menu'; $string['privacy:metadata'] = 'The Blog menu block only shows data stored in other locations.'; PK-\21 version.phpnu[. /** * Version details * * @package block_blog_menu * @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_blog_menu'; // Full name of the plugin (used for diagnostics) PK-\ &classes/privacy/provider.phpnu[. /** * Privacy Subsystem implementation for block_blog_menu. * * @package block_blog_menu * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_blog_menu\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for block_blog_menu 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-\s'block_blog_menu.phpnu[. /** * Blog Menu Block page. * * @package block_blog_menu * @copyright 2009 Nicolas Connault * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * The blog menu block class */ class block_blog_menu extends block_base { function init() { $this->title = get_string('pluginname', 'block_blog_menu'); } function instance_allow_multiple() { return true; } function has_config() { return false; } function applicable_formats() { return array('all' => true, 'my' => false, 'tag' => false); } function instance_allow_config() { return true; } function get_content() { global $CFG, $OUTPUT; // detect if blog enabled if ($this->content !== NULL) { return $this->content; } if (empty($CFG->enableblogs)) { $this->content = new stdClass(); $this->content->text = ''; if ($this->page->user_is_editing()) { $this->content->text = get_string('blogdisable', 'blog'); } return $this->content; } else if ($CFG->bloglevel < BLOG_GLOBAL_LEVEL and (!isloggedin() or isguestuser())) { $this->content = new stdClass(); $this->content->text = ''; return $this->content; } // require necessary libs and get content require_once($CFG->dirroot .'/blog/lib.php'); // Prep the content $this->content = new stdClass(); $options = blog_get_all_options($this->page); if (count($options) == 0) { $this->content->text = ''; return $this->content; } // Iterate the option types $menulist = array(); foreach ($options as $types) { foreach ($types as $link) { $menulist[] = html_writer::link($link['link'], $link['string']); } $menulist[] = '
'; } // Remove the last element (will be an HR) array_pop($menulist); // Display the content as a list $this->content->text = html_writer::alist($menulist, array('class'=>'list')); // Prepare the footer for this block if (has_capability('moodle/blog:search', context_system::instance())) { $data = [ 'action' => new moodle_url('/blog/index.php'), 'inputname' => 'search', 'searchstring' => get_string('search', 'admin'), 'extraclasses' => 'mt-3' ]; $this->content->footer = $OUTPUT->render_from_template('core/search_input', $data); } else { // No footer to display $this->content->footer = ''; } // Return the content object return $this->content; } /** * Returns the role that best describes the blog menu block. * * @return string */ public function get_aria_role() { return 'navigation'; } /** * This block shouldn't be added to a page if the blogs advanced feature is disabled. * * @param moodle_page $page * @return bool */ public function can_block_be_added(moodle_page $page): bool { global $CFG; return $CFG->enableblogs; } } PK-\mtests/blog_menu_test.phpnu[. namespace block_blog_menu; use advanced_testcase; use block_blog_menu; use context_course; /** * PHPUnit block_blog_menu tests * * @package block_blog_menu * @category test * @copyright 2021 Sara Arjona (sara@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \block_blog_menu */ final class blog_menu_test extends advanced_testcase { public static function setUpBeforeClass(): void { require_once(__DIR__ . '/../../moodleblock.class.php'); require_once(__DIR__ . '/../block_blog_menu.php'); parent::setUpBeforeClass(); } /** * Test the behaviour of can_block_be_added() method. * * @covers ::can_block_be_added */ public function test_can_block_be_added(): void { $this->resetAfterTest(); $this->setAdminUser(); // Create a course and prepare the page where the block will be added. $course = $this->getDataGenerator()->create_course(); $page = new \moodle_page(); $page->set_context(context_course::instance($course->id)); $page->set_pagelayout('course'); $block = new block_blog_menu(); // If blogs advanced feature is enabled, the method should return true. set_config('enableblogs', true); $this->assertTrue($block->can_block_be_added($page)); // However, if the blogs advanced feature is disabled, the method should return false. set_config('enableblogs', false); $this->assertFalse($block->can_block_be_added($page)); } } PK-\ȓ # #,tests/behat/block_blog_menu_activity.featurenu[@block @block_blog_menu Feature: Enable Block blog menu in an activity In order to enable the blog menu in an activity As a teacher I can add blog menu block to a course 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 | | student2 | Student | 2 | student2@example.com | S2 | 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 | | student2 | C1 | student | Given the following "activity" exists: | activity | assign | | name | Test assignment 1 | | intro | Offline text | | course | C1 | | idnumber | 0001 | | section | 1 | | assignsubmission_file_enabled | 0 | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | blog_menu | Activity module | 0001 | mod-assign-view | side-pre | Scenario: Students use the blog menu block to post blogs Given I am on the "Test assignment 1" "assign activity" page logged in as student1 And I follow "Add a new entry" When I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog! | And I press "Save changes" Then I should see "S1 First Blog" And I should see "This is my awesome blog!" And I am on the "Test assignment 1" "assign activity" page And I follow "Blog entries" And I should see "S1 First Blog" And I should see "This is my awesome blog!" Scenario: Students use the blog menu block to view their blogs about the activity Given I am on the "Test assignment 1" "assign activity" page logged in as student1 And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this Assignment! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this Assignment!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page When I follow "View my entries about this Assignment" Then I should see "S2 First Blog" And I should not see "S2 Second Blog" And I should not see "S1 First Blog" Scenario: Students use the blog menu block to view all blogs about the assignment Given I am on the "Test assignment 1" "assign activity" page logged in as student1 And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this Assignment! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this Assignment!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page When I follow "View all entries about this Assignment" Then I should see "S1 First Blog" And I should see "S2 First Blog" And I should not see "S2 Second Blog" Scenario: Students use the blog menu block to view all their blog entries Given I am on the "Test assignment 1" "assign activity" page logged in as student1 And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this Assignment! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this Assignment!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page When I follow "Blog entries" Then I should see "S2 First Blog" And I should see "S2 Second Blog" And I should not see "S1 First Blog" Scenario: Teacher searches for student blogs Given I am on the "Test assignment 1" "assign activity" page logged in as student1 And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this Assignment! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this Assignment!" And I should see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I am on the "Test assignment 1" "assign activity" page And I follow "Add an entry about this Assignment" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" When I am on the "Test assignment 1" "assign activity" page logged in as teacher1 And I set the field "Search" to "First" And I press "Search" Then I should see "S1 First Blog" And I should see "S2 First Blog" And I should not see "S2 Second Blog" PK-\ff-tests/behat/block_blog_menu_frontpage.featurenu[@block @block_blog_menu Feature: Enable Block blog menu on the frontpage In order to enable the blog menu on the frontpage As an admin I can add blog menu block to the frontpage 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 | | blog_menu | System | 1 | site-index | side-pre | Scenario: Students use the blog menu block to post blogs Given I log in as "student1" And I am on site homepage And I follow "Add a new entry" When I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog! | And I press "Save changes" Then I should see "S1 First Blog" And I should see "This is my awesome blog!" And I am on site homepage And I follow "Blog entries" And I should see "S1 First Blog" And I should see "This is my awesome blog!" PK-\(  #tests/behat/block_blog_menu.featurenu[@block @block_blog_menu Feature: Enable Block blog menu in a course In order to enable the blog menu in a course As a teacher I can add blog menu block to a course Background: Given the following "users" exist: | username | firstname | lastname | email | idnumber | | teacher1 | Teacher | 1 | teacher1@example.com | T1 | And the following "courses" exist: | fullname | shortname | category | | Course 1 | C1 | 0 | And the following "course enrolments" exist: | user | course | role | | teacher1 | C1 | editingteacher | Scenario: Add the block to a the course when blogs are disabled Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block And the following config values are set as admin: | enableblogs | 0 | And I reload the page Then I should see "Blogging is disabled!" in the "Blog menu" "block" Scenario: Add the block to a the course when blog associations are disabled Given I log in as "admin" And the following config values are set as admin: | useblogassociations | 0 | And I log out And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blog entries" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" And I should not see "View all entries for this course" in the "Blog menu" "block" And I should not see "View my entries about this course" in the "Blog menu" "block" And I should not see "Add an entry about this course" in the "Blog menu" "block" Scenario: Add the block to a the course when blog associations are enabled Given I log in as "admin" And the following config values are set as admin: | useblogassociations | 1 | And I log out And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blog entries" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" And I should see "View all entries for this course" in the "Blog menu" "block" And I should see "View my entries about this course" in the "Blog menu" "block" And I should see "Add an entry about this course" in the "Blog menu" "block" Scenario: Add the block to a the course when RSS is disabled Given I log in as "admin" And the following config values are set as admin: | enablerssfeeds | 0 | And I log out And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should not see "Blog RSS feed" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" Scenario: Add the block to a the course when RSS is enabled Given I log in as "admin" And the following config values are set as admin: | enablerssfeeds | 1 | And I log out And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blog RSS feed" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" PK-\AM 3??*tests/behat/block_blog_menu_course.featurenu[@block @block_blog_menu Feature: Students can use block blog menu in a course In order students to use the blog menu in a course As a student I view blog menu block in a course 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 | | student2 | Student | 2 | student2@example.com | S2 | 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 | | student2 | C1 | student | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | blog_menu | Course | C1 | course-view-* | side-pre | Scenario: Students use the blog menu block to post blogs Given I am on the "Course 1" course page logged in as student1 And I follow "Add a new entry" When I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog! | And I press "Save changes" Then I should see "S1 First Blog" And I should see "This is my awesome blog!" And I am on "Course 1" course homepage And I follow "Blog entries" And I should see "S1 First Blog" And I should see "This is my awesome blog!" Scenario: Students use the blog menu block to view their blogs about the course Given I am on the "Course 1" course page logged in as student1 And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this course! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this course!" And I should see "Associated Course: C1" And I am on the "Course 1" course page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" And I am on "Course 1" course homepage When I follow "View my entries about this course" Then I should see "S2 First Blog" And I should not see "S2 Second Blog" And I should not see "S1 First Blog" Scenario: Students use the blog menu block to view all blogs about the course Given I am on the "Course 1" course page logged in as student1 And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this course! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this course!" And I should see "Associated Course: C1" And I am on the "Course 1" course page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" And I am on "Course 1" course homepage When I follow "View all entries for this course" Then I should see "S1 First Blog" And I should see "S2 First Blog" And I should not see "S2 Second Blog" Scenario: Students use the blog menu block to view all their blog entries Given I am on the "Course 1" course page logged in as student1 And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this course! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this course!" And I should see "Associated Course: C1" And I am on the "Course 1" course page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" And I am on "Course 1" course homepage When I follow "Blog entries" Then I should see "S2 First Blog" And I should see "S2 Second Blog" And I should not see "S1 First Blog" Scenario: Teacher searches for student blogs Given I am on the "Course 1" course page logged in as student1 And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | | Blog entry body | This is my awesome blog about this course! | And I press "Save changes" And I should see "S1 First Blog" And I should see "This is my awesome blog about this course!" And I should see "Associated Course: C1" And I am on the "Course 1" course page logged in as student2 And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | | Blog entry body | My unrelated blog! | And I press "Save changes" And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | | Blog entry body | My course blog is better! | And I press "Save changes" And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" When I am on the "Course 1" course page logged in as teacher1 And I set the field "Search" to "First" And I press "Search" Then I should see "S1 First Blog" And I should see "S2 First Blog" And I should not see "S2 Second Blog" PK-\7`>   db/access.phpnu[PK-\܉WJlang/en/block_blog_menu.phpnu[PK-\21  version.phpnu[PK-\ &classes/privacy/provider.phpnu[PK-\s',block_blog_menu.phpnu[PK-\mL%tests/blog_menu_test.phpnu[PK-\ȓ # #,r.tests/behat/block_blog_menu_activity.featurenu[PK-\ff-Qtests/behat/block_blog_menu_frontpage.featurenu[PK-\(  #Vtests/behat/block_blog_menu.featurenu[PK-\AM 3??*ctests/behat/block_blog_menu_course.featurenu[PK