I have a quick question about auto-linking with the database module. I have entries in the database for classes taught by professors at my university. Elsewhere in the same course I have a page with text introducing curriculum, registration processes, etc. The teacher's names link to the entries in the database, as I want, but it was just pointed out that when a teacher has more than one entry in the database (they teach more than one course) the link only points to one entry.
Is there a way to have the link go to a list of all the entries with that teacher's name...? It seems like this should be possible but I cannot find a setting that would allow me to set it up.
Adding a little to this inquiry:
What I want to accomplish is the same thing that can be accomplished by using the "Advanced search" function in the database. It's just that I want the auto-link to return all applicable entries (in list view) instead of just the 1st one it finds, which is what I suspect it is doing.
Yes, the 'Auto-linking' can only link to ONE entry.
I presume that you are using a 'Teacher's name' and a text field for your auto-linking, and you have more than one entries with the SAME name field. It may not work as you expected.
To work around this, you can try to only enter one unique entry for on teacher's name. In this entry, list all links to their courses. Each link can be one Database entry in the same Database (or any other Web page). Like this:
1. Teacher John Add Entry 0, in the text field, he enters "John", in the Textarea field, he will enter a list of links.
2. Teacher John Add Entry 1, in the text field, he enters "John's course101 intro", in the Textarea field, he will enter a long intro about course101.
3. Teacher John Add Entry 2, in the text field, he enters "John's course202 intro", in the Textarea field, he will enter a long intro about course202.
4. John repeats step 2 and 3 for all of his courses
5. Enable auto-linking to Database entry and all text 'John' will link to his Entry 0 which can be the "Index page" or a "TOC(Table of Content) page". (You can also use a Glossary entry as the TOC, and enable Auto-linking to Glossary if you don't want to use the same Database template for TOC and Course Intro)
Thank you for your response and for this clever workaround. Unfortunately, I think I'm going to go the route of simply turning off auto-linking (unfortunately) as we will have students navigating to the database from various pathways and the workaround might make their experience, if they use the advanced search for example, confusing.
I haven't looked at the code specific to auto-linking but wonder how hard it would be to adjust it to return the same thing the advanced search does...it's not something I have the time to do at the moment though so I'll put it on my long list of things to look into when I find time (or maybe I should say "if").
Thanks again for your help and support.
You could use the Database tag input field type plugin - https://moodle.org/plugins/datafield_tag
Works a treat - see http://practicelearning.info/mod/data/view.php?id=258 for a working example. Click on an author's name and it will show you all entries for that author.