ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 Attributes

 $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()
 
- 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...
 
- 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 
)

Member Function Documentation

◆ addButtonInstance()

ilTestInfoScreenToolbarGUI::addButtonInstance ( ilButtonBase  $btnInstance)

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

Referenced by build(), and populateDeleteDynamicTestResultsButton().

253  {
254  if ($this->globalToolbar instanceof parent) {
255  $this->globalToolbar->addButtonInstance($btnInstance);
256  } else {
257  parent::addButtonInstance($btnInstance);
258  }
259  }
+ Here is the caller graph for this function:

◆ addFailureMessage()

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

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

Referenced by build().

239  {
240  $this->failureMessages[] = $failureMessage;
241  }
+ Here is the caller graph for this function:

◆ addFormInput()

ilTestInfoScreenToolbarGUI::addFormInput (   $formInput)

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

280  {
281  if ($this->globalToolbar instanceof parent) {
282  $this->globalToolbar->addFormInput($formInput);
283  } else {
284  parent::addFormInput($formInput);
285  }
286  }

◆ addInfoMessage()

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

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

Referenced by build().

223  {
224  $this->infoMessages[] = $infoMessage;
225  }
+ Here is the caller graph for this function:

◆ addInputItem()

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

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

Referenced by build().

271  {
272  if ($this->globalToolbar instanceof parent) {
273  $this->globalToolbar->addInputItem($inputItem, $outputLabel);
274  } else {
275  parent::addInputItem($inputItem, $outputLabel);
276  }
277  }
+ Here is the caller graph for this function:

◆ areSkillLevelThresholdsMissing()

ilTestInfoScreenToolbarGUI::areSkillLevelThresholdsMissing ( )
private

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

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

Referenced by build().

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

◆ build()

ilTestInfoScreenToolbarGUI::build ( )

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

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

475  {
477 
478  $this->setParameter($this->getTestPlayerGUI(), 'lock', $this->getSessionLockString());
479  $this->setParameter($this->getTestPlayerGUI(), 'sequence', $this->getTestSession()->getLastSequence());
480  $this->setParameter('ilObjTestGUI', 'ref_id', $this->getTestOBJ()->getRefId());
481 
482  $this->setFormAction($this->buildFormAction($this->testPlayerGUI));
483 
484  $online_access = false;
485  if ($this->getTestOBJ()->getFixedParticipants()) {
486  include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
487  $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->getTestOBJ()->getId(), $this->getTestSession()->getUserId());
488  if ($online_access_result === true) {
489  $online_access = true;
490  } else {
491  $this->addInfoMessage($online_access_result);
492  }
493  }
494 
495  if ($this->getTestOBJ()->isOnline() && $this->getTestOBJ()->isComplete($this->getTestQuestionSetConfig())) {
496  if ((!$this->getTestOBJ()->getFixedParticipants() || $online_access) && $this->access->checkAccess("read", "", $this->getTestOBJ()->getRefId())) {
497  $executable = $this->getTestOBJ()->isExecutable(
498  $this->getTestSession(),
499  $this->getTestSession()->getUserId(),
500  $allowPassIncrease = true
501  );
502 
503  if ($executable["executable"]) {
504  if ($this->getTestOBJ()->areObligationsEnabled() && $this->getTestOBJ()->hasObligations($this->getTestOBJ()->getTestId())) {
505  $this->addInfoMessage($this->lng->txt('tst_test_contains_obligatory_questions'));
506  }
507 
508  if ($this->getTestSession()->getActiveId() > 0) {
509  // resume test
510  require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
511  $testPassesSelector = new ilTestPassesSelector($this->db, $this->getTestOBJ());
512  $testPassesSelector->setActiveId($this->getTestSession()->getActiveId());
513  $testPassesSelector->setLastFinishedPass($this->getTestSession()->getLastFinishedPass());
514 
515  $closedPasses = $testPassesSelector->getClosedPasses();
516  $existingPasses = $testPassesSelector->getExistingPasses();
517 
518  if ($existingPasses > $closedPasses) {
520  $btn->setCaption('tst_resume_test');
521  $btn->setCommand('resumePlayer');
522  $btn->setPrimary(true);
523  $this->addButtonInstance($btn);
524  } else {
526  $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
527  $btn->setCommand('startPlayer');
528  $btn->setPrimary(true);
529  $this->addButtonInstance($btn);
530  }
531  } else {
532  // start new test
534  $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
535  $btn->setCommand('startPlayer');
536  $btn->setPrimary(true);
537  $this->addButtonInstance($btn);
538  }
539  } else {
540  $this->addInfoMessage($executable['errormessage']);
541  }
542  if ($this->getTestSession()->getActiveId() > 0) {
543  // test results button
544 
545  require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
546  $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->getTestOBJ());
547  $testPassesSelector->setActiveId($this->getTestSession()->getActiveId());
548  $testPassesSelector->setLastFinishedPass($this->getTestSession()->getLastFinishedPass());
549 
550  if ($this->getTestOBJ()->canShowTestResults($this->getTestSession())) {
551  $btn = ilLinkButton::getInstance();
552  $btn->setCaption('tst_show_results');
553  $btn->setUrl($this->buildLinkTarget('ilTestEvaluationGUI', 'outUserResultsOverview'));
554  $btn->setPrimary(false);
555  $this->addButtonInstance($btn);
556 
557  if ($this->getTestOBJ()->getHighscoreEnabled()) {
558  // Can also compare results then
559  $btn = ilLinkButton::getInstance();
560  $btn->setCaption('tst_show_toplist');
561  $btn->setUrl($this->buildLinkTarget('ilTestToplistGUI', 'outResultsToplist'));
562  $btn->setPrimary(false);
563  $this->addButtonInstance($btn);
564  }
565 
566  if ($this->getTestOBJ()->isSkillServiceToBeConsidered()) {
567  require_once 'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
568 
569  $btn = ilLinkButton::getInstance();
570  $btn->setCaption('tst_show_comp_results');
571  $btn->setUrl($this->buildLinkTarget('ilTestSkillEvaluationGUI', ilTestSkillEvaluationGUI::CMD_SHOW));
572  $btn->setPrimary(false);
573  $this->addButtonInstance($btn);
574  }
575  }
576  }
577  }
578  if ($this->getTestSession()->getActiveId() > 0) {
579  if ($this->getTestOBJ()->canShowSolutionPrintview($this->getTestSession()->getUserId())) {
580  $btn = ilLinkButton::getInstance();
581  $btn->setCaption('tst_list_of_answers_show');
582  $btn->setUrl($this->buildLinkTarget('ilTestEvaluationGUI', 'outUserListOfAnswerPasses'));
583  $btn->setPrimary(false);
584  $this->addButtonInstance($btn);
585  }
586  }
587 
590  }
591 
592  if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
593  if ($this->getItems()) {
594  $this->addSeparator();
595  }
596 
597  require_once 'Services/Form/classes/class.ilTextInputGUI.php';
598  $anonymous_id = new ilTextInputGUI($this->lng->txt('enter_anonymous_code'), 'anonymous_id');
599  $anonymous_id->setSize(8);
600  $this->addInputItem($anonymous_id, true);
601  $this->addFormButton($this->lng->txt('submit'), 'setAnonymousId');
602  }
603  }
604  if (!$this->getTestOBJ()->isOnline() && !$this->getTestQuestionSetConfig()->areDepenciesBroken()) {
605  $message = $this->lng->txt("test_is_offline");
606 
607  if ($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId())) {
608  $message .= "<br /><a href=\"" . $this->buildLinkTarget('ilobjtestsettingsgeneralgui') . "\">" .
609  $this->lng->txt("test_edit_settings") . "</a>";
610  }
611 
612  $this->addInfoMessage($message);
613  }
614 
615  if ($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId())) {
616  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
617  $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->testOBJ->getId());
618  require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
619  $sltImportFails = new ilTestSkillLevelThresholdImportFails($this->testOBJ->getId());
620 
621  if ($qsaImportFails->failedImportsRegistered() || $sltImportFails->failedImportsRegistered()) {
622  $importFailsMsg = array();
623 
624  if ($qsaImportFails->failedImportsRegistered()) {
625  $importFailsMsg[] = $qsaImportFails->getFailedImportsMessage($this->lng);
626  }
627 
628  if ($sltImportFails->failedImportsRegistered()) {
629  $importFailsMsg[] = $sltImportFails->getFailedImportsMessage($this->lng);
630  }
631 
632  $button = ilLinkButton::getInstance();
633  $button->setUrl($this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'removeImportFails'));
634  $button->setCaption('ass_skl_import_fails_remove_btn');
635  $importFailsMsg[] = $button->render();
636 
637  $this->addFailureMessage(implode('<br />', $importFailsMsg));
638  } elseif ($this->getTestOBJ()->isSkillServiceToBeConsidered()) {
639  if ($this->areSkillLevelThresholdsMissing()) {
641  }
642 
644  $this->addInfoMessage($this->getSkillAssignBarrierInfo());
645  }
646  }
647 
648  if ($this->getTestQuestionSetConfig()->areDepenciesBroken()) {
649  $this->addFailureMessage($this->getTestQuestionSetConfig()->getDepenciesBrokenMessage($this->lng));
650 
651  $this->clearItems();
652  } elseif ($this->getTestQuestionSetConfig()->areDepenciesInVulnerableState()) {
653  $this->addInfoMessage($this->getTestQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng));
654  }
655  }
656  }
$_SESSION["AccountId"]
setParameter($target, $parameter, $value)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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)
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
addButtonInstance(ilButtonBase $btnInstance)
addSeparator()
Add separator.
Create styles array
The data for the language used.
setFormAction($formAction, $isMultipart=false, $target='')
+ Here is the call graph for this function:

