ÿØÿà 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+\5-lang/en/datafield_checkbox.phpnu[. /** * Strings for component 'datafield_checkbox', language 'en', branch 'master' * * @package datafield * @subpackage checkbox * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Checkboxes'; $string['fieldtypelabel'] = 'Checkboxes'; $string['privacy:metadata'] = 'The Checkboxes field component doesn\'t store any personal data; it uses tables defined in mod_data.'; PK+\R gg pix/icon.svgnu[ PK+\b6 version.phpnu[. /** * @package datafield * @subpackage checkbox * @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 = 'datafield_checkbox'; // Full name of the plugin (used for diagnostics) PK+\怅m m classes/privacy/provider.phpnu[. /** * Privacy Subsystem implementation for datafield_checkbox. * * @package datafield_checkbox * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace datafield_checkbox\privacy; use core_privacy\local\request\writer; use mod_data\privacy\datafield_provider; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for datafield_checkbox implementing null_provider. * * @copyright 2018 Carlos Escobedo * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider, datafield_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'; } /** * Exports data about one record in {data_content} table. * * @param \context_module $context * @param \stdClass $recordobj record from DB table {data_records} * @param \stdClass $fieldobj record from DB table {data_fields} * @param \stdClass $contentobj record from DB table {data_content} * @param \stdClass $defaultvalue pre-populated default value that most of plugins will use */ public static function export_data_content($context, $recordobj, $fieldobj, $contentobj, $defaultvalue) { $defaultvalue->field['options'] = preg_split('/\s*\n\s*/', trim($fieldobj->param1), -1, PREG_SPLIT_NO_EMPTY); $defaultvalue->content = explode('##', $defaultvalue->content); writer::with_context($context)->export_data([$recordobj->id, $contentobj->id], $defaultvalue); } /** * Allows plugins to delete locally stored data. * * @param \context_module $context * @param \stdClass $recordobj record from DB table {data_records} * @param \stdClass $fieldobj record from DB table {data_fields} * @param \stdClass $contentobj record from DB table {data_content} */ public static function delete_data_content($context, $recordobj, $fieldobj, $contentobj) { } }PK+\((templates/checkbox.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 datafield_checkbox/checkbox The purpose of this template is to enable the user to define a checkbox field. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * name string The field's name. * description string The field's description. * required bool The field's requiredness. * param1 string The field's options. Example context (json): { "name": "A name", "description": "A description", "required": true, "param1": "One\nTwo\nThree" } }}
{{> mod_data/fields/basicfields }} {{> mod_data/fields/requiredfield }}
PK+\{++field.class.phpnu[field->param1); $options = array_map('trim', $options); $selected = $options[$recordid % count($options)]; return (object)[ 'id' => 0, 'fieldid' => $this->field->id, 'recordid' => $recordid, 'content' => $selected, 'content1' => null, 'content2' => null, 'content3' => null, 'content4' => null, ]; } function display_add_field($recordid = 0, $formdata = null) { global $DB, $OUTPUT; if ($formdata) { $fieldname = 'field_' . $this->field->id; $content = $formdata->$fieldname ?? []; } else if ($recordid) { $content = $DB->get_field('data_content', 'content', ['fieldid' => $this->field->id, 'recordid' => $recordid]); $content = explode('##', $content ?? ''); } else { $content = []; } $str = '
'; $str .= '
'.s($this->field->name); if ($this->field->required) { $str .= '$nbsp;' . get_string('requiredelement', 'form'); $str .= ''; $image = $OUTPUT->pix_icon('req', get_string('requiredelement', 'form')); $str .= html_writer::div($image, 'inline-req'); } else { $str .= ''; } $i = 0; foreach (explode("\n", $this->field->param1) as $checkbox) { $checkbox = trim($checkbox); if ($checkbox === '') { continue; // skip empty lines } $str .= ''; $str .= 'field->id.'_'.$i.'">'.$checkbox.'
'; $i++; } $str .= '
'; $str .= '
'; return $str; } function display_search_field($value='') { global $CFG, $DB; if (is_array($value)) { $content = $value['checked']; $allrequired = $value['allrequired'] ? true : false; } else { $content = array(); $allrequired = false; } $str = ''; $found = false; $marginclass = ['class' => 'me-1']; foreach (explode("\n",$this->field->param1) as $checkbox) { $checkbox = trim($checkbox); if (in_array($checkbox, $content)) { $str .= html_writer::checkbox('f_'.$this->field->id.'[]', s($checkbox), true, $checkbox, $marginclass); } else { $str .= html_writer::checkbox('f_'.$this->field->id.'[]', s($checkbox), false, $checkbox, $marginclass); } $str .= html_writer::empty_tag('br'); $found = true; } if (!$found) { return ''; } $requiredstr = get_string('selectedrequired', 'data'); $str .= html_writer::checkbox('f_'.$this->field->id.'_allreq', null, $allrequired, $requiredstr, $marginclass); return $str; } public function parse_search_field($defaults = null) { $paramselected = 'f_'.$this->field->id; $paramallrequired = 'f_'.$this->field->id.'_allreq'; if (empty($defaults[$paramselected])) { // One empty means the other ones are empty too. $defaults = array($paramselected => array(), $paramallrequired => 0); } $selected = optional_param_array($paramselected, $defaults[$paramselected], PARAM_NOTAGS); $allrequired = optional_param($paramallrequired, $defaults[$paramallrequired], PARAM_BOOL); if (empty($selected)) { // no searching return ''; } return array('checked'=>$selected, 'allrequired'=>$allrequired); } function generate_sql($tablealias, $value) { global $DB; static $i=0; $i++; $name = "df_checkbox_{$i}_"; $params = array(); $varcharcontent = $DB->sql_compare_text("{$tablealias}.content", 255); $allrequired = $value['allrequired']; $selected = $value['checked']; if ($selected) { $conditions = array(); $j=0; foreach ($selected as $sel) { $j++; $xname = $name.$j; $likesel = str_replace('%', '\%', $sel); $likeselsel = str_replace('_', '\_', $likesel); $conditions[] = "({$tablealias}.fieldid = {$this->field->id} AND ({$varcharcontent} = :{$xname}a OR {$tablealias}.content LIKE :{$xname}b OR {$tablealias}.content LIKE :{$xname}c OR {$tablealias}.content LIKE :{$xname}d))"; $params[$xname.'a'] = $sel; $params[$xname.'b'] = "$likesel##%"; $params[$xname.'c'] = "%##$likesel"; $params[$xname.'d'] = "%##$likesel##%"; } if ($allrequired) { return array(" (".implode(" AND ", $conditions).") ", $params); } else { return array(" (".implode(" OR ", $conditions).") ", $params); } } else { return array(" ", array()); } } function update_content($recordid, $value, $name='') { global $DB; $content = new stdClass(); $content->fieldid = $this->field->id; $content->recordid = $recordid; $content->content = $this->format_data_field_checkbox_content($value); if ($oldcontent = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))) { $content->id = $oldcontent->id; return $DB->update_record('data_content', $content); } else { return $DB->insert_record('data_content', $content); } } function display_browse_field($recordid, $template) { $content = $this->get_data_content($recordid); if (!$content || empty($content->content)) { return ''; } $options = explode("\n", $this->field->param1); $options = array_map('trim', $options); $contentarray = explode('##', $content->content); $str = ''; foreach ($contentarray as $line) { if (!in_array($line, $options)) { // Hmm, looks like somebody edited the field definition. continue; } $str .= $line . "
\n"; } return $str; } function format_data_field_checkbox_content($content) { if (!is_array($content)) { return NULL; } $options = explode("\n", $this->field->param1); $options = array_map('trim', $options); $vals = array(); foreach ($content as $key=>$val) { if ($key === 'xxx') { continue; } if (!in_array($val, $options)) { continue; } $vals[] = $val; } if (empty($vals)) { return NULL; } return implode('##', $vals); } /** * Check whether any boxes in the checkbox where checked. * * @param mixed $value The submitted values * @param mixed $name * @return bool */ function notemptyfield($value, $name) { $found = false; foreach ($value as $checkboxitem) { if (strval($checkboxitem) !== '') { $found = true; break; } } return $found; } /** * Returns the presentable string value for a field content. * * The returned string should be plain text. * * @param stdClass $content * @return string */ public static function get_content_value($content) { $arr = explode('##', $content->content); $strvalue = ''; foreach ($arr as $a) { $strvalue .= $a . ' '; } return trim($strvalue, "\r\n "); } /** * Return the plugin configs for external functions. * * @return array the list of config parameters * @since Moodle 3.3 */ public function get_config_for_external() { // Return all the config parameters. $configs = []; for ($i = 1; $i <= 10; $i++) { $configs["param$i"] = $this->field->{"param$i"}; } return $configs; } } PK+\5-lang/en/datafield_checkbox.phpnu[PK+\R gg pix/icon.svgnu[PK+\b6 version.phpnu[PK+\怅m m u classes/privacy/provider.phpnu[PK+\((.templates/checkbox.mustachenu[PK+\{++field.class.phpnu[PKK