-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from radekgomola/main
Settings for journal managers
- Loading branch information
Showing
31 changed files
with
285 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
import('lib.pkp.classes.form.Form'); | ||
|
||
class PlagiarismSettingsForm extends Form { | ||
|
||
/** @var int */ | ||
var $_contextId; | ||
|
||
/** @var object */ | ||
var $_plugin; | ||
|
||
/** | ||
* Constructor | ||
* @param $plugin PlagiarismPlugin | ||
* @param $contextId int | ||
*/ | ||
function __construct($plugin, $contextId) { | ||
$this->_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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] = "[email protected]" | ||
; The password to access the API | ||
;password[MyJournal_path] = "password" | ||
; default credentials | ||
; The username to access the API (usually an email address) | ||
;username = "[email protected]" | ||
; The password to access the API | ||
;password = "password" | ||
``` | ||
|
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.