function emailEditorDecisionComment() { import('pages.sectionEditor.SubmissionCommentsHandler'); SubmissionCommentsHandler::emailEditorDecisionComment(); }
/** * Record editor decision (Added additional editor decision cases) * Edited by aglet * Last Update: 5/5/2011 */ function recordDecision() { $articleId = Request::getUserVar('articleId'); $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW); $submission =& $this->submission; $approvalDate = Request::getUserVar('approvalDate'); $decision = Request::getUserVar('decision'); $previousDecision =& $submission->getLastSectionDecision(); $pastDecisionResult = $previousDecision->getDecision(); //pass lastDecisionId of this article to update existing row in section_decisions if (isset($previousDecision)) { if ($pastDecisionResult == SUBMISSION_SECTION_DECISION_APPROVED || $pastDecisionResult == SUBMISSION_SECTION_DECISION_RESUBMIT || $pastDecisionResult == SUBMISSION_SECTION_DECISION_DECLINED || $pastDecisionResult == SUBMISSION_SECTION_DECISION_EXEMPTED && $previousDecision->getComments() || $pastDecisionResult == SUBMISSION_SECTION_DECISION_DONE) { $lastDecisionId = null; } else { $lastDecisionId = $previousDecision->getId(); } } else { $lastDecisionId = null; } $comments = null; if ($pastDecisionResult == SUBMISSION_SECTION_DECISION_EXEMPTED) { $selectedReasons = Request::getUserVar('exemptionReasons'); if (isset($selectedReasons)) { $decision = SUBMISSION_SECTION_DECISION_EXEMPTED; $reasons = 0; foreach ($selectedReasons as $reason) { $reasons = $reasons + (int) $reason; } $comments = $reasons; } } $fileName = "finalDecisionFile"; if (($pastDecisionResult == SUBMISSION_SECTION_DECISION_EXPEDITED || $pastDecisionResult == SUBMISSION_SECTION_DECISION_FULL_REVIEW || $pastDecisionResult == SUBMISSION_SECTION_DECISION_EXEMPTED && !$previousDecision->getComments()) && isset($_FILES[$fileName])) { if (SectionEditorAction::uploadDecisionFile($articleId, $fileName, $submission->getLastSectionDecisionId()) == '0' && $previousDecision->getReviewType() == INITIAL_REVIEW) { Request::redirect(null, null, 'submissionReview', $articleId); } } switch ($decision) { case SUBMISSION_SECTION_DECISION_APPROVED: case SUBMISSION_SECTION_DECISION_RESUBMIT: case SUBMISSION_SECTION_DECISION_DECLINED: case SUBMISSION_SECTION_DECISION_EXEMPTED: case SUBMISSION_SECTION_DECISION_FULL_REVIEW: case SUBMISSION_SECTION_DECISION_EXPEDITED: case SUBMISSION_SECTION_DECISION_COMPLETE: case SUBMISSION_SECTION_DECISION_INCOMPLETE: case SUBMISSION_SECTION_DECISION_DONE: SectionEditorAction::recordDecision($submission, $decision, $previousDecision->getReviewType(), $previousDecision->getRound(), $comments, $approvalDate, $lastDecisionId); break; } switch ($decision) { case SUBMISSION_SECTION_DECISION_APPROVED: case SUBMISSION_SECTION_DECISION_DECLINED: case SUBMISSION_SECTION_DECISION_INCOMPLETE: case SUBMISSION_SECTION_DECISION_RESUBMIT: case SUBMISSION_SECTION_DECISION_EXEMPTED: SubmissionCommentsHandler::emailEditorDecisionComment($articleId); break; default: Request::redirect(null, null, 'submissionReview', $articleId); break; } }