ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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='')
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 addButtonInstance (ilButtonBase $btnInstance)
 Add button instance. More...
 
 setCloseFormTag ($enabled)
 Set close form tag. More...
 
 addInputItem (ilToolbarItem $inputItem, $outputLabel=false)
 Add input item. More...
 
 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 (ilToolbarItem $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...
 
 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
 $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  $a_button)

Add button instance.

Parameters
ilButtonBase$a_button

Reimplemented from ilToolbarGUI.

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

256 {
257 if($this->globalToolbar instanceof parent)
258 {
259 $this->globalToolbar->addButtonInstance($btnInstance);
260 }
261 else
262 {
263 parent::addButtonInstance($btnInstance);
264 }
265 }

Referenced by build(), and populateDeleteDynamicTestResultsButton().

+ Here is the caller graph for this function:

◆ addFailureMessage()

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

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

239 {
240 $this->failureMessages[] = $failureMessage;
241 }

Referenced by build().

+ Here is the caller graph for this function:

◆ addFormInput()

ilTestInfoScreenToolbarGUI::addFormInput (   $formInput)

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

292 {
293 if($this->globalToolbar instanceof parent)
294 {
295 $this->globalToolbar->addFormInput($formInput);
296 }
297 else
298 {
299 parent::addFormInput($formInput);
300 }
301 }

◆ addInfoMessage()

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

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

223 {
224 $this->infoMessages[] = $infoMessage;
225 }

Referenced by build().

+ Here is the caller graph for this function:

◆ addInputItem()

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

Add input item.

Parameters
ilToolbarItem$a_item
bool$a_output_label

Reimplemented from ilToolbarGUI.

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

280 {
281 if($this->globalToolbar instanceof parent)
282 {
283 $this->globalToolbar->addInputItem($inputItem, $outputLabel);
284 }
285 else
286 {
287 parent::addInputItem($inputItem, $outputLabel);
288 }
289 }

Referenced by build().

+ Here is the caller graph for this function:

◆ areSkillLevelThresholdsMissing()

ilTestInfoScreenToolbarGUI::areSkillLevelThresholdsMissing ( )
private

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

422 {
423 if( !$this->getTestOBJ()->isSkillServiceEnabled() )
424 {
425 return false;
426 }
427
428 if( $this->getTestOBJ()->isDynamicTest() )
429 {
430 $questionSetConfig = $this->getTestQuestionSetConfig();
431 $questionContainerId = $questionSetConfig->getSourceQuestionPoolId();
432 }
433 else
434 {
435 $questionContainerId = $this->getTestOBJ()->getId();
436 }
437
438 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
439 require_once 'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
440
441 $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
442 $assignmentList->setParentObjId($questionContainerId);
443 $assignmentList->loadFromDb();
444
445 foreach($assignmentList->getUniqueAssignedSkills() as $data)
446 {
447 foreach($data['skill']->getLevelData() as $level)
448 {
449 $treshold = new ilTestSkillLevelThreshold($this->db);
450 $treshold->setTestId($this->getTestOBJ()->getTestId());
451 $treshold->setSkillBaseId($data['skill_base_id']);
452 $treshold->setSkillTrefId($data['skill_tref_id']);
453 $treshold->setSkillLevelId($level['id']);
454
455 if( !$treshold->dbRecordExists() )
456 {
457 return true;
458 }
459 }
460 }
461
462 return false;
463 }

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

Referenced by build().

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

◆ build()

ilTestInfoScreenToolbarGUI::build ( )

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

