ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\LearningModule\Question\BlockedUsers\Retrieval Class Reference
+ Inheritance diagram for ILIAS\LearningModule\Question\BlockedUsers\Retrieval:
+ Collaboration diagram for ILIAS\LearningModule\Question\BlockedUsers\Retrieval:

Public Member Functions

 __construct (protected int $ref_id)
 
 getData (array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
 
 count (array $filter, array $parameters)
 
 isFieldNumeric (string $field)
 
 getData (array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
 
 count (array $filter, array $parameters)
 
 isFieldNumeric (string $field)
 

Protected Member Functions

 getBlockedUsers ()
 

Protected Attributes

array $data = null
 

Detailed Description

Definition at line 28 of file Retrieval.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LearningModule\Question\BlockedUsers\Retrieval::__construct ( protected int  $ref_id)

Definition at line 34 of file Retrieval.php.

36 {
37 }

Member Function Documentation

◆ count()

ILIAS\LearningModule\Question\BlockedUsers\Retrieval::count ( array  $filter,
array  $parameters 
)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 53 of file Retrieval.php.

53 : int
54 {
55 return count($this->getBlockedUsers());
56 }
count(array $filter, array $parameters)
Definition: Retrieval.php:53

◆ getBlockedUsers()

ILIAS\LearningModule\Question\BlockedUsers\Retrieval::getBlockedUsers ( )
protected

Definition at line 63 of file Retrieval.php.

63 : array
64 {
65 if ($this->data !== null) {
66 return $this->data;
67 }
68
69 $track = \ilLMTracker::getInstance($this->ref_id);
70 $data = [];
71 foreach ($track->getBlockedUsersInformation() as $row) {
72 $data[] = [
73 "id" => $row["qst_id"] . ":" . $row["user_id"],
74 "user" => $row["user_name"],
75 "question" => $row["question_text"],
76 "page" => $row["page_title"],
77 "last_try" => $row["last_try"] ?? "",
78 "unlocked" => $row["unlocked"] ?? false
79 ];
80 }
81
82 return $this->data = $data;
83 }
static getInstance(int $a_ref_id, int $a_user_id=0)

References $data, and ilLMTracker\getInstance().

+ Here is the call graph for this function:

◆ getData()

ILIAS\LearningModule\Question\BlockedUsers\Retrieval::getData ( array  $fields,
?Range  $range = null,
?Order  $order = null,
array  $filter = [],
array  $parameters = [] 
)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 39 of file Retrieval.php.

45 : \Generator {
46 $data = $this->getBlockedUsers();
47 $data = $this->applyOrder($data, $order);
48 $data = $this->applyRange($data, $range);
49
50 yield from $data;
51 }

◆ isFieldNumeric()

ILIAS\LearningModule\Question\BlockedUsers\Retrieval::isFieldNumeric ( string  $field)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 58 of file Retrieval.php.

58 : bool
59 {
60 return false;
61 }

Field Documentation

◆ $data

array ILIAS\LearningModule\Question\BlockedUsers\Retrieval::$data = null
protected

Definition at line 32 of file Retrieval.php.


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