◆ buildFormAction()

ilTestInfoScreenToolbarGUI::buildFormAction (   $target)
private

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

References $target, and getClassPath().

Referenced by build().

331  {
332  return $this->ctrl->getFormActionByClass($this->getClassPath($target));
333  }
+ 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 325 of file class.ilTestInfoScreenToolbarGUI.php.

References $target, and getClassPath().

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

326  {
327  return $this->ctrl->getLinkTargetByClass($this->getClassPath($target), $cmd);
328  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSessionLockString()

ilTestInfoScreenToolbarGUI::buildSessionLockString ( )
private

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

References $_COOKIE, and time.

Referenced by ensureInitialisedSessionLockString().

343  {
344  return md5($_COOKIE['PHPSESSID'] . time());
345  }
$_COOKIE['client_id']
Definition: server.php:9
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the caller graph for this function:

◆ clearItems()

ilTestInfoScreenToolbarGUI::clearItems ( )

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

References array, and ilToolbarGUI\setItems().

Referenced by build().

289  {
290  if ($this->globalToolbar instanceof parent) {
291  $this->globalToolbar->setItems(array());
292  } else {
293  $this->setItems(array());
294  }
295  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureInitialisedSessionLockString()

ilTestInfoScreenToolbarGUI::ensureInitialisedSessionLockString ( )
private

Definition at line 335 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 297 of file class.ilTestInfoScreenToolbarGUI.php.

References $target.

Referenced by getClassNameArray(), and setParameter().

298  {
299  if (is_object($target)) {
300  $target = get_class($target);
301  }
302 
303  return $target;
304  }
+ Here is the caller graph for this function:

◆ getClassNameArray()

ilTestInfoScreenToolbarGUI::getClassNameArray (   $target)
private

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

References $target, array, and getClassName().

Referenced by getClassPath().

307  {
308  if (is_array($target)) {
309  return $target;
310  }
311 
312  return array($this->getClassName($target));
313  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getClassPath()

ilTestInfoScreenToolbarGUI::getClassPath (   $target)
private

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

References $target, and getClassNameArray().

Referenced by buildFormAction(), and buildLinkTarget().

316  {
317  return array_merge(self::$TARGET_CLASS_PATH_BASE, $this->getClassNameArray($target));
318  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFailureMessages()

ilTestInfoScreenToolbarGUI::getFailureMessages ( )
Returns
array

Definition at line 230 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 102 of file class.ilTestInfoScreenToolbarGUI.php.

References $globalToolbar.

◆ getInfoMessages()

ilTestInfoScreenToolbarGUI::getInfoMessages ( )
Returns
array

Definition at line 214 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 198 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 464 of file class.ilTestInfoScreenToolbarGUI.php.

References ilObjAssessmentFolder\getSkillTriggerAnswerNumberBarrier().

Referenced by build().

465  {
466  require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
467 
468  return sprintf(
469  $this->lng->txt('tst_skill_triggerings_num_req_answers_not_reached_warn'),
471  );
472  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillLevelThresholdsMissingInfo()

ilTestInfoScreenToolbarGUI::getSkillLevelThresholdsMissingInfo ( )
private

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

References array, buildLinkTarget(), and ilTestSkillLevelThresholdsGUI\CMD_SHOW_SKILL_THRESHOLDS.

Referenced by build().

436  {
437  require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdsGUI.php';
438 
439  $link = $this->buildLinkTarget(
440  array('ilTestSkillAdministrationGUI', 'ilTestSkillLevelThresholdsGUI'),
442  );
443 
444  $msg = $this->lng->txt('tst_skl_level_thresholds_missing');
445  $msg .= '<br /><a href="' . $link . '">' . $this->lng->txt('tst_skl_level_thresholds_link') . '</a>';
446 
447  return $msg;
448  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestOBJ()

ilTestInfoScreenToolbarGUI::getTestOBJ ( )
Returns
ilObjTest

Definition at line 118 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 150 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 134 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 182 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 166 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 450 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by build().

451  {
452  if (!$this->testOBJ->isFixedTest()) {
453  return false;
454  }
455 
456  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
457  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
458  $assignmentList->setParentObjId($this->testOBJ->getId());
459  $assignmentList->loadFromDb();
460 
461  return $assignmentList->hasSkillsAssignedLowerThanBarrier();
462  }
+ Here is the caller graph for this function:

◆ isDeleteDynamicTestResultsButtonRequired()

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

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

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

Referenced by build().

353  {
354  if (!$this->getTestSession()->getActiveId()) {
355  return false;
356  }
357 
358  if (!$this->getTestOBJ()->isDynamicTest()) {
359  return false;
360  }
361 
362  if (!$this->getTestOBJ()->isPassDeletionAllowed()) {
363  return false;
364  }
365 
366  if (!$this->getTestSequence()->hasStarted($this->getTestSession())) {
367  return false;
368  }
369 
370  return true;
371  }
+ 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 377 of file class.ilTestInfoScreenToolbarGUI.php.

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

Referenced by build().

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

◆ sendMessages()

ilTestInfoScreenToolbarGUI::sendMessages ( )

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

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

659  {
660  ilUtil::sendInfo(array_pop($this->getInfoMessages()));
661  ilUtil::sendFailure(array_pop($this->getFailureMessages()));
662  }
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 261 of file class.ilTestInfoScreenToolbarGUI.php.

262  {
263  if ($this->globalToolbar instanceof parent) {
264  $this->globalToolbar->setCloseFormTag($enabled);
265  } else {
266  parent::setCloseFormTag($enabled);
267  }
268  }

◆ setFormAction()

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

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

References $target.

Referenced by build().

244  {
245  if ($this->globalToolbar instanceof parent) {
246  $this->globalToolbar->setFormAction($formAction, $isMultipart, $target);
247  } else {
248  parent::setFormAction($formAction, $isMultipart, $target);
249  }
250  }
+ Here is the caller graph for this function:

◆ setGlobalToolbar()

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

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

References $globalToolbar.

111  {
112  $this->globalToolbar = $globalToolbar;
113  }

◆ setParameter()

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

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

References $target, and getClassName().

Referenced by build(), and populateDeleteDynamicTestResultsButton().

321  {
322  $this->ctrl->setParameterByClass($this->getClassName($target), $parameter, $value);
323  }
+ 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 206 of file class.ilTestInfoScreenToolbarGUI.php.

References $sessionLockString.

Referenced by ensureInitialisedSessionLockString().

207  {
208  $this->sessionLockString = $sessionLockString;
209  }
+ Here is the caller graph for this function:

◆ setTestOBJ()

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

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

References $testOBJ.

127  {
128  $this->testOBJ = $testOBJ;
129  }

◆ setTestPlayerGUI()

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

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

References $testPlayerGUI.

159  {
160  $this->testPlayerGUI = $testPlayerGUI;
161  }

◆ setTestQuestionSetConfig()

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

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

References $testQuestionSetConfig.

143  {
144  $this->testQuestionSetConfig = $testQuestionSetConfig;
145  }

◆ setTestSequence()

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

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

References $testSequence.

191  {
192  $this->testSequence = $testSequence;
193  }

◆ setTestSession()

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

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

References $testSession.

175  {
176  $this->testSession = $testSession;
177  }

Field Documentation

◆ $access

ilTestInfoScreenToolbarGUI::$access
protected

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

Referenced by __construct().

◆ $ctrl

ilTestInfoScreenToolbarGUI::$ctrl
protected

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

Referenced by __construct().

◆ $db

ilTestInfoScreenToolbarGUI::$db
protected

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

Referenced by __construct().

◆ $failureMessages

ilTestInfoScreenToolbarGUI::$failureMessages = array()
private

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

Referenced by getFailureMessages().

◆ $globalToolbar

ilTestInfoScreenToolbarGUI::$globalToolbar
private

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

Referenced by getGlobalToolbar(), and setGlobalToolbar().

◆ $infoMessages

ilTestInfoScreenToolbarGUI::$infoMessages = array()
private

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

Referenced by getInfoMessages().

◆ $lng

ilTestInfoScreenToolbarGUI::$lng
protected

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

Referenced by __construct().

◆ $pluginAdmin

ilTestInfoScreenToolbarGUI::$pluginAdmin
protected

Definition at line 48 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 53 of file class.ilTestInfoScreenToolbarGUI.php.

Referenced by getTestOBJ(), and setTestOBJ().

◆ $testPlayerGUI

ilTestInfoScreenToolbarGUI::$testPlayerGUI
protected

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

Referenced by getTestPlayerGUI(), and setTestPlayerGUI().

◆ $testQuestionSetConfig

ilTestInfoScreenToolbarGUI::$testQuestionSetConfig
protected

◆ $testSequence

ilTestInfoScreenToolbarGUI::$testSequence
protected

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

Referenced by getTestSequence(), and setTestSequence().

◆ $testSession

ilTestInfoScreenToolbarGUI::$testSession
protected

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

Referenced by getTestSession(), and setTestSession().


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