505 {
507
508 $this->setParameter($this->getTestPlayerGUI(), 'lock', $this->getSessionLockString());
509 $this->setParameter($this->getTestPlayerGUI(), 'sequence', $this->getTestSession()->getLastSequence());
510 $this->setParameter('ilObjTestGUI', 'ref_id', $this->getTestOBJ()->getRefId());
511
512 $this->setFormAction($this->buildFormAction($this->testPlayerGUI));
513
514 $online_access = false;
515 if ($this->getTestOBJ()->getFixedParticipants())
516 {
517 include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
518 $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->getTestOBJ()->getId(), $this->getTestSession()->getUserId());
519 if ($online_access_result === true)
520 {
521 $online_access = true;
522 }
523 else
524 {
525 $this->addInfoMessage($online_access_result);
526 }
527 }
528
529 if( $this->getTestOBJ()->isOnline() && $this->getTestOBJ()->isComplete( $this->getTestQuestionSetConfig() ) )
530 {
531 if ((!$this->getTestOBJ()->getFixedParticipants() || $online_access) && $this->access->checkAccess("read", "", $this->getTestOBJ()->getRefId()))
532 {
533 $executable = $this->getTestOBJ()->isExecutable(
534 $this->getTestSession(), $this->getTestSession()->getUserId(), $allowPassIncrease = TRUE
535 );
536
537 if ($executable["executable"])
538 {
539 if( $this->getTestOBJ()->areObligationsEnabled() && $this->getTestOBJ()->hasObligations($this->getTestOBJ()->getTestId()) )
540 {
541 $this->addInfoMessage($this->lng->txt('tst_test_contains_obligatory_questions'));
542 }
543
544 if ($this->getTestSession()->getActiveId() > 0)
545 {
546 // resume test
547 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
548 $testPassesSelector = new ilTestPassesSelector($this->db, $this->getTestOBJ());
549 $testPassesSelector->setActiveId($this->getTestSession()->getActiveId());
550 $testPassesSelector->setLastFinishedPass($this->getTestSession()->getLastFinishedPass());
551
552 $closedPasses = $testPassesSelector->getClosedPasses();
553 $existingPasses = $testPassesSelector->getExistingPasses();
554
555 if ($existingPasses > $closedPasses)
556 {
558 $btn->setCaption('tst_resume_test');
559 $btn->setCommand('resumePlayer');
560 $btn->setPrimary(true);
561 $this->addButtonInstance($btn);
562 }
563 else
564 {
566 $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
567 $btn->setCommand('startPlayer');
568 $btn->setPrimary(true);
569 $this->addButtonInstance($btn);
570 }
571 }
572 else
573 {
574 // start new test
576 $btn->setCaption($this->getTestOBJ()->getStartTestLabel($this->getTestSession()->getActiveId()), false);
577 $btn->setCommand('startPlayer');
578 $btn->setPrimary(true);
579 $this->addButtonInstance($btn);
580 }
581 }
582 else
583 {
584 $this->addInfoMessage($executable['errormessage']);
585 }
586 if ($this->getTestSession()->getActiveId() > 0)
587 {
588 // test results button
589
590 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
591 $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->getTestOBJ());
592 $testPassesSelector->setActiveId($this->getTestSession()->getActiveId());
593 $testPassesSelector->setLastFinishedPass($this->getTestSession()->getLastFinishedPass());
594
595 if( $this->getTestOBJ()->canShowTestResults($this->getTestSession()) )
596 {
598 $btn->setCaption('tst_show_results');
599 $btn->setUrl($this->buildLinkTarget('ilTestEvaluationGUI', 'outUserResultsOverview'));
600 $btn->setPrimary(false);
601 $this->addButtonInstance($btn);
602
603 if ($this->getTestOBJ()->getHighscoreEnabled())
604 {
605 // Can also compare results then
607 $btn->setCaption('tst_show_toplist');
608 $btn->setUrl($this->buildLinkTarget('ilTestToplistGUI', 'outResultsToplist'));
609 $btn->setPrimary(false);
610 $this->addButtonInstance($btn);
611 }
612
613 if( $this->getTestOBJ()->isSkillServiceToBeConsidered() )
614 {
615 require_once 'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
616
618 $btn->setCaption('tst_show_comp_results');
619 $btn->setUrl($this->buildLinkTarget('ilTestSkillEvaluationGUI', ilTestSkillEvaluationGUI::CMD_SHOW));
620 $btn->setPrimary(false);
621 $this->addButtonInstance($btn);
622 }
623 }
624
625 }
626 }
627 if ($this->getTestSession()->getActiveId() > 0)
628 {
629 if ($this->getTestOBJ()->canShowSolutionPrintview($this->getTestSession()->getUserId()))
630 {
632 $btn->setCaption('tst_list_of_answers_show');
633 $btn->setUrl($this->buildLinkTarget('ilTestEvaluationGUI', 'outUserListOfAnswerPasses'));
634 $btn->setPrimary(false);
635 $this->addButtonInstance($btn);
636 }
637 }
638
640 {
642 }
643
644 if($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
645 {
646 if( $this->getItems() )
647 {
648 $this->addSeparator();
649 }
650
651 require_once 'Services/Form/classes/class.ilTextInputGUI.php';
652 $anonymous_id = new ilTextInputGUI($this->lng->txt('enter_anonymous_code'), 'anonymous_id');
653 $anonymous_id->setSize(8);
654 $this->addInputItem($anonymous_id, true);
655 $this->addFormButton($this->lng->txt('submit'), 'setAnonymousId');
656 }
657 }
658 if( !$this->getTestOBJ()->isOnline() && !$this->getTestQuestionSetConfig()->areDepenciesBroken() )
659 {
660 $message = $this->lng->txt("test_is_offline");
661
662 if($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId()))
663 {
664 $message .= "<br /><a href=\"".$this->buildLinkTarget('ilobjtestsettingsgeneralgui')."\">".
665 $this->lng->txt("test_edit_settings")."</a>";
666 }
667
668 $this->addInfoMessage($message);
669 }
670
671 if($this->access->checkAccess("write", "", $this->getTestOBJ()->getRefId()))
672 {
673 require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportFails.php';
674 $qsaImportFails = new ilAssQuestionSkillAssignmentImportFails($this->testOBJ->getId());
675 require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdImportFails.php';
676 $sltImportFails = new ilTestSkillLevelThresholdImportFails($this->testOBJ->getId());
677
678 if( $qsaImportFails->failedImportsRegistered() || $sltImportFails->failedImportsRegistered() )
679 {
680 $importFailsMsg = array();
681
682 if( $qsaImportFails->failedImportsRegistered() )
683 {
684 $importFailsMsg[] = $qsaImportFails->getFailedImportsMessage($this->lng);
685 }
686
687 if( $sltImportFails->failedImportsRegistered() )
688 {
689 $importFailsMsg[] = $sltImportFails->getFailedImportsMessage($this->lng);
690 }
691
692 $button = ilLinkButton::getInstance();
693 $button->setUrl($this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'removeImportFails'));
694 $button->setCaption('ass_skl_import_fails_remove_btn');
695 $importFailsMsg[] = $button->render();
696
697 $this->addFailureMessage(implode('<br />', $importFailsMsg));
698 }
699 elseif( $this->getTestOBJ()->isSkillServiceToBeConsidered() )
700 {
701 if( $this->areSkillLevelThresholdsMissing() )
702 {
704 }
705
707 {
709 }
710 }
711
712 if( $this->getTestQuestionSetConfig()->areDepenciesBroken() )
713 {
714 $this->addFailureMessage($this->getTestQuestionSetConfig()->getDepenciesBrokenMessage($this->lng));
715
716 $this->clearItems();
717 }
718 elseif( $this->getTestQuestionSetConfig()->areDepenciesInVulnerableState() )
719 {
720 $this->addInfoMessage( $this->getTestQuestionSetConfig()->getDepenciesInVulnerableStateMessage($this->lng) );
721 }
722 }
723 }
$_SESSION["AccountId"]
static getInstance()
Factory.
static _lookupOnlineTestAccess($a_test_id, $a_user_id)
Checks if a user is allowd to run an online exam.
static getInstance()
Factory.
addInputItem(ilToolbarItem $inputItem, $outputLabel=false)
Add input item.
addButtonInstance(ilButtonBase $btnInstance)
Add button instance.
setFormAction($formAction, $isMultipart=false, $target='')
Set form action (if form action is set, toolbar is wrapped into form tags)
setParameter($target, $parameter, $value)
This class represents a text property in a property form.
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
addSeparator()
Add separator.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

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

