ILIAS  release_8 Revision v8.24
ilTestParticipantAccessFilter Class Reference
+ Collaboration diagram for ilTestParticipantAccessFilter:

Public Member Functions

 getRefId ()
 
 setRefId ($refId)
 
 getFilter ()
 
 setFilter ($filter)
 
 filterCallback ($userIds)
 
 manageParticipantsUserFilter ($userIds)
 
 scoreParticipantsUserFilter ($userIds)
 
 accessStatisticsUserFilter ($userIds)
 

Static Public Member Functions

static getManageParticipantsUserFilter ($refId)
 
static getScoreParticipantsUserFilter ($refId)
 
static getAccessResultsUserFilter ($refId)
 
static getAccessStatisticsUserFilter ($refId)
 

Data Fields

const FILTER_MANAGE_PARTICIPANTS = 'manageParticipantsUserFilter'
 
const FILTER_SCORE_PARTICIPANTS = 'scoreParticipantsUserFilter'
 
const FILTER_ACCESS_RESULTS = 'accessResultsUserFilter'
 
const FILTER_ACCESS_STATISTICS = 'accessStatisticsUserFilter'
 
const CALLBACK_METHOD = 'filterCallback'
 

Protected Attributes

 $refId
 
 $filter
 

Detailed Description

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

Member Function Documentation

◆ accessStatisticsUserFilter()

ilTestParticipantAccessFilter::accessStatisticsUserFilter (   $userIds)
Parameters
int[]$userIds
Returns
int[]

Definition at line 169 of file class.ilTestParticipantAccessFilter.php.

169 : array
170 {
171 global $DIC; /* @var ILIAS\DI\Container $DIC */
172
173 if ($DIC->access()->checkAccess('tst_statistics', '', $this->getRefId())) {
174 return $userIds;
175 }
176
177 return $this->accessResultsUserFilter($userIds);
178 }
global $DIC
Definition: feed.php:28

References $DIC.

Referenced by filterCallback().

+ Here is the caller graph for this function:

◆ filterCallback()

ilTestParticipantAccessFilter::filterCallback (   $userIds)
Parameters
int[]$userIds
Returns
int[]

Definition at line 82 of file class.ilTestParticipantAccessFilter.php.

82 : array
83 {
84 switch ($this->getFilter()) {
86 return $this->manageParticipantsUserFilter($userIds);
87
89 return $this->scoreParticipantsUserFilter($userIds);
90
92 return $this->accessResultsUserFilter($userIds);
93
95 return $this->accessStatisticsUserFilter($userIds);
96 }
97
98 require_once 'Modules/Test/exceptions/class.ilTestException.php';
99 throw new ilTestException('invalid user access filter mode chosen: ' . $this->getFilter());
100 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References accessStatisticsUserFilter(), FILTER_ACCESS_RESULTS, FILTER_ACCESS_STATISTICS, FILTER_MANAGE_PARTICIPANTS, FILTER_SCORE_PARTICIPANTS, getFilter(), manageParticipantsUserFilter(), and scoreParticipantsUserFilter().

+ Here is the call graph for this function:

◆ getAccessResultsUserFilter()

static ilTestParticipantAccessFilter::getAccessResultsUserFilter (   $refId)
static
Parameters
integer$refId
Returns
callable

Definition at line 208 of file class.ilTestParticipantAccessFilter.php.

References $filter, $refId, and CALLBACK_METHOD.

Referenced by ilTestAccess\checkResultsAccessForActiveId(), ilSoapTestAdministration\getTestResults(), and ilParticipantsTestResultsGUI\showParticipantsCmd().

+ Here is the caller graph for this function:

◆ getAccessStatisticsUserFilter()

static ilTestParticipantAccessFilter::getAccessStatisticsUserFilter (   $refId)
static
Parameters
integer$refId
Returns
callable

Definition at line 220 of file class.ilTestParticipantAccessFilter.php.

221 {
222 $filter = new self();
223 $filter->setFilter(self::FILTER_ACCESS_STATISTICS);
224 $filter->setRefId($refId);
226 }

References $filter, $refId, and CALLBACK_METHOD.

Referenced by ilObjTest\buildStatisticsAccessFilteredParticipantList(), ilTestAccess\checkStatisticsAccessForActiveId(), ilAssFileUploadUploadsExporter\getParticipantData(), and ilTestEvaluationGUI\outEvaluation().

+ Here is the caller graph for this function:

◆ getFilter()

ilTestParticipantAccessFilter::getFilter ( )
Returns
string

Definition at line 65 of file class.ilTestParticipantAccessFilter.php.

65 : string
66 {
67 return $this->filter;
68 }

References $filter.

Referenced by filterCallback().

+ Here is the caller graph for this function:

◆ getManageParticipantsUserFilter()

◆ getRefId()

ilTestParticipantAccessFilter::getRefId ( )
Returns
int

Definition at line 49 of file class.ilTestParticipantAccessFilter.php.

49 : int
50 {
51 return $this->refId;
52 }

References $refId.

Referenced by manageParticipantsUserFilter(), and scoreParticipantsUserFilter().

+ Here is the caller graph for this function:

◆ getScoreParticipantsUserFilter()

static ilTestParticipantAccessFilter::getScoreParticipantsUserFilter (   $refId)
static
Parameters
integer$refId
Returns
callable

Definition at line 196 of file class.ilTestParticipantAccessFilter.php.

197 {
198 $filter = new self();
199 $filter->setFilter(self::FILTER_SCORE_PARTICIPANTS);
200 $filter->setRefId($refId);
202 }

References $filter, $refId, and CALLBACK_METHOD.

Referenced by ilTestScoringGUI\buildManScoringParticipantsTable(), ilTestAccess\checkScoreParticipantsAccessForActiveId(), and ilTestScoringByQuestionsGUI\showManScoringByQuestionParticipantsTable().

+ Here is the caller graph for this function:

◆ manageParticipantsUserFilter()

ilTestParticipantAccessFilter::manageParticipantsUserFilter (   $userIds)
Parameters
int[]$userIds
Returns
int[]

Definition at line 106 of file class.ilTestParticipantAccessFilter.php.

106 : array
107 {
108 global $DIC; /* @var ILIAS\DI\Container $DIC */
109
110 $userIds = $DIC->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
111 'write',
113 $this->getRefId(),
114 $userIds
115 );
116
117 return $userIds;
118 }

