当前位置: 首页>>代码示例>>PHP>>正文


PHP SectionEditorAction::setDueDate方法代码示例

本文整理汇总了PHP中SectionEditorAction::setDueDate方法的典型用法代码示例。如果您正苦于以下问题:PHP SectionEditorAction::setDueDate方法的具体用法?PHP SectionEditorAction::setDueDate怎么用?PHP SectionEditorAction::setDueDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SectionEditorAction的用法示例。


在下文中一共展示了SectionEditorAction::setDueDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setDueDate

 function setDueDate($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     list($journal, $submission) = SubmissionEditHandler::validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $reviewId = isset($args[1]) ? $args[1] : 0;
     $dueDate = Request::getUserVar('dueDate');
     $numWeeks = Request::getUserVar('numWeeks');
     if ($dueDate != null || $numWeeks != null) {
         SectionEditorAction::setDueDate($articleId, $reviewId, $dueDate, $numWeeks);
         Request::redirect(null, null, 'submissionReview', $articleId);
     } else {
         parent::setupTemplate(true, $articleId, 'review');
         $journal =& Request::getJournal();
         $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
         $reviewAssignment = $reviewAssignmentDao->getReviewAssignmentById($reviewId);
         $settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
         $settings =& $settingsDao->getJournalSettings($journal->getJournalId());
         $templateMgr =& TemplateManager::getManager();
         if ($reviewAssignment->getDateDue() != null) {
             $templateMgr->assign('dueDate', $reviewAssignment->getDateDue());
         }
         $numWeeksPerReview = $settings['numWeeksPerReview'] == null ? 0 : $settings['numWeeksPerReview'];
         $templateMgr->assign('articleId', $articleId);
         $templateMgr->assign('reviewId', $reviewId);
         $templateMgr->assign('todaysDate', date('Y-m-d'));
         $templateMgr->assign('numWeeksPerReview', $numWeeksPerReview);
         $templateMgr->assign('actionHandler', 'setDueDate');
         $templateMgr->display('sectionEditor/setDueDate.tpl');
     }
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:30,代码来源:SubmissionEditHandler.inc.php

示例2: addReviewer

 /**
  * Assigns a reviewer to a submission.
  * @param $sectionEditorSubmission object
  * @param $reviewerId int
  */
 function addReviewer($sectionEditorSubmission, $reviewerId, $round = null)
 {
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $user =& Request::getUser();
     $reviewer =& $userDao->getUser($reviewerId);
     // Check to see if the requested reviewer is not already
     // assigned to review this article.
     if ($round == null) {
         $round = $sectionEditorSubmission->getCurrentRound();
     }
     $assigned = $sectionEditorSubmissionDao->reviewerExists($sectionEditorSubmission->getArticleId(), $reviewerId, $round);
     // Only add the reviewer if he has not already
     // been assigned to review this article.
     if (!$assigned && isset($reviewer) && !HookRegistry::call('SectionEditorAction::addReviewer', array(&$sectionEditorSubmission, $reviewerId))) {
         $reviewAssignment = new ReviewAssignment();
         $reviewAssignment->setReviewerId($reviewerId);
         $reviewAssignment->setDateAssigned(Core::getCurrentDate());
         $reviewAssignment->setRound($round);
         // Assign review form automatically if needed
         $journalId = $sectionEditorSubmission->getJournalId();
         $sectionDao =& DAORegistry::getDAO('SectionDAO');
         $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
         $sectionId = $sectionEditorSubmission->getSectionId();
         $section =& $sectionDao->getSection($sectionId, $journalId);
         if ($section && ($reviewFormId = (int) $section->getReviewFormId())) {
             if ($reviewFormDao->reviewFormExists($reviewFormId, ASSOC_TYPE_JOURNAL, $journalId)) {
                 $reviewAssignment->setReviewFormId($reviewFormId);
             }
         }
         $sectionEditorSubmission->addReviewAssignment($reviewAssignment);
         $sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);
         $reviewAssignment = $reviewAssignmentDao->getReviewAssignment($sectionEditorSubmission->getArticleId(), $reviewerId, $round);
         $journal =& Request::getJournal();
         $settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
         $settings =& $settingsDao->getJournalSettings($journal->getId());
         if (isset($settings['numWeeksPerReview'])) {
             SectionEditorAction::setDueDate($sectionEditorSubmission->getArticleId(), $reviewAssignment->getId(), null, $settings['numWeeksPerReview'], false);
         }
         // Add log
         import('article.log.ArticleLog');
         import('article.log.ArticleEventLogEntry');
         ArticleLog::logEvent($sectionEditorSubmission->getArticleId(), ARTICLE_LOG_REVIEW_ASSIGN, ARTICLE_LOG_TYPE_REVIEW, $reviewAssignment->getId(), 'log.review.reviewerAssigned', array('reviewerName' => $reviewer->getFullName(), 'articleId' => $sectionEditorSubmission->getArticleId(), 'round' => $round));
     }
 }
