ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTestInfoScreenToolbarGUI Class Reference
+ Inheritance diagram for ilTestInfoScreenToolbarGUI:
+ Collaboration diagram for ilTestInfoScreenToolbarGUI:

Public Member Functions

 __construct (ilDBInterface $db, ilAccessHandler $access, ilCtrl $ctrl, ilLanguage $lng, ilPluginAdmin $pluginAdmin)
 
 getGlobalToolbar ()
 
 setGlobalToolbar ($globalToolbar)
 
 getTestOBJ ()
 
 setTestOBJ ($testOBJ)
 
 getTestQuestionSetConfig ()
 
 setTestQuestionSetConfig ($testQuestionSetConfig)
 
 getTestPlayerGUI ()
 
 setTestPlayerGUI ($testPlayerGUI)
 
 getTestSession ()
 
 setTestSession ($testSession)
 
 getTestSequence ()
 
 setTestSequence ($testSequence)
 
 getSessionLockString ()
 
 setSessionLockString ($sessionLockString)
 
 getInfoMessages ()
 
 addInfoMessage ($infoMessage)
 
 getFailureMessages ()
 
 addFailureMessage ($failureMessage)
 
 setFormAction ($formAction, $isMultipart=false, $target='')
 
 addButtonInstance (ilButtonBase $btnInstance)
 
 setCloseFormTag ($enabled)
 
 addInputItem (ilToolbarItem $inputItem, $outputLabel=false)
 
 addFormInput ($formInput)
 
 clearItems ()
 
 build ()
 
 sendMessages ()
 
