ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestInfoScreenToolbarGUI Class Reference
+ Inheritance diagram for ilTestInfoScreenToolbarGUI:
+ Collaboration diagram for ilTestInfoScreenToolbarGUI:

Public Member Functions

 __construct (ilDBInterface $db, ilAccessHandler $access, ilCtrl $ctrl, ilLanguage $lng, ilComponentRepository $component_repository)
 
 getGlobalToolbar ()
 
 setGlobalToolbar (ilToolbarGUI $globalToolbar)
 
 getTestOBJ ()
 
 setTestOBJ (ilObjTest $testOBJ)
 
 getTestQuestionSetConfig ()
 
 setTestQuestionSetConfig (ilTestQuestionSetConfig $testQuestionSetConfig)
 
 getTestPlayerGUI ()
 
 setTestPlayerGUI (ilTestPlayerAbstractGUI $testPlayerGUI)
 
 getTestSession ()
 
 setTestSession (ilTestSession $testSession)
 
 getTestSequence ()
 
 setTestSequence ($testSequence)
 
 getSessionLockString ()
 
 setSessionLockString ($sessionLockString)
 
 getInfoMessages ()
 
 addInfoMessage ($infoMessage)
 @ param string $infoMessage Could be. More...
 
 getFailureMessages ()
 
 addFailureMessage (string $failureMessage)
 
 setFormAction (string $a_val, bool $a_multipart=false, string $a_target="")
 
 addButtonInstance (ilButtonBase $a_button)
 
 setCloseFormTag (bool $a_val)
 
 addInputItem (ilToolbarItem $a_item, bool $a_output_label=false)
 
 addFormInput ($formInput)
 
 clearItems ()
 
 build ()
 
 sendMessages ()
 
