/**
  * group_dashboard( $vars )
  *
  * Hooks into screen_handler
  * Displays group dashboard
  *
  * @param Array $vars a set of variables received for this screen template
  * @return Array $vars a set of variable passed to this screen template
  */
 function group_dashboard($vars)
 {
     global $bp;
     $group_data = $this->get_group_courseware($bp->groups->current_group->id);
     $vars['grades'] = array();
     foreach ($group_data['user_grades'] as $grade) {
         if (is_numeric($grade['value'])) {
             $vars['grades'][] = $grade['value'];
         }
     }
     $vars['founder'] = $bp->groups->current_group->creator_id;
     $vars['teachers'] = BPSP_Roles::get_teachers($bp->groups->current_group->id);
     $vars['is_teacher'] = BPSP_Roles::can_teach($bp->loggedin_user->id);
     $vars['group_course'] = reset($group_data['courses']);
     $vars['bpsp_curriculum'] = get_option('bpsp_curriculum');
     $vars = array_merge($vars, $group_data);
     $vars['items_limit'] = 5;
     $vars['name'] = 'home';
     return $vars;
 }