ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\TestQuestionPool\Questions\PublicInterface Class Reference
+ Collaboration diagram for ILIAS\TestQuestionPool\Questions\PublicInterface:

Public Member Functions

 __construct (Container $dic)
 
 getGeneralQuestionProperties (int $question_id)
 Returns an object containing the basic properties shared by all question types. More...
 
 areQuestionsAnsweredByUser (int $user_id, array $question_ids)
 Checks if an array of question ids is answered by a user or not. More...
 

Private Attributes

GeneralQuestionPropertiesRepository $general_questions_repository
 

Detailed Description

Definition at line 25 of file PublicInterface.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\TestQuestionPool\Questions\PublicInterface::__construct ( Container  $dic)

Definition at line 29 of file PublicInterface.php.

31  {
32  $this->general_questions_repository = new GeneralQuestionPropertiesRepository(
33  $dic['ilDB'],
34  $dic['component.factory'],
35  $dic['component.repository']
36  );
37  }
$dic
Definition: result.php:31

Member Function Documentation

◆ areQuestionsAnsweredByUser()

ILIAS\TestQuestionPool\Questions\PublicInterface::areQuestionsAnsweredByUser ( int  $user_id,
array  $question_ids 
)

Checks if an array of question ids is answered by a user or not.

Parameters
array<int>$question_ids user id array

Definition at line 52 of file PublicInterface.php.

52  : bool
53  {
54  return $this->general_questions_repository->areQuestionsAnsweredByUser($user_id, $question_ids);
55  }

◆ getGeneralQuestionProperties()

ILIAS\TestQuestionPool\Questions\PublicInterface::getGeneralQuestionProperties ( int  $question_id)

Returns an object containing the basic properties shared by all question types.

Definition at line 42 of file PublicInterface.php.

42  : ?GeneralQuestionProperties
43  {
44  return $this->general_questions_repository->getForQuestionId($question_id);
45  }

Field Documentation

◆ $general_questions_repository

GeneralQuestionPropertiesRepository ILIAS\TestQuestionPool\Questions\PublicInterface::$general_questions_repository
private

Definition at line 27 of file PublicInterface.php.


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