开发者ID:philschatz,项目名称:ojs,代码行数:51,代码来源:SectionEditorAction.inc.php

示例3: setDueDate

 /**
  * Set the review due date.
  * @param $args array
  * @param $request PKPRequest
  */
 function setDueDate($args, &$request)
 {
     $articleId = (int) array_shift($args);
     $reviewId = (int) array_shift($args);
     $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $submission =& $this->submission;
     $dueDate = $request->getUserVar('dueDate');
     $numWeeks = $request->getUserVar('numWeeks');
     if ($dueDate != null || $numWeeks != null) {
         SectionEditorAction::setDueDate($articleId, $reviewId, $dueDate, $numWeeks, false, $request);
         $request->redirect(null, null, 'submissionReview', $articleId);
     } else {
         $this->setupTemplate(true, $articleId, 'review');
         $journal =& $request->getJournal();
         $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
         $reviewAssignment = $reviewAssignmentDao->getById($reviewId);
         $settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
         $settings =& $settingsDao->getJournalSettings($journal->getId());
         $templateMgr =& TemplateManager::getManager();
         if ($reviewAssignment->getDateDue() != null) {
             $templateMgr->assign('dueDate', $reviewAssignment->getDateDue());
         }
         $numWeeksPerReview = $settings['numWeeksPerReview'] == null ? 0 : $settings['numWeeksPerReview'];
         $templateMgr->assign('articleId', $articleId);
         $templateMgr->assign('reviewId', $reviewId);
         $templateMgr->assign('todaysDate', date('Y-m-d'));
         $templateMgr->assign('numWeeksPerReview', $numWeeksPerReview);
         $templateMgr->assign('actionHandler', 'setDueDate');
         $templateMgr->display('sectionEditor/setDueDate.tpl');
     }
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:36,代码来源:SubmissionEditHandler.inc.php

示例4: setDueDate

 function setDueDate($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $submission =& $this->submission;
     $reviewId = isset($args[1]) ? $args[1] : 0;
     $dueDate = Request::getUserVar('dueDate');
     $numWeeks = Request::getUserVar('numWeeks');
     //		$meetingDate = Request::getUserVar('meetingDate');
     if ($dueDate != null || $numWeeks != null) {
         SectionEditorAction::setDueDate($articleId, $reviewId, $dueDate, $numWeeks);
         Request::redirect(null, null, 'submissionReview', $articleId);
     } else {
         $this->setupTemplate(1, $articleId, 'review');
         $journal =& Request::getJournal();
         $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
         $reviewAssignment = $reviewAssignmentDao->getById($reviewId);
         $settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
         $settings =& $settingsDao->getJournalSettings($journal->getId());
         $templateMgr =& TemplateManager::getManager();
         if ($reviewAssignment->getDateDue() != null) {
             $templateMgr->assign('dueDate', $reviewAssignment->getDateDue());
         }
         //			/** Added by ayveemallare 6/28/2011 */
         //			if ($reviewAssignment->getDateOfMeeting() !=null) {
         //				$templateMgr->assign('meetingDate', $reviewAssignment->getDateOfMeeting());
         //			}
         //			/*************************************/
         $numWeeksPerReview = $settings['numWeeksPerReview'] == null ? 0 : $settings['numWeeksPerReview'];
         $templateMgr->assign('articleId', $articleId);
         $templateMgr->assign('reviewId', $reviewId);
         $templateMgr->assign('todaysDate', date('Y-m-d'));
         $templateMgr->assign('numWeeksPerReview', $numWeeksPerReview);
         $templateMgr->assign('actionHandler', 'setDueDate');
         $templateMgr->display('sectionEditor/setDueDate.tpl');
     }
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:37,代码来源:SubmissionEditHandler.inc.php


注:本文中的SectionEditorAction::setDueDate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。