You are here

function course_signup_init in Course 6

Same name and namespace in other branches
  1. 7.2 modules/course_signup/course_signup.module \course_signup_init()
  2. 7 modules/course_signup/course_signup.module \course_signup_init()

Implements hook_init().

Override signup admin VBO to use course VBO. Enrol user in course before the access checks happen if the user can quick register.

File

modules/course_signup/course_signup.module, line 141

Code

function course_signup_init() {
  $node = node_load(arg(1));
  global $conf;
  global $user;
  if (course_node_is_course($node)) {
    global $conf;

    // Switch courses to our view with enrollments and bulk operations.

    //$conf['signup_admin_list_view'] = variable_get('signup_admin_list_view_course_override', 'course_signup_user_vbo_admin');
    $conf['signup_ignore_default_fields'] = 1;
    $conf['signup_fieldset_collapsed'] = 0;
    $conf['uc_signup_add_cart_text'] = 'Register';
    $conf['uc_signup_signups_closed_text'] = 'Registration is closed for this activity.';
  }
}