original_string: protected static function fill_entry_details($entry, $context) {
          global $PAGE;
          $canviewfullnames = has_capability('moodle/site:viewfullnames', $context);
  
          // Format concept and definition.
          $entry->concept = external_format_string($entry->concept, $context->id);
          list($entry->definition, $entry->definitionformat) = external_format_text($entry->definition, $entry->definitionformat,
              $context->id, 'mod_glossary', 'entry', $entry->id);
  
          // Author details.
          $user = mod_glossary_entry_query_builder::get_user_from_record($entry);
          $userpicture = new user_picture($user);
          $userpicture->size = 1;
          $entry->userfullname = fullname($user, $canviewfullnames);
          $entry->userpictureurl = $userpicture->get_url($PAGE)->out(false);
  
          // Fetch attachments.
          $entry->attachment = !empty($entry->attachment) ? 1 : 0;
          $entry->attachments = array();
          if ($entry->attachment) {
              $entry->attachments = external_util::get_area_files($context->id, 'mod_glossary', 'attachment', $entry->id);
          }
          $definitioninlinefiles = external_util::get_area_files($context->id, 'mod_glossary', 'entry', $entry->id);
          if (!empty($definitioninlinefiles)) {
              $entry->definitioninlinefiles = $definitioninlinefiles;
          }
  
          $entry->tags = \core_tag\external\util::get_item_tags('mod_glossary', 'glossary_entries', $entry->id);
      }
code: protected static function fill_entry_details($entry, $context) {
          global $PAGE;
          $canviewfullnames = has_capability('moodle/site:viewfullnames', $context);
  
          // Format concept and definition.
          $entry->concept = external_format_string($entry->concept, $context->id);
          list($entry->definition, $entry->definitionformat) = external_format_text($entry->definition, $entry->definitionformat,
              $context->id, 'mod_glossary', 'entry', $entry->id);
  
          // Author details.
          $user = mod_glossary_entry_query_builder::get_user_from_record($entry);
          $userpicture = new user_picture($user);
          $userpicture->size = 1;
          $entry->userfullname = fullname($user, $canviewfullnames);
          $entry->userpictureurl = $userpicture->get_url($PAGE)->out(false);
  
          // Fetch attachments.
          $entry->attachment = !empty($entry->attachment) ? 1 : 0;
          $entry->attachments = array();
          if ($entry->attachment) {
              $entry->attachments = external_util::get_area_files($context->id, 'mod_glossary', 'attachment', $entry->id);
          }
          $definitioninlinefiles = external_util::get_area_files($context->id, 'mod_glossary', 'entry', $entry->id);
          if (!empty($definitioninlinefiles)) {
              $entry->definitioninlinefiles = $definitioninlinefiles;
          }
  
          $entry->tags = \core_tag\external\util::get_item_tags('mod_glossary', 'glossary_entries', $entry->id);
      }
code_tokens: protected static function fill_entry_details ( $ entry , $ context ) { global $ PAGE ; $ canviewfullnames = has_capability ( 'moodle/site:viewfullnames' , $ context ) ; // Format concept and definition. $ entry -> concept = external_format_string ( $ entry -> concept , $ context -> id ) ; list ( $ entry -> definition , $ entry -> definitionformat ) = external_format_text ( $ entry -> definition , $ entry -> definitionformat , $ context -> id , 'mod_glossary' , 'entry' , $ entry -> id ) ; // Author details. $ user = mod_glossary_entry_query_builder :: get_user_from_record ( $ entry ) ; $ userpicture = new user_picture ( $ user ) ; $ userpicture -> size = 1 ; $ entry -> userfullname = fullname ( $ user , $ canviewfullnames ) ; $ entry -> userpictureurl = $ userpicture -> get_url ( $ PAGE ) -> out ( false ) ; // Fetch attachments. $ entry -> attachment = ! empty ( $ entry -> attachment ) ? 1 : 0 ; $ entry -> attachments = array ( ) ; if ( $ entry -> attachment ) { $ entry -> attachments = external_util :: get_area_files ( $ context -> id , 'mod_glossary' , 'attachment' , $ entry -> id ) ; } $ definitioninlinefiles = external_util :: get_area_files ( $ context -> id , 'mod_glossary' , 'entry' , $ entry -> id ) ; if ( ! empty ( $ definitioninlinefiles ) ) { $ entry -> definitioninlinefiles = $ definitioninlinefiles ; } $ entry -> tags = \ core_tag \ external \ util :: get_item_tags ( 'mod_glossary' , 'glossary_entries' , $ entry -> id ) ; }
docstring: Fill in an entry object.
  
  This adds additional required fields for the external function to return.
  
  @param  stdClass $entry   The entry.
  @param  context  $context The context the entry belongs to.
  @return void
docstring_tokens: Fill in an entry object .