~ubuntu-branches/ubuntu/hoary/moodle/hoary

« back to all changes in this revision

Viewing changes to mod/glossary/formats/entrylist/entrylist_format.php

  • Committer: Bazaar Package Importer
  • Author(s): Isaac Clerencia
  • Date: 2004-12-29 00:49:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041229004952-gliyqzpj2w3e7clx
Tags: 1.4.3-1
* Urgency high as upstream release fixes several security bugs
* New upstream release
* Write database creation errors and warn the user about it, 
closes: #285842, #285842

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?PHP  // $Id: entrylist_format.php,v 1.1.2.2 2004/12/18 20:26:25 stronk7 Exp $
 
2
 
 
3
function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
 
4
    global $THEME, $USER;
 
5
 
 
6
    $colour = "#FFFFFF";
 
7
    $return = false;
 
8
 
 
9
    echo "\n<table border=0 cellspacing=0 width=95% valign=top cellpadding=10>";
 
10
 
 
11
    echo "\n<tr>";
 
12
    echo "<td width=100% bgcolor=\"$colour\">";
 
13
    if ($entry) {
 
14
        glossary_print_entry_approval($cm, $entry, $mode);
 
15
        echo "<b><a href=\"showentry.php?courseid=$course->id\&eid=$entry->id\&displayformat=dictionary\" target=\"_blank\" onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$course->id\&eid=$entry->id\&displayformat=dictionary', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
 
16
        glossary_print_entry_concept($entry);
 
17
        echo '</a></b> ';
 
18
 
 
19
        if ( $return = glossary_print_entry_commentslink($course, $cm, $glossary, $entry,$mode,$hook, 'html') ) {
 
20
            echo "<font size=-1>($return)</font>";
 
21
        }
 
22
 
 
23
        echo '<br />';
 
24
    } else {
 
25
        echo "<center>";
 
26
        print_string("noentry", "glossary");
 
27
        echo "</center>";
 
28
    }
 
29
    echo "</td></tr>";
 
30
 
 
31
    echo "</table>\n";
 
32
    return $return;
 
33
}
 
34
 
 
35
function glossary_print_entry_entrylist($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL) {
 
36
 
 
37
    //The print view for this format is different from the normal view, so we implement it here completely
 
38
    global $THEME, $CFG, $USER;
 
39
 
 
40
    $colour = $THEME->cellheading2;
 
41
 
 
42
    //Take out autolinking in definitions un print view
 
43
    $entry->definition = '<nolink>'.$entry->definition.'</nolink>';
 
44
 
 
45
    echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>\n";
 
46
    echo "<tr>\n";
 
47
    echo "<td width=\"100%\" valign=\"top\" bgcolor=\"#FFFFFF\">\n";
 
48
    echo "<b>";
 
49
    glossary_print_entry_concept($entry);
 
50
    echo ":</b> ";
 
51
    glossary_print_entry_definition($entry);
 
52
    $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
 
53
    echo "</td>\n";
 
54
    echo "</tr>\n";
 
55
    echo "</table>\n";
 
56
 
 
57
    return $return;
 
58
}
 
59
 
 
60
?>