original_string: public function get_overall_feedback_attachments() {
  
          if ($this->workshop->overallfeedbackmode == 0) {
              return false;
          }
  
          if ($this->workshop->overallfeedbackfiles == 0) {
              return false;
          }
  
          if (empty($this->feedbackauthorattachment)) {
              return array();
          }
  
          $attachments = array();
          $fs = get_file_storage();
          $files = $fs->get_area_files($this->workshop->context->id, 'mod_workshop', 'overallfeedback_attachment', $this->id);
          foreach ($files as $file) {
              if ($file->is_directory()) {
                  continue;
              }
              $filepath = $file->get_filepath();
              $filename = $file->get_filename();
              $fileurl = moodle_url::make_pluginfile_url($this->workshop->context->id, 'mod_workshop',
                  'overallfeedback_attachment', $this->id, $filepath, $filename, true);
              $previewurl = new moodle_url(moodle_url::make_pluginfile_url($this->workshop->context->id, 'mod_workshop',
                  'overallfeedback_attachment', $this->id, $filepath, $filename, false), array('preview' => 'bigthumb'));
              $attachments[] = (object)array(
                  'filepath' => $filepath,
                  'filename' => $filename,
                  'fileurl' => $fileurl,
                  'previewurl' => $previewurl,
                  'mimetype' => $file->get_mimetype(),
  
              );
          }
  
          return $attachments;
      }
code: public function get_overall_feedback_attachments() {
  
          if ($this->workshop->overallfeedbackmode == 0) {
              return false;
          }
  
          if ($this->workshop->overallfeedbackfiles == 0) {
              return false;
          }
  
          if (empty($this->feedbackauthorattachment)) {
              return array();
          }
  
          $attachments = array();
          $fs = get_file_storage();
          $files = $fs->get_area_files($this->workshop->context->id, 'mod_workshop', 'overallfeedback_attachment', $this->id);
          foreach ($files as $file) {
              if ($file->is_directory()) {
                  continue;
              }
              $filepath = $file->get_filepath();
              $filename = $file->get_filename();
              $fileurl = moodle_url::make_pluginfile_url($this->workshop->context->id, 'mod_workshop',
                  'overallfeedback_attachment', $this->id, $filepath, $filename, true);
              $previewurl = new moodle_url(moodle_url::make_pluginfile_url($this->workshop->context->id, 'mod_workshop',
                  'overallfeedback_attachment', $this->id, $filepath, $filename, false), array('preview' => 'bigthumb'));
              $attachments[] = (object)array(
                  'filepath' => $filepath,
                  'filename' => $filename,
                  'fileurl' => $fileurl,
                  'previewurl' => $previewurl,
                  'mimetype' => $file->get_mimetype(),
  
              );
          }
  
          return $attachments;
      }
code_tokens: public function get_overall_feedback_attachments ( ) { if ( $ this -> workshop -> overallfeedbackmode == 0 ) { return false ; } if ( $ this -> workshop -> overallfeedbackfiles == 0 ) { return false ; } if ( empty ( $ this -> feedbackauthorattachment ) ) { return array ( ) ; } $ attachments = array ( ) ; $ fs = get_file_storage ( ) ; $ files = $ fs -> get_area_files ( $ this -> workshop -> context -> id , 'mod_workshop' , 'overallfeedback_attachment' , $ this -> id ) ; foreach ( $ files as $ file ) { if ( $ file -> is_directory ( ) ) { continue ; } $ filepath = $ file -> get_filepath ( ) ; $ filename = $ file -> get_filename ( ) ; $ fileurl = moodle_url :: make_pluginfile_url ( $ this -> workshop -> context -> id , 'mod_workshop' , 'overallfeedback_attachment' , $ this -> id , $ filepath , $ filename , true ) ; $ previewurl = new moodle_url ( moodle_url :: make_pluginfile_url ( $ this -> workshop -> context -> id , 'mod_workshop' , 'overallfeedback_attachment' , $ this -> id , $ filepath , $ filename , false ) , array ( 'preview' => 'bigthumb' ) ) ; $ attachments [ ] = ( object ) array ( 'filepath' => $ filepath , 'filename' => $ filename , 'fileurl' => $ fileurl , 'previewurl' => $ previewurl , 'mimetype' => $ file -> get_mimetype ( ) , ) ; } return $ attachments ; }
docstring: Prepares the list of overall feedback attachments
  
  Returns false if overall feedback attachments are not allowed. Otherwise returns
  list of attachments (may be empty).
  
  @return bool|array of stdClass
docstring_tokens: Prepares the list of overall feedback attachments