original_string: protected static function export_course_requests(int $userid, \context $context) {
          global $DB;
          $sql = "SELECT cr.shortname, cr.fullname, cr.summary, cc.name AS category, cr.reason
                    FROM {course_request} cr
                    JOIN {course_categories} cc ON cr.category = cc.id
                   WHERE cr.requester = :userid";
          $params = ['userid' => $userid];
          $records = $DB->get_records_sql($sql, $params);
          if ($records) {
              writer::with_context($context)->export_data([get_string('privacy:courserequestpath', 'user')], (object) $records);
          }
      }
code: protected static function export_course_requests(int $userid, \context $context) {
          global $DB;
          $sql = "SELECT cr.shortname, cr.fullname, cr.summary, cc.name AS category, cr.reason
                    FROM {course_request} cr
                    JOIN {course_categories} cc ON cr.category = cc.id
                   WHERE cr.requester = :userid";
          $params = ['userid' => $userid];
          $records = $DB->get_records_sql($sql, $params);
          if ($records) {
              writer::with_context($context)->export_data([get_string('privacy:courserequestpath', 'user')], (object) $records);
          }
      }
code_tokens: protected static function export_course_requests ( int $ userid , \ context $ context ) { global $ DB ; $ sql = "SELECT cr.shortname, cr.fullname, cr.summary, cc.name AS category, cr.reason
                    FROM {course_request} cr
                    JOIN {course_categories} cc ON cr.category = cc.id
                   WHERE cr.requester = :userid" ; $ params = [ 'userid' => $ userid ] ; $ records = $ DB -> get_records_sql ( $ sql , $ params ) ; if ( $ records ) { writer :: with_context ( $ context ) -> export_data ( [ get_string ( 'privacy:courserequestpath' , 'user' ) ] , ( object ) $ records ) ; } }
docstring: Exports information about course requests this user made.
  
  @param  int    $userid  The user ID.
  @param  \context $context The context object
docstring_tokens: Exports information about course requests this user made .