original_string: public static function check_can_manage_data_registry($contextid = false) {
          if ($contextid) {
              $context = \context_helper::instance_by_id($contextid);
          } else {
              $context = \context_system::instance();
          }
  
          require_capability('tool/dataprivacy:managedataregistry', $context);
      }
code: public static function check_can_manage_data_registry($contextid = false) {
          if ($contextid) {
              $context = \context_helper::instance_by_id($contextid);
          } else {
              $context = \context_system::instance();
          }
  
          require_capability('tool/dataprivacy:managedataregistry', $context);
      }
code_tokens: public static function check_can_manage_data_registry ( $ contextid = false ) { if ( $ contextid ) { $ context = \ context_helper :: instance_by_id ( $ contextid ) ; } else { $ context = \ context_system :: instance ( ) ; } require_capability ( 'tool/dataprivacy:managedataregistry' , $ context ) ; }
docstring: Checks if the current user can manage the data registry at the provided id.
  
  @param int $contextid Fallback to system context id.
  @throws \required_capability_exception
  @return null
docstring_tokens: Checks if the current user can manage the data registry at the provided id .