ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilExerciseMembersFilter Class Reference

Class ilExerciseMembersFilter. More...

+ Collaboration diagram for ilExerciseMembersFilter:

Public Member Functions

 __construct (int $a_exc_ref_id, array $a_participants_ids, int $a_user_id)
 Constructor. More...
 
 filterParticipantsByAccess ()
 Filter manageable members by position or rbac access. More...
 

Protected Attributes

 $members
 
 $exercise_ref_id
 
 $user_id
 

Private Attributes

 $access
 

Detailed Description

Class ilExerciseMembersFilter.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilExerciseMembersFilter.php.

Constructor & Destructor Documentation

◆ __construct()

ilExerciseMembersFilter::__construct ( int  $a_exc_ref_id,
array  $a_participants_ids,
int  $a_user_id 
)

Constructor.

Parameters
int$a_user_idUser id of the executioner, can come from CRON JOBS
int$a_exc_ref_id
array$a_participants_ids

Definition at line 41 of file class.ilExerciseMembersFilter.php.

References $DIC.

42  {
43  global $DIC;
44 
45  $this->access = $DIC->access();
46  if ($a_user_id) {
47  $this->user_id = $a_user_id;
48  } else {
49  $this->user_id = $DIC->user()->getId();
50  }
51 
52  $this->exercise_ref_id = $a_exc_ref_id;
53  $this->members = $a_participants_ids;
54  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ filterParticipantsByAccess()

ilExerciseMembersFilter::filterParticipantsByAccess ( )

Filter manageable members by position or rbac access.

Returns
int[]

Definition at line 60 of file class.ilExerciseMembersFilter.php.

References $members.

Referenced by ilExerciseManagementGUI\listTextAssignmentObject().

60  : array
61  {
62  if ($this->access->checkAccessOfUser(
63  $this->user_id,
64  'edit_submissions_grades',
65  '',
66  $this->exercise_ref_id
67  )) {
68  // if access by rbac granted => return all
69  return $this->members;
70  }
71  return $this->access->filterUserIdsByPositionOfUser(
72  $this->user_id,
73  'edit_submissions_grades',
74  $this->exercise_ref_id,
75  $this->members
76  );
77  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilExerciseMembersFilter::$access
private

Definition at line 22 of file class.ilExerciseMembersFilter.php.

◆ $exercise_ref_id

ilExerciseMembersFilter::$exercise_ref_id
protected

Definition at line 27 of file class.ilExerciseMembersFilter.php.

◆ $members

ilExerciseMembersFilter::$members
protected

Definition at line 17 of file class.ilExerciseMembersFilter.php.

Referenced by filterParticipantsByAccess().

◆ $user_id

ilExerciseMembersFilter::$user_id
protected

Definition at line 32 of file class.ilExerciseMembersFilter.php.


The documentation for this class was generated from the following file: