diff --git a/PlagiarismPlugin.inc.php b/PlagiarismPlugin.inc.php index b85e63f..d7fb3fa 100644 --- a/PlagiarismPlugin.inc.php +++ b/PlagiarismPlugin.inc.php @@ -20,7 +20,7 @@ public function register($category, $path, $mainContextId = null) { $success = parent::register($category, $path, $mainContextId); $this->addLocaleData(); - if ($success && Config::getVar('ithenticate', 'ithenticate') && $this->getEnabled()) { + if ($success && $this->getEnabled()) { HookRegistry::register('submissionsubmitstep4form::execute', array($this, 'callback')); } return $success; @@ -37,25 +37,65 @@ public function getDisplayName() { * @copydoc Plugin::getDescription() */ public function getDescription() { - return Config::getVar('ithenticate', 'ithenticate')?__('plugins.generic.plagiarism.description'):__('plugins.generic.plagiarism.description.seeReadme'); + return __('plugins.generic.plagiarism.description'); } /** * @copydoc LazyLoadPlugin::getCanEnable() */ - function getCanEnable() { - if (!parent::getCanEnable()) return false; - return Config::getVar('ithenticate', 'ithenticate'); + function getCanEnable($contextId = null) { + return !Config::getVar('ithenticate', 'ithenticate'); + } + + /** + * @copydoc LazyLoadPlugin::getCanDisable() + */ + function getCanDisable($contextId = null) { + return !Config::getVar('ithenticate', 'ithenticate'); } /** * @copydoc LazyLoadPlugin::getEnabled() */ function getEnabled($contextId = null) { - if (!parent::getEnabled($contextId)) return false; - return Config::getVar('ithenticate', 'ithenticate'); + return parent::getEnabled($contextId) || Config::getVar('ithenticate', 'ithenticate'); + } + + /** + * Fetch credentials from config.inc.php, if available + * @return array username and password, or null(s) + **/ + function getForcedCredentials() { + $request = Application::getRequest(); + $context = $request->getContext(); + $contextPath = $context->getPath(); + $username = Config::getVar('ithenticate', 'username[' . $contextPath . ']', + Config::getVar('ithenticate', 'username')); + $password = Config::getVar('ithenticate', 'password[' . $contextPath . ']', + Config::getVar('ithenticate', 'password')); + return [$username, $password]; } + /** + * Send the editor an error message + * @param $submissionid int + * @param $message string + * @return void + **/ + public function sendErrorMessage($submissionid, $message) { + $request = Application::getRequest(); + $context = $request->getContext(); + import('classes.notification.NotificationManager'); + $notificationManager = new NotificationManager(); + $roleDao = DAORegistry::getDAO('RoleDAO'); /* @var $roleDao RoleDAO */ + // Get the managers. + $managers = $roleDao->getUsersByRoleId(ROLE_ID_MANAGER, $context->getId()); + while ($manager = $managers->next()) { + $notificationManager->createTrivialNotification($manager->getId(), NOTIFICATION_TYPE_ERROR, array('contents' => __('plugins.generic.plagiarism.errorMessage', array('submissionId' => $submissionid, 'errorMessage' => $message)))); + } + error_log('iThenticate submission '.$submissionid.' failed: '.$message); + } + /** * Send submission files to iThenticate. * @param $hookName string @@ -65,18 +105,27 @@ public function callback($hookName, $args) { $request = Application::getRequest(); $context = $request->getContext(); $contextPath = $context->getPath(); - $submissionDao = Application::getSubmissionDAO(); + $submissionDao = DAORegistry::getDAO('SubmissionDAO'); /* @var $submissionDao SubmissionDAO */ $submission = $submissionDao->getById($request->getUserVar('submissionId')); $publication = $submission->getCurrentPublication(); require_once(dirname(__FILE__) . '/vendor/autoload.php'); // try to get credentials for current context otherwise use default config - $username = Config::getVar('ithenticate', 'username[' . $contextPath . ']', - Config::getVar('ithenticate', 'username')); - $password = Config::getVar('ithenticate', 'password[' . $contextPath . ']', - Config::getVar('ithenticate', 'password')); - $ithenticate = new \bsobbe\ithenticate\Ithenticate($username, $password); + $contextId = $context->getId(); + list($username, $password) = $this->getForcedCredentials(); + if (empty($username) || empty($password)) { + $username = $this->getSetting($contextId, 'ithenticateUser'); + $password = $this->getSetting($contextId, 'ithenticatePass'); + } + + $ithenticate = null; + try { + $ithenticate = new \bsobbe\ithenticate\Ithenticate($username, $password); + } catch (Exception $e) { + $this->sendErrorMessage($submission->getId(), $e->getMessage()); + return false; + } // Make sure there's a group list for this context, creating if necessary. $groupList = $ithenticate->fetchGroupList(); $contextName = $context->getLocalizedName($context->getPrimaryLocale()); @@ -84,7 +133,7 @@ public function callback($hookName, $args) { // No folder group found for the context; create one. $groupId = $ithenticate->createGroup($contextName); if (!$groupId) { - error_log('Could not create folder group for context ' . $contextName . ' on iThenticate.'); + $this->sendErrorMessage($submission->getId(), 'Could not create folder group for context ' . $contextName . ' on iThenticate.'); return false; } } @@ -97,7 +146,7 @@ public function callback($hookName, $args) { true, true ))) { - error_log('Could not create folder for submission ID ' . $submission->getId() . ' on iThenticate.'); + $this->sendErrorMessage($submission->getId(), 'Could not create folder for submission ID ' . $submission->getId() . ' on iThenticate.'); return false; } @@ -117,12 +166,63 @@ public function callback($hookName, $args) { Services::get('file')->fs->read($file->path), $folderId )) { - error_log('Could not submit "' . $submissionFile->getData('path') . '" to iThenticate.'); + $this->sendErrorMessage($submission->getId(), 'Could not submit "' . $submissionFile->getData('path') . '" to iThenticate.'); } } return false; } + + /** + * @copydoc Plugin::getActions() + */ + function getActions($request, $verb) { + $router = $request->getRouter(); + import('lib.pkp.classes.linkAction.request.AjaxModal'); + return array_merge( + $this->getEnabled() ? array( + new LinkAction( + 'settings', + new AjaxModal( + $router->url($request, null, null, 'manage', null, array('verb' => 'settings', 'plugin' => $this->getName(), 'category' => 'generic')), + $this->getDisplayName() + ), + __('manager.plugins.settings'), + null + ), + ) : array(), + parent::getActions($request, $verb) + ); + } + + /** + * @copydoc Plugin::manage() + */ + function manage($args, $request) { + switch ($request->getUserVar('verb')) { + case 'settings': + $context = $request->getContext(); + + AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_MANAGER); + $templateMgr = TemplateManager::getManager($request); + $templateMgr->registerPlugin('function', 'plugin_url', array($this, 'smartyPluginUrl')); + + $this->import('PlagiarismSettingsForm'); + $form = new PlagiarismSettingsForm($this, $context->getId()); + + if ($request->getUserVar('save')) { + $form->readInputData(); + if ($form->validate()) { + $form->execute(); + return new JSONMessage(true); + } + } else { + $form->initData(); + } + return new JSONMessage(true, $form->fetch($request)); + } + return parent::manage($args, $request); + } } /** diff --git a/PlagiarismSettingsForm.inc.php b/PlagiarismSettingsForm.inc.php new file mode 100644 index 0000000..d756913 --- /dev/null +++ b/PlagiarismSettingsForm.inc.php @@ -0,0 +1,67 @@ +_contextId = $contextId; + $this->_plugin = $plugin; + + parent::__construct($plugin->getTemplateResource('settingsForm.tpl')); + + $this->addCheck(new FormValidator($this, 'ithenticateUser', 'required', 'plugins.generic.plagiarism.manager.settings.usernameRequired')); + $this->addCheck(new FormValidator($this, 'ithenticatePass', 'required', 'plugins.generic.plagiarism.manager.settings.passwordRequired')); + + $this->addCheck(new FormValidatorPost($this)); + $this->addCheck(new FormValidatorCSRF($this)); + } + + /** + * Initialize form data. + */ + function initData() { + list($username, $password) = $this->_plugin->getForcedCredentials(); + $this->_data = array( + 'ithenticateUser' => $this->_plugin->getSetting($this->_contextId, 'ithenticateUser'), + 'ithenticatePass' => $this->_plugin->getSetting($this->_contextId, 'ithenticatePass'), + 'ithenticateForced' => !empty($username) && !empty($password) + ); + } + + /** + * Assign form data to user-submitted data. + */ + function readInputData() { + $this->readUserVars(array('ithenticateUser', 'ithenticatePass')); + } + + /** + * @copydoc Form::fetch() + */ + function fetch($request, $template = null, $display = false) { + $templateMgr = TemplateManager::getManager($request); + $templateMgr->assign('pluginName', $this->_plugin->getName()); + return parent::fetch($request, $template, $display); + } + + /** + * @copydoc Form::execute() + */ + function execute(...$functionArgs) { + $this->_plugin->updateSetting($this->_contextId, 'ithenticateUser', trim($this->getData('ithenticateUser'), "\"\';"), 'string'); + $this->_plugin->updateSetting($this->_contextId, 'ithenticatePass', trim($this->getData('ithenticatepass'), "\"\';"), 'string'); + parent::execute(...$functionArgs); + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..10adbd7 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# iThenticate Plagiarism Detector Plugin + +For OJS/OMP/OPS 3.x + +## Overview + +This plugin permits automatic submission of uploaded manuscripts to the [iThenticate service](http://www.ithenticate.com/) for plagiarism checking. +1. You need an account of ithenticate.com (costs involved) + * paid via Crossref Similarity Check + * or, paid directly to iThenticate +2. Install the plugin via the Plugin Gallery in the Dashboard +3. Configure the plugin (see below) + * Enable the plugin via config.inc.php or in a specific journal/press/preprint context + * Configure the plugin with the username and password you get from ithenticate.com + * ![Example Settings configuration](ithenticate-settings.png) +4. The author logs in and makes a submission + * The submission files will be sent to iThenticate in Step 4 of the submission process +5. The Editor logs in to ithenticate.com to see the submission + * The submission will be found in a folder named by the Submission ID, under a Group named by the journal/press/preprint context + * Click to see the report + * ![Example report review](ithenticate-report.png) + +Watch [the demo](https://www.ithenticate.com/demo) to know more about the features of iThenticate. + +## Configuration + +You may set the credentials in config.inc.php, or you may set the credentials per-journal in the plugin settings. If credentials are present in config.inc.php, they will override those entered in the plugin settings form. + +The config.inc.php settings format is: + +``` +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; iThenticate Plugin Settings ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +[ithenticate] + +; Enable iThenticate to submit manuscripts after submit step 4 +;ithenticate = On + +; Credentials can be set by context : specify journal path +; The username to access the API (usually an email address) +;username[MyJournal_path] = "user@email.com" +; The password to access the API +;password[MyJournal_path] = "password" + +; default credentials +; The username to access the API (usually an email address) +;username = "user@email.com" + +; The password to access the API +;password = "password" +``` + diff --git a/README.txt b/README.txt deleted file mode 100644 index a918026..0000000 --- a/README.txt +++ /dev/null @@ -1,23 +0,0 @@ -For this plugin to work, the following must be added to your config.inc.php file: - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; iThenticate Plugin Settings ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -[ithenticate] - -; Enable iThenticate to submit manuscripts after submit step 4 -ithenticate = On - -; Credentials can be set by context : specify journal path -; The username to access the API (usually an email address) -;username[MyJournal_path] = "user@email.com" -; The password to access the API -;password[MyJournal_path] = "password" - -; default credentials -; The username to access the API (usually an email address) -username = "user@email.com" - -; The password to access the API -password = "password" diff --git a/ithenticate-report.png b/ithenticate-report.png new file mode 100644 index 0000000..1442919 Binary files /dev/null and b/ithenticate-report.png differ diff --git a/ithenticate-settings.png b/ithenticate-settings.png new file mode 100644 index 0000000..5ba7ddf Binary files /dev/null and b/ithenticate-settings.png differ diff --git a/locale/ar_IQ/locale.po b/locale/ar_IQ/locale.po index c3b2093..828a39c 100644 --- a/locale/ar_IQ/locale.po +++ b/locale/ar_IQ/locale.po @@ -16,6 +16,3 @@ msgstr "إضافة كشف السرقة الأدبية iThenticate" msgid "plugins.generic.plagiarism.description" msgstr "أرسل كل طلبات التقديم إلى iThenticate للتحقق من إحتمالية وجود سرقات أدبية." - -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "أرسل كل طلبات التقديم إلى iThenticate للتحقق من إحتمالية وجود سرقات أدبية. أنظر ملف README الخاص بهذه الإضافة لمعرفة إرشادات التنصيب." diff --git a/locale/bg_BG/locale.po b/locale/bg_BG/locale.po index f003d52..c9ac638 100644 --- a/locale/bg_BG/locale.po +++ b/locale/bg_BG/locale.po @@ -12,12 +12,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Изпращане на всички материали на iThenticate, за да бъдат проверени за " -"възможно плагиатство. Вижте документа README за тази добовка за " -"инструкции за инсталиране." - msgid "plugins.generic.plagiarism.description" msgstr "" "Изпращане на всички материали на iThenticate, за да бъдат проверени за " diff --git a/locale/ca_ES/locale.po b/locale/ca_ES/locale.po index e4a83ee..d0f9aec 100644 --- a/locale/ca_ES/locale.po +++ b/locale/ca_ES/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Enviar totes les trameses a iThenticate per detectar possibles plagis. " -"Llegiu el document README d'aquest mòdul per obtenir les " -"instruccions d'instal·lació." - msgid "plugins.generic.plagiarism.description" msgstr "Enviar totes les trameses a iThenticate per detectar possibles plagis." diff --git a/locale/cs_CZ/locale.po b/locale/cs_CZ/locale.po index 87f8792..31676e9 100644 --- a/locale/cs_CZ/locale.po +++ b/locale/cs_CZ/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Poslat všechny příspěvky do iThenicate, aby byly zkntrolovány případné " -"plagiáty. Přečtěte si dokument README, kde jsou pokyny pro " -"instalaci." - msgid "plugins.generic.plagiarism.description" msgstr "" "Odeslat všechny příspěvky do iThenticate ke kontrole možného plagiarismu." diff --git a/locale/da_DK/locale.po b/locale/da_DK/locale.po index 235e427..f7f0497 100644 --- a/locale/da_DK/locale.po +++ b/locale/da_DK/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Send alle indsendelser til iThenticate for at kontrollere dem for mulig " -"plagiering. Læs installationsinstruktionerne til dette plugin i " -"README-dokumentet." - msgid "plugins.generic.plagiarism.description" msgstr "" "Send alle indsendelser til iThenticate for at kontrollere dem for mulig " diff --git a/locale/el_GR/locale.po b/locale/el_GR/locale.po index 8db5990..ff75e31 100644 --- a/locale/el_GR/locale.po +++ b/locale/el_GR/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Στείλτε όλες τις υποβολές στο iThenticate για να ελεγχθούν για πιθανή " -"λογοκλοπή. Ανατρέξτε στο README αυτού του πρόσθετου για οδηγίες " -"εγκατάστασης." - msgid "plugins.generic.plagiarism.description" msgstr "" "Στείλτε όλες τις υποβολές στο iThenticate για να ελεγχθούν για πιθανή " diff --git a/locale/en_US/locale.po b/locale/en_US/locale.po index f653231..de4fa39 100644 --- a/locale/en_US/locale.po +++ b/locale/en_US/locale.po @@ -17,5 +17,23 @@ msgstr "iThenticate Plagiarism Detector Plugin" msgid "plugins.generic.plagiarism.description" msgstr "Send all submissions to iThenticate to be checked for possible plagiarism." -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "Send all submissions to iThenticate to be checked for possible plagiarism. See the README document for this plugin for installation instructions." +msgid "plugins.generic.plagiarism.manager.settings.description" +msgstr "Settings for the account used to upload submissions to iThenticate. Contact your iThenticate administrator for details." + +msgid "plugins.generic.plagiarism.manager.settings.username" +msgstr "iThenticate Usename" + +msgid "plugins.generic.plagiarism.manager.settings.password" +msgstr "iThenticate Password" + +msgid "plugins.generic.plagiarism.manager.settings.usernameRequired" +msgstr "iThenticate Usename is required" + +msgid "plugins.generic.plagiarism.manager.settings.passwordRequired" +msgstr "iThenticate Password is required" + +msgid "plugins.generic.plagiarism.manager.settings.areForced" +msgstr "iThenticate settings were found in config.inc.php and the settings here will not be used." + +msgid "plugins.generic.plagiarism.errorMessage" +msgstr "Upload of submission {$submissionId} to iThenticate failed with error: {$errorMessage}" diff --git a/locale/es_ES/locale.po b/locale/es_ES/locale.po index 5f5cf00..14cac6a 100644 --- a/locale/es_ES/locale.po +++ b/locale/es_ES/locale.po @@ -16,6 +16,3 @@ msgstr "Módulo de Detección de Plagio de iThenticate" msgid "plugins.generic.plagiarism.description" msgstr "Permite enviar artículos a iThenticate para verificar posibles plagios." - -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "Permite enviar artículos a iThenticate para verificar posibles plagios. Vea el archivo README para instrucciones de instalación." diff --git a/locale/fi_FI/locale.po b/locale/fi_FI/locale.po index 84cd698..4fea37a 100644 --- a/locale/fi_FI/locale.po +++ b/locale/fi_FI/locale.po @@ -14,12 +14,6 @@ msgstr "" msgid "plugins.generic.plagiarism.displayName" msgstr "iThenticate, lisäosa plagiaatin tunnistamiseksi" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Lähetä kaikki käsikirjoitukset iThenticate-palveluun tarkistettavaksi " -"plagioinnin varalta. Katso README -tiedostosta asennusohjeet tämän " -"lisäosan asentamiseksi." - msgid "plugins.generic.plagiarism.description" msgstr "" "Lähetä kaikki käsikirjoitukset iThenticate-palveluun tarkistettavaksi " diff --git a/locale/fr_CA/locale.po b/locale/fr_CA/locale.po index c1c76af..8587d28 100644 --- a/locale/fr_CA/locale.po +++ b/locale/fr_CA/locale.po @@ -12,12 +12,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Envoyer toutes les soumissions à iThenticate pour détecter d'éventuels cas " -"de plagiat. Consulter le fichier README de ce plugiciel pour les " -"instructions d'installation." - msgid "plugins.generic.plagiarism.description" msgstr "" "Envoyer toutes les soumissions à iThenticate pour détecter d'éventuels cas " diff --git a/locale/gl_ES/locale.po b/locale/gl_ES/locale.po index 41d1b33..70ded09 100644 --- a/locale/gl_ES/locale.po +++ b/locale/gl_ES/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Enviar todos os envíos a iThenticate para comprobar se hai un posible " -"plaxio. Consulte o documento README deste complemento para obter " -"instrucións de instalación." - msgid "plugins.generic.plagiarism.description" msgstr "" "Enviar todos os envíos a iThenticate para comprobar se hai un posible plaxio." diff --git a/locale/id_ID/locale.po b/locale/id_ID/locale.po index 8c63960..f30b6ad 100644 --- a/locale/id_ID/locale.po +++ b/locale/id_ID/locale.po @@ -11,11 +11,6 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Kirim semua naskah ke iThenticate untuk pengecekan plagiarisme. Buka " -"dokumen README plugin ini untuk melihat petunjuk instalasinya." - msgid "plugins.generic.plagiarism.description" msgstr "" "Kirim semua naskah ke iThenticate untuk diperiksa kemungkinan plagiarismenya." diff --git a/locale/it_IT/locale.po b/locale/it_IT/locale.po index fb00d05..645846c 100644 --- a/locale/it_IT/locale.po +++ b/locale/it_IT/locale.po @@ -16,6 +16,3 @@ msgstr "iThenticate Plagiarism Detector Plugin" msgid "plugins.generic.plagiarism.description" msgstr "Invia tutte le proposte a iThenticate per un controllo di possibile plagio." - -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "Invia tutte le proposte a iThenticate per un controllo di possibile plagio. Vedi il documento README di questo plugin per le istruzioni di installazione." diff --git a/locale/ka_GE/locale.po b/locale/ka_GE/locale.po index 0511e59..e8cb8c5 100644 --- a/locale/ka_GE/locale.po +++ b/locale/ka_GE/locale.po @@ -17,9 +17,3 @@ msgstr "iThenticate პლაგიატიზმის გამოვლე msgid "plugins.generic.plagiarism.description" msgstr "" "ყველა მასალის წარდგენა iThenticate-ზე, რათა გადამოწმდეს შესაძლო პლაგიატი." - -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"ყველა მასალის წარდგენა iThenticate-ზე, რათა გადამოწმდეს შესაძლო პლაგიატი. " -"ინსტალაციის ინსტრუქციისთვის იხილეთ ამ მოდულის README " -"დოკუმენტი." diff --git a/locale/mk_MK/locale.po b/locale/mk_MK/locale.po index f437b17..3255c77 100644 --- a/locale/mk_MK/locale.po +++ b/locale/mk_MK/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n==1 || n%10==1 ? 0 : 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Испратете ги сите поднесоци до iThenticate за да бидат проверени за можен " -"плагијат. Прегледајте го README документот на овој плагин за " -"инструкции за инсталација." - msgid "plugins.generic.plagiarism.description" msgstr "" "Испратете ги сите поднесоци до iThenticate за да бидат проверени за можен " diff --git a/locale/ms_MY/locale.po b/locale/ms_MY/locale.po index 38b75b3..48837a6 100644 --- a/locale/ms_MY/locale.po +++ b/locale/ms_MY/locale.po @@ -12,12 +12,6 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Hantar semua penyerahan ke iThenticate untuk diperiksa kemungkinan " -"plagiarisme. Lihat dokumen README untuk plugin ini untuk mendapatkan " -"arahan pemasangan." - msgid "plugins.generic.plagiarism.description" msgstr "" "Hantar semua penyerahan ke iThenticate untuk diperiksa kemungkinan " diff --git a/locale/nb_NO/locale.po b/locale/nb_NO/locale.po index 7f2b0b0..1cb937b 100644 --- a/locale/nb_NO/locale.po +++ b/locale/nb_NO/locale.po @@ -12,12 +12,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Send alle innleveringer til iThenticate for å kontrollere dem for mulig " -"plagiering. Les installasjonsinstruksjonene til dette " -"programtillegget i README-dokumentet." - msgid "plugins.generic.plagiarism.description" msgstr "" "Send alle innleveringer til iThenticate for å kontrollere dem for mulig " diff --git a/locale/pt_BR/locale.po b/locale/pt_BR/locale.po index 9f30450..ea63e2b 100644 --- a/locale/pt_BR/locale.po +++ b/locale/pt_BR/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Envie todas as submissões para iThenticate para serem verificadas quanto a " -"possível plágio. Consulte o documento README deste plug-in para " -"obter instruções de instalação. " - msgid "plugins.generic.plagiarism.description" msgstr "" "Envie todas as submissões para iThenticate para serem verificadas quanto a " diff --git a/locale/ru_RU/locale.po b/locale/ru_RU/locale.po index 482b451..a2856c4 100644 --- a/locale/ru_RU/locale.po +++ b/locale/ru_RU/locale.po @@ -12,12 +12,6 @@ msgstr "" "4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Отправляет все материалы в iThenticate для проверки на возможный плагиат. " -"Смотрите документ README этого плагина для получения инструкций по " -"установке." - msgid "plugins.generic.plagiarism.description" msgstr "" "Отправляет все материалы в iThenticate для проверки на возможный плагиат." diff --git a/locale/sl_SI/locale.po b/locale/sl_SI/locale.po index 49352b4..057772d 100644 --- a/locale/sl_SI/locale.po +++ b/locale/sl_SI/locale.po @@ -12,12 +12,6 @@ msgstr "" "n%100==4 ? 2 : 3;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Pošlje vse prispevke na iThenticate, da se preverijo za plagiatorstvo. " -"Poglejte README dokument tega vtičnika za namestitvena " -"navodila." - msgid "plugins.generic.plagiarism.description" msgstr "Pošlje vse prispevke na iThenticate, da se preverijo za plagiatorstvo." diff --git a/locale/sv_SE/locale.po b/locale/sv_SE/locale.po index 4e7fdf4..8222cd0 100644 --- a/locale/sv_SE/locale.po +++ b/locale/sv_SE/locale.po @@ -14,10 +14,5 @@ msgstr "" msgid "plugins.generic.plagiarism.description" msgstr "Skicka alla bidrag för plagiatkontroll till iThenticate." -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Skicka alla bidrag för plagiatkontroll till iThenticate. Se " -"pluginets README för installationsinstruktioner." - msgid "plugins.generic.plagiarism.displayName" msgstr "iThenticate, plugin för plagiatkontroll" diff --git a/locale/tr_TR/locale.po b/locale/tr_TR/locale.po index 0a28562..3cab2f6 100644 --- a/locale/tr_TR/locale.po +++ b/locale/tr_TR/locale.po @@ -11,12 +11,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.9.1\n" -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Tüm gelen aday makaleleri intihal olup olmadığını kontrol etmek için " -"iThenticate'e gönderin. Eklenti kurulum için README belgesine " -"bakın." - msgid "plugins.generic.plagiarism.description" msgstr "" "Tüm gelen aday makaleleri intihal olup olmadığını kontrol etmek için " diff --git a/locale/vi_VN/locale.po b/locale/vi_VN/locale.po index be1092f..4ebd5b8 100644 --- a/locale/vi_VN/locale.po +++ b/locale/vi_VN/locale.po @@ -17,9 +17,3 @@ msgstr "Plugin phát hiện đạo văn của iThenticate" msgid "plugins.generic.plagiarism.description" msgstr "" "Gửi tất cả các bài gửi cho iThenticate để được kiểm tra khả năng đạo văn." - -msgid "plugins.generic.plagiarism.description.seeReadme" -msgstr "" -"Gửi tất cả các bài gửi cho iThenticate để được kiểm tra khả năng đạo văn. " -"Xem tài liệu README cho plugin này để biết hướng dẫn cài đặt. " -"" diff --git a/templates/settingsForm.tpl b/templates/settingsForm.tpl new file mode 100644 index 0000000..5b212e2 --- /dev/null +++ b/templates/settingsForm.tpl @@ -0,0 +1,26 @@ + + +
+ {csrf} + {include file="controllers/notification/inPlaceNotification.tpl" notificationId="plagiarismSettingsFormNotification"} + +
{translate key="plugins.generic.plagiarism.manager.settings.description"}
+ {if $ithenticateForced} +
{translate key="plugins.generic.plagiarism.manager.settings.areForced"}
+ {/if} + + {fbvFormArea id="webFeedSettingsFormArea"} + {fbvElement type="text" id="ithenticateUser" value=$ithenticateUser label="plugins.generic.plagiarism.manager.settings.username"} + {fbvElement type="text" id="ithenticatePass" value=$ithenticatePass label="plugins.generic.plagiarism.manager.settings.password" password=true} + + {/fbvFormArea} + + {fbvFormButtons} + +

{translate key="common.requiredField"}

+
diff --git a/version.xml b/version.xml index 8f3a5a1..0a67ba9 100644 --- a/version.xml +++ b/version.xml @@ -13,8 +13,8 @@ plagiarism plugins.generic - 1.0.5.1 - 2022-02-17 + 1.0.6.0 + 2022-06-16 1 PlagiarismPlugin