Using a single glossary in every courses, and different indexation method

Using a single glossary in every courses, and different indexation method

by Blaise Bernier -
Number of replies: 3
Hi everybody,

I have two questions.  I'm currently building a virtual community using moodle to document a 3D engine  I'm using.  In the last 6 months, we were using a simple blog system, but with the increasing demand for the website I must go to something more serious.

I'm using the Glossary module to build a cooperative reference of every available classes, methods and units in the source code, but the name of all the classes begin with the letter 'T' (TGLScene, TAVIRecorder, etc.).  I wanted to know if there was a way of indexing alphabetically with the second letter of each concept instead of the first one.

Also, I wanted to know if the glossaries I add in the main menu can beavailable through all courses (the autolink feature, I mean), because the tutorials about the way to use the 3D engine will always use these terms, so it can be usefull for the members to have a direct link to it.  Also, I wanted to know if the autolink feature is available in the glossary itself, because a class often have references to other classes, etc.  If not, I would appreciate to know if there is a workaround for this smile

thanks a lot in advance!

Bye,

Blaise Bernier
- GLScene Help Community administrator and webmaster
Average of ratings: -
In reply to Blaise Bernier

Re: Using a single glossary in every courses, and different indexation method

by Jan Dierckx -

Interesting use.

  • You can set a glossary to be 'global'. That way autolinking will work in all courses.

  • Autolinking works inside the glossary as well.

  • Glossaries are already sorted alphabetically using the complete word. All of your entries will show up inside the T section but TAVIRecorder will definitely show up before TGLScene I guess what you are looking for is a way to click on the A and be directly taken to the entries starting with TA. If you are only using the glossary to store entries beginning with T, you can add this ugly hack to /mod/glossary/view.php

    Look up the following lines in the beginning of the code...

    $page       = optional_param('page',0,PARAM_INT);      // Page to show (for paging purpouses)
    $show       = optional_param('show');        // [ concept | alias ] => mode=term hook=$show
    

    and add this right afterwards...

    if (isset($hook) && strlen($hook) == 1 && $mode=='letter') {
        $hook = 'T'.$hook;
    }
    

    This will work on all glossaries you create. If you want to use another glossary for errrr... more normal uses smile, you could add an extra if clause to check for the glossary id. That way the ugly hack would only work on the special glossary which only has entries beginning with a T. I'll have another look at it if you need it.

Average of ratings: Useful (1)
In reply to Jan Dierckx

Re: Using a single glossary in every courses, and different indexation method

by Blaise Bernier -
Hi!

Thanks a lot for your answer!

I've set the autolink for all the entries in the glossary, but yet, if I'm right there is not way i can tell it's working... Do I have to create a main glossary, so it links in every secondary? If yes, I've already created my main glossary, but i don't find how to add entries from the other glossaries. Also, to create a global glossary, Do I have only to put it on the main menu ?

For the hack, I'll look at it, because even if it's not a 'nice' way of doing so, it seems perfect to me smile

Thanks in advance,

Blaise Bernier
In reply to Blaise Bernier

Re: Using a single glossary in every courses, and different indexation method

by Jan Dierckx -

Main / secundary glossary doesn't influence autolinking. To make a glossary global check the global option (see screenshot)

I don't know why autolinking doesn't start. You have set the autolink option when adding an entry, right? Have you set autolinking to YES? (see screenshot)

BTW clicking on the question mark icon next to an option shows help for that option.

As a last resort: go to http://yourserver/yourmoodle/admin/filters.php and

  • make sure glossary autolinking is active

  • lower the text cache lifesize to see immediate results (put it to a higher value after testing)

Attachment naamloos.JPG