예제 #1
0
 /**
  * Internal function to return a ReviewerSubmission object from a row.
  * @param $row array
  * @param $assignedReviewer bool
  * @param $single bool
  * @return ReviewerSubmission
  */
 function &_returnReviewerSubmissionFromRow(&$row, $assignedReviewer = true, $single = false)
 {
     $reviewerSubmission = new ReviewerSubmission();
     // Reviewer
     if ($assignedReviewer) {
         $reviewerSubmission->setReviewerId($row['reviewer_id']);
         if (isset($row['first_name']) && isset($row['last_name'])) {
             $reviewerSubmission->setReviewerFullName($row['first_name'] . ' ' . $row['last_name']);
         }
     }
     // Files
     import('classes.file.ArticleFileManager');
     $reviewerSubmission->setSubmissionFile($this->articleFileDao->getArticleFile($row['submission_file_id']));
     $reviewerSubmission->setRevisedFile($this->articleFileDao->getArticleFile($row['revised_file_id']));
     $reviewerSubmission->setReportFiles($this->articleFileDao->getArticleFilesByType($row['article_id'], ARTICLE_FILE_REPORT));
     $reviewerSubmission->setSAEFiles($this->articleFileDao->getArticleFilesByType($row['article_id'], ARTICLE_FILE_SAE));
     $reviewerSubmission->setSuppFiles($this->suppFileDao->getSuppFilesByArticle($row['article_id']));
     $reviewerSubmission->setReviewFile($this->articleFileDao->getArticleFile($row['review_file_id']));
     if (isset($row['reviewer_file_id'])) {
         $reviewerSubmission->setReviewerFile($this->articleFileDao->getArticleFile($row['reviewer_file_id']));
     }
     // Comments
     if (isset($row['review_id'])) {
         $reviewerSubmission->setMostRecentPeerReviewComment($this->articleCommentDao->getMostRecentArticleComment($row['article_id'], COMMENT_TYPE_PEER_REVIEW, $row['review_id']));
     }
     // Committee Decisions
     $reviewerSubmission->setDecisionsAndAssignments($this->sectionDecisionDao->getSectionDecisionsByArticleId($row['article_id']));
     // Article attributes
     $this->articleDao->_articleFromRow($reviewerSubmission, $row, $single);
     HookRegistry::call('ReviewerSubmissionDAO::_returnReviewerSubmissionFromRow', array(&$reviewerSubmission, &$row, $single));
     return $reviewerSubmission;
 }