Stud.IP  6.0
VipsModule Class Reference
Inheritance diagram for VipsModule:
CorePlugin StudipModule SystemPlugin PrivacyPlugin CoursewarePlugin

Public Member Functions

 __construct ()
 
 setupExamNavigation ()
 
 getIconNavigation ($course_id, $last_visit, $user_id)
 
 getInfoTemplate ($course_id)
 
 getTabNavigation ($course_id)
 
 getMetadata ()
 
 userDidDelete ($event, $user)
 
 courseDidDelete ($event, $course)
 
 userDidLeaveCourse ($event, $course_id, $user_id)
 
 userDidMigrate ($event, $user_id, $new_id)
 
 statusgruppeUserDidCreate ($event, $statusgruppe_user)
 
 statusgruppeUserDidDelete ($event, $statusgruppe_user)
 
 exportUserData (StoredUserData $store)
 
 registerBlockTypes (array $otherBlockTypes)
 
 registerContainerTypes (array $otherContainerTypes)
 
- Public Member Functions inherited from CorePlugin
 getMetadata ()
 
 __construct ()
 
 getPluginId ()
 
 isEnabled ()
 
 getPluginName ()
 
 getPluginURL ()
 
 getPluginVersion ()
 
 getPluginDescription ()
 
 getDescriptionMode ()
 
 isHighlighted ()
 
 getHighlightText ()
 
 isCorePlugin ()
 
 isActivated ($context=null)
 
 isActivatableForContext (Range $context)
 

Static Public Member Functions

static hasStatus (string $status, string $course_id)
 
static requireStatus (string $status, string $course_id)
 
static requireViewPermission (?VipsAssignment $assignment, ?int $exercise_id=null)
 
static requireEditPermission (?VipsAssignment $assignment, ?int $exercise_id=null)
 
static getActiveCourses (string $user_id)
 
static getCoursesWithRunningExams (string $user_id)
 
- Static Public Member Functions inherited from CorePlugin
static onEnable ($plugin_id)
 
static onDisable ($plugin_id)
 
static onActivation ($plugin_id, $range_id)
 
static onDeactivation ($plugin_id, $range_id)
 
static checkActivation ($range_id)
 

Static Public Attributes

static bool $exam_mode = null
 
static VipsModule $instance = null
 
static Flexi Factory $template_factory = null
 

Additional Inherited Members

- Protected Attributes inherited from CorePlugin
 $plugin_info
 

Detailed Description

Vips plugin class for Stud.IP

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Member Function Documentation

◆ courseDidDelete()

courseDidDelete (   $event,
  $course 
)

◆ exportUserData()

exportUserData ( StoredUserData  $store)

Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.

Parameters
StoredUserData$storeobject to store data into

Implements PrivacyPlugin.

◆ getActiveCourses()

static getActiveCourses ( string  $user_id)
static

Get all courses where the user is at least tutor and Vips is activated.

Returns
array with all course ids, null if no courses

◆ getCoursesWithRunningExams()

static getCoursesWithRunningExams ( string  $user_id)
static

Get all courses with currently running exams for the given user.

Parameters
string$user_idThe user id
Returns
array associative array of course ids and course names

◆ getIconNavigation()

getIconNavigation (   $course_id,
  $last_visit,
  $user_id 
)

Return a navigation object representing this plugin in the course overview table or return NULL if you want to display no icon for this plugin (or course). The navigation object's title will not be shown, only the image (and its associated attributes like 'title') and the URL are actually used.

By convention, new or changed plugin content is indicated by a different icon and a corresponding tooltip.

Parameters
string$course_idcourse or institute range id
int$last_visittime of user's last visit
string$user_idthe user to get the navigation for
Returns
object navigation item to render or NULL

Implements StudipModule.

◆ getInfoTemplate()

getInfoTemplate (   $course_id)

Return a template (an instance of the Flexi class) to be rendered on the course summary page. Return NULL to render nothing for this plugin.

The template will automatically get a standard layout, which can be configured via attributes set on the template:

title title to display, defaults to plugin name icon_url icon for this plugin (if any) admin_url admin link for this plugin (if any) admin_title title for admin link (default: Administration)

Returns
Flexi|null template object to render or NULL

Implements StudipModule.

◆ getMetadata()

getMetadata ( )

Provides metadata like a descriptional text for this module that is shown on the course "+" page to inform users about what the module acutally does. Additionally, a URL can be specified.

Returns
array metadata containg description and/or url

Implements StudipModule.

◆ getTabNavigation()

getTabNavigation (   $course_id)

Return a navigation object representing this plugin in the course overview table or return NULL if you want to display no icon for this plugin (or course). The navigation object's title will not be shown, only the image (and its associated attributes like 'title') and the URL are actually used.

By convention, new or changed plugin content is indicated by a different icon and a corresponding tooltip.

Parameters
string$course_idcourse or institute range id
Returns
array navigation item to render or NULL

Implements StudipModule.

◆ hasStatus()

static hasStatus ( string  $status,
string  $course_id 
)
static

Return whether or not the current user has the given status in a course.

Parameters
string$statusstatus name: 'autor', 'tutor' or 'dozent'
string$course_idcourse to check

◆ registerBlockTypes()

registerBlockTypes ( array  $otherBlockTypes)

Implement this method to register more block types.

You get the current list of block types and return an updated list containing your own block types.

Implements CoursewarePlugin.

◆ registerContainerTypes()

registerContainerTypes ( array  $otherContainerTypes)

Implement this method to register more container types.

You get the current list of container types and return an updated list containing your own container types.

Implements CoursewarePlugin.

◆ requireEditPermission()

static requireEditPermission ( ?VipsAssignment  $assignment,
?int  $exercise_id = null 
)
static

Checks whether or not the current user may edit an assignment.

Parameters
VipsAssignment | null$assignmentassignment to check
int | null$exercise_idcheck that this exercise is on the assignment (optional)
Exceptions
AccessDeniedExceptionIf the current user doesn't have access, an exception is thrown

◆ requireStatus()

static requireStatus ( string  $status,
string  $course_id 
)
static

Check whether or not the current user has the required status in a course.

Parameters
string$statusrequired status: 'autor', 'tutor' or 'dozent'
string$course_idcourse to check
Exceptions
AccessDeniedExceptionif the requirement is not met, an exception is thrown

◆ requireViewPermission()

static requireViewPermission ( ?VipsAssignment  $assignment,
?int  $exercise_id = null 
)
static

Checks whether or not the current user may view an assignment.

Parameters
VipsAssignment | null$assignmentassignment to check
int | null$exercise_idcheck that this exercise is on the assignment (optional)
Exceptions
AccessDeniedExceptionIf the current user doesn't have access, an exception is thrown

◆ setupExamNavigation()

setupExamNavigation ( )

◆ statusgruppeUserDidCreate()

statusgruppeUserDidCreate (   $event,
  $statusgruppe_user 
)

◆ statusgruppeUserDidDelete()

statusgruppeUserDidDelete (   $event,
  $statusgruppe_user 
)

◆ userDidDelete()

userDidDelete (   $event,
  $user 
)

◆ userDidLeaveCourse()

userDidLeaveCourse (   $event,
  $course_id,
  $user_id 
)

◆ userDidMigrate()

userDidMigrate (   $event,
  $user_id,
  $new_id 
)

Field Documentation

◆ $exam_mode

bool $exam_mode = null
static

◆ $instance

VipsModule $instance = null
static

◆ $template_factory

Flexi Factory $template_factory = null
static

The documentation for this class was generated from the following file: