ÿØÿà 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-Ї Ç provider.php000064400000002413152266350510007114 0ustar00. namespace h5plib_v127\privacy; /** * Privacy provider implementation for this version of the H5P library. * * @package h5plib_v127 * @copyright 2024 Sara Arjona * @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'; } } provider_test.php000064400000007543152266360260010167 0ustar00. /** * Provides the {@see \core_form\privacy\provider_test} class. * * @package core_form * @category test * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core_form\privacy; use core_form\privacy\provider; use core_privacy\local\request\writer; /** * Unit tests for the privacy API implementation. * * @copyright 2018 David Mudrák * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ final class provider_test extends \core_privacy\tests\provider_testcase { /** * When no preference exists, there should be no export. */ public function test_no_preference(): void { global $USER; $this->resetAfterTest(); $this->setAdminUser(); provider::export_user_preferences($USER->id); $this->assertFalse(writer::with_context(\context_system::instance())->has_any_data()); } /** * Test that the recently selected filepicker view mode is exported. * * @dataProvider data_filemanager_recentviewmode * @param string $val Value of the preference filemanager_recentviewmode * @param string $desc Text describing the preference */ public function test_filemanager_recentviewmode(string $val, string $desc): void { $this->resetAfterTest(); // Create test user, add some preferences. $user = $this->getDataGenerator()->create_user(); $this->setUser($user); set_user_preference('filemanager_recentviewmode', $val, $user); // Switch to admin user (so we can validate preferences of the correct user are being exported). $this->setAdminUser(); // Export test users preferences. provider::export_user_preferences($user->id); $this->assertTrue(writer::with_context(\context_system::instance())->has_any_data()); $prefs = writer::with_context(\context_system::instance())->get_user_preferences('core_form'); $this->assertNotEmpty($prefs->filemanager_recentviewmode); $this->assertNotEmpty($prefs->filemanager_recentviewmode->value); $this->assertNotEmpty($prefs->filemanager_recentviewmode->description); $this->assertEquals($val, $prefs->filemanager_recentviewmode->value); $this->assertStringContainsString($desc, $prefs->filemanager_recentviewmode->description); } /** * Provides data for the {@link self::test_filemanager_recentviewmode()} method. * * @return array */ public static function data_filemanager_recentviewmode(): array { return [ 'icons' => [ 'val' => '1', 'desc' => get_string('displayasicons', 'core_repository'), ], 'tree' => [ 'val' => '2', 'desc' => get_string('displayastree', 'core_repository'), ], 'details' => [ 'val' => '3', 'desc' => get_string('displaydetails', 'core_repository'), ], 'unknown' => [ 'val' => 'unexpectedvalue_foo_bar', 'desc' => 'unexpectedvalue_foo_bar', ], ]; } } grade_grade_with_history.php000064400000002500152266557070012331 0ustar00. namespace core_grades\privacy; use grade_grade; /** * A grade_item which has a reference to its historical content. * * @package core_grades * @category grade * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class grade_grade_with_history extends grade_grade { public int $historyid; public function __construct(?\stdClass $params = null, $fetch = true) { // The grade history is not a real grade_grade so we remove the ID. $this->historyid = $params->id; unset($params->id); parent::__construct($params, $fetch); } } legacy_polyfill_test.php000064400000013037152266561370011513 0ustar00. namespace core_portfolio\privacy; defined('MOODLE_INTERNAL') || die(); /** * Unit tests for the Portfolio API's privacy legacy_polyfill. * * @package core_portfolio * @category test * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ final class legacy_polyfill_test extends \advanced_testcase { /** * Test that the core_portfolio\privacy\legacy_polyfill works and that the static _export_portfolio_user_data can be called. */ public function test_export_portfolio_user_data(): void { $userid = 476; $context = \context_system::instance(); $mock = $this->createMock(test_portfolio_legacy_polyfill_mock_wrapper::class); $mock->expects($this->once()) ->method('get_return_value') ->with('_export_portfolio_user_data', [$userid, $context, [], []]); test_legacy_polyfill_portfolio_provider::$mock = $mock; test_legacy_polyfill_portfolio_provider::export_portfolio_user_data($userid, $context, [], []); } /** * Test for _get_metadata shim. */ public function test_get_metadata(): void { $collection = new \core_privacy\local\metadata\collection('core_portfolio'); $this->assertSame($collection, test_legacy_polyfill_portfolio_provider::get_metadata($collection)); } /** * Test the _delete_portfolio_for_context shim. */ public function test_delete_portfolio_for_context(): void { $context = \context_system::instance(); $mock = $this->createMock(test_portfolio_legacy_polyfill_mock_wrapper::class); $mock->expects($this->once()) ->method('get_return_value') ->with('_delete_portfolio_for_context', [$context]); test_legacy_polyfill_portfolio_provider::$mock = $mock; test_legacy_polyfill_portfolio_provider::delete_portfolio_for_context($context); } /** * Test the _delete_portfolio_for_context shim. */ public function test_delete_portfolio_for_user(): void { $userid = 696; $context = \context_system::instance(); $mock = $this->createMock(test_portfolio_legacy_polyfill_mock_wrapper::class); $mock->expects($this->once()) ->method('get_return_value') ->with('_delete_portfolio_for_user', [$userid, $context]); test_legacy_polyfill_portfolio_provider::$mock = $mock; test_legacy_polyfill_portfolio_provider::delete_portfolio_for_user($userid, $context); } } /** * Legacy polyfill test class for the portfolio_provider. * * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class test_legacy_polyfill_portfolio_provider implements \core_privacy\local\metadata\provider, \core_portfolio\privacy\portfolio_provider { use \core_portfolio\privacy\legacy_polyfill; use \core_privacy\local\legacy_polyfill; /** * @var test_legacy_polyfill_portfolio_provider $mock. */ public static $mock = null; /** * Export all user data for the portfolio plugin. * * @param int $userid * @param context $context * @param array $subcontext * @param array $linkarray */ protected static function _export_portfolio_user_data($userid, \context $context, array $subcontext, array $linkarray) { static::$mock->get_return_value(__FUNCTION__, func_get_args()); } /** * Deletes all user data for the given context. * * @param context $context */ protected static function _delete_portfolio_for_context(\context $context) { static::$mock->get_return_value(__FUNCTION__, func_get_args()); } /** * Delete personal data for the given user and context. * * @param int $userid * @param context $context */ protected static function _delete_portfolio_for_user($userid, \context $context) { static::$mock->get_return_value(__FUNCTION__, func_get_args()); } /** * Returns metadata about this plugin. * * @param \core_privacy\local\metadata\collection $collection The initialised collection to add items to. * @return \core_privacy\local\metadata\collection A listing of user data stored through this system. */ protected static function _get_metadata(\core_privacy\local\metadata\collection $collection) { return $collection; } } /** * Called inside the polyfill methods in the test polyfill provider, allowing us to ensure these are called with correct params. * * @copyright 2018 Jake Dallimore * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class test_portfolio_legacy_polyfill_mock_wrapper { /** * Get the return value for the specified item. */ public function get_return_value() { } } helper.php000064400000004307152267016310006543 0ustar00. /** * Privacy Subsystem helper for mod_quiz. * * @package mod_quiz * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_quiz\privacy; use \core_privacy\local\request\writer; use \core_privacy\local\request\transform; use \core_privacy\local\request\contextlist; use \core_privacy\local\request\approved_contextlist; use \core_privacy\local\request\deletion_criteria; use \core_privacy\local\metadata\collection; use \core_privacy\manager; defined('MOODLE_INTERNAL') || die(); require_once($CFG->dirroot . '/mod/quiz/lib.php'); require_once($CFG->dirroot . '/mod/quiz/locallib.php'); /** * Privacy Subsystem implementation for mod_quiz. * * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class helper { /** * Determine the subcontext for the specified quiz attempt. * * @param \stdClass $attempt The attempt data retrieved from the database. * @param \stdClass $user The user record. * @return \array The calculated subcontext. */ public static function get_quiz_attempt_subcontext(\stdClass $attempt, \stdClass $user) { $subcontext = [ get_string('attempts', 'mod_quiz'), ]; if ($attempt->userid != $user->id) { $subcontext[] = fullname($user); } $subcontext[] = $attempt->attempt; return $subcontext; } } quizaccess_user_provider.php000064400000003046152267016310012405 0ustar00. /** * The quizaccess_user_provider interface provides the expected interface for all 'quizaccess' quizaccesss. * * Quiz sub plugins should implement this if they store personal information and can retrieve a userid. * * @package mod_quiz * @copyright 2018 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_quiz\privacy; defined('MOODLE_INTERNAL') || die(); use core_privacy\local\request\approved_userlist; interface quizaccess_user_provider extends \core_privacy\local\request\plugin\subplugin_provider { /** * Delete multiple users data within a single context. * * @param approved_userlist $userlist The approved context and user information to delete information for. */ public static function delete_quizaccess_data_for_users(approved_userlist $userlist); } legacy_quizaccess_polyfill.php000064400000005665152267016310012704 0ustar00. /** * This file contains the polyfil to allow a plugin to operate with Moodle 3.3 up. * * @package mod_quiz * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_quiz\privacy; use core_privacy\local\request\approved_userlist; defined('MOODLE_INTERNAL') || die(); /** * The trait used to provide a backwards compatibility for third-party plugins. * * @package mod_quiz * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ trait legacy_quizaccess_polyfill { /** * Export all user data for the specified user, for the specified quiz. * * @param \mod_quiz\quiz_settings $quiz The quiz being exported * @param \stdClass $user The user to export data for * @return \stdClass The data to be exported for this access rule. */ public static function export_quizaccess_user_data(\mod_quiz\quiz_settings $quiz, \stdClass $user): \stdClass { return static::_export_quizaccess_user_data($quiz, $user); } /** * Delete all data for all users in the specified quiz. * * @param \mod_quiz\quiz_settings $quiz The quiz being deleted */ public static function delete_quizaccess_data_for_all_users_in_context(\mod_quiz\quiz_settings $quiz) { static::_delete_quizaccess_data_for_all_users_in_context($quiz); } /** * Delete all user data for the specified user, in the specified quiz. * * @param \mod_quiz\quiz_settings $quiz The quiz being deleted * @param \stdClass $user The user to export data for */ public static function delete_quizaccess_data_for_user(\mod_quiz\quiz_settings $quiz, \stdClass $user) { static::_delete_quizaccess_data_for_user($quiz, $user); } /** * Delete all user data for the specified users, in the specified context. * * @param approved_userlist $userlist The approved context and user information to delete information for. */ public static function delete_quizaccess_data_for_users(approved_userlist $userlist) { static::_delete_quizaccess_data_for_users($userlist); } } quizaccess_provider.php000064400000004762152267016310011355 0ustar00. /** * The quizaccess_provider interface provides the expected interface for all 'quizaccess' quizaccesss. * * @package mod_quiz * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_quiz\privacy; defined('MOODLE_INTERNAL') || die(); use \core_privacy\local\request\contextlist; use \core_privacy\local\request\approved_contextlist; /** * The quizaccess_provider interface provides the expected interface for all 'quizaccess' quizaccesss. * * @package mod_quiz * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ interface quizaccess_provider extends \core_privacy\local\request\plugin\subplugin_provider { /** * Export all user data for the specified user, for the specified quiz. * * @param \mod_quiz\quiz_settings $quiz The quiz being exported * @param \stdClass $user The user to export data for * @return \stdClass The data to be exported for this access rule. */ public static function export_quizaccess_user_data(\mod_quiz\quiz_settings $quiz, \stdClass $user): \stdClass; /** * Delete all data for all users in the specified quiz. * * @param \mod_quiz\quiz_settings $quiz The quiz being deleted */ public static function delete_quizaccess_data_for_all_users_in_context(\mod_quiz\quiz_settings $quiz); /** * Delete all user data for the specified user, in the specified quiz. * * @param \mod_quiz\quiz_settings $quiz The quiz being deleted * @param \stdClass $user The user to export data for */ public static function delete_quizaccess_data_for_user(\mod_quiz\quiz_settings $quiz, \stdClass $user); }