ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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, $a_def_json)
 
 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)

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

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

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 selection list property in a property form.
This class represents a checkbox property in a property form.
if(!is_array($argv)) $options
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ getHTML()

ilExcCriteriaBool::getHTML (   $a_value)

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

References $lng, and ilExcCriteria\isRequired().

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  }
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ getType()

ilExcCriteriaBool::getType ( )

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

16  {
17  return "bool";
18  }

◆ hasValue()

ilExcCriteriaBool::hasValue (   $a_value)

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

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

◆ importFromPeerReviewForm()

ilExcCriteriaBool::importFromPeerReviewForm ( )

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

References ilExcCriteria\getId().

53  {
54  return (int)$this->form->getInput("prccc_bool_".$this->getId());
55  }
+ Here is the call graph for this function:

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