Removing the old <nolink> tags. In some cases using both <span class="nolink">

and <nolink> together was causing some problems. (SE)
This commit is contained in:
moodler
2005-02-25 12:36:27 +00:00
parent b9795750e5
commit e19a635c98
4 changed files with 7 additions and 6 deletions
@@ -75,6 +75,7 @@ function glossary_print_entry_encyclopedia($course, $cm, $glossary, $entry, $mod
$entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
//Call to view function (without icons, ratings and aliases) and return its result
return glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
}
@@ -62,7 +62,7 @@ function glossary_print_entry_fullwithauthor($course, $cm, $glossary, $entry, $m
//The print view for this format is exactly the normal view, so we use it
//Take out autolinking in definitions un print view
$entry->definition = '<nolink>'.$entry->definition.'</nolink>';
$entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
//Call to view function (without icons, ratings and aliases) and return its result
return glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
@@ -51,7 +51,7 @@ function glossary_print_entry_fullwithoutauthor($course, $cm, $glossary, $entry,
//The print view for this format is exactly the normal view, so we use it
//Take out autolinking in definitions un print view
$entry->definition = '<nolink>'.$entry->definition.'</nolink>';
$entry->definition = '<span class="nolink">'.$entry->definition.'</span>';
//Call to view function (without icons, ratings and aliases) and return its result
return glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode, $hook, false, false, false);
+4 -4
View File
@@ -589,14 +589,14 @@ function glossary_print_entry($course, $cm, $glossary, $entry, $mode='',$hook=''
function glossary_print_entry_default ($entry) {
echo '<b>'. strip_tags($entry->concept) . ': </b>';
$options->para = false;
$definition = format_text('<nolink>' . strip_tags($entry->definition) . '</nolink>', $entry->format,$options);
$definition = format_text('<span class="nolink">' . strip_tags($entry->definition) . '</span>', $entry->format,$options);
echo ($definition);
echo '<br /><br />';
}
function glossary_print_entry_concept($entry) {
$options->para = false;
$text = format_text('<nolink>' . $entry->concept . '</nolink>', FORMAT_MOODLE, $options);
$text = format_text('<span class="nolink">' . $entry->concept . '</span>', FORMAT_MOODLE, $options);
if (!empty($entry->highlight)) {
$text = highlight($entry->highlight, $text);
}
@@ -665,8 +665,8 @@ function glossary_print_entry_definition($entry) {
}
//Put doNolinks (concept + aliases) enclosed by <nolink> tag
$definition= preg_replace($doNolinks,'<nolink>$1</nolink>',$definition);
$definition= preg_replace($doNolinks,'<span class="nolink">$1</span>',$definition);
//Restore addrs
if ( $addrs ) {
$definition = str_replace(array_keys($addrs),$addrs,$definition);