//Use this code to show author's name
//Comments: Configuration not supported
$fullname = fullname($user);
+ $by = new object();
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id.'">'.$fullname.'</a>';
$by->date = userdate($entry->timemodified);
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>' . '<br />';
echo '<tr valign="top">';
echo '<td class="entry">';
- //Use this function to print the concept
+ //Use this function to print the concept in a heading <h3>
//Comments: Configuration not supported
glossary_print_entry_concept($entry);
- //Line separator to show this template fine. :-)
- echo "<br />\n";
+ //Line separator not normally needed now.
+ //echo "<br />\n";
//Use this function to show the definition
//Comments: Configuration not supported
echo '<td class="entry">';
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,'html','right');
- echo '<span class="concept">';
+ echo '<div class="concept">';
glossary_print_entry_concept($entry);
- echo ':</span> ';
+ echo ':</div> ';
glossary_print_entry_definition($entry);
$entry->alias = '';
echo '</td></tr>';
echo '<td class="entry">';
glossary_print_entry_approval($cm, $entry, $mode);
glossary_print_entry_attachment($entry,'html','right');
- echo '<span class="concept">';
+ echo '<div class="concept">';
glossary_print_entry_concept($entry);
- echo ':</span> ';
+ echo ':</div> ';
glossary_print_entry_definition($entry);
echo '</td></tr>';
echo '<tr valign="top"><td class="entrylowersection">';
echo '</td>';
echo '<th class="entryheader">';
- echo '<span class="concept">';
+ echo '<div class="concept">';
glossary_print_entry_concept($entry);
- echo '</span>';
+ echo '</div>';
$fullname = fullname($user);
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id.'">'.$fullname.'</a>';
echo '<td class="entry">';
if ($entry) {
glossary_print_entry_approval($cm, $entry, $mode);
- echo "<span class=\"concept\"><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);\">";
+ echo "<div class=\"concept\"><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);\">";
glossary_print_entry_concept($entry);
- echo '</a></span> ';
+ echo '</a></div> ';
echo '</td><td align="right" class="entrylowersection">';
if ($printicons) {
glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print');
echo '<th class="entryheader">';
$entry->course = $course->id;
- echo '<span class="concept">' . get_string('question','glossary') . ': ';
+ echo '<div class="concept">' . get_string('question','glossary') . ': ';
glossary_print_entry_concept($entry);
- echo '</span>';
+ echo '</div>';
echo '<span class="time">('.get_string('lastedited').': '.
userdate($entry->timemodified).')</span>';
print_user_picture($user->id, $course->id, $user->picture);
echo '</td>';
- echo '<td class="entryheader">';
+ echo '<th class="entryheader">';
- echo '<span class="concept">';
+ echo '<div class="concept">';
glossary_print_entry_concept($entry);
- echo '</span><br />';
+ echo '</div>';
$fullname = fullname($user);
+ $by = new object();
$by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id.'">'.$fullname.'</a>';
$by->date = userdate($entry->timemodified);
echo '<span class="author">'.get_string('bynameondate', 'forum', $by).'</span>';
- echo '</td>';
+ echo '</th>';
echo '<td class="entryattachment">';
glossary_print_entry_approval($cm, $entry, $mode);
echo '<table class="glossarypost fullwithoutauthor" cellspacing="0">';
echo '<tr valign="top">';
- echo '<td class="entryheader">';
+ echo '<th class="entryheader">';
- echo '<span class="concept">';
+ echo '<div class="concept">';
glossary_print_entry_concept($entry);
- echo '</span><br />';
+ echo '</div>';
echo '<span class="time">('.get_string('lastedited').': '.
userdate($entry->timemodified).')</span>';
- echo '</td>';
+ echo '</th>';
echo '<td class="entryattachment">';
glossary_print_entry_approval($cm, $entry, $mode);
echo '<br /><br />';
}
+/**
+ * Print glossary concept/term as a heading <h3>
+ */
function glossary_print_entry_concept($entry) {
$options = new object();
$options->para = false;
- $text = format_text('<h3 class="nolink">' . $entry->concept . '</h3>', FORMAT_MOODLE, $options);
+ $text = format_text(print_heading($entry->concept, '', 3, 'nolink'), FORMAT_MOODLE, $options);
if (!empty($entry->highlight)) {
$text = highlight($entry->highlight, $text);
}
$pivottoshow = $currentpivot;
if ( isset($entry->userispivot) ) {
// printing the user icon if defined (only when browsing authors)
- echo '<td align="left">';
+ echo '<th align="left">';
$user = get_record("user","id",$entry->userid);
print_user_picture($user->id, $course->id, $user->picture);
}
print_heading($pivottoshow);
- echo '</th></tr></table></div>';
+ echo "</th></tr></table></div>\n";
}
}
.glossarypost .time {
font-size: 0.8em;
}
-.glossarycategoryheader h2 {
- margin: 0;
-}
+.glossarycategoryheader h2,
.glossarypost .concept h3 {
+ font-size: 1em;
margin: 0;
}
+.glossarypost div.concept h3,
+.glossarypost.continuous .concept {
+ display: inline;
+}
.glossarypost .entryheader {
font-weight: normal;
text-align: left;