if ($instance->name == $enrolmethod)
should be
if ($instance->enrol == $enrolmethod)
and
if ($manualinstance !== null)
should be
if ($manualinstance == null)
"name" field in the the enrol table have null values. I'm using (2.8)
if ($instance->name == $enrolmethod)
should be
if ($instance->enrol == $enrolmethod)
and
if ($manualinstance !== null)
should be
if ($manualinstance == null)
"name" field in the the enrol table have null values. I'm using (2.8)