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

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $lng, $parentGUI)
 
 build ($activeId, $pass, $context)
 
- Public Member Functions inherited from ilConfirmationGUI
 __construct ()
 Constructor. More...
 
 setFormAction ($a_form_action)
 
 getFormAction ()
 
 setHeaderText ($a_headertext)
 Set Set header text. More...
 
 getHeaderText ()
 Get Set header text. More...
 
 addButton ($a_txt, $a_cmd)
 Set cancel button command and text. More...
 
 setCancel ($a_txt, $a_cmd, $a_id="")
 Set cancel button command and text. More...
 
 setConfirm ($a_txt, $a_cmd, $a_id="")
 Set confirmation button command and text. More...
 
 addItem ( $a_post_var, $a_id, $a_text, $a_img="", $a_alt="")
 Add row item. More...
 
 addHiddenItem ($a_post_var, $a_value)
 Add hidden item. More...
 
 getHTML ()
 Get confirmation screen HTML. More...
 
 setFormName ($a_name)
 Set form name. More...
 

Data Fields

const CONTEXT_PASS_OVERVIEW = 'contPassOverview'
 
const CONTEXT_INFO_SCREEN = 'contInfoScreen'
 
const CONTEXT_DYN_TEST_PLAYER = 'contDynTestPlayer'
 

Protected Attributes

 $ctrl
 
 $lng
 
- Protected Attributes inherited from ilConfirmationGUI
 $lng
 

Detailed Description

Definition at line 12 of file class.ilTestPassDeletionConfirmationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestPassDeletionConfirmationGUI::__construct ( ilCtrl  $ctrl,
ilLanguage  $lng,
  $parentGUI 
)

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

References $ctrl, $lng, and ilConfirmationGUI\setFormAction().

29  {
30  $this->ctrl = $ctrl;
31  $this->lng = $lng;
32 
33  $this->setFormAction($this->ctrl->getFormAction($parentGUI));
34  }
setFormAction($a_form_action)
+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ilTestPassDeletionConfirmationGUI::build (   $activeId,
  $pass,
  $context 
)

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

References $context, $pass, ilConfirmationGUI\addHiddenItem(), ilConfirmationGUI\setCancel(), ilConfirmationGUI\setConfirm(), and ilConfirmationGUI\setHeaderText().

37  {
38  $this->addHiddenItem('active_id', $activeId);
39  $this->addHiddenItem('pass', $pass);
40 
41  switch ($context) {
42  case self::CONTEXT_PASS_OVERVIEW:
43  case self::CONTEXT_INFO_SCREEN:
44  case self::CONTEXT_DYN_TEST_PLAYER:
45 
46  $this->addHiddenItem('context', $context);
47  break;
48 
49  default: throw new ilTestException('invalid context given!');
50  }
51 
52  $this->setCancel($this->lng->txt('cancel'), 'cancelDeletePass');
53  $this->setConfirm($this->lng->txt('delete'), 'performDeletePass');
54 
55  if ($context == self::CONTEXT_DYN_TEST_PLAYER) {
56  $this->setHeaderText($this->lng->txt('conf_delete_pass_ctm'));
57  } else {
58  $this->setHeaderText($this->lng->txt('conf_delete_pass'));
59  }
60  }
addHiddenItem($a_post_var, $a_value)
Add hidden item.
$context
Definition: webdav.php:25
setConfirm($a_txt, $a_cmd, $a_id="")
Set confirmation button command and text.
Base Exception for all Exceptions relating to Modules/Test.
setCancel($a_txt, $a_cmd, $a_id="")
Set cancel button command and text.
setHeaderText($a_headertext)
Set Set header text.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilTestPassDeletionConfirmationGUI::$ctrl
protected

Definition at line 21 of file class.ilTestPassDeletionConfirmationGUI.php.

Referenced by __construct().

◆ $lng

ilTestPassDeletionConfirmationGUI::$lng
protected

Definition at line 26 of file class.ilTestPassDeletionConfirmationGUI.php.

Referenced by __construct().

◆ CONTEXT_DYN_TEST_PLAYER

const ilTestPassDeletionConfirmationGUI::CONTEXT_DYN_TEST_PLAYER = 'contDynTestPlayer'

◆ CONTEXT_INFO_SCREEN

const ilTestPassDeletionConfirmationGUI::CONTEXT_INFO_SCREEN = 'contInfoScreen'

◆ CONTEXT_PASS_OVERVIEW

const ilTestPassDeletionConfirmationGUI::CONTEXT_PASS_OVERVIEW = 'contPassOverview'

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