Browse the glossary by more than one alphabet

Re: Browse the glossary by more than one alphabet

by El Fot -
Number of replies: 0

OK i think i found the quickest possible workaround for this problem (tested and working on moodle 1.9.17).

Pros/Cons:

+No mod/plugin installation

+reliable and safe if you do it right

-you must mess with moodle's php source

-takes 5mins from your time

 

Ok i wanted to add the Greek alphabet in our Glossaries. 

So on your server go to moodle/mod/glossary and open the lib.php file.

Find this (line 1394)

$alphabet = explode(",", get_string("alphabet")); 

and replace it with 

$alphabet = explode(",", 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω'); 

In other words you just replace the variable alphabet (english alphabet - located in moodle/lang/en_utf8/langconfig.php) with a string generated by yourself. Advantadges are that you dont mess with any variables and do no harm on your installation even if you are inexperienced with php programming.

Obviously you use your language's characters instead of greek (always seperated by commas).

I also changed the $letters_by_line = 14; to $letters_by_line = 25; to get a symmetrical and beautiful alphabet listing. The outcome is something like this:

Edited Glossary Alphabet