5 include_once(
"./Services/Awareness/classes/class.ilAwarenessUserProvider.php");
24 parent::__construct();
26 $this->db = $DIC->database();
36 return "mmbr_user_grpcrs";
46 $this->lng->loadLanguageModule(
"mmbr");
47 return $this->lng->txt(
"mmbr_awrn_my_groups_courses");
57 $this->lng->loadLanguageModule(
"crs");
58 return $this->lng->txt(
"mmbr_awrn_my_groups_courses_info");
71 include_once(
"./Services/Membership/classes/class.ilParticipants.php");
73 $this->log->debug(
"user: " . $this->
getUserId() .
", courses and groups: " . implode(
",", $groups_and_courses_of_user));
76 "SELECT DISTINCT usr_id, obj_id FROM obj_members " .
77 " WHERE " .
$ilDB->in(
"obj_id", $groups_and_courses_of_user,
false,
"integer") .
' ' .
78 'AND (admin > ' .
$ilDB->quote(0,
'integer') .
' ' .
79 'OR tutor > ' .
$ilDB->quote(0,
'integer') .
' ' .
80 'OR member > ' .
$ilDB->quote(0,
'integer') .
")" 83 while ($rec =
$ilDB->fetchAssoc($set)) {
84 if (!in_array($rec[
"usr_id"], $ub)) {
85 $ub[] = $rec[
"usr_id"];
88 include_once(
"./Services/Membership/classes/class.ilParticipants.php");
91 $this->log->debug(
"Cross-checking all members...");
93 $this->log->debug(
"ERROR: obj_members has entry for user id: " . $rec[
"usr_id"] .
101 $this->log->debug(
"Got " . count($ub) .
" distinct members.");
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
getTitle()
Provider title (used in awareness overlay and in administration settings)
__construct()
Constructor.
getInfo()
Provider info (used in administration settings)
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
getProviderId()
Get provider id.
static _lookupTitle($a_id)
lookup object title
A class that provides a collection of users for the awareness tool.
static _getAllReferences($a_id)
get all reference ids of object
getInitialUserSet()
Get initial set of users.
All members of the same courses/groups as the user.
Create styles array
The data for the language used.