|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00003 function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $aliases=true) { 00004 global $USER, $OUTPUT; 00005 00006 $return = false; 00007 00008 echo '<table class="glossarypost entrylist" cellspacing="0">'; 00009 00010 echo '<tr valign="top">'; 00011 echo '<td class="entry">'; 00012 if ($entry) { 00013 glossary_print_entry_approval($cm, $entry, $mode); 00014 00015 $anchortagcontents = glossary_print_entry_concept($entry, true); 00016 00017 $link = new moodle_url('/mod/glossary/showentry.php', array('courseid' => $course->id, 00018 'eid' => $entry->id, 'displayformat' => 'dictionary')); 00019 $anchor = html_writer::link($link, $anchortagcontents); 00020 00021 echo "<div class=\"concept\">$anchor</div> "; 00022 echo '</td><td align="right" class="entrylowersection">'; 00023 if ($printicons) { 00024 glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print'); 00025 } 00026 if (!empty($entry->rating)) { 00027 echo '<br />'; 00028 echo '<span class="ratings">'; 00029 $return = glossary_print_entry_ratings($course, $entry); 00030 echo '</span>'; 00031 } 00032 echo '<br />'; 00033 } else { 00034 echo '<div style="text-align:center">'; 00035 print_string('noentry', 'glossary'); 00036 echo '</div>'; 00037 } 00038 echo '</td></tr>'; 00039 00040 echo "</table>\n"; 00041 return $return; 00042 } 00043 00044 function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1) { 00045 00046 //The print view for this format is different from the normal view, so we implement it here completely 00047 global $CFG, $USER; 00048 00049 00050 //Take out autolinking in definitions un print view 00051 $entry->definition = '<span class="nolink">'.$entry->definition.'</span>'; 00052 00053 echo '<table class="glossarypost entrylist">'; 00054 echo '<tr valign="top">'; 00055 echo '<td class="entry">'; 00056 echo '<b>'; 00057 glossary_print_entry_concept($entry); 00058 echo ':</b> '; 00059 glossary_print_entry_definition($entry, $glossary, $cm); 00060 glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false); 00061 echo '</td>'; 00062 echo '</tr>'; 00063 echo "</table>\n"; 00064 } 00065 00066