classes/author/form/submit/AuthorSubmitStep5Form.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 import("author.form.submit.AuthorSubmitForm");
00018 
00019 class AuthorSubmitStep5Form extends AuthorSubmitForm {
00020 
00024    function AuthorSubmitStep5Form($paper) {
00025       parent::AuthorSubmitForm($paper, 5);
00026    }
00027 
00031    function display() {
00032       $templateMgr =& TemplateManager::getManager();
00033 
00034       // Get paper file for this paper
00035       $paperFileDao =& DAORegistry::getDAO('PaperFileDAO');
00036       $paperFiles =& $paperFileDao->getPaperFilesByPaper($this->paperId);
00037 
00038       $templateMgr->assign_by_ref('files', $paperFiles);
00039       $templateMgr->assign_by_ref('conference', Request::getConference());
00040 
00041       parent::display();
00042    }
00043 
00047    function execute() {
00048       $paperDao =& DAORegistry::getDAO('PaperDAO');
00049       $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
00050 
00051       $conference = Request::getConference();
00052       $schedConf = Request::getSchedConf();
00053 
00054       // Update paper
00055       $paper =& $this->paper;
00056       $paper->setDateSubmitted(Core::getCurrentDate());
00057       $paper->setSubmissionProgress(0);
00058       $paper->stampStatusModified();
00059 
00060       // We've collected the paper now -- bump the review progress
00061       if ($this->paper->getSubmissionFileId() != null) {
00062          $paper->setCurrentStage(REVIEW_STAGE_PRESENTATION);
00063       }
00064 
00065       $paperDao->updatePaper($paper);
00066 
00067       // Designate this as the review version by default.
00068       $authorSubmissionDao =& DAORegistry::getDAO('AuthorSubmissionDAO');
00069       $authorSubmission =& $authorSubmissionDao->getAuthorSubmission($paper->getId());
00070       AuthorAction::designateReviewVersion($authorSubmission);
00071       unset($authorSubmission);
00072 
00073       // Update any review assignments so they may access the file
00074       $authorSubmission =& $authorSubmissionDao->getAuthorSubmission($paper->getId());
00075       $reviewAssignments =& $reviewAssignmentDao->getReviewAssignmentsByPaperId($paper->getId(), REVIEW_STAGE_PRESENTATION);
00076       foreach($reviewAssignments as $reviewAssignment) {
00077          $reviewAssignment->setReviewFileId($authorSubmission->getReviewFileId());
00078          $reviewAssignmentDao->updateReviewAssignment($reviewAssignment);
00079       }
00080 
00081       $reviewMode = $authorSubmission->getReviewMode();
00082       $user =& Request::getUser();
00083 
00084       if ($reviewMode == REVIEW_MODE_BOTH_SIMULTANEOUS || $reviewMode == REVIEW_MODE_PRESENTATIONS_ALONE) {
00085          // Editors have not yet been assigned; assign them.
00086          $this->assignDirectors($paper);
00087       }
00088 
00089       $this->confirmSubmission($paper, $user, $schedConf, $conference, $reviewMode == REVIEW_MODE_BOTH_SEQUENTIAL?'SUBMISSION_UPLOAD_ACK':'SUBMISSION_ACK');
00090 
00091       import('paper.log.PaperLog');
00092       import('paper.log.PaperEventLogEntry');
00093       PaperLog::logEvent($this->paperId, PAPER_LOG_PRESENTATION_SUBMIT, LOG_TYPE_AUTHOR, $user->getId(), 'log.author.presentationSubmitted', array('submissionId' => $paper->getId(), 'authorName' => $user->getFullName()));
00094 
00095       return $this->paperId;
00096    }
00097 
00098 }
00099 
00100 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7