68 $this->validationFailed =
false;
69 $this->validationReports = array();
173 return implode(
'<br />', $this->validationReports);
181 return count($this->validationReports);
189 $this->validationReports[] = $validationReport;
198 } elseif (!$this->questionSetConfig->isQuestionAmountConfigComplete()) {
199 $this->
addValidationReport($this->lng->txt(
'tst_msg_rand_quest_set_incomplete_quest_amount_cfg'));
204 $this->lng->txt(
'tst_msg_rand_quest_set_change_quest_amount_here'),
205 $this->buildGeneralConfigSubTabLink()
211 $this->lng->txt(
'tst_msg_rand_quest_set_change_quest_amount_here'),
212 $this->buildQuestionSelectionSubTabLink()
216 } elseif (!$this->questionSetConfig->hasSourcePoolDefinitions()) {
220 elseif ($this->questionSetConfig->getLastQuestionSyncTimestamp() == 0) {
223 $this->
addValidationReport(
"<br><small>" . $this->lng->txt(
'tst_msg_rand_quest_set_sync_duration') .
"</small>");
227 elseif (!$this->questionSetConfig->isQuestionSetBuildable()) {
232 $this->
addValidationReport(implode(
'<br />', $this->questionSetConfig->getBuildableMessages()));
236 #if (count($this->questionSetConfig->getBuildableMessages()))
247 if ($this->questionSetConfig->getLastQuestionSyncTimestamp()) {
249 $this->questionSetConfig->getLastQuestionSyncTimestamp(),
254 $this->lng->txt(
'tst_msg_rand_quest_set_stage_pool_last_sync'),
270 $titles[] = $lostPool->getTitle();
273 return implode(
', ', $titles);
296 $this->ctrl->setParameter(
302 $href = $this->ctrl->getLinkTarget(
306 $label = $this->lng->txt(
'tst_btn_rebuild_random_question_stage');
308 return "<a href=\"{$href}\">{$label}</a>";
313 $href = $this->ctrl->getLinkTarget(
318 $label = $this->lng->txt(
'tst_rnd_quest_cfg_tab_general');
320 return "<a href=\"{$href}\">{$label}</a>";
325 $href = $this->ctrl->getLinkTarget(
330 $label = $this->lng->txt(
'tst_rnd_quest_cfg_tab_pool');
332 return "<a href=\"{$href}\">{$label}</a>";
341 if ($this->
getContext() != self::CONTEXT_POOL_SELECTION) {
345 if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
358 if ($this->
getContext() != self::CONTEXT_GENERAL_CONFIG) {
362 if (!$this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
375 if ($this->
getContext() != self::CONTEXT_POOL_SELECTION) {
379 if (!$this->questionSetConfig->isQuestionAmountConfigurationModePerTest()) {
392 $this->lng->txt(
'tst_msg_rand_quest_set_lost_pools'),
393 $this->buildLostQuestionPoolsString()
396 if ($this->
getContext() == self::CONTEXT_GENERAL_CONFIG) {
397 $report .=
'<br /><br />' .
sprintf(
398 $this->lng->txt(
'tst_msg_rand_quest_set_lost_pools_link'),
399 $this->buildQuestionPoolsTabLink()
411 $href = $this->ctrl->getLinkTarget(
416 $label = $this->
getTargetGUI()->getPoolConfigTabLabel();
418 return "<a href=\"{$href}\">{$label}</a>";
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
This class provides processing control methods.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
const CMD_BUILD_QUESTION_STAGE
const HTTP_PARAM_AFTER_REBUILD_QUESTION_STAGE_CMD
const CMD_SHOW_SRC_POOL_DEF_LIST
const CMD_SHOW_GENERAL_CONFIG_FORM
buildLostQuestionPoolsString()
__construct(ilLanguage $lng, ilCtrl $ctrl)
isQuestionAmountConfigPerTestHintRequired()
setValidationFailed($validationFailed)
setQuestionSetConfig($questionSetConfig)
addValidationReport($validationReport)
const CONTEXT_POOL_SELECTION
getValidationReportHtml()
getAfterRebuildQuestionStageCommand()
setParticipantDataExists($participantDataExists)
buildQuestionPoolsTabLink()
buildQuestionStageRebuildLink()
const CONTEXT_GENERAL_CONFIG
isNoAvailableQuestionPoolsHintRequired()
isQuestionAmountConfigPerPoolHintRequired()
buildQuestionSelectionSubTabLink()
buildGeneralConfigSubTabLink()
doesParticipantDataExists()