original_string: public function get_reference_details($reference, $filestatus = 0) {
          if ($this->disabled) {
              throw new repository_exception('cannotdownload', 'repository');
          }
          if (empty($reference)) {
              return get_string('unknownsource', 'repository');
          }
          $source = json_decode($reference);
          $path = '';
          if (!empty($source->usesystem) && !empty($source->name)) {
              $path = $source->name;
          }
  
          return $path;
      }
code: public function get_reference_details($reference, $filestatus = 0) {
          if ($this->disabled) {
              throw new repository_exception('cannotdownload', 'repository');
          }
          if (empty($reference)) {
              return get_string('unknownsource', 'repository');
          }
          $source = json_decode($reference);
          $path = '';
          if (!empty($source->usesystem) && !empty($source->name)) {
              $path = $source->name;
          }
  
          return $path;
      }
code_tokens: public function get_reference_details ( $ reference , $ filestatus = 0 ) { if ( $ this -> disabled ) { throw new repository_exception ( 'cannotdownload' , 'repository' ) ; } if ( empty ( $ reference ) ) { return get_string ( 'unknownsource' , 'repository' ) ; } $ source = json_decode ( $ reference ) ; $ path = '' ; if ( ! empty ( $ source -> usesystem ) && ! empty ( $ source -> name ) ) { $ path = $ source -> name ; } return $ path ; }
docstring: When a controlled link is clicked in the file picker get the human readable info about this file.
  
  @param string $reference
  @param int $filestatus
  @return string
docstring_tokens: When a controlled link is clicked in the file picker get the human readable info about this file .