Browse Source

Dont unregister teacher course when adding user in course with csv import

Hubert Borderiou 11 years ago
parent
commit
a39abd0f0d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      main/user/user_import.php

+ 2 - 2
main/user/user_import.php

@@ -46,7 +46,7 @@ if ($form->validate()) {
     if (isset($_FILES['import_file']['size']) && $_FILES['import_file']['size'] !== 0) {
 
         $unsubscribe_users = isset($_POST['unsubscribe_users']) ? true : false;
-
+        //@todo : csv_to_array deprecated
         $users  = Import::csv_to_array($_FILES['import_file']['tmp_name']);
 
         $invalid_users  = array();
@@ -84,7 +84,7 @@ if ($form->validate()) {
                     if (!empty($current_user_list)) {
                         $user_ids = array();
                         foreach ($current_user_list as $user) {
-                            if ($user['status'] <> 1) {
+                            if (!CourseManager::is_course_teacher($user['user_id'], $course_code)) {
                                 $user_ids[]= $user['user_id'];
                             }
                         }