Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.70.130.44
Cant Read [ /etc/named.conf ]
7.4.33
aja
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
aja /
public_html /
ead /
enrol /
database /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
lib_test.php
2.93
KB
-rw-r--r--
sync_test.php
45.48
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : lib_test.php
<?php // 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/>. /** * Database enrolment tests. * * @package enrol_database * @copyright 2017 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Database enrolment tests. * * @package enrol_database * @copyright 2017 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class enrol_database_lib_testcase extends advanced_testcase { /** * Test for getting user enrolment actions. */ public function test_get_user_enrolment_actions() { global $CFG, $PAGE; $this->resetAfterTest(); // Set page URL to prevent debugging messages. $PAGE->set_url('/enrol/editinstance.php'); $pluginname = 'database'; // Only enable the database enrol plugin. $CFG->enrol_plugins_enabled = $pluginname; $generator = $this->getDataGenerator(); // Get the enrol plugin. $plugin = enrol_get_plugin($pluginname); // Create a course. $course = $generator->create_course(); // Enable this enrol plugin for the course. $plugin->add_instance($course); // Create a student. $student = $generator->create_user(); // Enrol the student to the course. $generator->enrol_user($student->id, $course->id, 'student', $pluginname); // Teachers don't have enrol/database:unenrol capability by default. Login as admin for simplicity. $this->setAdminUser(); require_once($CFG->dirroot . '/enrol/locallib.php'); $manager = new course_enrolment_manager($PAGE, $course); $userenrolments = $manager->get_user_enrolments($student->id); $this->assertCount(1, $userenrolments); $ue = reset($userenrolments); $actions = $plugin->get_user_enrolment_actions($manager, $ue); // Database enrol has 0 enrol actions for active users. $this->assertCount(0, $actions); // Enrol actions for a suspended student. // Suspend the student. $ue->status = ENROL_USER_SUSPENDED; $actions = $plugin->get_user_enrolment_actions($manager, $ue); // Database enrol has enrol actions for suspended students -- unenrol. $this->assertCount(1, $actions); } }
Close