+ Here is the call graph for this function:

◆ buildFormAction()

ilTestInfoScreenToolbarGUI::buildFormAction (   $target)
private

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

351 {
352 return $this->ctrl->getFormActionByClass($this->getClassPath($target));
353 }

References $target, and getClassPath().

Referenced by build().

+ 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 345 of file class.ilTestInfoScreenToolbarGUI.php.

346 {
347 return $this->ctrl->getLinkTargetByClass($this->getClassPath($target), $cmd);
348 }
$cmd
Definition: sahs_server.php:35

References $cmd, $target, and getClassPath().

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

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

◆ buildSessionLockString()

ilTestInfoScreenToolbarGUI::buildSessionLockString ( )
private

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

364 {
365 return md5($_COOKIE['PHPSESSID'] . time());
366 }
$_COOKIE['ilClientId']
Definition: BPMN2Parser.php:15

References $_COOKIE.

Referenced by ensureInitialisedSessionLockString().

+ Here is the caller graph for this function:

◆ clearItems()

ilTestInfoScreenToolbarGUI::clearItems ( )

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

304 {
305 if($this->globalToolbar instanceof parent)
306 {
307 $this->globalToolbar->setItems(array());
308 }
309 else
310 {
311 $this->setItems(array());
312 }
313 }

References ilToolbarGUI\setItems().

