5include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProvider.php");
23 return "mmbr_user_grpcrs";
33 $this->lng->loadLanguageModule(
"mmbr");
34 return $this->lng->txt(
"mmbr_awrn_my_groups_courses");
44 $this->lng->loadLanguageModule(
"crs");
45 return $this->lng->txt(
"mmbr_awrn_my_groups_courses_info");
58 include_once(
"./Services/Membership/classes/class.ilParticipants.php");
60 $this->log->debug(
"user: ".$this->
getUserId().
", courses and groups: ".implode(
",", $groups_and_courses_of_user));
62 $set =
$ilDB->query(
"SELECT DISTINCT usr_id, obj_id FROM obj_members ".
63 " WHERE ".
$ilDB->in(
"obj_id", $groups_and_courses_of_user,
false,
"integer").
' '.
64 'AND (admin > '.$ilDB->quote(0,
'integer').
' '.
65 'OR tutor > '.$ilDB->quote(0,
'integer').
' '.
66 'OR member > '.$ilDB->quote(0,
'integer').
")"
69 while ($rec =
$ilDB->fetchAssoc($set))
71 if (!in_array($rec[
"usr_id"], $ub))
73 $ub[] = $rec[
"usr_id"];
77 include_once(
"./Services/Membership/classes/class.ilParticipants.php");
80 $this->log->debug(
"Cross-checking all members...");
83 $this->log->debug(
"ERROR: obj_members has entry for user id: ".$rec[
"usr_id"].
91 $this->log->debug(
"Got ".count($ub).
" distinct members.");
An exception for terminatinating execution or to throw for unit testing.
All members of the same courses/groups as the user.
getInfo()
Provider info (used in administration settings)
getTitle()
Provider title (used in awareness overlay and in administration settings)
getProviderId()
Get provider id.
getInitialUserSet()
Get initial set of users.
A class that provides a collection of users for the awareness tool.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership