Customize bulk users upload

Customize bulk users upload

by Антон Сидоренко -
Number of replies: 2

Dear colleagues,

I've scanned the forum topics but haven't found any similar. So I'd like to ask you to suggest.

For my project, I need to customize the standard bulk users upload workflow (certainly, programmatically). For example, I'd like to perform a data integrity validation or something like that to pre-process the uploading csv file.

Unfortunately, I can't find any relevant examples in the Moodle Plugin developer guide as well as in searching over Internet on how to change the standard behavior of such features.

I would be grateful for any help, suggestion or other instructions.


Average of ratings: -
In reply to Антон Сидоренко

Re: Customize bulk users upload

by Vitaly Potenko -
Picture of Core developers Picture of Plugin developers

Hello, Anton!

The way I would proceed is just to create a new admin tool plugin for CSV uploading and implement there any logic you like. Users upload is basically an admin tool plugin, so you can get some inspiration from it while developing your own ;)

As far as I remember the CSV processing is implemented as a library in Moodle, so you can re-use it for your new plugin and the task wouldn't be that hard.

As for me, I do not see any ways to customize the core users uploading plugin without affecting the core.

Average of ratings: Useful (2)
In reply to Vitaly Potenko

Re: Customize bulk users upload

by Антон Сидоренко -
Vitaly,

I'm a novice in Moodle development, moreover this is my first plugin here. But I'm just in the middle of the process.

I'm very glad that the way you've advised me is the same I've already choosen on a hunch. So I'm going to make a new admin tool plugin. I hope building this particular kind of plugin won't contain any sudden issues to be implemented. The whole project is much more bigger and this is a first task only.

Thank you so much for your help!