You are here

Opigno LMS API in Opigno LMS 7

Opigno LMS provides an API that modules can use when inside the Opigno distribution context. These functions are meant to simplify the life of end users by allowing modules to set sensible defaults when installed. This is especially useful for apps and permissions. Many less-technical users will expect apps/modules to work out of the box. They will not expect to have to dig through long permission lists to check boxes for specific roles.

When a new app/module is coded, developers should think about the different permissions and to which kind of users they would -- in most cases -- apply. Opigno ships with default OG roles, which are available as constants. Modules that provide other group bundles are encouraged to expose similar constants so that the same API can be used for similar purposes.

The available role constants Opigno LMS provides apply to the course bundle:

The available role constants Opigno LMS provides for the platform:

File

./opigno_lms.profile, line 444
Enables modules and site configuration for a standard site installation. Provides a default API for Apps and modules to use. This will simplify the user experience.

Functions

Namesort descending Location Description
opigno_lms_get_og_role_id ./opigno_lms.profile Get the default OG role ids.
opigno_lms_get_platform_role_id ./opigno_lms.profile Get the default platform role ids.
opigno_lms_get_role_id Deprecated ./opigno_lms.profile Get the default OG role ids.
opigno_lms_set_og_permissions ./opigno_lms.profile Set OG permissions for a specific bundle and specific roles. This function is globally available and modules and apps should use it to set default permissions, simplifying module installation and site management.
opigno_lms_set_platform_permissions ./opigno_lms.profile Set platform permissions for specific roles. This function is globally available and modules and apps should use it to set default permissions, simplifying module installation and site management.