You are here

function opigno_statistics_app_group_statistics_page in Opigno Statistics App 7

1 string reference to 'opigno_statistics_app_group_statistics_page'
opigno_statistics_app_menu in ./opigno_statistics_app.module
Implements hook_menu().

File

includes/group/group.pages.inc, line 22

Code

function opigno_statistics_app_group_statistics_page($nid) {
  $node_type = db_query('SELECT group_type FROM {opigno_statistics_group} WHERE group_nid = :nid LIMIT 1', array(
    ':nid' => $nid,
  ))
    ->fetchCol();
  $node_type = $node_type[0];
  switch ($node_type) {
    case 'course':
      return opigno_statistics_app_course_statistics_page($nid);
    case 'class':
      return opigno_statistics_app_class_statistics_page($nid);
    default:
      return MENU_NOT_FOUND;
  }
}