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

Public Member Functions

 __construct (int $test_id, ilObjTestSettingsScoring $settings_scoring, ilObjTestSettingsResultSummary $settings_result_summary, ilObjTestSettingsResultDetails $settings_result_details, ilObjTestSettingsGamification $settings_gamification)
 
 getTestId ()
 
 withTestId (int $test_id)
 
 getScoringSettings ()
 
 withScoringSettings (ilObjTestSettingsScoring $settings)
 
 getResultSummarySettings ()
 
 withResultSummarySettings (ilObjTestSettingsResultSummary $settings)
 
 getResultDetailsSettings ()
 
 withResultDetailsSettings (ilObjTestSettingsResultDetails $settings)
 
 getGamificationSettings ()
 
 withGamificationSettings (ilObjTestSettingsGamification $settings)
 

Protected Member Functions

 throwOnDifferentTestId (TestSettings $setting)
 

Protected Attributes

int $test_id
 
ilObjTestSettingsScoring $settings_scoring
 
ilObjTestSettingsResultSummary $settings_result_summary
 
ilObjTestSettingsResultDetails $settings_result_details
 
ilObjTestSettingsGamification $settings_gamification
 

Detailed Description

Definition at line 21 of file class.ilObjTestScoreSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjTestScoreSettings::__construct ( int  $test_id,
ilObjTestSettingsScoring  $settings_scoring,
ilObjTestSettingsResultSummary  $settings_result_summary,
ilObjTestSettingsResultDetails  $settings_result_details,
ilObjTestSettingsGamification  $settings_gamification 
)

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

35 {
36 $this->test_id = $test_id;
37
38 foreach ([
43 ] as $setting) {
44 $this->throwOnDifferentTestId($setting);
45 }
46
49
50 $this->settings_scoring = $settings_scoring;
51 $this->settings_result_summary = $settings_result_summary;
52 $this->settings_result_details = $settings_result_details;
53 $this->settings_gamification = $settings_gamification;
54 }
ilObjTestSettingsResultDetails $settings_result_details
ilObjTestSettingsScoring $settings_scoring
ilObjTestSettingsGamification $settings_gamification
throwOnDifferentTestId(TestSettings $setting)
ilObjTestSettingsResultSummary $settings_result_summary

References $settings_gamification, $settings_result_details, $settings_result_summary, $settings_scoring, $test_id, ilObjTestSettingsResultDetails\getShowPassDetails(), throwOnDifferentTestId(), and ilObjTestSettingsResultSummary\withShowPassDetails().

+ Here is the call graph for this function:

Member Function Documentation

◆ getGamificationSettings()

ilObjTestScoreSettings::getGamificationSettings ( )

Definition at line 115 of file class.ilObjTestScoreSettings.php.

References $settings_gamification.

Referenced by ilObjTest\fromXML().

+ Here is the caller graph for this function:

◆ getResultDetailsSettings()

ilObjTestScoreSettings::getResultDetailsSettings ( )

Definition at line 103 of file class.ilObjTestScoreSettings.php.

References $settings_result_details.

Referenced by ilObjTest\fromXML().

+ Here is the caller graph for this function:

◆ getResultSummarySettings()

ilObjTestScoreSettings::getResultSummarySettings ( )

Definition at line 91 of file class.ilObjTestScoreSettings.php.

References $settings_result_summary.

Referenced by ilObjTest\fromXML().

+ Here is the caller graph for this function:

◆ getScoringSettings()

ilObjTestScoreSettings::getScoringSettings ( )

Definition at line 79 of file class.ilObjTestScoreSettings.php.

References $settings_scoring.

Referenced by ilObjTest\fromXML().

+ Here is the caller graph for this function:

◆ getTestId()

ilObjTestScoreSettings::getTestId ( )

Definition at line 63 of file class.ilObjTestScoreSettings.php.

63 : int
64 {
65 return $this->test_id;
66 }

References $test_id.

◆ throwOnDifferentTestId()

ilObjTestScoreSettings::throwOnDifferentTestId ( TestSettings  $setting)
protected

Definition at line 56 of file class.ilObjTestScoreSettings.php.

