original_string: protected function export_content_leap2a(portfolio_format_leap2a_writer $leapwriter,
              workshop_submission $workshopsubmission, $html) {
  
          $entry = new portfolio_format_leap2a_entry('workshopsubmission'.$workshopsubmission->id,  s($workshopsubmission->title),
              'resource', $html);
          $entry->published = $workshopsubmission->timecreated;
          $entry->updated = $workshopsubmission->timemodified;
          $entry->author = (object)[
              'id' => $workshopsubmission->authorid,
              'email' => $workshopsubmission->authoremail
          ];
          username_load_fields_from_object($entry->author, $workshopsubmission);
  
          $leapwriter->link_files($entry, $this->multifiles);
          $entry->add_category('web', 'resource_type');
          $leapwriter->add_entry($entry);
  
          return $entry->id;
      }
code: protected function export_content_leap2a(portfolio_format_leap2a_writer $leapwriter,
              workshop_submission $workshopsubmission, $html) {
  
          $entry = new portfolio_format_leap2a_entry('workshopsubmission'.$workshopsubmission->id,  s($workshopsubmission->title),
              'resource', $html);
          $entry->published = $workshopsubmission->timecreated;
          $entry->updated = $workshopsubmission->timemodified;
          $entry->author = (object)[
              'id' => $workshopsubmission->authorid,
              'email' => $workshopsubmission->authoremail
          ];
          username_load_fields_from_object($entry->author, $workshopsubmission);
  
          $leapwriter->link_files($entry, $this->multifiles);
          $entry->add_category('web', 'resource_type');
          $leapwriter->add_entry($entry);
  
          return $entry->id;
      }
code_tokens: protected function export_content_leap2a ( portfolio_format_leap2a_writer $ leapwriter , workshop_submission $ workshopsubmission , $ html ) { $ entry = new portfolio_format_leap2a_entry ( 'workshopsubmission' . $ workshopsubmission -> id , s ( $ workshopsubmission -> title ) , 'resource' , $ html ) ; $ entry -> published = $ workshopsubmission -> timecreated ; $ entry -> updated = $ workshopsubmission -> timemodified ; $ entry -> author = ( object ) [ 'id' => $ workshopsubmission -> authorid , 'email' => $ workshopsubmission -> authoremail ] ; username_load_fields_from_object ( $ entry -> author , $ workshopsubmission ) ; $ leapwriter -> link_files ( $ entry , $ this -> multifiles ) ; $ entry -> add_category ( 'web' , 'resource_type' ) ; $ leapwriter -> add_entry ( $ entry ) ; return $ entry -> id ; }
docstring: Add a LEAP2A entry element that corresponds to a submission including attachments.
  
  @param portfolio_format_leap2a_writer $leapwriter Writer object to add entries to.
  @param workshop_submission $workshopsubmission
  @param string $html The exported HTML content of the submission
  @return int id of new entry
docstring_tokens: Add a LEAP2A entry element that corresponds to a submission including attachments .