public static function send_export_xml($roleid) {
        global $CFG, $DB;
        require_once($CFG->libdir . '/filelib.php');

        $role = $DB->get_record('role', array('id'=>$roleid), '*', MUST_EXIST);

        if ($role->shortname) {
            $filename = $role->shortname.'.xml';
        } else {
            $filename = 'role.xml';
        }
        $xml = self::get_export_xml($roleid);
        send_file($xml, $filename, 0, false, true, true);
        die();
    }