Stud.IP  jlu_3.3 Revision
statusgruppe.inc.php File Reference

Namespaces

namespace  studip_core
 

Functions

 MakeUniqueStatusgruppeID ()
 
 AddNewStatusgruppe ($new_statusgruppe_name, $range_id, $new_statusgruppe_size, $new_selfassign=0, $new_doc_folder=false, $statusgruppe_id=false)
 
 CheckSelfAssign ($statusgruppe_id)
 
 CheckSelfAssignAll ($seminar_id)
 
 CheckAssignRights ($statusgruppe_id, $user_id, $seminar_id)
 
 SetSelfAssign ($statusgruppe_id, $flag="0")
 
 SetSelfAssignAll ($seminar_id, $flag=false)
 
 SetSelfAssignExclusive ($seminar_id, $flag=false)
 
 GetAllSelected ($range_id, $level=0)
 
 EditStatusgruppe ($new_statusgruppe_name, $new_statusgruppe_size, $edit_id, $new_selfassign="0", $new_doc_folder=false)
 
 InsertPersonStatusgruppe ($user_id, $statusgruppe_id, $is_institute_group=true)
 
 MakeDatafieldsDefault ($user_id, $statusgruppe_id, $default='default_value')
 
 getStatusgruppenIDS ($range_id)
 
 getAllStatusgruppenIDS ($range_id)
 
 RemovePersonStatusgruppe ($username, $statusgruppe_id)
 
 RemovePersonFromAllStatusgruppen ($username)
 
 RemovePersonStatusgruppeComplete ($username, $range_id)
 
 DeleteStatusgruppe ($statusgruppe_id)
 
 MovePersonPosition ($username, $statusgruppe_id, $direction)
 
 SortPersonInAfter ($user_id, $after, $role_id)
 
 DeleteAllStatusgruppen ($range_id)
 
 moveStatusgruppe ($role_id, $up_down='up')
 
 SortStatusgruppe ($insert_after, $insert_id)
 
 SubSortStatusgruppe ($insert_father, $insert_daughter)
 
 resortStatusgruppeByRangeId ($range_id)
 
 SwapStatusgruppe ($statusgruppe_id)
 
 CheckStatusgruppe ($range_id, $name)
 
 CheckUserStatusgruppe ($group_id, $object_id)
 
 GetRangeOfStatusgruppe ($statusgruppe_id)
 
 GetGroupsByCourseAndUser ($course_id, $user_id)
 
 getOptionsOfStGroups ($userID)
 
 setOptionsOfStGroup ($groupID, $userID, $visible, $inherit='')
 
 CountMembersStatusgruppen ($range_id)
 
 CountMembersPerStatusgruppe ($group_id)
 
 GetStatusgruppenForUser ($user_id, $group_list)
 
 GetAllStatusgruppen ($parent, $check_user=null, $exclude=false)
 
 GetStatusgruppeName ($group_id)
 
 GetStatusgruppeLimit ($group_id)
 
 CheckStatusgruppeFolder ($group_id)
 
 CheckStatusgruppeMultipleAssigns ($range_id)
 
 isVatherDaughterRelation ($vather, $daughter)
 
 getAllChildIDs ($range_id)
 
 display_roles_recursive ($roles, $level=0, $pred='')
 
 GetRoleNames ($roles, $level=0, $pred='', $all=false)
 
 get_role_data_recursive ($roles, $user_id, &$default_entries, $filter=null, $level=0, $pred='')
 
 getPersonsForRole ($role_id)
 
 sortStatusgruppeByName ($statusgruppe_id)
 
 getPersons ($range_id, $type=false)
 
 getSearchResults ($search_exp, $range_id, $type='inst')
 
 checkExternDefaultForUser ($user_id)
 
 getExternDefaultForUser ($user_id)
 
 setExternDefaultForUser ($user_id, $institute_id)
 

Function Documentation

◆ AddNewStatusgruppe()

