ÿØÿà 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-Ї Ç group.js000064400000004047152266535260006257 0ustar00// 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 . import GroupSearch from 'core_group/comboboxsearch/group'; /** * Allow the user to search for groups in the action bar. * * @module core_course/actionbar/group * @copyright 2024 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ export default class Group extends GroupSearch { baseUrl; /** * Construct the class. * * @param {string} baseUrl The base URL for the page. * @param {int|null} cmid ID of the course module initiating the group search (optional). */ constructor(baseUrl, cmid = null) { super(cmid); this.baseUrl = baseUrl; } /** * Allow the class to be invoked via PHP. * * @param {string} baseUrl The base URL for the page. * @param {int|null} cmid ID of the course module initiating the group search (optional). * @returns {Group} */ static init(baseUrl, cmid = null) { return new Group(baseUrl, cmid); } /** * Build up the link that is dedicated to a particular result. * * @param {Number} groupID The ID of the group selected. * @returns {string} */ selectOneLink(groupID) { const url = new URL(this.baseUrl); url.searchParams.set('groupsearchvalue', this.getSearchTerm()); url.searchParams.set('group', groupID); return url.toString(); } } initials.js000064400000017503152266535260006740 0ustar00// 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 . /** * A small dropdown to filter users. * * @module core_course/actionbar/initials * @copyright 2022 Mathew May * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ import Pending from 'core/pending'; import * as Url from 'core/url'; import CustomEvents from "core/custom_interaction_events"; import Dropdown from 'theme_boost/bootstrap/dropdown'; /** * Whether the event listener has already been registered for this module. * * @type {boolean} */ let registered = false; // Contain our selectors within this file until they could be of use elsewhere. const selectors = { pageListItem: 'page-item', pageClickableItem: '.page-link', activeItem: 'active', formDropdown: '.initialsdropdownform', parentDomNode: '.initials-selector', firstInitial: 'firstinitial', lastInitial: 'lastinitial', initialBars: '.initialbar', // Both first and last name use this class. targetButton: 'initialswidget', formItems: { type: 'submit', save: 'save', cancel: 'cancel' } }; /** * Our initial hook into the module which will eventually allow us to handle the dropdown initials bar form. * * @param {String} callingLink The link to redirect upon form submission. * @param {String} firstInitialParam The URL parameter to set for the first name initial. * @param {String} lastInitialParam The URL parameter to set for the last name initial. * @param {Array} additionalParams Any additional parameters to set for the URL. */ export const init = (callingLink, firstInitialParam = 'sifirst', lastInitialParam = 'silast', additionalParams = []) => { if (registered) { return; } const pendingPromise = new Pending(); registerListenerEvents(callingLink, firstInitialParam, lastInitialParam, additionalParams); // BS events always bubble so, we need to listen for the event higher up the chain. document.querySelector(selectors.parentDomNode).addEventListener('shown.bs.dropdown', () => { document.querySelector(selectors.pageClickableItem).focus({preventScroll: true}); }); pendingPromise.resolve(); registered = true; }; /** * Register event listeners. * * @param {String} callingLink The link to redirect upon form submission. * @param {String} firstInitialParam The URL parameter to set for the first name initial. * @param {String} lastInitialParam The URL parameter to set for the last name initial. * @param {Array} additionalParams Any additional parameters to set for the URL. */ const registerListenerEvents = (callingLink, firstInitialParam = 'sifirst', lastInitialParam = 'silast', additionalParams = []) => { const events = [ 'click', CustomEvents.events.activate, CustomEvents.events.keyboardActivate ]; CustomEvents.define(document, events); // Register events. events.forEach((event) => { document.addEventListener(event, (e) => { // Always fetch the latest information when we click as state is a fickle thing. let {firstActive, lastActive, sifirst, silast} = onClickVariables(); let itemToReset = ''; // Prevent the usual form behaviour. if (e.target.closest(selectors.formDropdown)) { e.preventDefault(); } // Handle the state of active initials before form submission. if (e.target.closest(`${selectors.formDropdown} .${selectors.pageListItem}`)) { // Ensure the li items don't cause weird clicking emptying out the form. if (e.target.classList.contains(selectors.pageListItem)) { return; } const initialsBar = e.target.closest(selectors.initialBars); // Find out which initial bar we are in. // We want to find the current active item in the menu area the user selected. // We also want to fetch the raw item out of the array for instant manipulation. if (initialsBar.classList.contains(selectors.firstInitial)) { sifirst = e.target; itemToReset = firstActive; } else { silast = e.target; itemToReset = lastActive; } swapActiveItems(itemToReset, e); } // Handle form submissions. if (e.target.closest(`${selectors.formDropdown}`) && e.target.type === selectors.formItems.type) { if (e.target.dataset.action === selectors.formItems.save) { // Ensure we strip out the value (All) as it messes with the PHP side of the initials bar. // Then we will redirect the user back onto the page with new filters applied. const params = { 'id': e.target.closest(selectors.formDropdown).dataset.courseid, [firstInitialParam]: sifirst.parentElement.classList.contains('initialbarall') ? '' : sifirst.value, [lastInitialParam]: silast.parentElement.classList.contains('initialbarall') ? '' : silast.value, }; // If additional parameters are passed, add them here (overriding any already set above). for (const [key, value] of Object.entries(additionalParams)) { params[key] = value; } window.location = Url.relativeUrl(callingLink, params); } if (e.target.dataset.action === selectors.formItems.cancel) { Dropdown.getOrCreateInstance(document.querySelector(`.${selectors.targetButton}`)).toggle(); } } }); }); }; /** * A small abstracted helper function which allows us to ensure we have up-to-date lists of nodes. * * @returns {{firstActive: HTMLElement, lastActive: HTMLElement, sifirst: ?String, silast: ?String}} */ const onClickVariables = () => { // Ensure we have an up-to-date initials bar. const firstItems = [...document.querySelectorAll(`.${selectors.firstInitial} li`)]; const lastItems = [...document.querySelectorAll(`.${selectors.lastInitial} li`)]; const firstActive = firstItems.filter((item) => item.classList.contains(selectors.activeItem))[0]; const lastActive = lastItems.filter((item) => item.classList.contains(selectors.activeItem))[0]; // Ensure we retain both of the selections from a previous instance. let sifirst = firstActive.querySelector(selectors.pageClickableItem); let silast = lastActive.querySelector(selectors.pageClickableItem); return {firstActive, lastActive, sifirst, silast}; }; /** * Given we are provided the old li and current click event, swap around the active properties. * * @param {HTMLElement} itemToReset * @param {Event} e */ const swapActiveItems = (itemToReset, e) => { itemToReset.classList.remove(selectors.activeItem); itemToReset.querySelector(selectors.pageClickableItem).ariaCurrent = false; // Set the select item as the current item. const itemToSetActive = e.target.parentElement; itemToSetActive.classList.add(selectors.activeItem); e.target.ariaCurrent = true; }; grading/extra_filters_dropdown.min.js.map000064400000016242152267065450014663 0ustar00{"version":3,"file":"extra_filters_dropdown.min.js","sources":["../../../src/actionbar/grading/extra_filters_dropdown.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\nimport {getDropdownDialog} from 'core/local/dropdown/dialog';\nimport {getUserPreference} from 'core_user/repository';\n\n/**\n * Module for the extra filters dropdown on the submissions page.\n *\n * @module mod_assign/actionbar/grading/extra_filters_dropdown\n * @copyright 2024 Mihail Geshoski \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/** @constant {Object} The object containing the relevant selectors. */\nconst Selectors = {\n extraFiltersDropdown: '.dropdown.extrafilters',\n extraFiltersClose: 'a[data-action=\"close\"]',\n workflowFilterElement: 'select[name=\"workflowfilter\"]',\n markerFilterElement: 'select[name=\"markingallocationfilter\"]',\n suspendedParticipantsFilterCheckbox: 'input[type=\"checkbox\"][name=\"suspendedparticipantsfilter\"]',\n suspendedParticipantsFilterHidden: 'input[type=\"hidden\"][name=\"suspendedparticipantsfilter\"]'\n};\n\n/**\n * Register event listeners for the extra filters dropdown.\n *\n * @param {DropdownDialog} extraFiltersDropdown The dropdown dialog instance.\n */\nconst registerEventListeners = (extraFiltersDropdown) => {\n // Click event listener to the extra filters dropdown element.\n extraFiltersDropdown.getElement().addEventListener('click', e => {\n // The target is the 'Close' button.\n if (e.target.closest(Selectors.extraFiltersClose)) {\n e.preventDefault();\n extraFiltersDropdown.setVisible(false);\n }\n });\n\n // Change event listener to the extra filters dropdown element.\n extraFiltersDropdown.getElement().addEventListener('change', e => {\n const suspendedParticipantsFilterCheckbox = e.target.closest(Selectors.suspendedParticipantsFilterCheckbox);\n // The target is the 'Suspended participants' filter checkbox.\n if (suspendedParticipantsFilterCheckbox) {\n // The 'Suspended participants' filter uses a hidden input and a checkbox. The hidden input is used to\n // submit '0' as a workaround when the checkbox is unchecked since unchecked checkboxes are not submitted\n // with the form. Therefore, we need to enable or disable the hidden input based on the checkbox state.\n const suspendedParticipantsFilterHidden = suspendedParticipantsFilterCheckbox.parentNode\n .querySelector(Selectors.suspendedParticipantsFilterHidden);\n suspendedParticipantsFilterHidden.disabled = suspendedParticipantsFilterCheckbox.checked;\n }\n });\n\n // Event listener triggered upon hiding of the dropdown.\n extraFiltersDropdown.getElement().addEventListener('hide.bs.dropdown', () => {\n // Restore the filters to their stored preference values once the dropdown is closed.\n restoreAppliedWorkflowFilter(extraFiltersDropdown);\n restoreAppliedMarkerFilter(extraFiltersDropdown);\n restoreAppliedSuspendedParticipantsFilter(extraFiltersDropdown);\n });\n};\n\n/**\n * Restores the currently applied workflow filter to its stored preference value.\n *\n * @param {DropdownDialog} extraFiltersDropdown The dropdown dialog instance.\n */\nconst restoreAppliedWorkflowFilter = async(extraFiltersDropdown) => {\n const workflowFilterSelect = extraFiltersDropdown.getElement().querySelector(Selectors.workflowFilterElement);\n if (workflowFilterSelect) {\n workflowFilterSelect.value = await getUserPreference('assign_workflowfilter');\n }\n};\n\n/**\n * Restores the currently applied marker filter to its stored preference value.\n *\n * @param {DropdownDialog} extraFiltersDropdown The dropdown dialog instance.\n */\nconst restoreAppliedMarkerFilter = async(extraFiltersDropdown) => {\n const markerFilterSelect = extraFiltersDropdown.getElement().querySelector(Selectors.markerFilterElement);\n if (markerFilterSelect) {\n markerFilterSelect.value = await getUserPreference('assign_markerfilter');\n }\n};\n\n/**\n * Restores the currently suspended participants filter to its stored preference value.\n *\n * @param {DropdownDialog} extraFiltersDropdown The dropdown dialog instance.\n */\nconst restoreAppliedSuspendedParticipantsFilter = async(extraFiltersDropdown) => {\n const suspendedParticipantsFilterCheckbox = extraFiltersDropdown.getElement()\n .querySelector(Selectors.suspendedParticipantsFilterCheckbox);\n if (suspendedParticipantsFilterCheckbox) {\n const suspendedParticipantsFilterHidden = suspendedParticipantsFilterCheckbox.parentNode\n .querySelector(Selectors.suspendedParticipantsFilterHidden);\n const showOnlyActiveParticipants = await getUserPreference('grade_report_showonlyactiveenrol');\n suspendedParticipantsFilterCheckbox.checked = !showOnlyActiveParticipants;\n suspendedParticipantsFilterHidden.disabled = !showOnlyActiveParticipants;\n }\n};\n\n/**\n * Initialize module.\n */\nexport const init = () => {\n const extraFiltersDropdown = getDropdownDialog(Selectors.extraFiltersDropdown);\n if (extraFiltersDropdown) {\n registerEventListeners(extraFiltersDropdown);\n }\n};\n"],"names":["Selectors","restoreAppliedWorkflowFilter","async","workflowFilterSelect","extraFiltersDropdown","getElement","querySelector","value","restoreAppliedMarkerFilter","markerFilterSelect","restoreAppliedSuspendedParticipantsFilter","suspendedParticipantsFilterCheckbox","suspendedParticipantsFilterHidden","parentNode","showOnlyActiveParticipants","checked","disabled","addEventListener","e","target","closest","preventDefault","setVisible","registerEventListeners"],"mappings":";;;;;;;;MA2BMA,+BACoB,yBADpBA,4BAEiB,yBAFjBA,gCAGqB,gCAHrBA,8BAImB,yCAJnBA,8CAKmC,6DALnCA,4CAMiC,2DA8CjCC,6BAA+BC,MAAAA,6BAC3BC,qBAAuBC,qBAAqBC,aAAaC,cAAcN,iCACzEG,uBACAA,qBAAqBI,YAAc,iCAAkB,2BASvDC,2BAA6BN,MAAAA,6BACzBO,mBAAqBL,qBAAqBC,aAAaC,cAAcN,+BACvES,qBACAA,mBAAmBF,YAAc,iCAAkB,yBASrDG,0CAA4CR,MAAAA,6BACxCS,oCAAsCP,qBAAqBC,aAC5DC,cAAcN,kDACfW,oCAAqC,OAC/BC,kCAAoCD,oCAAoCE,WACzEP,cAAcN,6CACbc,iCAAmC,iCAAkB,oCAC3DH,oCAAoCI,SAAWD,2BAC/CF,kCAAkCI,UAAYF,2CAOlC,WACVV,sBAAuB,6BAAkBJ,gCAC3CI,sBA/EwBA,CAAAA,uBAE5BA,qBAAqBC,aAAaY,iBAAiB,SAASC,IAEpDA,EAAEC,OAAOC,QAAQpB,+BACjBkB,EAAEG,iBACFjB,qBAAqBkB,YAAW,OAKxClB,qBAAqBC,aAAaY,iBAAiB,UAAUC,UACnDP,oCAAsCO,EAAEC,OAAOC,QAAQpB,+CAEzDW,sCAI0CA,oCAAoCE,WACzEP,cAAcN,6CACegB,SAAWL,oCAAoCI,YAKzFX,qBAAqBC,aAAaY,iBAAiB,oBAAoB,KAEnEhB,6BAA6BG,sBAC7BI,2BAA2BJ,sBAC3BM,0CAA0CN,0BAmD1CmB,CAAuBnB"}grading/extra_filters_dropdown.min.js000064400000006204152267065450014104 0ustar00define("mod_assign/actionbar/grading/extra_filters_dropdown",["exports","core/local/dropdown/dialog","core_user/repository"],(function(_exports,_dialog,_repository){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0; /** * Module for the extra filters dropdown on the submissions page. * * @module mod_assign/actionbar/grading/extra_filters_dropdown * @copyright 2024 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const Selectors_extraFiltersDropdown=".dropdown.extrafilters",Selectors_extraFiltersClose='a[data-action="close"]',Selectors_workflowFilterElement='select[name="workflowfilter"]',Selectors_markerFilterElement='select[name="markingallocationfilter"]',Selectors_suspendedParticipantsFilterCheckbox='input[type="checkbox"][name="suspendedparticipantsfilter"]',Selectors_suspendedParticipantsFilterHidden='input[type="hidden"][name="suspendedparticipantsfilter"]',restoreAppliedWorkflowFilter=async extraFiltersDropdown=>{const workflowFilterSelect=extraFiltersDropdown.getElement().querySelector(Selectors_workflowFilterElement);workflowFilterSelect&&(workflowFilterSelect.value=await(0,_repository.getUserPreference)("assign_workflowfilter"))},restoreAppliedMarkerFilter=async extraFiltersDropdown=>{const markerFilterSelect=extraFiltersDropdown.getElement().querySelector(Selectors_markerFilterElement);markerFilterSelect&&(markerFilterSelect.value=await(0,_repository.getUserPreference)("assign_markerfilter"))},restoreAppliedSuspendedParticipantsFilter=async extraFiltersDropdown=>{const suspendedParticipantsFilterCheckbox=extraFiltersDropdown.getElement().querySelector(Selectors_suspendedParticipantsFilterCheckbox);if(suspendedParticipantsFilterCheckbox){const suspendedParticipantsFilterHidden=suspendedParticipantsFilterCheckbox.parentNode.querySelector(Selectors_suspendedParticipantsFilterHidden),showOnlyActiveParticipants=await(0,_repository.getUserPreference)("grade_report_showonlyactiveenrol");suspendedParticipantsFilterCheckbox.checked=!showOnlyActiveParticipants,suspendedParticipantsFilterHidden.disabled=!showOnlyActiveParticipants}};_exports.init=()=>{const extraFiltersDropdown=(0,_dialog.getDropdownDialog)(Selectors_extraFiltersDropdown);extraFiltersDropdown&&(extraFiltersDropdown=>{extraFiltersDropdown.getElement().addEventListener("click",(e=>{e.target.closest(Selectors_extraFiltersClose)&&(e.preventDefault(),extraFiltersDropdown.setVisible(!1))})),extraFiltersDropdown.getElement().addEventListener("change",(e=>{const suspendedParticipantsFilterCheckbox=e.target.closest(Selectors_suspendedParticipantsFilterCheckbox);suspendedParticipantsFilterCheckbox&&(suspendedParticipantsFilterCheckbox.parentNode.querySelector(Selectors_suspendedParticipantsFilterHidden).disabled=suspendedParticipantsFilterCheckbox.checked)})),extraFiltersDropdown.getElement().addEventListener("hide.bs.dropdown",(()=>{restoreAppliedWorkflowFilter(extraFiltersDropdown),restoreAppliedMarkerFilter(extraFiltersDropdown),restoreAppliedSuspendedParticipantsFilter(extraFiltersDropdown)}))})(extraFiltersDropdown)}})); //# sourceMappingURL=extra_filters_dropdown.min.js.map