File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
plugin/azure_active_directory/src Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 88api_protect_course_script (true );
99api_block_anonymous_users ();
1010GradebookUtils::block_students ();
11+
12+ if (isset ($ _GET ['import ' ])) {
13+ $ queryString = $ _SERVER ['QUERY_STRING ' ];
14+ $ webPath = api_get_path (WEB_CODE_PATH );
15+ $ newUrl = $ webPath . 'gradebook/gradebook_view_result.php ' ;
16+ if (!empty ($ queryString )) {
17+ $ newUrl .= '? ' . $ queryString ;
18+ }
19+ header ("Location: $ newUrl " );
20+ exit ;
21+ }
1122
1223$ selectEval = isset ($ _GET ['selecteval ' ]) ? (int ) $ _GET ['selecteval ' ] : 0 ;
1324
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 ) {
Original file line number Diff line number Diff line change @@ -312,6 +312,8 @@ public function registerUser(array $azureUserInfo)
312312 $ extra ,
313313 ] = $ this ->formatUserData ($ azureUserInfo );
314314
315+ $ userInfo = api_get_user_info ($ userId );
316+
315317 $ userId = UserManager::update_user (
316318 $ userId ,
317319 $ firstNme ,
@@ -323,7 +325,7 @@ public function registerUser(array $azureUserInfo)
323325 STUDENT ,
324326 null ,
325327 $ phone ,
326- null ,
328+ $ userInfo [ ' picture_uri ' ] ,
327329 null ,
328330 $ active ,
329331 null ,
You can’t perform that action at this time.
0 commit comments