public function choose_editions_coursepath_action()
 {
     if (isset($_POST['undo'])) {
         Util::jump_to('index.php?r=' . $this->link . '/show_coursepath&id_path=' . (int) $_POST['id_path']);
     }
     $courses = explode(',', Get::req('courses_list', DOTY_MIXED, ''));
     $_to_add = explode(',', Get::req('users_to_add', DOTY_MIXED, ''));
     $_to_del = explode(',', Get::req('users_to_del', DOTY_MIXED, ''));
     $id_path = Get::req('id_path', DOTY_INT, 0);
     $classrooms = Get::req('classrooms', DOTY_MIXED, array());
     $editions = Get::req('editions', DOTY_MIXED, array());
     require_once _lms_ . '/lib/lib.coursepath.php';
     require_once _lms_ . '/lib/lib.course.php';
     $path_man = new CoursePath_Manager();
     foreach ($courses as $id_course) {
         $res = true;
         $docebo_course = new DoceboCourse($id_course);
         $level_idst =& $docebo_course->getCourseLevel($id_course);
         if (count($level_idst) == 0 || $level_idst[1] == '') {
             $level_idst =& $docebo_course->createCourseLevel($id_course);
         }
         foreach ($_to_add as $id_user) {
             $level = 3;
             //student
             $waiting = false;
             //$this->acl_man->addToGroup($level_idst[$level], $id_user);
             $this->_addToCourseGroup($level_idst[$level], $id_user);
             $this->model->id_course = $id_course;
             if (isset($classrooms[$id_course])) {
                 $this->model->id_date = $classrooms[$id_course];
             }
             if (isset($editions[$id_course])) {
                 $this->model->id_edition = $editions[$id_course];
             }
             if (!$this->model->subscribeUser($id_user, $level, $waiting)) {
                 $res = false;
             }
         }
     }
     if ($res) {
         $res = $path_man->subscribeUserToCoursePath($id_path, $_to_add);
     }
     Util::jump_to('index.php?r=' . $this->link . '/show_coursepath&id_path=' . (int) $_POST['id_path'] . '&res=' . $res);
 }