コード例 #1
0
 /**
  * Create group
  */
 function create()
 {
     global $ilDB, $ilAppEventHandler;
     if (!parent::create()) {
         return false;
     }
     $query = "INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," . "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," . "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type) " . "VALUES(" . $ilDB->quote($this->getId(), 'integer') . ", " . $ilDB->quote($this->getInformation(), 'text') . ", " . $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " . $ilDB->quote($this->getRegistrationType(), 'integer') . ", " . $ilDB->quote($this->isRegistrationEnabled() ? 1 : 0, 'integer') . ", " . $ilDB->quote($this->isRegistrationUnlimited() ? 1 : 0, 'integer') . ", " . $ilDB->quote($this->getRegistrationStart()->get(IL_CAL_DATETIME, ''), 'timestamp') . ", " . $ilDB->quote($this->getRegistrationEnd()->get(IL_CAL_DATETIME, ''), 'timestamp') . ", " . $ilDB->quote($this->getPassword(), 'text') . ", " . $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " . $ilDB->quote($this->getMaxMembers(), 'integer') . ", " . $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " . $ilDB->quote($this->getLatitude(), 'text') . ", " . $ilDB->quote($this->getLongitude(), 'text') . ", " . $ilDB->quote($this->getLocationZoom(), 'integer') . ", " . $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " . $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' . $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' . $ilDB->quote($this->getViewMode(false), 'integer') . ', ' . $ilDB->quote($this->getMailToMembersType(), 'integer') . ' ' . ")";
     $res = $ilDB->manipulate($query);
     $ilAppEventHandler->raise('Modules/Group', 'create', array('object' => $this, 'obj_id' => $this->getId(), 'appointments' => $this->prepareAppointments('create')));
     return $this->getId();
 }
コード例 #2
0
 function create($a_upload = false)
 {
     global $ilAppEventHandler;
     parent::create($a_upload);
     if (!$a_upload) {
         $this->createMetaData();
     }
     $this->__createDefaultSettings();
     $ilAppEventHandler->raise('Modules/Course', 'create', array('object' => $this, 'obj_id' => $this->getId(), 'appointments' => $this->prepareAppointments('create')));
 }
コード例 #3
0
 public function create()
 {
     global $ilDB;
     parent::create();
     $ilDB->insert(self::TABLE_NAME, array('orgu_type_id' => array('integer', $this->getOrgUnitTypeId()), 'orgu_id' => array('integer', $this->getId())));
 }