2018-11-01 14:21:14 +00:00
|
|
|
<?php
|
2019-01-17 16:51:22 +00:00
|
|
|
// 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/>.
|
|
|
|
|
|
|
|
defined('MOODLE_INTERNAL') || die();
|
2018-11-01 16:50:10 +00:00
|
|
|
|
2019-01-17 16:51:22 +00:00
|
|
|
if (empty($error)) {
|
|
|
|
$PAGE->requires->css(new moodle_url('/plagiarism/pchkorg/assets/viewer/public-report.min.css'));
|
|
|
|
$PAGE->requires->js(new moodle_url('/plagiarism/pchkorg/assets/viewer/public-report.bundle.min.js'), true);
|
|
|
|
$PAGE->requires->js_init_code(
|
|
|
|
'
|
|
|
|
initPublicReport({
|
|
|
|
container: window.document.getElementById(\'report-root\'),
|
|
|
|
basename: "'.$currenturl->get_path().'",
|
|
|
|
localData: ' . (empty($data) ? '{}' : $data) . '
|
|
|
|
});
|
|
|
|
', true
|
|
|
|
);
|
|
|
|
}
|
2018-11-01 14:21:14 +00:00
|
|
|
|
|
|
|
echo $OUTPUT->header();
|
|
|
|
|
|
|
|
?>
|
|
|
|
<div class="pCheck-container"></div>
|
|
|
|
<div id="report-root"></div>
|
|
|
|
<?php
|
2019-01-17 16:51:22 +00:00
|
|
|
if (!empty($error)) {
|
2018-11-01 16:50:10 +00:00
|
|
|
?>
|
|
|
|
<h2>Error: <?php
|
2019-01-17 16:51:22 +00:00
|
|
|
echo htmlspecialchars($error) ?></h2>
|
2018-11-01 16:50:10 +00:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
|
|
|
|
echo $OUTPUT->footer();
|