#14 - All Travis CI checks have been enabled.
#13 - A validation has been added. #12 - File with events has been deleted. #11 - A file access.php has been rewritten. #10 - install.xml file has been rewritten by xmldb tool. #9 - A Class with Privacy definition has been created. #8 - All urls and paths have been wrapped with build-in class `moodle_url`. #7 - Check of `MOODLE_INTERNAL` constant has been added to each file where it was needed. #6 - All strings like this have been wrapped with `get_string` function. #5 - All native calls of `curl` have been replaced with moodle `curl` class. #4 - All classes have been renamed with moodle style naming. FileModel had been dropped. #3 - GPL License has been added to each file. #2 - Call of deprecated function has been replaced with a new one.
77
.travis.yml
@ -1,50 +1,59 @@
|
||||
language: php
|
||||
|
||||
sudo: true
|
||||
|
||||
addons:
|
||||
firefox: "47.0.1"
|
||||
postgresql: "9.4"
|
||||
apt:
|
||||
packages:
|
||||
- oracle-java8-installer
|
||||
- oracle-java8-set-default
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.npm
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.npm
|
||||
|
||||
addons:
|
||||
postgresql: "9.6"
|
||||
apt:
|
||||
packages:
|
||||
- mysql-server-5.6
|
||||
- mysql-client-core-5.6
|
||||
- mysql-client-5.6
|
||||
|
||||
php:
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.0
|
||||
- 7.1
|
||||
|
||||
env:
|
||||
global:
|
||||
- MOODLE_BRANCH=MOODLE_35_STABLE
|
||||
matrix:
|
||||
- DB=pgsql
|
||||
- DB=mysqli
|
||||
- DB=pgsql MOODLE_BRANCH=MOODLE_33_STABLE
|
||||
- DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
|
||||
- DB=pgsql MOODLE_BRANCH=MOODLE_34_STABLE
|
||||
- DB=mysqli MOODLE_BRANCH=MOODLE_34_STABLE
|
||||
- DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
|
||||
- DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.6
|
||||
env: DB=pgsql MOODLE_BRANCH=MOODLE_33_STABLE
|
||||
- php: 5.6
|
||||
env: DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
|
||||
|
||||
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"
|
||||
- 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
|
||||
- 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
|
||||
- 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,33 +0,0 @@
|
||||
/**
|
||||
* Activity form
|
||||
*
|
||||
* @package plagiarism_pchkorg
|
||||
* @subpackage plagiarism
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/* jshint ignore:start */
|
||||
define(['jquery'], function ($) {
|
||||
return {
|
||||
checkReport: function () {
|
||||
var interval;
|
||||
var data = {
|
||||
'file': $('#plagcheck-loader').attr('data-file'),
|
||||
'cmid': $('#plagcheck-loader').attr('data-cmid')
|
||||
};
|
||||
var checkStatus = function () {
|
||||
$.post('/plagiarism/pchkorg/page/check.php', data, function (response) {
|
||||
if (!response || !response.success) {
|
||||
$('#plagcheck-loader').hide();
|
||||
clearInterval(interval);
|
||||
} else if (response.checked) {
|
||||
$('#plagcheck-loader').hide();
|
||||
clearInterval(interval);
|
||||
window.location.href = response.location;
|
||||
}
|
||||
}, 'JSON');
|
||||
};
|
||||
interval = setInterval(checkStatus, 1000)
|
||||
}
|
||||
};
|
||||
});
|
@ -1,3 +0,0 @@
|
||||
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" fill="#333" />
|
||||
</svg>
|
Before Width: | Height: | Size: 236 B |
@ -1,3 +0,0 @@
|
||||
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z" fill="#333" />
|
||||
</svg>
|
Before Width: | Height: | Size: 181 B |
@ -1,3 +0,0 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" fill="#cecece" />
|
||||
</svg>
|
Before Width: | Height: | Size: 173 B |
@ -1,3 +0,0 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" fill="#888" />
|
||||
</svg>
|
Before Width: | Height: | Size: 331 B |
@ -1,3 +0,0 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" fill="#333" />
|
||||
</svg>
|
Before Width: | Height: | Size: 170 B |
@ -1,3 +0,0 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" fill="#333" />
|
||||
</svg>
|
Before Width: | Height: | Size: 331 B |
@ -1,3 +0,0 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" fill="#4caf50" />
|
||||
</svg>
|
Before Width: | Height: | Size: 173 B |
@ -1 +0,0 @@
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M18.08,17.8C17.62,17.93 17.21,18 16.85,18C15.65,18 14.84,17.12 14.43,15.35H14.38C13.39,17.26 12,18.21 10.25,18.21C8.94,18.21 7.89,17.72 7.1,16.73C6.31,15.74 5.92,14.5 5.92,13C5.92,11.25 6.37,9.85 7.26,8.76C8.15,7.67 9.36,7.12 10.89,7.12C11.71,7.12 12.45,7.35 13.09,7.8C13.73,8.26 14.22,8.9 14.56,9.73H14.6L15.31,7.33H17.87L15.73,12.65C15.97,13.89 16.22,14.74 16.5,15.19C16.74,15.64 17.08,15.87 17.5,15.87C17.74,15.87 17.93,15.83 18.1,15.76L18.08,17.8M13.82,12.56C13.61,11.43 13.27,10.55 12.81,9.95C12.36,9.34 11.81,9.04 11.18,9.04C10.36,9.04 9.7,9.41 9.21,10.14C8.72,10.88 8.5,11.79 8.5,12.86C8.5,13.84 8.69,14.65 9.12,15.31C9.54,15.97 10.11,16.29 10.82,16.29C11.42,16.29 11.97,16 12.46,15.45C12.96,14.88 13.37,14.05 13.7,12.96L13.82,12.56Z" fill="#333" /></svg>
|
Before Width: | Height: | Size: 1009 B |
@ -1,3 +0,0 @@
|
||||
<svg fill="#888888" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" fill="#333" />
|
||||
</svg>
|
Before Width: | Height: | Size: 280 B |
@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M17,9H7V7H17M17,13H7V11H17M14,17H7V15H14M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M19,3H14.82C14.4,1.84 13.3,1 12,1C10.7,1 9.6,1.84 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z" fill="#333" />
|
||||
</svg>
|
Before Width: | Height: | Size: 366 B |
172
assets/viewer/logo-on-white-4ae10676b15e573d5f4ba85e13352ffb.svg
Normal file
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
]>
|
||||
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="715px" height="175px"
|
||||
viewBox="0 0 715 175" enable-background="new 0 0 715 175" xml:space="preserve">
|
||||
<metadata>
|
||||
<sfw xmlns="&ns_sfw;">
|
||||
<slices></slices>
|
||||
<sliceSourceBounds width="714.615" height="175.266" x="242.797" y="-687.791" bottomLeftOrigin="true"></sliceSourceBounds>
|
||||
</sfw>
|
||||
</metadata>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#333333" d="M232.751,46.809v25.788h-5.347V9.283h21.568c6.581,0,11.776,1.681,15.59,5.044
|
||||
c3.811,3.363,5.718,7.988,5.718,13.87c0,5.946-1.833,10.533-5.502,13.764c-3.666,3.234-8.977,4.848-15.935,4.848H232.751z
|
||||
M232.751,42.286h16.222c5.189,0,9.145-1.233,11.873-3.701c2.722-2.467,4.084-5.908,4.084-10.321
|
||||
c0-4.384-1.353-7.875-4.064-10.475c-2.709-2.596-6.559-3.927-11.545-3.984h-16.569V42.286z"/>
|
||||
<path fill="#333333" d="M286.608,68.074h31.264v4.522h-36.656V9.283h5.392V68.074z"/>
|
||||
<path fill="#333333" d="M365.573,54.81h-28.742l-6.526,17.787h-5.608l23.962-63.313h5.086l23.962,63.313h-5.566L365.573,54.81z
|
||||
M338.48,50.288h25.396l-12.698-34.482L338.48,50.288z"/>
|
||||
<path fill="#333333" d="M430.191,65.072c-1.855,2.642-4.761,4.696-8.717,6.178c-3.958,1.475-8.388,2.216-13.283,2.216
|
||||
c-4.961,0-9.367-1.188-13.22-3.565c-3.858-2.377-6.845-5.74-8.961-10.088c-2.116-4.349-3.188-9.335-3.215-14.959v-8.001
|
||||
c0-8.784,2.217-15.719,6.652-20.809c4.435-5.086,10.394-7.631,17.873-7.631c6.52,0,11.767,1.659,15.738,4.98
|
||||
c3.972,3.318,6.336,7.892,7.09,13.719h-5.351c-0.779-4.655-2.673-8.178-5.672-10.578c-3.002-2.396-6.922-3.598-11.764-3.598
|
||||
c-5.914,0-10.598,2.104-14.047,6.311c-3.45,4.207-5.173,10.14-5.173,17.8v7.485c0,4.815,0.817,9.074,2.457,12.772
|
||||
c1.637,3.698,3.984,6.564,7.045,8.594c3.057,2.033,6.571,3.047,10.546,3.047c4.605,0,8.564-0.725,11.869-2.174
|
||||
c2.146-0.957,3.74-2.071,4.783-3.347v-16.35h-17V42.55h22.348V65.072z"/>
|
||||
<path fill="#333333" d="M450.304,72.597h-5.351V9.283h5.351V72.597z"/>
|
||||
<path fill="#333333" d="M501.395,54.81h-28.743l-6.525,17.787h-5.608l23.962-63.313h5.086l23.96,63.313h-5.565L501.395,54.81z
|
||||
M474.301,50.288h25.395l-12.697-34.482L474.301,50.288z"/>
|
||||
<path fill="#333333" d="M546.845,46.203h-18.393v26.394h-5.392V9.283h20.563c6.758,0,12.034,1.636,15.829,4.909
|
||||
c3.801,3.273,5.701,7.847,5.701,13.725c0,4.052-1.192,7.627-3.569,10.727c-2.377,3.099-5.565,5.24-9.566,6.429l15.828,26.957
|
||||
v0.567h-5.694L546.845,46.203z M528.452,41.681h16.389c4.497,0,8.104-1.279,10.829-3.833c2.726-2.558,4.091-5.866,4.091-9.931
|
||||
c0-4.471-1.423-7.94-4.265-10.411c-2.841-2.467-6.828-3.701-11.956-3.701h-15.088V41.681z"/>
|
||||
<path fill="#333333" d="M584.621,72.597h-5.354V9.283h5.354V72.597z"/>
|
||||
<path fill="#333333" d="M636.417,57.029c0-3.508-1.23-6.284-3.698-8.327c-2.461-2.045-6.971-3.988-13.522-5.827
|
||||
c-6.552-1.843-11.331-3.85-14.347-6.023c-4.29-3.073-6.436-7.103-6.436-12.089c0-4.841,1.991-8.777,5.979-11.805
|
||||
c3.987-3.031,9.077-4.545,15.281-4.545c4.206,0,7.969,0.812,11.286,2.436c3.317,1.623,5.895,3.885,7.718,6.783
|
||||
c1.83,2.899,2.738,6.133,2.738,9.696h-5.393c0-4.329-1.475-7.811-4.432-10.443s-6.933-3.949-11.918-3.949
|
||||
c-4.839,0-8.697,1.083-11.564,3.244c-2.873,2.164-4.303,4.989-4.303,8.471c0,3.224,1.288,5.853,3.865,7.885
|
||||
c2.583,2.032,6.713,3.823,12.395,5.379c5.682,1.553,9.985,3.164,12.917,4.829c2.924,1.668,5.128,3.663,6.609,5.979
|
||||
c1.475,2.322,2.216,5.06,2.216,8.22c0,4.986-1.99,8.987-5.979,12.002c-3.987,3.015-9.237,4.522-15.764,4.522
|
||||
c-4.465,0-8.556-0.799-12.285-2.39c-3.724-1.594-6.552-3.826-8.479-6.7c-1.926-2.867-2.892-6.159-2.892-9.869h5.347
|
||||
c0,4.464,1.668,7.988,5.006,10.565c3.33,2.583,7.769,3.872,13.303,3.872c4.929,0,8.884-1.089,11.873-3.26
|
||||
C634.922,63.507,636.417,60.624,636.417,57.029z"/>
|
||||
<path fill="#333333" d="M660.491,9.283l23.353,55.879L707.28,9.283h7.132v63.313h-5.347V45.027l0.438-28.265l-23.571,55.834h-4.13
|
||||
L658.32,16.981l0.432,27.872v27.743h-5.348V9.283H660.491z"/>
|
||||
<path fill="#333333" d="M272.235,145.21c-0.725,6.668-3.108,11.77-7.151,15.307c-4.045,3.536-9.431,5.305-16.157,5.305
|
||||
c-4.696,0-8.849-1.172-12.456-3.523c-3.611-2.345-6.4-5.673-8.372-9.979c-1.971-4.303-2.973-9.225-3.002-14.762v-8.217
|
||||
c0-5.624,0.986-10.61,2.957-14.959c1.972-4.349,4.806-7.705,8.504-10.069c3.694-2.361,7.95-3.543,12.762-3.543
|
||||
c6.784,0,12.141,1.826,16.067,5.479c3.93,3.652,6.21,8.713,6.848,15.174h-5.392c-1.333-10.752-7.173-16.131-17.523-16.131
|
||||
c-5.74,0-10.313,2.148-13.718,6.442c-3.408,4.293-5.112,10.227-5.112,17.796v7.747c0,7.312,1.662,13.142,4.979,17.497
|
||||
c3.321,4.352,7.808,6.525,13.458,6.525c5.595,0,9.814-1.34,12.655-4.022c2.841-2.681,4.594-6.703,5.26-12.066H272.235z"/>
|
||||
<path fill="#333333" d="M331.159,164.952h-5.392V134.6h-36.179v30.353h-5.347v-63.313h5.347v28.438h36.179v-28.438h5.392V164.952z
|
||||
"/>
|
||||
<path fill="#333333" d="M381.26,134.6h-29.614v25.83h34.05v4.522h-39.397v-63.313h39.182v4.521h-33.834v23.917h29.614V134.6z"/>
|
||||
<path fill="#333333" d="M440.035,145.21c-0.725,6.668-3.108,11.77-7.151,15.307c-4.046,3.536-9.431,5.305-16.157,5.305
|
||||
c-4.696,0-8.848-1.172-12.455-3.523c-3.611-2.345-6.4-5.673-8.372-9.979c-1.971-4.303-2.973-9.225-3.002-14.762v-8.217
|
||||
c0-5.624,0.985-10.61,2.957-14.959s4.806-7.705,8.504-10.069c3.694-2.361,7.949-3.543,12.762-3.543
|
||||
c6.783,0,12.14,1.826,16.066,5.479c3.93,3.652,6.211,8.713,6.849,15.174h-5.393c-1.333-10.752-7.173-16.131-17.522-16.131
|
||||
c-5.74,0-10.314,2.148-13.719,6.442c-3.408,4.293-5.111,10.227-5.111,17.796v7.747c0,7.312,1.662,13.142,4.979,17.497
|
||||
c3.32,4.352,7.808,6.525,13.457,6.525c5.596,0,9.815-1.34,12.656-4.022c2.841-2.681,4.593-6.703,5.26-12.066H440.035z"/>
|
||||
<path fill="#333333" d="M466.303,133.514l-8.916,8.781v22.657h-5.347v-63.313h5.347v34.137l32.443-34.137h6.738l-26.525,28.178
|
||||
l28.567,35.136h-6.52L466.303,133.514z"/>
|
||||
<path fill="#BFBFBF" d="M507.418,161.821c0-1.015,0.329-1.878,0.979-2.587c0.651-0.712,1.56-1.066,2.719-1.066
|
||||
s2.068,0.354,2.738,1.066c0.663,0.709,0.998,1.572,0.998,2.587s-0.335,1.849-0.998,2.499c-0.67,0.654-1.579,0.979-2.738,0.979
|
||||
s-2.067-0.325-2.719-0.979C507.747,163.67,507.418,162.836,507.418,161.821z"/>
|
||||
<path fill="#BFBFBF" d="M573.689,136.729c0,5.83-1.005,10.945-3.021,15.352c-2.017,4.407-4.89,7.799-8.633,10.176
|
||||
c-3.736,2.377-8.059,3.565-12.955,3.565c-7.396,0-13.367-2.645-17.916-7.937c-4.555-5.289-6.828-12.427-6.828-21.414v-6.525
|
||||
c0-5.766,1.023-10.878,3.066-15.326c2.042-4.451,4.935-7.872,8.671-10.263c3.743-2.393,8.046-3.588,12.917-3.588
|
||||
c4.87,0,9.167,1.173,12.896,3.523c3.724,2.346,6.597,5.666,8.626,9.957c2.029,4.29,3.093,9.261,3.177,14.917V136.729z
|
||||
M568.342,129.861c0-7.624-1.727-13.596-5.173-17.916c-3.453-4.319-8.175-6.48-14.179-6.48c-5.882,0-10.572,2.168-14.063,6.5
|
||||
c-3.498,4.336-5.244,10.389-5.244,18.154v6.609c0,7.512,1.739,13.461,5.218,17.852c3.479,4.394,8.208,6.59,14.18,6.59
|
||||
c6.056,0,10.784-2.167,14.173-6.503c3.395-4.332,5.089-10.369,5.089-18.112V129.861z"/>
|
||||
<path fill="#BFBFBF" d="M610.255,138.559h-18.393v26.394h-5.392v-63.313h20.569c6.752,0,12.027,1.636,15.829,4.908
|
||||
c3.794,3.272,5.694,7.847,5.694,13.726c0,4.052-1.191,7.627-3.568,10.726c-2.378,3.099-5.566,5.241-9.567,6.43l15.829,26.957
|
||||
v0.567h-5.695L610.255,138.559z M591.862,134.036h16.396c4.49,0,8.098-1.279,10.823-3.833c2.725-2.558,4.091-5.866,4.091-9.931
|
||||
c0-4.472-1.424-7.94-4.265-10.411c-2.842-2.467-6.822-3.701-11.957-3.701h-15.088V134.036z"/>
|
||||
<path fill="#BFBFBF" d="M687.13,157.428c-1.855,2.641-4.761,4.696-8.717,6.178c-3.955,1.476-8.388,2.216-13.283,2.216
|
||||
c-4.961,0-9.367-1.188-13.22-3.565c-3.859-2.377-6.842-5.74-8.961-10.089c-2.113-4.349-3.189-9.334-3.215-14.958v-8.002
|
||||
c0-8.783,2.216-15.719,6.654-20.808c4.433-5.086,10.392-7.631,17.871-7.631c6.52,0,11.77,1.659,15.738,4.979
|
||||
c3.975,3.318,6.339,7.892,7.093,13.719h-5.354c-0.779-4.654-2.674-8.178-5.669-10.578c-3.002-2.396-6.926-3.598-11.764-3.598
|
||||
c-5.914,0-10.598,2.104-14.05,6.31c-3.447,4.207-5.174,10.141-5.174,17.8v7.486c0,4.815,0.818,9.073,2.461,12.771
|
||||
c1.637,3.697,3.981,6.564,7.042,8.594c3.06,2.032,6.57,3.047,10.546,3.047c4.605,0,8.567-0.725,11.872-2.174
|
||||
c2.146-0.957,3.737-2.071,4.78-3.347v-16.351h-17.001v-4.522h22.349V157.428z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#2F6A8F" d="M132.349,82.138c13.226,8.048,26.381,17.02,40.786,25.603c0.324-1.405,0.614-2.822,0.87-4.252
|
||||
c-15.069-9.138-28.808-18.724-42.792-27.186C131.718,78.201,132.095,80.15,132.349,82.138z"/>
|
||||
<path fill="#2F6A8F" d="M173.236,68.563c-0.469-2.086-1.013-4.145-1.627-6.172c-36.411-25.224-71.042-50.924-134.535-46.475
|
||||
c-2.168,1.521-4.264,3.138-6.283,4.844C99.015,13.78,134.319,41.884,173.236,68.563z"/>
|
||||
<path fill="#2F6A8F" d="M174.998,79.753c-0.168-1.826-0.388-3.637-0.667-5.429C133.14,46.488,97.469,16.316,25.373,25.73
|
||||
c-1.627,1.625-3.188,3.316-4.685,5.064C95.889,19.099,131.734,50.999,174.998,79.753z"/>
|
||||
<path fill="#2F6A8F" d="M164.09,131.033c0.681-1.207,1.334-2.432,1.959-3.674c-13.145-7.224-25.243-14.609-37.103-21.345
|
||||
c-0.613,1.398-1.295,2.759-2.041,4.079C138.789,116.668,150.921,123.909,164.09,131.033z"/>
|
||||
<path fill="#2F6A8F" d="M159.591,138.184c0.812-1.161,1.595-2.343,2.351-3.545c-13.278-7.067-25.521-14.207-37.512-20.64
|
||||
c-0.92,1.3-1.906,2.55-2.955,3.743C133.667,124.053,146.111,131.13,159.591,138.184z"/>
|
||||
<path fill="#2F6A8F" d="M100.324,118.792c2.023-0.846,3.935-1.884,5.734-3.094C89.421,108.246,73,102.803,54,101.322v5.605
|
||||
C71,108.288,85.471,112.688,100.324,118.792z"/>
|
||||
<path fill="#2F6A8F" d="M116.506,104.508c0.777-1.354,1.461-2.767,2.045-4.231c-19.865-10.582-39.752-18.627-63.56-20.243
|
||||
c-0.404,1.664-0.681,3.376-0.825,5.125C77.327,86.7,96.897,94.356,116.506,104.508z"/>
|
||||
<path fill="#2F6A8F" d="M132.498,92.541c12.318,7.396,24.763,15.512,38.339,23.335c0.444-1.324,0.858-2.662,1.24-4.015
|
||||
c-13.922-8.155-26.663-16.648-39.356-24.345c0.001,0.135,0.01,0.268,0.01,0.403C132.731,89.479,132.652,91.021,132.498,92.541z"/>
|
||||
<path fill="#2F6A8F" d="M56.618,75.061c23.86,1.796,43.678,10.005,63.367,20.72c0.378-1.563,0.647-3.167,0.796-4.806
|
||||
c-19.069-10.521-38.406-18.649-61.67-20.725C58.157,71.776,57.319,73.383,56.618,75.061z"/>
|
||||
<path fill="#2F6A8F" d="M110.396,112.23c1.227-1.158,2.354-2.407,3.394-3.737C94.868,99.05,76,91.987,54,90.438v5.383
|
||||
C75,97.359,92.454,103.686,110.396,112.23z"/>
|
||||
<path fill="#2F6A8F" d="M0,154.646c0,2.284,0,4.468,0,6.523c15-3.829,29-5.433,42-5.333v-6.682C29,149.052,15,150.701,0,154.646z"
|
||||
/>
|
||||
<path fill="#2F6A8F" d="M85.907,121h1.582c1.393,0,2.741,0.088,4.09-0.078C79.487,116.637,67,113.782,54,112.657v5.844
|
||||
C60,119.046,66.308,120,72.236,121h13.68H85.907z"/>
|
||||
<path fill="#2F6A8F" d="M130.563,101.749c11.921,6.924,24.057,14.497,37.259,21.867c0.561-1.26,1.094-2.536,1.596-3.826
|
||||
c-13.344-7.567-25.593-15.38-37.664-22.522C131.435,98.791,131.034,100.285,130.563,101.749z"/>
|
||||
<path fill="#2F6A8F" d="M120.852,85.794c-0.122-1.938-0.411-3.83-0.851-5.665c-16.272-8.952-33.091-15.993-52.802-18.774
|
||||
c-1.681,1.287-3.236,2.728-4.645,4.304C84.491,68.084,102.884,75.834,120.852,85.794z"/>
|
||||
<path fill="#2F6A8F" d="M123.476,168.118C99.771,158.931,78,151.686,54,149.69v6.669c21,1.7,40.892,7.356,61.779,14.786
|
||||
C118.398,170.255,120.974,169.243,123.476,168.118z"/>
|
||||
<path fill="#2F6A8F" d="M169.291,55.711c-0.99-2.514-2.097-4.969-3.306-7.363C135.597,27.336,103.959,7.586,53.197,6.964
|
||||
c-3.003,1.274-5.918,2.714-8.74,4.301C102.203,9.389,135.683,32.33,169.291,55.711z"/>
|
||||
<path fill="#2F6A8F" d="M138.97,16.677c-11.215-8.119-24.421-13.654-38.749-15.733C114.585,4.898,127.261,10.382,138.97,16.677z"
|
||||
/>
|
||||
<path fill="#2F6A8F" d="M161.189,40.021c-2.252-3.459-4.739-6.75-7.442-9.85C132.529,16.68,109.087,5.016,78.072,0.525
|
||||
c-4.822,0.514-9.526,1.418-14.083,2.68C106.107,6.086,134.713,22.15,161.189,40.021z"/>
|
||||
<path fill="#2F6A8F" d="M42,90.144c-13,0.265-27,2.409-42,6.986c0,1.6,0,3.354,0,5.236c15-4.564,29-6.674,42-6.882V90.144z"/>
|
||||
<path fill="#2F6A8F" d="M129.772,164.974c1.83-1.007,3.61-2.076,5.358-3.207C106.989,149.547,82,139.273,54,136.812v6.368
|
||||
C80,145.428,103.697,154.202,129.772,164.974z"/>
|
||||
<path fill="#2F6A8F" d="M144.015,155.218c-18.231-8.524-34.943-16.604-51.827-22.377c-1.545,0.16-3.113,0.159-4.7,0.159H71.374
|
||||
c22.886,5,44.462,14.566,68.481,25.426C141.276,157.369,142.662,156.355,144.015,155.218z"/>
|
||||
<path fill="#2F6A8F" d="M42,112.174c-13,0.054-27,2.026-42,6.481c0,1.856,0,3.745,0,5.656c15-4.396,29-6.306,42-6.314V112.174z"/>
|
||||
<path fill="#2F6A8F" d="M42,100.925c-13,0.154-27,2.226-42,6.765c0,1.74,0,3.554,0,5.418c15-4.505,29-6.511,42-6.613V100.925z"/>
|
||||
<path fill="#2F6A8F" d="M105.694,173.913C88.391,168.499,72,164.522,54,163.177v6.977c12,0.852,23.422,2.846,35.038,5.638
|
||||
C94.735,175.689,100.312,175.049,105.694,173.913z"/>
|
||||
<path fill="#2F6A8F" d="M157.021,141.679c-13.798-7.092-26.54-14.15-39.048-20.353c-1.332,1.217-2.743,2.347-4.213,3.399
|
||||
c12.983,6.107,26.174,13.202,40.454,20.398C155.178,144,156.113,142.851,157.021,141.679z"/>
|
||||
<path fill="#2F6A8F" d="M42,142.621v-6.369c-13-0.081-27,1.67-42,5.821c0,2.101,0,4.174,0,6.2C15,144.221,29,142.525,42,142.621z"
|
||||
/>
|
||||
<path fill="#2F6A8F" d="M42.987,79.778c-13.055,0.307-27.132,2.516-43.181,7.165C-0.197,87.269,0,87.593,0,87.92
|
||||
c0,0.803,0,2.207,0,4.082c15-4.587,29.644-6.771,42.548-7.081C42.664,83.177,42.68,81.463,42.987,79.778z"/>
|
||||
<path fill="#2F6A8F" d="M42,130.026v-6.091c-13-0.027-27,1.83-42,6.154c0,1.974,0,3.953,0,5.925C15,131.772,29,129.968,42,130.026
|
||||
z"/>
|
||||
<path fill="#2F6A8F" d="M42,169.696v-7.021c-13-0.088-27,1.472-42,5.181c0,2.793,0,5.131,0,6.869
|
||||
C15,171.142,29,169.628,42,169.696z"/>
|
||||
<path fill="#2F6A8F" d="M174.675,99.1c0.19-1.503,0.342-3.018,0.456-4.543c-17.533-11.027-33.417-22.683-50.372-32.249
|
||||
c1.621,2.352,3.022,4.863,4.181,7.506C144.057,78.776,158.64,89.199,174.675,99.1z"/>
|
||||
<path fill="#2F6A8F" d="M117.771,73.759c-1.311-2.794-2.999-5.376-4.996-7.686c-9.418-4.67-19.232-8.573-29.873-11.279
|
||||
c-3.314,0.457-6.473,1.4-9.406,2.757C89.762,60.559,104.057,66.424,117.771,73.759z"/>
|
||||
<path fill="#2F6A8F" d="M151.14,148.528c-14.992-7.393-28.835-14.594-42.52-20.613c-2.116,1.123-4.333,2.078-6.63,2.857
|
||||
c14.792,5.926,29.646,13.365,45.764,21.118C148.911,150.8,150.042,149.681,151.14,148.528z"/>
|
||||
<path fill="#2F6A8F" d="M91.254,42.839c9.083,0.753,17.41,4.198,24.184,9.538c20.922,10.271,39.362,24.289,59.917,37.46
|
||||
c0.014-0.638,0.024-1.276,0.024-1.917c0-1.007-0.023-2.009-0.057-3.009c-45.159-29.479-81.055-62.804-158.694-49
|
||||
c-1.227,1.669-2.397,3.382-3.506,5.138C45.008,34.747,69.88,36.515,91.254,42.839z"/>
|
||||
<path fill="#2F6A8F" d="M48.582,64.869c0.984-1.656,2.068-3.246,3.25-4.758c-14.651-0.347-30.954,1.603-49.662,6.603
|
||||
c-0.416,1.677-0.784,3.372-1.101,5.085C18.862,66.893,34.477,64.805,48.582,64.869z"/>
|
||||
<path fill="#2F6A8F" d="M46.059,69.741c-13.662,0.131-28.72,2.303-45.78,7.119c-0.209,1.665-0.367,3.345-0.481,5.038
|
||||
c16.491-4.733,31.107-6.934,44.425-7.183C44.743,73.014,45.35,71.351,46.059,69.741z"/>
|
||||
<path fill="#2F6A8F" d="M67.761,47.209c2.826-1.376,5.816-2.464,8.932-3.23c-18.755-3.525-40.283-3.456-66.583,2.21
|
||||
c-0.911,1.686-1.767,3.406-2.569,5.156C30.902,45.946,50.507,45.035,67.761,47.209z"/>
|
||||
<path fill="#2F6A8F" d="M55.942,55.519c1.619-1.577,3.357-3.03,5.197-4.353c-16.17-1.329-34.396,0.086-55.756,5.32
|
||||
c-0.646,1.685-1.245,3.392-1.788,5.125C23.462,56.504,40.616,54.768,55.942,55.519z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 16 KiB |
@ -1,834 +0,0 @@
|
||||
.pCheck-loader {
|
||||
font-size: 0.625rem;
|
||||
position: relative;
|
||||
text-indent: -9999em;
|
||||
border-top: 0.5em solid rgba(0, 0, 0, 0.1);
|
||||
border-right: 0.5em solid rgba(0, 0, 0, 0.1);
|
||||
border-bottom: 0.5em solid rgba(0, 0, 0, 0.1);
|
||||
border-left: 0.5em solid #e56d67;
|
||||
-webkit-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
will-change: rotate;
|
||||
-webkit-animation: load 1s linear infinite;
|
||||
animation: load 1s linear infinite;
|
||||
margin: 0 auto; }
|
||||
|
||||
.pCheck-loader,
|
||||
.pCheck-loader::after {
|
||||
border-radius: 50%;
|
||||
width: 2em;
|
||||
height: 2em; }
|
||||
|
||||
@-webkit-keyframes load {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes load {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
.pCheck-brief-percent {
|
||||
font-size: 0.875rem;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-right: 1px solid #efefef;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 8px 16px; }
|
||||
.pCheck-brief-percent:first-child {
|
||||
padding-left: 0; }
|
||||
.pCheck-brief-percent:last-child {
|
||||
border-right: none; }
|
||||
|
||||
.pCheck-brief-percent-type {
|
||||
text-transform: capitalize;
|
||||
font-weight: bold;
|
||||
border-radius: 1rem;
|
||||
font-size: 0.875rem; }
|
||||
|
||||
.pCheck-brief-percent-diagram {
|
||||
width: 100%;
|
||||
min-width: 120px;
|
||||
height: 4px;
|
||||
background-color: #efefef;
|
||||
position: relative;
|
||||
border-radius: 2px;
|
||||
margin: 4px 0; }
|
||||
|
||||
.pCheck-brief-percent-diagram-type {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
border-radius: 2px; }
|
||||
|
||||
.pCheck-brief-percent-sources {
|
||||
font-size: 0.875rem; }
|
||||
|
||||
.pCheck-nodes-words {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
|
||||
.pCheck-brief-percent-words {
|
||||
color: #888;
|
||||
font-size: 0.75rem; }
|
||||
|
||||
.pCheck-brief-percent-nodes {
|
||||
color: #888;
|
||||
font-size: 0.75rem; }
|
||||
.pCheck-brief-summary {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 1rem; }
|
||||
.pCheck-brief-title-total {
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
font-size: 1.25rem; }
|
||||
|
||||
.pCheck-brief-title-desc {
|
||||
font-size: 0.75rem;
|
||||
color: #888; }
|
||||
|
||||
.pCheck-brief-words {
|
||||
margin-top: 8px; }
|
||||
.pCheck-brief-briefItem {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0 1px; }
|
||||
.pCheck-brief-briefItem:first-child {
|
||||
padding-left: 0; }
|
||||
.pCheck-brief-briefItem:hover {
|
||||
cursor: help; }
|
||||
|
||||
.pCheck-brief-briefItem-color {
|
||||
width: 100%;
|
||||
border-radius: 2px;
|
||||
height: 6px; }
|
||||
.pCheck-brief-measureBriefLine {
|
||||
width: 100%; }
|
||||
|
||||
.pCheck-brief-briefLine {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin: 4px 0 12px;
|
||||
border-radius: 3px; }
|
||||
.pCheck-brief {
|
||||
width: 100%; }
|
||||
|
||||
.pCheck-brief-info {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
min-height: 101px; }
|
||||
|
||||
.pCheck-brief-title {
|
||||
min-width: 240px; }
|
||||
.pCheck-node {
|
||||
font-size: 0.875rem;
|
||||
margin: 0 8px 0 0;
|
||||
font-family: inherit;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
display: inline;
|
||||
padding: 0.1rem 0; }
|
||||
.pCheck-node.pCheck-plagiarism.pCheck-matched:hover, .pCheck-node.pCheck-paraphrase.pCheck-matched:hover, .pCheck-node.pCheck-header.pCheck-matched:hover, .pCheck-node.pCheck-quote.pCheck-matched:hover, .pCheck-node.pCheck-reference.pCheck-matched:hover {
|
||||
cursor: pointer;
|
||||
color: #1976d2 !important;
|
||||
border-color: transparent !important; }
|
||||
.pCheck-node.pCheck-plagiarism.pCheck-filtered:hover, .pCheck-node.pCheck-paraphrase.pCheck-filtered:hover, .pCheck-node.pCheck-header.pCheck-filtered:hover, .pCheck-node.pCheck-quote.pCheck-filtered:hover, .pCheck-node.pCheck-reference.pCheck-filtered:hover {
|
||||
cursor: text;
|
||||
color: inherit !important; }
|
||||
.pCheck-node.pCheck-header, .pCheck-node.pCheck-quote, .pCheck-node.pCheck-reference {
|
||||
border-bottom-style: dashed !important; }
|
||||
|
||||
.pCheck-highlighted .pCheck-node.pCheck-unhighlighted {
|
||||
color: inherit !important;
|
||||
border-bottom: transparent !important; }
|
||||
.pCheck-dropDown {
|
||||
position: relative;
|
||||
min-height: 22px;
|
||||
min-width: 22px; }
|
||||
.pCheck-dropDown.pCheck-bottom .pCheck-dropDown-list {
|
||||
top: 0; }
|
||||
.pCheck-dropDown.pCheck-top .pCheck-dropDown-list {
|
||||
bottom: 0; }
|
||||
|
||||
.pCheck-dropDown-button {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
background-image: url(d1af325a022bb1885a7869dad9eaa500.svg);
|
||||
background-size: 18px 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center; }
|
||||
.pCheck-dropDown-button:hover {
|
||||
cursor: pointer;
|
||||
background-color: #b3e5fc; }
|
||||
|
||||
.pCheck-dropDown-list {
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
z-index: 32;
|
||||
border-radius: 2px;
|
||||
right: 0;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
min-width: 100px;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: column nowrap;
|
||||
flex-flow: column nowrap;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
-webkit-box-shadow: 0 4px 12px -4px #888;
|
||||
box-shadow: 0 4px 12px -4px #888; }
|
||||
.pCheck-source-filterItem {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
padding: 8px 16px 8px 12px;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pCheck-source-filterItem.pCheck-inactive .pCheck-source-filterItem-switch {
|
||||
background-image: url(20288744996c2dc297e5b40186f339ae.svg); }
|
||||
.pCheck-source-filterItem:last-child {
|
||||
border-bottom: none; }
|
||||
.pCheck-source-filterItem:hover {
|
||||
cursor: pointer;
|
||||
background-color: #efefef; }
|
||||
|
||||
.pCheck-source-filterItem-switch {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-size: 18px 18px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(6d872c8ed163708099999ace50567848.svg); }
|
||||
|
||||
.pCheck-source-filterItem-text {
|
||||
display: block;
|
||||
margin-right: 8px;
|
||||
margin-left: 8px; }
|
||||
|
||||
.pCheck-source-filterItem-type {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
margin-right: 0;
|
||||
margin-left: auto; }
|
||||
.pCheck-source.pCheck-all {
|
||||
border-bottom: 1px solid #efefef;
|
||||
padding-bottom: 8px;
|
||||
border-radius: 0; }
|
||||
.pCheck-source.pCheck-all .pCheck-source-label,
|
||||
.pCheck-source.pCheck-all .pCheck-source-name,
|
||||
.pCheck-source.pCheck-all .pCheck-source-index {
|
||||
opacity: 1; }
|
||||
.pCheck-source.pCheck-all .pCheck-source-name {
|
||||
padding-left: 4px;
|
||||
padding-right: 0; }
|
||||
.pCheck-source.pCheck-all .pCheck-dropDown-button {
|
||||
background-image: url(189d30258cbfac64b38b693c383a7b31.svg); }
|
||||
|
||||
.pCheck-source-typeBadges {
|
||||
margin-right: 0;
|
||||
margin-left: auto; }
|
||||
|
||||
.pCheck-source-typeBadge {
|
||||
font-size: 0.75rem;
|
||||
margin: 0 2px;
|
||||
font-weight: bold;
|
||||
line-height: 62%; }
|
||||
.pCheck-source-percent {
|
||||
min-width: 52px;
|
||||
padding: 0 4px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pCheck-source-action {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 8px 16px 8px 12px;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pCheck-source-action:hover {
|
||||
cursor: pointer;
|
||||
background-color: #efefef; }
|
||||
.pCheck-source-action::before {
|
||||
content: '';
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-size: 18px 18px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 8px;
|
||||
display: block;
|
||||
background-image: url(20288744996c2dc297e5b40186f339ae.svg); }
|
||||
.pCheck-source-action.pCheck-active::before {
|
||||
background-image: url(6d872c8ed163708099999ace50567848.svg); }
|
||||
.pCheck-source-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 8px 16px 8px 12px;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pCheck-source-link::before {
|
||||
content: '';
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-size: 18px 18px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(463d1ca07dcbf1c18745b2999af60e4b.svg);
|
||||
margin-right: 8px; }
|
||||
.pCheck-source-link:hover {
|
||||
cursor: pointer;
|
||||
background-color: #efefef; }
|
||||
.pCheck-source-index {
|
||||
min-width: 22px;
|
||||
min-height: 22px;
|
||||
color: #333;
|
||||
border-radius: 50%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
font-size: 0.75rem;
|
||||
font-weight: bold;
|
||||
margin: 0 4px 0 8px;
|
||||
text-align: center;
|
||||
background-color: #efefef; }
|
||||
.pCheck-source-index:hover {
|
||||
cursor: help; }
|
||||
.pCheck-source-index.external, .pCheck-source-index.cache {
|
||||
visibility: hidden; }
|
||||
.pCheck-source-name {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
text-decoration: none; }
|
||||
.pCheck-source-name.pCheck-link {
|
||||
color: #0d47a1; }
|
||||
.pCheck-source-name:hover {
|
||||
cursor: pointer;
|
||||
color: #1976d2; }
|
||||
.pCheck-source-label {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
min-width: 84px;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
.pCheck-source-label:hover {
|
||||
cursor: pointer; }
|
||||
|
||||
.pCheck-source-checkbox {
|
||||
outline: none;
|
||||
min-width: 16px;
|
||||
min-height: 16px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
background-color: transparent;
|
||||
border: 1px solid #888;
|
||||
border-radius: 2px; }
|
||||
.pCheck-source-checkbox:hover {
|
||||
cursor: pointer; }
|
||||
.pCheck-source-checkbox:checked {
|
||||
background: transparent url(6d872c8ed163708099999ace50567848.svg) center center no-repeat;
|
||||
background-size: 12px 12px; }
|
||||
.pCheck-highlighted .pCheck-source-label,
|
||||
.pCheck-highlighted .pCheck-source-name,
|
||||
.pCheck-highlighted .pCheck-source-index {
|
||||
opacity: 0.4; }
|
||||
|
||||
.pCheck-source {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-radius: 2px;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
padding: 4px;
|
||||
margin-bottom: 4px;
|
||||
font-size: 0.875rem;
|
||||
line-height: 160%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%; }
|
||||
.pCheck-source.pCheck-active {
|
||||
background-color: #b3e5fc; }
|
||||
.pCheck-source.pCheck-highlighted .pCheck-source-label,
|
||||
.pCheck-source.pCheck-highlighted .pCheck-source-name,
|
||||
.pCheck-source.pCheck-highlighted .pCheck-source-index {
|
||||
opacity: 1; }
|
||||
.pCheck-source.pCheck-ignored {
|
||||
background-color: #e1bee7; }
|
||||
.pCheck-details-title {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
|
||||
.pCheck-details-title-type {
|
||||
padding: 4px 12px;
|
||||
border-radius: 16px;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
color: #fff; }
|
||||
|
||||
.pCheck-details-title-title {
|
||||
font-weight: bold;
|
||||
margin-left: 8px; }
|
||||
.pCheck-details-text {
|
||||
padding-bottom: 8px; }
|
||||
|
||||
.pCheck-details-text-text {
|
||||
font-size: 0.875rem;
|
||||
padding: 16px 0; }
|
||||
|
||||
.pCheck-details-text-textInfo {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
font-size: 0.875rem; }
|
||||
|
||||
.pCheck-details-text-percent {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap; }
|
||||
|
||||
.pCheck-details-text-percent-text {
|
||||
margin-left: 4px; }
|
||||
|
||||
.pCheck-details-text-words {
|
||||
margin-left: 4px;
|
||||
color: #888; }
|
||||
|
||||
.pCheck-details-text-textCopy {
|
||||
padding: 6px 8px 6px 4px;
|
||||
color: inherit;
|
||||
background-color: #efefef;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
outline: none;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
font-size: 0.875rem; }
|
||||
.pCheck-details-text-textCopy:hover {
|
||||
cursor: pointer;
|
||||
background-color: #b3e5fc; }
|
||||
.pCheck-details-text-textCopy::before {
|
||||
content: '';
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
margin-right: 4px;
|
||||
background-image: url(e1a427ae8d674f488554205093c3695f.svg);
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain; }
|
||||
.pCheck-details-text-textCopy.pCheck-copied::before {
|
||||
background-image: url(7b6b06644be2e5537935b55a7e3141c9.svg); }
|
||||
.pCheck-details-sourceItem-cos {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
color: #888;
|
||||
min-width: 52px;
|
||||
margin-right: 8px; }
|
||||
.pCheck-details-sourceItem-cos::before {
|
||||
content: '';
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
display: block;
|
||||
background-image: url(8c9a309759d08c07e9ef4f7e2093e710.svg);
|
||||
background-size: cover;
|
||||
background-color: #efefef;
|
||||
border-radius: 50%;
|
||||
margin-right: 4px; }
|
||||
.pCheck-details-sourceItem-single {
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
color: #0d47a1;
|
||||
padding: 4px 8px; }
|
||||
.pCheck-details-sourceItem-single:hover {
|
||||
color: #1976d2; }
|
||||
|
||||
.pCheck-details-sourceItem-single-icon {
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
background-image: url(463d1ca07dcbf1c18745b2999af60e4b.svg);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-size: 18px 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center; }
|
||||
.pCheck-details-sourceItem-links {
|
||||
margin-right: 0;
|
||||
margin-left: auto;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
|
||||
.pCheck-details-sourceItem-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-indent: -9999px; }
|
||||
.pCheck-details-sourceItem-link::after {
|
||||
content: '';
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-image: url(6fe578c1c8ac120206998fccdd3bac84.svg);
|
||||
display: block;
|
||||
background-position: center center;
|
||||
background-size: 18px 18px;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 50%; }
|
||||
.pCheck-details-sourceItem-link:hover::after {
|
||||
background-color: #b3e5fc; }
|
||||
.pCheck-details-sourceItem-multi {
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 4px 8px; }
|
||||
.pCheck-details-sourceItem {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
font-size: 0.875rem; }
|
||||
.pCheck-details-sourceItem:hover {
|
||||
background-color: #efefef; }
|
||||
.pCheck-details-sourceItem .pCheck-source-index {
|
||||
margin: 0 8px 0 0; }
|
||||
.pCheck-nodeDetails-sourcesList-tabs {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
padding: 0;
|
||||
border-bottom: 1px solid #cecece;
|
||||
margin: 16px 0; }
|
||||
|
||||
.pCheck-nodeDetails-sourcesList-tab {
|
||||
list-style-type: none;
|
||||
font-size: 0.875rem;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px 4px 0 0;
|
||||
margin-right: 4px;
|
||||
outline: none;
|
||||
background-color: #fff; }
|
||||
.pCheck-nodeDetails-sourcesList-tab.pCheck-active {
|
||||
position: relative;
|
||||
bottom: -1px;
|
||||
border: 1px solid #cecece;
|
||||
border-bottom: none; }
|
||||
.pCheck-nodeDetails-sourcesList-tab.pCheck-active:hover {
|
||||
cursor: default;
|
||||
background-color: #fff; }
|
||||
.pCheck-nodeDetails-sourcesList-tab.pCheck-disabled {
|
||||
color: #888; }
|
||||
.pCheck-nodeDetails-sourcesList-tab.pCheck-disabled:hover {
|
||||
cursor: default;
|
||||
background-color: #fff; }
|
||||
.pCheck-nodeDetails-sourcesList-tab:hover {
|
||||
cursor: pointer;
|
||||
background-color: #b3e5fc; }
|
||||
.pCheck-details {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row wrap;
|
||||
flex-flow: row wrap;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
|
||||
.pCheck-details-overlay {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 64;
|
||||
opacity: 0.6;
|
||||
background-color: rgba(0, 0, 0, 0.16); }
|
||||
|
||||
.pCheck-details-details {
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
max-height: 100%;
|
||||
padding: 16px 32px 32px;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.12);
|
||||
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.12);
|
||||
z-index: 65; }
|
||||
|
||||
.pCheck-details-header {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
|
||||
.pCheck-details-close {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background-image: url(18165c78c6d1452d17d41df86c8f7c48.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: 18px 18px; }
|
||||
.pCheck-details-close:hover {
|
||||
cursor: pointer;
|
||||
background-color: #efefef; }
|
||||
.pCheck-workspace {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between; }
|
||||
|
||||
.pCheck-nodes {
|
||||
padding: 0 24px 0 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.pCheck-sources-sticky {
|
||||
overflow-y: auto; }
|
||||
|
||||
.pCheck-sources {
|
||||
width: 320px;
|
||||
min-width: 320px;
|
||||
max-width: 320px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
top: 0; }
|
||||
|
||||
.pCheck-empty {
|
||||
padding: 8px 16px 8px 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-size: 1rem;
|
||||
border-bottom: 2px solid #efefef;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: row nowrap;
|
||||
flex-flow: row nowrap;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
.pCheck-empty::before {
|
||||
content: '';
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: block;
|
||||
background-image: url(7b6b06644be2e5537935b55a7e3141c9.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
margin-right: 4px; }
|
||||
|
||||
/*# sourceMappingURL=plagCheck.css.map*/
|
@ -1 +0,0 @@
|
||||
{"version":3,"file":"plagCheck.css","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","sourceRoot":""}
|
1
assets/viewer/public-report.bundle.min.js
vendored
Normal file
@ -58,7 +58,7 @@ body {
|
||||
.SidebarInset:hover {
|
||||
color: white; }
|
||||
.SidebarInset:hover .SidebarInset__open-arrow {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -98px -89px;
|
||||
height: 29px;
|
||||
width: 18px; }
|
||||
@ -84,7 +84,7 @@ body {
|
||||
margin-left: 10px; }
|
||||
|
||||
.SidebarInset__open-arrow {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -80px -60px;
|
||||
height: 29px;
|
||||
width: 18px;
|
||||
@ -117,19 +117,19 @@ body {
|
||||
background: #a13169; }
|
||||
|
||||
.SidebarInset-plag .SidebarInset__title-text:after {
|
||||
background: url(wave-dc15a25d325f6e422665aaea4eee9834.svg?dc15a25d325f6e422665aaea4eee9834) 0 center repeat-x; }
|
||||
background: url(wave-dc15a25d325f6e422665aaea4eee9834.svg) 0 center repeat-x; }
|
||||
|
||||
.SidebarInse-quot:hover {
|
||||
background: #639ec3; }
|
||||
|
||||
.SidebarInse-quot .SidebarInset__title-text:after {
|
||||
background: url(wave-qu-8ff3a7579823f9099d975ad581dc134e.svg?8ff3a7579823f9099d975ad581dc134e) 0 center repeat-x; }
|
||||
background: url(wave-qu-8ff3a7579823f9099d975ad581dc134e.svg) 0 center repeat-x; }
|
||||
|
||||
.SidebarInset-ref:hover {
|
||||
background: #289870; }
|
||||
|
||||
.SidebarInset-ref .SidebarInset__title-text:after {
|
||||
background: url(wave-rf-d7c35952140e971b52a5fbb5b5acf36d.svg?d7c35952140e971b52a5fbb5b5acf36d) 0 center repeat-x; }
|
||||
background: url(wave-rf-d7c35952140e971b52a5fbb5b5acf36d.svg) 0 center repeat-x; }
|
||||
|
||||
.SidebarInset__title-button {
|
||||
display: inline-block;
|
||||
@ -255,17 +255,17 @@ body {
|
||||
.ui-plagCheck-stats-matched-percent {
|
||||
color: #a13169;
|
||||
display: inline-block;
|
||||
font-size: 62px;
|
||||
font-size: 37px;
|
||||
line-height: 37px;
|
||||
font-weight: 600;
|
||||
line-height: 68px;
|
||||
margin-right: 10px; }
|
||||
|
||||
.ui-plagCheck-stats-matched-text {
|
||||
color: #333;
|
||||
display: inline-block;
|
||||
font-size: 22px;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: 26px;
|
||||
line-height: 18px;
|
||||
max-width: 180px;
|
||||
position: relative;
|
||||
text-transform: uppercase; }
|
||||
@ -516,15 +516,15 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
color: white; }
|
||||
|
||||
.ui-plagCheck-node-quSources {
|
||||
background-image: url(wave-qu-8ff3a7579823f9099d975ad581dc134e.svg?8ff3a7579823f9099d975ad581dc134e);
|
||||
background-image: url(wave-qu-8ff3a7579823f9099d975ad581dc134e.svg);
|
||||
font-weight: 400; }
|
||||
|
||||
.ui-plagCheck-node-reSources {
|
||||
background-image: url(wave-rf-d7c35952140e971b52a5fbb5b5acf36d.svg?d7c35952140e971b52a5fbb5b5acf36d);
|
||||
background-image: url(wave-rf-d7c35952140e971b52a5fbb5b5acf36d.svg);
|
||||
font-weight: 400; }
|
||||
|
||||
.ui-plagCheck-node-sources {
|
||||
background-image: url(wave-dc15a25d325f6e422665aaea4eee9834.svg?dc15a25d325f6e422665aaea4eee9834);
|
||||
background-image: url(wave-dc15a25d325f6e422665aaea4eee9834.svg);
|
||||
font-weight: 400; }
|
||||
|
||||
@media only screen and (max-width: 426px) {
|
||||
@ -576,7 +576,7 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
left: auto;
|
||||
min-width: 160px; }
|
||||
.ui-plagCheck-source.active .plagCheckSource-web-cache-icon, .ui-plagCheck-source:hover .plagCheckSource-web-cache-icon {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -1055px -1053px;
|
||||
height: 15px;
|
||||
width: 60px; }
|
||||
@ -588,7 +588,7 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
background: #a13169;
|
||||
color: #fff; }
|
||||
.ui-plagCheck-source-enabled.ui-plagCheck-source-sources.active .plagCheckSource-web-cache-icon, .ui-plagCheck-source-enabled.ui-plagCheck-source-sources.ui-plagCheck-source:hover .plagCheckSource-web-cache-icon {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -1055px -1053px;
|
||||
height: 15px;
|
||||
width: 60px; }
|
||||
@ -597,7 +597,7 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
color: #fff;
|
||||
background-color: #a13169; }
|
||||
.ui-plagCheck-source-enabled.ui-plagCheck-source-sources:hover .plagCheckSource-web-cache-icon {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -1055px -1053px;
|
||||
height: 15px;
|
||||
width: 60px; }
|
||||
@ -606,7 +606,7 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
background: #639ec3;
|
||||
color: #fff; }
|
||||
.ui-plagCheck-source-enabled.ui-plagCheck-source-quSources.active .ui-plagCheck-source-a, .ui-plagCheck-source-enabled.ui-plagCheck-source-quSources.ui-plagCheck-source:hover .ui-plagCheck-source-a {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -2995px -3158px;
|
||||
height: 23px;
|
||||
width: 16px; }
|
||||
@ -658,7 +658,7 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
cursor: pointer; }
|
||||
|
||||
.ui-plagCheck-source-a-link {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -4113px -3962px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
@ -667,7 +667,7 @@ html body .SidebarInset__content-open .ui-plagCheck-sources-scroll {
|
||||
opacity: 1; }
|
||||
|
||||
.ui-plagCheck-source-external-link {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -2959px -3122px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
@ -708,13 +708,418 @@ html body .ui-plagCheck-source-name {
|
||||
padding: 0 4px; }
|
||||
|
||||
.plagCheckSource-web-cache-icon {
|
||||
background: url(sprite-d4601b0b6de55a813269678618bcc950.svg?d4601b0b6de55a813269678618bcc950) no-repeat;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -995px -1038px;
|
||||
height: 15px;
|
||||
width: 60px;
|
||||
min-width: 65px;
|
||||
margin-right: 5px;
|
||||
margin-left: -5px; }
|
||||
.Spinner {
|
||||
margin: 0px auto;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%); }
|
||||
|
||||
.Spinner-little {
|
||||
width: 20px;
|
||||
height: 20px; }
|
||||
.Spinner-little .Spinner__cube1, .Spinner-little .Spinner__cube2 {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
-webkit-animation: sk-little-cubemove 1.8s infinite ease-in-out;
|
||||
animation: sk-little-cubemove 1.8s infinite ease-in-out; }
|
||||
.Spinner-little .Spinner__cube2 {
|
||||
-webkit-animation-delay: -0.9s;
|
||||
animation-delay: -0.9s; }
|
||||
|
||||
.Spinner__cube1, .Spinner__cube2 {
|
||||
background-color: #a13169;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
-webkit-animation: sk-cubemove 1.8s infinite ease-in-out;
|
||||
animation: sk-cubemove 1.8s infinite ease-in-out; }
|
||||
|
||||
html body .Spinner__cube2 {
|
||||
-webkit-animation-delay: -0.9s;
|
||||
animation-delay: -0.9s; }
|
||||
|
||||
.Spinner__with-title-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center; }
|
||||
|
||||
.Spinner__title {
|
||||
font-size: 25pt;
|
||||
margin-bottom: 25px;
|
||||
font-weight: bold;
|
||||
color: #306a8f; }
|
||||
|
||||
.Spinner__with-title-spinner-container {
|
||||
position: relative;
|
||||
height: 40px; }
|
||||
|
||||
@-webkit-keyframes sk-cubemove {
|
||||
25% {
|
||||
-webkit-transform: translateX(42px) rotate(-90deg) scale(0.5); }
|
||||
50% {
|
||||
-webkit-transform: translateX(42px) translateY(42px) rotate(-180deg); }
|
||||
75% {
|
||||
-webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5); }
|
||||
100% {
|
||||
-webkit-transform: rotate(-360deg); } }
|
||||
|
||||
@keyframes sk-cubemove {
|
||||
25% {
|
||||
transform: translateX(42px) rotate(-90deg) scale(0.5);
|
||||
-webkit-transform: translateX(42px) rotate(-90deg) scale(0.5); }
|
||||
50% {
|
||||
transform: translateX(42px) translateY(42px) rotate(-179deg);
|
||||
-webkit-transform: translateX(42px) translateY(42px) rotate(-179deg); }
|
||||
50.1% {
|
||||
transform: translateX(42px) translateY(42px) rotate(-180deg);
|
||||
-webkit-transform: translateX(42px) translateY(42px) rotate(-180deg); }
|
||||
75% {
|
||||
transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
|
||||
-webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5); }
|
||||
100% {
|
||||
transform: rotate(-360deg);
|
||||
-webkit-transform: rotate(-360deg); } }
|
||||
|
||||
@keyframes sk-little-cubemove {
|
||||
25% {
|
||||
transform: translateX(21px) rotate(-90deg) scale(0.5);
|
||||
-webkit-transform: translateX(21px) rotate(-90deg) scale(0.5); }
|
||||
50% {
|
||||
transform: translateX(21px) translateY(21px) rotate(-179deg);
|
||||
-webkit-transform: translateX(21px) translateY(21px) rotate(-179deg); }
|
||||
50.1% {
|
||||
transform: translateX(21px) translateY(21px) rotate(-180deg);
|
||||
-webkit-transform: translateX(21px) translateY(21px) rotate(-180deg); }
|
||||
75% {
|
||||
transform: translateX(0px) translateY(21px) rotate(-270deg) scale(0.5);
|
||||
-webkit-transform: translateX(0px) translateY(21px) rotate(-270deg) scale(0.5); }
|
||||
100% {
|
||||
transform: rotate(-360deg);
|
||||
-webkit-transform: rotate(-360deg); } }
|
||||
.SelectOption {
|
||||
background: #fff;
|
||||
color: #306a8f;
|
||||
padding: 0 5px;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
min-height: 45px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s linear;
|
||||
text-decoration: none; }
|
||||
.SelectOption:hover {
|
||||
background: #306a8f;
|
||||
color: white; }
|
||||
|
||||
.SelectOption:first-child {
|
||||
border-top: 0px; }
|
||||
|
||||
.SelectOption__container {
|
||||
overflow: hidden; }
|
||||
|
||||
.SelectOption__title {
|
||||
white-space: nowrap;
|
||||
padding: 0 20px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden; }
|
||||
|
||||
@media only screen and (max-width: 1025px) {
|
||||
.SelectOption {
|
||||
padding: 0; } }
|
||||
.SelectDropDown {
|
||||
transition: background, height 0.2s linear;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 30px;
|
||||
z-index: 100000;
|
||||
margin-top: 10px; }
|
||||
.SelectDropDown:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -1px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-bottom: 7px solid #fff;
|
||||
border-width: 0 0 10px 10px; }
|
||||
.SelectDropDown:hover:before {
|
||||
border-bottom: 7px solid #306a8f;
|
||||
border-width: 0 0 10px 10px; }
|
||||
|
||||
.SelectDropDown__opened {
|
||||
height: 100%; }
|
||||
|
||||
.SelectDropDown__closed {
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
outline: none; }
|
||||
|
||||
.SelectDropDown__scroll-trumb {
|
||||
border-radius: inherit;
|
||||
background-color: rgba(0, 0, 0, 0.2); }
|
||||
|
||||
.SelectDropDown__scrollbar {
|
||||
outline: 1px solid #fff; }
|
||||
.SelectDropDown__scrollbar:hover {
|
||||
outline: 1px solid #306a8f; }
|
||||
.SelectHeader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
min-height: 45px;
|
||||
background: #fff;
|
||||
padding: 0 5px;
|
||||
color: #306a8f;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #bfbfbf; }
|
||||
.SelectHeader:hover {
|
||||
background: #306a8f;
|
||||
color: white;
|
||||
border-bottom: 1px solid transparent; }
|
||||
.SelectHeader:hover .SelectHeader__clear-button {
|
||||
color: white; }
|
||||
.SelectHeader:hover .SelectHeader__placeholder {
|
||||
color: white; }
|
||||
.SelectHeader:hover:after {
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -5539px -5109px;
|
||||
height: 29px;
|
||||
width: 12px; }
|
||||
.SelectHeader:after {
|
||||
content: '';
|
||||
display: block;
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -5551px -5138px;
|
||||
height: 29px;
|
||||
width: 12px;
|
||||
transition: .3s transform; }
|
||||
|
||||
.SelectHeader__title {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden; }
|
||||
|
||||
.SelectHeader.SelectHeader-open:after {
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.SelectHeader__placeholder {
|
||||
color: #ccc;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
cursor: pointer; }
|
||||
.SelectHeader__placeholder:hover {
|
||||
color: #fff; }
|
||||
|
||||
.SelectHeader__clear-button {
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
color: #306a8f;
|
||||
font-size: 12px; }
|
||||
|
||||
@media only screen and (max-width: 1025px) {
|
||||
.SelectHeader {
|
||||
padding: 0 5px; } }
|
||||
.Select {
|
||||
position: relative; }
|
||||
html body #ExternalReport .ExternalReport__header-container {
|
||||
height: 80px;
|
||||
padding: 0 20px; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__header-logo {
|
||||
flex-basis: 25%;
|
||||
max-width: 25%; }
|
||||
html body #ExternalReport .ExternalReport__header-logo:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
background-image: url(logo-on-white-4ae10676b15e573d5f4ba85e13352ffb.svg);
|
||||
height: 50px;
|
||||
margin: 15px 0; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__header-logo-img {
|
||||
height: 50px;
|
||||
margin: 15px 0; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__header-close-button:before,
|
||||
html body #ExternalReport .ExternalReport__header-close-button:after {
|
||||
background: #333;
|
||||
border-radius: 2px;
|
||||
content: '';
|
||||
height: 2px;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 5px;
|
||||
transform-origin: center;
|
||||
transform: rotate(45deg);
|
||||
width: 50px; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__header-close-button {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 50px;
|
||||
opacity: .8;
|
||||
position: relative;
|
||||
width: 50px; }
|
||||
html body #ExternalReport .ExternalReport__header-close-button:after {
|
||||
transform: rotate(-45deg); }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-container {
|
||||
background: #efefef;
|
||||
font-size: 16px; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__top-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 500000000;
|
||||
background: #fff; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation {
|
||||
margin: 0 auto; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
color: #306a8f;
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
border-bottom: 1px solid transparent; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-previous:before,
|
||||
html body #ExternalReport .ExternalReport__navigation-next:after {
|
||||
background: url(sprite-629f3f2022a6e5fc28f69395449a59a3.svg) no-repeat;
|
||||
background-position: -80px -60px;
|
||||
height: 29px;
|
||||
width: 18px;
|
||||
background-position: -80px -60px;
|
||||
height: 29px;
|
||||
width: 18px;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
transition: margin .4s ease; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-previous:hover:before {
|
||||
margin-right: 5px;
|
||||
margin-left: -5px; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-next:hover:after {
|
||||
margin-right: -5px;
|
||||
margin-left: 5px; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-previous:before {
|
||||
transform: rotate(90deg); }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-next:after {
|
||||
transform: rotate(-90deg); }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-source-choosen, html body #ExternalReport .ExternalReport__navigation-source:hover {
|
||||
text-decoration: underline;
|
||||
margin-top: 3px;
|
||||
color: #306a8f; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-source {
|
||||
color: #306a8f;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
padding-right: 15px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
font-weight: normal; }
|
||||
html body #ExternalReport .ExternalReport__navigation-source:last-child {
|
||||
padding-right: 0px; }
|
||||
|
||||
html body #ExternalReport .ExternalReport__navigation-current {
|
||||
overflow: hidden;
|
||||
padding: 0 50px; }
|
||||
|
||||
@media only screen and (min-width: 1025px) {
|
||||
html body #ExternalReport .ExternalReport__header-logo {
|
||||
flex-basis: 16.667%;
|
||||
max-width: 16.667%; } }
|
||||
|
||||
@media only screen and (max-width: 1025px) {
|
||||
html body #ExternalReport .ExternalReport__header-logo-img {
|
||||
height: 40px;
|
||||
margin: 10px 0; }
|
||||
html body #ExternalReport .ExternalReport__header-container {
|
||||
height: 60px; }
|
||||
html body #ExternalReport .ExternalReport__header-close-button:before,
|
||||
html body #ExternalReport .ExternalReport__header-close-button:after {
|
||||
width: 40px; } }
|
||||
.ExternalReport {
|
||||
background: white;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 125px;
|
||||
transition: opacity .3s ease;
|
||||
z-index: 101;
|
||||
min-height: calc(100vh - 125px);
|
||||
overflow: auto; }
|
||||
|
||||
.ExternalReport__frame-container {
|
||||
height: 100%;
|
||||
width: 100%; }
|
||||
|
||||
.ExternalReport__highlight {
|
||||
color: white;
|
||||
padding: 1px 3px; }
|
||||
.ExternalReport__highlight:after {
|
||||
content: ' '; }
|
||||
|
||||
.ExternalReport__not-found-container {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #a13169; }
|
||||
|
||||
.ExternalReport__highlight {
|
||||
background: #a13169; }
|
||||
|
||||
@media only screen and (max-width: 1025px) {
|
||||
.ExternalReport {
|
||||
top: 105px;
|
||||
min-height: calc(100vh - 105px); } }
|
||||
.checkIcon:before, html body .RootLayout .CheckBox__input:before,
|
||||
.checkIcon:after,
|
||||
html body .RootLayout .CheckBox__input:after {
|
||||
@ -796,3 +1201,15 @@ html body .RootLayout .CheckBox-report:checked {
|
||||
transform: scale(1.25); }
|
||||
100% {
|
||||
transform: scale(1); } }
|
||||
.Report {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0; }
|
||||
|
||||
@media only screen and (max-width: 1441px) {
|
||||
.Report {
|
||||
margin: 0; } }
|
||||
|
||||
@media only screen and (min-width: 1025px) and (max-width: 1440px) {
|
||||
.Report {
|
||||
margin: 0; } }
|
1
assets/viewer/report-viewer.min.js
vendored
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 226 KiB |
275
classes/plagiarism_pchkorg_api_provider.php
Normal file
@ -0,0 +1,275 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class plagiarism_pchkorg_api_provider {
|
||||
|
||||
private $token;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $endpoint;
|
||||
|
||||
private $lasterror;
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_last_error() {
|
||||
return $this->lasterror;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $lasterror
|
||||
*/
|
||||
public function set_last_error($lasterror) {
|
||||
$this->lasterror = $lasterror;
|
||||
}
|
||||
|
||||
public function __construct($token, $endpoint = 'https://plagiarismcheck.org') {
|
||||
$this->token = $token;
|
||||
$this->endpoint = $endpoint;
|
||||
}
|
||||
|
||||
public function send_group_text($authorhash, $cousereid, $assignmentid, $submissionid, $attachmentid, $content, $mime,
|
||||
$filename) {
|
||||
|
||||
$boundary = sprintf('PLAGCHECKBOUNDARY-%s', uniqid(time()));
|
||||
|
||||
$curl = new curl();
|
||||
$response = $curl->post(
|
||||
$this->endpoint . '/lms/moodle/check-text/',
|
||||
$this->get_body_for_group(
|
||||
$boundary,
|
||||
$authorhash,
|
||||
$cousereid,
|
||||
$assignmentid,
|
||||
$submissionid,
|
||||
$attachmentid,
|
||||
$content,
|
||||
$mime,
|
||||
$filename),
|
||||
array(
|
||||
'CURLOPT_RETURNTRANSFER' => true,
|
||||
'CURLOPT_FOLLOWLOCATION' => true,
|
||||
'CURLOPT_SSL_VERIFYHOST' => false,
|
||||
'CURLOPT_SSL_VERIFYPEER' => false,
|
||||
'CURLOPT_HTTPHEADER' => array(
|
||||
'X-API-TOKEN: ' . $this->generate_api_token(),
|
||||
'Content-Type: multipart/form-data; boundary=' . $boundary
|
||||
),
|
||||
)
|
||||
);
|
||||
$id = null;
|
||||
if ($json = json_decode($response)) {
|
||||
if (isset($json->message)) {
|
||||
$this->set_last_error($json->message);
|
||||
return null;
|
||||
}
|
||||
if (isset($json->success) && $json->success) {
|
||||
$id = $json->data->text->id;
|
||||
}
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
private function get_body_for_group($boundary,
|
||||
$authorhash,
|
||||
$cousereid,
|
||||
$assignmentid,
|
||||
$submissionid,
|
||||
$attachmentid,
|
||||
$content,
|
||||
$mime,
|
||||
$filename) {
|
||||
$eol = "\r\n";
|
||||
|
||||
$body = '';
|
||||
$body .= $this->get_part('token', $this->token, $boundary);
|
||||
$body .= $this->get_part('hash', $authorhash, $boundary);
|
||||
$body .= $this->get_part('course_id', $cousereid, $boundary);
|
||||
$body .= $this->get_part('assignment_id', $assignmentid, $boundary);
|
||||
$body .= $this->get_part('submission_id', $submissionid, $boundary);
|
||||
$body .= $this->get_part('attachment_id', $attachmentid, $boundary);
|
||||
$body .= $this->get_part('filename', $filename, $boundary);
|
||||
$body .= $this->get_part('language', 'en', $boundary);
|
||||
$body .= $this->get_file_part('content', $content, $mime, $filename, $boundary);
|
||||
$body .= '--' . $boundary . '--' . $eol;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function send_text($content, $mime, $filename) {
|
||||
$boundary = sprintf('PLAGCHECKBOUNDARY-%s', uniqid(time()));
|
||||
|
||||
$curl = new curl();
|
||||
$response = $curl->post(
|
||||
$this->endpoint . '/api/v1/text',
|
||||
$this->get_body($boundary, $content, $mime, $filename),
|
||||
array(
|
||||
'CURLOPT_RETURNTRANSFER' => true,
|
||||
'CURLOPT_FOLLOWLOCATION' => true,
|
||||
'CURLOPT_SSL_VERIFYHOST' => false,
|
||||
'CURLOPT_SSL_VERIFYPEER' => false,
|
||||
'CURLOPT_POST' => true,
|
||||
'CURLOPT_HTTPHEADER' => array(
|
||||
'X-API-TOKEN: ' . $this->generate_api_token(),
|
||||
'Content-Type: multipart/form-data; boundary=' . $boundary
|
||||
),
|
||||
)
|
||||
);
|
||||
$id = null;
|
||||
if ($json = json_decode($response)) {
|
||||
if (isset($json->message)) {
|
||||
$this->set_last_error($json->message);
|
||||
return null;
|
||||
}
|
||||
if (isset($json->success) && $json->success) {
|
||||
$id = $json->data->text->id;
|
||||
}
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
private function get_part($name, $value, $boundary) {
|
||||
$eol = "\r\n";
|
||||
|
||||
$part = '--' . $boundary . $eol;
|
||||
$part .= 'Content-Disposition: form-data; name="' . $name . '"' . $eol . $eol;
|
||||
$part .= $value . $eol;
|
||||
|
||||
return $part;
|
||||
}
|
||||
|
||||
private function get_file_part($name, $value, $mime, $filename, $boundary) {
|
||||
$eol = "\r\n";
|
||||
|
||||
$part = '--' . $boundary . $eol;
|
||||
$part .= 'Content-Disposition: form-data; name="' . $name . '"; filename="' . $filename . '";' . $eol;
|
||||
$part .= 'Content-Type: ' . $mime . $eol;
|
||||
$part .= 'Content-Length: ' . strlen($value) . $eol . $eol;
|
||||
$part .= $value . $eol;
|
||||
|
||||
return $part;
|
||||
}
|
||||
|
||||
private function get_body($boundary, $content, $mime, $filename) {
|
||||
$eol = "\r\n";
|
||||
|
||||
$body = '';
|
||||
$body .= $this->get_part('language', 'en', $boundary);
|
||||
$body .= $this->get_file_part('text', $content, $mime, $filename, $boundary);
|
||||
$body .= '--' . $boundary . '--' . $eol;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function user_email_to_hash($email) {
|
||||
return hash('sha256', $this->token . $email);
|
||||
}
|
||||
|
||||
public function is_group_token() {
|
||||
return 'G-' === \substr($this->token, 0, 2);
|
||||
}
|
||||
|
||||
public function is_group_member($email = '') {
|
||||
if (!$this->is_group_token()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$curl = new curl();
|
||||
$response = $curl->post($this->endpoint . '/lms/moodle/is-group-member/', array(
|
||||
'token' => $this->token,
|
||||
'hash' => $this->user_email_to_hash($email)
|
||||
), array(
|
||||
'CURLOPT_RETURNTRANSFER' => true,
|
||||
'CURLOPT_FOLLOWLOCATION' => true,
|
||||
'CURLOPT_SSL_VERIFYHOST' => false,
|
||||
'CURLOPT_SSL_VERIFYPEER' => false,
|
||||
));
|
||||
|
||||
if ($json = json_decode($response)) {
|
||||
if (true == $json->is_member) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_text($textid) {
|
||||
$curl = new curl();
|
||||
$response = $curl->get($this->endpoint . '/api/v1/text/' . $textid, array(), array(
|
||||
'CURLOPT_RETURNTRANSFER' => true,
|
||||
'CURLOPT_FOLLOWLOCATION' => true,
|
||||
'CURLOPT_SSL_VERIFYHOST' => false,
|
||||
'CURLOPT_SSL_VERIFYPEER' => false,
|
||||
'CURLOPT_POST' => false,
|
||||
'CURLOPT_HTTPHEADER' => array(
|
||||
'X-API-TOKEN: ' . $this->generate_api_token(),
|
||||
'Content-Type: application/x-www-form-urlencoded'
|
||||
),
|
||||
));
|
||||
$id = null;
|
||||
if ($json = json_decode($response)) {
|
||||
if (isset($json->data) && 5 == $json->data->state) {
|
||||
$id = $json->data->report->id;
|
||||
}
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
public function get_report($id) {
|
||||
$curl = new curl();
|
||||
$response = $curl->get($this->endpoint . '/api/v1/text/report/' . $id, array(), array(
|
||||
'CURLOPT_RETURNTRANSFER' => true,
|
||||
'CURLOPT_FOLLOWLOCATION' => true,
|
||||
'CURLOPT_SSL_VERIFYHOST' => false,
|
||||
'CURLOPT_SSL_VERIFYPEER' => false,
|
||||
'CURLOPT_POST' => false,
|
||||
'CURLOPT_HTTPHEADER' => array(
|
||||
'X-API-TOKEN: ' . $this->generate_api_token(),
|
||||
),
|
||||
));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
private function generate_api_token() {
|
||||
global $USER;
|
||||
|
||||
if ($this->is_group_token()) {
|
||||
return $this->token . '::' . hash('sha256', $this->token . $USER->email);
|
||||
}
|
||||
|
||||
return $this->token;
|
||||
}
|
||||
|
||||
public function is_supported_mime($mime) {
|
||||
return in_array($mime, array(
|
||||
'application/msword',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/rtf',
|
||||
'application/vnd.oasis.opendocument.text',
|
||||
'text/plain',
|
||||
'application/pdf',
|
||||
), true);
|
||||
}
|
||||
}
|
86
classes/plagiarism_pchkorg_config_model.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class plagiarism_pchkorg_config_model {
|
||||
private $db;
|
||||
|
||||
public function __construct($DB) {
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
||||
public function fetch_by_module($module) {
|
||||
return $this->db->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => $module,
|
||||
));
|
||||
}
|
||||
|
||||
public function is_enabled_for_module($module) {
|
||||
$configs = $this->fetch_by_module($module);
|
||||
$enabled = false;
|
||||
foreach ($configs as $record) {
|
||||
switch ($record->name) {
|
||||
case 'pchkorg_module_use':
|
||||
$enabled = '1' == $record->value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $enabled;
|
||||
}
|
||||
|
||||
public function set_system_config($name, $value) {
|
||||
$this->db->delete_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => 0,
|
||||
'name' => $name,
|
||||
));
|
||||
|
||||
$record = new \stdClass();
|
||||
$record->cn = 0;
|
||||
$record->name = $name;
|
||||
$record->value = $value;
|
||||
|
||||
$this->db->insert_record('plagiarism_pchkorg_config', $record);
|
||||
}
|
||||
|
||||
public function get_system_config($name) {
|
||||
$records = $this->db->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => 0,
|
||||
'name' => $name,
|
||||
));
|
||||
|
||||
foreach ($records as $record) {
|
||||
return $record->value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_all_system_config() {
|
||||
$records = $this->db->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => 0,
|
||||
));
|
||||
$map = array();
|
||||
foreach ($records as $record) {
|
||||
$map[$record->name] = $record->value;
|
||||
}
|
||||
|
||||
return $map;
|
||||
}
|
||||
}
|
21
classes/plagiarism_pchkorg_file_loader.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class plagiarism_pchkorg_file_loader {
|
||||
|
||||
}
|
32
classes/plagiarism_pchkorg_url_generator.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class plagiarism_pchkorg_url_generator {
|
||||
public function get_check_url($cmid, $fileid) {
|
||||
return new moodle_url(sprintf(
|
||||
'/plagiarism/pchkorg/page/report.php?cmid=%s&file=%s',
|
||||
intval($cmid),
|
||||
intval($fileid)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function get_status_url() {
|
||||
return new moodle_url('/plagiarism/pchkorg/page/status.php');
|
||||
}
|
||||
}
|
67
classes/privacy/provider.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?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/>.
|
||||
|
||||
namespace plagiarism_pchkorg\privacy;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use core_privacy\local\metadata\collection;
|
||||
|
||||
class provider implements \core_privacy\local\metadata\provider {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
|
||||
$collection->add_subsystem_link(
|
||||
'core_files',
|
||||
array(),
|
||||
'privacy:metadata:core_files'
|
||||
);
|
||||
|
||||
$collection->add_database_table(
|
||||
'plagiarism_pchkorg_files',
|
||||
array(
|
||||
'cm' => 'privacy:metadata:plagiarism_pchkorg_files:cm',
|
||||
'fileid' => 'privacy:metadata:forum_discussion_subs:fileid',
|
||||
'userid' => 'privacy:metadata:forum_discussion_subs:userid',
|
||||
'score' => 'privacy:metadata:forum_discussion_subs:score',
|
||||
'textid' => 'privacy:metadata:forum_discussion_subs:textid',
|
||||
'reportid' => 'privacy:metadata:forum_discussion_subs:reportid',
|
||||
|
||||
),
|
||||
'privacy:metadata:plagiarism_pchkorg_files'
|
||||
);
|
||||
|
||||
$collection->add_database_table(
|
||||
'plagiarism_pchkorg_config',
|
||||
array(
|
||||
'cm' => 'privacy:metadata:plagiarism_pchkorg_config:cm',
|
||||
'name' => 'privacy:metadata:plagiarism_pchkorg_config:name',
|
||||
'value' => 'privacy:metadata:plagiarism_pchkorg_config:value',
|
||||
|
||||
),
|
||||
'privacy:metadata:plagiarism_pchkorg_config'
|
||||
);
|
||||
|
||||
$collection->add_external_location_link(
|
||||
'plagiarism_pchkorg',
|
||||
array(
|
||||
'file' => 'privacy:metadata:plagiarism_pchkorg:file',
|
||||
),
|
||||
'privacy:metadata:plagiarism_pchkorg'
|
||||
);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
}
|
@ -1,180 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ApiProvider
|
||||
{
|
||||
|
||||
private $token;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $endpoint;
|
||||
|
||||
private $lastError;
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getLastError()
|
||||
{
|
||||
return $this->lastError;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $lastError
|
||||
*/
|
||||
public function setLastError($lastError)
|
||||
{
|
||||
$this->lastError = $lastError;
|
||||
}
|
||||
|
||||
public function __construct($token, $endpoint = 'https://plagiarismcheck.org')
|
||||
{
|
||||
$this->token = $token;
|
||||
$this->endpoint = $endpoint;
|
||||
}
|
||||
|
||||
private function generateParameters($data)
|
||||
{
|
||||
$peirs = [];
|
||||
|
||||
foreach ($data as $name => $value) {
|
||||
$peirs[] = urlencode($name) . '=' . urlencode($value);
|
||||
}
|
||||
|
||||
return implode('&', $peirs);
|
||||
}
|
||||
|
||||
public function sendText($content, $mime, $filename)
|
||||
{
|
||||
$boundary = sprintf('PLAGCHECKBOUNDARY-%s', uniqid(time()));
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => $this->endpoint . '/api/v1/text',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_SSL_VERIFYHOST => false,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'X-API-TOKEN: ' . $this->token,
|
||||
'Content-Type: multipart/form-data; boundary=' . $boundary
|
||||
],
|
||||
CURLOPT_POSTFIELDS => $this->getBody($boundary, $content, $mime, $filename),
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
$id = null;
|
||||
if ($json = json_decode($response)) {
|
||||
if (isset($json->message)) {
|
||||
$this->setLastError($json->message);
|
||||
return null;
|
||||
}
|
||||
if (isset($json->success) && $json->success) {
|
||||
$id = $json->data->text->id;
|
||||
}
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
private function getPart($name, $value, $boundary)
|
||||
{
|
||||
$eol = "\r\n";
|
||||
|
||||
$part = '--' . $boundary . $eol;
|
||||
$part .= 'Content-Disposition: form-data; name="' . $name . '"' . $eol . $eol;
|
||||
$part .= $value . $eol;
|
||||
|
||||
return $part;
|
||||
}
|
||||
|
||||
private function getFilePart($name, $value, $mime, $filename, $boundary)
|
||||
{
|
||||
$eol = "\r\n";
|
||||
|
||||
$part = '--' . $boundary . $eol;
|
||||
$part .= 'Content-Disposition: form-data; name="' . $name . '"; filename="'.$filename.'";' . $eol;
|
||||
$part .= 'Content-Type: ' . $mime . $eol;
|
||||
$part .= 'Content-Length: ' . strlen($value) . $eol . $eol;
|
||||
$part .= $value . $eol;
|
||||
|
||||
return $part;
|
||||
}
|
||||
|
||||
private function getBody($boundary, $content, $mime, $filename)
|
||||
{
|
||||
$eol = "\r\n";
|
||||
|
||||
$body = '';
|
||||
$body .= $this->getPart('language', 'en', $boundary);
|
||||
$body .= $this->getFilePart('text', $content, $mime, $filename, $boundary);
|
||||
$body .= '--' . $boundary . '--' . $eol;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function checkText($textId)
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => $this->endpoint . '/api/v1/text/' . $textId,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_SSL_VERIFYHOST => false,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_POST => false,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'X-API-TOKEN: ' . $this->token,
|
||||
'Content-Type: application/x-www-form-urlencoded'
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$id = null;
|
||||
if ($json = json_decode($response)) {
|
||||
if (5 == $json->data->state) {
|
||||
$id = $json->data->report->id;
|
||||
}
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
public function getReport($id)
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => $this->endpoint . '/api/v1/text/report/' . $id,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_SSL_VERIFYHOST => false,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_POST => false,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'X-API-TOKEN: ' . $this->token,
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function isSupportedMime($mime)
|
||||
{
|
||||
return in_array($mime, [
|
||||
'application/msword',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/rtf',
|
||||
'application/vnd.oasis.opendocument.text',
|
||||
'text/plain',
|
||||
'application/pdf',
|
||||
], true);
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class UrlGenerator
|
||||
{
|
||||
public function getCheckUrl($cmid, $fileid)
|
||||
{
|
||||
return new moodle_url(sprintf(
|
||||
'/plagiarism/pchkorg/page/report.php?cmid=%s&file=%s',
|
||||
intval($cmid),
|
||||
intval($fileid)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function getStatusUrl()
|
||||
{
|
||||
return new moodle_url('/plagiarism/pchkorg/page/status.php');
|
||||
}
|
||||
}
|
199
db/access.php
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -14,192 +13,20 @@
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if (!defined('MOODLE_INTERNAL')) {
|
||||
die('Direct access to this script is forbidden.');
|
||||
}
|
||||
|
||||
$capabilities = [
|
||||
'plagiarism/pchkorg:enable' => [
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:viewsimilarity' => [
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:viewreport' => [
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:vieweditreport' => [
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:resetfile' => [
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:checkfile' => [
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changeenableunichecksetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changecheckalreadysubmittedassignmentsetting' => [
|
||||
'riskbitmask' => RISK_CONFIG | RISK_SPAM,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changeaddsubmissiontolibrarysetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changesourcesforcomparisonsetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changesensitivitypercentagesetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changewordsensitivitysetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changeexcludecitationssetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changeshowstudentscoresetting' => [
|
||||
'riskbitmask' => RISK_CONFIG | RISK_SPAM,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changeshowstudentreportsetting' => [
|
||||
'riskbitmask' => RISK_CONFIG | RISK_SPAM,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changemaxsupportedarchivefilescountsetting' => [
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
],
|
||||
'plagiarism/pchkorg:changesentstudentreportsetting' => [
|
||||
'riskbitmask' => RISK_CONFIG | RISK_SPAM,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => [
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
'coursecreator' => CAP_ALLOW
|
||||
],
|
||||
]
|
||||
];
|
||||
$capabilities = array(
|
||||
'plagiarism/pchkorg:check' => array(
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => array(
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'teacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
$observers = array();
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -20,12 +19,11 @@ defined('MOODLE_INTERNAL') || die();
|
||||
function xmldb_plagiarism_pchkorg_install() {
|
||||
global $DB;
|
||||
|
||||
$installed = $DB->get_record('config_plugins', ['plugin' => 'plagiarism_pchkorg', 'name' => 'version']);
|
||||
$installed = $DB->get_record('config_plugins', array('plugin' => 'plagiarism_pchkorg', 'name' => 'version'));
|
||||
|
||||
return $installed ? true : false;
|
||||
}
|
||||
|
||||
function xmldb_plagiarism_upgrade()
|
||||
{
|
||||
function xmldb_plagiarism_upgrade() {
|
||||
return true;
|
||||
}
|
||||
|
@ -1,52 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="plagiarism/pchkorg/db" VERSION="2018062000"
|
||||
COMMENT="XMLDB file for Moodle plagiarism/pchkorg plugin"
|
||||
<XMLDB PATH="plagiarism/pchkorg/db" VERSION="20190122" COMMENT="XMLDB file for Moodle plagiarism/pchkorg plugin."
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
<TABLES>
|
||||
<TABLE NAME="plagiarism_pchkorg_files" COMMENT="info about submitted files"
|
||||
NEXT="plagiarism_pchkorg_config">
|
||||
<TABLE NAME="plagiarism_pchkorg_files" COMMENT="info about submitted files">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true"
|
||||
NEXT="cm"/>
|
||||
<FIELD NAME="cm" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false"
|
||||
PREVIOUS="id" NEXT="userid"/>
|
||||
<FIELD NAME="fileid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false"
|
||||
PREVIOUS="cm" NEXT="userid"/>
|
||||
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false"
|
||||
PREVIOUS="fileid" NEXT="externalid"/>
|
||||
<FIELD NAME="state" TYPE="int" LENGTH="3" NOTNULL="false" SEQUENCE="false"
|
||||
PREVIOUS="userid" NEXT="similarityscore"/>
|
||||
<FIELD NAME="score" TYPE="float" NOTNULL="true" DEFAULT="0" SEQUENCE="false"
|
||||
PREVIOUS="state" NEXT="attemptscount"/>
|
||||
<FIELD NAME="created_at" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false"
|
||||
PREVIOUS="score"/>
|
||||
<FIELD NAME="textid" TYPE="int" LENGTH="11" NOTNULL="false" UNSIGNED="true" SEQUENCE="false"
|
||||
PREVIOUS="score"/>
|
||||
<FIELD NAME="reportid" TYPE="int" LENGTH="11" NOTNULL="false" UNSIGNED="true" SEQUENCE="false"
|
||||
PREVIOUS="text_id"/>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="cm" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="fileid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="state" TYPE="int" LENGTH="3" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="score" TYPE="float" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="created_at" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="textid" TYPE="int" LENGTH="11" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="reportid" TYPE="int" LENGTH="11" NOTNULL="false" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="cm"/>
|
||||
<KEY NAME="cm" TYPE="foreign" FIELDS="cm" REFTABLE="course_modules" REFFIELDS="id" PREVIOUS="primary"
|
||||
NEXT="userid"/>
|
||||
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="user" REFFIELDS="id" PREVIOUS="cm"/>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
<KEY NAME="cm" TYPE="foreign" FIELDS="cm" REFTABLE="course_modules" REFFIELDS="id"/>
|
||||
<KEY NAME="userid" TYPE="foreign" FIELDS="userid" REFTABLE="user" REFFIELDS="id"/>
|
||||
</KEYS>
|
||||
</TABLE>
|
||||
<TABLE NAME="plagiarism_pchkorg_config" COMMENT="config for modules"
|
||||
PREVIOUS="plagiarism_pchkorg_files">
|
||||
<TABLE NAME="plagiarism_pchkorg_config" COMMENT="config for modules">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="cm"/>
|
||||
<FIELD NAME="cm" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false"
|
||||
PREVIOUS="id" NEXT="name"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" UNSIGNED="true" SEQUENCE="false"
|
||||
PREVIOUS="cm" NEXT="value"/>
|
||||
<FIELD NAME="value" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="name"/>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="cm" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="value" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="cm"/>
|
||||
<KEY NAME="cm" TYPE="foreign" FIELDS="cm" REFTABLE="course_modules" REFFIELDS="id" PREVIOUS="primary"/>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
<KEY NAME="cm" TYPE="foreign" FIELDS="cm" REFTABLE="course_modules" REFFIELDS="id"/>
|
||||
</KEYS>
|
||||
</TABLE>
|
||||
</TABLES>
|
||||
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class plagiarism_setup_form extends moodleform {
|
||||
|
||||
// Define the form
|
||||
function definition () {
|
||||
global $CFG;
|
||||
|
||||
$mform = &$this->_form;
|
||||
|
||||
$mform->addElement(
|
||||
'select',
|
||||
$setting = 'pchkorg_use',
|
||||
self::trans('pchkorg_use'),
|
||||
[get_string('no'), get_string('yes')]
|
||||
);
|
||||
$mform->addHelpButton('pchkorg_use', 'pchkorg_use', 'plagiarism_pchkorg');
|
||||
|
||||
if (!isset($mform->exportValues()[$setting]) || is_null($mform->exportValues()[$setting])) {
|
||||
$mform->setDefault($setting, false);
|
||||
}
|
||||
|
||||
$mform->addElement('password', 'pchkorg_token', self::trans('pchkorg_token'));
|
||||
$mform->addHelpButton('pchkorg_token', 'pchkorg_token', 'plagiarism_pchkorg');
|
||||
$mform->addRule('pchkorg_token', null, 'required', null, 'client');
|
||||
$mform->setType('pchkorg_token', PARAM_TEXT);
|
||||
|
||||
$this->add_action_buttons(true);
|
||||
}
|
||||
|
||||
public static function trans($message, $param = null)
|
||||
{
|
||||
return get_string($message, 'plagiarism_pchkorg', $param);
|
||||
}
|
||||
}
|
||||
|
48
form/plagiarism_pchkorg_setup_form.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class plagiarism_pchkorg_setup_form extends moodleform {
|
||||
|
||||
public function definition() {
|
||||
|
||||
$mform = &$this->_form;
|
||||
|
||||
$mform->addElement(
|
||||
'select',
|
||||
$setting = 'pchkorg_use',
|
||||
self::trans('pchkorg_use'),
|
||||
array(get_string('no'), get_string('yes'))
|
||||
);
|
||||
$mform->addHelpButton('pchkorg_use', 'pchkorg_use', 'plagiarism_pchkorg');
|
||||
|
||||
if (!isset($mform->exportValues()[$setting]) || is_null($mform->exportValues()[$setting])) {
|
||||
$mform->setDefault($setting, false);
|
||||
}
|
||||
|
||||
$mform->addElement('password', 'pchkorg_token', self::trans('pchkorg_token'));
|
||||
$mform->addHelpButton('pchkorg_token', 'pchkorg_token', 'plagiarism_pchkorg');
|
||||
$mform->addRule('pchkorg_token', null, 'required', null, 'client');
|
||||
$mform->setType('pchkorg_token', PARAM_TEXT);
|
||||
|
||||
$this->add_action_buttons(true);
|
||||
}
|
||||
|
||||
public static function trans($message, $param = null) {
|
||||
return get_string($message, 'plagiarism_pchkorg', $param);
|
||||
}
|
||||
}
|
@ -1,15 +1,26 @@
|
||||
<?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/>.
|
||||
|
||||
// moodleform is defined in formslib.php
|
||||
require_once("$CFG->libdir/formslib.php");
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class send_text_form extends moodleform
|
||||
{
|
||||
// Add elements to form
|
||||
public function definition()
|
||||
{
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/formslib.php');
|
||||
|
||||
class send_text_form extends moodleform {
|
||||
// Add elements to form.
|
||||
public function definition() {
|
||||
$mform = $this->_form; // Don't forget the underscore!
|
||||
|
||||
$mform->addElement('hidden', 'fileid', '');
|
||||
@ -20,10 +31,4 @@ class send_text_form extends moodleform
|
||||
$this->add_action_buttons(false, get_string('pchkorg_submit', 'plagiarism_pchkorg'));
|
||||
|
||||
}
|
||||
|
||||
// Custom validation should be added here
|
||||
function validation($data, $files)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -18,21 +17,42 @@
|
||||
/**
|
||||
* @package plagiarism_pchkorg
|
||||
* @category plagiarism
|
||||
* @author 2018, Denys Hirnyk <den.girnyk@gmail.com>
|
||||
* @copyright PlagiarismCheck.org, https://plagiarismcheck.org/
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['pchkorg'] = 'PlagiarismCheck.org plugin';
|
||||
$string['pluginname'] = 'PlagiarismCheck.org plugin';
|
||||
$string['pchkorg_use'] = 'Enable plugin';
|
||||
$string['pchkorg_use_help'] = 'Enable or Disable PlagiarismCheck.org plugin';
|
||||
$string['pchkorg_module_use'] = 'Enable plugin in this module';
|
||||
$string['pchkorg'] = 'PlagiarismCheck.org plugin';
|
||||
$string['pluginname'] = 'PlagiarismCheck.org plugin';
|
||||
$string['pchkorg_use'] = 'Enable plugin';
|
||||
$string['pchkorg_use_help'] = 'Enable or Disable PlagiarismCheck.org plugin';
|
||||
$string['pchkorg_module_use'] = 'Enable plugin in this module';
|
||||
$string['pchkorg_module_use_help'] = 'Enable plugin in this module';
|
||||
$string['pchkorg_token'] = 'API Token';
|
||||
$string['pchkorg_token_help'] = 'You can receive your token by contact us';
|
||||
$string['pchkorg_description'] = 'You can receive your token by contact us';
|
||||
$string['pchkorg_submit'] = 'Submit';
|
||||
$string['savedconfigsuccess'] = 'Settings had been changed';
|
||||
$string['pchkorg_token'] = 'API Token';
|
||||
$string['pchkorg_token_help'] = 'You can receive your token by contact us';
|
||||
$string['pchkorg_description'] = 'You can receive your token by contact us';
|
||||
$string['pchkorg_submit'] = 'Submit';
|
||||
$string['savedconfigsuccess'] = 'Settings had been changed';
|
||||
$string['pchkorg_check_for_plagiarism'] = 'Check for plagiarism';
|
||||
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files'] =
|
||||
'Table with information about a file within moodle system belonge to a check in plagiarismcheck.org system.';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files:cm'] = 'Course module identity ';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files:fileid'] = 'Identity of a submitted file';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files:userid'] = 'Identity of user who submit file';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files:score'] = 'Originality score';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files:textid'] = 'Identity of originality check';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_files:reportid'] = 'Identity of originality report';
|
||||
|
||||
$string['privacy:metadata:plagiarism_pchkorg_config'] = 'Table with module settings';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_config:cm'] = 'Course module identity';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_config:name'] = 'Name of option';
|
||||
$string['privacy:metadata:plagiarism_pchkorg_config:value'] = 'Value of option';
|
||||
|
||||
$string['privacy:metadata:plagiarism_pchkorg'] = 'Service for originality check plagiarismcheck.org';
|
||||
$string['privacy:metadata:plagiarism_pchkorg:file'] =
|
||||
'Submission attachment for originality checkprivacy:metadata:plagiarism_pchkorg';
|
||||
|
||||
$string['pchkorg:enable'] = 'Enable or Disable plugin';
|
||||
$string['privacy:metadata:core_files'] = 'We need a content of submission, for originality check';
|
||||
|
142
lib.php
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -19,74 +18,72 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->dirroot.'/plagiarism/lib.php');
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
require_once($CFG->libdir.'/accesslib.php');
|
||||
require_once(__DIR__.'/model/ConfigModel.php');
|
||||
require_once(__DIR__.'/model/FileModel.php');
|
||||
require_once(__DIR__.'/component/UrlGenerator.php');
|
||||
require_once(__DIR__.'/component/ApiProvider.php');
|
||||
require_once($CFG->dirroot . '/plagiarism/lib.php');
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
require_once($CFG->libdir . '/accesslib.php');
|
||||
require_once(__DIR__ . '/classes/plagiarism_pchkorg_config_model.php');
|
||||
require_once(__DIR__ . '/classes/plagiarism_pchkorg_url_generator.php');
|
||||
require_once(__DIR__ . '/classes/plagiarism_pchkorg_api_provider.php');
|
||||
|
||||
class plagiarism_plugin_pchkorg extends plagiarism_plugin
|
||||
{
|
||||
class plagiarism_plugin_pchkorg extends plagiarism_plugin {
|
||||
/**
|
||||
* hook to allow plagiarism specific information to be displayed beside a submission
|
||||
*
|
||||
* @param array $linkarraycontains all relevant information for the plugin to generate a link
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function get_links($linkarray)
|
||||
{
|
||||
global $DB;
|
||||
public function get_links($linkarray) {
|
||||
global $DB, $USER;
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
$urlgenerator = new plagiarism_pchkorg_url_generator();
|
||||
$apiprovider = new plagiarism_pchkorg_api_provider($pchkorgconfigmodel->get_system_config('pchkorg_token'));
|
||||
|
||||
$fileModel = new FileModel($DB);
|
||||
$configModel = new ConfigModel($DB);
|
||||
$urlGenerator = new UrlGenerator();
|
||||
$apiProvider = new ApiProvider($configModel->getSystemConfig('pchkorg_token'));
|
||||
|
||||
$config = $configModel->getSystemConfig('pchkorg_use');
|
||||
$config = $pchkorgconfigmodel->get_system_config('pchkorg_use');
|
||||
if ('1' !== $config) {
|
||||
return '';
|
||||
}
|
||||
|
||||
//$userid, $file, $cmid, $course, $module
|
||||
$cmid = $linkarray['cmid'];
|
||||
$userid = $linkarray['userid'];
|
||||
/** @var stored_file $file */
|
||||
$cmid = $linkarray['cmid'];
|
||||
$file = $linkarray['file'];
|
||||
|
||||
if (!$configModel->isEnabledForModule($cmid)) {
|
||||
if (!$pchkorgconfigmodel->is_enabled_for_module($cmid)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!$apiProvider->isSupportedMime($file->get_mimetype())) {
|
||||
if (!$apiprovider->is_supported_mime($file->get_mimetype())) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$fileRecord = $fileModel->findFileByModuleAndFile($cmid, $file->get_id());
|
||||
$where = new \stdClass();
|
||||
$where->cm = $cmid;
|
||||
$where->fileid = $file->get_id();
|
||||
|
||||
$checkUrl = $urlGenerator->getCheckUrl($cmid, $file->get_id());
|
||||
$filerecord = $DB->get_record('plagiarism_pchkorg_files', (array) $where);
|
||||
|
||||
if ($fileRecord) {
|
||||
$label = sprintf('%.2f', $fileRecord->score) . '%';
|
||||
$checkurl = $urlgenerator->get_check_url($cmid, $file->get_id());
|
||||
|
||||
if ($filerecord) {
|
||||
$label = sprintf('%.2f', $filerecord->score) . '%';
|
||||
} else {
|
||||
$label = 'Check for plagiarism';
|
||||
if (!$apiprovider->is_group_member($USER->email)) {
|
||||
return '';
|
||||
}
|
||||
$label = get_string('pchkorg_check_for_plagiarism', 'plagiarism_pchkorg');
|
||||
}
|
||||
|
||||
return sprintf(' <a href="%s">( %s )</a> ', $checkUrl->__toString(), $label);
|
||||
|
||||
return sprintf(' <a href="%s">( %s )</a> ', $checkurl->__toString(), $label);
|
||||
}
|
||||
|
||||
/* hook to save plagiarism specific settings on a module settings page
|
||||
* @param object $data - data from an mform submission.
|
||||
*/
|
||||
public function save_form_elements($data)
|
||||
{
|
||||
public function save_form_elements($data) {
|
||||
global $DB;
|
||||
|
||||
$configModel = new ConfigModel($DB);
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
|
||||
$config = $configModel->getSystemConfig('pchkorg_use');
|
||||
$config = $pchkorgconfigmodel->get_system_config('pchkorg_use');
|
||||
if ('1' != $config) {
|
||||
|
||||
return;
|
||||
@ -96,13 +93,13 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin
|
||||
}
|
||||
|
||||
$records = $DB->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => $data->coursemodule
|
||||
'cm' => $data->coursemodule
|
||||
));
|
||||
|
||||
if (empty($records)) {
|
||||
$insert = new \stdClass();
|
||||
$insert->cm = $data->coursemodule;
|
||||
$insert->name = 'pchkorg_module_use';
|
||||
$insert = new \stdClass();
|
||||
$insert->cm = $data->coursemodule;
|
||||
$insert->name = 'pchkorg_module_use';
|
||||
$insert->value = $data->pchkorg_module_use;
|
||||
$DB->insert_record('plagiarism_pchkorg_config', $insert);
|
||||
} else {
|
||||
@ -113,25 +110,21 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* hook to add plagiarism specific settings to a module settings page
|
||||
* @param object $mform - Moodle form
|
||||
* @param object $context - current context
|
||||
* @param object $modulename
|
||||
*/
|
||||
public function get_form_elements_module($mform, $context, $modulename = '')
|
||||
{
|
||||
global $CFG, $DB;
|
||||
public function get_form_elements_module($mform, $context, $modulename = '') {
|
||||
if (!$context || !isset($modulename)) {
|
||||
return;
|
||||
}
|
||||
global $DB;
|
||||
|
||||
$configModel = new ConfigModel($DB);
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
|
||||
$config = $configModel->getSystemConfig('pchkorg_use');
|
||||
$config = $pchkorgconfigmodel->get_system_config('pchkorg_use');
|
||||
if ('1' == $config) {
|
||||
$defaultcmid = null;
|
||||
$cm = optional_param('update', $defaultcmid, PARAM_INT);
|
||||
$cm = optional_param('update', $defaultcmid, PARAM_INT);
|
||||
if (null !== $cm) {
|
||||
$records = $DB->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => $cm,
|
||||
'cm' => $cm,
|
||||
));
|
||||
if (!empty($records)) {
|
||||
foreach ($records as $record) {
|
||||
@ -142,10 +135,10 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin
|
||||
|
||||
$mform->addElement('header', 'plagiarism_pchkorg', self::trans('pluginname'));
|
||||
$mform->addElement(
|
||||
'select',
|
||||
$setting = 'pchkorg_module_use',
|
||||
self::trans('pchkorg_module_use'),
|
||||
[get_string('no'), get_string('yes')]
|
||||
'select',
|
||||
$setting = 'pchkorg_module_use',
|
||||
self::trans('pchkorg_module_use'),
|
||||
array(get_string('no'), get_string('yes'))
|
||||
);
|
||||
$mform->addHelpButton('pchkorg_module_use', 'pchkorg_module_use', 'plagiarism_pchkorg');
|
||||
|
||||
@ -157,49 +150,28 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin
|
||||
|
||||
/**
|
||||
* hook to allow a disclosure to be printed notifying users what will happen with their submission
|
||||
*
|
||||
* @param int $cmid - course module id
|
||||
* @return string
|
||||
*/
|
||||
public function print_disclosure($cmid)
|
||||
{
|
||||
public function print_disclosure($cmid) {
|
||||
global $OUTPUT, $DB;
|
||||
|
||||
$configModer = new ConfigModel($DB);
|
||||
$configmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter', 'intro');
|
||||
|
||||
$formatoptions = new stdClass;
|
||||
$formatoptions = new stdClass;
|
||||
$formatoptions->noclean = true;
|
||||
$text = $configModer->getSystemConfig('plagiarism_pchkorg');
|
||||
$formatoptions->cmid = $cmid;
|
||||
$text = $configmodel->get_system_config('plagiarism_pchkorg');
|
||||
|
||||
echo format_text($text, FORMAT_MOODLE, $formatoptions);
|
||||
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
public static function trans($message, $param = null)
|
||||
{
|
||||
public static function trans($message, $param = null) {
|
||||
return get_string($message, 'plagiarism_pchkorg', $param);
|
||||
}
|
||||
|
||||
/**
|
||||
* hook to allow status of submitted files to be updated - called on grading/report pages.
|
||||
*
|
||||
* @param object $course - full Course object
|
||||
* @param object $cm - full cm object
|
||||
*/
|
||||
public function update_status($course, $cm)
|
||||
{
|
||||
//called at top of submissions/grading pages - allows printing of admin style links or updating status
|
||||
}
|
||||
|
||||
/**
|
||||
* called by admin/cron.php
|
||||
*
|
||||
*/
|
||||
public function cron()
|
||||
{
|
||||
//do any scheduled task stuff
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,78 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ConfigModel
|
||||
{
|
||||
private $db;
|
||||
|
||||
public function __construct($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
||||
public function fetchByModule($module)
|
||||
{
|
||||
return $this->db->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => $module,
|
||||
));
|
||||
}
|
||||
|
||||
public function isEnabledForModule($module)
|
||||
{
|
||||
$configs = $this->fetchByModule($module);
|
||||
$enabled = false; // disabled by default
|
||||
foreach ($configs as $record) {
|
||||
switch ($record->name) {
|
||||
case 'pchkorg_module_use':
|
||||
$enabled = '1' == $record->value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $enabled;
|
||||
}
|
||||
|
||||
public function setSystemConfig($name, $value)
|
||||
{
|
||||
$this->db->delete_records('plagiarism_pchkorg_config', [
|
||||
'cm' => 0,
|
||||
'name' => $name,
|
||||
]);
|
||||
|
||||
$record = new \stdClass();
|
||||
$record->cn = 0;
|
||||
$record->name = $name;
|
||||
$record->value = $value;
|
||||
|
||||
$this->db->insert_record('plagiarism_pchkorg_config', $record);
|
||||
}
|
||||
|
||||
public function getSystemConfig($name)
|
||||
{
|
||||
$records = $this->db->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => 0,
|
||||
'name' => $name,
|
||||
));
|
||||
|
||||
foreach ($records as $record) {
|
||||
return $record->value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getAllSystemConfig()
|
||||
{
|
||||
$records = $this->db->get_records('plagiarism_pchkorg_config', array(
|
||||
'cm' => 0,
|
||||
));
|
||||
$map = [];
|
||||
foreach ($records as $record) {
|
||||
$map[$record->name] = $record->value;
|
||||
}
|
||||
|
||||
return $map;
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class FileModel
|
||||
{
|
||||
private $db;
|
||||
|
||||
const STATE_SENT = 1;
|
||||
const STATE_CHECKED = 2;
|
||||
|
||||
public function __construct($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
||||
public function findFileByModuleAndFile($module, $fileid)
|
||||
{
|
||||
$where = new \stdClass();
|
||||
$where->cm = $module;
|
||||
$where->fileid = $fileid;
|
||||
|
||||
return $this->db->get_record('plagiarism_pchkorg_files', (array)$where);
|
||||
}
|
||||
|
||||
public function create($fileRecord)
|
||||
{
|
||||
return $this->db->insert_record('plagiarism_pchkorg_files', $fileRecord);
|
||||
}
|
||||
|
||||
public function update($fileRecord)
|
||||
{
|
||||
return $this->db->update_record('plagiarism_pchkorg_files', $fileRecord);
|
||||
}
|
||||
}
|
10
moodle-plagiarism_pchkorg.iml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<content url="file://$MODULE_DIR$/../moodle/moodle" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
102
page/check.php
@ -1,59 +1,99 @@
|
||||
<?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/>.
|
||||
|
||||
require_once(__DIR__ . '/../../../config.php');
|
||||
require_once(__DIR__ . '/../lib.php');
|
||||
require_once(__DIR__ . '/../form/send_text_form.php');
|
||||
require_once(__DIR__ . '/../component/UrlGenerator.php');
|
||||
require_once(__DIR__ . '/../component/ApiProvider.php');
|
||||
require_once(__DIR__ . '/../classes/plagiarism_pchkorg_config_model.php');
|
||||
require_once(__DIR__ . '/../classes/plagiarism_pchkorg_url_generator.php');
|
||||
require_once(__DIR__ . '/../classes/plagiarism_pchkorg_api_provider.php');
|
||||
|
||||
global $PAGE, $CFG, $OUTPUT, $DB, $USER;
|
||||
|
||||
require_login();
|
||||
|
||||
$fileModel = new FileModel($DB);
|
||||
$configModel = new ConfigModel($DB);
|
||||
$urlGenerator = new UrlGenerator();
|
||||
$apiProvider = new ApiProvider($configModel->getSystemConfig('pchkorg_token'));
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
$urlgenerator = new plagiarism_pchkorg_url_generator();
|
||||
$apiprovider = new plagiarism_pchkorg_api_provider(
|
||||
$pchkorgconfigmodel->get_system_config('pchkorg_token')
|
||||
);
|
||||
|
||||
$cmid = (int)required_param('cmid', PARAM_INT); // Course Module ID
|
||||
$fileid = (int)required_param('file', PARAM_INT); // plagiarism file id.
|
||||
$cm = get_coursemodule_from_id('', $cmid);
|
||||
$cmid = (int) required_param('cmid', PARAM_INT); // Course Module ID
|
||||
$fileid = (int) required_param('file', PARAM_INT); // plagiarism file id.
|
||||
$cm = get_coursemodule_from_id('', $cmid);
|
||||
require_login($cm->course, true, $cm);
|
||||
$context = context_module::instance($cm->id);
|
||||
header('Content-Type: application/json');
|
||||
// Prevent JS caching
|
||||
$CFG->cachejs = false;
|
||||
$PAGE->set_url($urlGenerator->getStatusUrl());
|
||||
$fileRecord = $fileModel->findFileByModuleAndFile($cmid, $fileid);
|
||||
if (!$fileRecord) {
|
||||
echo json_encode([
|
||||
'success' => false,
|
||||
'message' => '404 can not find text'
|
||||
]);
|
||||
$isgranted = is_viewing($context, null, 'plagiarism/pchkorg:check');
|
||||
if (!$isgranted) {
|
||||
die('{error: "access denied"}');
|
||||
}
|
||||
$fs = get_file_storage();
|
||||
$file = $fs->get_file_by_id($fileid);
|
||||
|
||||
if (!$file) {
|
||||
die('{error: "file not exists"}');
|
||||
}
|
||||
|
||||
$reportid = $apiProvider->checkText($fileRecord->textid);
|
||||
if ('submission_files' !== $file->get_filearea()
|
||||
|| $file->get_contextid() != $context->id) {
|
||||
die('{error: "access denied"}');
|
||||
}
|
||||
|
||||
// Prevent JS caching.
|
||||
$CFG->cachejs = false;
|
||||
$PAGE->set_url($urlgenerator->get_status_url());
|
||||
$where = new \stdClass();
|
||||
$where->cm = $cmid;
|
||||
$where->fileid = $fileid;
|
||||
|
||||
$filerecord = $DB->get_record('plagiarism_pchkorg_files', (array) $where);
|
||||
|
||||
if (!$filerecord) {
|
||||
echo json_encode(array(
|
||||
'success' => false,
|
||||
'message' => '404 can not find text'
|
||||
));
|
||||
}
|
||||
|
||||
$reportid = $apiprovider->check_text($filerecord->textid);
|
||||
if ($checked = (null !== $reportid)) {
|
||||
$report = $apiProvider->getReport($fileRecord->textid);
|
||||
$report = $apiprovider->get_report($filerecord->textid);
|
||||
$json = json_decode($report);
|
||||
$score = 0;
|
||||
if (isset($json->data)
|
||||
&& isset($json->data->report)
|
||||
&& isset($json->data->report->percent)
|
||||
&& isset($json->data->report)
|
||||
&& isset($json->data->report->percent)
|
||||
) {
|
||||
$score = $json->data->report->percent;
|
||||
}
|
||||
|
||||
$fileRecord->reportid = $reportid;
|
||||
$fileRecord->score = $score;
|
||||
$fileModel->update($fileRecord);
|
||||
$filerecord->reportid = $reportid;
|
||||
$filerecord->score = $score;
|
||||
$DB->update_record('plagiarism_pchkorg_files', $filerecord);
|
||||
}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'checked' => $checked,
|
||||
'location' =>sprintf(
|
||||
$location = new moodle_url(sprintf(
|
||||
'/plagiarism/pchkorg/page/report.php?cmid=%s&file=%s',
|
||||
intval($cmid),
|
||||
intval($fileid)
|
||||
)
|
||||
]);
|
||||
));
|
||||
|
||||
echo json_encode(array(
|
||||
'success' => true,
|
||||
'checked' => $checked,
|
||||
'location' => $location->out(false)
|
||||
));
|
161
page/report.php
@ -1,119 +1,172 @@
|
||||
<?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/>.
|
||||
|
||||
require_once(__DIR__ . '/../../../config.php');
|
||||
require_once(__DIR__ . '/../lib.php');
|
||||
require_once(__DIR__ . '/../form/send_text_form.php');
|
||||
require_once(__DIR__ . '/../component/UrlGenerator.php');
|
||||
require_once(__DIR__ . '/../component/ApiProvider.php');
|
||||
require_once(__DIR__ . '/../classes/plagiarism_pchkorg_config_model.php');
|
||||
require_once(__DIR__ . '/../classes/plagiarism_pchkorg_url_generator.php');
|
||||
require_once(__DIR__ . '/../classes/plagiarism_pchkorg_api_provider.php');
|
||||
|
||||
global $PAGE, $CFG, $OUTPUT, $DB, $USER;
|
||||
|
||||
require_login();
|
||||
|
||||
$fileModel = new FileModel($DB);
|
||||
$configModel = new ConfigModel($DB);
|
||||
$urlGenerator = new UrlGenerator();
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
$urlgenerator = new plagiarism_pchkorg_url_generator();
|
||||
$apiprovider = new plagiarism_pchkorg_api_provider($pchkorgconfigmodel->get_system_config('pchkorg_token'));
|
||||
|
||||
$apiProvider = new ApiProvider($configModel->getSystemConfig('pchkorg_token'));
|
||||
$cmid = (int) required_param('cmid', PARAM_INT); // Course Module ID.
|
||||
$fileid = (int) required_param('file', PARAM_INT); // plagiarism file id.
|
||||
|
||||
$cmid = (int)required_param('cmid', PARAM_INT); // Course Module ID
|
||||
$fileid = (int)required_param('file', PARAM_INT); // plagiarism file id.
|
||||
$cm = get_coursemodule_from_id('', $cmid);
|
||||
$cm = get_coursemodule_from_id('', $cmid, 0, false, MUST_EXIST);
|
||||
require_login($cm->course, true, $cm);
|
||||
$context = context_module::instance($cm->id);// Get context of course.
|
||||
|
||||
|
||||
$isgranted = is_viewing($context, null, 'plagiarism/pchkorg:check');
|
||||
if (!$isgranted) {
|
||||
die('403 permission denied');
|
||||
}
|
||||
|
||||
$fs = get_file_storage();
|
||||
$form = new send_text_form($currentUrl = $urlGenerator->getCheckUrl($cmid, $fileid));
|
||||
$form = new send_text_form($currenturl = $urlgenerator->get_check_url($cmid, $fileid));
|
||||
|
||||
// Prevent JS caching
|
||||
$CFG->cachejs = false;
|
||||
$PAGE->set_url($currentUrl);
|
||||
$PAGE->set_url($currenturl);
|
||||
$PAGE->set_pagelayout('report');
|
||||
$PAGE->set_title('My modules page title');
|
||||
$PAGE->set_heading('My modules page heading');
|
||||
$PAGE->set_title(get_string('pluginname', 'plagiarism_pchkorg'));
|
||||
$PAGE->set_heading(get_string('pluginname', 'plagiarism_pchkorg'));
|
||||
|
||||
if ('POST' === $_SERVER['REQUEST_METHOD']) {// form submission
|
||||
if ('POST' === $_SERVER['REQUEST_METHOD']) { // Form submission.
|
||||
|
||||
$data = $form->get_data();
|
||||
$cmid = (int)$data->cmid;
|
||||
$fileid = (int)$data->fileid;
|
||||
$data = $form->get_data();
|
||||
$cmid = (int) $data->cmid;
|
||||
$fileid = (int) $data->fileid;
|
||||
|
||||
$file = $fs->get_file_by_id($fileid);
|
||||
|
||||
$where = new \stdClass();
|
||||
$where->cm = $cmid;
|
||||
$where->fileid = $file->get_id();
|
||||
|
||||
$filerecord = $DB->get_record('plagiarism_pchkorg_files', (array) $where);
|
||||
// Preventing some race condition.
|
||||
if ($filerecord) {
|
||||
redirect($urlgenerator->get_check_url($cmid, $fileid), 'Document already checked.');
|
||||
exit;
|
||||
}
|
||||
|
||||
if ('submission_files' !== $file->get_filearea()
|
||||
|| $file->get_contextid() != $context->id) {
|
||||
die('permission denied');
|
||||
}
|
||||
|
||||
if (!$file) {
|
||||
// file not found
|
||||
// File not found.
|
||||
|
||||
die('404 not exists');
|
||||
}
|
||||
|
||||
$textid = $apiProvider->sendText(
|
||||
$file->get_content(),
|
||||
$file->get_mimetype(),
|
||||
$file->get_filename()
|
||||
);
|
||||
|
||||
if ($apiprovider->is_group_token()) {
|
||||
$textid = $apiprovider->send_group_text(
|
||||
$apiprovider->user_email_to_hash($USER->email),
|
||||
$cm->course,
|
||||
$cm->id,
|
||||
$cm->id,
|
||||
$file->get_id(),
|
||||
$file->get_content(),
|
||||
$file->get_mimetype(),
|
||||
$file->get_filename()
|
||||
);
|
||||
} else {
|
||||
$textid = $apiprovider->send_text(
|
||||
$file->get_content(),
|
||||
$file->get_mimetype(),
|
||||
$file->get_filename()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$message = '';
|
||||
if (null !== $textid) {
|
||||
$fileRecord = new \stdClass();
|
||||
$fileRecord->fileid = $fileid;
|
||||
$fileRecord->cm = $cmid;
|
||||
$fileRecord->userid = $USER->id;
|
||||
$fileRecord->textid = $textid;
|
||||
$fileRecord->state = FileModel::STATE_SENT;
|
||||
$fileRecord->created_at = time();
|
||||
$filerecord = new \stdClass();
|
||||
$filerecord->fileid = $fileid;
|
||||
$filerecord->cm = $cmid;
|
||||
$filerecord->userid = $USER->id;
|
||||
$filerecord->textid = $textid;
|
||||
$filerecord->state = 1; // 1 - is SENT.
|
||||
$filerecord->created_at = time();
|
||||
|
||||
$fileModel->create($fileRecord);
|
||||
$DB->insert_record('plagiarism_pchkorg_files', $filerecord);
|
||||
} else {
|
||||
if ('Invalid token' === $apiProvider->getLastError()) {
|
||||
$configModel->setSystemConfig('pchkorg_use', '0');
|
||||
if ('Invalid token' === $apiprovider->get_last_error()) {
|
||||
$pchkorgconfigmodel->set_system_config('pchkorg_use', '0');
|
||||
}
|
||||
$message = $apiProvider->getLastError();
|
||||
$message = $apiprovider->get_last_error();
|
||||
}
|
||||
|
||||
redirect($urlGenerator->getCheckUrl($cmid, $fileid), $message);
|
||||
redirect($urlgenerator->get_check_url($cmid, $fileid), $message);
|
||||
exit;
|
||||
}
|
||||
|
||||
$file = $fs->get_file_by_id($fileid);
|
||||
if ('submission_files' !== $file->get_filearea()
|
||||
|| $file->get_contextid() != $context->id) {
|
||||
die('permission denied');
|
||||
}
|
||||
if (!$file) {
|
||||
// file not found
|
||||
|
||||
die('404 not exists');
|
||||
}
|
||||
|
||||
$where = new \stdClass();
|
||||
$where->cm = $cmid;
|
||||
$where->fileid = $fileid;
|
||||
|
||||
$filerecord = $DB->get_record('plagiarism_pchkorg_files', (array) $where);
|
||||
|
||||
$fileRecord = $fileModel->findFileByModuleAndFile($cmid, $fileid);
|
||||
|
||||
|
||||
if (!$fileRecord) {
|
||||
if (!$filerecord) {
|
||||
$content = $file->get_content();
|
||||
$mime = $file->get_mimetype();
|
||||
$mime = $file->get_mimetype();
|
||||
|
||||
if ($isSupported = $apiProvider->isSupportedMime($file->get_mimetype())) {
|
||||
if ($issupported = $apiprovider->is_supported_mime($file->get_mimetype())) {
|
||||
if ('plain/text' === $mime || 'text/plain' === $mime) {
|
||||
$content = $content = $file->get_content();
|
||||
} else {
|
||||
$content = $file->get_filename();
|
||||
}
|
||||
|
||||
$default = ['fileid' => $fileid, 'cmid' => $cmid];
|
||||
$default = array('fileid' => $fileid, 'cmid' => $cmid);
|
||||
$form->set_data($default);
|
||||
}
|
||||
|
||||
require '../view/send_text.php';
|
||||
} elseif (null !== $fileRecord->reportid) {
|
||||
$report = $apiProvider->getReport($fileRecord->textid);
|
||||
require('../view/send_text.php');
|
||||
} else if (null !== $filerecord->reportid) {
|
||||
$report = $apiprovider->get_report($filerecord->textid);
|
||||
$json = json_decode($report);
|
||||
$error = '';
|
||||
if (isset($json->message)) {
|
||||
$error = $json->message;
|
||||
} else {
|
||||
$data = json_encode($json);
|
||||
$data = $report;
|
||||
}
|
||||
|
||||
require '../view/report.php';
|
||||
} elseif (null !== $fileRecord->textid) {
|
||||
require('../view/report.php');
|
||||
} else if (null !== $filerecord->textid) {
|
||||
|
||||
$PAGE->requires->js_call_amd('plagiarism_pchkorg/main', 'checkReport');
|
||||
require '../view/check_report.php';
|
||||
require('../view/check_report.php');
|
||||
}
|
||||
|
23
settings.php
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -14,7 +13,6 @@
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* pl * plagiarism.php - allows the admin to configure plagiarism stuff
|
||||
*
|
||||
@ -22,26 +20,27 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require_once(dirname(dirname(__FILE__)) . '/../config.php');
|
||||
require_once(__DIR__ . '/../../config.php');
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
require_once($CFG->libdir . '/plagiarismlib.php');
|
||||
require_once($CFG->dirroot.'/lib/formslib.php');
|
||||
require_once($CFG->dirroot . '/lib/formslib.php');
|
||||
require_once($CFG->dirroot . '/plagiarism/pchkorg/lib.php');
|
||||
require_once($CFG->dirroot . '/plagiarism/pchkorg/form/plagiarism_form.php');
|
||||
require_once __DIR__ . '/lib.php';
|
||||
require_once($CFG->dirroot . '/plagiarism/pchkorg/form/plagiarism_pchkorg_setup_form.php');
|
||||
require_once(__DIR__ . '/classes/plagiarism_pchkorg_config_model.php');
|
||||
require_once(__DIR__ . '/lib.php');
|
||||
|
||||
global $DB;
|
||||
|
||||
$configModel = new ConfigModel($DB);
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
|
||||
require_login();
|
||||
admin_externalpage_setup('plagiarismpchkorg');
|
||||
|
||||
$context = get_context_instance(CONTEXT_SYSTEM);
|
||||
$context = context_system::instance(CONTEXT_SYSTEM);
|
||||
|
||||
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
|
||||
|
||||
$mform = new plagiarism_setup_form();
|
||||
$mform = new plagiarism_pchkorg_setup_form();
|
||||
$plagiarismplugin = new plagiarism_plugin_pchkorg();
|
||||
|
||||
if ($mform->is_cancelled()) {
|
||||
@ -58,15 +57,15 @@ if (($data = $mform->get_data()) && confirm_sesskey()) {
|
||||
foreach ($data as $field => $value) {
|
||||
if (strpos($field, 'pchkorg') === 0) {
|
||||
set_config($field, $value, 'plagiarism');
|
||||
$configModel->setSystemConfig($field, $value);
|
||||
$pchkorgconfigmodel->set_system_config($field, $value);
|
||||
}
|
||||
}
|
||||
$OUTPUT->notification(get_string('savedconfigsuccess', 'plagiarism_pchkorg'), 'notifysuccess');
|
||||
}
|
||||
|
||||
$configModel = new ConfigModel($DB);
|
||||
$pchkorgconfigmodel = new plagiarism_pchkorg_config_model($DB);
|
||||
|
||||
$plagiarismsettings = $configModel->getAllSystemConfig();
|
||||
$plagiarismsettings = $pchkorgconfigmodel->get_all_system_config();
|
||||
|
||||
$mform->set_data($plagiarismsettings);
|
||||
|
||||
|
11
version.php
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -27,12 +26,12 @@ defined('MOODLE_INTERNAL') || die();
|
||||
if (!isset($plugin)) {
|
||||
$plugin = new stdClass();
|
||||
}
|
||||
$plugin->version = 2018110101;
|
||||
$plugin->version = 2019013001;
|
||||
$plugin->requires = 2017051501; // Requires Moodle 3.3 .
|
||||
$plugin->release = 'v1.19';
|
||||
$plugin->release = 'v2.0';
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
$plugin->component = 'plagiarism_pchkorg';
|
||||
$plugin->dependencies = [
|
||||
'mod_assign' => ANY_VERSION,
|
||||
];
|
||||
$plugin->dependencies = array(
|
||||
'mod_assign' => ANY_VERSION,
|
||||
);
|
||||
|
@ -1,29 +1,69 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$ajaxurl = new moodle_url('/plagiarism/pchkorg/page/check.php');
|
||||
$PAGE->requires->js_init_code("
|
||||
var interval;
|
||||
var data = {
|
||||
'file': $('#plagcheck-loader').attr('data-file'),
|
||||
'cmid': $('#plagcheck-loader').attr('data-cmid')
|
||||
};
|
||||
var checkStatus = function () {
|
||||
$.post('{$ajaxurl}', data, function (response) {
|
||||
if (!response || !response.success) {
|
||||
$('#plagcheck-loader').hide();
|
||||
clearInterval(interval);
|
||||
} else if (response.checked) {
|
||||
$('#plagcheck-loader').hide();
|
||||
clearInterval(interval);
|
||||
window.location.href = response.location;
|
||||
}
|
||||
}, 'JSON');
|
||||
};
|
||||
interval = setInterval(checkStatus, 1000);
|
||||
", true);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
?>
|
||||
<style>
|
||||
.loader {
|
||||
border: 16px solid #f3f3f3; /* Light grey */
|
||||
border-top: 16px solid #3498db; /* Blue */
|
||||
border-radius: 50%;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
<style>
|
||||
.loader {
|
||||
border: 16px solid #f3f3f3; /* Light grey */
|
||||
border-top: 16px solid #3498db; /* Blue */
|
||||
border-radius: 50%;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
<div id="plagcheck-loader" data-cmid="<?php
|
||||
echo intval($cmid)?>" data-file="<?php
|
||||
echo intval($fileid)?>" class="loader"></div>
|
||||
</div>
|
||||
<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,6 +1,34 @@
|
||||
<?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/>.
|
||||
|
||||
$PAGE->requires->css('/plagiarism/pchkorg/assets/viewer/report-viewer.min.css');
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
||||
@ -8,31 +36,11 @@ 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>
|
||||
<script>
|
||||
(function (window, document, ReportViewer, localData) {
|
||||
var element = document.getElementById('report-root');
|
||||
var widget = ReportViewer.create();
|
||||
|
||||
widget.init({
|
||||
element: element,
|
||||
localData: localData
|
||||
});
|
||||
})(window, window.document, window.ReportViewer, <?php
|
||||
echo empty($data) ? '{}' : $data ?>);
|
||||
</script>
|
||||
<?php
|
||||
|
||||
} elseif (isset($error)) {
|
||||
if (!empty($error)) {
|
||||
?>
|
||||
<h2>Error: <?php
|
||||
echo $error ?></h2>
|
||||
echo htmlspecialchars($error) ?></h2>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -1,5 +1,20 @@
|
||||
<?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/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
echo $OUTPUT->header();
|
||||
?>
|
||||
@ -19,15 +34,14 @@ echo $OUTPUT->header();
|
||||
<div class="plagiarism-preview-content">
|
||||
<div class="plagiarism-preview-content-inner">
|
||||
<?php
|
||||
echo nl2br(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, $encoding = 'UTF-8')) ?>
|
||||
echo nl2br(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, $encoding = 'UTF-8')) ?>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
|
||||
if ($isSupported) {
|
||||
if ($issupported) {
|
||||
echo $form->display();
|
||||
} else {
|
||||
echo 'file not supported';
|
||||
@ -35,5 +49,4 @@ echo $OUTPUT->header();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
echo $OUTPUT->footer();
|