Skip to content

Commit e3d43d7

Browse files
committed
commented testcase, added notification, v0.1.5
1 parent e417696 commit e3d43d7

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

classes/compare/document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function __construct( $filename, $_settings=null,$file=null, $isAdd=fals
8787
}
8888
if (PHP_OS_FAMILY === "Windows") {
8989
$this->m_pdftotextFile= __DIR__.'\pdftotext.exe';
90-
echo $this->m_pdftotextFile;
90+
// echo $this->m_pdftotextFile;
9191
} elseif (PHP_OS_FAMILY === "Linux") {
9292
//use different commandlinetool
9393
$this->m_pdftotextFile= __DIR__.'/pdftotext32';

classes/compare/load_documents.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static function ErrorcodeToString($irvalue){
287287
// 3 - 99,6
288288
// 4 - 99,4
289289

290-
$settings=settings::getPreset(1);
291-
$test = new load_documents($settings);
292-
$test->testMain();
293-
echo(file_get_contents("C:\\moodle\\server\\moodle\\plagiarism\\mcopyfind\\reports\\-1matches.html"));
290+
// $settings=settings::getPreset(1);
291+
// $test = new load_documents($settings);
292+
// $test->testMain();
293+
// echo(file_get_contents("C:\\moodle\\server\\moodle\\plagiarism\\mcopyfind\\reports\\-1matches.html"));

submit/submit_all_files.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
$file=$sub->access_all_files($cm, $context);
7575
//no Match ?? return to the previous page
7676
$url=urldecode($return);
77-
77+
$msg="Match found";
78+
$time=10;
7879
if($file != null){
7980
$url = moodle_url::make_pluginfile_url(
8081
$file->get_contextid(),
@@ -86,6 +87,11 @@
8687
false // Do not force download of the file.
8788
);
8889

90+
}else{
91+
$notification = \core\output\notification::NOTIFY_INFO;
92+
$msg="No Match found";
93+
$time=10;
94+
$url = urldecode($return);
8995
}
9096

91-
redirect($url);
97+
redirect($url, $msg, $time, $notification);

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
defined('MOODLE_INTERNAL') || die();
2020

2121
$plugin->component = 'plagiarism_mcopyfind';
22-
$plugin->release = '0.1.4';
22+
$plugin->release = '0.1.5';
2323
$plugin->cron = 60;
2424
$plugin->version = 2022030300;
2525
$plugin->requires = 2020061512.05;

0 commit comments

Comments
 (0)