mirror of
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git
synced 2024-12-22 12:10:08 +00:00
Fix linter issues. Prepare version 1.19
This commit is contained in:
parent
64b3c4e64e
commit
325aa87fa8
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.idea
|
||||||
|
|
50
.travis.yml
Normal file
50
.travis.yml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
language: php
|
||||||
|
|
||||||
|
sudo: true
|
||||||
|
|
||||||
|
addons:
|
||||||
|
firefox: "47.0.1"
|
||||||
|
postgresql: "9.4"
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- oracle-java8-installer
|
||||||
|
- oracle-java8-set-default
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.composer/cache
|
||||||
|
- $HOME/.npm
|
||||||
|
|
||||||
|
php:
|
||||||
|
- 7.0
|
||||||
|
- 7.1
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- MOODLE_BRANCH=MOODLE_35_STABLE
|
||||||
|
matrix:
|
||||||
|
- DB=pgsql
|
||||||
|
- DB=mysqli
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- phpenv config-rm xdebug.ini
|
||||||
|
- nvm install 8.9
|
||||||
|
- nvm use 8.9
|
||||||
|
- cd ../..
|
||||||
|
- composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci ^2
|
||||||
|
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
|
||||||
|
|
||||||
|
install:
|
||||||
|
- moodle-plugin-ci install
|
||||||
|
|
||||||
|
script:
|
||||||
|
- moodle-plugin-ci phplint
|
||||||
|
- moodle-plugin-ci phpcpd
|
||||||
|
- moodle-plugin-ci phpmd
|
||||||
|
#- moodle-plugin-ci codechecker
|
||||||
|
- moodle-plugin-ci validate
|
||||||
|
- moodle-plugin-ci savepoints
|
||||||
|
- moodle-plugin-ci mustache
|
||||||
|
#- moodle-plugin-ci grunt
|
||||||
|
- moodle-plugin-ci phpunit
|
||||||
|
- moodle-plugin-ci behat
|
1
amd/build/main.min.js
vendored
1
amd/build/main.min.js
vendored
@ -1 +0,0 @@
|
|||||||
define(["jquery"],function(a){return{checkReport:function(){window.console.log("loaded",a)}}});
|
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
class ApiProvider
|
class ApiProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
class UrlGenerator
|
class UrlGenerator
|
||||||
{
|
{
|
||||||
public function getCheckUrl($cmid, $fileid)
|
public function getCheckUrl($cmid, $fileid)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file is part of Moodle - http://moodle.org/
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//
|
//
|
||||||
// Moodle is free software: you can redistribute it and/or modify
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$observers = array();
|
$observers = array();
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file is part of Moodle - http://moodle.org/
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//
|
//
|
||||||
// Moodle is free software: you can redistribute it and/or modify
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
class plagiarism_setup_form extends moodleform {
|
class plagiarism_setup_form extends moodleform {
|
||||||
|
|
||||||
/// Define the form
|
// Define the form
|
||||||
function definition () {
|
function definition () {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file is part of Moodle - http://moodle.org/
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//
|
//
|
||||||
// Moodle is free software: you can redistribute it and/or modify
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
1
lib.php
1
lib.php
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file is part of Moodle - http://moodle.org/
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//
|
//
|
||||||
// Moodle is free software: you can redistribute it and/or modify
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
class ConfigModel
|
class ConfigModel
|
||||||
{
|
{
|
||||||
private $db;
|
private $db;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
class FileModel
|
class FileModel
|
||||||
{
|
{
|
||||||
private $db;
|
private $db;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once(__DIR__ . '/../../../config.php');
|
require_once(__DIR__ . '/../../../config.php');
|
||||||
require_once(__DIR__ . '/../lib.php');
|
require_once(__DIR__ . '/../lib.php');
|
||||||
require_once(__DIR__ . '/../form/send_text_form.php');
|
require_once(__DIR__ . '/../form/send_text_form.php');
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
require_once(__DIR__ . '/../../../config.php');
|
require_once(__DIR__ . '/../../../config.php');
|
||||||
require_once(__DIR__ . '/../lib.php');
|
require_once(__DIR__ . '/../lib.php');
|
||||||
require_once(__DIR__ . '/../form/send_text_form.php');
|
require_once(__DIR__ . '/../form/send_text_form.php');
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file is part of Moodle - http://moodle.org/
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//
|
//
|
||||||
// Moodle is free software: you can redistribute it and/or modify
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file is part of Moodle - http://moodle.org/
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//
|
//
|
||||||
// Moodle is free software: you can redistribute it and/or modify
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
@ -26,9 +27,9 @@ defined('MOODLE_INTERNAL') || die();
|
|||||||
if (!isset($plugin)) {
|
if (!isset($plugin)) {
|
||||||
$plugin = new stdClass();
|
$plugin = new stdClass();
|
||||||
}
|
}
|
||||||
$plugin->version = 2018103102;
|
$plugin->version = 2018110101;
|
||||||
$plugin->requires = 2017051501; // Requires Moodle 3.3 .
|
$plugin->requires = 2017051501; // Requires Moodle 3.3 .
|
||||||
$plugin->release = 'v1.18';
|
$plugin->release = 'v1.19';
|
||||||
$plugin->maturity = MATURITY_STABLE;
|
$plugin->maturity = MATURITY_STABLE;
|
||||||
|
|
||||||
$plugin->component = 'plagiarism_pchkorg';
|
$plugin->component = 'plagiarism_pchkorg';
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
echo $OUTPUT->header();
|
echo $OUTPUT->header();
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
@ -19,7 +20,10 @@ echo $OUTPUT->header();
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div id="plagcheck-loader" data-cmid="<?php echo intval($cmid)?>" data-file="<?php echo intval($fileid)?>" class="loader"></div>
|
<div id="plagcheck-loader" data-cmid="<?php
|
||||||
|
echo intval($cmid)?>" data-file="<?php
|
||||||
|
echo intval($fileid)?>" class="loader"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$PAGE->requires->css('/plagiarism/pchkorg/assets/viewer/report-viewer.min.css');
|
$PAGE->requires->css('/plagiarism/pchkorg/assets/viewer/report-viewer.min.css');
|
||||||
|
|
||||||
echo $OUTPUT->header();
|
echo $OUTPUT->header();
|
||||||
@ -6,9 +7,9 @@ echo $OUTPUT->header();
|
|||||||
?>
|
?>
|
||||||
<div class="pCheck-container"></div>
|
<div class="pCheck-container"></div>
|
||||||
<div id="report-root"></div>
|
<div id="report-root"></div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
?>
|
?>
|
||||||
<script src="/plagiarism/pchkorg/assets/viewer/report-viewer.min.js"></script>
|
<script src="/plagiarism/pchkorg/assets/viewer/report-viewer.min.js"></script>
|
||||||
@ -21,17 +22,17 @@ echo $OUTPUT->header();
|
|||||||
element: element,
|
element: element,
|
||||||
localData: localData
|
localData: localData
|
||||||
});
|
});
|
||||||
})(window, window.document, window.ReportViewer, <?php echo empty($data) ? '{}': $data ?>);
|
})(window, window.document, window.ReportViewer, <?php
|
||||||
|
echo empty($data) ? '{}' : $data ?>);
|
||||||
</script>
|
</script>
|
||||||
<?
|
|
||||||
} elseif (isset($error)) {
|
|
||||||
?>
|
|
||||||
<h2>Error: <?php echo $error ?></h2>
|
|
||||||
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
} elseif (isset($error)) {
|
||||||
|
?>
|
||||||
|
<h2>Error: <?php
|
||||||
|
echo $error ?></h2>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
echo $OUTPUT->header();
|
echo $OUTPUT->header();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -17,13 +18,15 @@ echo $OUTPUT->header();
|
|||||||
<br/>
|
<br/>
|
||||||
<div class="plagiarism-preview-content">
|
<div class="plagiarism-preview-content">
|
||||||
<div class="plagiarism-preview-content-inner">
|
<div class="plagiarism-preview-content-inner">
|
||||||
<?php echo nl2br(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, $encoding = 'UTF-8')) ?>
|
<?php
|
||||||
|
echo nl2br(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, $encoding = 'UTF-8')) ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
if ($isSupported) {
|
if ($isSupported) {
|
||||||
echo $form->display();
|
echo $form->display();
|
||||||
} else {
|
} else {
|
||||||
@ -32,4 +35,5 @@ echo $OUTPUT->header();
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
Loading…
Reference in New Issue
Block a user