-
Bug
-
Resolution: Not a bug
-
Minor
-
None
-
4.4.8
-
None
-
MOODLE_404_STABLE
Output:
Execute scheduled task: Flat file enrolment sync (enrol_flatfile\task\flatfile_sync_task)
... started 15:28:48. Current memory use 16.4 MB.
Debugging increased temporarily due to faildelay of 60
... used 298 dbqueries
... used 0.12928104400635 seconds
Scheduled task failed: Flat file enrolment sync (enrol_flatfile\task\flatfile_sync_task),Unknown named parameter $roleid
Backtrace:
- line 133 of /enrol/flatfile/lib.php: call to enrol_plugin->enrol_user()
- line 430 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->enrol_user()
- line 313 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->process_records()
- line 159 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->process_file()
- line 61 of /enrol/flatfile/classes/task/flatfile_sync_task.php: call to enrol_flatfile_plugin->sync()
- line 410 of /lib/classes/cron.php: call to enrol_flatfile\task\flatfile_sync_task->execute()
- line 194 of /admin/cli/scheduled_task.php: call to core\cron::run_inner_scheduled_task()
Hello,
Hopefully this is trivial, but after running the v4.4.8 update, the following error keeps happening preventing students from receiving a role in a course despite being successfully enrolled (sometimes). We have been steadily using Flat File enrollments for the better part of 2 years without any issues like this, and despite some changes that have since been rolled back this error seems to have cropped up since updating to v4.4.8.
Investigating those lines of the code does indicate that $roleid = null is available as a parameter, so there may be more to it than I can debug.
Additionally, I did create a very simple CSV flatfile to upload using the following parameters:
operation, role, user idnumber, course idnumber
add, student, myself, TG
And this still presented the same error. I then ran the Flat File from the CLI to see if I could trigger any additional debug information. The strange part here is that running the same Flat File enrolment twice seems to not error out and it finds and applies the role to the user who is enrolled (without a role):
>>/path/to/moodle$ sudo -u apache /usr/bin/php admin/cli/scheduled_task.php --execute='\enrol_flatfile\task\flatfile_sync_task' --showdebugging
Execute scheduled task: Flat file enrolment sync (enrol_flatfile\task\flatfile_sync_task)
... started 09:20:01. Current memory use 16.4 MB.
... used 10 dbqueries
... used 0.021462917327881 seconds
Scheduled task failed: Flat file enrolment sync (enrol_flatfile\task\flatfile_sync_task),Unknown named parameter $roleid
Backtrace:
- line 133 of /enrol/flatfile/lib.php: call to enrol_plugin->enrol_user()
- line 430 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->enrol_user()
- line 313 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->process_records()
- line 159 of /enrol/flatfile/lib.php: call to enrol_flatfile_plugin->process_file()
- line 61 of /enrol/flatfile/classes/task/flatfile_sync_task.php: call to enrol_flatfile_plugin->sync()
- line 410 of /lib/classes/cron.php: call to enrol_flatfile\task\flatfile_sync_task->execute()
- line 194 of /admin/cli/scheduled_task.php: call to core\cron::run_inner_scheduled_task()
>>/path/to/moodle$ sudo cp ~/test.csv /var/moodledata/enrollments/enrollments.csv
>>/path/to/moodle$ sudo cat /path/to/flatfile/enrollments.csv
operation,role,user idnumber,course idnumber
add,student,myidnumber,TG>>/path/to/moodle$ sudo -u apache /usr/bin/php admin/cli/scheduled_task.php --execute='\enrol_flatfile\task\flatfile_sync_task' --showdebugging
Execute scheduled task: Flat file enrolment sync (enrol_flatfile\task\flatfile_sync_task)
... started 09:20:17. Current memory use 16.4 MB.
... used 19 dbqueries
... used 0.10656404495239 seconds
Scheduled task complete: Flat file enrolment sync (enrol_flatfile\task\flatfile_sync_task)
Any help would be huge, thank you. It is entirely possible there is something just jammed up that needs to be knocked loose, but I'm not sure where else to start.