75 $this->validationFailed =
false;
76 $this->validationReports = array();
180 return implode(
'<br />', $this->validationReports);
188 return count($this->validationReports);
196 $this->validationReports[] = $validationReport;
205 } elseif (!$this->questionSetConfig->isQuestionAmountConfigComplete()) {
206 $this->
addValidationReport($this->lng->txt(
'tst_msg_rand_quest_set_incomplete_quest_amount_cfg'));
211 $this->lng->txt(
'tst_msg_rand_quest_set_change_quest_amount_here'),
218 $this->lng->txt(
'tst_msg_rand_quest_set_change_quest_amount_here'),
223 } elseif (!$this->questionSetConfig->hasSourcePoolDefinitions()) {
227 elseif ($this->questionSetConfig->getLastQuestionSyncTimestamp() == 0) {
228 $message = $this->
DIC->language()->txt(
'tst_msg_rand_quest_set_not_sync');
230 $msgBox = $this->
DIC->ui()->factory()->messageBox()->info(
$message)->withButtons(array($button));
235 elseif (!$this->questionSetConfig->isQuestionSetBuildable()) {
240 $this->
addValidationReport(implode(
'<br />', $this->questionSetConfig->getBuildableMessages()));
242 } elseif ($this->questionSetConfig->getLastQuestionSyncTimestamp()) {
243 $message = $this->lng->txt(
'tst_msg_rand_quest_set_pass_buildable');
246 $this->questionSetConfig->getLastQuestionSyncTimestamp(),
251 $this->lng->txt(
'tst_msg_rand_quest_set_stage_pool_last_sync'),
256 $msgBox = $this->
DIC->ui()->factory()->messageBox()->info(
$message)->withButtons(
260 $msgBox = $this->
DIC->ui()->factory()->messageBox()->info(
$message);
272 $titles[] = $lostPool->getTitle();
275 return implode(
', ', $titles);
281 case self::CONTEXT_POOL_SELECTION:
285 case self::CONTEXT_GENERAL_CONFIG:
297 $this->ctrl->setParameter(
303 $href = $this->ctrl->getLinkTarget(
307 $label = $this->lng->txt(
'tst_btn_rebuild_random_question_stage');
309 return $this->
DIC->ui()->factory()->button()->standard($label, $href);
314 $href = $this->ctrl->getLinkTarget(
319 $label = $this->lng->txt(
'tst_rnd_quest_cfg_tab_general');
321 return "<a href=\"{$href}\">{$label}</a>";
326 $href = $this->ctrl->getLinkTarget(
331 $label = $this->lng->txt(
'tst_rnd_quest_cfg_tab_pool');
333 return "<a href=\"{$href}\">{$label}</a>";
342 if ($this->
getContext() != self::CONTEXT_POOL_SELECTION) {
346 if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
359 if ($this->
getContext() != self::CONTEXT_GENERAL_CONFIG) {
363 if (!$this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
376 if ($this->
getContext() != self::CONTEXT_POOL_SELECTION) {
380 if (!$this->questionSetConfig->isQuestionAmountConfigurationModePerTest()) {
393 $this->lng->txt(
'tst_msg_rand_quest_set_lost_pools'),
397 if ($this->
getContext() == self::CONTEXT_GENERAL_CONFIG) {
398 $action = $this->ctrl->getLinkTarget(
403 $link = $this->
DIC->ui()->factory()->link()->standard(
404 $this->lng->txt(
'tst_msg_rand_quest_set_lost_pools_link'),
408 $msgBox = $this->
DIC->ui()->factory()->messageBox()->info($report)->withLinks(array($link));
410 $msgBox = $this->
DIC->ui()->factory()->messageBox()->info($report);
413 return $this->
DIC->ui()->renderer()->render($msgBox);
421 $this->
DIC->ui()->mainTemplate()->setCurrentBlock(
'mess');
422 $this->
DIC->ui()->mainTemplate()->setVariable(
'MESSAGE',
$message);
423 $this->
DIC->ui()->mainTemplate()->parseCurrentBlock();
This class provides processing control methods.
setQuestionSetConfig($questionSetConfig)
buildQuestionSelectionSubTabLink()
isQuestionAmountConfigPerTestHintRequired()
const CONTEXT_POOL_SELECTION
doesParticipantDataExists()
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
addValidationReport($validationReport)
const CMD_SHOW_SRC_POOL_DEF_LIST
getAfterRebuildQuestionStageCommand()
catch(Exception $e) $message
buildQuestionStageRebuildButton()
const CONTEXT_GENERAL_CONFIG
__construct(ilLanguage $lng, ilCtrl $ctrl)
isNoAvailableQuestionPoolsHintRequired()
buildLostQuestionPoolsString()
setParticipantDataExists($participantDataExists)
const HTTP_PARAM_AFTER_REBUILD_QUESTION_STAGE_CMD
const CMD_SHOW_GENERAL_CONFIG_FORM
populateMessage($message)
buildGeneralConfigSubTabLink()
setValidationFailed($validationFailed)
buildLostPoolsReportMessage()
getValidationReportHtml()
const CMD_BUILD_QUESTION_STAGE
isQuestionAmountConfigPerPoolHintRequired()