Finally running on a roles aware Moodle, but
The users of our courseID 239 have a special feature. From within that course, they can access information on pages located outside Moodle. To ensure the security of those pages, we protect them using the moodle-security. On top of each external php-page, we incorporate following lines:
if (isset($USER->loggedin)
and ($USER->confirmed)
and ($USER->site == $CFG->wwroot)
and(!empty($USER->student[239])
|| !empty($USER->techer[239])
||!empty($USER->admin)))
{}
else
{die();}
and ($USER->confirmed)
and ($USER->site == $CFG->wwroot)
and(!empty($USER->student[239])
|| !empty($USER->techer[239])
||!empty($USER->admin)))
{}
else
{die();}
Given the new 'capability'-context, this works no longer.
Anyone have a suggestion on how to rewrite these lines?
Anyone have a suggestion on how to rewrite these lines?