Referenced by build().

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

◆ ensureInitialisedSessionLockString()

ilTestInfoScreenToolbarGUI::ensureInitialisedSessionLockString ( )
private

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

356 {
357 if( !strlen($this->getSessionLockString()) )
358 {
360 }
361 }

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 315 of file class.ilTestInfoScreenToolbarGUI.php.

316 {
317 if( is_object($target) )
318 {
319 $target = get_class($target);
320 }
321
322 return $target;
323 }

References $target.

Referenced by getClassNameArray(), and setParameter().

+ Here is the caller graph for this function:

◆ getClassNameArray()

ilTestInfoScreenToolbarGUI::getClassNameArray (   $target)
private

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

326 {
327 if( is_array($target) )
328 {
329 return $target;
330 }
331
332 return array($this->getClassName($target));
333 }

References $target, and getClassName().

Referenced by getClassPath().

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

◆ getClassPath()

ilTestInfoScreenToolbarGUI::getClassPath (   $target)
private

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

336 {
337 return array_merge(self::$TARGET_CLASS_PATH_BASE, $this->getClassNameArray($target));
338 }

References $target, and getClassNameArray().

Referenced by buildFormAction(), and buildLinkTarget().

+ 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 495 of file class.ilTestInfoScreenToolbarGUI.php.

496 {
497 require_once 'Modules/Test/classes/class.ilObjAssessmentFolder.php';
498
499 return sprintf( $this->lng->txt('tst_skill_triggerings_num_req_answers_not_reached_warn'),
501 );
502 }
sprintf('%.4f', $callTime)

References ilObjAssessmentFolder\getSkillTriggerAnswerNumberBarrier(), and sprintf.

Referenced by build().

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

◆ getSkillLevelThresholdsMissingInfo()

ilTestInfoScreenToolbarGUI::getSkillLevelThresholdsMissingInfo ( )
private

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

466 {
467 require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdsGUI.php';
468
469 $link = $this->buildLinkTarget(
470 array('ilTestSkillAdministrationGUI', 'ilTestSkillLevelThresholdsGUI'),
472 );
473
474 $msg = $this->lng->txt('tst_skl_level_thresholds_missing');
475 $msg .= '<br /><a href="'.$link.'">'.$this->lng->txt('tst_skl_level_thresholds_link').'</a>';
476
477 return $msg;
478 }

References buildLinkTarget(), and ilTestSkillLevelThresholdsGUI\CMD_SHOW_SKILL_THRESHOLDS.

Referenced by build().

