lsuits / lsu-gradeimport_pearson

Pearson Grade File Importer for Moodle 2
1 stars 0 forks source link

Require in lib.php breaks cron #2

Closed philcali closed 12 years ago

philcali commented 12 years ago

This line is breaking Moodle cron because it's doing a relative path require_once on config.php.

Is this line necessary at all? $CFG should already be in the global scope for anything this importer would need it for.

adamzap commented 12 years ago

I guess it's not necessary then.

Why would cron need pearson's lib file?

philcali commented 12 years ago

If lib.php exists in a grade plugin, it requires it (it looks for cron function settings, and things of that), but when it requires this one, it tries to load ../../../config.php from admin/cron.php, which is a directory higher in its relative path.

adamzap commented 12 years ago

MOODLE SUCKS

You can remove it.

philcali commented 12 years ago

Ok, I removed it and cron works as expected. See #3