コード例 #1
0
 /**
  * @see Form::execute()
  */
 function execute()
 {
     $reviewerSubmission =& $this->getReviewerSubmission();
     // Set competing interests.
     if ($this->getData('competingInterestOption') == 'hasCompetingInterests') {
         $reviewerSubmission->setCompetingInterests($this->request->getUserVar('competingInterestsText'));
     } else {
         $reviewerSubmission->setCompetingInterests(null);
     }
     // Set review to next step.
     $this->updateReviewStepAndSaveSubmission($reviewerSubmission);
     // Set that the reviewer has accepted the review.
     ReviewerAction::confirmReview($this->request, $reviewerSubmission, false, true);
 }
コード例 #2
0
 /**
  * Delete comment.
  * @param $args array
  * @param $request PKPRequest
  */
 function deleteComment($args, $request)
 {
     $articleId = (int) array_shift($args);
     $commentId = (int) array_shift($args);
     $reviewId = (int) $request->getUserVar('reviewId');
     $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId));
     $this->validate($request, $reviewId);
     $comment =& $this->comment;
     $this->setupTemplate($request, true);
     ReviewerAction::deleteComment($commentId, $this->user);
     // Redirect back to initial comments page
     if ($comment->getCommentType() == COMMENT_TYPE_PEER_REVIEW) {
         $request->redirect(null, null, 'viewPeerReviewComments', array($articleId, $this->comment->getAssocId()));
     }
 }
コード例 #3
0
 /**
  * Save the reviewer regrets form and decline the review.
  * @param $args array
  * @param $request PKPRequest
  */
 function saveDeclineReview($args, $request)
 {
     $reviewAssignment = $this->getAuthorizedContextObject(ASSOC_TYPE_REVIEW_ASSIGNMENT);
     /* @var $reviewAssignment ReviewAssignment */
     if ($reviewAssignment->getDateCompleted()) {
         fatalError('Review already completed!');
     }
     $reviewId = (int) $reviewAssignment->getId();
     $declineReviewMessage = $request->getUserVar('declineReviewMessage');
     // Decline the review
     $reviewerAction = new ReviewerAction();
     $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
     $reviewerAction->confirmReview($request, $reviewAssignment, $submission, 1, $declineReviewMessage);
     $dispatcher = $request->getDispatcher();
     return $request->redirectUrlJson($dispatcher->url($request, ROUTE_PAGE, null, 'index'));
 }
コード例 #4
0
 /**
  * Delete comment.
  */
 function deleteComment($args)
 {
     $articleId = $args[0];
     $commentId = $args[1];
     $reviewId = Request::getUserVar('reviewId');
     list($journal, $submission, $user) = SubmissionReviewHandler::validate($reviewId);
     list($comment) = SubmissionCommentsHandler::validate($user, $commentId);
     ReviewerHandler::setupTemplate(true);
     ReviewerAction::deleteComment($commentId, $user);
     // Redirect back to initial comments page
     if ($comment->getCommentType() == COMMENT_TYPE_PEER_REVIEW) {
         Request::redirect(null, null, 'viewPeerReviewComments', array($articleId, $comment->getAssocId()));
     }
 }
コード例 #5
0
 /**
  * Delete comment.
  */
 function deleteComment($args)
 {
     $articleId = $args[0];
     $commentId = $args[1];
     $reviewId = Request::getUserVar('reviewId');
     $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId));
     $this->validate();
     $comment =& $this->comment;
     $this->setupTemplate(true);
     $submissionReviewHandler = new SubmissionReviewHandler();
     $submissionReviewHandler->validate($reviewId);
     $submission =& $submissionReviewHandler->submission;
     $user =& $submissionReviewHandler->user;
     ReviewerAction::deleteComment($commentId, $user);
     // Redirect back to initial comments page
     if ($comment->getCommentType() == COMMENT_TYPE_PEER_REVIEW) {
         Request::redirect(null, null, 'viewPeerReviewComments', array($articleId, $comment->getAssocId()));
     }
 }
コード例 #6
0
 /**
  * @see Form::execute()
  */
 function execute()
 {
     $reviewerSubmission = $this->getReviewerSubmission();
     // Set competing interests.
     if ($this->getData('competingInterestOption') == 'hasCompetingInterests') {
         $reviewerSubmission->setCompetingInterests($this->request->getUserVar('competingInterestsText'));
     } else {
         $reviewerSubmission->setCompetingInterests(null);
     }
     // Set review to next step.
     $this->updateReviewStepAndSaveSubmission($reviewerSubmission);
     $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($reviewerSubmission->getReviewId());
     // if the reviewer has not previously confirmed the review, then
     // Set that the reviewer has accepted the review.
     if (!$reviewAssignment->getDateConfirmed()) {
         $reviewerAction = new ReviewerAction();
         $reviewerAction->confirmReview($this->request, $reviewAssignment, $reviewerSubmission, false);
     }
 }
