Example #1
0
 public function read()
 {
     global $ilDB;
     parent::read();
     /** @var ilDB $ilDB */
     $sql = 'SELECT * FROM ' . self::TABLE_NAME . ' WHERE orgu_id = ' . $ilDB->quote($this->getId(), 'integer');
     $set = $ilDB->query($sql);
     if ($ilDB->numRows($set)) {
         $rec = $ilDB->fetchObject($set);
         $this->setOrgUnitTypeId($rec->orgu_type_id);
     }
 }
    /**
     * 
     * @access private
     */
    function read()
    {
        global $ilDB, $ilErr;
        parent::read();
        // TODO: fetching default role should be done in rbacadmin
        $r = $ilDB->queryf('
			SELECT * FROM ilinc_data
			WHERE obj_id = %s', array('integer'), array($this->id));
        if ($ilDB->numRows($r) > 0) {
            $data = $ilDB->fetchObject($r);
            $this->ilinc_id = $data->course_id;
            $this->activated = ilUtil::yn2tf($data->activation_offline);
            $this->akclassvalue1 = $data->akclassvalue1;
            $this->akclassvalue2 = $data->akclassvalue2;
        } else {
            $ilErr->raiseError("<b>Error: There is no dataset with id " . $this->id . "!</b><br />class: " . get_class($this) . "<br />Script: " . __FILE__ . "<br />Line: " . __LINE__, $ilErr->FATAL);
        }
    }
Example #3
0
 function read($a_force_db = false)
 {
     parent::read($a_force_db);
     $this->__readSettings();
 }
Example #4
0
 /**
  * Overwritten read method
  *
  * @access public
  * @param
  * @return
  */
 public function read()
 {
     global $tree;
     parent::read();
     // Inherit order type from parent course (if exists)
     include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
     $this->setOrderType(ilContainerSortingSettings::_lookupSortMode($this->getId()));
 }
 /**
  * Read group
  */
 function read()
 {
     global $ilDB;
     parent::read();
     $query = "SELECT * FROM grp_settings " . "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
     $res = $ilDB->query($query);
     while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
         $this->setInformation($row->information);
         $this->setGroupType($row->grp_type);
         $this->setRegistrationType($row->registration_type);
         $this->enableUnlimitedRegistration($row->registration_unlimited);
         $this->setRegistrationStart(new ilDateTime($row->registration_start, IL_CAL_DATETIME));
         $this->setRegistrationEnd(new ilDateTime($row->registration_end, IL_CAL_DATETIME));
         $this->setPassword($row->registration_password);
         $this->enableMembershipLimitation((bool) $row->registration_mem_limit);
         $this->setMaxMembers($row->registration_max_members);
         $this->enableWaitingList($row->waiting_list);
         $this->setLatitude($row->latitude);
         $this->setLongitude($row->longitude);
         $this->setLocationZoom($row->location_zoom);
         $this->setEnableGroupMap($row->enablemap);
         $this->enableRegistrationAccessCode($row->reg_ac_enabled);
         $this->setRegistrationAccessCode($row->reg_ac);
         $this->setViewMode($row->view_mode);
         $this->setMailToMembersType($row->mail_members_type);
     }
     $this->initParticipants();
     // Inherit order type from parent course (if exists)
     include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
     $this->setOrderType(ilContainerSortingSettings::_lookupSortMode($this->getId()));
 }