ILIAS  release_8 Revision v8.24
Outcome.php
Go to the documentation of this file.
1<?php
2
20
29{
33 public const ALLOWED_ACTIVITY_PROGRESS = array(
34 'Initialized',
35 'Started',
36 'InProgress',
37 'Submitted',
38 'Completed'
39 );
40
44 public const ALLOWED_GRADING_PROGRESS = array(
45 'FullyGraded',
46 'Pending',
47 'PendingManual',
48 'Failed',
49 'NotReady'
50 );
51
57 public ?string $language = null;
58
64 public ?string $status = null;
65
71 public ?string $date = null;
72
78 public ?string $type = null;
79
85 public ?string $activityProgress = null;
86
92 public ?string $gradingProgress = null;
93
99 public ?string $comment = null;
100
106 public ?string $dataSource = null;
107
113 private $value = null;
114
120 private int $pointsPossible = 1;
121
129 public function __construct(
130 $value = null,
131 int $pointsPossible = 1,
132 string $activityProgress = 'Completed',
133 string $gradingProgress = 'FullyGraded'
134 ) {
135 $this->value = $value;
136 $this->pointsPossible = $pointsPossible;
137 $this->language = 'en-US';
138 $this->date = gmdate('Y-m-d\TH:i:s\Z', time());
139 $this->type = 'decimal';
140 if (in_array($activityProgress, self::ALLOWED_ACTIVITY_PROGRESS)) {
141 $this->activityProgress = $activityProgress;
142 } else {
143 $this->activityProgress = 'Completed';
144 }
145 if (in_array($gradingProgress, self::ALLOWED_GRADING_PROGRESS)) {
146 $this->gradingProgress = $gradingProgress;
147 } else {
148 $this->gradingProgress = 'FullyGraded';
149 }
150 $this->comment = '';
151 }
152
158 public function getValue(): ?string
159 {
160 return $this->value;
161 }
162
167 public function setValue(string $value)
168 {
169 $this->value = $value;
170 }
171
177 public function getPointsPossible(): ?int
178 {
180 }
181
186 public function setPointsPossible(?int $pointsPossible)
187 {
188 $this->pointsPossible = $pointsPossible;
189 }
190}
Class to represent an outcome.
Definition: Outcome.php:29
string $activityProgress
Activity progress.
Definition: Outcome.php:85
string $type
Outcome type value.
Definition: Outcome.php:78
string $status
Outcome status value.
Definition: Outcome.php:64
int $pointsPossible
Points possible value.
Definition: Outcome.php:120
setPointsPossible(?int $pointsPossible)
Set the points possible value.
Definition: Outcome.php:186
string $gradingProgress
Grading progress.
Definition: Outcome.php:92
const ALLOWED_GRADING_PROGRESS
Allowed values for Grading Progress.
Definition: Outcome.php:44
const ALLOWED_ACTIVITY_PROGRESS
Allowed values for Activity Progress.
Definition: Outcome.php:33
getValue()
Get the outcome value.
Definition: Outcome.php:158
string $language
Language value.
Definition: Outcome.php:57
string $dataSource
Outcome data source value.
Definition: Outcome.php:106
getPointsPossible()
Get the points possible value.
Definition: Outcome.php:177
setValue(string $value)
Set the outcome value.
Definition: Outcome.php:167
string $date
Outcome date value.
Definition: Outcome.php:71
__construct( $value=null, int $pointsPossible=1, string $activityProgress='Completed', string $gradingProgress='FullyGraded')
Class constructor.
Definition: Outcome.php:129
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: AccessToken.php:19