AddNewStatusgruppe (   $new_statusgruppe_name,
  $range_id,
  $new_statusgruppe_size,
  $new_selfassign = 0,
  $new_doc_folder = false,
  $statusgruppe_id = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckAssignRights()

CheckAssignRights (   $statusgruppe_id,
  $user_id,
  $seminar_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkExternDefaultForUser()

checkExternDefaultForUser (   $user_id)

Ensure that a user has a valid default institute set if applicable, i.e. he/she is member of at least one institute and has status 'autor' or higher.

Parameters
string$user_iduser id
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckSelfAssign()

CheckSelfAssign (   $statusgruppe_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckSelfAssignAll()

CheckSelfAssignAll (   $seminar_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckStatusgruppe()

CheckStatusgruppe (   $range_id,
  $name 
)
Here is the call graph for this function:

◆ CheckStatusgruppeFolder()

CheckStatusgruppeFolder (   $group_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckStatusgruppeMultipleAssigns()

CheckStatusgruppeMultipleAssigns (   $range_id)
Here is the call graph for this function:

◆ CheckUserStatusgruppe()

CheckUserStatusgruppe (   $group_id,
  $object_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountMembersPerStatusgruppe()

CountMembersPerStatusgruppe (   $group_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountMembersStatusgruppen()

CountMembersStatusgruppen (   $range_id)

Returns the number of persons who are grouped in Statusgruppen for one range.

Persons who are members in more than one Statusgruppe will be count only once

@access public

Parameters
string$range_idThe ID of a range with Statusgruppen
Returns
int The number of members
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteAllStatusgruppen()

DeleteAllStatusgruppen (   $range_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteStatusgruppe()

DeleteStatusgruppe (   $statusgruppe_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ display_roles_recursive()

display_roles_recursive (   $roles,
  $level = 0,
  $pred = '' 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EditStatusgruppe()

EditStatusgruppe (   $new_statusgruppe_name,
  $new_statusgruppe_size,
  $edit_id,
  $new_selfassign = "0",
  $new_doc_folder = false 
)
Here is the call graph for this function:

◆ get_role_data_recursive()

get_role_data_recursive (   $roles,
  $user_id,
$default_entries,
  $filter = null,
  $level = 0,
  $pred = '' 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllChildIDs()

getAllChildIDs (   $range_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAllSelected()

GetAllSelected (   $range_id,
  $level = 0 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAllStatusgruppen()

GetAllStatusgruppen (   $parent,
  $check_user = null,
  $exclude = false 
)

Returns all statusgruppen for the given range.

If there is no statusgruppe for the given range, it returns FALSE.

@access public

Parameters
string$range_id
string$user_id
Returns
array (structure statusgruppe_id => name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllStatusgruppenIDS()

getAllStatusgruppenIDS (   $range_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExternDefaultForUser()

getExternDefaultForUser (   $user_id)

Return the id of the default institute for a user (if set).

Parameters
string$user_iduser id
Returns
string institute id or FALSE
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetGroupsByCourseAndUser()

GetGroupsByCourseAndUser (   $course_id,
  $user_id 
)

get all statusgruppen for one user and one range

@access public

Parameters
string$course_id
string$user_id
Returns
array ( statusgruppe_id => name)

◆ getOptionsOfStGroups()

getOptionsOfStGroups (   $userID)
Here is the call graph for this function:

◆ getPersons()

getPersons (   $range_id,
  $type = false 
)
Here is the call graph for this function:

◆ getPersonsForRole()

getPersonsForRole (   $role_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRangeOfStatusgruppe()

GetRangeOfStatusgruppe (   $statusgruppe_id)
Here is the call graph for this function:

◆ GetRoleNames()

GetRoleNames (   $roles,
  $level = 0,
  $pred = '',
  $all = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSearchResults()

getSearchResults (   $search_exp,
  $range_id,
  $type = 'inst' 
)
Here is the call graph for this function:

◆ GetStatusgruppeLimit()

GetStatusgruppeLimit (   $group_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStatusgruppeName()

GetStatusgruppeName (   $group_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStatusgruppenForUser()

GetStatusgruppenForUser (   $user_id,
  $group_list 
)

Returns all statusgruppen for the given range.

If there is no statusgruppe for the given range, it returns FALSE.

@access public

Parameters
string$range_id
string$user_id(optional)
Returns
array (tree)
Here is the call graph for this function:

◆ getStatusgruppenIDS()

getStatusgruppenIDS (   $range_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InsertPersonStatusgruppe()

InsertPersonStatusgruppe (   $user_id,
  $statusgruppe_id,
  $is_institute_group = true 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isVatherDaughterRelation()

isVatherDaughterRelation (   $vather,
  $daughter 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeDatafieldsDefault()

MakeDatafieldsDefault (   $user_id,
  $statusgruppe_id,
  $default = 'default_value' 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeUniqueStatusgruppeID()

MakeUniqueStatusgruppeID ( )

built a not existing ID

@access private

Returns
string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MovePersonPosition()

MovePersonPosition (   $username,
  $statusgruppe_id,
  $direction 
)
Here is the call graph for this function:

◆ moveStatusgruppe()

moveStatusgruppe (   $role_id,
  $up_down = 'up' 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemovePersonFromAllStatusgruppen()

RemovePersonFromAllStatusgruppen (   $username)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemovePersonStatusgruppe()

RemovePersonStatusgruppe (   $username,
  $statusgruppe_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemovePersonStatusgruppeComplete()

RemovePersonStatusgruppeComplete (   $username,
  $range_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resortStatusgruppeByRangeId()

resortStatusgruppeByRangeId (   $range_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setExternDefaultForUser()

setExternDefaultForUser (   $user_id,
  $institute_id 
)

Set the default institute for a user, if possible (i.e. user is member of this institute and has at least 'autor' status).

Parameters
string$user_iduser id
string$user_idinstitute id
Here is the call graph for this function:

◆ setOptionsOfStGroup()

setOptionsOfStGroup (   $groupID,
  $userID,
  $visible,
  $inherit = '' 
)
Here is the call graph for this function:

◆ SetSelfAssign()

SetSelfAssign (   $statusgruppe_id,
  $flag = "0" 
)

sets selfassign of a group to 0 or 1/2 dependend on the status of the other groups

Parameters
statusgruppe_idid of statusgruppe in database
flag0 for users are not allowed to assign themselves to this group or 1 / 2 to set selfassign to the value of the other statusgroups of the same seminar for which selfassign is allowed. If no such group exists, selfassign is set to the value of flag, 1 means selfassigning is allowed and 2 it's only allowed for a maximum of one group.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSelfAssignAll()

SetSelfAssignAll (   $seminar_id,
  $flag = false 
)
Here is the call graph for this function:

◆ SetSelfAssignExclusive()

SetSelfAssignExclusive (   $seminar_id,
  $flag = false 
)
Here is the call graph for this function:

◆ SortPersonInAfter()

SortPersonInAfter (   $user_id,
  $after,
  $role_id 
)

Sorts a person in statusgroup after the an other person

Parameters
$user_idthe user to be sorted
$afterto user after which is sorted in
$role_idthe id of the statusgroup the sorting is taking place
Here is the call graph for this function:

◆ SortStatusgruppe()

SortStatusgruppe (   $insert_after,
  $insert_id 
)
Here is the call graph for this function:

◆ sortStatusgruppeByName()

sortStatusgruppeByName (   $statusgruppe_id)
Here is the call graph for this function:

◆ SubSortStatusgruppe()

SubSortStatusgruppe (   $insert_father,
  $insert_daughter 
)
Here is the call graph for this function:

◆ SwapStatusgruppe()

SwapStatusgruppe (   $statusgruppe_id)
Here is the call graph for this function: