$dir_name = $curdirpath . $added_slash . api_replace_dangerous_char($post_dir_name); $dir_name = disable_dangerous_file($dir_name); $dir_check = $base_work_dir . $dir_name; $visibility = empty($groupId) ? null : 1; $newFolderData = create_unexisting_directory($courseInfo, api_get_user_id(), $sessionId, $groupId, $to_user_id, $base_work_dir, $dir_name, $post_dir_name, $visibility); if (!empty($newFolderData)) { $message = Display::return_message(get_lang('DirCr') . ' ' . $newFolderData['title'], 'confirmation'); } else { $message = Display::return_message(get_lang('CannotCreateDir'), 'error'); } } Display::addFlash($message); } // Show them the form for the directory name if (isset($_GET['createdir'])) { $dirForm = DocumentManager::create_dir_form($document_id); } } /* VISIBILITY COMMANDS */ if ($is_allowed_to_edit) { if (isset($_GET['set_invisible']) && !empty($_GET['set_invisible']) || isset($_GET['set_visible']) && !empty($_GET['set_visible'])) { // Make visible or invisible? if (isset($_GET['set_visible'])) { $update_id = intval($_GET['set_visible']); $visibility_command = 'visible'; } else { $update_id = intval($_GET['set_invisible']); $visibility_command = 'invisible'; } if (!$is_allowed_to_edit) { if (api_is_coach()) {