Class to represent a line-item object. More...
Public Member Functions | |
__construct (string $label, int|float $scoreMaximum, ?string $resourceId=null, ?string $tag=null, ?SubmissionReview $submissionReview=null, ?bool $gradesReleased=null) | |
Class constructor. | |
object | toJsonldObject () |
Generate the JSON-LD object representation of the line-item. | |
object | toJsonObject () |
Generate the JSON object representation of the line-item. | |
Static Public Member Functions | |
static LineItem null | fromJsonObject (object $item) |
Generate a LineItem object from its JSON or JSON-LD representation. | |
Class to represent a line-item object.
ceLTIc\LTI\Content\LineItem::__construct | ( | string | $label, |
int|float | $scoreMaximum, | ||
?string | $resourceId = null, | ||
?string | $tag = null, | ||
?SubmissionReview | $submissionReview = null, | ||
?bool | $gradesReleased = null ) |
Class constructor.
string | $label | Label |
int | float | $scoreMaximum | Maximum score |
string | null | $resourceId | Resource ID (optional) |
string | null | $tag | Tag (optional) |
SubmissionReview | null | $submissionReview | Submission Review (optional) |
bool | null | $gradesReleased | Grades should be released |
References toJsonObject().
|
static |
Generate a LineItem object from its JSON or JSON-LD representation.
object | $item | A JSON or JSON-LD object representing a content-item |
object ceLTIc\LTI\Content\LineItem::toJsonldObject | ( | ) |
Generate the JSON-LD object representation of the line-item.
object ceLTIc\LTI\Content\LineItem::toJsonObject | ( | ) |
Generate the JSON object representation of the line-item.
References ceLTIc\LTI\Util\checkNumber(), and ceLTIc\LTI\Util\checkString().
Referenced by __construct().