Hi,
is there any build in PHP function in Moodle 2.5.2, which can be used to find out what roles posses the logged in user? I need to have this functionality already on the mainpage and not in course, therefore such function such aus has_capability() does not help me in this case.
I want to find out, whether the logged in person have only the student rights.
It should be something in this direction:
if (isteacher() || isadmin() || isteacherinanycourse()) {
print <a target="_blank" href="File.pdf">Link visible only for Teachers</a>
}
else
{
print <a target="_blank" href="File2.pdf">Link visible only for Students</a>
}
?>
Thank you in advance for help with this.
Paul