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
◆ __construct()
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
-
◆ existsForRange()
static existsForRange |
( |
\Range |
$range | ) |
|
|
static |
- Parameters
-
- Returns
- ?static
◆ findAllBlocks()
◆ findAllBlocksGroupedByStructuralElementId()
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
- array all the (optionally formatted) blocks grouped by the IDs of the structural element containing that block.
◆ findAllStructuralElements()
findAllStructuralElements |
( |
| ) |
|
◆ findForRange()
static findForRange |
( |
\Range |
$range | ) |
|
|
static |
- Parameters
-
- Returns
- ?static
◆ getBlockTypes()
Returns all associated block types registered to this courseware instance.
- Returns
- array a list of all associated block types
◆ getContainerTypes()
Returns all associated container types registered to this courseware instance.
- Returns
- array a list of all associated block types
◆ getRange()
Returns the range this courseware instance belongs to.
- Returns
- the range this courseware instance belongs to
◆ getRangeType()
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
◆ getRoot()
Returns the root element of this courseware instance.
- Returns
- StructuralElement the root element of this courseware instance
◆ getRootLayout()
Returns which layout is set for root node of this coursware instance
- Returns
- string name of the layout
◆ getSequentialProgression()
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
◆ getShowFeedbackInContentbar()
getShowFeedbackInContentbar |
( |
| ) |
|
◆ getShowFeedbackPopup()
◆ getUnit()
Returns the unit belonging to this courseware instance.
- Returns
- Unit the unit belonging this courseware instance
◆ getUsersBookmarks()
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()
isValidCertificateSettings |
( |
|
$certificateSettings | ) |
|
Validates certificate settings.
- Parameters
-
\JSONArrayObject | $certificateSettings | settings for certificate creation |
- Returns
- bool true if all given values are valid, false otherwise
◆ isValidEditingPermissionLevel()
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()
isValidReminderSettings |
( |
|
$reminderSettings | ) |
|
Validates reminder message settings.
- Parameters
-
\JSONArrayObject | $reminderSettings | settings for reminder mail sending |
- Returns
- bool true if all given values are valid, false otherwise
◆ isValidResetProgressSettings()
isValidResetProgressSettings |
( |
|
$resetProgressSettings | ) |
|
Validates progress resetting settings.
- Parameters
-
\JSONArrayObject | $resetProgressSettings | settings for progress resetting |
- Returns
- bool true if all given values are valid, false otherwise
◆ isValidRootLayout()
isValidRootLayout |
( |
string |
$rootLayout | ) |
|
◆ setCertificateSettings()
setCertificateSettings |
( |
array |
$certificateSettings | ) |
|
Sets the certificate settings for this courseware instance.
- Parameters
-
array | $certificateSettings | an array of parameters |
◆ setEditingPermissionLevel()
setEditingPermissionLevel |
( |
string |
$editingPermissionLevel | ) |
|
Sets the level needed to edit this courseware instance.
- Parameters
-
◆ setFavoriteBlockTypes()
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()
setReminderSettings |
( |
|
$reminderSettings | ) |
|
Sets the reminder message settings this courseware instance.
- Parameters
-
\JSONArrayObject | $reminderSettings | an array of parameters |
◆ setResetProgressSettings()
setResetProgressSettings |
( |
|
$resetProgressSettings | ) |
|
Sets the progress resetting settings this courseware instance.
- Parameters
-
\JSONArrayObject | $resetProgressSettings | an array of parameters |
◆ setRootLayout()
setRootLayout |
( |
string |
$rootLayout | ) |
|
Sets layout of the root node page of this courseware
- Parameters
-
◆ setSequentialProgression()
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 |
◆ setShowFeedbackInContentbar()
setShowFeedbackInContentbar |
( |
bool |
$showFeedbackInContentbar | ) |
|
◆ setShowFeedbackPopup()
setShowFeedbackPopup |
( |
bool |
$showFeedbackPopup | ) |
|
◆ EDITING_PERMISSION_DOZENT
const EDITING_PERMISSION_DOZENT = 'dozent' |
◆ EDITING_PERMISSION_TUTOR
const EDITING_PERMISSION_TUTOR = 'tutor' |
The documentation for this class was generated from the following file: