Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / mod / glossary / formats / faq / faq_format.php
blob7069ca4d63eaada2f77716b58d4a04a629b84033
1 <?php // $Id$
3 function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
4 global $USER;
5 $return = false;
6 if ( $entry ) {
8 echo '<table class="glossarypost faq" cellspacing="0">';
10 echo '<tr valign="top">';
11 echo '<td class="entryheader">';
12 $entry->course = $course->id;
14 echo '<span class="concept">' . get_string('question','glossary') . ': ';
15 glossary_print_entry_concept($entry);
16 echo '</span><br />';
18 echo '<span class="time">('.get_string('lastedited').': '.
19 userdate($entry->timemodified).')</span>';
20 echo '</td>';
21 echo '<td class="entryattachment">';
23 glossary_print_entry_approval($cm, $entry, $mode);
24 glossary_print_entry_attachment($entry,'html','right');
25 echo '</td>';
27 echo '</tr>';
29 echo "\n<tr>";
30 echo '<td colspan="2" class="entry">';
31 echo '<b>'.get_string('answer','glossary').':</b> ';
33 glossary_print_entry_definition($entry);
35 echo '</td></tr>';
36 echo '<tr valign="top"><td colspan="3" class="entrylowersection">';
37 $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $ratings, $aliases);
38 echo '</td></tr></table>';
40 } else {
41 echo '<div style="text-align:center">';
42 print_string('noentry', 'glossary');
43 echo '</div>';
45 return $return;
48 function glossary_print_entry_faq($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL) {
50 //The print view for this format is exactly the normal view, so we use it
52 //Take out autolinking in definitions un print view
53 $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
55 //Call to view function (without icons, ratings and aliases) and return its result
56 return glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);