You are here

function signup_user_schedule in Signup 5.2

Same name and namespace in other branches
  1. 5 signup.module \signup_user_schedule()
  2. 6.2 includes/no_views.inc \signup_user_schedule()

Print a schedule of the given user's signups.

1 string reference to 'signup_user_schedule'
signup_no_views_menu in includes/views.none.inc
Add menu items we only need to define if views is not enabled.

File

includes/views.none.inc, line 93
Provides all the code for required UI elements for sites that do not have views.module enabled. If views is enabled, there are default views for all of these things (which are therefore customizable and more powerful) in signup/views/views.inc.

Code

function signup_user_schedule($uid) {
  $output = '';
  $user = user_load(array(
    'uid' => $uid,
  ));
  if (!$user) {
    return drupal_not_found();
  }
  require_once SIGNUP_PATH . '/theme/signup.theme';
  drupal_set_title(t('Signups for @user', array(
    '@user' => $user->name,
  )));
  $titles = signup_list_user_signups($user->uid);
  foreach ($titles as $nid => $title) {
    $node = node_load(array(
      'nid' => $nid,
    ));
    $output .= theme('signup_user_schedule', $node);
  }
  return $output;
}