References $DIC, getRefId(), and ilOrgUnitOperation\OP_MANAGE_PARTICIPANTS.

Referenced by filterCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreParticipantsUserFilter()

ilTestParticipantAccessFilter::scoreParticipantsUserFilter (   $userIds)
Parameters
int[]$userIds
Returns
int[]

Definition at line 124 of file class.ilTestParticipantAccessFilter.php.

124 : array
125 {
126 global $DIC; /* @var ILIAS\DI\Container $DIC */
127
128 $userIds = $DIC->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
129 'write',
131 $this->getRefId(),
132 $userIds
133 );
134
135 return $userIds;
136 }

References $DIC, getRefId(), and ilOrgUnitOperation\OP_SCORE_PARTICIPANTS.

Referenced by filterCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFilter()

ilTestParticipantAccessFilter::setFilter (   $filter)
Parameters
string$filter

Definition at line 73 of file class.ilTestParticipantAccessFilter.php.

74 {
75 $this->filter = $filter;
76 }

References $filter, and ILIAS\UI\examples\Symbol\Glyph\Filter\filter().

+ Here is the call graph for this function:

◆ setRefId()

ilTestParticipantAccessFilter::setRefId (   $refId)
Parameters
int$refId

Definition at line 57 of file class.ilTestParticipantAccessFilter.php.

58 {
59 $this->refId = $refId;
60 }

References $refId.

Field Documentation

◆ $filter

◆ $refId

◆ CALLBACK_METHOD

◆ FILTER_ACCESS_RESULTS

const ilTestParticipantAccessFilter::FILTER_ACCESS_RESULTS = 'accessResultsUserFilter'

Definition at line 31 of file class.ilTestParticipantAccessFilter.php.

Referenced by filterCallback().

◆ FILTER_ACCESS_STATISTICS

const ilTestParticipantAccessFilter::FILTER_ACCESS_STATISTICS = 'accessStatisticsUserFilter'

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

Referenced by filterCallback().

◆ FILTER_MANAGE_PARTICIPANTS

const ilTestParticipantAccessFilter::FILTER_MANAGE_PARTICIPANTS = 'manageParticipantsUserFilter'

Definition at line 29 of file class.ilTestParticipantAccessFilter.php.

Referenced by filterCallback().

◆ FILTER_SCORE_PARTICIPANTS

const ilTestParticipantAccessFilter::FILTER_SCORE_PARTICIPANTS = 'scoreParticipantsUserFilter'

Definition at line 30 of file class.ilTestParticipantAccessFilter.php.

Referenced by filterCallback().


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