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
66c41a0b38
commit
19025406ce
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
|
||||
|
||||
|
||||
class ApiProvider
|
||||
{
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
class UrlGenerator
|
||||
{
|
||||
public function getCheckUrl($cmid, $fileid)
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?php
|
||||
|
||||
|
||||
$observers = array();
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
class plagiarism_setup_form extends moodleform {
|
||||
|
||||
/// Define the form
|
||||
// Define the form
|
||||
function definition () {
|
||||
global $CFG;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
|
1
lib.php
1
lib.php
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ConfigModel
|
||||
{
|
||||
private $db;
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
class FileModel
|
||||
{
|
||||
private $db;
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once(__DIR__ . '/../../../config.php');
|
||||
require_once(__DIR__ . '/../lib.php');
|
||||
require_once(__DIR__ . '/../form/send_text_form.php');
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
require_once(__DIR__ . '/../../../config.php');
|
||||
require_once(__DIR__ . '/../lib.php');
|
||||
require_once(__DIR__ . '/../form/send_text_form.php');
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -26,9 +27,9 @@ defined('MOODLE_INTERNAL') || die();
|
||||
if (!isset($plugin)) {
|
||||
$plugin = new stdClass();
|
||||
}
|
||||
$plugin->version = 2018103102;
|
||||
$plugin->version = 2018110101;
|
||||
$plugin->requires = 2017051501; // Requires Moodle 3.3 .
|
||||
$plugin->release = 'v1.18';
|
||||
$plugin->release = 'v1.19';
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
$plugin->component = 'plagiarism_pchkorg';
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
echo $OUTPUT->header();
|
||||
?>
|
||||
<style>
|
||||
@ -19,7 +20,10 @@ echo $OUTPUT->header();
|
||||
</style>
|
||||
|
||||
<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>
|
||||
<?php
|
||||
|
||||
echo $OUTPUT->footer();
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
$PAGE->requires->css('/plagiarism/pchkorg/assets/viewer/report-viewer.min.css');
|
||||
|
||||
echo $OUTPUT->header();
|
||||
@ -6,9 +7,9 @@ echo $OUTPUT->header();
|
||||
?>
|
||||
<div class="pCheck-container"></div>
|
||||
<div id="report-root"></div>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
if (empty($error)) {
|
||||
?>
|
||||
<script src="/plagiarism/pchkorg/assets/viewer/report-viewer.min.js"></script>
|
||||
@ -21,17 +22,17 @@ echo $OUTPUT->header();
|
||||
element: element,
|
||||
localData: localData
|
||||
});
|
||||
})(window, window.document, window.ReportViewer, <?php echo empty($data) ? '{}': $data ?>);
|
||||
})(window, window.document, window.ReportViewer, <?php
|
||||
echo empty($data) ? '{}' : $data ?>);
|
||||
</script>
|
||||
<?
|
||||
} elseif (isset($error)) {
|
||||
?>
|
||||
<h2>Error: <?php echo $error ?></h2>
|
||||
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
} elseif (isset($error)) {
|
||||
?>
|
||||
<h2>Error: <?php
|
||||
echo $error ?></h2>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
echo $OUTPUT->header();
|
||||
?>
|
||||
|
||||
@ -17,13 +18,15 @@ echo $OUTPUT->header();
|
||||
<br/>
|
||||
<div class="plagiarism-preview-content">
|
||||
<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>
|
||||
<br/>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
|
||||
if ($isSupported) {
|
||||
echo $form->display();
|
||||
} else {
|
||||
@ -32,4 +35,5 @@ echo $OUTPUT->header();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
echo $OUTPUT->footer();
|
Loading…
Reference in New Issue
Block a user