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


PHP ReviewAssignment::getReviewerRecommendationOptions方法代码示例

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


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

示例1: fetch

 /**
  * @see Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $reviewAssignment = $this->getReviewAssignment();
     $reviewRoundId = $reviewAssignment->getReviewRoundId();
     // Assign the objects and data to the template.
     $context = $this->request->getContext();
     $templateMgr->assign('reviewAssignment', $reviewAssignment);
     $templateMgr->assign('reviewRoundId', $reviewRoundId);
     // Include the review recommendation options on the form.
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     if ($reviewAssignment->getReviewFormId()) {
         // Get the review form components
         $reviewFormElementDao = DAORegistry::getDAO('ReviewFormElementDAO');
         $reviewFormElements = $reviewFormElementDao->getByReviewFormId($reviewAssignment->getReviewFormId());
         $reviewFormResponseDao = DAORegistry::getDAO('ReviewFormResponseDAO');
         $reviewFormResponses = $reviewFormResponseDao->getReviewReviewFormResponseValues($reviewAssignment->getId());
         $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO');
         $reviewformid = $reviewAssignment->getReviewFormId();
         $reviewForm = $reviewFormDao->getById($reviewAssignment->getReviewFormId(), Application::getContextAssocType(), $context->getId());
         $templateMgr->assign('reviewForm', $reviewForm);
         $templateMgr->assign('reviewFormElements', $reviewFormElements);
         $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
         $templateMgr->assign('disabled', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
     }
     //
     // Assign the link actions
     //
     if ($context->getLocalizedSetting('reviewGuidelines')) {
         import('lib.pkp.controllers.confirmationModal.linkAction.ViewReviewGuidelinesLinkAction');
         $viewReviewGuidelinesAction = new ViewReviewGuidelinesLinkAction($request, $reviewAssignment->getStageId());
         $templateMgr->assign('viewGuidelinesAction', $viewReviewGuidelinesAction);
     }
     return parent::fetch($request);
 }
开发者ID:mczirfusz,项目名称:pkp-lib,代码行数:38,代码来源:ReviewerReviewStep3Form.inc.php

示例2: index

 /**
  * Display reviewer index page.
  */
 function index($args)
 {
     ReviewerHandler::validate();
     ReviewerHandler::setupTemplate();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $rangeInfo = Handler::getRangeInfo('submissions');
     $page = isset($args[0]) ? $args[0] : '';
     switch ($page) {
         case 'completed':
             $active = false;
             break;
         default:
             $page = 'active';
             $active = true;
     }
     $submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getUserId(), $journal->getJournalId(), $active, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign_by_ref('submissions', $submissions);
     import('submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     import('issue.IssueAction');
     $issueAction =& new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.submissions');
     $templateMgr->display('reviewer/index.tpl');
 }
开发者ID:Jouper,项目名称:jouper,代码行数:33,代码来源:ReviewerHandler.inc.php

示例3: index

 /**
  * Display reviewer index page.
  */
 function index($args)
 {
     $this->validate();
     $this->setupTemplate();
     $schedConf =& Request::getSchedConf();
     $user =& Request::getUser();
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $rangeInfo = Handler::getRangeInfo('submissions');
     $page = isset($args[0]) ? $args[0] : '';
     switch ($page) {
         case 'completed':
             $active = false;
             break;
         default:
             $page = 'active';
             $active = true;
     }
     $submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getId(), $schedConf->getId(), $active, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign_by_ref('submissions', $submissions);
     $templateMgr->assign_by_ref('schedConf', $schedConf);
     import('submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.submissions');
     $templateMgr->display('reviewer/index.tpl');
 }
开发者ID:jalperin,项目名称:ocs,代码行数:31,代码来源:ReviewerHandler.inc.php

示例4: submission

 /**
  * Display the submission review page.
  * @param $args array
  */
 function submission($args, $request)
 {
     $journal =& $request->getJournal();
     $reviewId = $args[0];
     $this->validate($request, $reviewId);
     $user =& $this->user;
     $submission =& $this->submission;
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($reviewId);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     if ($submission->getDateConfirmed() == null) {
         $confirmedStatus = 0;
     } else {
         $confirmedStatus = 1;
     }
     $this->setupTemplate(true, $reviewAssignment->getSubmissionId(), $reviewId);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('user', $user);
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewAssignment', $reviewAssignment);
     $templateMgr->assign('confirmedStatus', $confirmedStatus);
     $templateMgr->assign('declined', $submission->getDeclined());
     $templateMgr->assign('reviewFormResponseExists', $reviewFormResponseDao->reviewFormResponseExists($reviewId));
     $templateMgr->assign_by_ref('reviewFile', $reviewAssignment->getReviewFile());
     $templateMgr->assign_by_ref('reviewerFile', $submission->getReviewerFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('journal', $journal);
     $templateMgr->assign_by_ref('reviewGuidelines', $journal->getLocalizedSetting('reviewGuidelines'));
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.review');
     $templateMgr->display('reviewer/submission.tpl');
 }
开发者ID:reconciler,项目名称:ojs,代码行数:37,代码来源:SubmissionReviewHandler.inc.php

示例5: display

 /**
  * Display the form.
  */
 function display()
 {
     $press =& Request::getPress();
     $user =& Request::getUser();
     $submission = $this->reviewerSubmission;
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($submission->getReviewId());
     if ($submission->getDateConfirmed() == null) {
         $confirmedStatus = 0;
     } else {
         $confirmedStatus = 1;
     }
     $templateMgr =& TemplateManager::getManager();
     $reviewerRequestParams = array('reviewer' => $reviewAssignment->getReviewerFullName(), 'personalNote' => 'EDITOR NOTE', 'editor' => $press->getSetting('contactName'));
     $templateMgr->assign('reviewerRequest', Locale::translate('reviewer.step1.requestBoilerplate', $reviewerRequestParams));
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewAssignment', $reviewAssignment);
     $templateMgr->assign_by_ref('press', $press);
     $templateMgr->assign_by_ref('reviewGuidelines', $press->getLocalizedSetting('reviewGuidelines'));
     $templateMgr->assign('step', 1);
     $templateMgr->assign('completedSteps', $submission->getStatus());
     $templateMgr->assign('blindReview', true);
     // FIXME: Need to be able to get/set if a review is blind or not
     // FIXME: Need press setting that denotes competing interests are required
     $templateMgr->assign('competingInterestsText', $submission->getCompetingInterests());
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.review');
     parent::display();
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:34,代码来源:ReviewerReviewStep1Form.inc.php

示例6: submission

 /**
  * Display the submission review page.
  * @param $args array
  */
 function submission($args)
 {
     $journal =& Request::getJournal();
     $reviewId = $args[0];
     list($journal, $submission, $user) = SubmissionReviewHandler::validate($reviewId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getReviewAssignmentById($reviewId);
     if ($submission->getDateConfirmed() == null) {
         $confirmedStatus = 0;
     } else {
         $confirmedStatus = 1;
     }
     ReviewerHandler::setupTemplate(true, $reviewAssignment->getArticleId(), $reviewId);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('user', $user);
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewAssignment', $reviewAssignment);
     $templateMgr->assign('confirmedStatus', $confirmedStatus);
     $templateMgr->assign('declined', $submission->getDeclined());
     $templateMgr->assign_by_ref('reviewFile', $reviewAssignment->getReviewFile());
     $templateMgr->assign_by_ref('reviewerFile', $submission->getReviewerFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('journal', $journal);
     $templateMgr->assign_by_ref('reviewGuidelines', $journal->getLocalizedSetting('reviewGuidelines'));
     import('submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.review');
     $templateMgr->display('reviewer/submission.tpl');
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:33,代码来源:SubmissionReviewHandler.inc.php

示例7: index

 /**
  * Display reviewer index page.
  */
 function index($args)
 {
     $this->validate();
     $this->setupTemplate();
     $journal =& Request::getJournal();
     //%CBP% redirect or set var as appropriate
     $CBPPlatformDao =& DAORegistry::getDAO('CBPPlatformDAO');
     $workshop = $CBPPlatformDao->getWorkshop($journal->getJournalId());
     if ($workshop != "structured") {
         $workshop = 1;
     }
     if ($workshop == 1) {
         Request::redirect(Request::getRequestedJournalPath(), 'user');
     }
     $user =& Request::getUser();
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $rangeInfo = Handler::getRangeInfo('submissions');
     $page = isset($args[0]) ? $args[0] : '';
     switch ($page) {
         case 'completed':
             $active = false;
             break;
         default:
             $page = 'active';
             $active = true;
     }
     $sort = Request::getUserVar('sort');
     $sort = isset($sort) ? $sort : 'title';
     $sortDirection = Request::getUserVar('sortDirection');
     if ($sort == 'decision') {
         $submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getId(), $journal->getId(), $active, $rangeInfo);
         // Sort all submissions by status, which is too complex to do in the DB
         $submissionsArray = $submissions->toArray();
         $compare = create_function('$s1, $s2', 'return strcmp($s1->getMostRecentDecision(), $s2->getMostRecentDecision());');
         usort($submissionsArray, $compare);
         if ($sortDirection == SORT_DIRECTION_DESC) {
             $submissionsArray = array_reverse($submissionsArray);
         }
         // Convert submission array back to an ItemIterator class
         import('lib.pkp.classes.core.ArrayItemIterator');
         $submissions =& ArrayItemIterator::fromRangeInfo($submissionsArray, $rangeInfo);
     } else {
         $submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getId(), $journal->getId(), $active, $rangeInfo, $sort, $sortDirection);
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign_by_ref('submissions', $submissions);
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     import('classes.issue.IssueAction');
     $issueAction = new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.submissions');
     $templateMgr->assign('sort', $sort);
     $templateMgr->assign('sortDirection', $sortDirection);
     $templateMgr->display('reviewer/index.tpl');
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:61,代码来源:ReviewerHandler.inc.php

示例8: display

 function display(&$args)
 {
     $request =& $this->getRequest();
     $conference =& $request->getConference();
     $schedConf =& $request->getSchedConf();
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_APP_MANAGER);
     header('content-type: text/comma-separated-values; charset=utf-8');
     header('content-disposition: attachment; filename=reviews-' . date('Ymd') . '.csv');
     $reviewReportDao = DAORegistry::getDAO('ReviewReportDAO');
     list($commentsIterator, $reviewsIterator) = $reviewReportDao->getReviewReport($schedConf->getId());
     $comments = array();
     while ($row =& $commentsIterator->next()) {
         if (isset($comments[$row['paper_id']][$row['author_id']])) {
             $comments[$row['paper_id']][$row['author_id']] .= "; " . $row['comments'];
         } else {
             $comments[$row['paper_id']][$row['author_id']] = $row['comments'];
         }
     }
     $yesnoMessages = array(0 => __('common.no'), 1 => __('common.yes'));
     import('classes.schedConf.SchedConf');
     $reviewTypes = array(REVIEW_MODE_ABSTRACTS_ALONE => __('manager.schedConfSetup.submissions.abstractsAlone'), REVIEW_MODE_BOTH_SEQUENTIAL => __('manager.schedConfSetup.submissions.bothSequential'), REVIEW_MODE_PRESENTATIONS_ALONE => __('manager.schedConfSetup.submissions.presentationsAlone'), REVIEW_MODE_BOTH_SIMULTANEOUS => __('manager.schedConfSetup.submissions.bothTogether'));
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $recommendations = ReviewAssignment::getReviewerRecommendationOptions();
     $columns = array('reviewRound' => __('submissions.reviewType'), 'paper' => __('paper.papers'), 'paperid' => __('paper.submissionId'), 'reviewerid' => __('plugins.reports.reviews.reviewerId'), 'reviewer' => __('plugins.reports.reviews.reviewer'), 'firstname' => __('user.firstName'), 'middlename' => __('user.middleName'), 'lastname' => __('user.lastName'), 'dateassigned' => __('plugins.reports.reviews.dateAssigned'), 'datenotified' => __('plugins.reports.reviews.dateNotified'), 'dateconfirmed' => __('plugins.reports.reviews.dateConfirmed'), 'datecompleted' => __('plugins.reports.reviews.dateCompleted'), 'datereminded' => __('plugins.reports.reviews.dateReminded'), 'declined' => __('submissions.declined'), 'cancelled' => __('common.cancelled'), 'recommendation' => __('reviewer.paper.recommendation'), 'comments' => __('comments.commentsOnPaper'));
     $yesNoArray = array('declined', 'cancelled');
     $fp = fopen('php://output', 'wt');
     fputcsv($fp, array_values($columns));
     while ($row =& $reviewsIterator->next()) {
         foreach ($columns as $index => $junk) {
             if (in_array($index, array('declined', 'cancelled'))) {
                 $yesNoIndex = $row[$index];
                 if (is_string($yesNoIndex)) {
                     // Accomodate Postgres boolean casting
                     $yesNoIndex = $yesNoIndex == "f" ? 0 : 1;
                 }
                 $columns[$index] = $yesnoMessages[$yesNoIndex];
             } elseif ($index == 'reviewRound') {
                 $columns[$index] = $reviewTypes[$row[$index]];
             } elseif ($index == "recommendation") {
                 $columns[$index] = !isset($row[$index]) ? __('common.none') : __($recommendations[$row[$index]]);
             } elseif ($index == "comments") {
                 if (isset($comments[$row['paperid']][$row['reviewerid']])) {
                     $columns[$index] = html_entity_decode(strip_tags($comments[$row['paperid']][$row['reviewerid']]), ENT_QUOTES, 'UTF-8');
                 } else {
                     $columns[$index] = "";
                 }
             } else {
                 $columns[$index] = $row[$index];
             }
         }
         fputcsv($fp, $columns);
         unset($row);
     }
     fclose($fp);
 }
开发者ID:artkuo,项目名称:ocs,代码行数:55,代码来源:ReviewReportPlugin.inc.php

示例9: display

 function display(&$args)
 {
     $journal =& Request::getJournal();
     header('content-type: text/comma-separated-values');
     header('content-disposition: attachment; filename=report.csv');
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION));
     $reviewReportDao =& DAORegistry::getDAO('ReviewReportDAO');
     list($commentsIterator, $reviewsIterator) = $reviewReportDao->getReviewReport($journal->getId());
     $comments = array();
     while ($row =& $commentsIterator->next()) {
         if (isset($comments[$row['article_id']][$row['author_id']])) {
             $comments[$row['article_id']][$row['author_id']] .= "; " . $row['comments'];
         } else {
             $comments[$row['article_id']][$row['author_id']] = $row['comments'];
         }
     }
     $yesnoMessages = array(0 => Locale::translate('common.no'), 1 => Locale::translate('common.yes'));
     import('submission.reviewAssignment.ReviewAssignment');
     $recommendations = ReviewAssignment::getReviewerRecommendationOptions();
     $columns = array('round' => Locale::translate('plugins.reports.reviews.round'), 'article' => Locale::translate('article.articles'), 'articleid' => Locale::translate('article.submissionId'), 'reviewerid' => Locale::translate('plugins.reports.reviews.reviewerId'), 'reviewer' => Locale::translate('plugins.reports.reviews.reviewer'), 'firstname' => Locale::translate('user.firstName'), 'middlename' => Locale::translate('user.middleName'), 'lastname' => Locale::translate('user.lastName'), 'dateassigned' => Locale::translate('plugins.reports.reviews.dateAssigned'), 'datenotified' => Locale::translate('plugins.reports.reviews.dateNotified'), 'dateconfirmed' => Locale::translate('plugins.reports.reviews.dateConfirmed'), 'datecompleted' => Locale::translate('plugins.reports.reviews.dateCompleted'), 'datereminded' => Locale::translate('plugins.reports.reviews.dateReminded'), 'declined' => Locale::translate('submissions.declined'), 'cancelled' => Locale::translate('common.cancelled'), 'recommendation' => Locale::translate('reviewer.article.recommendation'), 'comments' => Locale::translate('comments.commentsOnArticle'));
     $yesNoArray = array('declined', 'cancelled');
     $fp = fopen('php://output', 'wt');
     String::fputcsv($fp, array_values($columns));
     while ($row =& $reviewsIterator->next()) {
         foreach ($columns as $index => $junk) {
             if (in_array($index, $yesNoArray)) {
                 $columns[$index] = $yesnoMessages[$row[$index]];
             } elseif ($index == "recommendation") {
                 $columns[$index] = !isset($row[$index]) ? Locale::translate('common.none') : Locale::translate($recommendations[$row[$index]]);
             } elseif ($index == "comments") {
                 if (isset($comments[$row['articleid']][$row['reviewerid']])) {
                     $columns[$index] = $comments[$row['articleid']][$row['reviewerid']];
                 } else {
                     $columns[$index] = "";
                 }
             } else {
                 $columns[$index] = $row[$index];
             }
         }
         String::fputcsv($fp, $columns);
         unset($row);
     }
     fclose($fp);
 }
开发者ID:philschatz,项目名称:ojs,代码行数:44,代码来源:ReviewReportPlugin.inc.php

示例10: submission

 function submission($args, $request)
 {
     $reviewId = (int) array_shift($args);
     $this->validate($request, $reviewId);
     $reviewerSubmission =& $this->submission;
     $user =& $this->user;
     $schedConf =& $request->getSchedConf();
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($reviewId);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     if ($reviewAssignment->getDateConfirmed() == null) {
         $confirmedStatus = 0;
     } else {
         $confirmedStatus = 1;
     }
     $this->setupTemplate($request, true, $reviewerSubmission->getId(), $reviewId);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('user', $user);
     $templateMgr->assign_by_ref('submission', $reviewerSubmission);
     $templateMgr->assign_by_ref('reviewAssignment', $reviewAssignment);
     $templateMgr->assign('confirmedStatus', $confirmedStatus);
     $templateMgr->assign('declined', $reviewerSubmission->getDeclined());
     $templateMgr->assign('reviewFormResponseExists', $reviewFormResponseDao->reviewFormResponseExists($reviewId));
     $templateMgr->assign_by_ref('reviewFile', $reviewAssignment->getReviewFile());
     $templateMgr->assign_by_ref('reviewerFile', $reviewerSubmission->getReviewerFile());
     $templateMgr->assign_by_ref('suppFiles', $reviewerSubmission->getSuppFiles());
     $templateMgr->assign_by_ref('schedConf', $schedConf);
     $templateMgr->assign_by_ref('reviewGuidelines', $schedConf->getLocalizedSetting('reviewGuidelines'));
     // The reviewer instructions differ depending on what is reviewed, and when.
     if ($reviewAssignment->getRound() == REVIEW_ROUND_ABSTRACT && $reviewerSubmission->getReviewMode() != REVIEW_MODE_BOTH_SIMULTANEOUS) {
         $templateMgr->assign('reviewerInstruction3', 'reviewer.paper.downloadSubmissionAbstractOnly');
     } else {
         $templateMgr->assign('reviewerInstruction3', 'reviewer.paper.downloadSubmissionSubmission');
     }
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $controlledVocabDao =& DAORegistry::getDAO('ControlledVocabDAO');
     $templateMgr->assign('sessionTypes', $controlledVocabDao->enumerateBySymbolic('sessionTypes', ASSOC_TYPE_SCHED_CONF, $schedConf->getId()));
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.review');
     $templateMgr->display('reviewer/submission.tpl');
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:41,代码来源:SubmissionReviewHandler.inc.php

示例11: index

 /**
  * Display reviewer index page.
  */
 function index($args)
 {
     $this->validate();
     $this->setupTemplate();
     $schedConf =& Request::getSchedConf();
     $user =& Request::getUser();
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $rangeInfo = Handler::getRangeInfo('submissions');
     $page = isset($args[0]) ? $args[0] : '';
     switch ($page) {
         case 'completed':
             AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_DIRECTOR));
             $active = false;
             break;
         default:
             $page = 'active';
             $active = true;
     }
     $submissions = $reviewerSubmissionDao->getReviewerSubmissionsByReviewerId($user->getId(), $schedConf->getId(), $active, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign_by_ref('submissions', $submissions);
     $templateMgr->assign_by_ref('schedConf', $schedConf);
     import('submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign('helpTopicId', 'editorial.reviewersRole.submissions');
     $sessionTypesArray = array();
     $paperTypeDao = DAORegistry::getDAO('PaperTypeDAO');
     $sessionTypes = $paperTypeDao->getPaperTypes($schedConf->getId());
     while ($sessionType = $sessionTypes->next()) {
         $sessionTypesArray[$sessionType->getId()] = $sessionType;
     }
     $templateMgr->assign('sessionTypes', $sessionTypesArray);
     $templateMgr->display('reviewer/index.tpl');
 }
开发者ID:pulipulichen,项目名称:ocs,代码行数:39,代码来源:ReviewerHandler.inc.php

示例12: fetch

 /**
  * @see Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $reviewAssignment = $this->getReviewAssignment();
     // Assign the objects and data to the template.
     $context = $this->request->getContext();
     $templateMgr->assign(array('reviewAssignment' => $reviewAssignment, 'reviewRoundId' => $reviewAssignment->getReviewRoundId(), 'reviewerRecommendationOptions' => ReviewAssignment::getReviewerRecommendationOptions()));
     if ($reviewAssignment->getReviewFormId()) {
         // Get the review form components
         $reviewFormElementDao = DAORegistry::getDAO('ReviewFormElementDAO');
         $reviewFormResponseDao = DAORegistry::getDAO('ReviewFormResponseDAO');
         $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO');
         $templateMgr->assign(array('reviewForm' => $reviewFormDao->getById($reviewAssignment->getReviewFormId(), Application::getContextAssocType(), $context->getId()), 'reviewFormElements' => $reviewFormElementDao->getByReviewFormId($reviewAssignment->getReviewFormId()), 'reviewFormResponses' => $reviewFormResponseDao->getReviewReviewFormResponseValues($reviewAssignment->getId()), 'disabled' => isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null));
     }
     //
     // Assign the link actions
     //
     import('lib.pkp.controllers.confirmationModal.linkAction.ViewReviewGuidelinesLinkAction');
     $viewReviewGuidelinesAction = new ViewReviewGuidelinesLinkAction($request, $reviewAssignment->getStageId());
     if ($viewReviewGuidelinesAction->getGuidelines()) {
         $templateMgr->assign('viewGuidelinesAction', $viewReviewGuidelinesAction);
     }
     return parent::fetch($request);
 }
开发者ID:pkp,项目名称:pkp-lib,代码行数:27,代码来源:ReviewerReviewStep3Form.inc.php

示例13: recordRecommendation

 /**
  * Records the reviewer's submission recommendation.
  * @param $reviewId int
  * @param $recommendation int
  * @param $send boolean
  * @param $request object
  */
 function recordRecommendation(&$reviewerSubmission, $recommendation, $send, $request)
 {
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     // Check validity of selected recommendation
     $reviewerRecommendationOptions =& ReviewAssignment::getReviewerRecommendationOptions();
     if (!isset($reviewerRecommendationOptions[$recommendation])) {
         return true;
     }
     $reviewAssignment =& $reviewAssignmentDao->getById($reviewerSubmission->getReviewId());
     $reviewer =& $userDao->getUser($reviewAssignment->getReviewerId());
     if (!isset($reviewer)) {
         return true;
     }
     // Only record the reviewers recommendation if
     // no recommendation has previously been submitted.
     if ($reviewAssignment->getRecommendation() === null || $reviewAssignment->getRecommendation === '') {
         import('classes.mail.ArticleMailTemplate');
         $email = new ArticleMailTemplate($reviewerSubmission, 'REVIEW_COMPLETE');
         // Must explicitly set sender because we may be here on an access
         // key, in which case the user is not technically logged in
         $email->setReplyTo($reviewer->getEmail(), $reviewer->getFullName());
         if (!$email->isEnabled() || $send && !$email->hasErrors()) {
             HookRegistry::call('ReviewerAction::recordRecommendation', array(&$reviewerSubmission, &$email, $recommendation));
             if ($email->isEnabled()) {
                 $email->send($request);
             }
             $reviewAssignment->setRecommendation($recommendation);
             $reviewAssignment->setDateCompleted(Core::getCurrentDate());
             $reviewAssignment->stampModified();
             $reviewAssignmentDao->updateReviewAssignment($reviewAssignment);
             // Add log
             import('classes.article.log.ArticleLog');
             ArticleLog::logEvent($request, $reviewerSubmission, ARTICLE_LOG_REVIEW_RECOMMENDATION, 'log.review.reviewRecommendationSet', array('reviewerName' => $reviewer->getFullName(), 'articleId' => $reviewAssignment->getSubmissionId(), 'round' => $reviewAssignment->getRound(), 'reviewId' => $reviewAssignment->getId()));
         } else {
             if (!$request->getUserVar('continued')) {
                 $assignedEditors = $email->ccAssignedEditors($reviewerSubmission->getId());
                 $reviewingSectionEditors = $email->toAssignedReviewingSectionEditors($reviewerSubmission->getId());
                 if (empty($assignedEditors) && empty($reviewingSectionEditors)) {
                     $journal =& Request::getJournal();
                     $email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
                     $editorialContactName = $journal->getSetting('contactName');
                 } else {
                     if (!empty($reviewingSectionEditors)) {
                         $editorialContact = array_shift($reviewingSectionEditors);
                     } else {
                         $editorialContact = array_shift($assignedEditors);
                     }
                     $editorialContactName = $editorialContact->getEditorFullName();
                 }
                 $reviewerRecommendationOptions =& ReviewAssignment::getReviewerRecommendationOptions();
                 $email->assignParams(array('editorialContactName' => $editorialContactName, 'reviewerName' => $reviewer->getFullName(), 'articleTitle' => strip_tags($reviewerSubmission->getLocalizedTitle()), 'recommendation' => __($reviewerRecommendationOptions[$recommendation])));
             }
             $email->displayEditForm($request->url(null, 'reviewer', 'recordRecommendation'), array('reviewId' => $reviewerSubmission->getReviewId(), 'recommendation' => $recommendation));
             return false;
         }
     }
     return true;
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:66,代码来源:ReviewerAction.inc.php

示例14: recordRecommendation

 /**
  * Records the reviewer's submission recommendation.
  * @param $reviewId int
  * @param $recommendation int
  * @param $send boolean
  */
 function recordRecommendation(&$reviewAssignment, $recommendation, $send)
 {
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewerSubmissionDao =& DAORegistry::getDAO('ReviewerSubmissionDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $reviewId = $reviewAssignment->getReviewId();
     $reviewerSubmission =& $reviewerSubmissionDao->getReviewerSubmission($reviewId);
     // Check validity of selected recommendation
     $reviewerRecommendationOptions =& ReviewAssignment::getReviewerRecommendationOptions();
     if (!isset($reviewerRecommendationOptions[$recommendation])) {
         return true;
     }
     $reviewer =& $userDao->getUser($reviewAssignment->getReviewerId());
     if (!isset($reviewer)) {
         return true;
     }
     // Only record the reviewers recommendation if
     // no recommendation has previously been submitted.
     if ($reviewAssignment->getRecommendation() === null || $reviewAssignment->getRecommendation === '') {
         import('classes.mail.ArticleMailTemplate');
         $email = new ArticleMailTemplate($reviewerSubmission, null, 'REVIEW_COMPLETE');
         // Must explicitly set sender because we may be here on an access
         // key, in which case the user is not technically logged in
         $email->setFrom($reviewer->getEmail(), $reviewer->getFullName());
         if (!$email->isEnabled() || $send && !$email->hasErrors()) {
             HookRegistry::call('ReviewerAction::recordRecommendation', array(&$reviewerSubmission, &$email, $recommendation));
             if ($email->isEnabled()) {
                 $email->setAssoc(ARTICLE_EMAIL_REVIEW_COMPLETE, ARTICLE_EMAIL_TYPE_REVIEW, $reviewId);
                 $email->send();
             }
             $reviewAssignment->setRecommendation($recommendation);
             $reviewAssignment->setDateCompleted(Core::getCurrentDate());
             $reviewAssignment->stampModified();
             $reviewAssignmentDao->updateReviewAssignment($reviewAssignment);
             // Add log
             import('classes.article.log.ArticleLog');
             import('classes.article.log.ArticleEventLogEntry');
             $entry = new ArticleEventLogEntry();
             $entry->setArticleId($reviewerSubmission->getArticleId());
             $entry->setUserId($reviewer->getId());
             $entry->setDateLogged(Core::getCurrentDate());
             $entry->setEventType(ARTICLE_LOG_REVIEW_RECOMMENDATION);
             $entry->setLogLevel('N');
             $entry->setLogMessage('log.review.reviewRecommendationSet', array('reviewerName' => $reviewer->getFullName(), 'articleId' => $reviewerSubmission->getProposalId()));
             $entry->setAssocType(ARTICLE_LOG_TYPE_REVIEW);
             $entry->setAssocId($reviewAssignment->getId());
             ArticleLog::logEventEntry($reviewerSubmission->getArticleId(), $entry);
         } else {
             if (!Request::getUserVar('continued')) {
                 $assignedEditors = $email->ccAssignedEditors($reviewerSubmission->getArticleId());
                 $reviewingSectionEditors = $email->toAssignedReviewingSectionEditors($reviewerSubmission->getArticleId());
                 if (empty($assignedEditors) && empty($reviewingSectionEditors)) {
                     $journal =& Request::getJournal();
                     $email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
                     $editorialContactName = $journal->getSetting('contactName');
                 } else {
                     if (!empty($reviewingSectionEditors)) {
                         $editorialContact = array_shift($reviewingSectionEditors);
                     } else {
                         $editorialContact = array_shift($assignedEditors);
                     }
                     // Modified by EL on February 17th 2013
                     // No edit assigment anymore
                     $editorialContactName = $editorialContact->getFullName();
                 }
                 $reviewerRecommendationOptions =& ReviewAssignment::getReviewerRecommendationOptions();
                 $email->assignParams(array('editorialContactName' => $editorialContactName, 'reviewerName' => $reviewer->getFullName(), 'articleTitle' => strip_tags($reviewerSubmission->getScientificTitle()), 'recommendation' => Locale::translate($reviewerRecommendationOptions[$recommendation])));
             }
             $email->displayEditForm(Request::url(null, 'reviewer', 'recordRecommendation'), array('reviewId' => $reviewId, 'recommendation' => $recommendation));
             return false;
         }
     }
     return true;
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:80,代码来源:ReviewerAction.inc.php

示例15: enterReviewerRecommendation

 function enterReviewerRecommendation($args, $request)
 {
     $paperId = (int) $request->getUserVar('paperId');
     $reviewId = (int) $request->getUserVar('reviewId');
     $recommendation = (int) $request->getUserVar('recommendation');
     $this->validate($request, $paperId, TRACK_DIRECTOR_ACCESS_REVIEW);
     $conference =& $request->getConference();
     $schedConf =& $request->getSchedConf();
     $submission =& $this->submission;
     if ($recommendation != null) {
         TrackDirectorAction::setReviewerRecommendation($paperId, $reviewId, $recommendation, SUBMISSION_REVIEWER_RECOMMENDATION_ACCEPT);
         $request->redirect(null, null, null, 'submissionReview', $paperId);
     } else {
         $this->setupTemplate($request, true, $paperId, 'review');
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->assign('paperId', $paperId);
         $templateMgr->assign('reviewId', $reviewId);
         import('classes.submission.reviewAssignment.ReviewAssignment');
         $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
         $templateMgr->display('trackDirector/reviewerRecommendation.tpl');
     }
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:22,代码来源:SubmissionEditHandler.inc.php


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