You are here

function course_install in Course 3.x

Same name and namespace in other branches
  1. 8.3 course.install \course_install()
  2. 8.2 course.install \course_install()
  3. 6 course.install \course_install()
  4. 7.2 course.install \course_install()
  5. 7 course.install \course_install()

Implements hook_install().

Add default permissions to authenticated users.

File

./course.install, line 16
course.install Install and update functions for Courses.

Code

function course_install() {
  user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, array(
    'view any course',
    'take course',
    'enroll course',
  ));
  user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, array(
    'view any course',
  ));
}