Current Path : C:/xampp/htdocs/moodle/blocks/myoverview/amd/build/ |
Current File : C:/xampp/htdocs/moodle/blocks/myoverview/amd/build/repository.min.js.map |
{"version":3,"sources":["../src/repository.js"],"names":["define","Ajax","Notification","getEnrolledCoursesByTimeline","args","promise","call","methodname","setFavouriteCourses","updateUserPreferences","fail","exception"],"mappings":"AAsBAA,OAAM,+BAAC,CAAC,WAAD,CAAc,mBAAd,CAAD,CAAqC,SAASC,CAAT,CAAeC,CAAf,CAA6B,CAyEpE,MAAO,CACHC,4BAA4B,CA3DG,QAA/BA,CAAAA,4BAA+B,CAASC,CAAT,CAAe,IAO1CC,CAAAA,CAAO,CAAGJ,CAAI,CAACK,IAAL,CAAU,CALV,CACVC,UAAU,CAAE,6DADF,CAEVH,IAAI,CAAEA,CAFI,CAKU,CAAV,EAAqB,CAArB,CAPgC,CAS9C,MAAOC,CAAAA,CACV,CAgDM,CAEHG,mBAAmB,CAvCG,QAAtBA,CAAAA,mBAAsB,CAASJ,CAAT,CAAe,IAOjCC,CAAAA,CAAO,CAAGJ,CAAI,CAACK,IAAL,CAAU,CALV,CACVC,UAAU,CAAE,mCADF,CAEVH,IAAI,CAAEA,CAFI,CAKU,CAAV,EAAqB,CAArB,CAPuB,CASrC,MAAOC,CAAAA,CACV,CA2BM,CAGHI,qBAAqB,CAbG,QAAxBA,CAAAA,qBAAwB,CAASL,CAAT,CAAe,CAMvCH,CAAI,CAACK,IAAL,CAAU,CALI,CACVC,UAAU,CAAE,mCADF,CAEVH,IAAI,CAAEA,CAFI,CAKJ,CAAV,EAAqB,CAArB,EACKM,IADL,CACUR,CAAY,CAACS,SADvB,CAEH,CAEM,CAKV,CA9EK,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 * A javascript module to retrieve enrolled coruses from the server.\n *\n * @package block_myoverview\n * @copyright 2018 Bas Brands <base@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['core/ajax', 'core/notification'], function(Ajax, Notification) {\n\n /**\n * Retrieve a list of enrolled courses.\n *\n * Valid args are:\n * string classification future, inprogress, past\n * int limit number of records to retreive\n * int Offset offset for pagination\n * int sort sort by lastaccess or name\n *\n * @method getEnrolledCoursesByTimeline\n * @param {object} args The request arguments\n * @return {promise} Resolved with an array of courses\n */\n var getEnrolledCoursesByTimeline = function(args) {\n\n var request = {\n methodname: 'core_course_get_enrolled_courses_by_timeline_classification',\n args: args\n };\n\n var promise = Ajax.call([request])[0];\n\n return promise;\n };\n\n /**\n * Set the favourite state on a list of courses.\n *\n * Valid args are:\n * Array courses list of course id numbers.\n *\n * @param {Object} args Arguments send to the webservice.\n * @return {Promise} Resolve with warnings.\n */\n var setFavouriteCourses = function(args) {\n\n var request = {\n methodname: 'core_course_set_favourite_courses',\n args: args\n };\n\n var promise = Ajax.call([request])[0];\n\n return promise;\n };\n\n /**\n * Update the user preferences.\n *\n * @param {Object} args Arguments send to the webservice.\n *\n * Sample args:\n * {\n * preferences: [\n * {\n * type: 'block_example_user_sort_preference'\n * value: 'title'\n * }\n * ]\n * }\n */\n var updateUserPreferences = function(args) {\n var request = {\n methodname: 'core_user_update_user_preferences',\n args: args\n };\n\n Ajax.call([request])[0]\n .fail(Notification.exception);\n };\n\n return {\n getEnrolledCoursesByTimeline: getEnrolledCoursesByTimeline,\n setFavouriteCourses: setFavouriteCourses,\n updateUserPreferences: updateUserPreferences\n };\n});\n"],"file":"repository.min.js"}