This class represents an instance of a courseware of a course or a user.
- Author
- Marcus Eibrink-Lunzenauer lunze.nosp@m.naue.nosp@m.r@ela.nosp@m.n-ev.nosp@m..de
-
Ron Lucke lucke.nosp@m.@ela.nosp@m.n-ev..nosp@m.de GPL2 or any later version
- Since
- Stud.IP 5.0
Create a new representation of a a courseware instance.
This model class purely represents and does not create anything. Its purpose is to have all things related to a single courseware instance in one place.
- Parameters
-
static deleteForRange |
( |
\Range |
$range | ) |
|
|
static |
findAllBlocksGroupedByStructuralElementId |
( |
callable |
$formatter = null | ) |
|
Find all blocks of this instance and group them by their structural element's ID. You may specify your own $formatter
instead of the default one which stores the blocks as instances of .
- Parameters
-
?callable(array | $row): mixed $formatter Provide your own callable if you need something else instead of full-blown instances of . |
- Returns
- iterable all the (optionally formatted) blocks grouped by the IDs of the structural element containing that block.
findAllStructuralElements |
( |
| ) |
|
Returns all associated block types registered to this courseware instance.
- Returns
- array a list of all associated block types
Returns all associated container types registered to this courseware instance.
- Returns
- array a list of all associated block types
Returns the range this courseware instance belongs to.
- Returns
- the range this courseware instance belongs to
Returns the type of this courseware instance's range as coded in the root element.
- Returns
- string the type of this courseware instance's range
Returns the root element of this courseware instance.
- Returns
- StructuralElement the root element of this courseware instance
getSequentialProgression |
( |
| ) |
|
Returns whether this courseware instance uses a sequential progression through the structural elements.
- Returns
- bool true if this courseware instance uses a sequential progression, false otherwise
getUsersBookmarks |
( |
\User |
$user | ) |
|
Returns all bookmarks of a user associated to this courseware instance.
- Parameters
-
\User | $user | the user for whom to find associated bookmarks for |
- Returns
- array a list of the given user's bookmarks associated to this instance
isValidCertificateSettings |
( |
array |
$certificateSettings | ) |
|
Validates certificate settings.
- Parameters
-
array | $certificateSettings | settings for certificate creation |
- Returns
- bool true if all given values are valid, false otherwise
isValidEditingPermissionLevel |
( |
string |
$editingPermissionLevel | ) |
|
Validates a editing permission level.
- Parameters
-
string | $editingPermissionLevel | the editing permission level to validate |
- Returns
- bool true if this editing permission level is valid, false otherwise
isValidReminderSettings |
( |
array |
$reminderSettings | ) |
|
Validates reminder message settings.
- Parameters
-
array | $reminderSettings | settings for reminder mail sending |
- Returns
- bool true if all given values are valid, false otherwise
isValidResetProgressSettings |
( |
array |
$resetProgressSettings | ) |
|
Validates progress resetting settings.
- Parameters
-
array | $resetProgressSettings | settings for progress resetting |
- Returns
- bool true if all given values are valid, false otherwise
setCertificateSettings |
( |
array |
$certificateSettings | ) |
|
Sets the certificate settings for this courseware instance.
- Parameters
-
array | $certificateSettings | an array of parameters |
setEditingPermissionLevel |
( |
string |
$editingPermissionLevel | ) |
|
Sets the level needed to edit this courseware instance.
- Parameters
-
setFavoriteBlockTypes |
( |
\User |
$user, |
|
|
array |
$favorites |
|
) |
| |
Sets a user's favorite block types for this courseware instance.
- Parameters
-
\User | $user | the user for whom the favorite block types will be set |
array | $favorites | the list of favorite block types |
setReminderSettings |
( |
array |
$reminderSettings | ) |
|
Sets the reminder message settings this courseware instance.
- Parameters
-
array | $reminderSettings | an array of parameters |
setResetProgressSettings |
( |
array |
$resetProgressSettings | ) |
|
Sets the progress resetting settings this courseware instance.
- Parameters
-
array | $reminderSettings | an array of parameters |
setSequentialProgression |
( |
bool |
$isSequentialProgression | ) |
|
Sets whether this courseware instance uses a sequential progression through the structural elements.
- Parameters
-
bool | $isSequentialProgression | true if this courseware instance uses a sequential progression |
const EDITING_PERMISSION_DOZENT = 'dozent' |
const EDITING_PERMISSION_TUTOR = 'tutor' |
The documentation for this class was generated from the following file: