LTI Integration Library 4.10.3
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
Outcome.php
1<?php
2
3namespace ceLTIc\LTI;
4
13{
14
19 'Initialized',
20 'Started',
21 'InProgress',
22 'Submitted',
23 'Completed'
24 );
25
30 'FullyGraded',
31 'Pending',
32 'PendingManual',
33 'Failed',
34 'NotReady'
35 );
36
42 public $language = null;
43
49 public $status = null;
50
56 public $date = null;
57
63 public $type = null;
64
70 public $activityProgress = null;
71
77 public $gradingProgress = null;
78
84 public $comment = null;
85
91 public $dataSource = null;
92
98 private $value = null;
99
105 private $pointsPossible = 1;
106
115 public function __construct($value = null, $pointsPossible = 1, $activityProgress = 'Completed',
116 $gradingProgress = 'FullyGraded')
117 {
118 $this->value = $value;
119 $this->pointsPossible = $pointsPossible;
120 $this->language = 'en-US';
121 $this->date = gmdate('Y-m-d\TH:i:s\Z', time());
122 $this->type = 'decimal';
123 if (in_array($activityProgress, self::ALLOWED_ACTIVITY_PROGRESS)) {
124 $this->activityProgress = $activityProgress;
125 } else {
126 $this->activityProgress = 'Completed';
127 }
128 if (in_array($gradingProgress, self::ALLOWED_GRADING_PROGRESS)) {
129 $this->gradingProgress = $gradingProgress;
130 } else {
131 $this->gradingProgress = 'FullyGraded';
132 }
133 $this->comment = '';
134 }
135
141 public function getValue()
142 {
143 return $this->value;
144 }
145
151 public function setValue($value)
152 {
153 $this->value = $value;
154 }
155
161 public function getPointsPossible()
162 {
163 return $this->pointsPossible;
164 }
165
171 public function setPointsPossible($pointsPossible)
172 {
173 $this->pointsPossible = $pointsPossible;
174 }
175
176}
Class to represent an outcome.
Definition Outcome.php:13
getPointsPossible()
Get the points possible value.
Definition Outcome.php:161
$language
Language value.
Definition Outcome.php:42
$type
Outcome type value.
Definition Outcome.php:63
__construct($value=null, $pointsPossible=1, $activityProgress='Completed', $gradingProgress='FullyGraded')
Class constructor.
Definition Outcome.php:115
$gradingProgress
Grading progress.
Definition Outcome.php:77
$status
Outcome status value.
Definition Outcome.php:49
setPointsPossible($pointsPossible)
Set the points possible value.
Definition Outcome.php:171
const ALLOWED_ACTIVITY_PROGRESS
Allowed values for Activity Progress.
Definition Outcome.php:18
setValue($value)
Set the outcome value.
Definition Outcome.php:151
$activityProgress
Activity progress.
Definition Outcome.php:70
getValue()
Get the outcome value.
Definition Outcome.php:141
$date
Outcome date value.
Definition Outcome.php:56
const ALLOWED_GRADING_PROGRESS
Allowed values for Grading Progress.
Definition Outcome.php:29
$dataSource
Outcome data source value.
Definition Outcome.php:91