Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $aliases=true) {
4
    global $USER, $OUTPUT;
5
    if ( $entry ) {
6
 
7
        echo '<table class="glossarypost faq" cellspacing="0">';
8
 
9
        echo '<tr valign="top">';
10
        echo '<th class="entryheader">';
11
        $entry->course = $course->id;
12
 
13
        echo '<div class="concept">' . get_string('question','glossary') . ': ';
14
        glossary_print_entry_concept($entry);
15
        echo '</div>';
16
 
17
        echo '<span class="time">('.get_string('lastedited').': '.
18
             userdate($entry->timemodified).')</span>';
19
        echo '</th>';
20
        echo '<td class="entryattachment">';
21
 
22
        glossary_print_entry_approval($cm, $entry, $mode);
23
        echo '</td>';
24
 
25
        echo '</tr>';
26
 
27
        echo "\n<tr>";
28
        echo '<td colspan="2" class="entry">';
29
        echo '<b>'.get_string('answer','glossary').':</b> ';
30
 
31
        glossary_print_entry_definition($entry, $glossary, $cm);
32
        glossary_print_entry_attachment($entry, $cm, 'html');
33
 
34
        if (core_tag_tag::is_enabled('mod_glossary', 'glossary_entries')) {
35
            echo $OUTPUT->tag_list(
36
                core_tag_tag::get_item_tags('mod_glossary', 'glossary_entries', $entry->id), null, 'glossary-tags');
37
        }
38
 
39
        echo '</td></tr>';
40
        echo '<tr valign="top"><td colspan="3" class="entrylowersection">';
41
        glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases);
42
        echo '</td></tr></table>';
43
 
44
    } else {
45
        echo '<div style="text-align:center">';
46
        print_string('noentry', 'glossary');
47
        echo '</div>';
48
    }
49
}
50
 
51
function glossary_print_entry_faq($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1) {
52
 
53
    //The print view for this format is exactly the normal view, so we use it
54
 
55
    //Take out autolinking in definitions un print view
56
    $entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
57
 
58
    //Call to view function (without icons, ratings and aliases) and return its result
59
    return glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
60
 
61
}
62
 
63