| Server IP : 10.10.92.66 / Your IP : 104.23.197.230 Web Server : Apache/2.4.52 (Ubuntu) System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64 User : jurnal ( 1001) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/jurnal/public_html/plugins/generic/rqc/pages/ |
Upload File : |
<?php
/**
* @file plugins/generic/rqc/pages/DevHelperHandler.inc.php
*
* Copyright (c) 2018-2023 Lutz Prechelt
* Distributed under the GNU General Public License, Version 3.
*
* @class DevHelperHandler
* @ingroup plugins_generic_rqc
*
* @brief Handle requests to show what OJS-to-RQC requests will look like or make one "by hand".
*/
/* for OJS 3.4:
namespace APP\plugins\generic\rqc;
use APP\handler\Handler;
use PKP\db\DAORegistry;
use PKP\plugins\PluginRegistry;
*/
class DevHelperHandler extends Handler
{
var $plugin;
function __construct()
{
parent::__construct();
$this->plugin = PluginRegistry::getPlugin('generic', 'rqcplugin');
}
/**
* Show RQC request corresponding to a given submissionId (args[0]) (with ?viewonly=1) or
* make the RQC request and show errors or perform the RQC redirect (with ?viewonly=0&stageId=3).
*/
function rqccall($args, $request)
{
//----- prepare processing:
$router = $request->getRouter();
$requestArgs = $this->plugin->getQueryArray($request);
$journal = $router->getContext($request);
$submissionId = $args[0];
$viewOnly = array_key_exists('viewonly', $requestArgs) ? $requestArgs['viewonly'] : true;
if ($viewOnly) {
//----- get RQC data:
$rqcDataObj = new RqcData();
$data = $rqcDataObj->rqcdata_array($request, $journal->getId(), $submissionId);
//----- produce output:
header("Content-Type: application/json; charset=utf-8");
//header("Content-Type: text/plain; charset=utf-8");
print(json_encode($data, JSON_PRETTY_PRINT));
} else { //----- make an actual RQC call:
$handler = new RqccallHandler();
$rqc_result = $handler->sendToRqc($request, $journal->getId(), $submissionId);
$handler->processRqcResponse($rqc_result['status'], $rqc_result['response']);
}
}
/**
* Make a previously submitted OJS reviewing case RQC-submittable again.
*/
public function ra_reset($args, $request)
{
header("Content-Type: text/plain; charset=utf-8");
$submissionId =& $args[0];
$userId = $request->getUser()->getId();
$reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
$ra = $reviewAssignmentDao->getLastReviewRoundReviewAssignmentByReviewer($submissionId, $userId);
$raId = $ra->getId();
$ra->setRecommendation(null);
$ra->setDateCompleted(null);
$reviewAssignmentDao->updateObject($ra);
return("ra_reset $raId (submission $submissionId, reviewer $userId)\n");
}
/**
* Make review case (MRC) in the current journal.
* INCOMPLETE AND OUTDATED. TODO 1: remove or rewrite.
*/
/*
function mrc($args, $request)
{
header("Content-Type: text/html; charset=utf-8");
echo "START\n";
//----- prepare processing:
$router = $request->getRouter();
$requestArgs = $this->plugin->getQueryArray($request);
$contextId = $request->getContext()->getId();
$user = $request->getUser();
$now = time();
//----- make submission:
$article = new Article();
$article->setJournalId($contextId);
$article->setTitle("Test submission " . date('Y-m-d H:i:s'), RQC_LOCALE);
//$article->sub
$this->articleDao->insertObject($article);
//----- make authors:
$author = new Author();
$author->setGivenName("Anabel", RQC_LOCALE);
$author->setFamilyName("Author1", RQC_LOCALE);
$author->setEmail("[email protected]");
$author->setSubmissionId($article->getId());
$this->authorDao->insertObject($author);
//----- make review round:
//----- make editor assignments:
//----- make reviewer assignments:
//----- make reviews:
//----- make decision
//-----
//-----
//-----
//-----
//-----
//----- produce output:
//header("Content-Type: application/json; charset=utf-8");
//header("Content-Type: text/plain; charset=utf-8");
//print(json_encode($data, JSON_PRETTY_PRINT));
echo "END.\n";
}
*/
}