ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\LTI\ToolProvider\Outcome Class Reference

Class to represent an outcome. More...

+ Collaboration diagram for ILIAS\LTI\ToolProvider\Outcome:

Public Member Functions

 __construct ( $value=null, int $pointsPossible=1, string $activityProgress='Completed', string $gradingProgress='FullyGraded')
 Class constructor. More...
 
 getValue ()
 Get the outcome value. More...
 
 setValue (string $value)
 Set the outcome value. More...
 
 getPointsPossible ()
 Get the points possible value. More...
 
 setPointsPossible (?int $pointsPossible)
 Set the points possible value. More...
 

Data Fields

const ALLOWED_ACTIVITY_PROGRESS
 Allowed values for Activity Progress. More...
 
const ALLOWED_GRADING_PROGRESS
 Allowed values for Grading Progress. More...
 
string $language = null
 Language value. More...
 
string $status = null
 Outcome status value. More...
 
string $date = null
 Outcome date value. More...
 
string $type = null
 Outcome type value. More...
 
string $activityProgress = null
 Activity progress. More...
 
string $gradingProgress = null
 Grading progress. More...
 
string $comment = null
 Comment. More...
 
string $dataSource = null
 Outcome data source value. More...
 

Private Attributes

 $value = null
 Outcome value. More...
 
int $pointsPossible = 1
 Points possible value. More...
 

Detailed Description

Class to represent an outcome.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com

Definition at line 28 of file Outcome.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LTI\ToolProvider\Outcome::__construct (   $value = null,
int  $pointsPossible = 1,
string  $activityProgress = 'Completed',
string  $gradingProgress = 'FullyGraded' 
)

Class constructor.

Parameters
mixed$valueOutcome value (optional, default is none)
int$pointsPossiblePoints possible value (optional, default is none)
string$activityProgressActivity progress (optional, default is 'Completed')
string$gradingProgressGrading progress (optional, default is 'FullyGraded')

Definition at line 129 of file Outcome.php.

References ILIAS\LTI\ToolProvider\Outcome\$activityProgress, ILIAS\LTI\ToolProvider\Outcome\$gradingProgress, ILIAS\LTI\ToolProvider\Outcome\$pointsPossible, ILIAS\LTI\ToolProvider\Outcome\$value, ILIAS\UI\examples\Symbol\Glyph\Comment\comment(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

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  }
string $activityProgress
Activity progress.
Definition: Outcome.php:85
string $gradingProgress
Grading progress.
Definition: Outcome.php:92
int $pointsPossible
Points possible value.
Definition: Outcome.php:120
+ Here is the call graph for this function:

Member Function Documentation

◆ getPointsPossible()

ILIAS\LTI\ToolProvider\Outcome::getPointsPossible ( )

Get the points possible value.

Returns
int|null Points possible value

Definition at line 177 of file Outcome.php.

References ILIAS\LTI\ToolProvider\Outcome\$pointsPossible.

Referenced by ILIAS\LTI\ToolProvider\ResourceLink\doOutcomesService().

177  : ?int
178  {
179  return $this->pointsPossible;
180  }
int $pointsPossible
Points possible value.
Definition: Outcome.php:120
+ Here is the caller graph for this function:

◆ getValue()

ILIAS\LTI\ToolProvider\Outcome::getValue ( )

Get the outcome value.

Returns
string Outcome value

Definition at line 158 of file Outcome.php.

References ILIAS\LTI\ToolProvider\Outcome\$value.

Referenced by ILIAS\LTI\ToolProvider\ResourceLink\checkValueType(), and ILIAS\LTI\ToolProvider\ResourceLink\doOutcomesService().

158  : ?string
159  {
160  return $this->value;
161  }
+ Here is the caller graph for this function:

◆ setPointsPossible()

ILIAS\LTI\ToolProvider\Outcome::setPointsPossible ( ?int  $pointsPossible)

Set the points possible value.

Parameters
int | null$pointsPossiblePoints possible value

Definition at line 186 of file Outcome.php.

References ILIAS\LTI\ToolProvider\Outcome\$pointsPossible.

187  {
188  $this->pointsPossible = $pointsPossible;
189  }
int $pointsPossible
Points possible value.
Definition: Outcome.php:120

◆ setValue()

ILIAS\LTI\ToolProvider\Outcome::setValue ( string  $value)

Set the outcome value.

Parameters
string$valueOutcome value

Definition at line 167 of file Outcome.php.

References ILIAS\LTI\ToolProvider\Outcome\$value.

Referenced by ILIAS\LTI\ToolProvider\ResourceLink\checkValueType(), and ILIAS\LTI\ToolProvider\ResourceLink\doOutcomesService().

168  {
169  $this->value = $value;
170  }
+ Here is the caller graph for this function:

Field Documentation

◆ $activityProgress

string null ILIAS\LTI\ToolProvider\Outcome::$activityProgress = null

Activity progress.

Definition at line 85 of file Outcome.php.

Referenced by ILIAS\LTI\ToolProvider\Outcome\__construct().

◆ $comment

string null ILIAS\LTI\ToolProvider\Outcome::$comment = null

Comment.

Definition at line 99 of file Outcome.php.

◆ $dataSource

string null ILIAS\LTI\ToolProvider\Outcome::$dataSource = null

Outcome data source value.

Definition at line 106 of file Outcome.php.

◆ $date

string null ILIAS\LTI\ToolProvider\Outcome::$date = null

Outcome date value.

Definition at line 71 of file Outcome.php.

◆ $gradingProgress

string null ILIAS\LTI\ToolProvider\Outcome::$gradingProgress = null

Grading progress.

Definition at line 92 of file Outcome.php.

Referenced by ILIAS\LTI\ToolProvider\Outcome\__construct().

◆ $language

string null ILIAS\LTI\ToolProvider\Outcome::$language = null

Language value.

Definition at line 57 of file Outcome.php.

◆ $pointsPossible

int ILIAS\LTI\ToolProvider\Outcome::$pointsPossible = 1
private

◆ $status

string null ILIAS\LTI\ToolProvider\Outcome::$status = null

Outcome status value.

Definition at line 64 of file Outcome.php.

◆ $type

string null ILIAS\LTI\ToolProvider\Outcome::$type = null

Outcome type value.

Definition at line 78 of file Outcome.php.

◆ $value

mixed string null ILIAS\LTI\ToolProvider\Outcome::$value = null
private

◆ ALLOWED_ACTIVITY_PROGRESS

const ILIAS\LTI\ToolProvider\Outcome::ALLOWED_ACTIVITY_PROGRESS
Initial value:
= array(
'Initialized',
'Started',
'InProgress',
'Submitted',
'Completed'
)

Allowed values for Activity Progress.

Definition at line 33 of file Outcome.php.

◆ ALLOWED_GRADING_PROGRESS

const ILIAS\LTI\ToolProvider\Outcome::ALLOWED_GRADING_PROGRESS
Initial value:
= array(
'FullyGraded',
'Pending',
'PendingManual',
'Failed',
'NotReady'
)

Allowed values for Grading Progress.

Definition at line 44 of file Outcome.php.


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