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


PHP ReviewAssignment::getReviewerRatingOptions方法代码示例

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


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

示例1: submissionReview

 function submissionReview($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     list($journal, $submission) = SubmissionEditHandler::validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     parent::setupTemplate(true, $articleId);
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     // Setting the round.
     $round = isset($args[1]) ? $args[1] : $submission->getCurrentRound();
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sections =& $sectionDao->getJournalSections($journal->getJournalId());
     $showPeerReviewOptions = $round == $submission->getCurrentRound() && $submission->getReviewFile() != null ? true : false;
     $editorDecisions = $submission->getDecisions($round);
     $lastDecision = count($editorDecisions) >= 1 ? $editorDecisions[count($editorDecisions) - 1]['decision'] : null;
     $editAssignments =& $submission->getEditAssignments();
     $allowRecommendation = $submission->getCurrentRound() == $round && $submission->getReviewFileId() != null && !empty($editAssignments);
     $allowResubmit = $lastDecision == SUBMISSION_EDITOR_DECISION_RESUBMIT && $sectionEditorSubmissionDao->getMaxReviewRound($articleId) == $round ? true : false;
     $allowCopyedit = $lastDecision == SUBMISSION_EDITOR_DECISION_ACCEPT && $submission->getCopyeditFileId() == null ? true : false;
     // Prepare an array to store the 'Notify Reviewer' email logs
     $notifyReviewerLogs = array();
     foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
         $notifyReviewerLogs[$reviewAssignment->getReviewId()] = array();
     }
     // Parse the list of email logs and populate the array.
     import('article.log.ArticleLog');
     $emailLogEntries =& ArticleLog::getEmailLogEntries($articleId);
     foreach ($emailLogEntries->toArray() as $emailLog) {
         if ($emailLog->getEventType() == ARTICLE_EMAIL_REVIEW_NOTIFY_REVIEWER) {
             if (isset($notifyReviewerLogs[$emailLog->getAssocId()]) && is_array($notifyReviewerLogs[$emailLog->getAssocId()])) {
                 array_push($notifyReviewerLogs[$emailLog->getAssocId()], $emailLog);
             }
         }
     }
     // get journal published review form titles
     $reviewFormTitles =& $reviewFormDao->getJournalReviewFormTitles($journal->getJournalId(), 1);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses = array();
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $reviewFormTitles = array();
     foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
         $reviewForm =& $reviewFormDao->getReviewForm($reviewAssignment->getReviewFormId());
         if ($reviewForm) {
             $reviewFormTitles[$reviewForm->getReviewFormId()] = $reviewForm->getReviewFormTitle();
         }
         unset($reviewForm);
         $reviewFormResponses[$reviewAssignment->getReviewId()] = $reviewFormResponseDao->reviewFormResponseExists($reviewAssignment->getReviewId());
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewIndexes', $reviewAssignmentDao->getReviewIndexesForRound($articleId, $round));
     $templateMgr->assign('round', $round);
     $templateMgr->assign_by_ref('reviewAssignments', $submission->getReviewAssignments($round));
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewFormTitles', $reviewFormTitles);
     $templateMgr->assign_by_ref('notifyReviewerLogs', $notifyReviewerLogs);
     $templateMgr->assign_by_ref('submissionFile', $submission->getSubmissionFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('reviewFile', $submission->getReviewFile());
     $templateMgr->assign_by_ref('copyeditFile', $submission->getCopyeditFile());
     $templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
     $templateMgr->assign_by_ref('editorFile', $submission->getEditorFile());
     $templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
     $templateMgr->assign('showPeerReviewOptions', $showPeerReviewOptions);
     $templateMgr->assign_by_ref('sections', $sections->toArray());
     $templateMgr->assign('editorDecisionOptions', array('' => 'common.chooseOne', SUBMISSION_EDITOR_DECISION_ACCEPT => 'editor.article.decision.accept', SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS => 'editor.article.decision.pendingRevisions', SUBMISSION_EDITOR_DECISION_RESUBMIT => 'editor.article.decision.resubmit', SUBMISSION_EDITOR_DECISION_DECLINE => 'editor.article.decision.decline'));
     $templateMgr->assign_by_ref('lastDecision', $lastDecision);
     import('submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign_by_ref('reviewerRatingOptions', ReviewAssignment::getReviewerRatingOptions());
     $templateMgr->assign('allowRecommendation', $allowRecommendation);
     $templateMgr->assign('allowResubmit', $allowResubmit);
     $templateMgr->assign('allowCopyedit', $allowCopyedit);
     $templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole.review');
     $templateMgr->display('sectionEditor/submissionReview.tpl');
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:76,代码来源:SubmissionEditHandler.inc.php

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

示例3: submissionReview

 function submissionReview($args, $request)
 {
     $paperId = (int) array_shift($args);
     $this->validate($request, $paperId, TRACK_DIRECTOR_ACCESS_REVIEW);
     $conference =& $request->getConference();
     $schedConf =& $request->getSchedConf();
     $submission =& $this->submission;
     $round = (int) array_shift($args);
     $reviewMode = $submission->getReviewMode();
     switch ($reviewMode) {
         case REVIEW_MODE_ABSTRACTS_ALONE:
             $round = REVIEW_ROUND_ABSTRACT;
             break;
         case REVIEW_MODE_BOTH_SIMULTANEOUS:
         case REVIEW_MODE_PRESENTATIONS_ALONE:
             $round = REVIEW_ROUND_PRESENTATION;
             break;
         case REVIEW_MODE_BOTH_SEQUENTIAL:
             if ($round != REVIEW_ROUND_ABSTRACT && $round != REVIEW_ROUND_PRESENTATION) {
                 $round = $submission->getCurrentRound();
             }
             break;
     }
     $this->setupTemplate($request, true, $paperId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $trackDao =& DAORegistry::getDAO('TrackDAO');
     $tracks =& $trackDao->getSchedConfTracks($schedConf->getId());
     $directorDecisions = $submission->getDecisions($round);
     $lastDecision = count($directorDecisions) >= 1 ? $directorDecisions[count($directorDecisions) - 1]['decision'] : null;
     $editAssignments =& $submission->getEditAssignments();
     $isCurrent = $round == $submission->getCurrentRound();
     $showPeerReviewOptions = $isCurrent && $submission->getReviewFile() != null ? true : false;
     $allowRecommendation = ($isCurrent || $round == REVIEW_ROUND_ABSTRACT && $reviewMode == REVIEW_MODE_BOTH_SEQUENTIAL) && !empty($editAssignments);
     $reviewingAbstractOnly = $reviewMode == REVIEW_MODE_BOTH_SEQUENTIAL && $round == REVIEW_ROUND_ABSTRACT || $reviewMode == REVIEW_MODE_ABSTRACTS_ALONE;
     // Prepare an array to store the 'Notify Reviewer' email logs
     $notifyReviewerLogs = array();
     if ($submission->getReviewAssignments($round)) {
         foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
             $notifyReviewerLogs[$reviewAssignment->getId()] = array();
         }
     }
     // Parse the list of email logs and populate the array.
     import('classes.paper.log.PaperLog');
     $emailLogEntries =& PaperLog::getEmailLogEntries($paperId);
     foreach ($emailLogEntries->toArray() as $emailLog) {
         if ($emailLog->getEventType() == PAPER_EMAIL_REVIEW_NOTIFY_REVIEWER) {
             if (isset($notifyReviewerLogs[$emailLog->getAssocId()]) && is_array($notifyReviewerLogs[$emailLog->getAssocId()])) {
                 array_push($notifyReviewerLogs[$emailLog->getAssocId()], $emailLog);
             }
         }
     }
     // get conference published review form titles
     $reviewFormTitles =& $reviewFormDao->getTitlesByAssocId(ASSOC_TYPE_CONFERENCE, $conference->getId(), 1);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses = array();
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $reviewFormTitles = array();
     if ($submission->getReviewAssignments($round)) {
         foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
             $reviewForm =& $reviewFormDao->getReviewForm($reviewAssignment->getReviewFormId());
             if ($reviewForm) {
                 $reviewFormTitles[$reviewForm->getId()] = $reviewForm->getLocalizedTitle();
             }
             unset($reviewForm);
             $reviewFormResponses[$reviewAssignment->getId()] = $reviewFormResponseDao->reviewFormResponseExists($reviewAssignment->getId());
         }
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewIndexes', $reviewAssignmentDao->getReviewIndexesForRound($paperId, $round));
     $templateMgr->assign('round', $round);
     $templateMgr->assign_by_ref('reviewAssignments', $submission->getReviewAssignments($round));
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewFormTitles', $reviewFormTitles);
     $templateMgr->assign_by_ref('notifyReviewerLogs', $notifyReviewerLogs);
     $templateMgr->assign_by_ref('submissionFile', $submission->getSubmissionFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('reviewFile', $submission->getReviewFile());
     $templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
     $templateMgr->assign_by_ref('directorFile', $submission->getDirectorFile());
     $templateMgr->assign('rateReviewerOnQuality', $schedConf->getSetting('rateReviewerOnQuality'));
     $templateMgr->assign('showPeerReviewOptions', $showPeerReviewOptions);
     $templateMgr->assign_by_ref('tracks', $tracks->toArray());
     $templateMgr->assign_by_ref('directorDecisionOptions', TrackDirectorSubmission::getDirectorDecisionOptions());
     $templateMgr->assign_by_ref('lastDecision', $lastDecision);
     $templateMgr->assign_by_ref('directorDecisions', $directorDecisions);
     if ($reviewMode != REVIEW_MODE_BOTH_SEQUENTIAL || $round == REVIEW_ROUND_PRESENTATION) {
         $templateMgr->assign('isFinalReview', true);
     }
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign_by_ref('reviewerRatingOptions', ReviewAssignment::getReviewerRatingOptions());
     $templateMgr->assign('isCurrent', $isCurrent);
     $templateMgr->assign('allowRecommendation', $allowRecommendation);
     $templateMgr->assign('reviewingAbstractOnly', $reviewingAbstractOnly);
     $templateMgr->assign('helpTopicId', 'editorial.trackDirectorsRole.review');
     $controlledVocabDao =& DAORegistry::getDAO('ControlledVocabDAO');
     $templateMgr->assign('sessionTypes', $controlledVocabDao->enumerateBySymbolic('sessionTypes', ASSOC_TYPE_SCHED_CONF, $schedConf->getId()));
     $templateMgr->display('trackDirector/submissionReview.tpl');
//.........这里部分代码省略.........
开发者ID:ramonsodoma,项目名称:ocs,代码行数:101,代码来源:SubmissionEditHandler.inc.php

示例4: submissionReview


//.........这里部分代码省略.........
     //%CBP% Display is an article has been marked as creatively complete or not
     $templateMgr->assign_by_ref('creativelyComplete', $CBPPlatformDao->getArticleCreativelyComplete($articleId));
     $templateMgr->assign_by_ref('editorAttention', $CBPPlatformDao->getAuthorRequestEditorAttention($articleId));
     //has an author requested editor attention?
     $workshop = $CBPPlatformDao->getWorkshop($journal->getJournalId());
     if ($workshop != "structured") {
         //%CBP% Get reviewer comments and display to author
         $articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
         $reviewerComments = $CBPPlatformDao->getReviewerComments($articleId, null, null, 0);
         foreach ($reviewerComments as &$reviewRound) {
             foreach ($reviewRound as &$reviewerComment) {
                 if ($reviewerComment['reviewer_file_id']) {
                     $reviewerComment['articleFile'] = $articleFileDao->getArticleFile($reviewerComment['reviewer_file_id']);
                 }
             }
         }
         $templateMgr->assign_by_ref('reviewerComments', $reviewerComments);
         if ($workshop == "workshop") {
             $templateMgr->assign_by_ref('workshop', $workshop = "workshop");
         } else {
             $templateMgr->assign_by_ref('workshop', $workshop = 1);
         }
     }
     // Setting the round.
     $round = isset($args[1]) ? $args[1] : $submission->getCurrentRound();
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sections =& $sectionDao->getJournalSections($journal->getId());
     $showPeerReviewOptions = $round == $submission->getCurrentRound() && $submission->getReviewFile() != null ? true : false;
     $editorDecisions = $submission->getDecisions($round);
     $lastDecision = count($editorDecisions) >= 1 ? $editorDecisions[count($editorDecisions) - 1]['decision'] : null;
     $lastDecisionMaker = count($editorDecisions) >= 1 ? $editorDecisions[count($editorDecisions) - 1]['editorId'] : null;
     $decisionMaker = $userDao->getUser($lastDecisionMaker);
     if ($decisionMaker) {
         $lastDecisionMaker = $decisionMaker->getFullName();
     }
     $editAssignments =& $submission->getEditAssignments();
     $allowRecommendation = $submission->getCurrentRound() == $round && $submission->getReviewFileId() != null && !empty($editAssignments);
     //%CBP% fixing bug for workshops, which was enabling decisions to be made after the intial decision was made
     if ($lastDecision == SUBMISSION_EDITOR_DECISION_ACCEPT) {
         //$allowRecommendation = false;
     }
     $allowResubmit = $lastDecision == SUBMISSION_EDITOR_DECISION_RESUBMIT && $sectionEditorSubmissionDao->getMaxReviewRound($articleId) == $round ? true : false;
     $allowCopyedit = $lastDecision == SUBMISSION_EDITOR_DECISION_ACCEPT && $submission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL', true) == null ? true : false;
     // Prepare an array to store the 'Notify Reviewer' email logs
     $notifyReviewerLogs = array();
     foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
         $notifyReviewerLogs[$reviewAssignment->getId()] = array();
     }
     // Parse the list of email logs and populate the array.
     import('classes.article.log.ArticleLog');
     $emailLogEntries =& ArticleLog::getEmailLogEntries($articleId);
     foreach ($emailLogEntries->toArray() as $emailLog) {
         if ($emailLog->getEventType() == ARTICLE_EMAIL_REVIEW_NOTIFY_REVIEWER) {
             if (isset($notifyReviewerLogs[$emailLog->getAssocId()]) && is_array($notifyReviewerLogs[$emailLog->getAssocId()])) {
                 array_push($notifyReviewerLogs[$emailLog->getAssocId()], $emailLog);
             }
         }
     }
     // get journal published review form titles
     $reviewFormTitles =& $reviewFormDao->getTitlesByAssocId(ASSOC_TYPE_JOURNAL, $journal->getId(), 1);
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses = array();
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $reviewFormTitles = array();
     foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
         $reviewForm =& $reviewFormDao->getReviewForm($reviewAssignment->getReviewFormId());
         if ($reviewForm) {
             $reviewFormTitles[$reviewForm->getId()] = $reviewForm->getLocalizedTitle();
         }
         unset($reviewForm);
         $reviewFormResponses[$reviewAssignment->getId()] = $reviewFormResponseDao->reviewFormResponseExists($reviewAssignment->getId());
     }
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewIndexes', $reviewAssignmentDao->getReviewIndexesForRound($articleId, $round));
     $templateMgr->assign('round', $round);
     $templateMgr->assign_by_ref('reviewAssignments', $submission->getReviewAssignments($round));
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewFormTitles', $reviewFormTitles);
     $templateMgr->assign_by_ref('notifyReviewerLogs', $notifyReviewerLogs);
     $templateMgr->assign_by_ref('submissionFile', $submission->getSubmissionFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('reviewFile', $submission->getReviewFile());
     $templateMgr->assign_by_ref('copyeditFile', $submission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL'));
     $templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
     $templateMgr->assign_by_ref('editorFile', $submission->getEditorFile());
     $templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
     $templateMgr->assign('showPeerReviewOptions', $showPeerReviewOptions);
     $templateMgr->assign_by_ref('sections', $sections->toArray());
     $templateMgr->assign('editorDecisionOptions', SectionEditorSubmission::getEditorDecisionOptions());
     $templateMgr->assign_by_ref('lastDecision', $lastDecision);
     $templateMgr->assign_by_ref('lastDecisionMaker', $lastDecisionMaker);
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign_by_ref('reviewerRatingOptions', ReviewAssignment::getReviewerRatingOptions());
     $templateMgr->assign('allowRecommendation', $allowRecommendation);
     $templateMgr->assign('allowResubmit', $allowResubmit);
     $templateMgr->assign('allowCopyedit', $allowCopyedit);
     $templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole.review');
     $templateMgr->display('sectionEditor/submissionReview.tpl');
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:101,代码来源:SubmissionEditHandler.inc.php

示例5: submissionReview

 /**
  * View the submission review page.
  * @param $args array
  * @param $request PKPRequest
  */
 function submissionReview($args, &$request)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $journal =& Request::getJournal();
     $submission =& $this->submission;
     $this->setupTemplate(true, $articleId);
     AppLocale::requireComponents(LOCALE_COMPONENT_OJS_MANAGER);
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     // Setting the round.
     $round = isset($args[1]) ? $args[1] : $submission->getCurrentRound();
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sections =& $sectionDao->getJournalSections($journal->getId());
     $showPeerReviewOptions = $round == $submission->getCurrentRound() && $submission->getReviewFile() != null ? true : false;
     $editorDecisions = $submission->getDecisions($round);
     $lastDecision = count($editorDecisions) >= 1 ? $editorDecisions[count($editorDecisions) - 1]['decision'] : null;
     $editAssignments =& $submission->getEditAssignments();
     $allowRecommendation = $submission->getCurrentRound() == $round && $submission->getReviewFileId() != null && !empty($editAssignments);
     $allowResubmit = $lastDecision == SUBMISSION_EDITOR_DECISION_RESUBMIT && $sectionEditorSubmissionDao->getMaxReviewRound($articleId) == $round ? true : false;
     $allowCopyedit = $lastDecision == SUBMISSION_EDITOR_DECISION_ACCEPT && $submission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL', true) == null ? true : false;
     // Prepare an array to store the 'Notify Reviewer' email logs
     $notifyReviewerLogs = array();
     foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
         $notifyReviewerLogs[$reviewAssignment->getId()] = array();
     }
     // Parse the list of email logs and populate the array.
     $emailLogDao =& DAORegistry::getDAO('ArticleEmailLogDAO');
     $emailLogEntries =& $emailLogDao->getByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     foreach ($emailLogEntries->toArray() as $emailLog) {
         if ($emailLog->getEventType() == ARTICLE_EMAIL_REVIEW_NOTIFY_REVIEWER) {
             if (isset($notifyReviewerLogs[$emailLog->getAssocId()]) && is_array($notifyReviewerLogs[$emailLog->getAssocId()])) {
                 array_push($notifyReviewerLogs[$emailLog->getAssocId()], $emailLog);
             }
         }
     }
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses = array();
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $reviewFormTitles = array();
     foreach ($submission->getReviewAssignments($round) as $reviewAssignment) {
         $reviewForm =& $reviewFormDao->getReviewForm($reviewAssignment->getReviewFormId());
         if ($reviewForm) {
             $reviewFormTitles[$reviewForm->getId()] = $reviewForm->getLocalizedTitle();
         }
         unset($reviewForm);
         $reviewFormResponses[$reviewAssignment->getId()] = $reviewFormResponseDao->reviewFormResponseExists($reviewAssignment->getId());
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign_by_ref('submission', $submission);
     $templateMgr->assign_by_ref('reviewIndexes', $reviewAssignmentDao->getReviewIndexesForRound($articleId, $round));
     $templateMgr->assign('round', $round);
     $templateMgr->assign_by_ref('reviewAssignments', $submission->getReviewAssignments($round));
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewFormTitles', $reviewFormTitles);
     $templateMgr->assign_by_ref('notifyReviewerLogs', $notifyReviewerLogs);
     $templateMgr->assign_by_ref('submissionFile', $submission->getSubmissionFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('reviewFile', $submission->getReviewFile());
     $templateMgr->assign_by_ref('copyeditFile', $submission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL'));
     $templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
     $templateMgr->assign_by_ref('editorFile', $submission->getEditorFile());
     $templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
     $templateMgr->assign('showPeerReviewOptions', $showPeerReviewOptions);
     $templateMgr->assign_by_ref('sections', $sections->toArray());
     $templateMgr->assign('editorDecisionOptions', SectionEditorSubmission::getEditorDecisionOptions());
     $templateMgr->assign_by_ref('lastDecision', $lastDecision);
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign_by_ref('reviewerRatingOptions', ReviewAssignment::getReviewerRatingOptions());
     $templateMgr->assign('allowRecommendation', $allowRecommendation);
     $templateMgr->assign('allowResubmit', $allowResubmit);
     $templateMgr->assign('allowCopyedit', $allowCopyedit);
     $templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole.review');
     $templateMgr->display('sectionEditor/submissionReview.tpl');
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:81,代码来源:SubmissionEditHandler.inc.php

示例6: submissionReview

 function submissionReview($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $journal =& Request::getJournal();
     $submission =& $this->submission;
     $this->setupTemplate(1, $articleId);
     $user =& Request::getUser();
     Locale::requireComponents(array(LOCALE_COMPONENT_OJS_MANAGER));
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sections =& $sectionDao->getJournalSections($journal->getId());
     $sectionDecisionDao =& DAORegistry::getDAO("SectionDecisionDAO");
     $lastDecision = $sectionDecisionDao->getLastSectionDecision($articleId);
     $reviewAssignments =& $lastDecision->getReviewAssignments();
     $articleMoreRecent = strtotime($submission->getLastModified()) > strtotime($lastDecision->getDateDecided()) ? true : false;
     $approvalNoticeDao =& DAORegistry::getDAO("ApprovalNoticeDAO");
     $templates =& $approvalNoticeDao->getApprovalNoticesByCommitteeAndTypeId($lastDecision->getSectionId(), $lastDecision->getReviewType());
     // Prepare an array to store the 'Notify Reviewer' email logs
     $notifyReviewerLogs = array();
     foreach ($reviewAssignments as $reviewAssignment) {
         $notifyReviewerLogs[$reviewAssignment->getId()] = array();
     }
     // Parse the list of email logs and populate the array.
     import('classes.article.log.ArticleLog');
     $emailLogEntries =& ArticleLog::getEmailLogEntries($articleId);
     foreach ($emailLogEntries->toArray() as $emailLog) {
         if ($emailLog->getEventType() == ARTICLE_EMAIL_REVIEW_NOTIFY_REVIEWER) {
             if (isset($notifyReviewerLogs[$emailLog->getAssocId()]) && is_array($notifyReviewerLogs[$emailLog->getAssocId()])) {
                 array_push($notifyReviewerLogs[$emailLog->getAssocId()], $emailLog);
             }
         }
     }
     $reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
     $reviewFormResponses = array();
     $reviewFormTitles = array();
     foreach ($reviewAssignments as $reviewAssignment) {
         $reviewForm =& $reviewFormDao->getReviewForm($reviewAssignment->getReviewFormId());
         if ($reviewForm) {
             $reviewFormTitles[$reviewForm->getId()] = $reviewForm->getLocalizedTitle();
         }
         unset($reviewForm);
         $reviewFormResponses[$reviewAssignment->getId()] = $reviewFormResponseDao->reviewFormResponseExists($reviewAssignment->getId());
     }
     $ercReviewersDao =& DAORegistry::getDAO('ErcReviewersDAO');
     $ercReviewers =& $ercReviewersDao->getReviewersBySectionId($journal->getId(), $lastDecision->getSectionId());
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('articleId', $submission->getArticleId());
     $templateMgr->assign('scientificTitle', $submission->getScientificTitle());
     $templateMgr->assign('submitter', $submission->getUser());
     $templateMgr->assign('commentsToEditor', $submission->getCommentsToEditor());
     $templateMgr->assign('dateSubmitted', $submission->getDateSubmitted());
     $templateMgr->assign('proposalStatus', $submission->getSubmissionStatus());
     $templateMgr->assign('withdrawComments', $submission->getWithdrawComments('en_US'));
     $templateMgr->assign('withdrawReason', $submission->getWithdrawReason('en_US'));
     $templateMgr->assign_by_ref('reviewers', $ercReviewers);
     $templateMgr->assign('proposalId', $submission->getProposalId());
     $templateMgr->assign_by_ref('reviewAssignmentCount', count($reviewAssignments));
     $templateMgr->assign_by_ref('reviewIndexes', $reviewAssignmentDao->getReviewIndexesForDecision($lastDecision->getId()));
     $templateMgr->assign_by_ref('reviewAssignments', $reviewAssignments);
     $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
     $templateMgr->assign('reviewFormTitles', $reviewFormTitles);
     $templateMgr->assign('sectionId', $submission->getSectionId());
     $templateMgr->assign('templates', $templates);
     $templateMgr->assign_by_ref('notifyReviewerLogs', $notifyReviewerLogs);
     $templateMgr->assign_by_ref('submissionFile', $submission->getSubmissionFile());
     $templateMgr->assign_by_ref('suppFiles', $submission->getSuppFiles());
     $templateMgr->assign_by_ref('reportFiles', $submission->getReportFiles());
     $templateMgr->assign_by_ref('saeFiles', $submission->getSAEFiles());
     $templateMgr->assign_by_ref('reviewFile', $submission->getReviewFile());
     $templateMgr->assign_by_ref('previousFiles', $submission->getPreviousFiles());
     $templateMgr->assign_by_ref('copyeditFile', $submission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL'));
     $templateMgr->assign_by_ref('revisedFile', $submission->getRevisedFile());
     $templateMgr->assign_by_ref('editorFile', $submission->getEditorFile());
     $templateMgr->assign_by_ref('sectionDecisions', $submission->getDecisions());
     $templateMgr->assign('rateReviewerOnQuality', $journal->getSetting('rateReviewerOnQuality'));
     $templateMgr->assign_by_ref('sections', $sections->toArray());
     $sectionDecisions = SectionEditorSubmission::getEditorDecisionOptions();
     $templateMgr->assign('sectionDecisionOptions', $sectionDecisions);
     import('classes.submission.common.Action');
     unset($sectionDecisions[SUBMISSION_SECTION_DECISION_DECLINED]);
     $templateMgr->assign('sectionDecisionOptionsWithoutDeclined', $sectionDecisions);
     $templateMgr->assign('initialReviewOptions', SectionEditorSubmission::getInitialReviewOptions());
     $reviewOptions = SectionEditorSubmission::getReviewOptions();
     $templateMgr->assign('reviewOptions', $reviewOptions);
     unset($reviewOptions[SUBMISSION_SECTION_DECISION_EXEMPTED]);
     $templateMgr->assign('reviewOptionsWithoutExempted', $reviewOptions);
     $templateMgr->assign('continuingReviewOptions', SectionEditorSubmission::getContinuingReviewOptions());
     $templateMgr->assign('articleMoreRecent', $articleMoreRecent);
     $templateMgr->assign('lastDecision', $lastDecision);
     import('classes.submission.reviewAssignment.ReviewAssignment');
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     $templateMgr->assign_by_ref('reviewerRatingOptions', ReviewAssignment::getReviewerRatingOptions());
     // Set up required Payment Related Information
     import('classes.payment.ojs.OJSPaymentManager');
     $paymentManager =& OJSPaymentManager::getManager();
     if ($paymentManager->submissionEnabled() || $paymentManager->fastTrackEnabled() || $paymentManager->publicationEnabled()) {
         $templateMgr->assign('authorFees', true);
         $completedPaymentDAO =& DAORegistry::getDAO('OJSCompletedPaymentDAO');
//.........这里部分代码省略.........
开发者ID:elavaud,项目名称:hrp_ct,代码行数:101,代码来源:SubmissionEditHandler.inc.php


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