ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilExcCriteriaBool Class Reference

Class ilExcCriteriaBool. More...

+ Inheritance diagram for ilExcCriteriaBool:
+ Collaboration diagram for ilExcCriteriaBool:

Public Member Functions

 getType ()
 
 addToPeerReviewForm ($a_value=null)
 
 importFromPeerReviewForm ()
 
 hasValue ($a_value)
 
 getHTML ($a_value)
 
- Public Member Functions inherited from ilExcCriteria
 getTranslatedType ()
 
 getId ()
 
 getType ()
 
 setParent ($a_value)
 
 getParent ()
 
 setTitle ($a_value)
 
 getTitle ()
 
 setDescription ($a_value)
 
 getDescription ()
 
 setRequired ($a_value)
 
 isRequired ()
 
 setPosition ($a_value)
 
 getPosition ()
 
 importDefinition ($a_def)
 
 save ()
 
 update ()
 
 delete ()
 
 cloneObject ($a_target_parent_id)
 
 initCustomForm (ilPropertyFormGUI $a_form)
 
 exportCustomForm (ilPropertyFormGUI $a_form)
 
 importCustomForm (ilPropertyFormGUI $a_form)
 
 setPeerReviewContext (ilExAssignment $a_ass, $a_giver_id, $a_peer_id, ilPropertyFormGUI $a_form=null)
 
 addToPeerReviewForm ($a_value=null)
 
 importFromPeerReviewForm ()
 
 updateFromAjax ()
 
 validate ($a_value)
 
 hasValue ($a_value)
 
 getHTML ($a_value)
 
 resetReview ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilExcCriteria
static getInstanceById ($a_id)
 
static getInstancesByParentId ($a_parent_id)
 
static getTypesMap ()
 
static getInstanceByType ($a_type)
 
static deleteByParent ($a_parent_id)
 
- Protected Member Functions inherited from ilExcCriteria
 __construct ()
 
 setId ($a_id)
 
 setDefinition (array $a_value=null)
 
 getDefinition ()
 
 importFromDB (array $a_row)
 
 getDBProperties ()
 
 getLastPosition ()
 
- Protected Attributes inherited from ilExcCriteria
 $id
 
 $parent
 
 $title
 
 $desc
 
 $required
 
 $pos
 
 $def
 
 $form
 
 $ass
 
 $giver_id
 
 $peer_id
 

Detailed Description

Member Function Documentation

◆ addToPeerReviewForm()

ilExcCriteriaBool::addToPeerReviewForm (   $a_value = null)

Reimplemented from ilExcCriteria.

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

24 {
25 global $lng;
26
27 if(!$this->isRequired())
28 {
29 $input = new ilCheckboxInputGUI($this->getTitle(), "prccc_bool_".$this->getId());
30 $input->setInfo($this->getDescription());
31 $input->setRequired($this->isRequired());
32 $input->setChecked($a_value > 0);
33 }
34 else
35 {
36 $input = new ilSelectInputGUI($this->getTitle(), "prccc_bool_".$this->getId());
37 $input->setInfo($this->getDescription());
38 $input->setRequired($this->isRequired());
39 $input->setValue($a_value);
40 $options = array();
41 if(!$a_value)
42 {
43 $options[""] = $lng->txt("please_select");
44 }
45 $options[1] = $lng->txt("yes");
46 $options[-1] = $lng->txt("no");
47 $input->setOptions($options);
48 }
49 $this->form->addItem($input);
50 }
This class represents a checkbox property in a property form.
This class represents a selection list property in a property form.
global $lng
Definition: privfeed.php:40
if(!is_array($argv)) $options

References $lng, $options, ilExcCriteria\getDescription(), ilExcCriteria\getId(), ilExcCriteria\getTitle(), and ilExcCriteria\isRequired().

+ Here is the call graph for this function:

◆ getHTML()

ilExcCriteriaBool::getHTML (   $a_value)

Reimplemented from ilExcCriteria.

Definition at line 62 of file class.ilExcCriteriaBool.php.

63 {
64 global $lng;
65
66 $caption = null;
67 if($this->isRequired() && $a_value < 0)
68 {
69 $caption = $lng->txt("no");
70 }
71 else if($a_value == 1)
72 {
73 $caption = $lng->txt("yes");
74 }
75 return $caption;
76 }

References $lng, and ilExcCriteria\isRequired().

+ Here is the call graph for this function:

◆ getType()

ilExcCriteriaBool::getType ( )

Reimplemented from ilExcCriteria.

Definition at line 15 of file class.ilExcCriteriaBool.php.

16 {
17 return "bool";
18 }

◆ hasValue()

ilExcCriteriaBool::hasValue (   $a_value)

Reimplemented from ilExcCriteria.

Definition at line 57 of file class.ilExcCriteriaBool.php.

58 {
59 return (int)$a_value;
60 }

◆ importFromPeerReviewForm()

ilExcCriteriaBool::importFromPeerReviewForm ( )

Reimplemented from ilExcCriteria.

Definition at line 52 of file class.ilExcCriteriaBool.php.

53 {
54 return (int)$this->form->getInput("prccc_bool_".$this->getId());
55 }

References ilExcCriteria\getId().

+ Here is the call graph for this function:

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