ÿØÿà 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-Ї Ç PKz\`  styles.cssnu[/* Imitate mobile grid for activity card. */ .block_social_activities .activity-item .activity-grid { grid-template-columns: min-content 1fr min-content min-content min-content; grid-template-rows: 1fr repeat(4, min-content); grid-template-areas: "icon name actions" "visibility visibility visibility" "dates dates dates" "completion completion completion" "altcontent altcontent altcontent" "afterlink afterlink afterlink" "availability availability availability"; } .block_social_activities .activity-item .activity-grid.noname-grid { grid-template-columns: 1fr min-content; grid-template-areas: "actions" "visibility" "altcontent" "groupmode" "afterlink" "completion" "availability"; } .block_social_activities .activity-item .activity-grid.noname-grid .activity-actions { justify-self: end; } /* Hide extra edit elements in block space. */ .block_social_activities .activity-groupmode-info { display: none; } .block_social_activities .inplaceeditable.inplaceeditingon input { width: 100%; } PKz\ۮ%% db/access.phpnu[. /** * Social activities block caps. * * @package block_social_activities * @copyright Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $capabilities = array( 'block/social_activities:addinstance' => array( 'riskbitmask' => RISK_SPAM | RISK_XSS, 'captype' => 'write', 'contextlevel' => CONTEXT_BLOCK, 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW ), 'clonepermissionsfrom' => 'moodle/site:manageblocks' ), ); PKz\3A#lang/en/block_social_activities.phpnu[. /** * Strings for component 'block_social_activities', language 'en', branch 'MOODLE_20_STABLE' * * @package block_social_activities * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Social activities'; $string['social_activities:addinstance'] = 'Add a new social activities block'; $string['privacy:metadata'] = 'The Social activities block only shows data stored in other locations.'; PKz\3_$- version.phpnu[. /** * Version details * * @package block_social_activities * @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_social_activities'; // Full name of the plugin (used for diagnostics) PKz\S  classes/privacy/provider.phpnu[. /** * Privacy Subsystem implementation for block_social_activities. * * @package block_social_activities * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_social_activities\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for block_social_activities 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'; } } PKz\Bm  classes/output/blocksection.phpnu[. namespace block_social_activities\output; use core_courseformat\base as courseformat; use renderable; use section_info; use templatable; /** * Class blocksection * * @package block_social_activities * @copyright 2024 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class blocksection implements renderable, templatable { /** * The class constructor. * * @param courseformat $format the course format instance * @param section_info $section the section to render */ public function __construct( /** @var courseformat $format the course format instance. */ protected courseformat $format, /** @var section_info $section the section to render. */ protected section_info $section, ) { } /** * Export for template. * * @param \renderer_base $output * @return array */ public function export_for_template(\renderer_base $output) { $format = $this->format; $course = $format->get_course(); $section = $this->section; $sectionoutputclass = $format->get_output_classname('content\\section\\cmlist'); $sectionoutput = new $sectionoutputclass($format, $section); $cmlist = $output->render($sectionoutput); return [ 'siteid' => $course->id, 'cmlist' => $cmlist, 'sectionid' => $section->id, 'sectionname' => $format->get_section_name($section), 'sectionnum' => $section->sectionnum, 'editing' => $format->show_editor(), ]; } } PKz\1_!g templates/blocksection.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_social_activities/blocksection This mustache emulates a course single section structure inside a block. It requires to include several divs to emulate the structure of a course format. Example context (json): { "cmlist": "Sample", "siteid": 1, "sectionid": 1, "sectionname": "Sample", "sectionnum": 1, "editing": true } }}
{{! The section list is used by the content module to init the sections.}}
{{! The section need some bottom padding and margin for the dropzone. Otherwise the activities will cover the area. }}
{{#editing}} {{! The section header is used as a dropzone when the section is empty.}}
 
{{/editing}} {{{cmlist}}}
{{#js}} {{! The block should be fast to load, we only load the editor when needed.}} {{#editing}} require(['core_courseformat/local/content'], function(component) { // We want to include both block content and block footer in the selector // because the footer has the add activity button. component.init('.block_social_activities', {}); }); {{/editing}} {{/js}} PKz\38 UPGRADING.mdnu[# block_social_activities Upgrade notes ## 5.0 ### Removed - 'Activity' selector in social_activities block has been deleted. For more information see [MDL-83733](https://tracker.moodle.org/browse/MDL-83733) PKz\#tests/behat/edit_activities.featurenu[@block @block_social_activities @format_social Feature: Edit activities in social activities block In order to use social activities block As a teacher I need to add and edit activities there Background: Given the following "course" exists: | fullname | Course 1 | | shortname | C1 | | format | social | | numsections | 0 | And the following "users" exist: | username | firstname | lastname | | teacher1 | Teacher | One | | student1 | Student | One | And the following "course enrolments" exist: | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | @javascript Scenario: Edit name of activity in-place in social activities block Given the following "activities" exist: | activity | course | name | | forum | C1 | My forum name | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I set the field "Edit title" in the "My forum name" "activity" to "New forum name" Then I should not see "My forum name" And I should see "New forum name" And I follow "New forum name" And I should not see "My forum name" And I should see "New forum name" @javascript Scenario: Activities in social activities block can be made available but not visible on a course page Given the following config values are set as admin: | allowstealth | 1 | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | recent_activity | Course | C1 | course-view-* | side-pre | And the following "activity" exists: | activity | forum | | course | C1 | | name | My forum name | | section | 0 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I open "My forum name" actions menu And I choose "Availability > Make available but don't show on course page" in the open action menu Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility" # Make sure that "Availability" dropdown in the edit menu has three options. And I open "My forum name" actions menu And I choose "Edit settings" in the open action menu And I expand all fieldsets And the "Availability" select box should contain "Show on course page" And the "Availability" select box should contain "Hide on course page" And the field "Availability" matches value "Make available but don't show on course page" And I press "Save and return to course" Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility" And I turn editing mode off And I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility" And I log out # Student will not see the module on the course page but can access it from other reports and blocks: When I am on the "Course 1" course page logged in as student1 Then I should not see "My forum name" in the "Social activities" "block" And I click on "My forum name" "link" in the "Recent activity" "block" And I should see "My forum name" in the ".breadcrumb" "css_element" @javascript Scenario: The move activity modal allow to move activities in the social activities block And the following "activities" exist: | activity | course | section | name | | forum | C1 | 0 | My forum name | | forum | C1 | 0 | Other forum name | | forum | C1 | 0 | Yet another forum name | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on And I should see "My forum name" in the "Social activities" "block" And I should see "Other forum name" in the "Social activities" "block" And I should see "Yet another forum name" in the "Social activities" "block" And "Other forum name" "activity" should appear after "My forum name" "activity" And "Yet another forum name" "activity" should appear after "Other forum name" "activity" When I open "My forum name" actions menu And I click on "Move" "link" in the "My forum name" activity And I should see "My forum name" in the "Move activity" "dialogue" And I should see "Other forum name" in the "Move activity" "dialogue" And I should see "Yet another forum name" in the "Move activity" "dialogue" And I should see "Social activities" in the "Move activity" "dialogue" And I click on "Yet another forum name" "link" in the "Move activity" "dialogue" Then I should see "My forum name" in the "Social activities" "block" And I should see "Other forum name" in the "Social activities" "block" And I should see "Yet another forum name" in the "Social activities" "block" And "Yet another forum name" "activity" should appear after "Other forum name" "activity" And "My forum name" "activity" should appear after "Yet another forum name" "activity" @javascript Scenario: Teacher can delete an activity in the social activities block Given the following "activity" exists: | activity | forum | | course | C1 | | name | My forum name | | section | 0 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I open "My forum name" actions menu And I choose "Delete" in the open action menu And I click on "Delete" "button" in the "Delete activity?" "dialogue" Then I should not see "My forum name" in the "Social activities" "block" @javascript Scenario: Teacher can duplicate an activity in the social activities block Given the following "activity" exists: | activity | forum | | course | C1 | | name | My forum name | | section | 0 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I open "My forum name" actions menu And I choose "Duplicate" in the open action menu Then I should see "My forum name" in the "Social activities" "block" And I should see "My forum name (copy)" in the "Social activities" "block" And "My forum name (copy)" "activity" should appear after "My forum name" "activity" @javascript Scenario: Teacher can move right and left an activity in the social activities block Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on When I open "Social forum" actions menu And "Move right" "link" should be visible And "Move left" "link" should not be visible And I choose "Move right" in the open action menu Then I open "Social forum" actions menu And "Move right" "link" should not be visible And "Move left" "link" should be visible And I choose "Move left" in the open action menu And I open "Social forum" actions menu And "Move right" "link" should be visible And "Move left" "link" should not be visible @javascript Scenario: Social activities block can have subsections Given the following "activity" exists: | activity | assign | | course | C1 | | name | Assignment name | | section | 0 | Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on And I click on "Add content" "button" in the ".block_social_activities .footer" "css_element" And I click on "Subsection" "link" in the ".dropdown-menu.show" "css_element" Then I should see "New subsection" in the "Social activities" "block" And I open "Assignment name" actions menu And I click on "Move" "link" in the "Assignment name" activity And I click on "New subsection" "link" in the "Move activity" "dialogue" Then I should see "Assignment name" in the "New subsection" "section" PKz\N&&8tests/behat/behat_block_social_activities_deprecated.phpnu[. // NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php. require_once(__DIR__ . '/../../../../lib/behat/behat_deprecated_base.php'); use Behat\Mink\Element\NodeElement; use Behat\Mink\Exception\ExpectationException as ExpectationException; use Behat\Mink\Exception\DriverException as DriverException; use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException; /** * Behat steps in plugin block_social_activities * * @package block_social_activities * @category test * @copyright 2024 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class behat_block_social_activities_deprecated extends behat_deprecated_base { /** * Returns the DOM node of the activity in the social activities block * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @throws ElementNotFoundException Thrown by behat_base::find * @param string $activityname The activity name * @return NodeElement */ protected function get_social_block_activity_node($activityname) { $activityname = behat_context_helper::escape($activityname); $xpath = "//*[contains(concat(' ',normalize-space(@class),' '),' block_social_activities ')]//li[contains(., $activityname)]"; return $this->find('xpath', $xpath); } /** * Finds the element containing a specific activity in the social activity block. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @throws ElementNotFoundException * @param string $element * @param string $selectortype * @param string $activityname * @return NodeElement */ protected function get_social_block_activity_element($element, $selectortype, $activityname) { $activitynode = $this->get_social_block_activity_node($activityname); $exception = new ElementNotFoundException($this->getSession(), "'{$element}' '{$selectortype}' in '{$activityname}'"); return $this->find($selectortype, $element, $exception, $activitynode); } /** * Checks that the specified activity in the social activities block should have the specified editing icon. * * This includes items in the action menu for the item (does not require it to be open) * * You should be in the course page with editing mode turned on. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @deprecated since 5.0 * * @Then /^"(?P(?:[^"]|\\")*)" activity in social activities block should have "(?P(?:[^"]|\\")*)" editing icon$/ * @param string $activityname * @param string $iconname */ public function activity_in_social_activities_block_should_have_editing_icon($activityname, $iconname) { $this->deprecated_message([ 'behat_block_social_activities::activity_in_social_activities_block_should_have_editing_icon is deprecated', 'Use: I should see WHATEVER in the ACTIVITYNAME "activity"', ]); $activitynode = $this->get_social_block_activity_node($activityname); $notfoundexception = new ExpectationException('"' . $activityname . '" doesn\'t have a "' . $iconname . '" editing icon', $this->getSession()); $this->find('named_partial', ['link', $iconname], $notfoundexception, $activitynode); } /** * Checks that the specified activity in the social activities block should not have the specified editing icon. * * This includes items in the action menu for the item (does not require it to be open) * * You should be in the course page with editing mode turned on. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @deprecated since 5.0 * * @Then /^"(?P(?:[^"]|\\")*)" activity in social activities block should not have "(?P(?:[^"]|\\")*)" editing icon$/ * @param string $activityname * @param string $iconname */ public function activity_in_social_activities_block_should_not_have_editing_icon($activityname, $iconname) { $this->deprecated_message([ 'behat_block_social_activities::activity_in_social_activities_block_should_not_have_editing_icon is deprecated', 'Use: I should not see WHATEVER in the ACTIVITYNAME "activity"', ]); $activitynode = $this->get_social_block_activity_node($activityname); try { $this->find('named_partial', ['link', $iconname], false, $activitynode); throw new ExpectationException('"' . $activityname . '" has a "' . $iconname . '" editing icon when it should not', $this->getSession()); } catch (ElementNotFoundException $e) { // This is good, the menu item should not be there. return; } } /** * Clicks on the specified element of the activity. You should be in the course page with editing mode turned on. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @deprecated since 5.0 * * @Given /^I click on "(?P(?:[^"]|\\")*)" "(?P(?:[^"]|\\")*)" in the "(?P(?:[^"]|\\")*)" activity in social activities block$/ * @param string $element * @param string $selectortype * @param string $activityname */ public function i_click_on_in_the_activity_in_social_activities_block($element, $selectortype, $activityname) { $this->deprecated_message([ 'behat_block_social_activities::i_click_on_in_the_activity_in_social_activities_block is deprecated', 'Use: I open ACTIVITYNAME actions menu & I choose OPTIONTEXT in the open action menu', ]); $element = $this->get_social_block_activity_element($element, $selectortype, $activityname); $element->click(); } /** * Checks that the specified activity is hidden in the social activities block. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @deprecated since 5.0 * * @Then /^"(?P(?:[^"]|\\")*)" activity in social activities block should be hidden$/ * @param string $activityname */ public function activity_in_social_activities_block_should_be_hidden($activityname) { $this->deprecated_message([ 'behat_block_social_activities::activity_in_social_activities_block_should_be_hidden is deprecated', 'Use: I should see "Hidden from students" in the "ACTIVITYNAME" "core_courseformat > Activity visibility"', ]); $activitynode = $this->get_social_block_activity_node($activityname); $exception = new ExpectationException('"' . $activityname . '" is not hidden', $this->getSession()); $this->find('named_partial', ['badge', get_string('hiddenfromstudents')], $exception, $activitynode); } /** * Checks that the specified activity is hidden in the social activities block. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @deprecated since 5.0 * * @Then /^"(?P(?:[^"]|\\")*)" activity in social activities block should be available but hidden from course page$/ * @param string $activityname */ public function activity_in_social_activities_block_should_be_available_but_hidden_from_course_page($activityname) { $this->deprecated_message([ 'behat_block_social_activities::activity_in_social_activities_block_should_be_available_but_hidden_from_course_page is deprecated', 'Use: I should see "Available but not shown on course page" in the "ACTIVITYNAME" "core_courseformat > Activity visibility"', ]); $activitynode = $this->get_social_block_activity_node($activityname); $exception = new ExpectationException('"' . $activityname . '" is not hidden but available', $this->getSession()); $this->find('named_partial', ['badge', get_string('hiddenoncoursepage')], $exception, $activitynode); } /** * Opens an activity actions menu in the social activities block if it is not already opened. * * @todo MDL-78077 This will be deleted in Moodle 6.0. * @deprecated since 5.0 * * @Given /^I open "(?P(?:[^"]|\\")*)" actions menu in social activities block$/ * @throws DriverException The step is not available when Javascript is disabled * @param string $activityname */ public function i_open_actions_menu_in_social_activities_block($activityname) { $this->deprecated_message([ 'behat_block_social_activities::i_open_actions_menu_in_social_activities_block is deprecated', 'Use: I open "ACTIVITYNAME" actions menu', ]); $activityname = behat_context_helper::escape($activityname); $xpath = "//*[contains(concat(' ',normalize-space(@class),' '),' block_social_activities ')]//li[contains(., $activityname)]"; $this->execute('behat_action_menu::i_open_the_action_menu_in', [$xpath, 'xpath_element']); } } PKz\=?block_social_activities.phpnu[. /** * Social activities block. * * @package block_social_activities * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_social_activities extends block_base { function init(){ $this->title = get_string('pluginname', 'block_social_activities'); } function applicable_formats() { return array('course-view-social' => true); } function get_content() { if ($this->content !== NULL) { return $this->content; } $this->content = new stdClass(); $this->content->text = ''; $this->content->footer = ''; if (empty($this->instance)) { return $this->content; } $course = $this->page->course; course_create_sections_if_missing($course, 0); $format = course_get_format($course); $modinfo = $format->get_modinfo(); $section = $modinfo->get_section_info(0); if ($format->supports_ajax()) { include_course_ajax($course); } $courserenderer = $format->get_renderer($this->page); $output = new block_social_activities\output\blocksection($format, $section); $this->content->text = $courserenderer->render($output); $this->content->footer = $courserenderer->course_section_add_cm_control( course: $course, section: 0, sectionreturn: null, displayoptions: ['inblock' => true], ); return $this->content; } } PKz\`  styles.cssnu[PKz\ۮ%% db/access.phpnu[PKz\3A#Q lang/en/block_social_activities.phpnu[PKz\3_$- Xversion.phpnu[PKz\S  Bclasses/privacy/provider.phpnu[PKz\Bm  classes/output/blocksection.phpnu[PKz\1_!g $templates/blocksection.mustachenu[PKz\38 .UPGRADING.mdnu[PKz\##/tests/behat/edit_activities.featurenu[PKz\N&&8uOtests/behat/behat_block_social_activities_deprecated.phpnu[PKz\=?xvblock_social_activities.phpnu[PK