Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
TAs and Instructor should not be listed in the remove members
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaifieraru committed Feb 14, 2014
1 parent c1e9d14 commit 1671373
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sites/all/modules/ldap_course_sync/ldap_course_sync.module
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function ldap_course_sync_node_view($node, $view_node, $langcode){
}


}



}



Expand Down Expand Up @@ -113,8 +113,11 @@ function ldap_course_sync_to_change($group_nid){
}
if($found == 0){
//dpm($member_group);
if($member_group->name == $member_group->init)
$members_to_remove[] = $member_group;
if($member_group->name == $member_group->init){
$roles = og_get_user_roles("node", $group_nid, $member_group->uid, true);
if((!in_array("Instructor",$roles)) && (!in_array("TA", $roles)))
$members_to_remove[] = $member_group;
}
}
}

Expand Down

0 comments on commit 1671373

Please sign in to comment.