Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/glossary/formats/faq/faq_format.php
Go to the documentation of this file.
00001 <?php
00002 
00003 function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $aliases=true) {
00004     global $USER;
00005     if ( $entry ) {
00006 
00007         echo '<table class="glossarypost faq" cellspacing="0">';
00008 
00009         echo '<tr valign="top">';
00010         echo '<th class="entryheader">';
00011         $entry->course = $course->id;
00012 
00013         echo '<div class="concept">' . get_string('question','glossary') . ': ';
00014         glossary_print_entry_concept($entry);
00015         echo '</div>';
00016 
00017         echo '<span class="time">('.get_string('lastedited').': '.
00018              userdate($entry->timemodified).')</span>';
00019         echo '</th>';
00020         echo '<td class="entryattachment">';
00021 
00022         glossary_print_entry_approval($cm, $entry, $mode);
00023         glossary_print_entry_attachment($entry, $cm, 'html', 'right');
00024         echo '</td>';
00025 
00026         echo '</tr>';
00027 
00028         echo "\n<tr>";
00029         echo '<td colspan="2" class="entry">';
00030         echo '<b>'.get_string('answer','glossary').':</b> ';
00031 
00032         glossary_print_entry_definition($entry, $glossary, $cm);
00033 
00034         echo '</td></tr>';
00035         echo '<tr valign="top"><td colspan="3" class="entrylowersection">';
00036         glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases);
00037         echo '</td></tr></table>';
00038 
00039     } else {
00040         echo '<div style="text-align:center">';
00041         print_string('noentry', 'glossary');
00042         echo '</div>';
00043     }
00044 }
00045 
00046 function glossary_print_entry_faq($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1) {
00047 
00048     //The print view for this format is exactly the normal view, so we use it
00049 
00050     //Take out autolinking in definitions un print view
00051     $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
00052 
00053     //Call to view function (without icons, ratings and aliases) and return its result
00054     return glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
00055 
00056 }
00057 
00058 
 All Data Structures Namespaces Files Functions Variables Enumerations