Hi friends...
I have the next problem...
In the front end i have the avaible course, each one with the name of courses and teacher's name.
My problem is when i click it in one course i need to get the name of course and the teacher and put this information in the header of moodle.
I have the course name but i can't get the name of teacher.
In the header i put this query
$nombrecurso = $PAGE->course->fullname;
$teacher_name = $DB->get_recordset_sql("SELECT ldm_user.id, ldm_course.newsitems, ldm_user.firstname, ldm_user.lastname, ldm_course.shortname, ldm_course.fullname
FROM ldm_user, ldm_course WHERE ldm_course.fullname = '$nombrecurso'");
foreach($teacher_name as $teacher){
echo "Asesor(a):". $teacher->firstname; echo " ".$teacher->lastname ;
};
I'm using moodle 2.7
Somebody can help me please...