Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
   1  <?php
   2  
   3  function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $aliases=true) {
   4      global $CFG, $USER, $OUTPUT;
   5  
   6  
   7      if ($entry) {
   8          echo '<table class="glossarypost fullwithoutauthor" cellspacing="0">';
   9          echo '<tr valign="top">';
  10  
  11          echo '<th class="entryheader">';
  12  
  13          echo '<div class="concept">';
  14          glossary_print_entry_concept($entry);
  15          echo '</div>';
  16  
  17          echo '<span class="time">('.get_string('lastedited').': '.
  18               userdate($entry->timemodified).')</span>';
  19          echo '</th>';
  20          echo '<td class="entryattachment">';
  21  
  22          glossary_print_entry_approval($cm, $entry, $mode);
  23          echo '</td>';
  24  
  25          echo '</tr>';
  26  
  27          echo '<tr valign="top">';
  28          echo '<td width="100%" colspan="2" class="entry">';
  29  
  30          glossary_print_entry_definition($entry, $glossary, $cm);
  31          glossary_print_entry_attachment($entry, $cm, 'html');
  32  
  33          if (core_tag_tag::is_enabled('mod_glossary', 'glossary_entries')) {
  34              echo $OUTPUT->tag_list(
  35                  core_tag_tag::get_item_tags('mod_glossary', 'glossary_entries', $entry->id), null, 'glossary-tags');
  36          }
  37  
  38          echo '</td></tr>';
  39          echo '<tr valign="top"><td colspan="2" class="entrylowersection">';
  40          glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases);
  41  
  42          echo ' ';
  43          echo '</td></tr>';
  44          echo "</table>\n";
  45      } else {
  46          echo '<center>';
  47          print_string('noentry', 'glossary');
  48          echo '</center>';
  49      }
  50  }
  51  
  52  function glossary_print_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1) {
  53  
  54      //The print view for this format is exactly the normal view, so we use it
  55  
  56      //Take out autolinking in definitions un print view
  57      $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
  58  
  59      //Call to view function (without icons, ratings and aliases) and return its result
  60      return glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
  61  
  62  }
  63  
  64