needing to change file area for glossary entries

needing to change file area for glossary entries

by Simon James -
Number of replies: 2
We would rather store our entries in a different file area.

At the moment glossary entries get stored within a folder named after the course 'id'. We however have added another field in the course table called 'folder' which we want to use as the identification of which folder that courses entries will be saved to (Multiple courses may go to the same folder).

So which function in glossary is needed to change the 'id' for 'folder'?

Will we need to link the tables?

Thanks in advance
Average of ratings: -
In reply to Simon James

Re: needing to change file area for glossary entries

by Simon James -
I now have found the correct function needed to change
glossary_file_area_name($entry) within lib.php

and i need to replace $cm->course (line 984) with the current courses 'folder' value
yet I can't seem to get this running.

In resource.class it seems to do it like the following....
$course = $this->course;

then i could use $course->folder

however this method doesn't seem to work within glossary anybody know how I could get this working?

In reply to Simon James

Re: needing to change file area for glossary entries

by Simon James -
It has been solved.

adding the global variable $course.