wwwroot/login/index.php"); } else { if (!isteacheredit($to)) { error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } } } else { if (!isadmin()) { error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php"); } } //Check site if (!$site = get_site()) { error("Site not found!"); } $errorstr = ''; if (!empty($SESSION->restore->importing)) { define('RESTORE_SILENTLY',true); } $status = restore_precheck($id,$file,$errorstr); if (!$status) { error("An error occured"); } ?>