audio if (!is_dir($currentCourseRepositorySys."document/audio")) { mkdir($currentCourseRepositorySys."document/audio", $perm); insert_db($db_name, "audio", get_lang('Audio')); } //document > flash if (!is_dir($currentCourseRepositorySys."document/flash")) { mkdir($currentCourseRepositorySys."document/flash", $perm); insert_db($db_name,"flash",get_lang('Flash')); } //document > images if (!is_dir($currentCourseRepositorySys."document/images")) { mkdir($currentCourseRepositorySys."document/images", $perm); insert_db($db_name,"images",get_lang('Images')); } //document > video if (!is_dir($currentCourseRepositorySys."document/video")) { mkdir($currentCourseRepositorySys."document/video", $perm); insert_db($db_name,"video",get_lang('Video')); } //document > video > flv if (!is_dir($currentCourseRepositorySys."document/video/flv")) { mkdir($currentCourseRepositorySys."document/video/flv", $perm); insert_db($db_name,"video",get_lang('Video')." (flv)"); } //FOLDER UPLOAD //upload if (!is_dir($currentCourseRepositorySys."upload")) { mkdir($currentCourseRepositorySys."upload", $perm); } //upload > blog if (!is_dir($currentCourseRepositorySys."upload/blog")) { mkdir($currentCourseRepositorySys."upload/blog", $perm); } //upload > forum if (!is_dir($currentCourseRepositorySys."upload/forum")) { mkdir($currentCourseRepositorySys."upload/forum", $perm); } //upload > test if (!is_dir($currentCourseRepositorySys."upload/test")) { mkdir($currentCourseRepositorySys."upload/test", $perm); } //Updating index file in courses directories to change claroline/ into main/ $content = ''; unlink($currentCourseRepositorySys.'index.php'); $fp = @ fopen($currentCourseRepositorySys.'index.php', 'w'); if ($fp) { error_log('Writing redirection file in '.$currentCourseRepositorySys.'index.php', 0); fwrite($fp, $content); fclose($fp); } else { error_log('Could not open file '.$currentCourseRepositorySys.'index.php', 0); } } //umask($old_umask); // This function is not thread-safe. // Write the Dokeos config file write_system_config_file('../inc/conf/configuration.php'); // Write a distribution file with the config as a backup for the admin write_system_config_file('../inc/conf/configuration.dist.php'); // Write a .htaccess file in the course repository write_courses_htaccess_file($urlAppendPath); copy($updatePath.'claroline/inc/conf/add_course.conf.php', $pathForm.'main/inc/conf/add_course.conf.php'); copy($updatePath.'claroline/inc/conf/course_info.conf.php', $pathForm.'main/inc/conf/course_info.conf.php'); copy($updatePath.'claroline/inc/conf/mail.conf.php', $pathForm.'main/inc/conf/mail.conf.php'); copy($updatePath.'claroline/inc/conf/profile.conf.inc.php', $pathForm.'main/inc/conf/profile.conf.php'); error_log('Renaming '.$updatePath.'claroline/upload/users to '.$pathForm.'main/upload/users', 0); rename($updatePath.'claroline/upload/users', $pathForm.'main/upload/users'); error_log('Renaming '.$updatePath.'claroline/upload/audio to '.$pathForm.'main/upload/audio', 0); rename($updatePath.'claroline/upload/audio', $pathForm.'main/upload/audio'); error_log('Renaming '.$updatePath.'claroline/upload/images to '.$pathForm.'main/upload/images', 0); rename($updatePath.'claroline/upload/images', $pathForm.'main/upload/images'); error_log('Renaming '.$updatePath.'claroline/upload/linked_files to '.$pathForm.'main/upload/linked_files', 0); rename($updatePath.'claroline/upload/linked_files', $pathForm.'main/upload/linked_files'); error_log('Renaming '.$updatePath.'claroline/upload/video to '.$pathForm.'main/upload/video', 0); rename($updatePath.'claroline/upload/video', $pathForm.'main/upload/video'); /* if (defined('SYSTEM_INSTALLATION')) { //nothing to do this time } */ } else { echo 'You are not allowed here !'; }