// cf 2009-06-05

There are five files included in this package:
-bulk_course_generator.php
-bulk_module_assignment.php
-bulkcats.csv
-bulkcourses.csv
-readme.txt

1. INSTALLATION

To "install" this package unzip all the files to the root of your target moodle instance. Do NOT use this on a production instance!

2. PURPOSE

These scripts create courses with random teachers, students and modules.

3. HOWTO

bulk_course_generator.php depends on the two included csv files. You are free to use your own csv files. It is recommended to run from the command line but pointing a web browser at it should work too.

The script will take the names from bulkcats.csv and create a category for with each name in the database. It will then take the names from bulkcourses.csv and create a new course for each name. The bundled CSV has 750 names--this will lead to 750 courses! 10% of these courses will be metacourses, but without child courses assigned.

For each course, the script will do the following:
-Assign it to a random category, including the categories just created.
-Give it a shortname based on the first four characters of that category and a random integer
-Generate 10 sections in either weekly or topic format (50% chance of either)
-Assign random students to a course (random number between 5 and the total number of users on site) unless the course is a metacourse
-Assign random teachers to a course (random number between 1 and 5)

bulk_module_assignment.php is run independently, and will create/assign random modules/resources to each course. Current logic:
-Script cycles through each course and assigns a random number (3 to 6) of modules to each section of each course. At the moment only a limited number of modules are supported, so many times the script will do nothing. The supported modules are assignments (single upload and online text), labels, wikis and forums.

4. CONTACT
Questions to Charles Fulton (cfulton@kzoo.edu, mackensen on twitter)