+ 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 480 of file class.ilTestInfoScreenToolbarGUI.php.

481 {
482 if( !$this->testOBJ->isFixedTest() )
483 {
484 return false;
485 }
486
487 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
488 $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
489 $assignmentList->setParentObjId($this->testOBJ->getId());
490 $assignmentList->loadFromDb();
491
492 return $assignmentList->hasSkillsAssignedLowerThanBarrier();
493 }

Referenced by build().

+ Here is the caller graph for this function:

◆ isDeleteDynamicTestResultsButtonRequired()

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

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

374 {
375 if( !$this->getTestSession()->getActiveId() )
376 {
377 return false;
378 }
379
380 if( !$this->getTestOBJ()->isDynamicTest() )
381 {
382 return false;
383 }
384
385 if( !$this->getTestOBJ()->isPassDeletionAllowed() )
386 {
387 return false;
388 }
389
390 if( !$this->getTestSequence()->hasStarted($this->getTestSession()) )
391 {
392 return false;
393 }
394
395 return true;
396 }

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

Referenced by build().

+ 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 402 of file class.ilTestInfoScreenToolbarGUI.php.

403 {
404 require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php';
405
406 $this->ctrl->setParameterByClass(
407 'iltestevaluationgui', 'context', ilTestPassDeletionConfirmationGUI::CONTEXT_INFO_SCREEN
408 );
409
410 $this->setParameter('iltestevaluationgui', 'active_id', $this->getTestSession()->getActiveId());
411 $this->setParameter('iltestevaluationgui', 'pass', $this->getTestSession()->getPass());
412
414 $btn->setCaption('tst_delete_dyn_test_results_btn');
415 $btn->setUrl($this->buildLinkTarget('iltestevaluationgui', 'confirmDeletePass'));
416 $btn->setPrimary(false);
417
418 $this->addButtonInstance($btn);
419 }

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

Referenced by build().

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

◆ sendMessages()

ilTestInfoScreenToolbarGUI::sendMessages ( )

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

726 {
727 ilUtil::sendInfo( array_pop($this->getInfoMessages()) );
728 ilUtil::sendFailure( array_pop($this->getFailureMessages()) );
729 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

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

+ Here is the call graph for this function:

◆ setCloseFormTag()

ilTestInfoScreenToolbarGUI::setCloseFormTag (   $a_val)

Set close form tag.

Parameters
boolean$a_valclose form tag

Reimplemented from ilToolbarGUI.

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

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

◆ setFormAction()

ilTestInfoScreenToolbarGUI::setFormAction (   $a_val,
  $a_multipart = false,
  $a_target = '' 
)

Set form action (if form action is set, toolbar is wrapped into form tags)

Parameters
string$a_valform action
bool$a_multipart
string$a_target

Reimplemented from ilToolbarGUI.

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

244 {
245 if($this->globalToolbar instanceof parent)
246 {
247 $this->globalToolbar->setFormAction($formAction, $isMultipart, $target);
248 }
249 else
250 {
251 parent::setFormAction($formAction, $isMultipart, $target);
252 }
253 }

References $target.

Referenced by build().

+ Here is the caller graph for this function:

◆ setGlobalToolbar()

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

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

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

References $globalToolbar.

◆ setParameter()

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

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

341 {
342 $this->ctrl->setParameterByClass($this->getClassName($target), $parameter, $value);
343 }

References $target, and getClassName().

Referenced by build(), and populateDeleteDynamicTestResultsButton().

+ 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.

207 {
208 $this->sessionLockString = $sessionLockString;
209 }

References $sessionLockString.

Referenced by ensureInitialisedSessionLockString().

+ Here is the caller graph for this function:

◆ setTestOBJ()

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

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

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

References $testOBJ.

◆ setTestPlayerGUI()

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

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

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

References $testPlayerGUI.

◆ setTestQuestionSetConfig()

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

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

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

References $testQuestionSetConfig.

◆ setTestSequence()

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

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

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

References $testSequence.

◆ setTestSession()

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

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

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

References $testSession.

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: