You are here

function course_signup_admin in Course 7.2

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

Signup course admin form.

1 string reference to 'course_signup_admin'
course_signup_menu in modules/course_signup/course_signup.module
Implements hook_menu().

File

modules/course_signup/course_signup.module, line 6

Code

function course_signup_admin($form, &$form_state) {
  $form = array();
  $form['signup_intro']['#markup'] = t("Course uses Signup's built-in functionality to allow users to register for courses and for administrators to manage attendance.");
  $form['course_signup_bypass_checkout'] = array(
    '#title' => t('Bypass registration and checkout for free courses.'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('course_signup_bypass_checkout', 1),
    '#description' => t("Turning this on will allow registered users to immediately begin free courses without going through any kind of course registration or checkout when Ubercart Signup is used."),
  );
  if (module_exists('signup_sms')) {
    $form['course_signup_code_form_enabled'] = [
      '#title' => t('Enable code form'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('course_signup_code_form_enabled'),
      '#description' => t('Enable code form for non-SMS users.'),
    ];
    $form['course_signup_code_form_path'] = [
      '#title' => t('Code form path'),
      '#type' => 'textfield',
      '#default_value' => variable_get('course_signup_code_form_path', 'code'),
      '#description' => t('e.g. "code"'),
    ];
  }
  return system_settings_form($form);
}