File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1427,9 +1427,16 @@ public static function fillGroupWithUsers($groupInfo)
14271427 return false ;
14281428 }
14291429 $ session_id = api_get_session_id ();
1430+ $ studentStatus = 5 ;
1431+ if (isset ($ session_id ) && $ session_id != 0 ) {
1432+ $ studentStatus = 0 ;
1433+ }
14301434 $ complete_user_list = CourseManager::get_user_list_from_course_code (
14311435 $ _course ['code ' ],
1432- $ session_id
1436+ $ session_id ,
1437+ null ,
1438+ null ,
1439+ $ studentStatus
14331440 );
14341441 $ groupIid = $ groupInfo ['iid ' ];
14351442 $ category = self ::get_category_from_group ($ groupIid );
@@ -1448,6 +1455,7 @@ public static function fillGroupWithUsers($groupInfo)
14481455 }
14491456
14501457 $ usersToAdd = [];
1458+ shuffle ($ complete_user_list );
14511459 foreach ($ complete_user_list as $ userInfo ) {
14521460 $ isSubscribed = self ::is_subscribed ($ userInfo ['user_id ' ], $ groupInfo );
14531461 if ($ isSubscribed ) {
You can’t perform that action at this time.
0 commit comments