本文整理汇总了PHP中SectionEditorAction::recordDecision方法的典型用法代码示例。如果您正苦于以下问题:PHP SectionEditorAction::recordDecision方法的具体用法?PHP SectionEditorAction::recordDecision怎么用?PHP SectionEditorAction::recordDecision使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SectionEditorAction
的用法示例。
在下文中一共展示了SectionEditorAction::recordDecision方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
$meeting =& $this->meeting;
$submission =& $this->submission;
$decision = $this->getData('decision');
$sectionDecisionDao =& DAORegistry::getDAO("SectionDecisionDAO");
$previousDecision =& $sectionDecisionDao->getLastSectionDecision($submission->getId());
$dateDecided = $meeting->getDate();
switch ($decision) {
case SUBMISSION_SECTION_DECISION_APPROVED:
case SUBMISSION_SECTION_DECISION_RESUBMIT:
case SUBMISSION_SECTION_DECISION_DECLINED:
SectionEditorAction::recordDecision($submission, $decision, REVIEW_TYPE_PR, $previousDecision->getRound(), null, $dateDecided, $previousDecision->getId());
break;
}
}
示例2: execute
//.........这里部分代码省略.........
/* @var $authorDao AuthorDAO */
$authorDao->insertObject($author);
}
}
}
// Add the submission files as galleys
import('lib.pkp.classes.file.TemporaryFileManager');
import('classes.file.ArticleFileManager');
$tempFileIds = $this->getData('tempFileId');
$temporaryFileManager = new TemporaryFileManager();
$articleFileManager = new ArticleFileManager($articleId);
$designatedPrimary = false;
foreach (array_keys($tempFileIds) as $locale) {
$temporaryFile = $temporaryFileManager->getFile($tempFileIds[$locale], $user->getId());
$fileId = null;
if ($temporaryFile) {
$fileId = $articleFileManager->temporaryFileToArticleFile($temporaryFile, SUBMISSION_FILE_SUBMISSION);
$fileType = $temporaryFile->getFileType();
if (strstr($fileType, 'html')) {
import('classes.article.ArticleHTMLGalley');
$galley = new ArticleHTMLGalley();
} else {
import('classes.article.ArticleGalley');
$galley = new ArticleGalley();
}
$galley->setArticleId($articleId);
$galley->setFileId($fileId);
$galley->setLocale($locale);
if ($galley->isHTMLGalley()) {
$galley->setLabel('HTML');
} else {
if (strstr($fileType, 'pdf')) {
$galley->setLabel('PDF');
} else {
if (strstr($fileType, 'postscript')) {
$galley->setLabel('Postscript');
} else {
if (strstr($fileType, 'xml')) {
$galley->setLabel('XML');
} else {
$galley->setLabel(__('common.untitled'));
}
}
}
}
$galleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
$galleyDao->insertGalley($galley);
if (!$designatedPrimary) {
$article->setSubmissionFileId($fileId);
if ($locale == $journal->getPrimaryLocale()) {
// Used to make sure that *some* file
// is designated Review Version, but
// preferrably the primary locale.
$designatedPrimary = true;
}
}
}
// Update file search index
import('classes.search.ArticleSearchIndex');
$articleSearchIndex = new ArticleSearchIndex();
if (isset($galley)) {
$articleSearchIndex->articleFileChanged($galley->getArticleId(), SUBMISSION_SEARCH_GALLEY_FILE, $galley->getFileId());
}
$articleSearchIndex->articleChangesFinished();
}
// Designate this as the review version by default.
$authorSubmissionDao = DAORegistry::getDAO('AuthorSubmissionDAO');
$authorSubmission =& $authorSubmissionDao->getAuthorSubmission($articleId);
import('classes.submission.author.AuthorAction');
AuthorAction::designateReviewVersion($authorSubmission, true);
// Accept the submission
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($articleId);
$articleFileManager = new ArticleFileManager($articleId);
import('classes.submission.sectionEditor.SectionEditorAction');
assert(false);
// FIXME: $decisionLabels missing from call below.
SectionEditorAction::recordDecision($this->request, $sectionEditorSubmission, SUBMISSION_EDITOR_DECISION_ACCEPT);
import('classes.author.form.submit.AuthorSubmitForm');
AuthorSubmitForm::assignEditors($article);
$articleDao->updateObject($article);
// Add to end of editing queue
import('classes.submission.editor.EditorAction');
if (isset($galley)) {
EditorAction::expediteSubmission($article, $this->request);
}
if ($this->getData('destination') == "issue") {
// Add to an existing issue
$issueId = $this->getData('issueId');
$this->scheduleForPublication($articleId, $issueId);
}
// Import the references list.
$citationDao = DAORegistry::getDAO('CitationDAO');
$rawCitationList = $article->getCitations();
$citationDao->importCitations($request, ASSOC_TYPE_ARTICLE, $articleId, $rawCitationList);
// Index article.
import('classes.search.ArticleSearchIndex');
$articleSearchIndex = new ArticleSearchIndex();
$articleSearchIndex->articleMetadataChanged($article);
$articleSearchIndex->articleChangesFinished();
}
示例3: expediteSubmission
/**
* Rush a new submission into the end of the editing queue.
* @param $article object
*/
function expediteSubmission($article)
{
$user =& Request::getUser();
import('submission.editor.EditorAction');
import('submission.sectionEditor.SectionEditorAction');
import('submission.proofreader.ProofreaderAction');
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getArticleId());
$submissionFile = $sectionEditorSubmission->getSubmissionFile();
// Add a long entry before doing anything.
import('article.log.ArticleLog');
import('article.log.ArticleEventLogEntry');
ArticleLog::logEvent($article->getArticleId(), ARTICLE_LOG_EDITOR_EXPEDITE, ARTICLE_LOG_TYPE_EDITOR, $user->getUserId(), 'log.editor.submissionExpedited', array('editorName' => $user->getFullName(), 'articleId' => $article->getArticleId()));
// 1. Ensure that an editor is assigned.
$editAssignments =& $sectionEditorSubmission->getEditAssignments();
if (empty($editAssignments)) {
// No editors are currently assigned; assign self.
EditorAction::assignEditor($article->getArticleId(), $user->getUserId(), true);
}
// 2. Accept the submission and send to copyediting.
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getArticleId());
if (!$sectionEditorSubmission->getCopyeditFile()) {
SectionEditorAction::recordDecision($sectionEditorSubmission, SUBMISSION_EDITOR_DECISION_ACCEPT);
$reviewFile = $sectionEditorSubmission->getReviewFile();
SectionEditorAction::setCopyeditFile($sectionEditorSubmission, $reviewFile->getFileId(), $reviewFile->getRevision());
}
// 3. Add a galley.
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getArticleId());
$galleys =& $sectionEditorSubmission->getGalleys();
if (empty($galleys)) {
// No galley present -- use copyediting file.
import('file.ArticleFileManager');
$copyeditFile =& $sectionEditorSubmission->getCopyeditFile();
$fileType = $copyeditFile->getFileType();
$articleFileManager =& new ArticleFileManager($article->getArticleId());
$fileId = $articleFileManager->copyPublicFile($copyeditFile->getFilePath(), $fileType);
if (strstr($fileType, 'html')) {
$galley =& new ArticleHTMLGalley();
} else {
$galley =& new ArticleGalley();
}
$galley->setArticleId($article->getArticleId());
$galley->setFileId($fileId);
$galley->setLocale(Locale::getLocale());
if ($galley->isHTMLGalley()) {
$galley->setLabel('HTML');
} else {
if (strstr($fileType, 'pdf')) {
$galley->setLabel('PDF');
} else {
if (strstr($fileType, 'postscript')) {
$galley->setLabel('Postscript');
} else {
if (strstr($fileType, 'xml')) {
$galley->setLabel('XML');
} else {
$galley->setLabel(Locale::translate('common.untitled'));
}
}
}
}
$galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
$galleyDao->insertGalley($galley);
}
$sectionEditorSubmission->setStatus(STATUS_QUEUED);
$sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);
}
示例4: recordDecision
function recordDecision()
{
$articleId = Request::getUserVar('articleId');
list($journal, $submission) = SubmissionEditHandler::validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$decision = Request::getUserVar('decision');
switch ($decision) {
case SUBMISSION_EDITOR_DECISION_ACCEPT:
case SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS:
case SUBMISSION_EDITOR_DECISION_RESUBMIT:
case SUBMISSION_EDITOR_DECISION_DECLINE:
SectionEditorAction::recordDecision($submission, $decision);
break;
}
Request::redirect(null, null, 'submissionReview', $articleId);
}
示例5: recordDecision
function recordDecision()
{
$articleId = Request::getUserVar('articleId');
$this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$submission =& $this->submission;
$decision = Request::getUserVar('decision');
//%CBP% set the editr attention request, if a workshop, to 0 (because editor attention has been made)
$CBPPlatformDao =& DAORegistry::getDAO('CBPPlatformDAO');
$CBPPlatformDao->setEditorAttentionComplete($articleId);
switch ($decision) {
case SUBMISSION_EDITOR_DECISION_ACCEPT:
//%CBP% If the submission has been accepted, automatically create a galley version from the lastest file iteration
$articleFile = $CBPPlatformDao->getMostRecentReviewFile($articleId);
$CBPPlatformDao->setArticleGalley($articleId, $articleFile['file_id']);
case SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS:
case SUBMISSION_EDITOR_DECISION_RESUBMIT:
case SUBMISSION_EDITOR_DECISION_DECLINE:
SectionEditorAction::recordDecision($submission, $decision);
break;
}
Request::redirect(null, null, 'submissionReview', $articleId);
}
示例6: expediteSubmission
/**
* Rush a new submission into the end of the editing queue.
* @param $article object
*/
function expediteSubmission($article, $request)
{
$user =& $request->getUser();
import('classes.submission.editor.EditorAction');
import('classes.submission.sectionEditor.SectionEditorAction');
import('classes.submission.proofreader.ProofreaderAction');
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getId());
$submissionFile = $sectionEditorSubmission->getSubmissionFile();
// Add a log entry before doing anything.
import('classes.article.log.ArticleLog');
import('classes.article.log.ArticleEventLogEntry');
ArticleLog::logEvent($request, $article, ARTICLE_LOG_EDITOR_EXPEDITE, 'log.editor.submissionExpedited', array('editorName' => $user->getFullName()));
// 1. Ensure that an editor is assigned.
$editAssignments =& $sectionEditorSubmission->getEditAssignments();
if (empty($editAssignments)) {
// No editors are currently assigned; assign self.
EditorAction::assignEditor($article->getId(), $user->getId(), true, false, $request);
}
// 2. Accept the submission and send to copyediting.
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getId());
if (!$sectionEditorSubmission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL', true)) {
SectionEditorAction::recordDecision($sectionEditorSubmission, SUBMISSION_EDITOR_DECISION_ACCEPT, $request);
$reviewFile = $sectionEditorSubmission->getReviewFile();
SectionEditorAction::setCopyeditFile($sectionEditorSubmission, $reviewFile->getFileId(), $reviewFile->getRevision(), $request);
}
// 3. Add a galley.
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getId());
$galleys =& $sectionEditorSubmission->getGalleys();
if (empty($galleys)) {
// No galley present -- use copyediting file.
import('classes.file.ArticleFileManager');
$copyeditFile =& $sectionEditorSubmission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL');
$fileType = $copyeditFile->getFileType();
$articleFileManager = new ArticleFileManager($article->getId());
$fileId = $articleFileManager->copyPublicFile($copyeditFile->getFilePath(), $fileType);
if (strstr($fileType, 'html')) {
$galley = new ArticleHTMLGalley();
} else {
$galley = new ArticleGalley();
}
$galley->setArticleId($article->getId());
$galley->setFileId($fileId);
$galley->setLocale(AppLocale::getLocale());
if ($galley->isHTMLGalley()) {
$galley->setLabel('HTML');
} else {
if (strstr($fileType, 'pdf')) {
$galley->setLabel('PDF');
} else {
if (strstr($fileType, 'postscript')) {
$galley->setLabel('Postscript');
} else {
if (strstr($fileType, 'xml')) {
$galley->setLabel('XML');
} else {
$galley->setLabel(__('common.untitled'));
}
}
}
}
$galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
$galleyDao->insertGalley($galley);
// Update file search index
import('classes.search.ArticleSearchIndex');
ArticleSearchIndex::updateFileIndex($article->getId(), ARTICLE_SEARCH_GALLEY_FILE, $fileId);
}
$sectionEditorSubmission->setStatus(STATUS_QUEUED);
$sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);
}
示例7: execute
//.........这里部分代码省略.........
foreach (array_keys($tempFileIds) as $locale) {
$temporaryFile = $temporaryFileManager->getFile($tempFileIds[$locale], $user->getId());
$fileId = null;
if ($temporaryFile) {
$fileId = $articleFileManager->temporaryFileToArticleFile($temporaryFile, ARTICLE_FILE_SUBMISSION);
$fileType = $temporaryFile->getFileType();
if (strstr($fileType, 'html')) {
import('classes.article.ArticleHTMLGalley');
$galley = new ArticleHTMLGalley();
} else {
import('classes.article.ArticleGalley');
$galley = new ArticleGalley();
}
$galley->setArticleId($articleId);
$galley->setFileId($fileId);
$galley->setLocale($locale);
if ($galley->isHTMLGalley()) {
$galley->setLabel('HTML');
} else {
if (strstr($fileType, 'pdf')) {
$galley->setLabel('PDF');
} else {
if (strstr($fileType, 'postscript')) {
$galley->setLabel('Postscript');
} else {
if (strstr($fileType, 'xml')) {
$galley->setLabel('XML');
} else {
$galley->setLabel(__('common.untitled'));
}
}
}
}
$galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
$galleyDao->insertGalley($galley);
}
if ($locale == $journal->getPrimaryLocale()) {
$article->setSubmissionFileId($fileId);
$article->SetReviewFileId($fileId);
}
// Update file search index
import('classes.search.ArticleSearchIndex');
if (isset($galley)) {
ArticleSearchIndex::updateFileIndex($galley->getArticleId(), ARTICLE_SEARCH_GALLEY_FILE, $galley->getFileId());
}
}
// Designate this as the review version by default.
$authorSubmissionDao =& DAORegistry::getDAO('AuthorSubmissionDAO');
$authorSubmission =& $authorSubmissionDao->getAuthorSubmission($articleId);
import('classes.submission.author.AuthorAction');
AuthorAction::designateReviewVersion($authorSubmission, true);
// Accept the submission
$sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($articleId);
$articleFileManager = new ArticleFileManager($articleId);
$sectionEditorSubmission->setReviewFile($articleFileManager->getFile($article->getSubmissionFileId()));
import('classes.submission.sectionEditor.SectionEditorAction');
SectionEditorAction::recordDecision($sectionEditorSubmission, SUBMISSION_EDITOR_DECISION_ACCEPT);
// Create signoff infrastructure
$copyeditInitialSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $articleId);
$copyeditAuthorSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $articleId);
$copyeditFinalSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $articleId);
$copyeditInitialSignoff->setUserId(0);
$copyeditAuthorSignoff->setUserId($user->getId());
$copyeditFinalSignoff->setUserId(0);
$signoffDao->updateObject($copyeditInitialSignoff);
$signoffDao->updateObject($copyeditAuthorSignoff);
$signoffDao->updateObject($copyeditFinalSignoff);
$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
$layoutSignoff->setUserId(0);
$signoffDao->updateObject($layoutSignoff);
$proofAuthorSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_AUTHOR', ASSOC_TYPE_ARTICLE, $articleId);
$proofProofreaderSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
$proofLayoutEditorSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
$proofAuthorSignoff->setUserId($user->getId());
$proofProofreaderSignoff->setUserId(0);
$proofLayoutEditorSignoff->setUserId(0);
$signoffDao->updateObject($proofAuthorSignoff);
$signoffDao->updateObject($proofProofreaderSignoff);
$signoffDao->updateObject($proofLayoutEditorSignoff);
import('classes.author.form.submit.AuthorSubmitForm');
AuthorSubmitForm::assignEditors($article);
$articleDao->updateArticle($article);
// Add to end of editing queue
import('classes.submission.editor.EditorAction');
if (isset($galley)) {
EditorAction::expediteSubmission($article);
}
if ($this->getData('destination') == "issue") {
// Add to an existing issue
$issueId = $this->getData('issueId');
$this->scheduleForPublication($articleId, $issueId);
}
// Index article.
import('classes.search.ArticleSearchIndex');
ArticleSearchIndex::indexArticleMetadata($article);
// Import the references list.
$citationDao =& DAORegistry::getDAO('CitationDAO');
$rawCitationList = $article->getCitations();
$citationDao->importCitations($request, ASSOC_TYPE_ARTICLE, $articleId, $rawCitationList);
}
示例8: recordDecision
/**
* Record an editor decision
* @param $args array
* @param $request object
*/
function recordDecision($args, $request)
{
$articleId = $request->getUserVar('articleId');
$this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$submission =& $this->submission;
$decision = $request->getUserVar('decision');
switch ($decision) {
case SUBMISSION_EDITOR_DECISION_ACCEPT:
case SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS:
case SUBMISSION_EDITOR_DECISION_RESUBMIT:
case SUBMISSION_EDITOR_DECISION_DECLINE:
SectionEditorAction::recordDecision($submission, $decision, $request);
break;
}
$request->redirect(null, null, 'submissionReview', $articleId);
}
示例9: recordDecision
/**
* 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;
}
}