_id = (int)$_id; return $this; } public function getId() { return $this->_id; } public function setName($_name) { $this->_name = (string)$_name; return $this; } public function getName() { return $this->_name; } public function setText($_text) { $this->_text = (string)$_text; return $this; } public function getText() { return $this->_text; } public function setResultText($_resultText) { $this->_resultText = $_resultText; return $this; } public function getResultText() { return $this->_resultText; } public function setTitleHidden($_titleHidden) { $this->_titleHidden = (bool)$_titleHidden; return $this; } public function isTitleHidden() { return $this->_titleHidden; } public function setQuestionRandom($_questionRandom) { $this->_questionRandom = (bool)$_questionRandom; return $this; } public function isQuestionRandom() { return $this->_questionRandom; } public function setAnswerRandom($_answerRandom) { $this->_answerRandom = (bool)$_answerRandom; return $this; } public function isAnswerRandom() { return $this->_answerRandom; } public function setTimeLimit($_timeLimit) { $this->_timeLimit = (int)$_timeLimit; return $this; } public function getTimeLimit() { return $this->_timeLimit; } public function setStatisticsOn($_statisticsOn) { $this->_statisticsOn = (bool)$_statisticsOn; return $this; } public function isStatisticsOn() { return $this->_statisticsOn; } public function setStatisticsIpLock($_statisticsIpLock) { $this->_statisticsIpLock = (int)$_statisticsIpLock; return $this; } public function getStatisticsIpLock() { return $this->_statisticsIpLock; } public function setResultGradeEnabled($_resultGradeEnabled) { $this->_resultGradeEnabled = (bool)$_resultGradeEnabled; return $this; } public function isResultGradeEnabled() { return $this->_resultGradeEnabled; } public function setShowPoints($_showPoints) { $this->_showPoints = (bool)$_showPoints; return $this; } public function isShowPoints() { return $this->_showPoints; } public function fetchSumQuestionPoints() { $m = new WpAdvQuiz_Model_QuizMapper(); return $m->sumQuestionPoints($this->_id); } public function fetchCountQuestions() { $m = new WpAdvQuiz_Model_QuizMapper(); return $m->countQuestion($this->_id); } public function setBtnRestartQuizHidden($_btnRestartQuizHidden) { $this->_btnRestartQuizHidden = (bool)$_btnRestartQuizHidden; return $this; } public function isBtnRestartQuizHidden() { return $this->_btnRestartQuizHidden; } public function setBtnClearQuizHidden($_btnClearQuizHidden) { $this->_btnClearQuizHidden = (bool)$_btnClearQuizHidden; return $this; } public function isBtnClearQuizHidden() { return $this->_btnClearQuizHidden; } public function setBtnViewQuestionHidden($_btnViewQuestionHidden) { $this->_btnViewQuestionHidden = (bool)$_btnViewQuestionHidden; return $this; } public function isBtnViewQuestionHidden() { return $this->_btnViewQuestionHidden; } public function setBtnViewPracticeShow($_btnViewPracticeShow) { $this->_btnViewPracticeShow = (bool)$_btnViewPracticeShow; return $this; } public function isBtnViewPracticeShow() { return $this->_btnViewPracticeShow; } public function setQuizRunOnce($_quizRunOnce) { $this->_quizRunOnce = (bool)$_quizRunOnce; return $this; } public function isQuizRunOnce() { return $this->_quizRunOnce; } public function setQuizRunOnceCookie($_quizRunOnceCookie) { $this->_quizRunOnceCookie = (bool)$_quizRunOnceCookie; return $this; } public function isQuizRunOnceCookie() { return $this->_quizRunOnceCookie; } public function setQuizRunOnceType($_quizRunOnceType) { $this->_quizRunOnceType = (int)$_quizRunOnceType; return $this; } public function getQuizRunOnceType() { return $this->_quizRunOnceType; } public function setQuizRunOnceTime($_quizRunOnceTime) { $this->_quizRunOnceTime = (int)$_quizRunOnceTime; return $this; } public function getQuizRunOnceTime() { return $this->_quizRunOnceTime; } public function setNumberedAnswer($_numberedAnswer) { $this->_numberedAnswer = (bool)$_numberedAnswer; return $this; } public function isNumberedAnswer() { return $this->_numberedAnswer; } public function setHideAnswerMessageBox($_hideAnswerMessageBox) { $this->_hideAnswerMessageBox = (bool)$_hideAnswerMessageBox; return $this; } public function isHideAnswerMessageBox() { return $this->_hideAnswerMessageBox; } public function setDisabledAnswerMark($_disabledAnswerMark) { $this->_disabledAnswerMark = (bool)$_disabledAnswerMark; return $this; } public function isDisabledAnswerMark() { return $this->_disabledAnswerMark; } public function setShowMaxQuestion($_showMaxQuestion) { $this->_showMaxQuestion = (bool)$_showMaxQuestion; return $this; } public function isShowMaxQuestion() { return $this->_showMaxQuestion; } public function setShowMaxQuestionValue($_showMaxQuestionValue) { $this->_showMaxQuestionValue = (int)$_showMaxQuestionValue; return $this; } public function getShowMaxQuestionValue() { return $this->_showMaxQuestionValue; } public function setShowMaxQuestionPercent($_showMaxQuestionPercent) { $this->_showMaxQuestionPercent = (bool)$_showMaxQuestionPercent; return $this; } public function isShowMaxQuestionPercent() { return $this->_showMaxQuestionPercent; } public function setToplistActivated($_toplistActivated) { $this->_toplistActivated = (bool)$_toplistActivated; return $this; } public function isToplistActivated() { return $this->_toplistActivated; } public function setToplistDataAddPermissions($_toplistDataAddPermissions) { $this->_toplistDataAddPermissions = (int)$_toplistDataAddPermissions; return $this; } public function getToplistDataAddPermissions() { return $this->_toplistDataAddPermissions; } public function setToplistDataSort($_toplistDataSort) { $this->_toplistDataSort = (int)$_toplistDataSort; return $this; } public function getToplistDataSort() { return $this->_toplistDataSort; } public function setToplistDataAddMultiple($_toplistDataAddMultiple) { $this->_toplistDataAddMultiple = (bool)$_toplistDataAddMultiple; return $this; } public function isToplistDataAddMultiple() { return $this->_toplistDataAddMultiple; } public function setToplistDataAddBlock($_toplistDataAddBlock) { $this->_toplistDataAddBlock = (int)$_toplistDataAddBlock; return $this; } public function getToplistDataAddBlock() { return $this->_toplistDataAddBlock; } public function setToplistDataShowLimit($_toplistDataShowLimit) { $this->_toplistDataShowLimit = (int)$_toplistDataShowLimit; return $this; } public function getToplistDataShowLimit() { return $this->_toplistDataShowLimit; } public function setToplistData($_toplistData) { if (!empty($_toplistData)) { $d = unserialize($_toplistData); if ($d !== false) { $this->setModelData($d); } } return $this; } public function getToplistData() { $a = array( 'toplistDataAddPermissions' => $this->getToplistDataAddPermissions(), 'toplistDataSort' => $this->getToplistDataSort(), 'toplistDataAddMultiple' => $this->isToplistDataAddMultiple(), 'toplistDataAddBlock' => $this->getToplistDataAddBlock(), 'toplistDataShowLimit' => $this->getToplistDataShowLimit(), 'toplistDataShowIn' => $this->getToplistDataShowIn(), 'toplistDataCaptcha' => $this->isToplistDataCaptcha(), 'toplistDataAddAutomatic' => $this->isToplistDataAddAutomatic() ); return serialize($a); } public function setToplistDataShowIn($_toplistDataShowIn) { $this->_toplistDataShowIn = (int)$_toplistDataShowIn; return $this; } public function getToplistDataShowIn() { return $this->_toplistDataShowIn; } public function setToplistDataCaptcha($_toplistDataCaptcha) { $this->_toplistDataCaptcha = (bool)$_toplistDataCaptcha; return $this; } public function isToplistDataCaptcha() { return $this->_toplistDataCaptcha; } public function setShowAverageResult($_showAverageResult) { $this->_showAverageResult = (bool)$_showAverageResult; return $this; } public function isShowAverageResult() { return $this->_showAverageResult; } public function setPrerequisite($_prerequisite) { $this->_prerequisite = (bool)$_prerequisite; return $this; } public function isPrerequisite() { return $this->_prerequisite; } public function setToplistDataAddAutomatic($_toplistDataAddAutomatic) { $this->_toplistDataAddAutomatic = (bool)$_toplistDataAddAutomatic; return $this; } public function isToplistDataAddAutomatic() { return $this->_toplistDataAddAutomatic; } public function setQuizModus($_quizModus) { $this->_quizModus = (int)$_quizModus; return $this; } public function getQuizModus() { return $this->_quizModus; } public function setShowReviewQuestion($_showReviewQuestion) { $this->_showReviewQuestion = (bool)$_showReviewQuestion; return $this; } public function isShowReviewQuestion() { return $this->_showReviewQuestion; } public function setQuizSummaryHide($_quizSummaryHide) { $this->_quizSummaryHide = (bool)$_quizSummaryHide; return $this; } public function isQuizSummaryHide() { return $this->_quizSummaryHide; } public function setSkipQuestionDisabled($_skipQuestion) { $this->_skipQuestionDisabled = (bool)$_skipQuestion; return $this; } public function isSkipQuestionDisabled() { return $this->_skipQuestionDisabled; } public function setEmailNotification($_emailNotification) { $this->_emailNotification = (int)$_emailNotification; return $this; } public function getEmailNotification() { return $this->_emailNotification; } public function setUserEmailNotification($_userEmailNotification) { $this->_userEmailNotification = (bool)$_userEmailNotification; return $this; } public function isUserEmailNotification() { return $this->_userEmailNotification; } public function setShowCategoryScore($_showCategoryScore) { $this->_showCategoryScore = (bool)$_showCategoryScore; return $this; } public function isShowCategoryScore() { return $this->_showCategoryScore; } public function setHideResultCorrectQuestion($_hideResultCorrectQuestion) { $this->_hideResultCorrectQuestion = (bool)$_hideResultCorrectQuestion; return $this; } public function isHideResultCorrectQuestion() { return $this->_hideResultCorrectQuestion; } public function setHideResultQuizTime($_hideResultQuizTime) { $this->_hideResultQuizTime = (bool)$_hideResultQuizTime; return $this; } public function isHideResultQuizTime() { return $this->_hideResultQuizTime; } public function setHideResultPoints($_hideResultPoints) { $this->_hideResultPoints = (bool)$_hideResultPoints; return $this; } public function isHideResultPoints() { return $this->_hideResultPoints; } public function setAutostart($_autostart) { $this->_autostart = (bool)$_autostart; return $this; } public function isAutostart() { return $this->_autostart; } public function setForcingQuestionSolve($_forcingQuestionSolve) { $this->_forcingQuestionSolve = (bool)$_forcingQuestionSolve; return $this; } public function isForcingQuestionSolve() { return $this->_forcingQuestionSolve; } public function setHideQuestionPositionOverview($_hideQuestionPositionOverview) { $this->_hideQuestionPositionOverview = (bool)$_hideQuestionPositionOverview; return $this; } public function isHideQuestionPositionOverview() { return $this->_hideQuestionPositionOverview; } public function setHideQuestionNumbering($_hideQuestionNumbering) { $this->_hideQuestionNumbering = (bool)$_hideQuestionNumbering; return $this; } public function isHideQuestionNumbering() { return $this->_hideQuestionNumbering; } public function setFormActivated($_formActivated) { $this->_formActivated = (bool)$_formActivated; return $this; } public function isFormActivated() { return $this->_formActivated; } public function setFormShowPosition($_formShowPosition) { $this->_formShowPosition = (int)$_formShowPosition; return $this; } public function getFormShowPosition() { return $this->_formShowPosition; } public function setStartOnlyRegisteredUser($_startOnlyRegisteredUser) { $this->_startOnlyRegisteredUser = (bool)$_startOnlyRegisteredUser; return $this; } public function isStartOnlyRegisteredUser() { return $this->_startOnlyRegisteredUser; } public function setQuestionsPerPage($_questionsPerPage) { $this->_questionsPerPage = (int)$_questionsPerPage; return $this; } public function getQuestionsPerPage() { return $this->_questionsPerPage; } public function setSortCategories($_sortCategories) { $this->_sortCategories = (bool)$_sortCategories; return $this; } public function isSortCategories() { return $this->_sortCategories; } public function setShowCategory($_showCategory) { $this->_showCategory = (bool)$_showCategory; return $this; } public function isShowCategory() { return $this->_showCategory; } public function setCategoryId($_categoryId) { $this->_categoryId = (int)$_categoryId; return $this; } public function getCategoryId() { return $this->_categoryId; } public function setCategoryName($_categoryName) { $this->_categoryName = (string)$_categoryName; return $this; } public function getCategoryName() { return $this->_categoryName; } public function setAdminEmail($_adminEmail) { $this->_adminEmail = $_adminEmail; return $this; } /** * @param bool|false $serialize * @return null|string|WpAdvQuiz_Model_Email */ public function getAdminEmail($serialize = false) { if ($this->_adminEmail === null) { return null; } if (is_object($this->_adminEmail) || $this->_adminEmail instanceof WpAdvQuiz_Model_Email) { if ($serialize) { return @serialize($this->_adminEmail); } } else { if (!$serialize) { if (WpAdvQuiz_Helper_Until::saveUnserialize($this->_adminEmail, $into) === false) { return null; } $this->_adminEmail = $into; } } return $this->_adminEmail; } public function setUserEmail($_userEmail) { $this->_userEmail = $_userEmail; return $this; } /** * @param bool|false $serialize * @return null|string|WpAdvQuiz_Model_Email */ public function getUserEmail($serialize = false) { if ($this->_userEmail === null) { return null; } if (is_object($this->_userEmail) || $this->_userEmail instanceof WpAdvQuiz_Model_Email) { if ($serialize) { return @serialize($this->_userEmail); } } else { if (!$serialize) { if (WpAdvQuiz_Helper_Until::saveUnserialize($this->_userEmail, $into) === false) { return null; } $this->_userEmail = $into; } } return $this->_userEmail; } public function setPluginContainer($_pluginContainer) { $this->_pluginContainer = $_pluginContainer; return $this; } public function getPluginContainer($serialize = false) { if ($this->_pluginContainer === null) { $this->_pluginContainer = new WpAdvQuiz_Model_PluginContainer(); } if (is_object($this->_pluginContainer) || $this->_pluginContainer instanceof WpAdvQuiz_Model_PluginContainer) { if ($serialize) { return @serialize($this->_pluginContainer); } } else { if (!$serialize) { if (WpAdvQuiz_Helper_Until::saveUnserialize($this->_pluginContainer, $into) === false) { return null; } $this->_pluginContainer = $into; } } return $this->_pluginContainer; } }