MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / glossary / formats / entrylist / entrylist_format.php
blob011748b93e4a31e577cfe13cd9a2464ea113566a
1 <?php // $Id$
3 function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=true) {
4 global $USER;
6 $return = false;
8 echo '<table class="glossarypost entrylist" cellspacing="0">';
10 echo '<tr valign="top">';
11 echo '<td class="entry">';
12 if ($entry) {
13 glossary_print_entry_approval($cm, $entry, $mode);
14 echo "<span class=\"concept\"><a href=\"showentry.php?courseid=$course->id&amp;eid=$entry->id&amp;displayformat=dictionary\" target=\"_blank\" onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$course->id&amp;eid=$entry->id&amp;displayformat=dictionary', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
15 glossary_print_entry_concept($entry);
16 echo '</a></span> ';
17 echo '</td><td align="right" class="entrylowersection">';
18 if ($printicons) {
19 glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print');
21 if ($ratings) {
22 echo '<br />';
23 echo '<span class="ratings">';
24 $return = glossary_print_entry_ratings($course, $entry, $ratings);
25 echo '</span>';
27 echo '<br />';
28 } else {
29 echo '<div style="text-align:center">';
30 print_string('noentry', 'glossary');
31 echo '</div>';
33 echo '</td></tr>';
35 echo "</table>\n";
36 return $return;
39 function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL) {
41 //The print view for this format is different from the normal view, so we implement it here completely
42 global $CFG, $USER;
45 //Take out autolinking in definitions un print view
46 $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
48 echo '<table class="glossarypost entrylist">';
49 echo '<tr valign="top">';
50 echo '<td class="entry">';
51 echo '<b>';
52 glossary_print_entry_concept($entry);
53 echo ':</b> ';
54 glossary_print_entry_definition($entry);
55 $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
56 echo '</td>';
57 echo '</tr>';
58 echo "</table>\n";
60 return $return;