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_configure_controller.min.js.map

{"version":3,"sources":["../src/tool_configure_controller.js"],"names":["define","$","ajax","notification","templates","ltiEvents","KEYS","toolType","toolProxy","str","SELECTORS","EXTERNAL_REGISTRATION_CONTAINER","EXTERNAL_REGISTRATION_PAGE_CONTAINER","CARTRIDGE_REGISTRATION_CONTAINER","CARTRIDGE_REGISTRATION_FORM","ADD_TOOL_FORM","TOOL_LIST_CONTAINER","TOOL_CREATE_BUTTON","REGISTRATION_CHOICE_CONTAINER","TOOL_URL","getToolCreateButton","getToolListContainer","getExternalRegistrationContainer","getCartridgeRegistrationContainer","getRegistrationChoiceContainer","getToolURL","val","hideExternalRegistration","addClass","hideCartridgeRegistration","hideRegistrationChoices","showExternalRegistration","removeClass","screenReaderAnnounce","showCartridgeRegistration","url","container","find","attr","showRegistrationChoices","element","children","detach","appendTo","hideToolList","showToolList","showRegistrationFeedback","data","type","error","addNotification","message","startLoading","stopLoading","reloadToolList","promise","Deferred","when","query","done","types","proxies","render","tools","html","js","empty","append","runTemplateJS","resolve","fail","reject","exception","always","addTool","trim","toolButton","isCartridge","result","iscartridge","document","trigger","START_CARTRIDGE_REGISTRATION","START_EXTERNAL_REGISTRATION","get_string","s","REGISTRATION_FEEDBACK","registerEventListeners","on","NEW_TOOL_TYPE","STOP_EXTERNAL_REGISTRATION","event","STOP_CARTRIDGE_REGISTRATION","removeAttr","form","submit","e","preventDefault","init"],"mappings":"AA2BAA,OAAM,qCAAC,CAAC,QAAD,CAAW,WAAX,CAAwB,mBAAxB,CAA6C,gBAA7C,CAA+D,gBAA/D,CAAiF,cAAjF,CAAiG,mBAAjG,CACC,oBADD,CACuB,UADvB,CAAD,CAEE,SAASC,CAAT,CAAYC,CAAZ,CAAkBC,CAAlB,CAAgCC,CAAhC,CAA2CC,CAA3C,CAAsDC,CAAtD,CAA4DC,C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AenF,CAAS,CAAC8E,2BAAzB,CAAsD,UAAW,CAC7DpD,CAAwB,GACxB9B,CAAC,CAACS,CAAS,CAACS,QAAX,CAAD,CAAsBO,GAAtB,CAA0B,EAA1B,EACAkB,CAAY,EACf,CAJD,EAMA3C,CAAC,CAAC+E,QAAD,CAAD,CAAYQ,EAAZ,CAAenF,CAAS,CAACqF,0BAAzB,CAAqD,UAAW,CAC5D7C,CAAY,GACZN,CAAuB,EAC1B,CAHD,EAKAtC,CAAC,CAAC+E,QAAD,CAAD,CAAYQ,EAAZ,CAAenF,CAAS,CAAC6E,4BAAzB,CAAuD,SAASS,CAAT,CAAgBxD,CAAhB,CAAqB,CACxED,CAAyB,CAACC,CAAD,CAC5B,CAFD,EAIAlC,CAAC,CAAC+E,QAAD,CAAD,CAAYQ,EAAZ,CAAenF,CAAS,CAACuF,2BAAzB,CAAsD,UAAW,CAC7DrE,CAAiC,GAAGc,IAApC,CAAyC3B,CAAS,CAACI,2BAAnD,EAAgF+E,UAAhF,CAA2F,oBAA3F,EACAtD,CAAuB,EAC1B,CAHD,EAKAtC,CAAC,CAAC+E,QAAD,CAAD,CAAYQ,EAAZ,CAAenF,CAAS,CAACiF,qBAAzB,CAAgD,SAASK,CAAT,CAAgB5C,CAAhB,CAAsB,CAClED,CAAwB,CAACC,CAAD,CAC3B,CAFD,EAIA,GAAI+C,CAAAA,CAAI,CAAG7F,CAAC,CAACS,CAAS,CAACK,aAAX,CAAZ,CACA+E,CAAI,CAACC,MAAL,CAAY,SAASC,CAAT,CAAY,CACpBA,CAAC,CAACC,cAAF,GACAvB,CAAO,EACV,CAHD,CAKH,CA/VyF,CAiW1F,MAAgE,CAK5DwB,IAAI,CAAE,eAAW,CACbX,CAAsB,GACtBjC,CAAc,EACjB,CAR2D,CAUnE,CA7WK,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 * Standard Ajax wrapper for Moodle. It calls the central Ajax script,\n * which can call any existing webservice using the current session.\n * In addition, it can batch multiple requests and return multiple responses.\n *\n * @module     mod_lti/tool_configure_controller\n * @class      tool_configure_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 */\ndefine(['jquery', 'core/ajax', 'core/notification', 'core/templates', 'mod_lti/events', 'mod_lti/keys', 'mod_lti/tool_type',\n        'mod_lti/tool_proxy', 'core/str'],\n        function($, ajax, notification, templates, ltiEvents, KEYS, toolType, toolProxy, str) {\n\n    var SELECTORS = {\n        EXTERNAL_REGISTRATION_CONTAINER: '#external-registration-container',\n        EXTERNAL_REGISTRATION_PAGE_CONTAINER: '#external-registration-page-container',\n        CARTRIDGE_REGISTRATION_CONTAINER: '#cartridge-registration-container',\n        CARTRIDGE_REGISTRATION_FORM: '#cartridge-registration-form',\n        ADD_TOOL_FORM: '#add-tool-form',\n        TOOL_LIST_CONTAINER: '#tool-list-container',\n        TOOL_CREATE_BUTTON: '#tool-create-button',\n        REGISTRATION_CHOICE_CONTAINER: '#registration-choice-container',\n        TOOL_URL: '#tool-url'\n    };\n\n    /**\n     * Get the tool create button element.\n     *\n     * @method getToolCreateButton\n     * @private\n     * @return {Object} jQuery object\n     */\n    var getToolCreateButton = function() {\n        return $(SELECTORS.TOOL_CREATE_BUTTON);\n    };\n\n    /**\n     * Get the tool list container element.\n     *\n     * @method getToolListContainer\n     * @private\n     * @return {Object} jQuery object\n     */\n    var getToolListContainer = function() {\n        return $(SELECTORS.TOOL_LIST_CONTAINER);\n    };\n\n    /**\n     * Get the external registration container element.\n     *\n     * @method getExternalRegistrationContainer\n     * @private\n     * @return {Object} jQuery object\n     */\n    var getExternalRegistrationContainer = function() {\n        return $(SELECTORS.EXTERNAL_REGISTRATION_CONTAINER);\n    };\n\n    /**\n     * Get the cartridge registration container element.\n     *\n     * @method getCartridgeRegistrationContainer\n     * @private\n     * @return {Object} jQuery object\n     */\n    var getCartridgeRegistrationContainer = function() {\n        return $(SELECTORS.CARTRIDGE_REGISTRATION_CONTAINER);\n    };\n\n    /**\n     * Get the registration choice container element.\n     *\n     * @method getRegistrationChoiceContainer\n     * @private\n     * @return {Object} jQuery object\n     */\n    var getRegistrationChoiceContainer = function() {\n        return $(SELECTORS.REGISTRATION_CHOICE_CONTAINER);\n    };\n\n    /**\n     * Get the tool type URL.\n     *\n     * @method getToolURL\n     * @private\n     * @return {String} the tool type url\n     */\n    var getToolURL = function() {\n        return $(SELECTORS.TOOL_URL).val();\n    };\n\n    /**\n     * Hide the external registration container.\n     *\n     * @method hideExternalRegistration\n     * @private\n     */\n    var hideExternalRegistration = function() {\n        getExternalRegistrationContainer().addClass('hidden');\n    };\n\n    /**\n     * Hide the cartridge registration container.\n     *\n     * @method hideCartridgeRegistration\n     * @private\n     */\n    var hideCartridgeRegistration = function() {\n        getCartridgeRegistrationContainer().addClass('hidden');\n    };\n\n    /**\n     * Hide the registration choice container.\n     *\n     * @method hideRegistrationChoices\n     * @private\n     */\n    var hideRegistrationChoices = function() {\n        getRegistrationChoiceContainer().addClass('hidden');\n    };\n\n    /**\n     * Display the external registration panel and hides the other\n     * panels.\n     *\n     * @method showExternalRegistration\n     * @private\n     */\n    var showExternalRegistration = function() {\n        hideCartridgeRegistration();\n        hideRegistrationChoices();\n        getExternalRegistrationContainer().removeClass('hidden');\n        screenReaderAnnounce(getExternalRegistrationContainer());\n    };\n\n    /**\n     * Display the cartridge registration panel and hides the other\n     * panels.\n     *\n     * @method showCartridgeRegistration\n     * @param {String} url\n     * @private\n     */\n    var showCartridgeRegistration = function(url) {\n        hideExternalRegistration();\n        hideRegistrationChoices();\n        // Don't save the key and secret from the last tool.\n        var container = getCartridgeRegistrationContainer();\n        container.find('input').val('');\n        container.removeClass('hidden');\n        container.find(SELECTORS.CARTRIDGE_REGISTRATION_FORM).attr('data-cartridge-url', url);\n        screenReaderAnnounce(container);\n    };\n\n    /**\n     * Display the registration choices panel and hides the other\n     * panels.\n     *\n     * @method showRegistrationChoices\n     * @private\n     */\n    var showRegistrationChoices = function() {\n        hideExternalRegistration();\n        hideCartridgeRegistration();\n        getRegistrationChoiceContainer().removeClass('hidden');\n        screenReaderAnnounce(getRegistrationChoiceContainer());\n    };\n\n    /**\n     * JAWS does not notice visibility changes with aria-live.\n     * Remove and add the content back to force it to read it out.\n     * This function can be removed once JAWS supports visibility.\n     *\n     * @method screenReaderAnnounce\n     * @param {Object} element\n     * @private\n     */\n    var screenReaderAnnounce = function(element) {\n        var children = element.children().detach();\n        children.appendTo(element);\n    };\n\n    /**\n     * Hides the list of tool types.\n     *\n     * @method hideToolList\n     * @private\n     */\n    var hideToolList = function() {\n        getToolListContainer().addClass('hidden');\n    };\n\n    /**\n     * Display the list of tool types.\n     *\n     * @method hideToolList\n     * @private\n     */\n    var showToolList = function() {\n        getToolListContainer().removeClass('hidden');\n    };\n\n    /**\n     * Display the registration feedback alert and hide the other panels.\n     *\n     * @method showRegistrationFeedback\n     * @param {Object} data\n     * @private\n     */\n    var showRegistrationFeedback = function(data) {\n        var type = data.error ? 'error' : 'success';\n        notification.addNotification({\n            message: data.message,\n            type: type\n        });\n    };\n\n    /**\n     * Show the loading animation\n     *\n     * @method startLoading\n     * @private\n     * @param {Object} element jQuery object\n     */\n    var startLoading = function(element) {\n        element.addClass(\"loading\");\n    };\n\n    /**\n     * Hide the loading animation\n     *\n     * @method stopLoading\n     * @private\n     * @param {Object} element jQuery object\n     */\n    var stopLoading = function(element) {\n        element.removeClass(\"loading\");\n    };\n\n    /**\n     * Refresh the list of tool types and render the new ones.\n     *\n     * @method reloadToolList\n     * @private\n     */\n    var reloadToolList = function() {\n        var promise = $.Deferred();\n        var container = getToolListContainer();\n        startLoading(container);\n\n        $.when(\n                toolType.query(),\n                toolProxy.query({'orphanedonly': true})\n            )\n            .done(function(types, proxies) {\n                    templates.render('mod_lti/tool_list', {tools: types, proxies: proxies})\n                        .done(function(html, js) {\n                                container.empty();\n                                container.append(html);\n                                templates.runTemplateJS(js);\n                                promise.resolve();\n                            }).fail(promise.reject);\n                })\n            .fail(promise.reject);\n\n        promise.fail(notification.exception)\n            .always(function() {\n                    stopLoading(container);\n                });\n    };\n\n    /**\n     * Trigger appropriate registration process process for the user input\n     * URL. It can either be a cartridge or a registration url.\n     *\n     * @method addTool\n     * @private\n     * @return {Promise} jQuery Deferred object\n     */\n    var addTool = function() {\n        var url = $.trim(getToolURL());\n\n        if (url === \"\") {\n            return $.Deferred().resolve();\n        }\n\n        var toolButton = getToolCreateButton();\n        startLoading(toolButton);\n\n        var promise = toolType.isCartridge(url);\n\n        promise.always(function() {\n          stopLoading(toolButton);\n        });\n\n        promise.done(function(result) {\n            if (result.iscartridge) {\n                $(SELECTORS.TOOL_URL).val('');\n                $(document).trigger(ltiEvents.START_CARTRIDGE_REGISTRATION, url);\n            } else {\n                $(document).trigger(ltiEvents.START_EXTERNAL_REGISTRATION, {url: url});\n            }\n        });\n\n        promise.fail(function() {\n            str.get_string('errorbadurl', 'mod_lti')\n                .done(function(s) {\n                        $(document).trigger(ltiEvents.REGISTRATION_FEEDBACK, {\n                                message: s,\n                                error: true\n                            });\n                    })\n                .fail(notification.exception);\n        });\n\n        return promise;\n    };\n\n    /**\n     * Sets up the listeners for user interaction on the page.\n     *\n     * @method registerEventListeners\n     * @private\n     */\n    var registerEventListeners = function() {\n\n        // These are events fired by the registration processes. Either\n        // the cartridge registration or the external registration url.\n        $(document).on(ltiEvents.NEW_TOOL_TYPE, function() {\n            reloadToolList();\n        });\n\n        $(document).on(ltiEvents.START_EXTERNAL_REGISTRATION, function() {\n            showExternalRegistration();\n            $(SELECTORS.TOOL_URL).val('');\n            hideToolList();\n        });\n\n        $(document).on(ltiEvents.STOP_EXTERNAL_REGISTRATION, function() {\n            showToolList();\n            showRegistrationChoices();\n        });\n\n        $(document).on(ltiEvents.START_CARTRIDGE_REGISTRATION, function(event, url) {\n            showCartridgeRegistration(url);\n        });\n\n        $(document).on(ltiEvents.STOP_CARTRIDGE_REGISTRATION, function() {\n            getCartridgeRegistrationContainer().find(SELECTORS.CARTRIDGE_REGISTRATION_FORM).removeAttr('data-cartridge-url');\n            showRegistrationChoices();\n        });\n\n        $(document).on(ltiEvents.REGISTRATION_FEEDBACK, function(event, data) {\n            showRegistrationFeedback(data);\n        });\n\n        var form = $(SELECTORS.ADD_TOOL_FORM);\n        form.submit(function(e) {\n            e.preventDefault();\n            addTool();\n        });\n\n    };\n\n    return /** @alias module:mod_lti/cartridge_registration_form */ {\n\n        /**\n         * Initialise this module.\n         */\n        init: function() {\n            registerEventListeners();\n            reloadToolList();\n        }\n    };\n});\n"],"file":"tool_configure_controller.min.js"}