Ejemplo n.º 1
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()));
     }
 }
 /**
  * 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()));
     }
 }
 /**
  * Delete comment.
  */
 function deleteComment($args, $request)
 {
     $paperId = (int) array_shift($args);
     $commentId = (int) array_shift($args);
     $reviewId = $request->getUserVar('reviewId');
     $this->setupTemplate($request, true);
     $submissionReviewHandler = new SubmissionReviewHandler();
     $submissionReviewHandler->validate($request, $reviewId);
     $user =& $submissionReviewHandler->user;
     $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId, $user));
     $this->validate(null, $request);
     $comment =& $this->comment;
     ReviewerAction::deleteComment($commentId, $user);
     // Redirect back to initial comments page
     if ($comment->getCommentType() == COMMENT_TYPE_PEER_REVIEW) {
         $request->redirect(null, null, null, 'viewPeerReviewComments', array($paperId, $comment->getAssocId()));
     }
 }
Ejemplo n.º 4
0
 /**
  * Get Reviewer Certification 
  *
  */
 function getRevCertification($args)
 {
     import('pages.reviewer.SubmissionReviewHandler');
     $reviewId = $args[0];
     $user =& Request::getUser();
     $journal =& Request::getJournal();
     $currentDate = Core::getCurrentDate();
     list($journal, $submission, $user) = SubmissionReviewHandler::validate($reviewId);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('ContactSignature', $user->getContactSignature());
     $templateMgr->assign('reviewerName', $user->getFullName());
     $templateMgr->assign('journalTitle', $journal->getJournalTitle());
     $templateMgr->assign('date', $currentDate);
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->display("reviewer/getRevCertification.tpl");
 }
 /**
  * Edit or preview review form response.
  * @param $args array
  */
 function editReviewFormResponse($args)
 {
     $reviewId = isset($args[0]) ? $args[0] : 0;
     list($journal, $reviewerSubmission, $user) = SubmissionReviewHandler::validate($reviewId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment =& $reviewAssignmentDao->getReviewAssignmentById($reviewId);
     $reviewFormId = $reviewAssignment->getReviewFormId();
     if ($reviewFormId != null) {
         ReviewerAction::editReviewFormResponse($reviewId, $reviewFormId);
     }
 }
Ejemplo n.º 6
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);
     }
 }