예제 #1
0
 /**
  * Constructor
  * @access   public
  * @param    string            $objectID       The ID of an existing group
  * @param    EvaluationObject  $parentObject   The parent object if exists
  * @param    string            $loadChildren   See const EVAL_LOAD_*_CHILDREN
  */
 function EvaluationGroup($objectID = "", $parentObject = null, $loadChildren = EVAL_LOAD_NO_CHILDREN)
 {
     /* Set default values ------------------------------------------------- */
     parent::EvaluationObject($objectID, $parentObject, $loadChildren);
     $this->setAuthorEmail("*****@*****.**");
     $this->setAuthorName("Alexander Willner");
     $this->instanceof = INSTANCEOF_EVALGROUP;
     $this->childType = NULL;
     $this->mandatory = NO;
     /* --------------------------------------------------------------------- */
     /* Connect to database ------------------------------------------------- */
     $this->db = new EvaluationGroupDB();
     if ($this->db->isError()) {
         return $this->throwErrorFromClass($this->db);
     }
     $this->init($objectID);
     /* --------------------------------------------------------------------- */
 }
예제 #2
0
 /**
  * Constructor
  * @access   public
  * @param    string   $objectID       The ID of an existing evaluation
  * @param    object   $parentObject   The parent object if exists
  * @param    integer  $loadChildren   See const EVAL_LOAD_*_CHILDREN
  */
 function Evaluation($objectID = "", $parentObject = null, $loadChildren = EVAL_LOAD_NO_CHILDREN)
 {
     /* Set default values ------------------------------------------------- */
     parent::EvaluationObject($objectID, $parentObject, $loadChildren);
     $this->setAuthorEmail("*****@*****.**");
     $this->setAuthorName("Alexander Willner");
     $this->instanceof = INSTANCEOF_EVAL;
     $this->rangeID = array();
     $this->startdate = NULL;
     $this->stopdate = NULL;
     $this->timespan = NULL;
     $this->mkdate = time();
     $this->chdate = time();
     $this->anonymous = NO;
     $this->visible = NO;
     $this->shared = NO;
     $this->isUsed = NO;
     $this->rangeNum = 0;
     /* -------------------------------------------------------------------- */
     /* Connect to database ------------------------------------------------ */
     $this->db = new EvaluationDB();
     if ($this->db->isError()) {
         return $this->throwErrorFromClass($this->db);
     }
     $this->init($objectID);
     /* -------------------------------------------------------------------- */
 }
예제 #3
0
 /**
  * Constructor
  * @access   public
  * @param    string   $objectID       The ID of an existing question
  * @param    object   $parentObject   The parent object if exists
  * @param    integer  $loadChildren   See const EVAL_LOAD_*_CHILDREN
  */
 function EvaluationQuestion($objectID = "", $parentObject = NULL, $loadChildren = EVAL_LOAD_NO_CHILDREN)
 {
     /* Set default values ------------------------------------------------- */
     parent::EvaluationObject($objectID, $parentObject, $loadChildren);
     $this->instanceof = INSTANCEOF_EVALQUESTION;
     $this->type = EVALQUESTION_TYPE_MC;
     $this->isMultiplechoice = NO;
     $this->templateID = YES;
     /* ------------------------------------------------------------------- */
     /* Connect to database ------------------------------------------------- */
     $this->db = new EvaluationQuestionDB();
     if ($this->db->isError()) {
         return $this->throwErrorFromClass($this->db);
     }
     $this->init($objectID);
     /* --------------------------------------------------------------------- */
 }
예제 #4
0
 /**
  * Constructor
  * @access   public
  * @param    string   $objectID       The ID of an existing answer
  * @param    object   $parentObject   The parent object if exists
  * @param    integer  $loadChildren   See const EVAL_LOAD_*_CHILDREN
  */
 function EvaluationAnswer($objectID = "", $parentObject = NULL, $loadChildren = EVAL_LOAD_NO_CHILDREN)
 {
     /* Set default values ------------------------------------------------- */
     parent::EvaluationObject($objectID, $parentObject, $loadChildren);
     $this->instanceof = INSTANCEOF_EVALANSWER;
     $this->value = 0;
     $this->rows = 0;
     $this->users = array();
     $this->userNum = 0;
     $this->userNumIterator = 0;
     $this->residual = NO;
     /* --------------------------------------------------------------------- */
     /* Connect to database ------------------------------------------------- */
     $this->db = new EvaluationAnswerDB();
     if ($this->db->isError()) {
         return $this->throwErrorFromClass($this->db);
     }
     $this->init($objectID);
     /* --------------------------------------------------------------------- */
 }