- Public Member Functions inherited from ilToolbarGUI
 setFormAction (string $a_val, bool $a_multipart=false, string $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 
 setLeadingImage (string $a_img, string $a_alt)
 
 setHidden (bool $a_val)
 
 getHidden ()
 
 setId (string $a_val)
 
 getId ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 addButton (string $a_txt, string $a_cmd, string $a_target="", ?int $a_acc_key=null, string $a_additional_attrs='', string $a_id="", string $a_class='submit')
 
 addFormButton (string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
 
 addInputItem (ilToolbarItem $a_item, bool $a_output_label=false)
 
 addStickyItem ( $a_item, bool $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown (string $a_txt, string $a_dd_html)
 
 addAdvancedSelectionList (ilAdvancedSelectionListGUI $adv)
 
 addSeparator ()
 
 addText (string $a_text)
 
 addSpacer (string $a_width=null)
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 
 addLink (string $a_caption, string $a_url, bool $a_disabled=false)
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 setFormName (string $a_val)
 
 getFormName ()
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems (array $items)
 

Protected Member Functions

 populateMessage ($message)
 
- Protected Member Functions inherited from ilToolbarGUI
 applyAutoStickyToSingleElement ()
 If the toolbar consists of only one button, make it sticky Note: Atm this is only possible for buttons. More...
 

Protected Attributes

ILIAS DI Container $DIC
 
ilDBInterface $db
 
ilAccessHandler $access
 
ilCtrl $ctrl
 
ilComponentRepository $component_repository
 
ilObjTest $testOBJ = null
 
ilTestQuestionSetConfig $testQuestionSetConfig = null
 
ilTestPlayerAbstractGUI $testPlayerGUI = null
 
ilTestSession $testSession = null
 
 $testSequence
 
- Protected Attributes inherited from ilToolbarGUI
ilLanguage $lng
 
string $id = ''
 
string $form_action = ''
 
bool $hidden = false
 
array $lead_img
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
string $form_target = ""
 
string $form_name = ""
 
bool $prevent_double_submission = false
 
array $sticky_items = array()
 
bool $has_separator = false
 
ILIAS DI UIServices $ui
 
bool $multipart = false
 

Private Member Functions

 getClassName ($target)
 
 getClassNameArray ($target)
 
 getClassPath ($target)
 
 setParameter ($target, $parameter, $value)
 
 buildLinkTarget ($target, $cmd=null)
 
 buildFormAction ($target)
 
 ensureInitialisedSessionLockString ()
 
 buildSessionLockString ()
 
 areSkillLevelThresholdsMissing ()
 
 getSkillLevelThresholdsMissingInfo ()
 
 hasFixedQuestionSetSkillAssignsLowerThanBarrier ()
 
 getSkillAssignBarrierInfo ()
 

Private Attributes

ilToolbarGUI $globalToolbar = null
 
ilGlobalTemplateInterface $main_tpl
 
 $sessionLockString
 
array $infoMessages = array()
 
array $failureMessages = array()
 

Static Private Attributes

static array $TARGET_CLASS_PATH_BASE = array('ilRepositoryGUI', 'ilObjTestGUI')
 

Additional Inherited Members

- Data Fields inherited from ilToolbarGUI
array $items = array()
 
- Static Protected Attributes inherited from ilToolbarGUI
static int $instances = 0
 

Detailed Description

Definition at line 25 of file class.ilTestInfoScreenToolbarGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestInfoScreenToolbarGUI::__construct ( ilDBInterface  $db,
ilAccessHandler  $access,
ilCtrl  $ctrl,
ilLanguage  $lng,
ilComponentRepository  $component_repository 
)

Definition at line 55 of file class.ilTestInfoScreenToolbarGUI.php.

References $access, $component_repository, $ctrl, $db, $DIC, ilToolbarGUI\$lng, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

61  {
62  global $DIC;
63  $this->main_tpl = $DIC->ui()->mainTemplate(); /* @var ILIAS\DI\Container $DIC */
64  $this->DIC = $DIC;
65  $this->db = $db;
66  $this->access = $access;
67  $this->ctrl = $ctrl;
68  $this->lng = $lng;
69  $this->component_repository = $component_repository;
70  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addButtonInstance()

ilTestInfoScreenToolbarGUI::addButtonInstance ( ilButtonBase  $a_button)

Definition at line 183 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

183  : void
184  {
185  if ($this->globalToolbar instanceof parent) {
186  $this->globalToolbar->addButtonInstance($a_button);
187  } else {
188  parent::addButtonInstance($a_button);
189  }
190  }
+ Here is the caller graph for this function:

◆ addFailureMessage()

ilTestInfoScreenToolbarGUI::addFailureMessage ( string  $failureMessage)

Definition at line 166 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

166  : void
167  {
168  $this->failureMessages[] = $failureMessage;
169  }
+ Here is the caller graph for this function:

◆ addFormInput()

ilTestInfoScreenToolbarGUI::addFormInput (   $formInput)

Definition at line 212 of file class.ilTestInfoScreenToolbarGUI.php.

212  : void
213  {
214  if ($this->globalToolbar instanceof parent) {
215  $this->globalToolbar->addFormInput($formInput);
216  }
217  }

◆ addInfoMessage()

ilTestInfoScreenToolbarGUI::addInfoMessage (   $infoMessage)

@ param string $infoMessage Could be.

Doesn't have to.

Definition at line 156 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

156  : void
157  {
158  $this->infoMessages[] = $infoMessage;
159  }
+ Here is the caller graph for this function:

◆ addInputItem()

ilTestInfoScreenToolbarGUI::addInputItem ( ilToolbarItem  $a_item,
bool  $a_output_label = false 
)

Definition at line 201 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

204  : void {
205  if ($this->globalToolbar instanceof parent) {
206  $this->globalToolbar->addInputItem($a_item, $a_output_label);
207  } else {
208  parent::addInputItem($a_item, $a_output_label);
209  }
210  }
+ Here is the caller graph for this function:

◆ areSkillLevelThresholdsMissing()

ilTestInfoScreenToolbarGUI::areSkillLevelThresholdsMissing ( )
private

Definition at line 278 of file class.ilTestInfoScreenToolbarGUI.php.

References $data, and getTestOBJ().

Referenced by build().

278  : bool
279  {
280  if (!$this->getTestOBJ()->isSkillServiceEnabled()) {
281  return false;
282  }
283 
284  $questionContainerId = $this->getTestOBJ()->getId();
285 
286  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
287  require_once 'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
288 
289  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
290  $assignmentList->setParentObjId($questionContainerId);
291  $assignmentList->loadFromDb();
292 
293  foreach ($assignmentList->getUniqueAssignedSkills() as $data) {
294  foreach ($data['skill']->getLevelData() as $level) {
295  $treshold = new ilTestSkillLevelThreshold($this->db);
296  $treshold->setTestId($this->getTestOBJ()->getTestId());
297  $treshold->setSkillBaseId($data['skill_base_id']);
298  $treshold->setSkillTrefId($data['skill_tref_id']);
299  $treshold->setSkillLevelId($level['id']);
300 
301  if (!$treshold->dbRecordExists()) {
302  return true;
303  }
304  }
305  }
306 
307  return false;
308  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build()

ilTestInfoScreenToolbarGUI::build ( )

Definition at line 353 of file class.ilTestInfoScreenToolbarGUI.php.

References $message, ilObjTestAccess\_lookupOnlineTestAccess(), ILIAS\Repository\access(), addButtonInstance(), addFailureMessage(), addInfoMessage(), addInputItem(), ilToolbarGUI\addSeparator(), ANONYMOUS_USER_ID, areSkillLevelThresholdsMissing(), buildFormAction(), buildLinkTarget(), clearItems(), ensureInitialisedSessionLockString(), ilToolbarGUI\getId(), ilSubmitButton\getInstance(), ilToolbarGUI\getItems(), getSessionLockString(), getSkillAssignBarrierInfo(), getSkillLevelThresholdsMissingInfo(), getTestOBJ(), getTestPlayerGUI(), getTestQuestionSetConfig(), getTestSession(), hasFixedQuestionSetSkillAssignsLowerThanBarrier(), ILIAS\Repository\lng(), populateMessage(), setFormAction(), and setParameter().

353  : void
354  {
355  if (!$this->testOBJ->isDynamicTest()) {
357 
358  $this->setParameter($this->getTestPlayerGUI(), 'lock', $this->getSessionLockString());
359  $this->setParameter($this->getTestPlayerGUI(), 'sequence', $this->getTestSession()->getLastSequence());
360  $this->setParameter('ilObjTestGUI', 'ref_id', $this->getTestOBJ()->getRefId());
361 
362  $this->setFormAction($this->buildFormAction($this->getTestPlayerGUI()));
363  }
364 
365  $online_access = false;
366  if ($this->getTestOBJ()->getFixedParticipants()) {
367  include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
368  $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->getTestOBJ()->getId(), $this->getTestSession()->getUserId());
369  if ($online_access_result === true) {
370  $online_access = true;
371  } else {
372  $this->addInfoMessage($online_access_result);
373  }
374  }
375 
376  if (!$this->getTestOBJ()->getOfflineStatus() && $this->getTestOBJ()->isComplete($this->getTestQuestionSetConfig())) {
377  if ((!$this->getTestOBJ()->getFixedParticipants() || $online_access) && $this->access->checkAccess("read", "", $this->getTestOBJ()->getRefId())) {
378  $executable = $this->getTestOBJ()->isExecutable(
379  $this->getTestSession(),
380  $this->getTestSession()->getUserId(),
381  $allowPassIncrease = true
382  );
383 
384  if ($executable["executable"]) {
385  if ($this->getTestOBJ()->areObligationsEnabled() && $this->getTestOBJ()->hasObligations($this->getTestOBJ()->getTestId())) {
386  $this->addInfoMessage($this->lng->txt('tst_test_contains_obligatory_questions'));
387  }
388 
389  if ($this->getTestSession()->getActiveId() > 0) {
390  // resume test
391  require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
392  $testPassesSelector = new ilTestPassesSelector($this->db, $this->getTestOBJ());
393  $testPassesSelector->setActiveId($this->getTestSession()->getActiveId());
394  $testPassesSelector->setLastFinishedPass($this->getTestSession()->getLastFinishedPass());
395 
396  $closedPasses = $testPassesSelector->getClosedPasses();
397  $existingPasses = $testPassesSelector->getExistingPasses();
398 
399  if ($existingPasses > $closedPasses) {
401  $btn->setCaption('tst_resume_test');
402  $btn->setCommand('resumePlayer');
403  $btn->setPrimary(true);
404  $this->addButtonInstance($btn);
405  } else {
407  $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
408  $btn->setCommand('startPlayer');
409  $btn->setPrimary(true);
410  $this->addButtonInstance($btn);
411  }
412  } else {
413  // start new test
415  $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
416  $btn->setCommand('startPlayer');
417  $btn->setPrimary(true);
418  $this->addButtonInstance($btn);
419  }
420  } else {
421  $this->addInfoMessage($executable['errormessage']);
422  }
423  }
424 
425  if ($this->DIC->user()->getId() == ANONYMOUS_USER_ID) {
426  if ($this->getItems()) {
427  $this->addSeparator();
428  }
429 
430  require_once 'Services/Form/classes/class.ilTextInputGUI.php';
431  $anonymous_id = new ilTextInputGUI($this->lng->txt('enter_anonymous_code'), 'anonymous_id');
432  $anonymous_id->setSize(8);
433  $this->addInputItem($anonymous_id, true);
434  $button = ilSubmitButton::getInstance();
435  $button->setCaption('submit');
436  $button->setCommand('setAnonymousId');
437  $this->addButtonInstance($button);
438  }
439  }
440  if ($this->getTestOBJ()->getOfflineStatus() && !$this->getTestQuestionSetConfig()->areDepenciesBroken()) {
441  $message = $this->lng->txt("test_is_offline");
442 
443  $links = array();
444 
445  if ($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId())) {
446  $links[] = $this->DIC->ui()->factory()->link()->standard(
447  $this->DIC->language()->txt('test_edit_settings'),
448  $this->buildLinkTarget('ilobjtestsettingsgeneralgui')
449  );
450  }
451 
452  $msgBox = $this->DIC->ui()->factory()->messageBox()->info($message)->withLinks($links);
453 
454  $this->populateMessage($this->DIC->ui()->renderer()->render($msgBox));
455  }
456 
457  if ($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId())) {
458  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
459  $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->testOBJ->getId());
460  require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
461  $sltImportFails = new ilTestSkillLevelThresholdImportFails($this->testOBJ->getId());
462 
463  if ($qsaImportFails->failedImportsRegistered() || $sltImportFails->failedImportsRegistered()) {
464  $importFailsMsg = array();
465 
466  if ($qsaImportFails->failedImportsRegistered()) {
467  $importFailsMsg[] = $qsaImportFails->getFailedImportsMessage($this->lng);
468  }
469 
470  if ($sltImportFails->failedImportsRegistered()) {
471  $importFailsMsg[] = $sltImportFails->getFailedImportsMessage($this->lng);
472  }
473 
474  $message = implode('<br />', $importFailsMsg);
475 
476  $button = $this->DIC->ui()->factory()->button()->standard(
477  $this->DIC->language()->txt('ass_skl_import_fails_remove_btn'),
478  $this->DIC->ctrl()->getLinkTargetByClass('ilObjTestGUI', 'removeImportFails')
479  );
480 
481  $msgBox = $this->DIC->ui()->factory()->messageBox()->failure($message)->withButtons(array($button));
482 
483  $this->populateMessage($this->DIC->ui()->renderer()->render($msgBox));
484  } elseif ($this->getTestOBJ()->isSkillServiceToBeConsidered()) {
485  if ($this->areSkillLevelThresholdsMissing()) {
487  }
488 
490  $this->addInfoMessage($this->getSkillAssignBarrierInfo());
491  }
492  }
493 
494  if ($this->getTestQuestionSetConfig()->areDepenciesBroken()) {
495  $this->addFailureMessage($this->getTestQuestionSetConfig()->getDepenciesBrokenMessage($this->lng));
496 
497  $this->clearItems();
498  } elseif ($this->getTestQuestionSetConfig()->areDepenciesInVulnerableState()) {
499  $this->addInfoMessage($this->getTestQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng));
500  }
501  }
502  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
setParameter($target, $parameter, $value)
setFormAction(string $a_val, bool $a_multipart=false, string $a_target="")
addInfoMessage($infoMessage)
@ param string $infoMessage Could be.
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
addInputItem(ilToolbarItem $a_item, bool $a_output_label=false)
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:

◆ buildFormAction()

ilTestInfoScreenToolbarGUI::buildFormAction (   $target)
private

Definition at line 261 of file class.ilTestInfoScreenToolbarGUI.php.

References ILIAS\Repository\ctrl(), and getClassPath().

Referenced by build().

261  : string
262  {
263  return $this->ctrl->getFormActionByClass($this->getClassPath($target));
264  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLinkTarget()

ilTestInfoScreenToolbarGUI::buildLinkTarget (   $target,
  $cmd = null 
)
private

Definition at line 256 of file class.ilTestInfoScreenToolbarGUI.php.

References ILIAS\Repository\ctrl(), and getClassPath().

Referenced by build(), and getSkillLevelThresholdsMissingInfo().

256  : string
257  {
258  return $this->ctrl->getLinkTargetByClass($this->getClassPath($target), $cmd);
259  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSessionLockString()

ilTestInfoScreenToolbarGUI::buildSessionLockString ( )
private

Definition at line 273 of file class.ilTestInfoScreenToolbarGUI.php.

References $_COOKIE.

Referenced by ensureInitialisedSessionLockString().

273  : string
274  {
275  return md5($_COOKIE[session_name()] . time());
276  }
$_COOKIE[session_name()]
Definition: xapitoken.php:54
+ Here is the caller graph for this function:

◆ clearItems()

ilTestInfoScreenToolbarGUI::clearItems ( )

Definition at line 219 of file class.ilTestInfoScreenToolbarGUI.php.

References ilToolbarGUI\setItems().

Referenced by build().

219  : void
220  {
221  if ($this->globalToolbar instanceof parent) {
222  $this->globalToolbar->setItems(array());
223  } else {
224  $this->setItems(array());
225  }
226  }
setItems(array $items)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureInitialisedSessionLockString()

ilTestInfoScreenToolbarGUI::ensureInitialisedSessionLockString ( )
private

Definition at line 266 of file class.ilTestInfoScreenToolbarGUI.php.

References buildSessionLockString(), getSessionLockString(), and setSessionLockString().

Referenced by build().

266  : void
267  {
268  if (!strlen($this->getSessionLockString())) {
270  }
271  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassName()

ilTestInfoScreenToolbarGUI::getClassName (   $target)
private

Definition at line 228 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getClassNameArray(), and setParameter().

229  {
230  if (is_object($target)) {
231  $target = get_class($target);
232  }
233 
234  return $target;
235  }
+ Here is the caller graph for this function:

◆ getClassNameArray()

ilTestInfoScreenToolbarGUI::getClassNameArray (   $target)
private

Definition at line 237 of file class.ilTestInfoScreenToolbarGUI.php.

References getClassName().

Referenced by getClassPath().

237  : array
238  {
239  if (is_array($target)) {
240  return $target;
241  }
242 
243  return array($this->getClassName($target));
244  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassPath()

ilTestInfoScreenToolbarGUI::getClassPath (   $target)
private

Definition at line 246 of file class.ilTestInfoScreenToolbarGUI.php.

References getClassNameArray().

Referenced by buildFormAction(), and buildLinkTarget().

246  : array
247  {
248  return array_merge(self::$TARGET_CLASS_PATH_BASE, $this->getClassNameArray($target));
249  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFailureMessages()

ilTestInfoScreenToolbarGUI::getFailureMessages ( )

Definition at line 161 of file class.ilTestInfoScreenToolbarGUI.php.

References $failureMessages.

Referenced by sendMessages().

161  : array
162  {
163  return $this->failureMessages;
164  }
+ Here is the caller graph for this function:

◆ getGlobalToolbar()

ilTestInfoScreenToolbarGUI::getGlobalToolbar ( )

Definition at line 72 of file class.ilTestInfoScreenToolbarGUI.php.

References $globalToolbar.

◆ getInfoMessages()

ilTestInfoScreenToolbarGUI::getInfoMessages ( )

Definition at line 148 of file class.ilTestInfoScreenToolbarGUI.php.

References $infoMessages.

Referenced by sendMessages().

148  : array
149  {
150  return $this->infoMessages;
151  }
+ Here is the caller graph for this function:

◆ getSessionLockString()

ilTestInfoScreenToolbarGUI::getSessionLockString ( )

Definition at line 138 of file class.ilTestInfoScreenToolbarGUI.php.

References $sessionLockString.

Referenced by build(), and ensureInitialisedSessionLockString().

138  : ?string
139  {
141  }
+ Here is the caller graph for this function:

◆ getSkillAssignBarrierInfo()

ilTestInfoScreenToolbarGUI::getSkillAssignBarrierInfo ( )
private

Definition at line 343 of file class.ilTestInfoScreenToolbarGUI.php.

References ilObjAssessmentFolder\getSkillTriggerAnswerNumberBarrier(), and ILIAS\Repository\lng().

Referenced by build().

343  : string
344  {
345  require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
346 
347  return sprintf(
348  $this->lng->txt('tst_skill_triggerings_num_req_answers_not_reached_warn'),
350  );
351  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillLevelThresholdsMissingInfo()

ilTestInfoScreenToolbarGUI::getSkillLevelThresholdsMissingInfo ( )
private

Definition at line 310 of file class.ilTestInfoScreenToolbarGUI.php.

References $message, buildLinkTarget(), ilTestSkillLevelThresholdsGUI\CMD_SHOW_SKILL_THRESHOLDS, and ILIAS\Repository\lng().

Referenced by build().

310  : string
311  {
312  $message = $this->lng->txt('tst_skl_level_thresholds_missing');
313 
314  $linkTarget = $this->buildLinkTarget(
315  array('ilTestSkillAdministrationGUI', 'ilTestSkillLevelThresholdsGUI'),
317  );
318 
319  $link = $this->DIC->ui()->factory()->link()->standard(
320  $this->DIC->language()->txt('tst_skl_level_thresholds_link'),
321  $linkTarget
322  );
323 
324  $msgBox = $this->DIC->ui()->factory()->messageBox()->failure($message)->withLinks(array($link));
325 
326  return $this->DIC->ui()->renderer()->render($msgBox);
327  }
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestOBJ()

ilTestInfoScreenToolbarGUI::getTestOBJ ( )

Definition at line 82 of file class.ilTestInfoScreenToolbarGUI.php.

References $testOBJ.

Referenced by areSkillLevelThresholdsMissing(), and build().

+ Here is the caller graph for this function:

◆ getTestPlayerGUI()

ilTestInfoScreenToolbarGUI::getTestPlayerGUI ( )

Definition at line 102 of file class.ilTestInfoScreenToolbarGUI.php.

References $testPlayerGUI.

Referenced by build().

103  {
104  return $this->testPlayerGUI;
105  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getTestQuestionSetConfig()

ilTestInfoScreenToolbarGUI::getTestQuestionSetConfig ( )

Definition at line 92 of file class.ilTestInfoScreenToolbarGUI.php.

References $testQuestionSetConfig.

Referenced by build().

+ Here is the caller graph for this function:

◆ getTestSequence()

ilTestInfoScreenToolbarGUI::getTestSequence ( )
Returns
ilTestSequence|ilTestSequenceDynamicQuestionSet

Definition at line 125 of file class.ilTestInfoScreenToolbarGUI.php.

References $testSequence.

◆ getTestSession()

ilTestInfoScreenToolbarGUI::getTestSession ( )

Definition at line 112 of file class.ilTestInfoScreenToolbarGUI.php.

References $testSession.

Referenced by build().

+ Here is the caller graph for this function:

◆ hasFixedQuestionSetSkillAssignsLowerThanBarrier()

ilTestInfoScreenToolbarGUI::hasFixedQuestionSetSkillAssignsLowerThanBarrier ( )
private

Definition at line 329 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

329  : bool
330  {
331  if (!$this->testOBJ->isFixedTest()) {
332  return false;
333  }
334 
335  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
336  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
337  $assignmentList->setParentObjId($this->testOBJ->getId());
338  $assignmentList->loadFromDb();
339 
340  return $assignmentList->hasSkillsAssignedLowerThanBarrier();
341  }
+ Here is the caller graph for this function:

◆ populateMessage()

ilTestInfoScreenToolbarGUI::populateMessage (   $message)
protected

Definition at line 504 of file class.ilTestInfoScreenToolbarGUI.php.

References $message.

Referenced by build().

504  : void
505  {
506  $this->DIC->ui()->mainTemplate()->setCurrentBlock('mess');
507  $this->DIC->ui()->mainTemplate()->setVariable('MESSAGE', $message);
508  $this->DIC->ui()->mainTemplate()->parseCurrentBlock();
509  }
$message
Definition: xapiexit.php:32
+ Here is the caller graph for this function:

◆ sendMessages()

ilTestInfoScreenToolbarGUI::sendMessages ( )

Definition at line 511 of file class.ilTestInfoScreenToolbarGUI.php.

References getFailureMessages(), and getInfoMessages().

511  : void
512  {
513  $info_messages = $this->getInfoMessages();
514  if ($info_messages !== array()) {
515  $this->main_tpl->setOnScreenMessage('info', array_pop($info_messages));
516  }
517 
518  $failure_messages = $this->getFailureMessages();
519  if ($failure_messages !== array()) {
520  $this->main_tpl->setOnScreenMessage('failure', array_pop($failure_messages));
521  }
522  }
+ Here is the call graph for this function:

◆ setCloseFormTag()

ilTestInfoScreenToolbarGUI::setCloseFormTag ( bool  $a_val)

Definition at line 192 of file class.ilTestInfoScreenToolbarGUI.php.

192  : void
193  {
194  if ($this->globalToolbar instanceof parent) {
195  $this->globalToolbar->setCloseFormTag($a_val);
196  } else {
197  parent::setCloseFormTag($a_val);
198  }
199  }

◆ setFormAction()

ilTestInfoScreenToolbarGUI::setFormAction ( string  $a_val,
bool  $a_multipart = false,
string  $a_target = "" 
)

Definition at line 171 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

175  : void {
176  if ($this->globalToolbar instanceof parent) {
177  $this->globalToolbar->setFormAction($a_val, $a_multipart, $a_target);
178  } else {
179  parent::setFormAction($a_val, $a_multipart, $a_target);
180  }
181  }
+ Here is the caller graph for this function:

◆ setGlobalToolbar()

ilTestInfoScreenToolbarGUI::setGlobalToolbar ( ilToolbarGUI  $globalToolbar)

Definition at line 77 of file class.ilTestInfoScreenToolbarGUI.php.

References $globalToolbar.

77  : void
78  {
79  $this->globalToolbar = $globalToolbar;
80  }

◆ setParameter()

ilTestInfoScreenToolbarGUI::setParameter (   $target,
  $parameter,
  $value 
)
private

Definition at line 251 of file class.ilTestInfoScreenToolbarGUI.php.

References ILIAS\Repository\ctrl(), and getClassName().

Referenced by build().

251  : void
252  {
253  $this->ctrl->setParameterByClass($this->getClassName($target), $parameter, $value);
254  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSessionLockString()

ilTestInfoScreenToolbarGUI::setSessionLockString (   $sessionLockString)

Definition at line 143 of file class.ilTestInfoScreenToolbarGUI.php.

References $sessionLockString.

Referenced by ensureInitialisedSessionLockString().

143  : void
144  {
145  $this->sessionLockString = $sessionLockString;
146  }
+ Here is the caller graph for this function:

◆ setTestOBJ()

ilTestInfoScreenToolbarGUI::setTestOBJ ( ilObjTest  $testOBJ)

Definition at line 87 of file class.ilTestInfoScreenToolbarGUI.php.

References $testOBJ.

87  : void
88  {
89  $this->testOBJ = $testOBJ;
90  }

◆ setTestPlayerGUI()

ilTestInfoScreenToolbarGUI::setTestPlayerGUI ( ilTestPlayerAbstractGUI  $testPlayerGUI)

Definition at line 107 of file class.ilTestInfoScreenToolbarGUI.php.

References $testPlayerGUI.

107  : void
108  {
109  $this->testPlayerGUI = $testPlayerGUI;
110  }

◆ setTestQuestionSetConfig()

ilTestInfoScreenToolbarGUI::setTestQuestionSetConfig ( ilTestQuestionSetConfig  $testQuestionSetConfig)

Definition at line 97 of file class.ilTestInfoScreenToolbarGUI.php.

References $testQuestionSetConfig.

97  : void
98  {
99  $this->testQuestionSetConfig = $testQuestionSetConfig;
100  }

◆ setTestSequence()

ilTestInfoScreenToolbarGUI::setTestSequence (   $testSequence)
Parameters
ilTestSequence | ilTestSequenceDynamicQuestionSet$testSequence

Definition at line 133 of file class.ilTestInfoScreenToolbarGUI.php.

References $testSequence.

133  : void
134  {
135  $this->testSequence = $testSequence;
136  }

◆ setTestSession()

ilTestInfoScreenToolbarGUI::setTestSession ( ilTestSession  $testSession)

Definition at line 117 of file class.ilTestInfoScreenToolbarGUI.php.

References $testSession.

117  : void
118  {
119  $this->testSession = $testSession;
120  }

Field Documentation

◆ $access

ilAccessHandler ilTestInfoScreenToolbarGUI::$access
protected

Definition at line 33 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by __construct().

◆ $component_repository

ilComponentRepository ilTestInfoScreenToolbarGUI::$component_repository
protected

Definition at line 35 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by __construct().

◆ $ctrl

ilCtrl ilTestInfoScreenToolbarGUI::$ctrl
protected

Definition at line 34 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by __construct().

◆ $db

ilDBInterface ilTestInfoScreenToolbarGUI::$db
protected

Definition at line 32 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by __construct().

◆ $DIC

ILIAS DI Container ilTestInfoScreenToolbarGUI::$DIC
protected

Definition at line 29 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by __construct().

◆ $failureMessages

array ilTestInfoScreenToolbarGUI::$failureMessages = array()
private

Definition at line 53 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getFailureMessages().

◆ $globalToolbar

ilToolbarGUI ilTestInfoScreenToolbarGUI::$globalToolbar = null
private

Definition at line 30 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getGlobalToolbar(), and setGlobalToolbar().

◆ $infoMessages

array ilTestInfoScreenToolbarGUI::$infoMessages = array()
private

Definition at line 52 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getInfoMessages().

◆ $main_tpl

ilGlobalTemplateInterface ilTestInfoScreenToolbarGUI::$main_tpl
private

Definition at line 36 of file class.ilTestInfoScreenToolbarGUI.php.

◆ $sessionLockString

ilTestInfoScreenToolbarGUI::$sessionLockString
private

◆ $TARGET_CLASS_PATH_BASE

array ilTestInfoScreenToolbarGUI::$TARGET_CLASS_PATH_BASE = array('ilRepositoryGUI', 'ilObjTestGUI')
staticprivate

Definition at line 27 of file class.ilTestInfoScreenToolbarGUI.php.

◆ $testOBJ

ilObjTest ilTestInfoScreenToolbarGUI::$testOBJ = null
protected

Definition at line 38 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getTestOBJ(), and setTestOBJ().

◆ $testPlayerGUI

ilTestPlayerAbstractGUI ilTestInfoScreenToolbarGUI::$testPlayerGUI = null
protected

Definition at line 40 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getTestPlayerGUI(), and setTestPlayerGUI().

◆ $testQuestionSetConfig

ilTestQuestionSetConfig ilTestInfoScreenToolbarGUI::$testQuestionSetConfig = null
protected

◆ $testSequence

ilTestInfoScreenToolbarGUI::$testSequence
protected

Definition at line 46 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getTestSequence(), and setTestSequence().

◆ $testSession

ilTestSession ilTestInfoScreenToolbarGUI::$testSession = null
protected

Definition at line 41 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getTestSession(), and setTestSession().


The documentation for this class was generated from the following file: