ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestPassDeletionConfirmationGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
5
13{
14 const CONTEXT_PASS_OVERVIEW = 'contPassOverview';
15 const CONTEXT_INFO_SCREEN = 'contInfoScreen';
16 const CONTEXT_DYN_TEST_PLAYER = 'contDynTestPlayer';
17
21 protected $ctrl;
22
26 protected $lng;
27
28 public function __construct(ilCtrl $ctrl, ilLanguage $lng, $parentGUI)
29 {
30 $this->ctrl = $ctrl;
31 $this->lng = $lng;
32
33 $this->setFormAction($this->ctrl->getFormAction($parentGUI));
34 }
35
36 public function build($activeId, $pass, $context)
37 {
38 $this->addHiddenItem('active_id', $activeId);
39 $this->addHiddenItem('pass', $pass);
40
41 switch($context)
42 {
46
47 $this->addHiddenItem('context', $context);
48 break;
49
50 default: throw new ilTestException('invalid context given!');
51 }
52
53 $this->setCancel($this->lng->txt('cancel'), 'cancelDeletePass');
54 $this->setConfirm($this->lng->txt('delete'), 'performDeletePass');
55
56 if( $context == self::CONTEXT_DYN_TEST_PLAYER )
57 {
58 $this->setHeaderText($this->lng->txt('conf_delete_pass_ctm'));
59 }
60 else
61 {
62 $this->setHeaderText($this->lng->txt('conf_delete_pass'));
63 }
64 }
65}
Confirmation screen class.
setFormAction($a_form_action)
setCancel($a_txt, $a_cmd)
Set cancel button command and text.
setHeaderText($a_headertext)
Set Set header text.
addHiddenItem($a_post_var, $a_value)
Add hidden item.
setConfirm($a_txt, $a_cmd)
Set confirmation button command and text.
This class provides processing control methods.
language handling
Base Exception for all Exceptions relating to Modules/Test.
__construct(ilCtrl $ctrl, ilLanguage $lng, $parentGUI)