상속: extends Handler
예제 #1
0
 /**
  * Display the form.
  */
 function display()
 {
     $conference =& Request::getConference();
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $reviewForm =& $reviewFormDao->getReviewForm($this->reviewFormId, $conference->getId());
     $reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
     $reviewFormElements =& $reviewFormElementDao->getReviewFormElements($this->reviewFormId);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses =& $reviewFormResponseDao->getReviewReviewFormResponseValues($this->reviewId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getReviewAssignmentById($this->reviewId);
     $editorPreview = Request::getRequestedPage() != 'reviewer';
     if (!$editorPreview) {
         ReviewerHandler::setupTemplate(true, $reviewAssignment->getPaperId(), $this->reviewId);
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageTitle', 'submission.reviewFormResponse');
     $templateMgr->assign_by_ref('reviewForm', $reviewForm);
     $templateMgr->assign('reviewFormElements', $reviewFormElements);
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewId', $this->reviewId);
     $templateMgr->assign('paperId', $reviewAssignment->getPaperId());
     $templateMgr->assign('isLocked', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
     $templateMgr->assign('editorPreview', $editorPreview);
     parent::display();
 }
예제 #2
0
 /**
  * Display reviewer index page.
  */
 function index($args)
 {
     ReviewerHandler::validate();
     ReviewerHandler::setupTemplate();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $rangeInfo = Handler::getRangeInfo('submissions');
     $page = isset($args[0]) ? $args[0] : '';
     switch ($page) {
         case 'completed':
             $active = false;
             break;
         default:
             $page = 'active';
             $active = true;
     }
     $submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getUserId(), $journal->getJournalId(), $active, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign_by_ref('submissions', $submissions);
     import('submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     import('issue.IssueAction');
     $issueAction =& new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.submissions');
     $templateMgr->display('reviewer/index.tpl');
 }
예제 #3
0
 /**
  * Display the form.
  */
 function display()
 {
     $journal =& Request::getJournal();
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $reviewForm =& $reviewFormDao->getReviewForm($this->reviewFormId, ASSOC_TYPE_JOURNAL, $journal->getId());
     $reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
     $reviewFormElements =& $reviewFormElementDao->getReviewFormElements($this->reviewFormId);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses =& $reviewFormResponseDao->getReviewReviewFormResponseValues($this->reviewId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($this->reviewId);
     $sectionDecisionDao =& DAORegistry::getDAO('SectionDecisionDAO');
     $sectionDecision =& $sectionDecisionDao->getSectionDecision($reviewAssignment->getDecisionId());
     $editorPreview = Request::getRequestedPage() != 'reviewer';
     if (!$editorPreview) {
         ReviewerHandler::setupTemplate(true, 0, $sectionDecision->getArticleId());
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageTitle', 'submission.reviewFormResponse');
     $templateMgr->assign_by_ref('reviewForm', $reviewForm);
     $templateMgr->assign('reviewFormElements', $reviewFormElements);
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewId', $this->reviewId);
     $templateMgr->assign('articleId', $sectionDecision->getArticleId());
     $templateMgr->assign('isLocked', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
     $templateMgr->assign('editorPreview', $editorPreview);
     parent::display();
 }
예제 #4
0
 /** TODO:
  * (non-PHPdoc)
  * @see PKPHandler::validate()
  */
 function validate($meetingId)
 {
     parent::validate();
     $meetingDao =& DAORegistry::getDAO('MeetingDAO');
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $isValid = true;
     $newKey = Request::getUserVar('key');
     $meeting =& $meetingDao->getMeetingByMeetingAndUserId($meetingId, $user->getId());
     if (!$meeting) {
         $isValid = false;
     } elseif ($user && empty($newKey)) {
         $metingAttendance = $meeting->getMeetingAttendanceOfUser($user->getId());
         if (!$metingAttendance) {
             $isValid = false;
         }
     } else {
         //$user =& MeetingReviewerHandler::validateAccessKey($meeting->getUserId(), $meetingId, $newKey);
         if (!$user) {
             $isValid = false;
         }
     }
     if (!$isValid) {
         Request::redirect(null, Request::getRequestedPage());
     }
     $sectionDecisions = array();
     $reviewIds = array();
     $map = array();
     $meetingSectionDecisionDao =& DAORegistry::getDAO('MeetingSectionDecisionDAO');
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $sectionDecisionDao =& DAORegistry::getDAO('SectionDecisionDAO');
     $mSectionDecisions = $meetingSectionDecisionDao->getMeetingSectionDecisionsByMeetingId($meeting->getId());
     foreach ($mSectionDecisions as $mSectionDecision) {
         $sectionDecision = $sectionDecisionDao->getSectionDecision($mSectionDecision->getSectionDecisionId());
         if ($reviewAssignmentDao->assignmentExistsByArticleAndReviewerId($user->getId(), $sectionDecision->getArticleId())) {
             $map[$mSectionDecision->getSectionDecisionId()] = $sectionDecision->getArticleId();
         }
         array_push($sectionDecisions, $sectionDecision);
     }
     $this->decisionReviewMap =& $map;
     $this->sectionDecisions =& $sectionDecisions;
     $this->meeting =& $meeting;
     $this->user =& $user;
     return true;
 }
 /**
  * Constructor
  */
 function SubmissionCommentsHandler()
 {
     parent::ReviewerHandler();
 }
 /**
  * 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()));
     }
 }
 /**
  * Constructor
  **/
 function SubmissionReviewHandler()
 {
     parent::ReviewerHandler();
 }
 /**
  * Upload the reviewer's annotated version of an article.
  */
 function uploadReviewerVersion()
 {
     $reviewId = Request::getUserVar('reviewId');
     list($journal, $reviewerSubmission) = SubmissionReviewHandler::validate($reviewId);
     ReviewerHandler::setupTemplate(true);
     ReviewerAction::uploadReviewerVersion($reviewId);
     Request::redirect(null, null, 'submission', $reviewId);
 }
 /**
  * Constructor
  **/
 function ProposalFromMeetingReviewerHandler()
 {
     parent::ReviewerHandler();
     $this->addCheck(new HandlerValidatorJournal($this));
     $this->addCheck(new HandlerValidatorRoles($this, true, null, null, array(ROLE_ID_REVIEWER)));
 }
 /**
  * @see PKPHandler::authorize()
  * @param $request PKPRequest
  * @param $args array
  * @param $roleAssignments array
  */
 function authorize(&$request, $args, $roleAssignments)
 {
     import('classes.security.authorization.OmpSubmissionAccessPolicy');
     $this->addPolicy(new OmpSubmissionAccessPolicy($request, $args, $roleAssignments));
     return parent::authorize($request, $args, $roleAssignments);
 }
 /**
  * Handle validation of incoming requests.
  * @param $request PKPRequest
  * @param $reviewId int
  * @param $commentId int optional
  */
 function validate($request, $reviewId, $commentId = null)
 {
     parent::validate($request, $reviewId);
     if ($commentId !== null) {
         // Bug #8863: Can't call normal addCheck b/c of one-click reviewer
         // access bypassing normal validation tools (no Request::getUser)
         $check = new HandlerValidatorSubmissionComment($this, $commentId, $this->user);
         if (!$check->isValid()) {
             $request->redirect(null, null, 'index');
         }
     }
 }