Show teacher names in courses

Show teacher names in courses

by Nguyen Khanh Luong -
Number of replies: 5

I want to display all teacher names under course name in the Course Overview.

Can anyone tell me which files I have to edit? I already have some PHP knowledge.

Thanks in advance

Attachment Capture.PNG
Average of ratings: -
In reply to Nguyen Khanh Luong

Re: Show teacher names in courses

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Deepak's link refers to an out of date Moodle version and a different course overview block, so I'm not sure whether it will work or not. (I am not a programmer.) I don't think you can get the teacher's name to appear in the new Course overview block by default, as you have  seen, but hopefully someone can suggest a coding option if you really need it.

In reply to Nguyen Khanh Luong

Re: Show teacher names in courses

by Rahul Rai -

Hello Luong

You don't need to modify any code.

Simple Go to Site Administration > Development > Purge-all-caches.  

And click on "Purge all caches"

Then check teacher name.  


In reply to Nguyen Khanh Luong

Re: Show teacher names in courses

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

While not exactly what you want to do, Richard Oelmann initially did some work for his theme Handlebar in which it would display teachers and contact details in a special modal window for students.  

I also utilized this method for the Fordson theme and when students go to a course they can see the teacher as well as a method to contact them (email/message).

https://github.com/dbnschools/moodle-theme_fordson/blob/master/classes/output/core_renderer.php#L770-L808


The code in my link might help you gather all the information from the database for the teacher of the course and then you would need to hack the core course overview block or create your own based off that one.

Or you could decide to just include the teacher contact information on the actual course page such as what is done with Handlebar and Fordson themes.

Hope that helps get you started.

Chris