$installation_settings['{ALLOWTEACHERSELFREGISTRATION}'] = true_false($allowSelfRegProf); $installation_settings['{ADMINLASTNAME}'] = $adminLastName; $installation_settings['{ADMINFIRSTNAME}'] = $adminFirstName; $installation_settings['{ADMINLOGIN}'] = $loginForm; $installation_settings['{ADMINPASSWORD}'] = $passToStore; $installation_settings['{ADMINEMAIL}'] = $emailForm; $installation_settings['{ADMINPHONE}'] = $adminPhoneForm; $installation_settings['{PLATFORM_AUTH_SOURCE}'] = PLATFORM_AUTH_SOURCE; $installation_settings['{ADMINLANGUAGE}'] = $languageForm; $installation_settings['{HASHFUNCTIONMODE}'] = $encryptPassForm; load_main_database($installation_settings); //Adds the c_XXX courses tables see #3910 require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php'; drop_course_tables(); create_course_tables(); load_database_script('db_stats.sql'); $track_countries_table = "track_c_countries"; fill_track_countries_table($track_countries_table); load_database_script('db_user.sql'); locking_settings(); update_dir_and_files_permissions();
/** * Create course database and tables * * @param string courseDbName partial dbName form course table tu build real DbName * @return boolean * @author Christophe Gesche <*****@*****.**> * @author Frederic Minne <*****@*****.**> */ function install_course_database($courseDbName) { if (!create_course_database($courseDbName)) { return false; } if (!create_course_tables($courseDbName)) { return false; } if (!fill_course_properties($courseDbName)) { return false; } return true; }