I am writing a php script and I used existing code one of the line in code is like this.
if ($courseid == SITEID)
and in other case I have difficult time to understand following line.
$allowedroles = get_assignable_roles(context_system::instance(), ROLENAME_SHORT);
As I am not running my script from browser, but it will run in cron job and I am not sure how to get context_system::instance() and SITEID value.
Any help will really appreciated.