Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.
   1  <?php
   2  
   3  function glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $aliases=true) {
   4  
   5      global $CFG, $USER, $OUTPUT;
   6  
   7      echo '<table class="glossarypost dictionary" cellspacing="0">';
   8      echo '<tr valign="top">';
   9      echo '<td class="entry">';
  10      glossary_print_entry_approval($cm, $entry, $mode);
  11      echo '<div class="concept">';
  12      glossary_print_entry_concept($entry);
  13      echo '</div> ';
  14      glossary_print_entry_definition($entry, $glossary, $cm);
  15      glossary_print_entry_attachment($entry, $cm, 'html');
  16      if (core_tag_tag::is_enabled('mod_glossary', 'glossary_entries')) {
  17          echo $OUTPUT->tag_list(core_tag_tag::get_item_tags('mod_glossary', 'glossary_entries', $entry->id), null, 'glossary-tags');
  18      }
  19      echo '</td></tr>';
  20      echo '<tr valign="top"><td class="entrylowersection">';
  21      glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases);
  22      echo '</td>';
  23      echo '</tr>';
  24      echo "</table>\n";
  25  }
  26  
  27  function glossary_print_entry_dictionary($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1) {
  28  
  29      //The print view for this format is exactly the normal view, so we use it
  30  
  31      //Take out autolinking in definitions in print view
  32      $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
  33  
  34      //Call to view function (without icons, ratings and aliases) and return its result
  35      return glossary_show_entry_dictionary($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
  36  }
  37  
  38