Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/mod/lti/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/mod/lti/amd/build/tool_card_controller.min.js.map

{"version":3,"sources":["../src/tool_card_controller.js"],"names":["define","$","ajax","notification","templates","modalFactory","toolType","ltiEvents","KEYS","str","SELECTORS","DELETE_BUTTON","NAME_ELEMENT","DESCRIPTION_ELEMENT","CAPABILITIES_CONTAINER","ACTIVATE_BUTTON","ANNOUNCEMENT_TIMEOUT","getDeleteButton","element","find","getNameElement","getDescriptionElement","getActivateButton","hasActivateButton","length","getCapabilitiesContainer","hasCapabilitiesContainer","getTypeId","attr","clearAllAnnouncements","removeClass","startLoading","addClass","stopLoading","announceSuccess","promise","Deferred","setTimeout","resolve","announceFailure","deleteType","typeId","get_strings","key","component","done","strs","confirm","delete","remove","fail","exception","always","error","reject","setValueSnapshot","value","getValueSnapshot","snapshotDescription","descriptionElement","hasClass","description","text","trim","updateDescription","snapshotVal","update","id","type","snapshotName","nameElement","name","updateName","setStatusActive","state","constants","configured","then","toolTypeData","render","renderResult","html","js","replaceNode","catch","displayCapabilitiesApproval","hideCapabilitiesApproval","activateToolType","registerEventListeners","deleteButton","click","e","preventDefault","keypress","metaKey","shiftKey","altKey","ctrlKey","keyCode","ENTER","SPACE","focus","blur","activateButton","capabilitiesContainer","on","CAPABILITIES_AGREE","CAPABILITIES_DECLINE","registerModal","trigger","data","context","bodyPromise","mailTo","encodeURIComponent","footerPromise","create","large","title","body","footer","init"],"mappings":"AA4BCA,OAAM,gCAAC,CAAC,QAAD,CAAW,WAAX,CAAwB,mBAAxB,CAA6C,gBAA7C,CAA+D,oBAA/D,CACA,mBADA,CACqB,gBADrB,CACuC,cADvC,CAEA,UAFA,CAAD,CAGC,SAASC,CAAT,CAAYC,CAAZ,CAAkBC,CAAlB,CAAgCC,CAAhC,CAA2CC,CAA3C,CAAyDC,CAAzD,CAAmEC,CAAnE,CAA8EC,CAA9E,CAAoFC,CAApF,CAA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CAAO,CAAC4F,IAAR,CAAa,oBAAb,CAAD,CAPT,CAOgD,MAPhD,CAQTI,kBAAkB,CAAChG,CAAO,CAAC4F,IAAR,CAAa,iBAAb,CAAD,CART,CAQ6C,QAR7C,CASTI,kBAAkB,CAAChG,CAAO,CAAC4F,IAAR,CAAa,mBAAb,CAAD,CATT,CAS+C,MAT/C,CAUTI,kBAAkB,CAAChG,CAAO,CAAC4F,IAAR,CAAa,gBAAb,CAAD,CAVT,CAU4C,QAV5C,CAWTI,kBAAkB,CAAChG,CAAO,CAAC4F,IAAR,CAAa,mBAAb,CAAD,CAXT,CAW+C,MAX/C,CAYTI,kBAAkB,CAAChG,CAAO,CAAC4F,IAAR,CAAa,gBAAb,CAAD,CAZT,CAY4C,QA1BvB,CA2BlCC,CAAO,CAAG,CACN,OAAUE,CADJ,CAAV,CAGA,GAAIE,CAAAA,CAAa,CAAG/G,CAAS,CAAC2E,MAAV,CAAiB,kCAAjB,CAAqDgC,CAArD,CAApB,CACA1G,CAAY,CAAC+G,MAAb,CAAoB,CAClBC,KAAK,GADa,CAElBC,KAAK,CAAEpG,CAAO,CAAC4F,IAAR,CAAa,YAAb,CAFW,CAGlBS,IAAI,CAAEP,CAHY,CAIlBQ,MAAM,CAAEL,CAJU,CAApB,CAKGN,CALH,CAMH,CAvoB4F,CAyoB7F,MAAyD,CAOrDY,IAAI,CAAE,cAASvG,CAAT,CAAkB,CACpBsE,CAAsB,CAACtE,CAAD,CAAtB,CACA0F,CAAa,CAAC1F,CAAD,CAChB,CAVoD,CAY5D,CAxpBM,CAAN","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 <http://www.gnu.org/licenses/>.\n\n/**\n * Controls all of the behaviour and interaction with a tool type card. These are\n * listed on the LTI tool type management page.\n *\n * See template: mod_lti/tool_card\n *\n * @module     mod_lti/tool_card_controller\n * @class      tool_card_controller\n * @package    mod_lti\n * @copyright  2015 Ryan Wyllie <ryan@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since      3.1\n */\n define(['jquery', 'core/ajax', 'core/notification', 'core/templates', 'core/modal_factory',\n        'mod_lti/tool_type', 'mod_lti/events', 'mod_lti/keys',\n        'core/str'],\n        function($, ajax, notification, templates, modalFactory, toolType, ltiEvents, KEYS, str) {\n\n    var SELECTORS = {\n        DELETE_BUTTON: '.delete',\n        NAME_ELEMENT: '.name',\n        DESCRIPTION_ELEMENT: '.description',\n        CAPABILITIES_CONTAINER: '.capabilities-container',\n        ACTIVATE_BUTTON: '.tool-card-footer a.activate',\n    };\n\n    // Timeout in seconds.\n    var ANNOUNCEMENT_TIMEOUT = 2000;\n\n    /**\n     * Return the delete button element.\n     *\n     * @method getDeleteButton\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {JQuery} jQuery object\n     */\n    var getDeleteButton = function(element) {\n        return element.find(SELECTORS.DELETE_BUTTON);\n    };\n\n    /**\n     * Return the element representing the tool type name.\n     *\n     * @method getNameElement\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {JQuery} jQuery object\n     */\n    var getNameElement = function(element) {\n        return element.find(SELECTORS.NAME_ELEMENT);\n    };\n\n    /**\n     * Return the element representing the tool type description.\n     *\n     * @method getDescriptionElement\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {JQuery} jQuery object\n     */\n    var getDescriptionElement = function(element) {\n        return element.find(SELECTORS.DESCRIPTION_ELEMENT);\n    };\n\n    /**\n     * Return the activate button for the type.\n     *\n     * @method getActivateButton\n     * @private\n     * @param {Object} element jQuery object representing the tool card.\n     * @return {Object} jQuery object\n     */\n    var getActivateButton = function(element) {\n        return element.find(SELECTORS.ACTIVATE_BUTTON);\n    };\n\n    /**\n     * Checks if the type card has an activate button.\n     *\n     * @method hasActivateButton\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Boolean} true if has active buton\n     */\n    var hasActivateButton = function(element) {\n        return getActivateButton(element).length ? true : false;\n    };\n\n    /**\n     * Return the element that contains the capabilities approval for\n     * the user.\n     *\n     * @method getCapabilitiesContainer\n     * @private\n     * @param {Object} element jQuery object representing the tool card.\n     * @return {Object} The element\n     */\n    var getCapabilitiesContainer = function(element) {\n        return element.find(SELECTORS.CAPABILITIES_CONTAINER);\n    };\n\n    /**\n     * Checks if the tool type has capabilities that need approval. If it\n     * does then the container will be present.\n     *\n     * @method hasCapabilitiesContainer\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Boolean} true if has capbilities.\n     */\n    var hasCapabilitiesContainer = function(element) {\n        return getCapabilitiesContainer(element).length ? true : false;\n    };\n\n    /**\n     * Get the type id.\n     *\n     * @method getTypeId\n     * @private\n     * @param {Object} element jQuery object representing the tool card.\n     * @return {String} Type ID\n     */\n    var getTypeId = function(element) {\n        return element.attr('data-type-id');\n    };\n\n    /**\n     * Stop any announcement currently visible on the card.\n     *\n     * @method clearAllAnnouncements\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var clearAllAnnouncements = function(element) {\n        element.removeClass('announcement loading success fail capabilities');\n    };\n\n    /**\n     * Show the loading announcement.\n     *\n     * @method startLoading\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var startLoading = function(element) {\n        clearAllAnnouncements(element);\n        element.addClass('announcement loading');\n    };\n\n    /**\n     * Hide the loading announcement.\n     *\n     * @method stopLoading\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var stopLoading = function(element) {\n        element.removeClass('announcement loading');\n    };\n\n    /**\n     * Show the success announcement. The announcement is only\n     * visible for 2 seconds.\n     *\n     * @method announceSuccess\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Promise} jQuery Deferred object\n     */\n    var announceSuccess = function(element) {\n        var promise = $.Deferred();\n\n        clearAllAnnouncements(element);\n        element.addClass('announcement success');\n        setTimeout(function() {\n            element.removeClass('announcement success');\n            promise.resolve();\n        }, ANNOUNCEMENT_TIMEOUT);\n\n        return promise;\n    };\n\n    /**\n     * Show the failure announcement. The announcement is only\n     * visible for 2 seconds.\n     *\n     * @method announceFailure\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Promise} jQuery Deferred object\n     */\n    var announceFailure = function(element) {\n        var promise = $.Deferred();\n\n        clearAllAnnouncements(element);\n        element.addClass('announcement fail');\n        setTimeout(function() {\n            element.removeClass('announcement fail');\n            promise.resolve();\n        }, ANNOUNCEMENT_TIMEOUT);\n\n        return promise;\n    };\n\n    /**\n     * Delete the tool type from the Moodle server. Triggers a success\n     * or failure announcement depending on the result.\n     *\n     * @method deleteType\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Promise} jQuery Deferred object\n     */\n    var deleteType = function(element) {\n        var promise = $.Deferred();\n        var typeId = getTypeId(element);\n        startLoading(element);\n\n        if (typeId === \"\") {\n            return $.Deferred().resolve();\n        }\n\n        str.get_strings([\n                {\n                    key: 'delete',\n                    component: 'mod_lti'\n                },\n                {\n                    key: 'delete_confirmation',\n                    component: 'mod_lti'\n                },\n                {\n                    key: 'delete',\n                    component: 'mod_lti'\n                },\n                {\n                    key: 'cancel',\n                    component: 'core'\n                },\n            ])\n            .done(function(strs) {\n                    notification.confirm(strs[0], strs[1], strs[2], strs[3], function() {\n                            toolType.delete(typeId)\n                                .done(function() {\n                                        stopLoading(element);\n                                        announceSuccess(element)\n                                            .done(function() {\n                                                    element.remove();\n                                                })\n                                            .fail(notification.exception)\n                                            .always(function() {\n                                                    // Always resolve because even if the announcement fails the type was deleted.\n                                                    promise.resolve();\n                                                });\n                                    })\n                                .fail(function(error) {\n                                        announceFailure(element);\n                                        promise.reject(error);\n                                    });\n                        }, function() {\n                                stopLoading(element);\n                                promise.resolve();\n                            });\n                })\n            .fail(function(error) {\n                    stopLoading(element);\n                    notification.exception(error);\n                    promise.reject(error);\n                });\n\n        return promise;\n    };\n\n    /**\n     * Save a given value in a data attribute on the element.\n     *\n     * @method setValueSnapshot\n     * @private\n     * @param {JQuery} element jQuery object representing the element.\n     * @param {String} value to be saved.\n     */\n    var setValueSnapshot = function(element, value) {\n        element.attr('data-val-snapshot', value);\n    };\n\n    /**\n     * Return the saved value from the element.\n     *\n     * @method getValueSnapshot\n     * @private\n     * @param {JQuery} element jQuery object representing the element.\n     * @return {String} the saved value.\n     */\n    var getValueSnapshot = function(element) {\n        return element.attr('data-val-snapshot');\n    };\n\n    /**\n     * Save the current value of the tool description.\n     *\n     * @method snapshotDescription\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var snapshotDescription = function(element) {\n        var descriptionElement = getDescriptionElement(element);\n\n        if (descriptionElement.hasClass('loading')) {\n            return;\n        }\n\n        var description = descriptionElement.text().trim();\n        setValueSnapshot(descriptionElement, description);\n    };\n\n    /**\n     * Send a request to update the description value for this tool\n     * in the Moodle server.\n     *\n     * @method updateDescription\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Promise} jQuery Deferred object\n     */\n    var updateDescription = function(element) {\n        var typeId = getTypeId(element);\n\n        // Return early if we don't have an id because it's\n        // required to save the changes.\n        if (typeId === \"\") {\n            return $.Deferred().resolve();\n        }\n\n        var descriptionElement = getDescriptionElement(element);\n\n        // Return early if we're already saving a value.\n        if (descriptionElement.hasClass('loading')) {\n            return $.Deferred().resolve();\n        }\n\n        var description = descriptionElement.text().trim();\n        var snapshotVal = getValueSnapshot(descriptionElement);\n\n        // If the value hasn't change then don't bother sending the\n        // update request.\n        if (snapshotVal == description) {\n            return $.Deferred().resolve();\n        }\n\n        descriptionElement.addClass('loading');\n\n        var promise = toolType.update({id: typeId, description: description});\n\n        promise.done(function(type) {\n            descriptionElement.removeClass('loading');\n            // Make sure the text is updated with the description from the\n            // server, just in case the update didn't work.\n            descriptionElement.text(type.description);\n        }).fail(notification.exception);\n\n        // Probably need to handle failures better so that we can revert\n        // the value in the input for the user.\n        promise.fail(function() {\n          descriptionElement.removeClass('loading');\n        });\n\n        return promise;\n    };\n\n    /**\n     * Save the current value of the tool name.\n     *\n     * @method snapshotName\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var snapshotName = function(element) {\n        var nameElement = getNameElement(element);\n\n        if (nameElement.hasClass('loading')) {\n            return;\n        }\n\n        var name = nameElement.text().trim();\n        setValueSnapshot(nameElement, name);\n    };\n\n    /**\n     * Send a request to update the name value for this tool\n     * in the Moodle server.\n     *\n     * @method updateName\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Promise} jQuery Deferred object\n     */\n    var updateName = function(element) {\n        var typeId = getTypeId(element);\n\n        // Return if we don't have an id.\n        if (typeId === \"\") {\n            return $.Deferred().resolve();\n        }\n\n        var nameElement = getNameElement(element);\n\n        // Return if we're already saving.\n        if (nameElement.hasClass('loading')) {\n            return $.Deferred().resolve();\n        }\n\n        var name = nameElement.text().trim();\n        var snapshotVal = getValueSnapshot(nameElement);\n\n        // If the value hasn't change then don't bother sending the\n        // update request.\n        if (snapshotVal == name) {\n            return $.Deferred().resolve();\n        }\n\n        nameElement.addClass('loading');\n        var promise = toolType.update({id: typeId, name: name});\n\n        promise.done(function(type) {\n            nameElement.removeClass('loading');\n            // Make sure the text is updated with the name from the\n            // server, just in case the update didn't work.\n            nameElement.text(type.name);\n        });\n\n        // Probably need to handle failures better so that we can revert\n        // the value in the input for the user.\n        promise.fail(function() {\n          nameElement.removeClass('loading');\n        });\n\n        return promise;\n    };\n\n    /**\n     * Send a request to update the state for this tool to be configured (active)\n     * in the Moodle server. A success or failure announcement is triggered depending\n     * on the result.\n     *\n     * @method setStatusActive\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     * @return {Promise} jQuery Deferred object\n     */\n    var setStatusActive = function(element) {\n        var id = getTypeId(element);\n\n        // Return if we don't have an id.\n        if (id === \"\") {\n            return $.Deferred().resolve();\n        }\n\n        startLoading(element);\n\n        var promise = toolType.update({\n            id: id,\n            state: toolType.constants.state.configured\n        });\n\n        promise.then(function(toolTypeData) {\n            stopLoading(element);\n            announceSuccess(element);\n            return toolTypeData;\n        }).then(function(toolTypeData) {\n            return templates.render('mod_lti/tool_card', toolTypeData);\n        }).then(function(renderResult) {\n            var html = renderResult[0];\n            var js = renderResult[1];\n\n            templates.replaceNode(element, html, js);\n            return;\n        }).catch(function() {\n            stopLoading(element);\n            announceFailure(element);\n        });\n\n        return promise;\n    };\n\n    /**\n     * Show the capabilities approval screen to show which groups of data this\n     * type requires access to in Moodle (if any).\n     *\n     * @method displayCapabilitiesApproval\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var displayCapabilitiesApproval = function(element) {\n        element.addClass('announcement capabilities');\n    };\n\n    /**\n     * Hide the capabilities approval screen.\n     *\n     * @method hideCapabilitiesApproval\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var hideCapabilitiesApproval = function(element) {\n        element.removeClass('announcement capabilities');\n    };\n\n    /**\n     * The user wishes to activate this tool so show them the capabilities that\n     * they need to agree to or if there are none then set the tool type's state\n     * to active.\n     *\n     * @method activateToolType\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var activateToolType = function(element) {\n        if (hasCapabilitiesContainer(element)) {\n            displayCapabilitiesApproval(element);\n        } else {\n            setStatusActive(element);\n        }\n    };\n\n    /**\n     * Sets up the listeners for user interaction on this tool type card.\n     *\n     * @method registerEventListeners\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var registerEventListeners = function(element) {\n        var deleteButton = getDeleteButton(element);\n        deleteButton.click(function(e) {\n            e.preventDefault();\n            deleteType(element);\n        });\n        deleteButton.keypress(function(e) {\n            if (!e.metaKey && !e.shiftKey && !e.altKey && !e.ctrlKey) {\n                if (e.keyCode == KEYS.ENTER || e.keyCode == KEYS.SPACE) {\n                    e.preventDefault();\n                    deleteButton.click();\n                }\n            }\n        });\n\n        var descriptionElement = getDescriptionElement(element);\n        descriptionElement.focus(function(e) {\n            e.preventDefault();\n            // Save a copy of the current value for the description so that\n            // we can check if the user has changed it before sending a request to\n            // the server.\n            snapshotDescription(element);\n        });\n        descriptionElement.blur(function(e) {\n            e.preventDefault();\n            updateDescription(element);\n        });\n        descriptionElement.keypress(function(e) {\n            if (!e.metaKey && !e.shiftKey && !e.altKey && !e.ctrlKey) {\n                if (e.keyCode == KEYS.ENTER) {\n                    e.preventDefault();\n                    descriptionElement.blur();\n                }\n            }\n        });\n\n        var nameElement = getNameElement(element);\n        nameElement.focus(function(e) {\n            e.preventDefault();\n            // Save a copy of the current value for the name so that\n            // we can check if the user has changed it before sending a request to\n            // the server.\n            snapshotName(element);\n        });\n        nameElement.blur(function(e) {\n            e.preventDefault();\n            updateName(element);\n        });\n        nameElement.keypress(function(e) {\n            if (!e.metaKey && !e.shiftKey && !e.altKey && !e.ctrlKey) {\n                if (e.keyCode == KEYS.ENTER) {\n                    e.preventDefault();\n                    nameElement.blur();\n                }\n            }\n        });\n\n        // Only pending tool type cards have an activate button.\n        if (hasActivateButton(element)) {\n            var activateButton = getActivateButton(element);\n            activateButton.click(function(e) {\n                e.preventDefault();\n                activateToolType(element);\n            });\n            activateButton.keypress(function(e) {\n                if (!e.metaKey && !e.shiftKey && !e.altKey && !e.ctrlKey) {\n                    if (e.keyCode == KEYS.ENTER || e.keyCode == KEYS.SPACE) {\n                        e.preventDefault();\n                        activateButton.click();\n                    }\n                }\n            });\n        }\n\n        if (hasCapabilitiesContainer(element)) {\n            var capabilitiesContainer = getCapabilitiesContainer(element);\n\n            capabilitiesContainer.on(ltiEvents.CAPABILITIES_AGREE, function() {\n                setStatusActive(element);\n            });\n\n            capabilitiesContainer.on(ltiEvents.CAPABILITIES_DECLINE, function() {\n                hideCapabilitiesApproval(element);\n            });\n        }\n    };\n\n    /**\n     * Sets up the templates for the tool configuration modal on this tool type card.\n     *\n     * @method registerModal\n     * @private\n     * @param {JQuery} element jQuery object representing the tool card.\n     */\n    var registerModal = function(element) {\n        var trigger = $('#' + element.data('uniqid') + '-' + element.data('deploymentid'));\n        var context = {\n            'uniqid': element.data('uniqid'),\n            'platformid': element.data('platformid'),\n            'clientid': element.data('clientid'),\n            'deploymentid': element.data('deploymentid'),\n            'urls': {\n                'publickeyset': element.data('publickeyseturl'),\n                'accesstoken': element.data('accesstokenurl'),\n                'authrequest': element.data('authrequesturl')\n            }\n        };\n        var bodyPromise = templates.render('mod_lti/tool_config_modal_body', context);\n        var mailTo = 'mailto:?subject=' + encodeURIComponent(element.data('mailtosubject')) +\n            '&body=' + encodeURIComponent(element.data('platformidstr')) + ':%20' +\n            encodeURIComponent(element.data('platformid')) + '%0D%0A' +\n            encodeURIComponent(element.data('clientidstr')) + ':%20' +\n            encodeURIComponent(element.data('clientid')) + '%0D%0A' +\n            encodeURIComponent(element.data('deploymentidstr')) + ':%20' +\n            encodeURIComponent(element.data('deploymentid')) + '%0D%0A' +\n            encodeURIComponent(element.data('publickeyseturlstr')) + ':%20' +\n            encodeURIComponent(element.data('publickeyseturl')) + '%0D%0A' +\n            encodeURIComponent(element.data('accesstokenurlstr')) + ':%20' +\n            encodeURIComponent(element.data('accesstokenurl')) + '%0D%0A' +\n            encodeURIComponent(element.data('authrequesturlstr')) + ':%20' +\n            encodeURIComponent(element.data('authrequesturl')) + '%0D%0A';\n        context = {\n            'mailto': mailTo\n        };\n        var footerPromise = templates.render('mod_lti/tool_config_modal_footer', context);\n        modalFactory.create({\n          large: true,\n          title: element.data('modaltitle'),\n          body: bodyPromise,\n          footer: footerPromise,\n        }, trigger);\n    };\n\n    return /** @alias module:mod_lti/tool_card_controller */ {\n\n        /**\n         * Initialise this module.\n         *\n         * @param {JQuery} element jQuery object representing the tool card.\n         */\n        init: function(element) {\n            registerEventListeners(element);\n            registerModal(element);\n        }\n    };\n});\n"],"file":"tool_card_controller.min.js"}