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

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 import("author.form.submit.AuthorSubmitForm");
00018 
00019 class AuthorSubmitStep2Form extends AuthorSubmitForm {
00023    function AuthorSubmitStep2Form($paper) {
00024       parent::AuthorSubmitForm($paper, 2);
00025 
00026       // Validation checks for this form
00027    }
00028 
00032    function initData() {
00033       if (isset($this->paper)) {
00034          $paper =& $this->paper;
00035          $this->_data = array(
00036          );
00037       }
00038    }
00039 
00043    function readInputData() {
00044       $this->readUserVars(
00045          array(
00046          )
00047       );
00048    }
00049 
00053    function display() {
00054       $templateMgr =& TemplateManager::getManager();
00055 
00056       // Get supplementary files for this paper
00057       $paperFileDao =& DAORegistry::getDAO('PaperFileDAO');
00058       if ($this->paper->getSubmissionFileId() != null) {
00059          $templateMgr->assign_by_ref('submissionFile', $paperFileDao->getPaperFile($this->paper->getSubmissionFileId()));
00060       }
00061       parent::display();
00062    }
00063 
00069    function uploadSubmissionFile($fileName) {
00070       import("file.PaperFileManager");
00071 
00072       $paperFileManager = new PaperFileManager($this->paperId);
00073       $paperDao =& DAORegistry::getDAO('PaperDAO');
00074 
00075       if ($paperFileManager->uploadError($fileName)) return false;
00076 
00077       if ($paperFileManager->uploadedFileExists($fileName)) {
00078          // upload new submission file, overwriting previous if necessary
00079          $submissionFileId = $paperFileManager->uploadSubmissionFile($fileName, $this->paper->getSubmissionFileId(), true);
00080       }
00081 
00082       if (isset($submissionFileId)) {
00083          $this->paper->setSubmissionFileId($submissionFileId);
00084          $paperDao->updatePaper($this->paper);
00085          return true;
00086       } else {
00087          return false;
00088       }
00089    }
00090 
00095    function execute() {
00096       // Update paper
00097       $paperDao =& DAORegistry::getDAO('PaperDAO');
00098       $paper =& $this->paper;
00099 
00100       if ($paper->getSubmissionProgress() <= $this->step) {
00101          $schedConf =& Request::getSchedConf();
00102 
00103          $paper->stampStatusModified();
00104          if ($paper->getReviewMode() == REVIEW_MODE_BOTH_SEQUENTIAL) {
00105             $nextStep = $schedConf->getSetting('acceptSupplementaryReviewMaterials') ? 4:5;
00106             $paper->setSubmissionProgress($nextStep);
00107          } else {
00108             $paper->setSubmissionProgress($this->step + 1);
00109          }
00110 
00111          $paperDao->updatePaper($paper);
00112       }
00113 
00114       return $this->paperId;
00115    }
00116 }
00117 
00118 ?>

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