35                $set = 
$ilDB->query(
"SELECT *".
 
   37                        " WHERE id = ".
$ilDB->quote($a_id, 
"integer"));
 
   38                if(
$ilDB->numRows($set))
 
   42                        $obj->importFromDB(
$row);
 
   53                $set = 
$ilDB->query(
"SELECT *".
 
   55                        " WHERE parent = ".
$ilDB->quote($a_parent_id, 
"integer").
 
   60                        $obj->importFromDB(
$row);
 
   61                        $res[$obj->getId()] = $obj;
 
   77                        "bool" => 
$lng->txt(
"exc_criteria_type_bool")
 
   78                        ,
"rating" => 
$lng->txt(
"exc_criteria_type_rating")
 
   79                        ,
"text" => 
$lng->txt(
"exc_criteria_type_text")
 
   80                        ,
"file" => 
$lng->txt(
"exc_criteria_type_file")                  
 
   92                $class = 
"ilExcCriteria".ucfirst(
$a_type);
 
   93                include_once 
"Modules/Exercise/classes/class.".$class.
".php";
 
  109                $this->
id = (int)$a_id;
 
  116                $this->parent = ($a_value !== 
null)
 
  128                $this->title = ($a_value !== 
null)
 
  140                $this->desc = ($a_value !== 
null)
 
  152                $this->required = (bool)$a_value;
 
  162                $this->pos = (int)$a_value;
 
  172                $this->def = $a_value;
 
  184                if ($a_def_json != 
"")
 
  186                        $def = json_decode($a_def_json, 
true);
 
  195                if ($a_def != 
"" && version_compare(PHP_VERSION, 
'7.0.0') >= 0)
 
  197                        $a_def = @unserialize($a_def, 
false);
 
  212                $this->
setId($a_row[
"id"]);
 
  219                                ? unserialize($a_row[
"def"]) 
 
  226                        "type" => array(
"text", $this->
getType())
 
  227                        ,
"title" => array(
"text", $this->
getTitle())
 
  229                        ,
"required" => array(
"integer", $this->
isRequired())
 
  245                $set = 
$ilDB->query(
"SELECT MAX(pos) pos".
 
  247                        " WHERE parent = ".
$ilDB->quote($this->getParent(), 
"integer"));
 
  249                return (
int)
$row[
"pos"];
 
  261                $this->
id = $ilDB->nextId(
"exc_crit");
 
  265                $fields[
"id"] = array(
"integer", $this->
id);
 
  266                $fields[
"type"] = array(
"text", $this->
getType());
 
  267                $fields[
"parent"] = array(
"integer", $this->
getParent());
 
  270                $ilDB->insert(
"exc_crit", $fields);
 
  279                        return $this->
save();
 
  282                $primary = array(
"id"=>array(
"integer", $this->
id));            
 
  286        public function delete()
 
  295                $ilDB->manipulate(
"DELETE FROM exc_crit".
 
  296                        " WHERE id = ".
$ilDB->quote($this->id, 
"integer"));
 
  303                if(!(
int)$a_parent_id)
 
  308                $ilDB->manipulate(
"DELETE FROM exc_crit".
 
  309                        " WHERE parent = ".
$ilDB->quote($a_parent_id, 
"integer"));      
 
  315                $new_obj->setParent($a_target_parent_id);
 
  316                $new_obj->setTitle($this->
getTitle());
 
  323                return $new_obj->getId();
 
  351                $this->form = $a_form;
 
  353                $this->giver_id = $a_giver_id;
 
  354                $this->peer_id = $a_peer_id;
 
An exception for terminatinating execution or to throw for unit testing.
importFromPeerReviewForm()
cloneObject($a_target_parent_id)
static getInstancesByParentId($a_parent_id)
importFromDB(array $a_row)
importDefinition($a_def, $a_def_json)
initCustomForm(ilPropertyFormGUI $a_form)
setPeerReviewContext(ilExAssignment $a_ass, $a_giver_id, $a_peer_id, ilPropertyFormGUI $a_form=null)
static getInstanceById($a_id)
exportCustomForm(ilPropertyFormGUI $a_form)
importCustomForm(ilPropertyFormGUI $a_form)
addToPeerReviewForm($a_value=null)
static getInstanceByType($a_type)
setDefinition(array $a_value=null)
static deleteByParent($a_parent_id)