__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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/>.
// This script uses installed report plugins to print scorm reports.
require_once("../../config.php");
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->dirroot.'/mod/scorm/locallib.php');
require_once($CFG->dirroot.'/mod/scorm/reportsettings_form.php');
require_once($CFG->dirroot.'/mod/scorm/report/reportlib.php');
require_once($CFG->libdir.'/formslib.php');
define('SCORM_REPORT_DEFAULT_PAGE_SIZE', 20);
define('SCORM_REPORT_ATTEMPTS_ALL_STUDENTS', 0);
define('SCORM_REPORT_ATTEMPTS_STUDENTS_WITH', 1);
define('SCORM_REPORT_ATTEMPTS_STUDENTS_WITH_NO', 2);
$id = required_param('id', PARAM_INT);// Course Module ID, or ...
$download = optional_param('download', '', PARAM_RAW);
$mode = optional_param('mode', '', PARAM_ALPHA); // Report mode.
$cm = get_coursemodule_from_id('scorm', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$scorm = $DB->get_record('scorm', array('id' => $cm->instance), '*', MUST_EXIST);
$contextmodule = context_module::instance($cm->id);
$reportlist = scorm_report_list($contextmodule);
$url = new moodle_url('/mod/scorm/report.php');
$url->param('id', $id);
if (empty($mode)) {
$mode = reset($reportlist);
} else if (!in_array($mode, $reportlist)) {
throw new \moodle_exception('erroraccessingreport', 'scorm');
}
$url->param('mode', $mode);
$PAGE->set_url($url);
require_login($course, false, $cm);
$PAGE->set_pagelayout('report');
require_capability('mod/scorm:viewreport', $contextmodule);
// Activate the secondary nav tab.
navigation_node::override_active_url(new moodle_url('/mod/scorm/report.php', ['id' => $id]));
if (count($reportlist) < 1) {
throw new \moodle_exception('erroraccessingreport', 'scorm');
}
// Trigger a report viewed event.
$event = \mod_scorm\event\report_viewed::create(array(
'context' => $contextmodule,
'other' => array(
'scormid' => $scorm->id,
'mode' => $mode
)
));
$event->add_record_snapshot('course_modules', $cm);
$event->add_record_snapshot('scorm', $scorm);
$event->trigger();
$userdata = null;
if (!empty($download)) {
$noheader = true;
}
// Print the page header.
if (empty($noheader)) {
$strreport = get_string('report', 'scorm');
$strattempt = get_string('attempt', 'scorm');
$PAGE->set_title("$course->shortname: ".format_string($scorm->name));
$PAGE->set_heading($course->fullname);
$PAGE->activityheader->set_attrs([
'hidecompletion' => true,
'description' => ''
]);
$PAGE->navbar->add($strreport, new moodle_url('/mod/scorm/report.php', array('id' => $cm->id)));
echo $OUTPUT->header();
}
// Open the selected Scorm report and display it.
$classname = "scormreport_{$mode}\\report";
$legacyclassname = "scorm_{$mode}_report";
$report = class_exists($classname) ? new $classname() : new $legacyclassname();
$report->display($scorm, $cm, $course, $download); // Run the report!
// Print footer.
if (empty($noheader)) {
echo $OUTPUT->footer();
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| backup | Folder | 0777 |
|
|
| classes | Folder | 0777 |
|
|
| datamodels | Folder | 0777 |
|
|
| db | Folder | 0777 |
|
|
| lang | Folder | 0777 |
|
|
| pix | Folder | 0777 |
|
|
| report | Folder | 0777 |
|
|
| templates | Folder | 0777 |
|
|
| tests | Folder | 0777 |
|
|
| aicc.php | File | 24.69 KB | 0777 |
|
| datamodel.php | File | 4.73 KB | 0777 |
|
| deprecatedlib.php | File | 1.14 KB | 0777 |
|
| grade.php | File | 1.59 KB | 0777 |
|
| index.php | File | 4.37 KB | 0777 |
|
| lib.php | File | 65.18 KB | 0777 |
|
| loadSCO.php | File | 6.51 KB | 0777 |
|
| locallib.php | File | 99.89 KB | 0777 |
|
| mod_form.php | File | 27.77 KB | 0777 |
|
| module.js | File | 40.32 KB | 0777 |
|
| player.js | File | 1.23 KB | 0777 |
|
| player.php | File | 12.23 KB | 0777 |
|
| prereqs.php | File | 3.21 KB | 0777 |
|
| renderer.php | File | 8.45 KB | 0777 |
|
| report.php | File | 3.61 KB | 0777 |
|
| reportsettings_form.php | File | 2.12 KB | 0777 |
|
| request.js | File | 9.93 KB | 0777 |
|
| settings.php | File | 8.76 KB | 0777 |
|
| styles.css | File | 5.19 KB | 0777 |
|
| upgrade.txt | File | 1.71 KB | 0777 |
|
| version.php | File | 1.15 KB | 0777 |
|
| view.js | File | 3.61 KB | 0777 |
|
| view.php | File | 7.44 KB | 0777 |
|