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.

Differences Between: [Versions 39 and 401]

   1  <?php
   2  
   3  function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $aliases=true) {
   4      global $USER, $OUTPUT;
   5  
   6      $return = false;
   7  
   8      echo '<table class="glossarypost entrylist" cellspacing="0">';
   9  
  10      echo '<tr valign="top">';
  11      echo '<td class="entry">';
  12      if ($entry) {
  13          glossary_print_entry_approval($cm, $entry, $mode);
  14  
  15          $anchortagcontents = glossary_print_entry_concept($entry, true);
  16  
  17          $link = new moodle_url('/mod/glossary/showentry.php', array('courseid' => $course->id,
  18                  'eid' => $entry->id, 'displayformat' => 'dictionary'));
  19          $anchor = html_writer::link($link, $anchortagcontents);
  20  
  21          echo "<div class=\"concept\">$anchor</div> ";
  22          echo '</td><td align="right" class="entrylowersection">';
  23          if ($printicons) {
  24              glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print');
  25          }
  26          if (!empty($entry->rating)) {
  27              echo '<br />';
  28              echo '<span class="ratings d-block pt-3">';
  29              $return = glossary_print_entry_ratings($course, $entry);
  30              echo '</span>';
  31          }
  32          echo '<br />';
  33      } else {
  34          echo '<div style="text-align:center">';
  35          print_string('noentry', 'glossary');
  36          echo '</div>';
  37      }
  38      echo '</td></tr>';
  39  
  40      echo "</table>";
  41      echo "<hr>\n";
  42      return $return;
  43  }
  44  
  45  function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1) {
  46      //Take out autolinking in definitions un print view
  47      // TODO use <nolink> tags MDL-15555.
  48      $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
  49  
  50      echo html_writer::start_tag('table', array('class' => 'glossarypost entrylist mod-glossary-entrylist'));
  51      echo html_writer::start_tag('tr');
  52      echo html_writer::start_tag('td', array('class' => 'entry mod-glossary-entry'));
  53      echo html_writer::start_tag('div', array('class' => 'mod-glossary-concept'));
  54      glossary_print_entry_concept($entry);
  55      echo html_writer::end_tag('div');
  56      echo html_writer::start_tag('div', array('class' => 'mod-glossary-definition'));
  57      glossary_print_entry_definition($entry, $glossary, $cm);
  58      echo html_writer::end_tag('div');
  59      echo html_writer::start_tag('div', array('class' => 'mod-glossary-lower-section'));
  60      glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false);
  61      echo html_writer::end_tag('div');
  62      echo html_writer::end_tag('td');
  63      echo html_writer::end_tag('tr');
  64      echo html_writer::end_tag('table');
  65  }
  66  
  67