} else { foreach ($scormTree as $organization) { switch ($organization["data"]["identifier"]) { case "DATA": if (isset($organization["items"][0]["data"]["url"])) { $filepath = $unzip_dir . '/' . clean_param($organization["items"][0]["data"]["url"], PARAM_PATH); if (is_file($filepath)) { import_user_description($filepath); } } break; case "PORTFOLIO": import_structure($unzip_dir, $organization["items"], $course); break; default: import_files($unzip_dir, $organization["items"]); break; } } } } } else { error(get_string("couldntextractscormfile", "block_exabis_eportfolio")); } } else { error(get_string("couldntcreatetempdir", "block_exabis_eportfolio")); } } else { error(get_string("couldntcreatetempdir", "block_exabis_eportfolio")); } } else {
if (!function_exists("posix_getuid")) { echo "posix_getuid !! not exists\n"; } if (posix_getuid() != 0) { die("Cannot be used in web server mode\n\n"); } include_once dirname(__FILE__) . '/ressources/class.templates.inc'; include_once dirname(__FILE__) . '/ressources/class.mysql.inc'; include_once dirname(__FILE__) . '/framework/class.unix.inc'; include_once dirname(__FILE__) . "/framework/frame.class.inc"; include_once dirname(__FILE__) . "/ressources/class.user.inc"; if (preg_match("#--verbose#", implode(" ", $argv))) { $GLOBALS["VERBOSE"] = true; } if ($argv[1] == "--files") { import_files(); die; } if ($argv[1] == "--accounts") { accounts(); die; } if ($argv[1] == "--member") { member($argv[2]); die; } if ($argv[1] == "--check") { checkTask($argv[2]); die; } function import_files()