Would you like to test Moodle 2 performance? Or maybe you are interested in checking Moodle’s scalability? Sure, it works fast with the few courses you have created – but how will it look when you have hundreds of courses and thousands of users?
In either case, you will need to fill your Moodle installation with sample data. Doing this manually may take a long time – fortunately Moodle 2 comes with a generator script.
We had a quick look at the generator script here, at Enovation and it turned out that the script is not really usable. It was developed for an old version of Moodle (see CONTRIB-490) and has not been fully updated for the latest Moodle 2 release.
But fear not – we have fixed the issues and submitted the code to back to Moodle 🙂 Although at the time of writing the fixes may not be merged with Moodle yet, you can get the most recent, working version of generator by downloading generator.php and putting it into the admin directory. Some code in the question types needed fixing as well, so you will also need to apply the patch from MDL-25796.
Using the generator is very straight-forward; in the simplest case the default settings will work just fine – so simply go to http://<your_moodle_url>/admin/generate.php and press “Generate data!” button. It will create:
The recording below shows the generator in action.