Index: lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/glossary/lib.php,v
retrieving revision 1.193.2.20
diff -u -r1.193.2.20 lib.php
--- lib.php 27 Feb 2009 12:58:00 -0000 1.193.2.20
+++ lib.php 17 Apr 2009 06:12:04 -0000
@@ -1,4 +1,4 @@
-showall) {
$strallentries = get_string("allentries", "glossary");
if ( $hook == 'ALL' ) {
- echo "$strallentries";
+ echo "
$strallentries"; //dlnsk %%22%%
} else {
$strexplainall = strip_tags(get_string("explainall","glossary"));
- echo "wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=ALL\">$strallentries";
+ echo "
wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=ALL\">$strallentries"; //dlnsk %%22%%
}
}
}
@@ -1334,10 +1334,10 @@
if ( $glossary->showspecial) {
$strspecial = get_string("special", "glossary");
if ( $hook == 'SPECIAL' ) {
- echo "$strspecial | ";
+ echo "$strspecial"; //dlnsk %%22%%
} else {
$strexplainspecial = strip_tags(get_string("explainspecial","glossary"));
- echo "wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=SPECIAL\">$strspecial | ";
+ echo "wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=SPECIAL\">$strspecial"; //dlnsk %%22%%
}
}
}
@@ -1345,7 +1345,21 @@
function glossary_print_alphabet_links($cm, $glossary, $mode, $hook, $sortkey, $sortorder) {
global $CFG;
if ( $glossary->showalphabet) {
- $alphabet = explode(",", get_string("alphabet"));
+ // English alphabet added to national. Supporting only v1.6 and higher (dlnsk %%22%%)
+ $langs[] = current_language();
+ $langs[] = "en_utf8";
+ $langs = array_flip($langs);
+ foreach ($langs as $k=>$v) {
+ $alphabet = array();
+ if ($k == 'en_utf8') {
+ $string = array();
+ include($CFG->dirroot.'/lang/en_utf8/langconfig.php');
+ $alphabet = explode(",", $string['alphabet']);
+ unset($string);
+ } else {
+ $alphabet = explode(",", get_string("alphabet"));
+ }
+ echo "
";
$letters_by_line = 14;
for ($i = 0; $i < count($alphabet); $i++) {
if ( $hook == $alphabet[$i] and $hook) {
@@ -1354,11 +1368,14 @@
echo "wwwroot/mod/glossary/view.php?id=$cm->id&mode=$mode&hook=".urlencode($alphabet[$i])."&sortkey=$sortkey&sortorder=$sortorder\">$alphabet[$i]";
}
if ((int) ($i % $letters_by_line) != 0 or $i == 0) {
- echo ' | ';
+ if ($i != count($alphabet)-1){ //dlnsk %%22%%
+ echo ' | ';
+ }
} else {
echo '
';
}
}
+ }
}
}
@@ -2005,7 +2022,7 @@
while ($pagenum <= $pageto) {
$pagetoshow = $pagenum +1;
if ($pagenum == $page && !$specialselected) {
- $code .= "$separator$pagetoshow";
+ $code .= "$separator$pagetoshow";
} else {
$code .= "$separator$pagetoshow";
}
@@ -2025,7 +2042,7 @@
if ($showspecial) {
$code .= '
';
if ($specialselected) {
- $code .= "$specialtext";
+ $code .= $specialtext;
} else {
$code .= "$separator$specialtext";
}