Public Member Functions | |
| ilGroup ($a_group_id=0) | |
| Constructor public. | |
Static Public Member Functions | |
| _groupNameExists ($a_group_name, $a_id=0) | |
| checks if group name already exists. | |
Data Fields | |
| $ilias | |
| $group_id | |
Definition at line 34 of file class.ilGroup.php.
| ilGroup::_groupNameExists | ( | $ | a_group_name, | |
| $ | a_id = 0 | |||
| ) | [static] |
checks if group name already exists.
Groupnames must be unique for mailing purposes static function; move to better place (ilObjGroup or ilUtil) public
| string | groupname | |
| integer | obj_id of group to exclude from the check. |
Definition at line 74 of file class.ilGroup.php.
{
global $ilDB,$ilErr;
if (empty($a_group_name))
{
$message = get_class($this)."::groupNameExists(): No groupname given!";
$ilErr->raiseError($message,$ilErr->WARNING);
}
$clause = ($a_id) ? " AND obj_id != '".$a_id."'" : "";
$q = "SELECT obj_id FROM object_data ".
"WHERE title = '".addslashes($a_group_name)."' ".
"AND type = 'grp'".
$clause;
$r = $ilDB->query($q);
if ($r->numRows() == 1)
{
return true;
}
else
{
return false;
}
}
| ilGroup::ilGroup | ( | $ | a_group_id = 0 |
) |
Constructor public.
| integer | group_id |
Definition at line 55 of file class.ilGroup.php.
References $ilias.
{
global $ilias;
// init variables
$this->ilias = &$ilias;
$this->group_id = $a_group_id;
}
| ilGroup::$group_id |
Definition at line 48 of file class.ilGroup.php.
| ilGroup::$ilias |
Definition at line 41 of file class.ilGroup.php.
Referenced by ilGroup().
1.7.1