hi Richard.
I place {GENERICO:type="brandedcoursetitel"} in the Course Full name, and want it to show the course title that is placed in the Metada fields in the Course administration setting when it matches the custom user profile.
To achive it I am using SQL in the template, and I do think that the answer is in it somewhere.
But I tried several things without success.
I am using in the DATASET the following SQL:
Select m.data as titel FROM mdl_local_metadata as m JOIN mdl_local_metadata_field as mf on mf. id = m.fieldid WHERE m.instanceid = ? AND mf.shortname = ?
Dataset variables : @@COURSE:id@@,@@USER:brand@@
This works fine within the course,but when the user is outside the course by example My Dashboard or My Profile page it shows {GENERICO:type="brandedcoursetitel"} instead of the expected course title.
I have tried a different SQL query, but then it only shows {GENERICO:type="brandedcoursetitel"} even within the course.
Select m.data as titel FROM mdl_local_metadata as m JOIN mdl_local_metadata_field as mf on mf. id = m.fieldid JOIN mdl_course as c on m.instance = c.id WHERE mf.shortname = ?
Dataset variables : @@USER:brand@@
Gemma