57 {
58 if ($setting->getTestId() !== $this->getTestId()) {
59 throw new \LogicException('TestId mismatch in ' . get_class($setting));
60 }
61 }

References TestSettings\getTestId().

Referenced by __construct(), withGamificationSettings(), withResultDetailsSettings(), withResultSummarySettings(), and withScoringSettings().

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

◆ withGamificationSettings()

ilObjTestScoreSettings::withGamificationSettings ( ilObjTestSettingsGamification  $settings)

Definition at line 119 of file class.ilObjTestScoreSettings.php.

119 : self
120 {
121 $this->throwOnDifferentTestId($settings);
122 $clone = clone $this;
123 $clone->settings_gamification = $settings;
124 return $clone;
125 }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200

References ILIAS\LTI\ToolProvider\$settings, and throwOnDifferentTestId().

Referenced by ilObjTest\fromXML().

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

◆ withResultDetailsSettings()

ilObjTestScoreSettings::withResultDetailsSettings ( ilObjTestSettingsResultDetails  $settings)

Definition at line 107 of file class.ilObjTestScoreSettings.php.

107 : self
108 {
109 $this->throwOnDifferentTestId($settings);
110 $clone = clone $this;
111 $clone->settings_result_details = $settings;
112 return $clone;
113 }

References ILIAS\LTI\ToolProvider\$settings, and throwOnDifferentTestId().

+ Here is the call graph for this function:

◆ withResultSummarySettings()

ilObjTestScoreSettings::withResultSummarySettings ( ilObjTestSettingsResultSummary  $settings)

Definition at line 95 of file class.ilObjTestScoreSettings.php.

95 : self
96 {
97 $this->throwOnDifferentTestId($settings);
98 $clone = clone $this;
99 $clone->settings_result_summary = $settings;
100 return $clone;
101 }

References ILIAS\LTI\ToolProvider\$settings, and throwOnDifferentTestId().

+ Here is the call graph for this function:

◆ withScoringSettings()

ilObjTestScoreSettings::withScoringSettings ( ilObjTestSettingsScoring  $settings)

Definition at line 83 of file class.ilObjTestScoreSettings.php.

83 : self
84 {
85 $this->throwOnDifferentTestId($settings);
86 $clone = clone $this;
87 $clone->settings_scoring = $settings;
88 return $clone;
89 }

References ILIAS\LTI\ToolProvider\$settings, and throwOnDifferentTestId().

+ Here is the call graph for this function:

◆ withTestId()

ilObjTestScoreSettings::withTestId ( int  $test_id)

Definition at line 67 of file class.ilObjTestScoreSettings.php.

67 : self
68 {
69 $clone = clone $this;
70 $clone->test_id = $test_id;
71 $clone->settings_scoring = $clone->settings_scoring->withTestId($test_id);
72 $clone->settings_result_summary = $clone->settings_result_summary->withTestId($test_id);
73 $clone->settings_result_details = $clone->settings_result_details->withTestId($test_id);
74 $clone->settings_gamification = $clone->settings_gamification->withTestId($test_id);
75 return $clone;
76 }

References $test_id.

Field Documentation

◆ $settings_gamification

ilObjTestSettingsGamification ilObjTestScoreSettings::$settings_gamification
protected

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

Referenced by __construct(), and getGamificationSettings().

◆ $settings_result_details

ilObjTestSettingsResultDetails ilObjTestScoreSettings::$settings_result_details
protected

Definition at line 26 of file class.ilObjTestScoreSettings.php.

Referenced by __construct(), and getResultDetailsSettings().

◆ $settings_result_summary

ilObjTestSettingsResultSummary ilObjTestScoreSettings::$settings_result_summary
protected

Definition at line 25 of file class.ilObjTestScoreSettings.php.

Referenced by __construct(), and getResultSummarySettings().

◆ $settings_scoring

ilObjTestSettingsScoring ilObjTestScoreSettings::$settings_scoring
protected

Definition at line 24 of file class.ilObjTestScoreSettings.php.

Referenced by __construct(), and getScoringSettings().

◆ $test_id

int ilObjTestScoreSettings::$test_id
protected

Definition at line 23 of file class.ilObjTestScoreSettings.php.

Referenced by __construct(), getTestId(), and withTestId().


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