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


PHP ReviewAssignment类代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例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: 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

示例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: addReviewer

 /**
  * Assigns a reviewer to a submission.
  * @param $seriesEditorSubmission object
  * @param $reviewerId int
  */
 function addReviewer($seriesEditorSubmission, $reviewerId, $reviewType, $round = null, $reviewDueDate = null, $responseDueDate = null)
 {
     $seriesEditorSubmissionDao =& DAORegistry::getDAO('SeriesEditorSubmissionDAO');
     $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 monograph.
     if ($round == null) {
         $round = $seriesEditorSubmission->getCurrentRound();
     }
     $assigned = $seriesEditorSubmissionDao->reviewerExists($seriesEditorSubmission->getId(), $reviewerId, $reviewType, $round);
     // Only add the reviewer if he has not already
     // been assigned to review this monograph.
     if (!$assigned && isset($reviewer) && !HookRegistry::call('SeriesEditorAction::addReviewer', array(&$seriesEditorSubmission, $reviewerId))) {
         $reviewAssignment = new ReviewAssignment();
         $reviewAssignment->setSubmissionId($seriesEditorSubmission->getId());
         $reviewAssignment->setReviewerId($reviewerId);
         $reviewAssignment->setDateAssigned(Core::getCurrentDate());
         $reviewAssignment->setReviewType($reviewType);
         $reviewAssignment->setRound($round);
         // Assign review form automatically if needed
         $pressId = $seriesEditorSubmission->getPressId();
         $seriesDao =& DAORegistry::getDAO('SeriesDAO');
         $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
         $submissionId = $seriesEditorSubmission->getId();
         $series =& $seriesDao->getById($submissionId, $pressId);
         $seriesEditorSubmission->addReviewAssignment($reviewAssignment, $reviewType, $round);
         $seriesEditorSubmissionDao->updateSeriesEditorSubmission($seriesEditorSubmission);
         $reviewAssignment = $reviewAssignmentDao->getReviewAssignment($seriesEditorSubmission->getId(), $reviewerId, $round, $reviewType);
         $press =& Request::getPress();
         $settingsDao =& DAORegistry::getDAO('PressSettingsDAO');
         $settings =& $settingsDao->getPressSettings($press->getId());
         if (isset($reviewDueDate)) {
             SeriesEditorAction::setDueDate($seriesEditorSubmission->getId(), $reviewAssignment->getId(), $reviewDueDate);
         }
         if (isset($responseDueDate)) {
             SeriesEditorAction::setResponseDueDate($seriesEditorSubmission->getId(), $reviewAssignment->getId(), $responseDueDate);
         }
         // Add log
         import('classes.monograph.log.MonographLog');
         import('classes.monograph.log.MonographEventLogEntry');
         MonographLog::logEvent($seriesEditorSubmission->getId(), MONOGRAPH_LOG_REVIEW_ASSIGN, MONOGRAPH_LOG_TYPE_REVIEW, $reviewAssignment->getId(), 'log.review.reviewerAssigned', array('reviewerName' => $reviewer->getFullName(), 'monographId' => $seriesEditorSubmission->getId(), 'reviewType' => $reviewType, 'round' => $round));
     }
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:51,代码来源:SeriesEditorAction.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: 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

示例14: array

 /**
  * Return the object representing the next row.
  * @return object
  */
 function &next()
 {
     $row =& parent::next();
     if ($row == null) {
         return $row;
     }
     $ret = array('articleId' => $row['article_id']);
     $ret['dateSubmitted'] = $this->journalStatisticsDao->dateFromDB($row['date_submitted']);
     $article =& $this->articleDao->getArticle($row['article_id']);
     $ret['title'] = $article->getArticleTitle();
     $section =& $this->getSection($row['section_id']);
     $ret['section'] = $section->getSectionTitle();
     // Author Names & Affiliations
     $maxAuthors = $this->getMaxAuthors();
     $ret['authors'] = $maxAuthors == 0 ? array() : array_fill(0, $maxAuthors, '');
     $ret['affiliations'] = $maxAuthors == 0 ? array() : array_fill(0, $maxAuthors, '');
     $ret['countries'] = $maxAuthors == 0 ? array() : array_fill(0, $maxAuthors, '');
     $authors =& $this->authorDao->getAuthorsByArticle($row['article_id']);
     $authorIndex = 0;
     foreach ($authors as $author) {
         $ret['authors'][$authorIndex] = $author->getFullName();
         $ret['affiliations'][$authorIndex] = $author->getAffiliation();
         $country = $author->getCountry();
         if (!empty($country)) {
             $ret['countries'][$authorIndex] = $this->countryDao->getCountry($country);
         }
         $authorIndex++;
     }
     if ($this->type === REPORT_TYPE_EDITOR) {
         $user = null;
         if ($row['editor_id']) {
             $user =& $this->userDao->getUser($row['editor_id']);
         }
         $ret['editor'] = $user ? $user->getFullName() : '';
     } else {
         $editAssignments =& $this->editAssignmentDao->getEditAssignmentsByArticleId($row['article_id']);
         $maxEditors = $this->getMaxEditors();
         $ret['editors'] = $maxEditors == 0 ? array() : array_fill(0, $maxEditors, '');
         $editorIndex = 0;
         while ($editAssignment =& $editAssignments->next()) {
             $ret['editors'][$editorIndex++] = $editAssignment->getEditorFullName();
         }
     }
     // Reviewer Names
     $ratingOptions =& ReviewAssignment::getReviewerRatingOptions();
     if ($this->type === REPORT_TYPE_REVIEWER) {
         $user = null;
         if ($row['reviewer_id']) {
             $user =& $this->userDao->getUser($row['reviewer_id']);
         }
         $ret['reviewer'] = $user ? $user->getFullName() : '';
         if ($row['quality']) {
             $ret['score'] = Locale::translate($ratingOptions[$row['quality']]);
         } else {
             $ret['score'] = '';
         }
         $ret['affiliation'] = $user ? $user->getAffiliation() : '';
     } else {
         $maxReviewers = $this->getMaxReviewers();
         $ret['reviewers'] = $maxReviewers == 0 ? array() : array_fill(0, $maxReviewers, '');
         $ret['scores'] = $maxReviewers == 0 ? array() : array_fill(0, $maxReviewers, '');
         $ret['recommendations'] = $maxReviewers == 0 ? array() : array_fill(0, $maxReviewers, '');
         $reviewAssignments =& $this->reviewAssignmentDao->getReviewAssignmentsByArticleId($row['article_id']);
         $reviewerIndex = 0;
         foreach ($reviewAssignments as $reviewAssignment) {
             $reviewerId = $reviewAssignment->getReviewerId();
             $ret['reviewers'][$reviewerIndex] = $reviewAssignment->getReviewerFullName();
             $rating = $reviewAssignment->getQuality();
             if ($rating != '') {
                 $ret['scores'][$reviewerIndex] = Locale::translate($ratingOptions[$rating]);
             }
             $recommendation = $reviewAssignment->getRecommendation();
             if ($recommendation !== '' && $recommendation !== null) {
                 $recommendationOptions =& $reviewAssignment->getReviewerRecommendationOptions();
                 $ret['recommendations'][$reviewerIndex] = Locale::translate($recommendationOptions[$recommendation]);
             }
             $reviewerIndex++;
         }
     }
     // Fetch the last editorial decision for this article.
     $editorDecisions = $this->authorSubmissionDao->getEditorDecisions($row['article_id']);
     $lastDecision = array_pop($editorDecisions);
     if ($lastDecision) {
         import('submission.sectionEditor.SectionEditorSubmission');
         $decisionOptions =& SectionEditorSubmission::getEditorDecisionOptions();
         $ret['decision'] = Locale::translate($decisionOptions[$lastDecision['decision']]);
         $ret['dateDecided'] = $lastDecision['dateDecided'];
         $decisionTime = strtotime($lastDecision['dateDecided']);
         $submitTime = strtotime($ret['dateSubmitted']);
         if ($decisionTime === false || $decisionTime === -1 || $submitTime === false || $submitTime === -1) {
             $ret['daysToDecision'] = '';
         } else {
             $ret['daysToDecision'] = round(($decisionTime - $submitTime) / 3600 / 24);
         }
     } else {
         $ret['decision'] = '';
//.........这里部分代码省略.........
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:101,代码来源:JournalReportIterator.inc.php

示例15: recordRecommendation

 /**
  * Records the reviewer's submission recommendation.
  * @param $reviewId int
  * @param $recommendation int
  * @param $send boolean
  */
 function recordRecommendation(&$reviewerSubmission, $recommendation, $send)
 {
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     // Check validity of selected recommendation
     $reviewerRecommendationOptions =& ReviewAssignment::getReviewerRecommendationOptions();
     if (!isset($reviewerRecommendationOptions[$recommendation])) {
         return true;
     }
     $reviewAssignment =& $reviewAssignmentDao->getReviewAssignmentById($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('mail.PaperMailTemplate');
         $email = new PaperMailTemplate($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->setFrom($reviewer->getEmail(), $reviewer->getFullName());
         if (!$email->isEnabled() || $send && !$email->hasErrors()) {
             HookRegistry::call('ReviewerAction::recordRecommendation', array(&$reviewerSubmission, &$email, $recommendation));
             if ($email->isEnabled()) {
                 $email->setAssoc(PAPER_EMAIL_REVIEW_COMPLETE, PAPER_EMAIL_TYPE_REVIEW, $reviewerSubmission->getReviewId());
                 $email->send();
             }
             $reviewAssignment->setRecommendation($recommendation);
             $reviewAssignment->setDateCompleted(Core::getCurrentDate());
             $reviewAssignment->stampModified();
             $reviewAssignmentDao->updateReviewAssignment($reviewAssignment);
             // Add log
             import('paper.log.PaperLog');
             import('paper.log.PaperEventLogEntry');
             $entry = new PaperEventLogEntry();
             $entry->setPaperId($reviewAssignment->getPaperId());
             $entry->setUserId($reviewer->getId());
             $entry->setDateLogged(Core::getCurrentDate());
             $entry->setEventType(PAPER_LOG_REVIEW_RECOMMENDATION);
             $entry->setLogMessage('log.review.reviewRecommendationSet', array('reviewerName' => $reviewer->getFullName(), 'paperId' => $reviewAssignment->getPaperId(), 'stage' => $reviewAssignment->getStage()));
             $entry->setAssocType(LOG_TYPE_REVIEW);
             $entry->setAssocId($reviewAssignment->getId());
             PaperLog::logEventEntry($reviewAssignment->getPaperId(), $entry);
         } else {
             if (!Request::getUserVar('continued')) {
                 $assignedDirectors = $email->toAssignedDirectors($reviewerSubmission->getPaperId());
                 $reviewingTrackDirectors = $email->toAssignedTrackDirectors($reviewerSubmission->getPaperId());
                 if (empty($assignedDirectors) && empty($reviewingTrackDirectors)) {
                     $schedConf =& Request::getSchedConf();
                     $email->addRecipient($schedConf->getSetting('contactEmail'), $schedConf->getSetting('contactName'));
                     $editorialContactName = $schedConf->getSetting('contactName');
                 } else {
                     if (!empty($reviewingTrackDirectors)) {
                         $editorialContact = array_shift($reviewingTrackDirectors);
                     } else {
                         $editorialContact = array_shift($assignedDirectors);
                     }
                     $editorialContactName = $editorialContact->getDirectorFullName();
                 }
                 $reviewerRecommendationOptions =& ReviewAssignment::getReviewerRecommendationOptions();
                 $email->assignParams(array('editorialContactName' => $editorialContactName, 'reviewerName' => $reviewer->getFullName(), 'paperTitle' => strip_tags($reviewerSubmission->getLocalizedTitle()), 'recommendation' => Locale::translate($reviewerRecommendationOptions[$recommendation])));
             }
             $email->displayEditForm(Request::url(null, null, 'reviewer', 'recordRecommendation'), array('reviewId' => $reviewerSubmission->getReviewId(), 'recommendation' => $recommendation));
             return false;
         }
     }
     return true;
 }
开发者ID:jalperin,项目名称:ocs,代码行数:75,代码来源:ReviewerAction.inc.php


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