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'),
211 $this->lng->txt(
'tst_msg_rand_quest_set_change_quest_amount_here'),
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);
279 case self::CONTEXT_POOL_SELECTION:
283 case self::CONTEXT_GENERAL_CONFIG:
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'),
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'),
411 $href = $this->ctrl->getLinkTarget(
416 $label = $this->
getTargetGUI()->getPoolConfigTabLabel();
418 return "<a href=\"{$href}\">{$label}</a>";
This class provides processing control methods.
buildQuestionStageRebuildLink()
setQuestionSetConfig($questionSetConfig)
buildQuestionSelectionSubTabLink()
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
isQuestionAmountConfigPerTestHintRequired()
const CONTEXT_POOL_SELECTION
doesParticipantDataExists()
addValidationReport($validationReport)
const CMD_SHOW_SRC_POOL_DEF_LIST
getAfterRebuildQuestionStageCommand()
const CONTEXT_GENERAL_CONFIG
__construct(ilLanguage $lng, ilCtrl $ctrl)
isNoAvailableQuestionPoolsHintRequired()
buildLostQuestionPoolsString()
Create styles array
The data for the language used.
setParticipantDataExists($participantDataExists)
const HTTP_PARAM_AFTER_REBUILD_QUESTION_STAGE_CMD
const CMD_SHOW_GENERAL_CONFIG_FORM
buildGeneralConfigSubTabLink()
setValidationFailed($validationFailed)
getValidationReportHtml()
buildQuestionPoolsTabLink()
const CMD_BUILD_QUESTION_STAGE
isQuestionAmountConfigPerPoolHintRequired()