function submissionReview($args) { $articleId = isset($args[0]) ? (int) $args[0] : 0; $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW); $journal =& Request::getJournal(); $submission =& $this->submission; $this->setupTemplate(1, $articleId); $user =& Request::getUser(); Locale::requireComponents(array(LOCALE_COMPONENT_OJS_MANAGER)); $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO'); $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO'); $sectionDao =& DAORegistry::getDAO('SectionDAO'); $sections =& $sectionDao->getJournalSections($journal->getId()); $sectionDecisionDao =& DAORegistry::getDAO("SectionDecisionDAO"); $lastDecision = $sectionDecisionDao->getLastSectionDecision($articleId); $reviewAssignments =& $lastDecision->getReviewAssignments(); $articleMoreRecent = strtotime($submission->getLastModified()) > strtotime($lastDecision->getDateDecided()) ? true : false; $approvalNoticeDao =& DAORegistry::getDAO("ApprovalNoticeDAO"); $templates =& $approvalNoticeDao->getApprovalNoticesByCommitteeAndTypeId($lastDecision->getSectionId(), $lastDecision->getReviewType()); // Prepare an array to store the 'Notify Reviewer' email logs $notifyReviewerLogs = array(); foreach ($reviewAssignments as $reviewAssignment) { $notifyReviewerLogs[$reviewAssignment->getId()] = array(); } // Parse the list of email logs and populate the array. import('classes.article.log.ArticleLog'); $emailLogEntries =& ArticleLog::getEmailLogEntries($articleId); foreach ($emailLogEntries->toArray() as $emailLog) { if ($emailLog->getEventType() == ARTICLE_EMAIL_REVIEW_NOTIFY_REVIEWER) { if (isset($notifyReviewerLogs[$emailLog->getAssocId()]) && is_array($notifyReviewerLogs[$emailLog->getAssocId()])) { array_push($notifyReviewerLogs[$emailLog->getAssocId()], $emailLog); } } } $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO'); $reviewFormResponses = array(); $reviewFormTitles = array(); foreach ($reviewAssignments as $reviewAssignment) { $reviewForm =& $reviewFormDao->getReviewForm($reviewAssignment->getReviewFormId()); if ($reviewForm) { $reviewFormTitles[$reviewForm->getId()] = $reviewForm->getLocalizedTitle(); } unset($reviewForm); $reviewFormResponses[$reviewAssignment->getId()] = $reviewFormResponseDao->reviewFormResponseExists($reviewAssignment->getId()); } $ercReviewersDao =& DAORegistry::getDAO('ErcReviewersDAO'); $ercReviewers =& $ercReviewersDao->getReviewersBySectionId($journal->getId(), $lastDecision->getSectionId()); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('articleId', $submission->getArticleId()); $templateMgr->assign('scientificTitle', $submission->getScientificTitle()); $templateMgr->assign('submitter', $submission->getUser()); $templateMgr->assign('commentsToEditor', $submission->getCommentsToEditor()); $templateMgr->assign('dateSubmitted', $submission->getDateSubmitted()); $templateMgr->assign('proposalStatus', $submission->getSubmissionStatus()); $templateMgr->assign('withdrawComments', $submission->getWithdrawComments('en_US')); $templateMgr->assign('withdrawReason', $submission->getWithdrawReason('en_US')); $templateMgr->assign_by_ref('reviewers', $ercReviewers); $templateMgr->assign('proposalId', $submission->getProposalId()); $templateMgr->assign_by_ref('reviewAssignmentCount', count($reviewAssignments)); $templateMgr->assign_by_ref('reviewIndexes', $reviewAssignmentDao->getReviewIndexesForDecision($lastDecision->getId())); $templateMgr->assign_by_ref('reviewAssignments', $reviewAssignments); $templateMgr->assign('reviewFormResponses', $reviewFormResponses); $templateMgr->assign('reviewFormTitles', $reviewFormTitles); $templateMgr->assign('sectionId', $submission->getSectionId()); $templateMgr->assign('templates', $templates); $templateMgr->assign_by_ref('notifyReviewerLogs', $notifyReviewerLogs); $templateMgr->assign_by_ref('submissionFile', $submission->getSubmissionFile()); $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles()); $templateMgr->assign_by_ref('reportFiles', $submission->getReportFiles()); $templateMgr->assign_by_ref('saeFiles', $submission->getSAEFiles()); $templateMgr->assign_by_ref('reviewFile', $submission->getReviewFile()); $templateMgr->assign_by_ref('previousFiles', $submission->getPreviousFiles()); $templateMgr->assign_by_ref('copyeditFile', $submission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL')); $templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile()); $templateMgr->assign_by_ref('editorFile', $submission->getEditorFile()); $templateMgr->assign_by_ref('sectionDecisions', $submission->getDecisions()); $templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality')); $templateMgr->assign_by_ref('sections', $sections->toArray()); $sectionDecisions = SectionEditorSubmission::getEditorDecisionOptions(); $templateMgr->assign('sectionDecisionOptions', $sectionDecisions); import('classes.submission.common.Action'); unset($sectionDecisions[SUBMISSION_SECTION_DECISION_DECLINED]); $templateMgr->assign('sectionDecisionOptionsWithoutDeclined', $sectionDecisions); $templateMgr->assign('initialReviewOptions', SectionEditorSubmission::getInitialReviewOptions()); $reviewOptions = SectionEditorSubmission::getReviewOptions(); $templateMgr->assign('reviewOptions', $reviewOptions); unset($reviewOptions[SUBMISSION_SECTION_DECISION_EXEMPTED]); $templateMgr->assign('reviewOptionsWithoutExempted', $reviewOptions); $templateMgr->assign('continuingReviewOptions', SectionEditorSubmission::getContinuingReviewOptions()); $templateMgr->assign('articleMoreRecent', $articleMoreRecent); $templateMgr->assign('lastDecision', $lastDecision); import('classes.submission.reviewAssignment.ReviewAssignment'); $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions()); $templateMgr->assign_by_ref('reviewerRatingOptions', ReviewAssignment::getReviewerRatingOptions()); // Set up required Payment Related Information import('classes.payment.ojs.OJSPaymentManager'); $paymentManager =& OJSPaymentManager::getManager(); if ($paymentManager->submissionEnabled() || $paymentManager->fastTrackEnabled() || $paymentManager->publicationEnabled()) { $templateMgr->assign('authorFees', true); $completedPaymentDAO =& DAORegistry::getDAO('OJSCompletedPaymentDAO'); if ($paymentManager->submissionEnabled()) { $templateMgr->assign_by_ref('submissionPayment', $completedPaymentDAO->getSubmissionCompletedPayment($journal->getId(), $articleId)); } if ($paymentManager->fastTrackEnabled()) { $templateMgr->assign_by_ref('fastTrackPayment', $completedPaymentDAO->getFastTrackCompletedPayment($journal->getId(), $articleId)); } if ($paymentManager->publicationEnabled()) { $templateMgr->assign_by_ref('publicationPayment', $completedPaymentDAO->getPublicationCompletedPayment($journal->getId(), $articleId)); } } $templateMgr->assign_by_ref('userId', $user->getId()); $templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole.review'); $templateMgr->display('sectionEditor/submissionReview.tpl'); }