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();
    }
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();
    }
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 ( ) ; }
Send role export xml file to browser.

@param int $roleid
@return void does not return, send the file to output
Send role export xml file to browser .