Inheritance diagram for ilObjGroup:
Collaboration diagram for ilObjGroup:Public Member Functions | |
| ilObjGroup ($a_id=0, $a_call_by_reference=true) | |
| Constructor public. | |
| create () | |
| Create group. | |
| update () | |
| Update group. | |
| read () | |
| Read group. | |
| cloneObject ($a_target_id, $a_copy_id=0) | |
| Clone group (no member data). | |
| cloneDependencies ($a_target_id, $a_copy_id) | |
| Clone object dependencies (crs items, preconditions). | |
| cloneAutoGeneratedRoles ($new_obj) | |
| Clone group admin and member role permissions. | |
| setLatitude ($a_latitude) | |
| Set Latitude. | |
| getLatitude () | |
| Get Latitude. | |
| setLongitude ($a_longitude) | |
| Set Longitude. | |
| getLongitude () | |
| Get Longitude. | |
| setLocationZoom ($a_locationzoom) | |
| Set LocationZoom. | |
| getLocationZoom () | |
| Get LocationZoom. | |
| setEnableGroupMap ($a_enablemap) | |
| Set Enable Group Map. | |
| getEnableGroupMap () | |
| Get Enable Group Map. | |
| join ($a_user_id, $a_mem_role="") | |
| join Group, assigns user to role private | |
| getDefaultMemberRole () | |
| returns object id of created default member role public | |
| getDefaultAdminRole () | |
| returns object id of created default adminstrator role public | |
| addMember ($a_user_id, $a_mem_role) | |
| add Member to Group public | |
| getNewRegistrations () | |
| displays list of applicants public | |
| deleteApplicationListEntry ($a_userId) | |
| deletes an Entry from application list public | |
| leaveGroup () | |
| is called when a member decides to leave group public | |
| leave ($a_user_id) | |
| deassign member from group role private | |
| removeMember ($a_user_id, $a_grp_id="") | |
| removes Member from group public | |
| getGroupMemberIds () | |
| get all group Member ids regardless of role public | |
| getGroupMemberData ($a_mem_ids, $active=1) | |
| get all group Members regardless of group role. | |
| getCountMembers () | |
| getGroupAdminIds ($a_grpId="") | |
| get Group Admin Id public | |
| getDefaultGroupRoles ($a_grp_id="") | |
| get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public | |
| getLocalGroupRoles ($a_translate=false) | |
| get ALL local roles of group, also those created and defined afterwards only fetch data once from database. | |
| getGrpStatusClosedTemplateId () | |
| get group status closed template public | |
| getGrpStatusOpenTemplateId () | |
| get group status open template public | |
| setRegistrationFlag ($a_regFlag="") | |
| set Registration Flag public | |
| getRegistrationFlag () | |
| get Registration Flag public | |
| getPassword () | |
| get Password public | |
| setPassword ($a_password="") | |
| set Password public | |
| updateExpiration ($a_date) | |
| Set expiration. | |
| setExpirationDateTime ($a_date) | |
| set Expiration Date and Time public | |
| getExpiration () | |
| Get expiration. | |
| getExpirationDateTime () | |
| get Expiration Date and Time public | |
| getExpirationTimestamp () | |
| registrationPossible () | |
| initGroupStatus ($a_grpStatus=0) | |
| set group status | |
| setGroupStatus ($a_status) | |
| Set group status. | |
| getGroupStatus () | |
| get group status | |
| readGroupStatus () | |
| get group status, redundant method because public | |
| getMemberRoles ($a_user_id) | |
| get group member status public | |
| getMemberRolesTitle ($a_user_id) | |
| get group member status public | |
| setMemberStatus ($a_user_id, $a_member_role) | |
| set member status public | |
| isMember ($a_userId="") | |
| is Member public | |
| isAdmin ($a_userId) | |
| is Admin public | |
| delete () | |
| delete group and all related data | |
| initDefaultRoles () | |
| init default roles settings public | |
| notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0) | |
| notifys an object about an event occured Based on the event happend, each object may decide how it reacts. | |
| exportXML () | |
| deleteExportFiles ($a_files) | |
| downloadExportFile ($file) | |
| _lookupIdByTitle ($a_title) | |
| isUserRegistered ($a_user_id=0) | |
| _isMember ($a_user_id, $a_ref_id, $a_field= '') | |
| _getMembers ($a_obj_id) | |
| __initFileObject () | |
| getMessage () | |
| setMessage ($a_message) | |
| appendMessage ($a_message) | |
Static Public Member Functions | |
| _importFromXMLString ($xml, $parent_id) | |
| Static used for importing a group from xml string. | |
| _importFromFile ($file, $parent_id) | |
| Static used for importing an group from xml zip file. | |
| _search (&$a_search_obj) | |
| STATIC METHOD search for group data. | |
| _getLinkToObject ($a_id) | |
| STATIC METHOD create a link to the object. | |
Data Fields | |
| $file_obj = null | |
| Group file object for handling of export files. | |
| $m_grpStatus | |
| $m_roleMemberId | |
| $m_roleAdminId | |
Definition at line 44 of file class.ilObjGroup.php.
| ilObjGroup::__initFileObject | ( | ) |
Definition at line 1593 of file class.ilObjGroup.php.
Referenced by deleteExportFiles(), downloadExportFile(), and exportXML().
{
if($this->file_obj)
{
return $this->file_obj;
}
else
{
include_once 'classes/class.ilFileDataGroup.php';
return $this->file_obj = new ilFileDataGroup($this);
}
}
Here is the caller graph for this function:| ilObjGroup::_getLinkToObject | ( | $ | a_id | ) | [static] |
STATIC METHOD create a link to the object.
| int | uniq id |
Definition at line 1483 of file class.ilObjGroup.php.
{
return array("repository.php?ref_id=".$a_id."&set_mode=flat&cmdClass=ilobjgroupgui","");
}
| ilObjGroup::_getMembers | ( | $ | a_obj_id | ) |
Definition at line 1570 of file class.ilObjGroup.php.
References ilObject::$ref_id, and ilObject::_getAllReferences().
Referenced by ilLPStatusManualByTutor::__getGroupInProgress(), ilLPStatusManual::__getGroupInProgress(), ilLPStatusCollection::_getCompleted(), ilLPStatusCollection::_getFailed(), ilLPStatusCollection::_getInProgress(), ilLPStatusManualByTutor::_getNotAttempted(), ilLPStatusManual::_getNotAttempted(), ilLPStatusCollection::_getNotAttempted(), _isMember(), and ilMailSearchGroupsGUI::showMyGroups().
{
global $rbacreview;
// get reference
$ref_ids = ilObject::_getAllReferences($a_obj_id);
$ref_id = current($ref_ids);
$rolf = $rbacreview->getRoleFolderOfObject($ref_id);
$local_roles = $rbacreview->getRolesOfRoleFolder($rolf['ref_id'],false);
$users = array();
foreach($local_roles as $role_id)
{
$users = array_merge($users,$rbacreview->assignedUsers($role_id));
}
return array_unique($users);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::_importFromFile | ( | $ | file, | |
| $ | parent_id | |||
| ) | [static] |
Static used for importing an group from xml zip file.
| xml | file array structure like $_FILE from upload public |
Definition at line 1418 of file class.ilObjGroup.php.
References $file_obj, ilObject::$lng, and _importFromXMLString().
Referenced by ilObjGroupGUI::importFileObject().
{
global $lng;
include_once 'classes/class.ilFileDataGroup.php';
$file_obj = new ilFileDataGroup(null);
$file_obj->addImportDirectory();
$file_obj->createImportFile($_FILES["xmldoc"]["tmp_name"],$_FILES['xmldoc']['name']);
$file_obj->unpackImportFile();
if(!$file_obj->validateImportFile())
{
return false;
}
return ilObjGroup::_importFromXMLString(file_get_contents($file_obj->getImportFile()),$parent_id);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::_importFromXMLString | ( | $ | xml, | |
| $ | parent_id | |||
| ) | [static] |
Static used for importing a group from xml string.
| xml | string public |
Definition at line 1402 of file class.ilObjGroup.php.
Referenced by _importFromFile().
{
include_once 'classes/class.ilGroupImportParser.php';
$import_parser = new ilGroupImportParser($xml,$parent_id);
return $import_parser->startParsing();
}
Here is the caller graph for this function:| ilObjGroup::_isMember | ( | $ | a_user_id, | |
| $ | a_ref_id, | |||
| $ | a_field = '' | |||
| ) |
Definition at line 1516 of file class.ilObjGroup.php.
References $res, _getMembers(), ilObjectFactory::getInstanceByObjId(), and ilUtil::quoteArray().
Referenced by ilObjGroupAccess::_checkAccess(), ilObjCourseGrouping::_checkGroupingDependencies(), and ilObjGroupGUI::getTabs().
{
global $rbacreview,$ilObjDataCache,$ilDB;
$rolf = $rbacreview->getRoleFolderOfObject($a_ref_id);
$local_roles = $rbacreview->getRolesOfRoleFolder($rolf["ref_id"],false);
$user_roles = $rbacreview->assignedRoles($a_user_id);
// Used for membership limitations -> check membership by given field
if($a_field)
{
include_once './Services/User/classes/class.ilObjUser.php';
$tmp_user =& ilObjectFactory::getInstanceByObjId($a_user_id);
switch($a_field)
{
case 'login':
$and = "AND login = '".$tmp_user->getLogin()."' ";
break;
case 'email':
$and = "AND email = '".$tmp_user->getEmail()."' ";
break;
case 'matriculation':
$and = "AND matriculation = '".$tmp_user->getMatriculation()."' ";
break;
default:
$and = "AND usr_id = '".$a_user_id."'";
break;
}
if(!$members = ilObjGroup::_getMembers($ilObjDataCache->lookupObjId($a_ref_id)))
{
return false;
}
$query = "SELECT * FROM usr_data as ud ".
"WHERE usr_id IN (".implode(",",ilUtil::quoteArray($members)).") ".
$and;
$res = $ilDB->query($query);
return $res->numRows() ? true : false;
}
if (!array_intersect($local_roles,$user_roles))
{
return false;
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::_lookupIdByTitle | ( | $ | a_title | ) |
Definition at line 1488 of file class.ilObjGroup.php.
References $res.
Referenced by ilMail::getEmailsOfRecipients(), and ilMail::getUserIds().
{
global $ilDB;
$query = "SELECT * FROM object_data WHERE title = ".
$ilDB->quote($a_title)." AND type = 'grp'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->obj_id;
}
return 0;
}
Here is the caller graph for this function:| ilObjGroup::_search | ( | &$ | a_search_obj | ) | [static] |
STATIC METHOD search for group data.
This method is called from class.ilSearch This method used by class.ilSearchGUI.php to a link to the results
| object | object of search class public |
Definition at line 1444 of file class.ilObjGroup.php.
References $ilBench, and $res.
Referenced by ilSearch::performSearch().
{
global $ilBench;
// NO CLASS VARIABLES IN STATIC METHODS
$where_condition = $a_search_obj->getWhereCondition("like",array("title","description"));
$in = $a_search_obj->getInStatement("ore.ref_id");
$query = "SELECT ore.ref_id AS ref_id FROM object_data AS od, object_reference AS ore ".
$where_condition." ".
$in." ".
"AND od.obj_id = ore.obj_id ".
"AND od.type = 'grp' ";
$ilBench->start("Search", "ilObjGroup_search");
$res = $a_search_obj->ilias->db->query($query);
$ilBench->stop("Search", "ilObjGroup_search");
$counter = 0;
while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$result_data[$counter++]["id"] = $row->ref_id;
#$result_data[$counter]["link"] = "group.php?cmd=view&ref_id=".$row->ref_id;
#$result_data[$counter++]["target"] = "";
}
return $result_data ? $result_data : array();
}
Here is the caller graph for this function:| ilObjGroup::addMember | ( | $ | a_user_id, | |
| $ | a_mem_role | |||
| ) |
add Member to Group public
| integer | user_id | |
| integer | member role_id of local group_role |
Definition at line 380 of file class.ilObjGroup.php.
References join().
Referenced by setMemberStatus().
{
global $rbacadmin;
if (isset($a_user_id) && isset($a_mem_role) )
{
$this->join($a_user_id,$a_mem_role);
return true;
}
else
{
$this->ilias->raiseError(get_class($this)."::addMember(): Missing parameters !",$this->ilias->error_obj->WARNING);
return false;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::appendMessage | ( | $ | a_message | ) |
Definition at line 1615 of file class.ilObjGroup.php.
References getMessage().
{
if($this->getMessage())
{
$this->message .= "<br /> ";
}
$this->message .= $a_message;
}
Here is the call graph for this function:| ilObjGroup::cloneAutoGeneratedRoles | ( | $ | new_obj | ) |
Clone group admin and member role permissions.
public
| object | new group object |
Definition at line 222 of file class.ilObjGroup.php.
References $ilLog, getDefaultAdminRole(), getDefaultMemberRole(), and ilObject::getRefId().
Referenced by cloneObject().
{
global $ilLog,$rbacadmin,$rbacreview;
$admin = $this->getDefaultAdminRole();
$new_admin = $new_obj->getDefaultAdminRole();
$source_rolf = $rbacreview->getRoleFolderIdOfObject($this->getRefId());
$target_rolf = $rbacreview->getRoleFolderIdOfObject($new_obj->getRefId());
if(!$admin || !$new_admin || !$source_rolf || !$target_rolf)
{
$ilLog->write(__METHOD__.' : Error cloning auto generated role: il_grp_admin');
}
$rbacadmin->copyRolePermissions($admin,$source_rolf,$target_rolf,$new_admin,true);
$ilLog->write(__METHOD__.' : Finished copying of role il_grp_admin.');
$member = $this->getDefaultMemberRole();
$new_member = $new_obj->getDefaultMemberRole();
if(!$member || !$new_member)
{
$ilLog->write(__METHOD__.' : Error cloning auto generated role: il_grp_member');
}
$rbacadmin->copyRolePermissions($member,$source_rolf,$target_rolf,$new_member,true);
$ilLog->write(__METHOD__.' : Finished copying of role grp_member.');
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::cloneDependencies | ( | $ | a_target_id, | |
| $ | a_copy_id | |||
| ) |
Clone object dependencies (crs items, preconditions).
public
| int | target ref id of new course | |
| int | copy id |
Reimplemented from ilObject.
Definition at line 195 of file class.ilObjGroup.php.
References ilObject::getId(), ilObjectFactory::getInstanceByRefId(), and ilObject::getRefId().
{
global $tree;
if($course_ref_id = $tree->checkForParentType($this->getRefId(),'crs') and
$new_course_ref_id = $tree->checkForParentType($a_target_id,'crs'))
{
include_once('Modules/Course/classes/class.ilCourseItems.php');
$course_obj =& ilObjectFactory::getInstanceByRefId($course_ref_id,false);
$course_items = new ilCourseItems($course_obj,$this->getRefId());
$course_items->cloneDependencies($a_target_id,$a_copy_id);
}
include_once('Services/Tracking/classes/class.ilLPCollections.php');
$lp_collection = new ilLPCollections($this->getId());
$lp_collection->cloneCollections($a_target_id,$a_copy_id);
return true;
}
Here is the call graph for this function:| ilObjGroup::cloneObject | ( | $ | a_target_id, | |
| $ | a_copy_id = 0 | |||
| ) |
Clone group (no member data).
public
| int | target ref_id | |
| int | copy id |
Reimplemented from ilObject.
Definition at line 153 of file class.ilObjGroup.php.
References cloneAutoGeneratedRoles(), getEnableGroupMap(), getExpiration(), ilObject::getId(), getLatitude(), getLocationZoom(), getLongitude(), getPassword(), getRegistrationFlag(), and readGroupStatus().
{
global $ilDB,$ilUser;
$new_obj = parent::cloneObject($a_target_id,$a_copy_id);
$new_obj->setGroupStatus($this->readGroupStatus());
$new_obj->initGroupStatus($this->readGroupStatus());
$this->cloneAutoGeneratedRoles($new_obj);
$new_obj->setLatitude($this->getLatitude());
$new_obj->setLongitude($this->getLongitude());
$new_obj->setLocationZoom($this->getLocationZoom());
$new_obj->setEnableGroupMap($this->getEnableGroupMap());
$new_obj->update();
// Copy settings
$new_obj->setRegistrationFlag($this->getRegistrationFlag());
$new_obj->setPassword($this->getPassword());
$new_obj->updateExpiration($this->getExpiration());
// Assign user as admin
$new_obj->addMember($ilUser->getId(),$new_obj->getDefaultAdminRole());
// Copy learning progress settings
include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
$obj_settings = new ilLPObjSettings($this->getId());
$obj_settings->cloneSettings($new_obj->getId());
unset($obj_settings);
return $new_obj;
}
Here is the call graph for this function:| ilObjGroup::create | ( | ) |
Create group.
Reimplemented from ilObject.
Definition at line 77 of file class.ilObjGroup.php.
References getEnableGroupMap(), ilObject::getId(), getLatitude(), getLocationZoom(), and getLongitude().
{
global $ilDB;
parent::create();
$query = "INSERT INTO grp_data (".
" grp_id".
", latitude".
", longitude".
", location_zoom".
", enable_group_map".
" ) VALUES (".
$ilDB->quote($this->getId())
.",".$ilDB->quote($this->getLatitude())
.",".$ilDB->quote($this->getLongitude())
.",".$ilDB->quote($this->getLocationZoom())
.",".$ilDB->quote($this->getEnableGroupMap())
.")";
$ilDB->query($query);
}
Here is the call graph for this function:| ilObjGroup::delete | ( | ) |
delete group and all related data
public
Reimplemented from ilObject.
Definition at line 1249 of file class.ilObjGroup.php.
References ilObject::getId().
{
global $ilDB;
// always call parent delete function first!!
if (!parent::delete())
{
return false;
}
$query = "DELETE FROM grp_data WHERE grp_id = ".
$ilDB->quote($this->getId());
$this->ilias->db->query($query);
return true;
}
Here is the call graph for this function:| ilObjGroup::deleteApplicationListEntry | ( | $ | a_userId | ) |
deletes an Entry from application list public
Definition at line 423 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
{
global $ilDB;
$q = "DELETE FROM grp_registration WHERE user_id=".
$ilDB->quote($a_userId)." AND grp_id=".$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
}
Here is the call graph for this function:| ilObjGroup::deleteExportFiles | ( | $ | a_files | ) |
Definition at line 1371 of file class.ilObjGroup.php.
References $file, and __initFileObject().
{
$this->__initFileObject();
foreach($a_files as $file)
{
$this->file_obj->deleteFile($file);
}
return true;
}
Here is the call graph for this function:| ilObjGroup::downloadExportFile | ( | $ | file | ) |
Definition at line 1382 of file class.ilObjGroup.php.
References $file, __initFileObject(), and ilUtil::deliverFile().
{
$this->__initFileObject();
if($abs_name = $this->file_obj->getExportFile($file))
{
ilUtil::deliverFile($abs_name,$file);
// Not reached
}
return false;
}
Here is the call graph for this function:| ilObjGroup::exportXML | ( | ) |
Definition at line 1349 of file class.ilObjGroup.php.
References __initFileObject(), and ilObject::getId().
{
include_once 'classes/class.ilGroupXMLWriter.php';
$xml_writer = new ilGroupXMLWriter($this);
$xml_writer->start();
$xml = $xml_writer->getXML();
$name = time().'__'.$this->ilias->getSetting('inst_id').'__grp_'.$this->getId();
$this->__initFileObject();
$this->file_obj->addGroupDirectory();
$this->file_obj->addDirectory($name);
$this->file_obj->writeToFile($xml,$name.'/'.$name.'.xml');
$this->file_obj->zipFile($name,$name.'.zip');
$this->file_obj->deleteDirectory($name);
return true;
}
Here is the call graph for this function:| ilObjGroup::getCountMembers | ( | ) |
Definition at line 586 of file class.ilObjGroup.php.
References getGroupMemberIds().
{
return count($this->getGroupMemberIds());
}
Here is the call graph for this function:| ilObjGroup::getDefaultAdminRole | ( | ) |
returns object id of created default adminstrator role public
Definition at line 367 of file class.ilObjGroup.php.
References getLocalGroupRoles().
Referenced by cloneAutoGeneratedRoles().
{
$local_group_Roles = $this->getLocalGroupRoles();
return $local_group_Roles["il_grp_admin_".$this->getRefId()];
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getDefaultGroupRoles | ( | $ | a_grp_id = "" |
) |
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public
| returns | the obj_ids of group specific roles(il_grp_member,il_grp_admin) |
Definition at line 626 of file class.ilObjGroup.php.
References ilObject::getRefId().
Referenced by getGroupAdminIds(), initGroupStatus(), isAdmin(), and readGroupStatus().
{
global $rbacadmin, $rbacreview;
if (strlen($a_grp_id) > 0)
{
$grp_id = $a_grp_id;
}
else
{
$grp_id = $this->getRefId();
}
$rolf = $rbacreview->getRoleFolderOfObject($grp_id);
$role_arr = $rbacreview->getRolesOfRoleFolder($rolf["ref_id"]);
foreach ($role_arr as $role_id)
{
$role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
$grp_Member ="il_grp_member_".$grp_id;
$grp_Admin ="il_grp_admin_".$grp_id;
if (strcmp($role_Obj->getTitle(), $grp_Member) == 0 )
{
$arr_grpDefaultRoles["grp_member_role"] = $role_Obj->getId();
}
if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0)
{
$arr_grpDefaultRoles["grp_admin_role"] = $role_Obj->getId();
}
}
return $arr_grpDefaultRoles;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getDefaultMemberRole | ( | ) |
returns object id of created default member role public
Definition at line 356 of file class.ilObjGroup.php.
References getLocalGroupRoles().
Referenced by cloneAutoGeneratedRoles().
{
$local_group_Roles = $this->getLocalGroupRoles();
return $local_group_Roles["il_grp_member_".$this->getRefId()];
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getEnableGroupMap | ( | ) |
Get Enable Group Map.
Definition at line 323 of file class.ilObjGroup.php.
Referenced by cloneObject(), create(), and update().
{
return $this->enablemap;
}
Here is the caller graph for this function:| ilObjGroup::getExpiration | ( | ) |
Get expiration.
public
Definition at line 891 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
Referenced by cloneObject().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id= ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $datetime = $row["expiration"];
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getExpirationDateTime | ( | ) |
get Expiration Date and Time public
| return | array(0=>date, 1=>time) |
Definition at line 907 of file class.ilObjGroup.php.
References $res, ilFormat::fdateDB2dateDE(), and ilObject::getId().
Referenced by registrationPossible().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id= ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
$datetime = $row["expiration"];
$date = ilFormat::fdateDB2dateDE($datetime);
$time = substr($row["expiration"], -8);
$datetime = array(0=>$date, 1=>$time);
return $datetime;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getExpirationTimestamp | ( | ) |
Definition at line 923 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
{
global $ilDB;
$query = "SELECT UNIX_TIMESTAMP(expiration) as timest FROM grp_data WHERE grp_id = ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($query);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $row['timest'];
}
Here is the call graph for this function:| ilObjGroup::getGroupAdminIds | ( | $ | a_grpId = "" |
) |
get Group Admin Id public
| integer | group id | |
| returns | userids that are assigned to a group administrator! role |
Definition at line 597 of file class.ilObjGroup.php.
References getDefaultGroupRoles(), and ilObject::getRefId().
Referenced by leaveGroup(), and removeMember().
{
global $rbacreview;
if (!empty($a_grpId))
{
$grp_id = $a_grpId;
}
else
{
$grp_id = $this->getRefId();
}
$usr_arr = array();
$roles = $this->getDefaultGroupRoles($this->getRefId());
foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id)
{
array_push($usr_arr,$member_id);
}
return $usr_arr;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getGroupMemberData | ( | $ | a_mem_ids, | |
| $ | active = 1 | |||
| ) |
get all group Members regardless of group role.
fetch all users data in one shot to improve performance public
| array | of user ids |
Definition at line 558 of file class.ilObjGroup.php.
References $ilBench, and ilUtil::quoteArray().
{
global $rbacadmin, $rbacreview, $ilBench, $ilDB;
$usr_arr= array();
$q = "SELECT login,firstname,lastname,title,usr_id,last_login ".
"FROM usr_data ".
"WHERE usr_id IN (".implode(',',ilUtil::quoteArray($a_mem_ids)).")";
if (is_numeric($active) && $active > -1)
$q .= "AND active = '$active'";
$r = $ilDB->query($q);
while($row = $r->fetchRow(DB_FETCHMODE_OBJECT))
{
$mem_arr[] = array("id" => $row->usr_id,
"login" => $row->login,
"firstname" => $row->firstname,
"lastname" => $row->lastname,
"last_login" => $row->last_login
);
}
return $mem_arr ? $mem_arr : array();
}
Here is the call graph for this function:| ilObjGroup::getGroupMemberIds | ( | ) |
get all group Member ids regardless of role public
Definition at line 530 of file class.ilObjGroup.php.
References getLocalGroupRoles().
Referenced by getCountMembers(), isMember(), leaveGroup(), and removeMember().
{
global $rbacadmin, $rbacreview;
$usr_arr= array();
$rol = $this->getLocalGroupRoles();
foreach ($rol as $value)
{
foreach ($rbacreview->assignedUsers($value) as $member_id)
{
array_push($usr_arr,$member_id);
}
}
$mem_arr = array_unique($usr_arr);
return $mem_arr ? $mem_arr : array();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getGroupStatus | ( | ) |
get group status
public
| int | group status |
Definition at line 1079 of file class.ilObjGroup.php.
{
return $this->group_status;
}
| ilObjGroup::getGrpStatusClosedTemplateId | ( | ) |
get group status closed template public
| return | obj_id of roletemplate containing permissionsettings for a closed group |
Definition at line 707 of file class.ilObjGroup.php.
References $res.
Referenced by initGroupStatus().
{
$q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $row["obj_id"];
}
Here is the caller graph for this function:| ilObjGroup::getGrpStatusOpenTemplateId | ( | ) |
get group status open template public
| return | obj_id of roletemplate containing permissionsettings for an open group |
Definition at line 721 of file class.ilObjGroup.php.
References $res.
Referenced by initGroupStatus().
{
$q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $row["obj_id"];
}
Here is the caller graph for this function:| ilObjGroup::getLatitude | ( | ) |
Get Latitude.
Definition at line 263 of file class.ilObjGroup.php.
Referenced by cloneObject(), create(), and update().
{
return $this->latitude;
}
Here is the caller graph for this function:| ilObjGroup::getLocalGroupRoles | ( | $ | a_translate = false |
) |
get ALL local roles of group, also those created and defined afterwards only fetch data once from database.
info is stored in object variable public
Definition at line 669 of file class.ilObjGroup.php.
References ilObjRole::_getTranslation(), and ilObject::getRefId().
Referenced by getDefaultAdminRole(), getDefaultMemberRole(), getGroupMemberIds(), getMemberRoles(), and getMemberRolesTitle().
{
global $rbacadmin,$rbacreview;
if (empty($this->local_roles))
{
$this->local_roles = array();
$rolf = $rbacreview->getRoleFolderOfObject($this->getRefId());
$role_arr = $rbacreview->getRolesOfRoleFolder($rolf["ref_id"]);
foreach ($role_arr as $role_id)
{
if ($rbacreview->isAssignable($role_id,$rolf["ref_id"]) == true)
{
$role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
if ($a_translate)
{
$role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
}
else
{
$role_name = $role_Obj->getTitle();
}
$this->local_roles[$role_name] = $role_Obj->getId();
}
}
}
return $this->local_roles;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getLocationZoom | ( | ) |
Get LocationZoom.
Definition at line 303 of file class.ilObjGroup.php.
Referenced by cloneObject(), create(), and update().
{
return $this->locationzoom;
}
Here is the caller graph for this function:| ilObjGroup::getLongitude | ( | ) |
Get Longitude.
Definition at line 283 of file class.ilObjGroup.php.
Referenced by cloneObject(), create(), and update().
{
return $this->longitude;
}
Here is the caller graph for this function:| ilObjGroup::getMemberRoles | ( | $ | a_user_id | ) |
get group member status public
| integer | user_id |
Definition at line 1121 of file class.ilObjGroup.php.
References $ilBench, and getLocalGroupRoles().
Referenced by leave().
{
global $rbacadmin, $rbacreview,$ilBench;
$ilBench->start("Group", "getMemberRoles");
$arr_assignedRoles = array();
$arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id),$this->getLocalGroupRoles());
$ilBench->stop("Group", "getMemberRoles");
return $arr_assignedRoles;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getMemberRolesTitle | ( | $ | a_user_id | ) |
get group member status public
| integer | user_id |
Definition at line 1142 of file class.ilObjGroup.php.
References $ilBench, ilObjRole::_getTranslation(), getLocalGroupRoles(), and ilUtil::quoteArray().
{
global $ilDB,$ilBench;
include_once ('class.ilObjRole.php');
$ilBench->start("Group", "getMemberRolesTitle");
$str_member_roles ="";
$q = "SELECT title ".
"FROM object_data ".
"LEFT JOIN rbac_ua ON object_data.obj_id=rbac_ua.rol_id ".
"WHERE object_data.type = 'role' ".
"AND rbac_ua.usr_id = ".$ilDB->quote($a_user_id)." ".
"AND rbac_ua.rol_id IN (".implode(',',ilUtil::quoteArray($this->getLocalGroupRoles())).")";
$r = $ilDB->query($q);
while($row = $r->fetchRow(DB_FETCHMODE_ASSOC))
{
// display human readable role names for autogenerated roles
$str_member_roles .= ilObjRole::_getTranslation($row["title"]).", ";
}
$ilBench->stop("Group", "getMemberRolesTitle");
return substr($str_member_roles,0,-2);
}
Here is the call graph for this function:| ilObjGroup::getMessage | ( | ) |
Definition at line 1607 of file class.ilObjGroup.php.
Referenced by appendMessage().
{
return $this->message;
}
Here is the caller graph for this function:| ilObjGroup::getNewRegistrations | ( | ) |
displays list of applicants public
Definition at line 400 of file class.ilObjGroup.php.
References $res, ilObject::_exists(), ilObject::_lookupType(), and ilObject::getId().
{
global $ilDB;
$appList = array();
$q = "SELECT * FROM grp_registration WHERE grp_id=".$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if (ilObject::_exists($row->user_id) &&
ilObject::_lookupType($row->user_id) == "usr")
{
array_push($appList,$row);
}
}
return ($appList) ? $appList : false;
}
Here is the call graph for this function:| ilObjGroup::getPassword | ( | ) |
get Password public
| return | password |
Definition at line 786 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
Referenced by cloneObject().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id= ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $row["password"];
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::getRegistrationFlag | ( | ) |
get Registration Flag public
| return | flag => [ 0 = no registration| 1 = registration] |
Definition at line 769 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
Referenced by cloneObject().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id=".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
return $row["register"];
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::ilObjGroup | ( | $ | a_id = 0, |
|
| $ | a_call_by_reference = true | |||
| ) |
Constructor public.
| integer | reference_id or object_id | |
| boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 63 of file class.ilObjGroup.php.
References ilObject::ilObject(), and ilObject::setRegisterMode().
{
global $tree;
$this->tree =& $tree;
$this->type = "grp";
$this->ilObject($a_id,$a_call_by_reference);
$this->setRegisterMode(true);
}
Here is the call graph for this function:| ilObjGroup::initDefaultRoles | ( | ) |
init default roles settings public
Reimplemented from ilObject.
Definition at line 1271 of file class.ilObjGroup.php.
References ilObject::createRoleFolder(), ilObject::getId(), and ilObject::getRefId().
{
global $rbacadmin, $rbacreview;
// create a local role folder
$rfoldObj =& $this->createRoleFolder();
// ADMIN ROLE
// create role and assign role to rolefolder...
$roleObj = $rfoldObj->createRole("il_grp_admin_".$this->getRefId(),"Groupadmin of group obj_no.".$this->getId());
$this->m_roleAdminId = $roleObj->getId();
//set permission template of new local role
$q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_admin'";
$r = $this->ilias->db->getRow($q, DB_FETCHMODE_OBJECT);
$rbacadmin->copyRoleTemplatePermissions($r->obj_id,ROLE_FOLDER_ID,$rfoldObj->getRefId(),$roleObj->getId());
// set object permissions of group object
$ops = $rbacreview->getOperationsOfRole($roleObj->getId(),"grp",$rfoldObj->getRefId());
$rbacadmin->grantPermission($roleObj->getId(),$ops,$this->getRefId());
// set object permissions of role folder object
//$ops = $rbacreview->getOperationsOfRole($roleObj->getId(),"rolf",$rfoldObj->getRefId());
//$rbacadmin->grantPermission($roleObj->getId(),$ops,$rfoldObj->getRefId());
// MEMBER ROLE
// create role and assign role to rolefolder...
$roleObj = $rfoldObj->createRole("il_grp_member_".$this->getRefId(),"Groupmember of group obj_no.".$this->getId());
$this->m_roleMemberId = $roleObj->getId();
//set permission template of new local role
$q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_member'";
$r = $this->ilias->db->getRow($q, DB_FETCHMODE_OBJECT);
$rbacadmin->copyRoleTemplatePermissions($r->obj_id,ROLE_FOLDER_ID,$rfoldObj->getRefId(),$roleObj->getId());
// set object permissions of group object
$ops = $rbacreview->getOperationsOfRole($roleObj->getId(),"grp",$rfoldObj->getRefId());
$rbacadmin->grantPermission($roleObj->getId(),$ops,$this->getRefId());
// set object permissions of role folder object
//$ops = $rbacreview->getOperationsOfRole($roleObj->getId(),"rolf",$rfoldObj->getRefId());
//$rbacadmin->grantPermission($roleObj->getId(),$ops,$rfoldObj->getRefId());
unset($rfoldObj);
unset($roleObj);
$roles[] = $this->m_roleAdminId;
$roles[] = $this->m_roleMemberId;
return $roles ? $roles : array();
}
Here is the call graph for this function:| ilObjGroup::initGroupStatus | ( | $ | a_grpStatus = 0 |
) |
set group status
Grants permissions on the group object for all parent roles. Each permission is granted by computing the intersection of the role template il_grp_status_open/_closed and the permission template of the parent role.
Creates linked roles in the local role folder object for all parent roles and initializes their permission templates. Each permission template is initialized by computing the intersection of the role template il_grp_status_open/_closed and the permission template of the parent role.
public
| integer | group id (optional) | |
| integer | group status (0=public|1=private|2=closed) |
Definition at line 991 of file class.ilObjGroup.php.
References getDefaultGroupRoles(), getGrpStatusClosedTemplateId(), getGrpStatusOpenTemplateId(), and ilObject::getRefId().
{
global $rbacadmin, $rbacreview, $rbacsystem;
//get Rolefolder of group
$rolf_data = $rbacreview->getRoleFolderOfObject($this->getRefId());
//define all relevant roles that rights are needed to be changed
$arr_parentRoles = $rbacreview->getParentRoleIds($this->getRefId());
$arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles),$this->getDefaultGroupRoles());
//group status open (aka public) or group status closed
if ($a_grpStatus == 0 || $a_grpStatus == 1)
{
if ($a_grpStatus == 0)
{
$template_id = $this->getGrpStatusOpenTemplateId();
} else {
$template_id = $this->getGrpStatusClosedTemplateId();
}
//get defined operations from template
$template_ops = $rbacreview->getOperationsOfRole($template_id, 'grp', ROLE_FOLDER_ID);
foreach ($arr_relevantParentRoleIds as $parentRole)
{
if ($rbacreview->isProtected($arr_parentRoles[$parentRole]['parent'],$parentRole))
{
continue;
}
$granted_permissions = array();
// Delete the linked role for the parent role
// (just in case if it already exists).
$rbacadmin->deleteLocalRole($parentRole,$rolf_data["child"]);
// Grant permissions on the group object for
// the parent role. In the foreach loop we
// compute the intersection of the role
// template il_grp_status_open/_closed and the
// permission template of the parent role.
$current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->getRefId());
$rbacadmin->revokePermission($this->getRefId(), $parentRole);
foreach ($template_ops as $template_op)
{
if (in_array($template_op,$current_ops))
{
array_push($granted_permissions,$template_op);
}
}
if (!empty($granted_permissions))
{
$rbacadmin->grantPermission($parentRole, $granted_permissions, $this->getRefId());
}
// Create a linked role for the parent role and
// initialize it with the intersection of
// il_grp_status_open/_closed and the permission
// template of the parent role
$rbacadmin->copyRolePermissionIntersection(
$template_id, ROLE_FOLDER_ID,
$parentRole, $arr_parentRoles[$parentRole]['parent'],
$rolf_data["child"], $parentRole
);
$rbacadmin->assignRoleToFolder($parentRole,$rolf_data["child"],"false");
}//END foreach
}
}
Here is the call graph for this function:| ilObjGroup::isAdmin | ( | $ | a_userId | ) |
is Admin public
| integer | user_id | |
| boolean,true | if user is group administrator |
Definition at line 1224 of file class.ilObjGroup.php.
References getDefaultGroupRoles().
Referenced by leaveGroup(), and removeMember().
{
global $rbacreview;
$grp_Roles = $this->getDefaultGroupRoles();
if (in_array($a_userId,$rbacreview->assignedUsers($grp_Roles["grp_admin_role"])))
{
return true;
}
else
{
return false;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::isMember | ( | $ | a_userId = "" |
) |
is Member public
| integer | user_id | |
| return | true if user is member |
Definition at line 1193 of file class.ilObjGroup.php.
References getGroupMemberIds(), and ilObject::getType().
Referenced by isUserRegistered(), and removeMember().
{
if (strlen($a_userId) == 0)
{
$user_id = $this->ilias->account->getId();
}
else
{
$user_id = $a_userId;
}
if ($this->getType() == "grp")
{
$arr_members = $this->getGroupMemberIds();
if (in_array($user_id, $arr_members))
{
return true;
}
else
{
return false;
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::isUserRegistered | ( | $ | a_user_id = 0 |
) |
Reimplemented from ilObject.
Definition at line 1503 of file class.ilObjGroup.php.
References isMember().
{
global $rbacsystem;
if (!$this->isMember() or !$rbacsystem->checkAccess("join", $this->ref_id))
{
return false;
}
return true;
}
Here is the call graph for this function:| ilObjGroup::join | ( | $ | a_user_id, | |
| $ | a_mem_role = "" | |||
| ) |
join Group, assigns user to role private
| integer | member status = obj_id of local_group_role |
Definition at line 333 of file class.ilObjGroup.php.
Referenced by addMember().
{
global $rbacadmin;
if (is_array($a_mem_role))
{
foreach ($a_mem_role as $role)
{
$rbacadmin->assignUser($role,$a_user_id, false);
}
}
else
{
$rbacadmin->assignUser($a_mem_role,$a_user_id, false);
}
return true;
}
Here is the caller graph for this function:| ilObjGroup::leave | ( | $ | a_user_id | ) |
deassign member from group role private
Definition at line 469 of file class.ilObjGroup.php.
References getMemberRoles().
Referenced by leaveGroup(), and removeMember().
{
global $rbacadmin;
$arr_groupRoles = $this->getMemberRoles($a_user_id);
if (is_array($arr_groupRoles))
{
foreach ($arr_groupRoles as $groupRole)
{
$rbacadmin->deassignUser($groupRole, $a_user_id);
}
}
else
{
$rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::leaveGroup | ( | ) |
is called when a member decides to leave group public
| integer | user-Id | |
| integer | group-Id |
Definition at line 438 of file class.ilObjGroup.php.
References getGroupAdminIds(), getGroupMemberIds(), ilObject::getRefId(), isAdmin(), and leave().
{
global $rbacadmin, $rbacreview;
$member_ids = $this->getGroupMemberIds();
if (count($member_ids) <= 1 || !in_array($this->ilias->account->getId(), $member_ids))
{
return 2;
}
else
{
if (!$this->isAdmin($this->ilias->account->getId()))
{
$this->leave($this->ilias->account->getId());
$member = new ilObjUser($this->ilias->account->getId());
$member->dropDesktopItem($this->getRefId(), "grp");
return 0;
}
else if (count($this->getGroupAdminIds()) == 1)
{
return 1;
}
}
}
Here is the call graph for this function:| ilObjGroup::notify | ( | $ | a_event, | |
| $ | a_ref_id, | |||
| $ | a_parent_non_rbac_id, | |||
| $ | a_node_id, | |||
| $ | a_params = 0 | |||
| ) |
notifys an object about an event occured Based on the event happend, each object may decide how it reacts.
public
| string | event | |
| integer | reference id of object where the event occured | |
| array | passes optional parameters if required |
Reimplemented from ilObject.
Definition at line 1333 of file class.ilObjGroup.php.
{
global $tree;
$parent_id = (int) $tree->getParentId($a_node_id);
if ($parent_id != 0)
{
$obj_data =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
$obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
}
return true;
}
| ilObjGroup::read | ( | ) |
Read group.
Definition at line 128 of file class.ilObjGroup.php.
References ilObject::getId(), setEnableGroupMap(), setLatitude(), setLocationZoom(), and setLongitude().
{
global $ilDB;
parent::read();
$query = "SELECT * FROM grp_data WHERE grp_id = ".
$ilDB->quote($this->getId());
$set = $ilDB->query($query);
$rec = $set->fetchRow(DB_FETCHMODE_ASSOC);
$this->setLatitude($rec["latitude"]);
$this->setLongitude($rec["longitude"]);
$this->setLocationZoom($rec["location_zoom"]);
$this->setEnableGroupMap($rec["enable_group_map"]);
}
Here is the call graph for this function:| ilObjGroup::readGroupStatus | ( | ) |
get group status, redundant method because public
| return | group status[0=public|2=closed] |
Definition at line 1089 of file class.ilObjGroup.php.
References getDefaultGroupRoles(), and ilObject::getRefId().
Referenced by cloneObject().
{
global $rbacsystem,$rbacreview;
$role_folder = $rbacreview->getRoleFolderOfObject($this->getRefId());
$local_roles = $rbacreview->getRolesOfRoleFolder($role_folder["ref_id"]);
//get Rolefolder of group
$rolf_data = $rbacreview->getRoleFolderOfObject($this->getRefId());
//get all relevant roles
$arr_globalRoles = array_diff($local_roles, $this->getDefaultGroupRoles());
//if one global role has no permission to join the group is officially closed !
foreach ($arr_globalRoles as $globalRole)
{
$ops_of_role = $rbacreview->getOperationsOfRole($globalRole,"grp", ROLE_FOLDER_ID);
if ($rbacsystem->checkPermission($this->getRefId(), $globalRole ,"join"))
{
return $this->group_status = 0;
}
}
return $this->group_status = 2;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::registrationPossible | ( | ) |
Definition at line 936 of file class.ilObjGroup.php.
References ilFormat::dateDE2timestamp(), ilFormat::getDateDE(), and getExpirationDateTime().
{
$datetime = $this->getExpirationDateTime();
$today_date = ilFormat::getDateDE();
$today_time = date("H:i:s");
$ts_exp_date = ilFormat::dateDE2timestamp($datetime[0]);
$ts_today_date = ilFormat::dateDE2timestamp($today_date);
$ts_exp_time = substr($datetime[1], 0, 2).
substr($datetime[1], 3, 2).
substr($datetime[1], 6, 2);
$ts_today_time = substr($today_time, 0, 2).
substr($today_time, 3, 2).
substr($today_time, 6, 2);
// no timelimit given -> unlimited
if ($ts_exp_date == 0)
{
return true;
}
if ($ts_today_date < $ts_exp_date)
{
return true;
}
elseif (($ts_today_date == $ts_exp_date) and (strcmp($ts_exp_time,$ts_today_time) >= 0))
{
return true;
}
else
{
return false;
}
}
Here is the call graph for this function:| ilObjGroup::removeMember | ( | $ | a_user_id, | |
| $ | a_grp_id = "" | |||
| ) |
removes Member from group public
Definition at line 494 of file class.ilObjGroup.php.
References getGroupAdminIds(), getGroupMemberIds(), isAdmin(), isMember(), and leave().
Referenced by setMemberStatus().
{
if (isset($a_user_id) && isset($a_grp_id) && $this->isMember($a_user_id))
{
if (count($this->getGroupMemberIds()) > 1)
{
if ($this->isAdmin($a_user_id) && count($this->getGroupAdminIds()) < 2)
{
return "grp_err_administrator_required";
}
else
{
$this->leave($a_user_id);
#$member = new ilObjUser($a_user_id);
#$member->dropDesktopItem($this->getRefId(), "grp");
return "";
}
}
else
{
return "grp_err_last_member";
}
}
else
{
$this->ilias->raiseError(get_class($this)."::removeMember(): Missing parameters !",$this->ilias->error_obj->WARNING);
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjGroup::setEnableGroupMap | ( | $ | a_enablemap | ) |
Set Enable Group Map.
| boolean | $a_enablemap Enable Group Map |
Definition at line 313 of file class.ilObjGroup.php.
Referenced by read().
{
$this->enablemap = $a_enablemap;
}
Here is the caller graph for this function:| ilObjGroup::setExpirationDateTime | ( | $ | a_date | ) |
set Expiration Date and Time public
| date |
Definition at line 861 of file class.ilObjGroup.php.
References $res, ilObject::getId(), and ilFormat::input2date().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id= ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
$date = ilFormat::input2date($a_date);
if ($res->numRows() == 0)
{
$q = "INSERT INTO grp_data (grp_id, expiration) VALUES(".
$ilDB->quote($this->getId()).",".$ilDB->quote($date).")";
$res = $this->ilias->db->query($q);
}
else
{
$q = "UPDATE grp_data SET expiration=".
$ilDB->quote($date)." WHERE grp_id=".$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
}
}
Here is the call graph for this function:| ilObjGroup::setGroupStatus | ( | $ | a_status | ) |
Set group status.
public
| int | group status[0=public|2=closed] |
Definition at line 1067 of file class.ilObjGroup.php.
{
$this->group_status = $a_status;
}
| ilObjGroup::setLatitude | ( | $ | a_latitude | ) |
Set Latitude.
| string | $a_latitude Latitude |
Definition at line 253 of file class.ilObjGroup.php.
Referenced by read().
{
$this->latitude = $a_latitude;
}
Here is the caller graph for this function:| ilObjGroup::setLocationZoom | ( | $ | a_locationzoom | ) |
Set LocationZoom.
| int | $a_locationzoom LocationZoom |
Definition at line 293 of file class.ilObjGroup.php.
Referenced by read().
{
$this->locationzoom = $a_locationzoom;
}
Here is the caller graph for this function:| ilObjGroup::setLongitude | ( | $ | a_longitude | ) |
Set Longitude.
| string | $a_longitude Longitude |
Definition at line 273 of file class.ilObjGroup.php.
Referenced by read().
{
$this->longitude = $a_longitude;
}
Here is the caller graph for this function:| ilObjGroup::setMemberStatus | ( | $ | a_user_id, | |
| $ | a_member_role | |||
| ) |
set member status public
| integer | user id | |
| integer | member role id |
Definition at line 1178 of file class.ilObjGroup.php.
References addMember(), and removeMember().
{
if (isset($a_user_id) && isset($a_member_role))
{
$this->removeMember($a_user_id);
$this->addMember($a_user_id, $a_member_role);
}
}
Here is the call graph for this function:| ilObjGroup::setMessage | ( | $ | a_message | ) |
Definition at line 1611 of file class.ilObjGroup.php.
{
$this->message = $a_message;
}
| ilObjGroup::setPassword | ( | $ | a_password = "" |
) |
set Password public
| password |
Definition at line 803 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id=".$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
if ($res->numRows() == 0)
{
$q = "INSERT INTO grp_data (grp_id, password) VALUES(".
$ilDB->quote($this->getId()).",".$ilDB->quote($a_password).")";
$res = $this->ilias->db->query($q);
}
else
{
$q = "UPDATE grp_data SET password=".$ilDB->quote($a_password)." WHERE grp_id=".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
}
}
Here is the call graph for this function:| ilObjGroup::setRegistrationFlag | ( | $ | a_regFlag = "" |
) |
set Registration Flag public
| integer | [ 0 = no registration| 1 = registration] |
Definition at line 735 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id= ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
if (!isset($a_regFlag))
{
$a_regFlag = 0;
}
if ($res->numRows() == 0)
{
$q = "INSERT INTO grp_data (grp_id, register) VALUES(".
$ilDB->quote($this->getId()).",".
$ilDB->quote($a_regFlag).")";
$res = $this->ilias->db->query($q);
}
else
{
$q = "UPDATE grp_data SET register=".
$ilDB->quote($a_regFlag)." WHERE grp_id=".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
}
}
Here is the call graph for this function:| ilObjGroup::update | ( | ) |
Update group.
Reimplemented from ilObject.
Definition at line 102 of file class.ilObjGroup.php.
References getEnableGroupMap(), ilObject::getId(), getLatitude(), getLocationZoom(), and getLongitude().
{
global $ilDB;
if (!parent::update())
{
return false;
}
// update group data
$query = "UPDATE grp_data SET ".
" latitude = ".$ilDB->quote($this->getLatitude()).
", longitude = ".$ilDB->quote($this->getLongitude()).
", location_zoom = ".$ilDB->quote($this->getLocationZoom()).
", enable_group_map = ".$ilDB->quote($this->getEnableGroupMap()).
" WHERE grp_id = ".$ilDB->quote($this->getId());
$ilDB->query($query);
return true;
}
Here is the call graph for this function:| ilObjGroup::updateExpiration | ( | $ | a_date | ) |
Set expiration.
public
| string | expiration |
Definition at line 832 of file class.ilObjGroup.php.
References $res, and ilObject::getId().
{
global $ilDB;
$q = "SELECT * FROM grp_data WHERE grp_id= ".
$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
$date = $a_date;
if ($res->numRows() == 0)
{
$q = "INSERT INTO grp_data (grp_id, expiration) VALUES(".
$ilDB->quote($this->getId()).",".$ilDB->quote($date).")";
$res = $this->ilias->db->query($q);
}
else
{
$q = "UPDATE grp_data SET expiration=".
$ilDB->quote($date)." WHERE grp_id=".$ilDB->quote($this->getId());
$res = $this->ilias->db->query($q);
}
}
Here is the call graph for this function:| ilObjGroup::$file_obj = null |
Group file object for handling of export files.
Definition at line 49 of file class.ilObjGroup.php.
Referenced by _importFromFile().
| ilObjGroup::$m_grpStatus |
Definition at line 51 of file class.ilObjGroup.php.
| ilObjGroup::$m_roleAdminId |
Definition at line 55 of file class.ilObjGroup.php.
| ilObjGroup::$m_roleMemberId |
Definition at line 53 of file class.ilObjGroup.php.
1.7.1