function opigno_ilt_update_8002 in Opigno Instructor-led Trainings 8
Setup permissions.
File
- ./
opigno_ilt.install, line 69 - Install, update and uninstall functions for the Opigno ILT module.
Code
function opigno_ilt_update_8002() {
// Allow users to view ILT entities.
$role = Role::load(RoleInterface::AUTHENTICATED_ID);
$role
->grantPermission('view ilt entities');
$role
->save();
// Allow platform-level student managers to score ILT entities.
$role = Role::load('user_manager');
$role
->grantPermission('score ilt entities');
$role
->save();
// Allow group-level student managers to score ILT entities.
$role = GroupRole::load('learning_path-user_manager');
$role
->grantPermission('score ilt entities');
$role
->save();
}