LessonPublish
in package
Student access for a lesson assignment. The link's published flag is the value the lesson, the grade book, and Manage due dates all read.
Table of Contents
Methods
- apply() : mixed
- Publish or unpublish the assignment with this link key.
- setLink() : mixed
- Set published on this course's link, creating the row when it is missing.
- contentIdForLink() : mixed
- quizIdForLinkKey() : mixed
- Quiz that owns this resource link id in the course.
Methods
apply()
Publish or unpublish the assignment with this link key.
public
static apply(int $contextId, string $linkKey, bool $published[, string $title = '' ]) : mixed
A quiz uses its quiz link. A content launch uses that row, which updates the link once a grade column exists. Any other key updates the link, creating an unpublished row when the lesson item does not have one yet.
Parameters
- $contextId : int
- $linkKey : string
- $published : bool
- $title : string = ''
-
Used only when a missing link row is created
setLink()
Set published on this course's link, creating the row when it is missing.
public
static setLink(int $contextId, string $resourceLinkId, bool $published[, string $title = '' ]) : mixed
Parameters
- $contextId : int
- $resourceLinkId : string
- $published : bool
- $title : string = ''
contentIdForLink()
private
static contentIdForLink(int $contextId, string $linkKey) : mixed
Parameters
- $contextId : int
- $linkKey : string
quizIdForLinkKey()
Quiz that owns this resource link id in the course.
private
static quizIdForLinkKey(int $contextId, string $linkKey) : mixed
A stored key wins, including a legacy quiz1:{id} that was imported onto a quiz with a different primary key. quiz1:{id} still means that quiz when the quiz has no link yet.
Parameters
- $contextId : int
- $linkKey : string