- Public Member Functions inherited from ilToolbarGUI
 __construct ()
 
 setFormAction ($a_val, $a_multipart=false, $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 Get form action. More...
 
 setLeadingImage ($a_img, $a_alt)
 Set leading image. More...
 
 setHidden ($a_val)
 Set hidden. More...
 
 getHidden ()
 Get hidden. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 addButton ( $a_txt, $a_cmd, $a_target="", $a_acc_key="", $a_additional_attrs='', $a_id="", $a_class='submit')
 Add button to toolbar. More...
 
 addFormButton ($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
 Add form button to toolbar. More...
 
 addInputItem (ilToolbarItem $a_item, $a_output_label=false)
 Add input item. More...
 
 addStickyItem ($a_item, $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown ($a_txt, $a_dd_html)
 Add input item. More...
 
 addSeparator ()
 Add separator. More...
 
 addText ($a_text)
 Add text. More...
 
 addSpacer ($a_width=null)
 Add spacer. More...
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 Add component. More...
 
 addLink ($a_caption, $a_url, $a_disabled=false)
 Add link. More...
 
 setOpenFormTag ($a_val)
 Set open form tag. More...
 
 getOpenFormTag ()
 Get open form tag. More...
 
 setCloseFormTag ($a_val)
 Set close form tag. More...
 
 getCloseFormTag ()
 Get close form tag. More...
 
 setFormName ($a_val)
 Set form name. More...
 
 getFormName ()
 Get form name. More...
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems ($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

 $DIC
 
 $db
 
 $access
 
 $ctrl
 
 $lng
 
 $pluginAdmin
 
 $testOBJ
 
 $testQuestionSetConfig
 
 $testPlayerGUI
 
 $testSession
 
 $testSequence
 
- Protected Attributes inherited from ilToolbarGUI
 $lng
 
 $id = ''
 
 $form_action = ''
 
 $hidden
 
 $lead_img
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $form_target = ""
 
 $form_name = ""
 
 $prevent_double_submission = false
 
 $sticky_items = array()
 
 $has_separator = false
 

Private Member Functions

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

Private Attributes

 $globalToolbar
 
 $sessionLockString
 
 $infoMessages = array()
 
 $failureMessages = array()
 

Static Private Attributes

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

Additional Inherited Members

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

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilTestInfoScreenToolbarGUI::__construct ( ilDBInterface  $db,
ilAccessHandler  $access,
ilCtrl  $ctrl,
ilLanguage  $lng,
ilPluginAdmin  $pluginAdmin 
)

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

References $access, $ctrl, $db, $DIC, $lng, and $pluginAdmin.

Member Function Documentation

◆ addButtonInstance()

ilTestInfoScreenToolbarGUI::addButtonInstance ( ilButtonBase  $btnInstance)

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

Referenced by build(), and populateDeleteDynamicTestResultsButton().

260  {
261  if ($this->globalToolbar instanceof parent) {
262  $this->globalToolbar->addButtonInstance($btnInstance);
263  } else {
264  parent::addButtonInstance($btnInstance);
265  }
266  }
+ Here is the caller graph for this function:

◆ addFailureMessage()

ilTestInfoScreenToolbarGUI::addFailureMessage (   $failureMessage)
Parameters
string$failureMessage

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

Referenced by build().

246  {
247  $this->failureMessages[] = $failureMessage;
248  }
+ Here is the caller graph for this function:

◆ addFormInput()

ilTestInfoScreenToolbarGUI::addFormInput (   $formInput)

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

287  {
288  if ($this->globalToolbar instanceof parent) {
289  $this->globalToolbar->addFormInput($formInput);
290  } else {
291  parent::addFormInput($formInput);
292  }
293  }

◆ addInfoMessage()

ilTestInfoScreenToolbarGUI::addInfoMessage (   $infoMessage)
Parameters
string$infoMessage

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

Referenced by build().

230  {
231  $this->infoMessages[] = $infoMessage;
232  }
+ Here is the caller graph for this function:

◆ addInputItem()

ilTestInfoScreenToolbarGUI::addInputItem ( ilToolbarItem  $inputItem,
  $outputLabel = false 
)

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

Referenced by build().

278  {
279  if ($this->globalToolbar instanceof parent) {
280  $this->globalToolbar->addInputItem($inputItem, $outputLabel);
281  } else {
282  parent::addInputItem($inputItem, $outputLabel);
283  }
284  }
+ Here is the caller graph for this function:

◆ areSkillLevelThresholdsMissing()

ilTestInfoScreenToolbarGUI::areSkillLevelThresholdsMissing ( )
private

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

References $data, getTestOBJ(), and getTestQuestionSetConfig().

Referenced by build().

406  {
407  if (!$this->getTestOBJ()->isSkillServiceEnabled()) {
408  return false;
409  }
410 
411  if ($this->getTestOBJ()->isDynamicTest()) {
412  $questionSetConfig = $this->getTestQuestionSetConfig();
413  $questionContainerId = $questionSetConfig->getSourceQuestionPoolId();
414  } else {
415  $questionContainerId = $this->getTestOBJ()->getId();
416  }
417 
418  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
419  require_once 'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
420 
421  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
422  $assignmentList->setParentObjId($questionContainerId);
423  $assignmentList->loadFromDb();
424 
425  foreach ($assignmentList->getUniqueAssignedSkills() as $data) {
426  foreach ($data['skill']->getLevelData() as $level) {
427  $treshold = new ilTestSkillLevelThreshold($this->db);
428  $treshold->setTestId($this->getTestOBJ()->getTestId());
429  $treshold->setSkillBaseId($data['skill_base_id']);
430  $treshold->setSkillTrefId($data['skill_tref_id']);
431  $treshold->setSkillLevelId($level['id']);
432 
433  if (!$treshold->dbRecordExists()) {
434  return true;
435  }
436  }
437  }
438 
439  return false;
440  }
$data
Definition: bench.php:6
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build()

ilTestInfoScreenToolbarGUI::build ( )

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

References $links, $message, ilObjTestAccess\_lookupOnlineTestAccess(), addButtonInstance(), addFailureMessage(), addInfoMessage(), addInputItem(), ilToolbarGUI\addSeparator(), areSkillLevelThresholdsMissing(), buildFormAction(), buildLinkTarget(), clearItems(), ensureInitialisedSessionLockString(), ilToolbarGUI\getId(), ilSubmitButton\getInstance(), ilToolbarGUI\getItems(), getSessionLockString(), getSkillAssignBarrierInfo(), getSkillLevelThresholdsMissingInfo(), getTestOBJ(), getTestPlayerGUI(), getTestQuestionSetConfig(), getTestSession(), hasFixedQuestionSetSkillAssignsLowerThanBarrier(), isDeleteDynamicTestResultsButtonRequired(), populateDeleteDynamicTestResultsButton(), populateMessage(), setFormAction(), setParameter(), and ilTextInputGUI\setSize().

486  {
488 
489  $this->setParameter($this->getTestPlayerGUI(), 'lock', $this->getSessionLockString());
490  $this->setParameter($this->getTestPlayerGUI(), 'sequence', $this->getTestSession()->getLastSequence());
491  $this->setParameter('ilObjTestGUI', 'ref_id', $this->getTestOBJ()->getRefId());
492 
493  $this->setFormAction($this->buildFormAction($this->testPlayerGUI));
494 
495  $online_access = false;
496  if ($this->getTestOBJ()->getFixedParticipants()) {
497  include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
498  $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->getTestOBJ()->getId(), $this->getTestSession()->getUserId());
499  if ($online_access_result === true) {
500  $online_access = true;
501  } else {
502  $this->addInfoMessage($online_access_result);
503  }
504  }
505 
506  if (!$this->getTestOBJ()->getOfflineStatus() && $this->getTestOBJ()->isComplete($this->getTestQuestionSetConfig())) {
507  if ((!$this->getTestOBJ()->getFixedParticipants() || $online_access) && $this->access->checkAccess("read", "", $this->getTestOBJ()->getRefId())) {
508  $executable = $this->getTestOBJ()->isExecutable(
509  $this->getTestSession(),
510  $this->getTestSession()->getUserId(),
511  $allowPassIncrease = true
512  );
513 
514  if ($executable["executable"]) {
515  if ($this->getTestOBJ()->areObligationsEnabled() && $this->getTestOBJ()->hasObligations($this->getTestOBJ()->getTestId())) {
516  $this->addInfoMessage($this->lng->txt('tst_test_contains_obligatory_questions'));
517  }
518 
519  if ($this->getTestSession()->getActiveId() > 0) {
520  // resume test
521  require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
522  $testPassesSelector = new ilTestPassesSelector($this->db, $this->getTestOBJ());
523  $testPassesSelector->setActiveId($this->getTestSession()->getActiveId());
524  $testPassesSelector->setLastFinishedPass($this->getTestSession()->getLastFinishedPass());
525 
526  $closedPasses = $testPassesSelector->getClosedPasses();
527  $existingPasses = $testPassesSelector->getExistingPasses();
528 
529  if ($existingPasses > $closedPasses) {
531  $btn->setCaption('tst_resume_test');
532  $btn->setCommand('resumePlayer');
533  $btn->setPrimary(true);
534  $this->addButtonInstance($btn);
535  } else {
537  $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
538  $btn->setCommand('startPlayer');
539  $btn->setPrimary(true);
540  $this->addButtonInstance($btn);
541  }
542  } else {
543  // start new test
545  $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
546  $btn->setCommand('startPlayer');
547  $btn->setPrimary(true);
548  $this->addButtonInstance($btn);
549  }
550  } else {
551  $this->addInfoMessage($executable['errormessage']);
552  }
553  }
554 
557  }
558 
559  if ($this->DIC->user()->getId() == ANONYMOUS_USER_ID) {
560  if ($this->getItems()) {
561  $this->addSeparator();
562  }
563 
564  require_once 'Services/Form/classes/class.ilTextInputGUI.php';
565  $anonymous_id = new ilTextInputGUI($this->lng->txt('enter_anonymous_code'), 'anonymous_id');
566  $anonymous_id->setSize(8);
567  $this->addInputItem($anonymous_id, true);
568  $button = ilSubmitButton::getInstance();
569  $button->setCaption('submit');
570  $button->setCommand('setAnonymousId');
571  $this->addButtonInstance($button);
572  }
573  }
574  if ($this->getTestOBJ()->getOfflineStatus() && !$this->getTestQuestionSetConfig()->areDepenciesBroken()) {
575  $message = $this->lng->txt("test_is_offline");
576 
577  $links = array();
578 
579  if ($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId())) {
580  $links[] = $this->DIC->ui()->factory()->link()->standard(
581  $this->DIC->language()->txt('test_edit_settings'),
582  $this->buildLinkTarget('ilobjtestsettingsgeneralgui')
583  );
584  }
585 
586  $msgBox = $this->DIC->ui()->factory()->messageBox()->info($message)->withLinks($links);
587 
588  $this->populateMessage($this->DIC->ui()->renderer()->render($msgBox));
589  }
590 
591  if ($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId())) {
592  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
593  $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->testOBJ->getId());
594  require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
595  $sltImportFails = new ilTestSkillLevelThresholdImportFails($this->testOBJ->getId());
596 
597  if ($qsaImportFails->failedImportsRegistered() || $sltImportFails->failedImportsRegistered()) {
598  $importFailsMsg = array();
599 
600  if ($qsaImportFails->failedImportsRegistered()) {
601  $importFailsMsg[] = $qsaImportFails->getFailedImportsMessage($this->lng);
602  }
603 
604  if ($sltImportFails->failedImportsRegistered()) {
605  $importFailsMsg[] = $sltImportFails->getFailedImportsMessage($this->lng);
606  }
607 
608  $message = implode('<br />', $importFailsMsg);
609 
610  $button = $this->DIC->ui()->factory()->button()->standard(
611  $this->DIC->language()->txt('ass_skl_import_fails_remove_btn'),
612  $this->DIC->ctrl()->getLinkTargetByClass('ilObjTestGUI', 'removeImportFails')
613  );
614 
615  $msgBox = $this->DIC->ui()->factory()->messageBox()->failure($message)->withButtons(array($button));
616 
617  $this->populateMessage($this->DIC->ui()->renderer()->render($msgBox));
618  } elseif ($this->getTestOBJ()->isSkillServiceToBeConsidered()) {
619  if ($this->areSkillLevelThresholdsMissing()) {
621  }
622 
624  $this->addInfoMessage($this->getSkillAssignBarrierInfo());
625  }
626  }
627 
628  if ($this->getTestQuestionSetConfig()->areDepenciesBroken()) {
629  $this->addFailureMessage($this->getTestQuestionSetConfig()->getDepenciesBrokenMessage($this->lng));
630 
631  $this->clearItems();
632  } elseif ($this->getTestQuestionSetConfig()->areDepenciesInVulnerableState()) {
633  $this->addInfoMessage($this->getTestQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng));
634  }
635  }
636  }
setParameter($target, $parameter, $value)
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
catch(Exception $e) $message
addInputItem(ilToolbarItem $inputItem, $outputLabel=false)
setSize($a_size)
Set Size.
This class represents a text property in a property form.
addButtonInstance(ilButtonBase $btnInstance)
addSeparator()
Add separator.
setFormAction($formAction, $isMultipart=false, $target='')
$links
+ Here is the call graph for this function:

◆ buildFormAction()

ilTestInfoScreenToolbarGUI::buildFormAction (   $target)
private

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

References $target, and getClassPath().

Referenced by build().

338  {
339  return $this->ctrl->getFormActionByClass($this->getClassPath($target));
340  }
$target
Definition: test.php:19
+ 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 332 of file class.ilTestInfoScreenToolbarGUI.php.

References $target, and getClassPath().

Referenced by build(), getSkillLevelThresholdsMissingInfo(), and populateDeleteDynamicTestResultsButton().

333  {
334  return $this->ctrl->getLinkTargetByClass($this->getClassPath($target), $cmd);
335  }
$target
Definition: test.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSessionLockString()

ilTestInfoScreenToolbarGUI::buildSessionLockString ( )
private

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

References $_COOKIE.

Referenced by ensureInitialisedSessionLockString().

350  {
351  return md5($_COOKIE[session_name()] . time());
352  }
$_COOKIE['client_id']
Definition: server.php:9
+ Here is the caller graph for this function:

◆ clearItems()

ilTestInfoScreenToolbarGUI::clearItems ( )

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

References ilToolbarGUI\setItems().

Referenced by build().

296  {
297  if ($this->globalToolbar instanceof parent) {
298  $this->globalToolbar->setItems(array());
299  } else {
300  $this->setItems(array());
301  }
302  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureInitialisedSessionLockString()

ilTestInfoScreenToolbarGUI::ensureInitialisedSessionLockString ( )
private

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

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

Referenced by build().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassName()

ilTestInfoScreenToolbarGUI::getClassName (   $target)
private

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

References $target.

Referenced by getClassNameArray(), and setParameter().

305  {
306  if (is_object($target)) {
307  $target = get_class($target);
308  }
309 
310  return $target;
311  }
$target
Definition: test.php:19
+ Here is the caller graph for this function:

◆ getClassNameArray()

ilTestInfoScreenToolbarGUI::getClassNameArray (   $target)
private

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

References $target, and getClassName().

Referenced by getClassPath().

314  {
315  if (is_array($target)) {
316  return $target;
317  }
318 
319  return array($this->getClassName($target));
320  }
$target
Definition: test.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassPath()

ilTestInfoScreenToolbarGUI::getClassPath (   $target)
private

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

References $target, and getClassNameArray().

Referenced by buildFormAction(), and buildLinkTarget().

323  {
324  return array_merge(self::$TARGET_CLASS_PATH_BASE, $this->getClassNameArray($target));
325  }
$target
Definition: test.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFailureMessages()

ilTestInfoScreenToolbarGUI::getFailureMessages ( )
Returns
array

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

References $failureMessages.

Referenced by sendMessages().

+ Here is the caller graph for this function:

◆ getGlobalToolbar()

ilTestInfoScreenToolbarGUI::getGlobalToolbar ( )
Returns
parent

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

References $globalToolbar.

◆ getInfoMessages()

ilTestInfoScreenToolbarGUI::getInfoMessages ( )
Returns
array

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

References $infoMessages.

Referenced by sendMessages().

+ Here is the caller graph for this function:

◆ getSessionLockString()

ilTestInfoScreenToolbarGUI::getSessionLockString ( )
Returns
string

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

References $sessionLockString.

Referenced by build(), and ensureInitialisedSessionLockString().

+ Here is the caller graph for this function:

◆ getSkillAssignBarrierInfo()

ilTestInfoScreenToolbarGUI::getSkillAssignBarrierInfo ( )
private

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

References ilObjAssessmentFolder\getSkillTriggerAnswerNumberBarrier().

Referenced by build().

476  {
477  require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
478 
479  return sprintf(
480  $this->lng->txt('tst_skill_triggerings_num_req_answers_not_reached_warn'),
482  );
483  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillLevelThresholdsMissingInfo()

ilTestInfoScreenToolbarGUI::getSkillLevelThresholdsMissingInfo ( )
private

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

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

Referenced by build().

443  {
444  $message = $this->lng->txt('tst_skl_level_thresholds_missing');
445 
446  $linkTarget = $this->buildLinkTarget(
447  array('ilTestSkillAdministrationGUI', 'ilTestSkillLevelThresholdsGUI'),
449  );
450 
451  $link = $this->DIC->ui()->factory()->link()->standard(
452  $this->DIC->language()->txt('tst_skl_level_thresholds_link'),
453  $linkTarget
454  );
455 
456  $msgBox = $this->DIC->ui()->factory()->messageBox()->failure($message)->withLinks(array($link));
457 
458  return $this->DIC->ui()->renderer()->render($msgBox);
459  }
catch(Exception $e) $message
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestOBJ()

ilTestInfoScreenToolbarGUI::getTestOBJ ( )
Returns
ilObjTest

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

References $testOBJ.

Referenced by areSkillLevelThresholdsMissing(), build(), and isDeleteDynamicTestResultsButtonRequired().

+ Here is the caller graph for this function:

◆ getTestPlayerGUI()

ilTestInfoScreenToolbarGUI::getTestPlayerGUI ( )
Returns
ilTestPlayerAbstractGUI

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

References $testPlayerGUI.

Referenced by build().

+ Here is the caller graph for this function:

◆ getTestQuestionSetConfig()

ilTestInfoScreenToolbarGUI::getTestQuestionSetConfig ( )
Returns
ilTestQuestionSetConfig

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

References $testQuestionSetConfig.

Referenced by areSkillLevelThresholdsMissing(), and build().

+ Here is the caller graph for this function:

◆ getTestSequence()

ilTestInfoScreenToolbarGUI::getTestSequence ( )
Returns
ilTestSequence|ilTestSequenceDynamicQuestionSet

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

References $testSequence.

Referenced by isDeleteDynamicTestResultsButtonRequired().

+ Here is the caller graph for this function:

◆ getTestSession()

ilTestInfoScreenToolbarGUI::getTestSession ( )
Returns
ilTestSession

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

References $testSession.

Referenced by build(), isDeleteDynamicTestResultsButtonRequired(), and populateDeleteDynamicTestResultsButton().

+ Here is the caller graph for this function:

◆ hasFixedQuestionSetSkillAssignsLowerThanBarrier()

ilTestInfoScreenToolbarGUI::hasFixedQuestionSetSkillAssignsLowerThanBarrier ( )
private

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

Referenced by build().

462  {
463  if (!$this->testOBJ->isFixedTest()) {
464  return false;
465  }
466 
467  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
468  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
469  $assignmentList->setParentObjId($this->testOBJ->getId());
470  $assignmentList->loadFromDb();
471 
472  return $assignmentList->hasSkillsAssignedLowerThanBarrier();
473  }
+ Here is the caller graph for this function:

◆ isDeleteDynamicTestResultsButtonRequired()

ilTestInfoScreenToolbarGUI::isDeleteDynamicTestResultsButtonRequired ( )
private
Parameters
$testSession
$testSequence
Returns
bool

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

References getTestOBJ(), getTestSequence(), and getTestSession().

Referenced by build().

360  {
361  if (!$this->getTestSession()->getActiveId()) {
362  return false;
363  }
364 
365  if (!$this->getTestOBJ()->isDynamicTest()) {
366  return false;
367  }
368 
369  if (!$this->getTestOBJ()->isPassDeletionAllowed()) {
370  return false;
371  }
372 
373  if (!$this->getTestSequence()->hasStarted($this->getTestSession())) {
374  return false;
375  }
376 
377  return true;
378  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateDeleteDynamicTestResultsButton()

ilTestInfoScreenToolbarGUI::populateDeleteDynamicTestResultsButton ( )
private
Parameters
$testSession
$big_button

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

References addButtonInstance(), buildLinkTarget(), ilTestPassDeletionConfirmationGUI\CONTEXT_INFO_SCREEN, ilLinkButton\getInstance(), getTestSession(), and setParameter().

Referenced by build().

385  {
386  require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
387 
388  $this->ctrl->setParameterByClass(
389  'iltestevaluationgui',
390  'context',
392  );
393 
394  $this->setParameter('iltestevaluationgui', 'active_id', $this->getTestSession()->getActiveId());
395  $this->setParameter('iltestevaluationgui', 'pass', $this->getTestSession()->getPass());
396 
397  $btn = ilLinkButton::getInstance();
398  $btn->setCaption('tst_delete_dyn_test_results_btn');
399  $btn->setUrl($this->buildLinkTarget('iltestevaluationgui', 'confirmDeletePass'));
400  $btn->setPrimary(false);
401 
402  $this->addButtonInstance($btn);
403  }
setParameter($target, $parameter, $value)
addButtonInstance(ilButtonBase $btnInstance)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateMessage()

ilTestInfoScreenToolbarGUI::populateMessage (   $message)
protected
Parameters
$message

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

References $message.

Referenced by build().

642  {
643  $this->DIC->ui()->mainTemplate()->setCurrentBlock('mess');
644  $this->DIC->ui()->mainTemplate()->setVariable('MESSAGE', $message);
645  $this->DIC->ui()->mainTemplate()->parseCurrentBlock();
646  }
catch(Exception $e) $message
+ Here is the caller graph for this function:

◆ sendMessages()

ilTestInfoScreenToolbarGUI::sendMessages ( )

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

References getFailureMessages(), getInfoMessages(), ilUtil\sendFailure(), and ilUtil\sendInfo().

649  {
650  ilUtil::sendInfo(array_pop($this->getInfoMessages()));
651  ilUtil::sendFailure(array_pop($this->getFailureMessages()));
652  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ setCloseFormTag()

ilTestInfoScreenToolbarGUI::setCloseFormTag (   $enabled)

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

269  {
270  if ($this->globalToolbar instanceof parent) {
271  $this->globalToolbar->setCloseFormTag($enabled);
272  } else {
273  parent::setCloseFormTag($enabled);
274  }
275  }

◆ setFormAction()

ilTestInfoScreenToolbarGUI::setFormAction (   $formAction,
  $isMultipart = false,
  $target = '' 
)

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

References $target.

Referenced by build().

251  {
252  if ($this->globalToolbar instanceof parent) {
253  $this->globalToolbar->setFormAction($formAction, $isMultipart, $target);
254  } else {
255  parent::setFormAction($formAction, $isMultipart, $target);
256  }
257  }
$target
Definition: test.php:19
+ Here is the caller graph for this function:

◆ setGlobalToolbar()

ilTestInfoScreenToolbarGUI::setGlobalToolbar (   $globalToolbar)
Parameters
parent$globalToolbar

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

References $globalToolbar.

118  {
119  $this->globalToolbar = $globalToolbar;
120  }

◆ setParameter()

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

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

References $target, and getClassName().

Referenced by build(), and populateDeleteDynamicTestResultsButton().

328  {
329  $this->ctrl->setParameterByClass($this->getClassName($target), $parameter, $value);
330  }
$target
Definition: test.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSessionLockString()

ilTestInfoScreenToolbarGUI::setSessionLockString (   $sessionLockString)
Parameters
string$sessionLockString

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

References $sessionLockString.

Referenced by ensureInitialisedSessionLockString().

214  {
215  $this->sessionLockString = $sessionLockString;
216  }
+ Here is the caller graph for this function:

◆ setTestOBJ()

ilTestInfoScreenToolbarGUI::setTestOBJ (   $testOBJ)
Parameters
ilObjTest$testOBJ

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

References $testOBJ.

134  {
135  $this->testOBJ = $testOBJ;
136  }

◆ setTestPlayerGUI()

ilTestInfoScreenToolbarGUI::setTestPlayerGUI (   $testPlayerGUI)
Parameters
ilTestPlayerAbstractGUI$testPlayerGUI

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

References $testPlayerGUI.

166  {
167  $this->testPlayerGUI = $testPlayerGUI;
168  }

◆ setTestQuestionSetConfig()

ilTestInfoScreenToolbarGUI::setTestQuestionSetConfig (   $testQuestionSetConfig)
Parameters
ilTestQuestionSetConfig$testQuestionSetConfig

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

References $testQuestionSetConfig.

150  {
151  $this->testQuestionSetConfig = $testQuestionSetConfig;
152  }

◆ setTestSequence()

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

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

References $testSequence.

198  {
199  $this->testSequence = $testSequence;
200  }

◆ setTestSession()

ilTestInfoScreenToolbarGUI::setTestSession (   $testSession)
Parameters
ilTestSession$testSession

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

References $testSession.

182  {
183  $this->testSession = $testSession;
184  }

Field Documentation

◆ $access

ilTestInfoScreenToolbarGUI::$access
protected

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

Referenced by __construct().

◆ $ctrl

ilTestInfoScreenToolbarGUI::$ctrl
protected

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

Referenced by __construct().

◆ $db

ilTestInfoScreenToolbarGUI::$db
protected

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

Referenced by __construct().

◆ $DIC

ilTestInfoScreenToolbarGUI::$DIC
protected

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

Referenced by __construct().

◆ $failureMessages

ilTestInfoScreenToolbarGUI::$failureMessages = array()
private

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

Referenced by getFailureMessages().

◆ $globalToolbar

ilTestInfoScreenToolbarGUI::$globalToolbar
private

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

Referenced by getGlobalToolbar(), and setGlobalToolbar().

◆ $infoMessages

ilTestInfoScreenToolbarGUI::$infoMessages = array()
private

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

Referenced by getInfoMessages().

◆ $lng

ilTestInfoScreenToolbarGUI::$lng
protected

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

Referenced by __construct().

◆ $pluginAdmin

ilTestInfoScreenToolbarGUI::$pluginAdmin
protected

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

Referenced by __construct().

◆ $sessionLockString

ilTestInfoScreenToolbarGUI::$sessionLockString
private

◆ $TARGET_CLASS_PATH_BASE

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

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

◆ $testOBJ

ilTestInfoScreenToolbarGUI::$testOBJ
protected

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

Referenced by getTestOBJ(), and setTestOBJ().

◆ $testPlayerGUI

ilTestInfoScreenToolbarGUI::$testPlayerGUI
protected

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

Referenced by getTestPlayerGUI(), and setTestPlayerGUI().

◆ $testQuestionSetConfig

ilTestInfoScreenToolbarGUI::$testQuestionSetConfig
protected

◆ $testSequence

ilTestInfoScreenToolbarGUI::$testSequence
protected

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

Referenced by getTestSequence(), and setTestSequence().

◆ $testSession

ilTestInfoScreenToolbarGUI::$testSession
protected

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

Referenced by getTestSession(), and setTestSession().


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