本文整理汇总了PHP中SectionEditorAction::addReviewer方法的典型用法代码示例。如果您正苦于以下问题:PHP SectionEditorAction::addReviewer方法的具体用法?PHP SectionEditorAction::addReviewer怎么用?PHP SectionEditorAction::addReviewer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SectionEditorAction
的用法示例。
在下文中一共展示了SectionEditorAction::addReviewer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: selectReviewer
function selectReviewer($args)
{
$articleId = isset($args[0]) ? (int) $args[0] : 0;
list($journal, $submission) = SubmissionEditHandler::validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
if (isset($args[1]) && $args[1] != null) {
// Assign reviewer to article
SectionEditorAction::addReviewer($submission, $args[1]);
Request::redirect(null, null, 'submissionReview', $articleId);
// FIXME: Prompt for due date.
} else {
parent::setupTemplate(true, $articleId, 'review');
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$searchType = null;
$searchMatch = null;
$search = $searchQuery = Request::getUserVar('search');
$searchInitial = Request::getUserVar('searchInitial');
if (isset($search)) {
$searchType = Request::getUserVar('searchField');
$searchMatch = Request::getUserVar('searchMatch');
} else {
if (isset($searchInitial)) {
$searchInitial = String::strtoupper($searchInitial);
$searchType = USER_FIELD_INITIAL;
$search = $searchInitial;
}
}
$rangeInfo =& Handler::getRangeInfo('reviewers');
$reviewers = $sectionEditorSubmissionDao->getReviewersForArticle($journal->getJournalId(), $articleId, $submission->getCurrentRound(), $searchType, $search, $searchMatch, $rangeInfo);
$journal = Request::getJournal();
$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('searchField', $searchType);
$templateMgr->assign('searchMatch', $searchMatch);
$templateMgr->assign('search', $searchQuery);
$templateMgr->assign('searchInitial', Request::getUserVar('searchInitial'));
$templateMgr->assign_by_ref('reviewers', $reviewers);
$templateMgr->assign('articleId', $articleId);
$templateMgr->assign('reviewerStatistics', $sectionEditorSubmissionDao->getReviewerStatistics($journal->getJournalId()));
$templateMgr->assign('fieldOptions', array(USER_FIELD_INTERESTS => 'user.interests', USER_FIELD_FIRSTNAME => 'user.firstName', USER_FIELD_LASTNAME => 'user.lastName', USER_FIELD_USERNAME => 'user.username', USER_FIELD_EMAIL => 'user.email'));
$templateMgr->assign('completedReviewCounts', $reviewAssignmentDao->getCompletedReviewCounts($journal->getJournalId()));
$templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
$templateMgr->assign('averageQualityRatings', $reviewAssignmentDao->getAverageQualityRatings($journal->getJournalId()));
$templateMgr->assign('helpTopicId', 'journal.roles.reviewer');
$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
$templateMgr->assign('reviewerDatabaseLinks', $journal->getSetting('reviewerDatabaseLinks'));
$templateMgr->display('sectionEditor/selectReviewer.tpl');
}
}
示例2: resubmitFile
/**
* Resubmit the file for review.
* @param $sectionEditorSubmission object
* @param $fileId int
* @param $revision int
* TODO: SECURITY!
*/
function resubmitFile($sectionEditorSubmission, $fileId, $revision, $request)
{
import('classes.file.ArticleFileManager');
$articleFileManager = new ArticleFileManager($sectionEditorSubmission->getId());
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
$user =& $request->getUser();
if (!HookRegistry::call('SectionEditorAction::resubmitFile', array(&$sectionEditorSubmission, &$fileId, &$revision))) {
// Increment the round
$currentRound = $sectionEditorSubmission->getCurrentRound();
$sectionEditorSubmission->setCurrentRound($currentRound + 1);
$sectionEditorSubmission->stampStatusModified();
// Copy the file from the editor decision file folder to the review file folder
$newFileId = $articleFileManager->copyToReviewFile($fileId, $revision, $sectionEditorSubmission->getReviewFileId());
$newReviewFile = $articleFileDao->getArticleFile($newFileId);
$newReviewFile->setRound($sectionEditorSubmission->getCurrentRound());
$articleFileDao->updateArticleFile($newReviewFile);
// Copy the file from the editor decision file folder to the next-round editor file
// $editorFileId may or may not be null after assignment
$editorFileId = $sectionEditorSubmission->getEditorFileId() != null ? $sectionEditorSubmission->getEditorFileId() : null;
// $editorFileId definitely will not be null after assignment
$editorFileId = $articleFileManager->copyToEditorFile($newFileId, null, $editorFileId);
$newEditorFile = $articleFileDao->getArticleFile($editorFileId);
$newEditorFile->setRound($sectionEditorSubmission->getCurrentRound());
$articleFileDao->updateArticleFile($newEditorFile);
// The review revision is the highest revision for the review file.
$reviewRevision = $articleFileDao->getRevisionNumber($newFileId);
$sectionEditorSubmission->setReviewRevision($reviewRevision);
$sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);
// Now, reassign all reviewers that submitted a review for this new round of reviews.
$previousRound = $sectionEditorSubmission->getCurrentRound() - 1;
foreach ($sectionEditorSubmission->getReviewAssignments($previousRound) as $reviewAssignment) {
if ($reviewAssignment->getRecommendation() !== null && $reviewAssignment->getRecommendation() !== '') {
// Then this reviewer submitted a review.
SectionEditorAction::addReviewer($sectionEditorSubmission, $reviewAssignment->getReviewerId(), $sectionEditorSubmission->getCurrentRound(), $request);
}
}
// Add log
import('classes.article.log.ArticleLog');
ArticleLog::logEvent($request, $sectionEditorSubmission, ARTICLE_LOG_REVIEW_RESUBMIT, 'log.review.resubmit');
}
}
示例3: selectReviewer
/**
* Select a reviewer.
* @param $args array
* @param $request PKPRequest
*/
function selectReviewer($args, &$request)
{
$articleId = (int) array_shift($args);
$reviewerId = (int) array_shift($args);
$this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$journal =& $request->getJournal();
$submission =& $this->submission;
$sort = $request->getUserVar('sort');
$sort = isset($sort) ? $sort : 'reviewerName';
$sortDirection = $request->getUserVar('sortDirection');
$sortDirection = isset($sortDirection) && ($sortDirection == SORT_DIRECTION_ASC || $sortDirection == SORT_DIRECTION_DESC) ? $sortDirection : SORT_DIRECTION_ASC;
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
if ($reviewerId) {
// Assign reviewer to article
SectionEditorAction::addReviewer($submission, $reviewerId, null, $request);
$request->redirect(null, null, 'submissionReview', $articleId);
// FIXME: Prompt for due date.
} else {
$this->setupTemplate(true, $articleId, 'review');
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$searchType = null;
$searchMatch = null;
$search = $searchQuery = $request->getUserVar('search');
$searchInitial = $request->getUserVar('searchInitial');
if (!empty($search)) {
$searchType = $request->getUserVar('searchField');
$searchMatch = $request->getUserVar('searchMatch');
} elseif (!empty($searchInitial)) {
$searchInitial = String::strtoupper($searchInitial);
$searchType = USER_FIELD_INITIAL;
$search = $searchInitial;
}
$rangeInfo =& $this->getRangeInfo('reviewers');
$reviewers = $sectionEditorSubmissionDao->getReviewersForArticle($journal->getId(), $articleId, $submission->getCurrentRound(), $searchType, $search, $searchMatch, $rangeInfo, $sort, $sortDirection);
/* @var $reviewers DAOResultFactory */
$journal = $request->getJournal();
$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('searchField', $searchType);
$templateMgr->assign('searchMatch', $searchMatch);
$templateMgr->assign('search', $searchQuery);
$templateMgr->assign('searchInitial', $request->getUserVar('searchInitial'));
$templateMgr->assign_by_ref('reviewers', $reviewers);
$templateMgr->assign('articleId', $articleId);
$templateMgr->assign('reviewerStatistics', $sectionEditorSubmissionDao->getReviewerStatistics($journal->getId()));
$templateMgr->assign('fieldOptions', array(USER_FIELD_INTERESTS => 'user.interests', USER_FIELD_FIRSTNAME => 'user.firstName', USER_FIELD_LASTNAME => 'user.lastName', USER_FIELD_USERNAME => 'user.username', USER_FIELD_EMAIL => 'user.email'));
$templateMgr->assign('completedReviewCounts', $reviewAssignmentDao->getCompletedReviewCounts($journal->getId()));
$templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
$templateMgr->assign('averageQualityRatings', $reviewAssignmentDao->getAverageQualityRatings($journal->getId()));
$templateMgr->assign('helpTopicId', 'journal.roles.reviewer');
$templateMgr->assign('alphaList', explode(' ', __('common.alphaList')));
$templateMgr->assign('reviewerDatabaseLinks', $journal->getSetting('reviewerDatabaseLinks'));
$templateMgr->assign('sort', $sort);
$templateMgr->assign('sortDirection', $sortDirection);
$templateMgr->display('sectionEditor/selectReviewer.tpl');
}
}
示例4: selectReviewer
function selectReviewer($args)
{
$articleId = isset($args[0]) ? (int) $args[0] : 0;
$this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$journal =& Request::getJournal();
$submission =& $this->submission;
$sort = Request::getUserVar('sort');
$sort = isset($sort) ? $sort : 'reviewerName';
$sortDirection = Request::getUserVar('sortDirection');
$sortDirection = isset($sortDirection) && ($sortDirection == SORT_DIRECTION_ASC || $sortDirection == SORT_DIRECTION_DESC) ? $sortDirection : SORT_DIRECTION_ASC;
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
if (isset($args[1]) && $args[1] != null) {
// Assign reviewer to article
SectionEditorAction::addReviewer($submission, $args[1]);
Request::redirect(null, null, 'submissionReview', $articleId);
// FIXME: Prompt for due date.
} else {
$this->setupTemplate(true, $articleId, 'review');
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$searchType = null;
$searchMatch = null;
$search = $searchQuery = Request::getUserVar('search');
$searchInitial = Request::getUserVar('searchInitial');
if (!empty($search)) {
$searchType = Request::getUserVar('searchField');
$searchMatch = Request::getUserVar('searchMatch');
} elseif (!empty($searchInitial)) {
$searchInitial = String::strtoupper($searchInitial);
$searchType = USER_FIELD_INITIAL;
$search = $searchInitial;
}
$rangeInfo =& Handler::getRangeInfo('reviewers');
$reviewers = $sectionEditorSubmissionDao->getReviewersForArticle($journal->getId(), $articleId, $submission->getCurrentRound(), $searchType, $search, $searchMatch, $rangeInfo, $sort, $sortDirection);
//%CBP% If the user has selected to add all reviewers, run this and redirect to submissionReview page
if (Request::getUserVar('f') == "addAllReviewers") {
while (!$reviewers->eof()) {
$reviewer = $reviewers->next();
SectionEditorAction::addReviewer($submission, $reviewer->getId());
}
Request::redirect(null, null, 'submissionReview', $articleId);
}
$journal = Request::getJournal();
$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('searchField', $searchType);
$templateMgr->assign('searchMatch', $searchMatch);
$templateMgr->assign('search', $searchQuery);
$templateMgr->assign('searchInitial', Request::getUserVar('searchInitial'));
$templateMgr->assign_by_ref('reviewers', $reviewers);
$templateMgr->assign('articleId', $articleId);
$templateMgr->assign('reviewerStatistics', $sectionEditorSubmissionDao->getReviewerStatistics($journal->getId()));
$templateMgr->assign('fieldOptions', array(USER_FIELD_INTERESTS => 'user.interests', USER_FIELD_FIRSTNAME => 'user.firstName', USER_FIELD_LASTNAME => 'user.lastName', USER_FIELD_USERNAME => 'user.username', USER_FIELD_EMAIL => 'user.email'));
$templateMgr->assign('completedReviewCounts', $reviewAssignmentDao->getCompletedReviewCounts($journal->getId()));
$templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
$templateMgr->assign('averageQualityRatings', $reviewAssignmentDao->getAverageQualityRatings($journal->getId()));
$templateMgr->assign('helpTopicId', 'journal.roles.reviewer');
$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
$templateMgr->assign('reviewerDatabaseLinks', $journal->getSetting('reviewerDatabaseLinks'));
$templateMgr->assign('sort', $sort);
$templateMgr->assign('sortDirection', $sortDirection);
$templateMgr->display('sectionEditor/selectReviewer.tpl');
}
}
示例5: selectReviewer
/**
* Peer Review
* Last modified: EL on February 16h 2013
* Separation of External reviewers and ERC Members
**/
function selectReviewer($args)
{
$articleId = isset($args[0]) ? (int) $args[0] : 0;
$reviewerId = isset($args[1]) && $args[1] != null ? (int) $args[1] : 0;
$extReviewers = isset($args[2]) && $args[2] != null ? (bool) $args[2] : false;
$this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
$journal =& Request::getJournal();
$submission =& $this->submission;
$sort = Request::getUserVar('sort');
$sort = isset($sort) ? $sort : 'reviewerName';
$sortDirection = Request::getUserVar('sortDirection');
$sortDirection = isset($sortDirection) && ($sortDirection == SORT_DIRECTION_ASC || $sortDirection == SORT_DIRECTION_DESC) ? $sortDirection : SORT_DIRECTION_ASC;
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
if ($reviewerId > 0) {
// Assign reviewer to article
SectionEditorAction::addReviewer($submission->getLastSectionDecisionId(), $reviewerId);
//Notify reviewer and send email by default
$reviewId = $sectionEditorSubmissionDao->getReviewAssignmentIdByDecisionAndReviewer($submission->getLastSectionDecisionId(), $reviewerId);
SectionEditorAction::notifyReviewer($submission, $reviewId, 0, true);
Request::redirect(null, null, 'submissionReview', $articleId);
// FIXME: Prompt for due date.
} else {
$this->setupTemplate(1, $articleId, 'review');
$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
$searchType = null;
$searchMatch = null;
$search = $searchQuery = Request::getUserVar('search');
$searchInitial = Request::getUserVar('searchInitial');
if (!$extReviewers) {
$extReviewers = Request::getUserVar('extReviewers');
if ($extReviewers == "false") {
$extReviewers = false;
} elseif ($extReviewers == "true") {
$extReviewers = true;
}
}
if (!empty($search)) {
$searchType = Request::getUserVar('searchField');
$searchMatch = Request::getUserVar('searchMatch');
} elseif (!empty($searchInitial)) {
$searchInitial = String::strtoupper($searchInitial);
$searchType = USER_FIELD_INITIAL;
$search = $searchInitial;
}
$lastDecision =& $submission->getLastSectionDecision();
$rangeInfo =& Handler::getRangeInfo('reviewers');
$reviewers = $sectionEditorSubmissionDao->getReviewersForArticle($journal->getId(), $lastDecision->getId(), $lastDecision->getSectionId(), $extReviewers, $searchType, $search, $searchMatch, $rangeInfo, $sort, $sortDirection);
$journal = Request::getJournal();
$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
$sectionDao =& DAORegistry::getDAO('SectionDAO');
$erc =& $sectionDao->getSection($submission->getSectionId());
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('submission', $submission);
$templateMgr->assign('ercAbbrev', $erc->getLocalizedAbbrev());
$templateMgr->assign('extReviewers', $extReviewers);
$templateMgr->assign('searchField', $searchType);
$templateMgr->assign('searchMatch', $searchMatch);
$templateMgr->assign('search', $searchQuery);
$templateMgr->assign('searchInitial', Request::getUserVar('searchInitial'));
$templateMgr->assign_by_ref('reviewers', $reviewers);
$templateMgr->assign('articleId', $articleId);
$templateMgr->assign('reviewerStatistics', $sectionEditorSubmissionDao->getReviewerStatistics());
$templateMgr->assign('fieldOptions', array(USER_FIELD_INTERESTS => 'user.interests', USER_FIELD_FIRSTNAME => 'user.firstName', USER_FIELD_LASTNAME => 'user.lastName', USER_FIELD_USERNAME => 'user.username', USER_FIELD_EMAIL => 'user.email'));
$templateMgr->assign('completedReviewCounts', $reviewAssignmentDao->getCompletedReviewCounts($journal->getId()));
$templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
$templateMgr->assign('averageQualityRatings', $reviewAssignmentDao->getAverageQualityRatings($journal->getId()));
$templateMgr->assign('helpTopicId', 'journal.roles.reviewer');
$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
$templateMgr->assign('reviewerDatabaseLinks', $journal->getSetting('reviewerDatabaseLinks'));
$templateMgr->assign('sort', $sort);
$templateMgr->assign('sortDirection', $sortDirection);
$templateMgr->display('sectionEditor/selectReviewer.tpl');
}
}