mirror of
https://github.com/moodle/moodle.git
synced 2025-02-06 08:10:11 +01:00
c76e673ab5
- Removing more notices when debug is ON - Added a new feature: Now the entries have a default approval status... Not approved entries are shown on a teachers-only frame from which they can be approved or not prior to be visible by everyone.
39 lines
1.5 KiB
PHP
39 lines
1.5 KiB
PHP
<?PHP // $Id$
|
|
|
|
function glossary_print_entry_by_format($course, $cm, $glossary, $entry,$tab="",$cat="") {
|
|
global $THEME, $USER;
|
|
|
|
if ( $entry ) {
|
|
$colour = $THEME->cellheading2;
|
|
|
|
echo "\n<table border=1 cellspacing=0 width=95% valign=top cellpadding=10>";
|
|
|
|
echo "\n<tr>";
|
|
echo "<td width=100% bgcolor=\"$colour\">";
|
|
$entry->course = $course->id;
|
|
if ( $tab == GLOSSARY_APPROVAL_VIEW ) {
|
|
echo "<a title=\"" . get_string("approve","glossary"). "\" href=\"approve.php?id=$cm->id&eid=$entry->id&tab=$tab\"><IMG align=\"right\" src=\"check.gif\" border=0 width=\"34\" height=\"34\"></a>";
|
|
}
|
|
if ($entry->attachment) {
|
|
echo "<table border=0 align=right><tr><td>";
|
|
echo glossary_print_attachments($entry, "html");
|
|
echo "</td></tr></table>";
|
|
}
|
|
echo "<b>" . get_string("question","glossary") . ":</b> $entry->concept<br>";
|
|
echo " <font size=1>".get_string("lastedited").": ".userdate($entry->timemodified)."</font></tr>";
|
|
echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\">";
|
|
echo "<b>" . get_string("answer","glossary") . ":</b> " . format_text($entry->definition, $entry->format);
|
|
|
|
glossary_print_entry_icons($course, $cm, $glossary, $entry, $tab, $cat);
|
|
echo "</td></tr></table>\n";
|
|
|
|
} else {
|
|
echo "<center>";
|
|
print_string("noentry", "glossary");
|
|
echo "</center>";
|
|
}
|
|
|
|
}
|
|
|
|
?>
|