예제 #1
0
function restore_read_xml_roles($xml_file)
{
    //We call the main read_xml function, with todo = ROLES
    $info = restore_read_xml($xml_file, "ROLES", false);
    return $info;
}
예제 #2
0
function restore_create_local_coursedata($restore, $xml_file)
{
    global $CFG;
    if (!file_exists($CFG->dirroot . '/local/lib.php')) {
        return true;
    }
    require_once $CFG->dirroot . '/local/lib.php';
    if (!function_exists('local_course_restore_createdata')) {
        return true;
    }
    if (!defined('RESTORE_SILENTLY')) {
        echo "<li>" . get_string("creatinglocalcoursedata");
    }
    $info = restore_read_xml($xml_file, 'LOCAL', false);
    return local_course_restore_createdata($restore->course_id, $info);
}