step = $step; $this->paper = $paper; $this->paperId = $paper ? $paper->getPaperId() : null; } /** * Display the form. */ function display() { $templateMgr = &TemplateManager::getManager(); $templateMgr->assign('sidebarTemplate', 'presenter/submit/submitSidebar.tpl'); $templateMgr->assign('paperId', $this->paperId); $templateMgr->assign('submitStep', $this->step); switch($this->step) { case '2': $helpTopicId = 'submission.indexingAndMetadata'; break; case '4': $helpTopicId = 'submission.supplementaryFiles'; break; default: $helpTopicId = 'submission.index'; } $templateMgr->assign('helpTopicId', $helpTopicId); $schedConf = &Request::getSchedConf(); $settingsDao = &DAORegistry::getDAO('SchedConfSettingsDAO'); $templateMgr->assign_by_ref('schedConfSettings', $settingsDao->getSchedConfSettings($schedConf->getSchedConfId(), true)); // Determine which submission steps should be shown $progress = isset($this->paper) ? $this->paper->getCurrentStage() : REVIEW_STAGE_ABSTRACT; $reviewMode = $schedConf->getSetting('reviewMode'); $showAbstractSteps = $progress == REVIEW_STAGE_ABSTRACT || $reviewMode != REVIEW_MODE_BOTH_SEQUENTIAL; $showPaperSteps = $progress == REVIEW_STAGE_PRESENTATION || $reviewMode == REVIEW_MODE_BOTH_SIMULTANEOUS; $templateMgr->assign('showAbstractSteps', $showAbstractSteps); $templateMgr->assign('showPaperSteps', $showPaperSteps); if (isset($this->paper)) { $templateMgr->assign('submissionProgress', $this->paper->getSubmissionProgress()); } parent::display(); } function confirmSubmission(&$paper, &$user, &$schedConf, $conference, $mailTemplate = 'SUBMISSION_ACK') { // Update search index import('search.PaperSearchIndex'); PaperSearchIndex::indexPaperMetadata($paper); PaperSearchIndex::indexPaperFiles($paper); // Send presenter notification email import('mail.PaperMailTemplate'); $mail = &new PaperMailTemplate($paper, $mailTemplate); $mail->setFrom($schedConf->getSetting('contactEmail', true), $schedConf->getSetting('contactName', true)); if ($mail->isEnabled()) { $mail->addRecipient($user->getEmail(), $user->getFullName()); // If necessary, BCC the acknowledgement to someone. if($conference->getSetting('copySubmissionAckPrimaryContact')) { $mail->addBcc( $schedConf->getSetting('contactEmail', true), $schedConf->getSetting('contactName', true) ); } if($conference->getSetting('copySubmissionAckSpecified')) { $copyAddress = $conference->getSetting('copySubmissionAckAddress'); if (!empty($copyAddress)) $mail->addBcc($copyAddress); } $mail->assignParams(array( 'presenterName' => $user->getFullName(), 'presenterUsername' => $user->getUsername(), 'editorialContactSignature' => $schedConf->getSetting('contactName', true) . "\n" . $conference->getTitle(), 'submissionUrl' => Request::url(null, null, 'presenter', 'submission', $paper->getPaperId()) )); $mail->send(); } } function assignDirectors(&$paper) { $trackId = $paper->getTrackId(); $schedConf =& Request::getSchedConf(); $trackDirectorsDao =& DAORegistry::getDAO('TrackDirectorsDAO'); $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO'); $trackDirectors =& $trackDirectorsDao->getDirectorsByTrackId($schedConf->getSchedConfId(), $trackId); foreach ($trackDirectors as $trackDirector) { $editAssignment =& new EditAssignment(); $editAssignment->setPaperId($paper->getPaperId()); $editAssignment->setDirectorId($trackDirector->getUserId()); $editAssignmentDao->insertEditAssignment($editAssignment); unset($editAssignment); } } } ?>