コード例 #7
0
 /**
  * Save review form response
  * @param $args array
  */
 function saveReviewFormResponse($args, $request)
 {
     $reviewId = (int) array_shift($args);
     $reviewFormId = (int) array_shift($args);
     $this->validate($request, $reviewId);
     $this->setupTemplate(true);
     if (ReviewerAction::saveReviewFormResponse($reviewId, $reviewFormId, $request)) {
         $request->redirect(null, null, 'submission', $reviewId);
     }
 }
コード例 #8
0
ファイル: ReviewHandler.inc.php プロジェクト: jerico-dev/omp
 /**
  * Save the reviewer regrets form and decline the review.
  * @param $args array
  * @param $request PKPRequest
  */
 function saveDeclineReview($args, &$request)
 {
     $reviewAssignment =& $this->getAuthorizedContextObject(ASSOC_TYPE_REVIEW_ASSIGNMENT);
     /* @var $reviewAssignment ReviewAssignment */
     $reviewId = (int) $reviewAssignment->getId();
     assert(!empty($reviewId));
     $declineReviewMessage = $request->getUserVar('declineReviewMessage');
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $reviewerSubmission =& $reviewerSubmissionDao->getReviewerSubmission($reviewId);
     assert(is_a($reviewerSubmission, 'ReviewerSubmission'));
     // Save regret message
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($reviewId);
     assert(is_a($reviewAssignment, 'ReviewAssignment'));
     $reviewAssignment->setRegretMessage($declineReviewMessage);
     $reviewAssignmentDao->updateObject($reviewAssignment);
     $reviewerAction = new ReviewerAction();
     $reviewerAction->confirmReview($request, $reviewerSubmission, true, true);
     $router =& $request->getRouter();
     /* @var $router PageRouter */
     $request->redirect($router->redirectHome($request));
 }
 /**
  * Save review form response
  * @param $args array
  */
 function saveReviewFormResponse($args, $request)
 {
     $reviewId = (int) array_shift($args);
     $reviewFormId = (int) array_shift($args);
     $this->validate($reviewId);
     // For form errors (#6562)
     AppLocale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON));
     if (ReviewerAction::saveReviewFormResponse($reviewId, $reviewFormId)) {
         $request->redirect(null, null, 'submission', $reviewId);
     }
 }
コード例 #10
0
 /**
  * Save changes to submission.
  */
 function execute()
 {
     // Set review to next step
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     if ($this->reviewerSubmission->getStep() < 2) {
         $this->reviewerSubmission->setStep(2);
     }
     if ($this->getData('competingInterestOption') == 'hasCompetingInterests') {
         $this->reviewerSubmission->setCompetingInterests(Request::getUserVar('competingInterestsText'));
     } else {
         $this->reviewerSubmission->setCompetingInterests(null);
     }
     $reviewerSubmissionDao->updateReviewerSubmission($this->reviewerSubmission);
     // Set that the reviewer has accepted the review
     ReviewerAction::confirmReview($this->reviewerSubmission, false, true);
 }
コード例 #11
0
 /**
  * Save review form response
  * @param $args array
  */
 function saveReviewFormResponse($args)
 {
     $reviewId = isset($args[0]) ? $args[0] : 0;
     $reviewFormId = isset($args[1]) ? $args[1] : 0;
     $this->validate($reviewId);
     $this->setupTemplate(true);
     if (ReviewerAction::saveReviewFormResponse($reviewId, $reviewFormId)) {
         Request::redirect(null, null, null, 'submission', $reviewId);
     }
 }
コード例 #12
0
 /**
  * Save review form response
  * @param $args array
  */
 function saveReviewFormResponse($args)
 {
     $reviewId = isset($args[0]) ? $args[0] : 0;
     $reviewFormId = isset($args[1]) ? $args[1] : 0;
     if (ReviewerAction::saveReviewFormResponse($reviewId, $reviewFormId)) {
         Request::redirect(null, null, 'submission', $reviewId);
     }
 }
コード例 #13
0
 function downloadSummary($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $this->validate($articleId);
     $submission =& $this->submission;
     ReviewerAction::automaticSummaryInPDF($submission);
 }
コード例 #14
0
 function emailDirector($args = array())
 {
     $paperId = (int) Request::getUserVar('paperId');
     $paperDao =& DAORegistry::getDAO('PaperDAO');
     $paper =& $paperDao->getPaper($paperId);
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     $submission =& $this->submission;
     $this->setupTemplate(true, $paperId, 'review');
     if (ReviewerAction::emailDirector($paper, $paperId)) {
         Request::redirect(null, null, null, 'submission', $paperId, 'peerReview');
     }
 }
コード例 #15
0
 /**
  * Download a file.
  * @param $args array ($articleId, $fileId, [$revision])
  */
 function downloadFile($args)
 {
     $reviewId = isset($args[0]) ? $args[0] : 0;
     $articleId = isset($args[1]) ? $args[1] : 0;
     $fileId = isset($args[2]) ? $args[2] : 0;
     $revision = isset($args[3]) ? $args[3] : null;
     list($journal, $reviewerSubmission) = SubmissionReviewHandler::validate($reviewId);
     if (!ReviewerAction::downloadReviewerFile($reviewId, $reviewerSubmission, $fileId, $revision)) {
         Request::redirect(null, null, 'submission', $reviewId);
     }
 }