WordPress.org

Plugin Directory

Changeset 610112


Ignore:
Timestamp:
10/09/12 18:17:05 (19 months ago)
Author:
sushkov
Message:

Fixed teachers count on dashboard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • buddypress-courseware/trunk/roles/roles.class.php

    r442924 r610112  
    266266         
    267267        $group_admins = groups_get_group_admins( $group_id ); 
    268         foreach ( $group_admins as $admin ) 
    269             if( self::is_teacher( $admin->user_id ) ) 
    270                 $teachers[] = $admin->user_id; 
    271          
     268        $group_members = groups_get_group_members( $group_id ); 
     269        $group_members = array_merge( $group_admins, $group_members['members'] ); 
     270 
     271        foreach ( $group_members as $member ) 
     272            if( self::can_teach( $member->user_id ) ) 
     273                $teachers[] = $member->user_id; 
     274 
    272275        return $teachers; 
    273276    } 
Note: See TracChangeset for help on using the changeset viewer.