/** * View conference event log. */ function conferenceEventLog($args) { $logId = isset($args[0]) ? (int) $args[0] : 0; $this->validate(); $conference =& Request::getConference(); $this->setupTemplate(true); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign_by_ref('conference', $conference); if ($logId) { $logDao =& DAORegistry::getDAO('ConferenceEventLogDAO'); $logEntry =& $logDao->getLogEntry($logId); if ($logEntry && $logEntry->getConferenceId() != $conference->getId()) { Request::redirect(null, null, null, 'index'); } } if (isset($logEntry)) { $templateMgr->assign('logEntry', $logEntry); $templateMgr->display('manager/conferenceEventLogEntry.tpl'); } else { $rangeInfo =& Handler::getRangeInfo('eventLogEntries', array()); import('conference.log.ConferenceLog'); while (true) { $eventLogEntries =& ConferenceLog::getEventLogEntries($conference->getId(), null, $rangeInfo); if ($eventLogEntries->isInBounds()) { break; } unset($rangeInfo); $rangeInfo =& $eventLogEntries->getLastPageRangeInfo(); unset($eventLogEntries); } $templateMgr->assign('eventLogEntries', $eventLogEntries); $templateMgr->display('manager/conferenceEventLog.tpl'); } }
/** * Add a new event log entry with the specified parameters, including log level. * @param $conferenceId int * @param $schedConfId int * @param $logLevel char * @param $eventType int * @param $assocType int * @param $assocId int * @param $messageKey string * @param $messageParams array */ function logEventLevel($conferenceId, $schedConfId, $logLevel, $eventType, $assocType = 0, $assocId = 0, $messageKey = null, $messageParams = array()) { $entry = new ConferenceEventLogEntry(); $entry->setLogLevel($logLevel); $entry->setEventType($eventType); $entry->setAssocType($assocType); $entry->setAssocId($assocId); if (isset($messageKey)) { $entry->setLogMessage($messageKey, $messageParams); } return ConferenceLog::logEventEntry($conferenceId, $schedConfId, $entry); }
/** * Save track. */ function execute() { $schedConfDao =& DAORegistry::getDao('SchedConfDAO'); $schedConf =& Request::getSchedConf(); import('classes.conference.log.ConferenceLog'); import('classes.conference.log.ConferenceEventLogEntry'); // // Don't log these, since they aren't particularly nefarious. // // Website start date and end date. if ($schedConf->getStartDate() != $this->_data['siteStartDate']) { $schedConf->setStartDate($this->_data['siteStartDate']); $schedConfDao->updateSchedConf($schedConf); } if ($schedConf->getEndDate() != $this->_data['siteEndDate']) { $schedConf->setEndDate($this->_data['siteEndDate']); $schedConfDao->updateSchedConf($schedConf); } // Conference Information display flags $schedConf->updateSetting('postTimeline', $this->getData('postTimeline'), 'bool'); $schedConf->updateSetting('postOverview', $this->getData('postOverview'), 'bool'); $schedConf->updateSetting('postCFP', $this->getData('postCFP'), 'bool'); $schedConf->updateSetting('postProposalSubmission', $this->getData('postProposalSubmission'), 'bool'); $schedConf->updateSetting('postTrackPolicies', $this->getData('postTrackPolicies'), 'bool'); $schedConf->updateSetting('postProgram', $this->getData('postProgram'), 'bool'); $schedConf->updateSetting('postPresentations', $this->getData('postPresentations'), 'bool'); $schedConf->updateSetting('postAccommodation', $this->getData('postAccommodation'), 'bool'); $schedConf->updateSetting('postSupporters', $this->getData('postSupporters'), 'bool'); $schedConf->updateSetting('postPayment', $this->getData('postPayment'), 'bool'); // // Log the rest. // $dateFormatShort = Config::getVar('general', 'date_format_short'); // Physical scheduled conference start date and end date if ($schedConf->getSetting('startDate') != $this->_data['startDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.startDateChanged', array('oldStartDate' => strftime($dateFormatShort, $schedConf->getSetting('startDate')), 'newStartDate' => strftime($dateFormatShort, $this->_data['startDate']))); $schedConf->updateSetting('startDate', $this->_data['startDate'], 'date'); } if ($schedConf->getSetting('endDate') != $this->_data['endDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.endDateChanged', array('oldEndDate' => strftime($dateFormatShort, $schedConf->getSetting('endDate')), 'newEndDate' => strftime($dateFormatShort, $this->_data['endDate']))); $schedConf->updateSetting('endDate', $this->_data['endDate'], 'date'); } if ($schedConf->getSetting('regAuthorOpenDate') != $this->_data['regAuthorOpenDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.regAuthorOpenDateChanged', array('oldRegAuthorOpenDate' => strftime($dateFormatShort, $schedConf->getSetting('regAuthorOpenDate')), 'newRegAuthorOpenDate' => strftime($dateFormatShort, $this->_data['regAuthorOpenDate']))); $schedConf->updateSetting('regAuthorOpenDate', $this->_data['regAuthorOpenDate'], 'date'); } if ($schedConf->getSetting('regAuthorCloseDate') != $this->_data['regAuthorCloseDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.regAuthorCloseDateChanged', array('oldRegAuthorCloseDate' => strftime($dateFormatShort, $schedConf->getSetting('regAuthorCloseDate')), 'newRegAuthorCloseDate' => strftime($dateFormatShort, $this->_data['regAuthorCloseDate']))); $schedConf->updateSetting('regAuthorCloseDate', $this->_data['regAuthorCloseDate'], 'date'); } if ($schedConf->getSetting('showCFPDate') != $this->_data['showCFPDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.showCFPDateChanged', array('oldShowCFPDate' => strftime($dateFormatShort, $schedConf->getSetting('showCFPDate')), 'newShowCFPDate' => strftime($dateFormatShort, $this->_data['showCFPDate']))); $schedConf->updateSetting('showCFPDate', $this->_data['showCFPDate'], 'date'); } if ($schedConf->getSetting('submissionsOpenDate') != $this->_data['submissionsOpenDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.submissionsOpenDateChanged', array('oldSubmissionsOpenDate' => strftime($dateFormatShort, $schedConf->getSetting('submissionsOpenDate')), 'newSubmissionsOpenDate' => strftime($dateFormatShort, $this->_data['submissionsOpenDate']))); $schedConf->updateSetting('submissionsOpenDate', $this->_data['submissionsOpenDate'], 'date'); } if ($schedConf->getSetting('submissionsCloseDate') != $this->_data['submissionsCloseDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.submissionsCloseDateChanged', array('oldSubmissionsCloseDate' => strftime($dateFormatShort, $schedConf->getSetting('submissionsCloseDate')), 'newSubmissionsCloseDate' => strftime($dateFormatShort, $this->_data['submissionsCloseDate']))); $schedConf->updateSetting('submissionsCloseDate', $this->_data['submissionsCloseDate'], 'date'); } if ($schedConf->getSetting('regReviewerOpenDate') != $this->_data['regReviewerOpenDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.regReviewerOpenDateChanged', array('oldRegReviewerOpenDate' => strftime($dateFormatShort, $schedConf->getSetting('regReviewerOpenDate')), 'newRegReviewerOpenDate' => strftime($dateFormatShort, $this->_data['regReviewerOpenDate']))); $schedConf->updateSetting('regReviewerOpenDate', $this->_data['regReviewerOpenDate'], 'date'); } if ($schedConf->getSetting('regReviewerCloseDate') != $this->_data['regReviewerCloseDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.regReviewerCloseDateChanged', array('oldRegReviewerCloseDate' => strftime($dateFormatShort, $schedConf->getSetting('regReviewerCloseDate')), 'newRegReviewerCloseDate' => strftime($dateFormatShort, $this->_data['regReviewerCloseDate']))); $schedConf->updateSetting('regReviewerCloseDate', $this->_data['regReviewerCloseDate'], 'date'); } if ($schedConf->getSetting('postAbstractsDate') != $this->_data['postAbstractsDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.postAbstractsDateChanged', array('oldPostAbstractsDate' => strftime($dateFormatShort, $schedConf->getSetting('postAbstractsDate')), 'newPostAbstractsDate' => strftime($dateFormatShort, $this->_data['postAbstractsDate']))); $schedConf->updateSetting('postAbstractsDate', $this->_data['postAbstractsDate'], 'date'); } if ($schedConf->getSetting('postAbstracts') != $this->_data['postAbstracts']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.postAbstractsChanged', array('oldPostAbstracts' => Locale::translate($schedConf->getSetting('postAbstracts') ? 'common.true' : 'common.false'), 'newPostAbstracts' => Locale::translate($this->_data['postAbstracts']) ? 'common.true' : 'common.false')); $schedConf->updateSetting('postAbstracts', $this->_data['postAbstracts'], 'bool'); } if ($schedConf->getSetting('postScheduleDate') != $this->_data['postScheduleDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.postScheduleDateChanged', array('oldPostScheduleDate' => strftime($dateFormatShort, $schedConf->getSetting('postPapersDate')), 'newPostScheduleDate' => strftime($dateFormatShort, $this->_data['postPapersDate']))); $schedConf->updateSetting('postScheduleDate', $this->_data['postScheduleDate'], 'date'); } if ($schedConf->getSetting('postSchedule') != $this->_data['postSchedule']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.postScheduleChanged', array('oldPostSchedule' => Locale::translate($schedConf->getSetting('postSchedule') ? 'common.true' : 'common.false'), 'newPostSchedule' => Locale::translate($this->_data['postSchedule'] ? 'common.true' : 'common.false'))); $schedConf->updateSetting('postSchedule', $this->_data['postSchedule'], 'bool'); } if ($schedConf->getSetting('postPapersDate') != $this->_data['postPapersDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.postPapersDateChanged', array('oldPostPapersDate' => strftime($dateFormatShort, $schedConf->getSetting('postPapersDate')), 'newPostPapersDate' => strftime($dateFormatShort, $this->_data['postPapersDate']))); $schedConf->updateSetting('postPapersDate', $this->_data['postPapersDate'], 'date'); } if ($schedConf->getSetting('postPapers') != $this->_data['postPapers']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.postPapersChanged', array('oldPostPapers' => Locale::translate($schedConf->getSetting('postPapers') ? 'common.true' : 'common.false'), 'newPostPapers' => Locale::translate($this->_data['postPapers'] ? 'common.true' : 'common.false'))); $schedConf->updateSetting('postPapers', $this->_data['postPapers'], 'bool'); } if ($schedConf->getSetting('delayOpenAccessDate') != $this->_data['delayOpenAccessDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.delayOpenAccessDateChanged', array('oldDelayOpenAccessDate' => strftime($dateFormatShort, $schedConf->getSetting('delayOpenAccessDate')), 'newDelayOpenAccessDate' => strftime($dateFormatShort, $this->_data['delayOpenAccessDate']))); $schedConf->updateSetting('delayOpenAccessDate', $this->_data['delayOpenAccessDate'], 'date'); } if ($schedConf->getSetting('delayOpenAccess') != $this->_data['delayOpenAccess']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.delayOpenAccessChanged', array('oldDelayOpenAccess' => Locale::translate($schedConf->getSetting('delayOpenAccess') ? 'common.true' : 'common.false'), 'newDelayOpenAccess' => Locale::translate($this->_data['delayOpenAccess'] ? 'common.true' : 'common.false'))); $schedConf->updateSetting('delayOpenAccess', $this->_data['delayOpenAccess'], 'bool'); } if ($schedConf->getSetting('closeCommentsDate') != $this->_data['closeCommentsDate']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.closeCommentsDateChanged', array('oldCloseCommentsDate' => strftime($dateFormatShort, $schedConf->getSetting('closeCommentsDate')), 'newCloseCommentsDate' => strftime($dateFormatShort, $this->_data['closeCommentsDate']))); $schedConf->updateSetting('closeCommentsDate', $this->_data['closeCommentsDate'], 'date'); } if ($schedConf->getSetting('closeComments') != $this->_data['closeComments']) { ConferenceLog::logEvent($schedConf->getConferenceId(), $schedConf->getId(), CONFERENCE_LOG_CONFIGURATION, LOG_TYPE_DEFAULT, 0, 'log.timeline.closeCommentsChanged', array('oldCloseComments' => Locale::translate($schedConf->getSetting('closeComments') ? 'common.true' : 'common.false'), 'newCloseComments' => Locale::translate($this->_data['closeComments'] ? 'common.true' : 'common.false'))); $schedConf->updateSetting('closeComments', $this->_data['closeComments'], 'bool'); } }