original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Send role export xml file to browser.
  
  @param int $roleid
  @return void does not return, send the file to output
docstring_tokens: Send role export xml file to browser .