ÿØÿà 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-Ї Ç db/access.php000064400000002442152266560440007117 0ustar00. /** * Activity modules block caps. * * @package block_activity_modules * @copyright Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $capabilities = array( 'block/activity_modules:addinstance' => array( 'riskbitmask' => RISK_SPAM | RISK_XSS, 'captype' => 'write', 'contextlevel' => CONTEXT_BLOCK, 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW ), 'clonepermissionsfrom' => 'moodle/site:manageblocks' ), ); lang/en/block_activity_modules.php000064400000002234152266560440013351 0ustar00. /** * Strings for component 'block_activity_modules', language 'en', branch 'MOODLE_20_STABLE' * * @package block_activity_modules * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['activity_modules:addinstance'] = 'Add a new activities block'; $string['pluginname'] = 'Activities'; $string['privacy:metadata'] = 'The Activities block only shows data stored in other locations.'; version.php000064400000002255152266560440006760 0ustar00. /** * Version details * * @package block_activity_modules * @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_activity_modules'; // Full name of the plugin (used for diagnostics) block_activity_modules.php000064400000007602152266560440012032 0ustar00. /** * This file contains the Activity modules block. * * @package block_activity_modules * @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(); require_once($CFG->libdir . '/filelib.php'); class block_activity_modules extends block_list { function init() { $this->title = get_string('pluginname', 'block_activity_modules'); } function get_content() { global $CFG, $DB, $OUTPUT; if($this->content !== NULL) { return $this->content; } $this->content = new stdClass; $this->content->items = array(); $this->content->icons = array(); $this->content->footer = ''; $course = $this->page->course; require_once($CFG->dirroot.'/course/lib.php'); $modinfo = get_fast_modinfo($course); $modfullnames = array(); $archetypes = array(); foreach($modinfo->cms as $cm) { // Exclude activities that aren't visible or have no view link (e.g. label). Account for folder being displayed inline. if ( !\course_modinfo::is_mod_type_visible_on_course($cm->modname) || !$cm->uservisible || (!$cm->has_view() && strcmp($cm->modname, 'folder') !== 0) ) { continue; } if (array_key_exists($cm->modname, $modfullnames)) { continue; } if (!array_key_exists($cm->modname, $archetypes)) { $archetypes[$cm->modname] = plugin_supports('mod', $cm->modname, FEATURE_MOD_ARCHETYPE, MOD_ARCHETYPE_OTHER); } if ($archetypes[$cm->modname] == MOD_ARCHETYPE_RESOURCE) { if (!array_key_exists('resources', $modfullnames)) { $modfullnames['resources'] = get_string('resources'); } } else { $modfullnames[$cm->modname] = $cm->modplural; } } core_collator::asort($modfullnames); foreach ($modfullnames as $modname => $modfullname) { if ($modname === 'resources') { $icon = $OUTPUT->pix_icon('monologo', '', 'mod_page', array('class' => 'icon')); $this->content->items[] = ''.$icon.$modfullname.''; } else { $icon = $OUTPUT->image_icon('monologo', get_string('pluginname', $modname), $modname); $this->content->items[] = ''.$icon.$modfullname.''; } } return $this->content; } /** * Returns the role that best describes this blocks contents. * * This returns 'navigation' as the blocks contents is a list of links to activities and resources. * * @return string 'navigation' */ public function get_aria_role() { return 'navigation'; } function applicable_formats() { return array('all' => true, 'mod' => false, 'my' => false, 'admin' => false, 'tag' => false); } } classes/privacy/provider.php000064400000003010152266560440012225 0ustar00. /** * Privacy Subsystem implementation for block_activity_modules. * * @package block_activity_modules * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_activity_modules\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for block_activity_modules 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'; } } tests/behat/block_activity_modules.feature000064400000023656152266560440015132 0ustar00@block @block_activity_modules Feature: Block activity modules In order to overview activity modules in a course As a manager I can add activities block in a course or on the frontpage Scenario: Add activities block on the frontpage Given the following "activities" exist: | activity | name | intro | course | idnumber | | assign | Frontpage assignment name | Frontpage assignment description | Acceptance test site | assign0 | | book | Frontpage book name | Frontpage book description | Acceptance test site | book0 | | choice | Frontpage choice name | Frontpage choice description | Acceptance test site | choice0 | | data | Frontpage database name | Frontpage database description | Acceptance test site | data0 | | feedback | Frontpage feedback name | Frontpage feedback description | Acceptance test site | feedback0 | | forum | Frontpage forum name | Frontpage forum description | Acceptance test site | forum0 | | label | Frontpage label name | Frontpage label description | Acceptance test site | label0 | | lti | Frontpage lti name | Frontpage lti description | Acceptance test site | lti0 | | page | Frontpage page name | Frontpage page description | Acceptance test site | page0 | | qbank | Frontpage qbank name | Frontpage qbank description | Acceptance test site | qbank0 | | quiz | Frontpage quiz name | Frontpage quiz description | Acceptance test site | quiz0 | | resource | Frontpage resource name | Frontpage resource description | Acceptance test site | resource0 | | imscp | Frontpage imscp name | Frontpage imscp description | Acceptance test site | imscp0 | | folder | Frontpage folder name | Frontpage folder description | Acceptance test site | folder0 | | glossary | Frontpage glossary name | Frontpage glossary description | Acceptance test site | glossary0 | | scorm | Frontpage scorm name | Frontpage scorm description | Acceptance test site | scorm0 | | lesson | Frontpage lesson name | Frontpage lesson description | Acceptance test site | lesson0 | | url | Frontpage url name | Frontpage url description | Acceptance test site | url0 | | wiki | Frontpage wiki name | Frontpage wiki description | Acceptance test site | wiki0 | | workshop | Frontpage workshop name | Frontpage workshop description | Acceptance test site | workshop0 | | qbank | Frontpage qbank name | Frontpage qbank description | Acceptance test site | qbank0 | When I log in as "admin" And I am on site homepage And I turn editing mode on And I add the "Activities" block And I click on "Assignments" "link" in the "Activities" "block" Then I should see "Frontpage assignment name" And I am on site homepage And I click on "Choices" "link" in the "Activities" "block" And I should see "Frontpage choice name" And I am on site homepage And I click on "Databases" "link" in the "Activities" "block" And I should see "Frontpage database name" And I am on site homepage And I click on "Feedback" "link" in the "Activities" "block" And I should see "Frontpage feedback name" And I am on site homepage And I click on "Forums" "link" in the "Activities" "block" And I should see "Frontpage forum name" And I am on site homepage And I click on "External tools" "link" in the "Activities" "block" And I should see "Frontpage lti name" And I am on site homepage And I click on "Quizzes" "link" in the "Activities" "block" And I should see "Frontpage quiz name" And I am on site homepage And I click on "Glossaries" "link" in the "Activities" "block" And I should see "Frontpage glossary name" And I am on site homepage And I click on "SCORM packages" "link" in the "Activities" "block" And I should see "Frontpage scorm name" And I am on site homepage And I click on "Lessons" "link" in the "Activities" "block" And I should see "Frontpage lesson name" And I am on site homepage And I click on "Wikis" "link" in the "Activities" "block" And I should see "Frontpage wiki name" And I am on site homepage And I click on "Workshop" "link" in the "Activities" "block" And I should see "Frontpage workshop name" And I am on site homepage And I click on "Resources" "link" in the "Activities" "block" And I should see "Frontpage book name" And I should see "Frontpage page name" And I should see "Frontpage resource name" And I should see "Frontpage imscp name" And I should see "Frontpage folder name" And I should see "Frontpage url name" And I should not see "Frontpage qbank name" And I am on site homepage And "Question banks" "link" should not exist in the "Activities" "block" Scenario: Add activities block in a course Given the following "courses" exist: | fullname | shortname | format | | Course 1 | C1 | topics | And the following "activities" exist: | activity | name | intro | course | idnumber | | assign | Test assignment name | Test assignment description | C1 | assign1 | | book | Test book name | Test book description | C1 | book1 | | choice | Test choice name | Test choice description | C1 | choice1 | | data | Test database name | Test database description | C1 | data1 | | feedback | Test feedback name | Test feedback description | C1 | feedback1 | | folder | Test folder name | Test folder description | C1 | folder1 | | forum | Test forum name | Test forum description | C1 | forum1 | | glossary | Test glossary name | Test glossary description | C1 | glossary1 | | imscp | Test imscp name | Test imscp description | C1 | imscp1 | | label | Test label name | Test label description | C1 | label1 | | lesson | Test lesson name | Test lesson description | C1 | lesson1 | | lti | Test lti name | Test lti description | C1 | lti1 | | page | Test page name | Test page description | C1 | page1 | | qbank | Test qbank name | Test qbank description | C1 | qbank1 | | quiz | Test quiz name | Test quiz description | C1 | quiz1 | | resource | Test resource name | Test resource description | C1 | resource1 | | scorm | Test scorm name | Test scorm description | C1 | scorm1 | | url | Test url name | Test url description | C1 | url1 | | wiki | Test wiki name | Test wiki description | C1 | wiki1 | | workshop | Test workshop name | Test workshop description | C1 | workshop1 | | qbank | Test qbank name | Test qbank description | C1 | qbank1 | When I log in as "admin" And I am on "Course 1" course homepage with editing mode on And I add the "Activities" block And I click on "Assignments" "link" in the "Activities" "block" Then I should see "Test assignment name" And I am on "Course 1" course homepage And I click on "Choices" "link" in the "Activities" "block" And I should see "Test choice name" And I am on "Course 1" course homepage And I click on "Databases" "link" in the "Activities" "block" And I should see "Test database name" And I am on "Course 1" course homepage And I click on "Feedback" "link" in the "Activities" "block" And I should see "Test feedback name" And I am on "Course 1" course homepage And I click on "Forums" "link" in the "Activities" "block" And I should see "Test forum name" And I am on "Course 1" course homepage And I click on "External tools" "link" in the "Activities" "block" And I should see "Test lti name" And I am on "Course 1" course homepage And I click on "Quizzes" "link" in the "Activities" "block" And I should see "Test quiz name" And I am on "Course 1" course homepage And I click on "Glossaries" "link" in the "Activities" "block" And I should see "Test glossary name" And I am on "Course 1" course homepage And I click on "SCORM packages" "link" in the "Activities" "block" And I should see "Test scorm name" And I am on "Course 1" course homepage And I click on "Lessons" "link" in the "Activities" "block" And I should see "Test lesson name" And I am on "Course 1" course homepage And I click on "Wikis" "link" in the "Activities" "block" And I should see "Test wiki name" And I am on "Course 1" course homepage And I click on "Workshop" "link" in the "Activities" "block" And I should see "Test workshop name" And I am on "Course 1" course homepage And I click on "Resources" "link" in the "Activities" "block" And I should see "Test book name" And I should see "Test page name" And I should see "Test resource name" And I should see "Test imscp name" And I should see "Test folder name" And I should see "Test url name" And I should not see "Test qbank name" And I am on "Course 1" course homepage And "Question banks" "link" should not exist in the "Activities" "block"