ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjTestSettingsScoring Class Reference
+ Inheritance diagram for ilObjTestSettingsScoring:
+ Collaboration diagram for ilObjTestSettingsScoring:

Public Member Functions

 __construct (int $test_id)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
 
 toStorage ()
 
 getCountSystem ()
 
 withCountSystem (int $count_system)
 
 getScoreCutting ()
 
 withScoreCutting (int $score_cutting)
 
 getPassScoring ()
 
 withPassScoring (int $pass_scoring)
 
- Public Member Functions inherited from TestSettings
 __construct (int $test_id)
 
 getTestId ()
 
 withTestId (int $test_id)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
 
 toStorage ()
 

Protected Attributes

int $count_system = 0
 
int $score_cutting = 0
 
int $pass_scoring = 0
 
- Protected Attributes inherited from TestSettings
int $test_id
 

Detailed Description

Definition at line 25 of file ilObjTestSettingsScoring.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjTestSettingsScoring::__construct ( int  $test_id)

Definition at line 32 of file ilObjTestSettingsScoring.php.

References ILIAS\GlobalScreen\Provider\__construct().

33  {
35  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getCountSystem()

ilObjTestSettingsScoring::getCountSystem ( )

Definition at line 84 of file ilObjTestSettingsScoring.php.

References $count_system.

Referenced by ilObjTestSettingsScoringResultsGUI\isScoreRecalculationRequired(), toForm(), and toStorage().

84  : int
85  {
86  return $this->count_system;
87  }
+ Here is the caller graph for this function:

◆ getPassScoring()

ilObjTestSettingsScoring::getPassScoring ( )

Definition at line 106 of file ilObjTestSettingsScoring.php.

References $pass_scoring.

Referenced by ilObjTestSettingsScoringResultsGUI\isScoreRecalculationRequired(), toForm(), and toStorage().

106  : int
107  {
108  return $this->pass_scoring;
109  }
+ Here is the caller graph for this function:

◆ getScoreCutting()

ilObjTestSettingsScoring::getScoreCutting ( )

Definition at line 95 of file ilObjTestSettingsScoring.php.

References $score_cutting.

Referenced by ilObjTestSettingsScoringResultsGUI\isScoreRecalculationRequired(), toForm(), and toStorage().

95  : int
96  {
97  return $this->score_cutting;
98  }
+ Here is the caller graph for this function:

◆ toForm()

ilObjTestSettingsScoring::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
array  $environment = null 
)

Definition at line 37 of file ilObjTestSettingsScoring.php.

References getCountSystem(), getPassScoring(), getScoreCutting(), ilLanguage\txt(), ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), withCountSystem(), withPassScoring(), withScoreCutting(), and ILIAS\UI\Implementation\Component\Input\withValue().

42  : FormInput {
43  $trafo = $refinery->kindlyTo()->Int();
44  $fields = [
45  'count_system' => $f->radio($lng->txt('tst_text_count_system'), "")
46  ->withOption('0', $lng->txt('tst_count_partial_solutions'), $lng->txt('tst_count_partial_solutions_desc'))
47  ->withOption('1', $lng->txt('tst_count_correct_solutions'), $lng->txt('tst_count_correct_solutions_desc'))
48  ->withValue($this->getCountSystem())
50  'score_cutting' => $f->radio($lng->txt('tst_score_cutting'), "")
51  ->withOption('0', $lng->txt('tst_score_cut_question'), $lng->txt('tst_score_cut_question_desc'))
52  ->withOption('1', $lng->txt('tst_score_cut_test'), $lng->txt('tst_score_cut_test_desc'))
53  ->withValue($this->getScoreCutting())
55  'pass_scoring' => $f->radio($lng->txt('tst_pass_scoring'), "")
56  ->withOption('0', $lng->txt('tst_pass_last_pass'), $lng->txt('tst_pass_last_pass_desc'))
57  ->withOption('1', $lng->txt('tst_pass_best_pass'), $lng->txt('tst_pass_best_pass_desc'))
58  ->withValue($this->getPassScoring())
60  ];
61  return $f->section($fields, $lng->txt('test_scoring'))
63  $refinery->custom()->transformation(
64  function ($v) {
65  return (clone $this)
66  ->withCountSystem($v['count_system'])
67  ->withScoreCutting($v['score_cutting'])
68  ->withPassScoring($v['pass_scoring']);
69  }
70  )
71  );
72  }
$lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:59
This describes inputs that can be used in forms.
Definition: FormInput.php:31
withScoreCutting(int $score_cutting)
Refinery Factory $refinery
+ Here is the call graph for this function:

◆ toStorage()

ilObjTestSettingsScoring::toStorage ( )

Definition at line 74 of file ilObjTestSettingsScoring.php.

References getCountSystem(), getPassScoring(), and getScoreCutting().

74  : array
75  {
76  return [
77  'count_system' => ['text', $this->getCountSystem()],
78  'score_cutting' => ['text', $this->getScoreCutting()],
79  'pass_scoring' => ['text', $this->getPassScoring()]
80  ];
81  }
+ Here is the call graph for this function:

◆ withCountSystem()

ilObjTestSettingsScoring::withCountSystem ( int  $count_system)

Definition at line 88 of file ilObjTestSettingsScoring.php.

References $count_system.

Referenced by toForm().

88  : self
89  {
90  $clone = clone $this;
91  $clone->count_system = $count_system;
92  return $clone;
93  }
+ Here is the caller graph for this function:

◆ withPassScoring()

ilObjTestSettingsScoring::withPassScoring ( int  $pass_scoring)

Definition at line 110 of file ilObjTestSettingsScoring.php.

References $pass_scoring.

Referenced by toForm().

110  : self
111  {
112  $clone = clone $this;
113  $clone->pass_scoring = $pass_scoring;
114  return $clone;
115  }
+ Here is the caller graph for this function:

◆ withScoreCutting()

ilObjTestSettingsScoring::withScoreCutting ( int  $score_cutting)

Definition at line 99 of file ilObjTestSettingsScoring.php.

References $score_cutting.

Referenced by toForm().

99  : self
100  {
101  $clone = clone $this;
102  $clone->score_cutting = $score_cutting;
103  return $clone;
104  }
+ Here is the caller graph for this function:

Field Documentation

◆ $count_system

int ilObjTestSettingsScoring::$count_system = 0
protected

Definition at line 27 of file ilObjTestSettingsScoring.php.

Referenced by getCountSystem(), and withCountSystem().

◆ $pass_scoring

int ilObjTestSettingsScoring::$pass_scoring = 0
protected

Definition at line 29 of file ilObjTestSettingsScoring.php.

Referenced by getPassScoring(), and withPassScoring().

◆ $score_cutting

int ilObjTestSettingsScoring::$score_cutting = 0
protected

Definition at line 28 of file ilObjTestSettingsScoring.php.

Referenced by getScoreCutting(), and withScoreCutting().


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