/** * @copydoc Form::execute() */ function execute($args, $request) { // Retrieve the submission. $submission = $this->getSubmission(); // Get this form decision actions labels. $actionLabels = EditorDecisionActionsManager::getActionLabels($this->_getDecisions()); // Record the decision. $reviewRound = $this->getReviewRound(); $decision = $this->getDecision(); $stageId = $this->getStageId(); import('lib.pkp.classes.submission.action.EditorAction'); $editorAction = new EditorAction(); $editorAction->recordDecision($request, $submission, $decision, $actionLabels, $reviewRound, $stageId); // Identify email key and status of round. switch ($decision) { case SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS: $emailKey = 'EDITOR_DECISION_REVISIONS'; $status = REVIEW_ROUND_STATUS_REVISIONS_REQUESTED; break; case SUBMISSION_EDITOR_DECISION_RESUBMIT: $emailKey = 'EDITOR_DECISION_RESUBMIT'; $status = REVIEW_ROUND_STATUS_RESUBMITTED; break; case SUBMISSION_EDITOR_DECISION_DECLINE: $emailKey = 'SUBMISSION_UNSUITABLE'; $status = REVIEW_ROUND_STATUS_DECLINED; break; default: fatalError('Unsupported decision!'); } $this->_updateReviewRoundStatus($submission, $status, $reviewRound); // Send email to the author. $this->_sendReviewMailToAuthor($submission, $emailKey, $request); }
/** * @copydoc Form::execute() */ function execute($args, $request) { // Retrieve the submission. $submission = $this->getSubmission(); // Record the decision. import('classes.workflow.EditorDecisionActionsManager'); $actionLabels = EditorDecisionActionsManager::getActionLabels(array($this->_decision)); import('lib.pkp.classes.submission.action.EditorAction'); $editorAction = new EditorAction(); $editorAction->recordDecision($request, $submission, $this->_decision, $actionLabels); // Move to the internal review stage. $editorAction->incrementWorkflowStage($submission, WORKFLOW_STAGE_ID_EXTERNAL_REVIEW, $request); // Create an initial internal review round. $this->_initiateReviewRound($submission, WORKFLOW_STAGE_ID_EXTERNAL_REVIEW, $request, REVIEW_ROUND_STATUS_PENDING_REVIEWERS); }
/** * @copydoc Form::execute() * @return integer The new review round number */ function execute($args, $request) { // Retrieve the submission. $submission = $this->getSubmission(); // Get this form decision actions labels. $actionLabels = EditorDecisionActionsManager::getActionLabels($this->_getDecisions()); // Record the decision. $reviewRound = $this->getReviewRound(); import('lib.pkp.classes.submission.action.EditorAction'); $editorAction = new EditorAction(); $editorAction->recordDecision($request, $submission, SUBMISSION_EDITOR_DECISION_RESUBMIT, $actionLabels, $reviewRound); // Update the review round status. $reviewRoundDao = DAORegistry::getDAO('ReviewRoundDAO'); $reviewRoundDao->updateStatus($reviewRound, null, REVIEW_ROUND_STATUS_RESUBMITTED); // Create a new review round. $newRound = $this->_initiateReviewRound($submission, $submission->getStageId(), $request, REVIEW_ROUND_STATUS_PENDING_REVIEWERS); return $newRound; }
/** * @copydoc Form::execute() */ function execute($args, $request) { // Retrieve the submission. $submission = $this->getSubmission(); // Get this form decision actions labels. $actionLabels = EditorDecisionActionsManager::getActionLabels($this->_getDecisions()); // Record the decision. $reviewRound = $this->getReviewRound(); $decision = $this->getDecision(); import('lib.pkp.classes.submission.action.EditorAction'); $editorAction = new EditorAction(); $editorAction->recordDecision($request, $submission, $decision, $actionLabels, $reviewRound); // Identify email key and status of round. import('lib.pkp.classes.file.SubmissionFileManager'); $submissionFileManager = new SubmissionFileManager($submission->getContextId(), $submission->getId()); switch ($decision) { case SUBMISSION_EDITOR_DECISION_ACCEPT: $emailKey = 'EDITOR_DECISION_ACCEPT'; $status = REVIEW_ROUND_STATUS_ACCEPTED; $this->_updateReviewRoundStatus($submission, $status, $reviewRound); // Move to the editing stage. $editorAction->incrementWorkflowStage($submission, WORKFLOW_STAGE_ID_EDITING, $request); // Bring in the SUBMISSION_FILE_* constants. import('lib.pkp.classes.submission.SubmissionFile'); // Bring in the Manager (we need it). import('lib.pkp.classes.file.SubmissionFileManager'); $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */ $selectedFiles = $this->getData('selectedFiles'); if (is_array($selectedFiles)) { foreach ($selectedFiles as $fileId) { $revisionNumber = $submissionFileDao->getLatestRevisionNumber($fileId); $submissionFileManager->copyFileToFileStage($fileId, $revisionNumber, SUBMISSION_FILE_FINAL, null, true); } } // Send email to the author. $this->_sendReviewMailToAuthor($submission, $emailKey, $request); break; case SUBMISSION_EDITOR_DECISION_EXTERNAL_REVIEW: $emailKey = 'EDITOR_DECISION_SEND_TO_EXTERNAL'; $status = REVIEW_ROUND_STATUS_SENT_TO_EXTERNAL; $this->_updateReviewRoundStatus($submission, $status, $reviewRound); // Move to the external review stage. $editorAction->incrementWorkflowStage($submission, WORKFLOW_STAGE_ID_EXTERNAL_REVIEW, $request); // Create an initial external review round. $this->_initiateReviewRound($submission, WORKFLOW_STAGE_ID_EXTERNAL_REVIEW, $request, REVIEW_ROUND_STATUS_PENDING_REVIEWERS); // Send email to the author. $this->_sendReviewMailToAuthor($submission, $emailKey, $request); break; case SUBMISSION_EDITOR_DECISION_SEND_TO_PRODUCTION: $emailKey = 'EDITOR_DECISION_SEND_TO_PRODUCTION'; // FIXME: this is copy-pasted from above, save the FILE_GALLEY. // Move to the editing stage. $editorAction->incrementWorkflowStage($submission, WORKFLOW_STAGE_ID_PRODUCTION, $request); // Bring in the SUBMISSION_FILE_* constants. import('lib.pkp.classes.submission.SubmissionFile'); // Bring in the Manager (we need it). import('lib.pkp.classes.file.SubmissionFileManager'); // Move the revisions to the next stage $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */ $selectedFiles = $this->getData('selectedFiles'); if (is_array($selectedFiles)) { foreach ($selectedFiles as $fileId) { $revisionNumber = $submissionFileDao->getLatestRevisionNumber($fileId); $submissionFileManager->copyFileToFileStage($fileId, $revisionNumber, SUBMISSION_FILE_PRODUCTION_READY); } } // Send email to the author. $this->_sendReviewMailToAuthor($submission, $emailKey, $request); break; default: fatalError('Unsupported decision!'); } }