Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: Test site generator.

Test site generator

From MoodleDocs

(This in only available from 2.5.2+ (Build: 20131004) onwards)

The test site generator adds a set of courses, users and enrolments between them, in fact is using the Test course generator to generate the courses. It does not install a moodle site nor changes it's settings, only populates it. It's execution is not restricted to one, every time you run it new courses will be added.

Requirements

This tool is for developer use only and should not be used on a live site. It is disabled unless you set the debugging option to DEVELOPER.

Finding the generator tool

This tool is only available through CLI (command line interface)

Usage

cd /moodle/dirroot
php admin/tool/generator/cli/maketestsite.php --size=S

Options

  • Size: Size of the generated site, this value affects the number of courses and their size. Accepted values: XS, S, M, L, XL, or XXL (required)
  • Use a fixed dataset: Use a fixed data set instead of randomly generated data, useful for generating a standard data set
  • Specify a file size limit: Limits the size of the generated files to the specified number of bytes, you may find this setting useful because depending on the size you select the courses can use too much disk space
  • By pass check: Bypasses the developer-mode check
  • Quiet: Do not show any output

For more help:

php admin/tool/generator/cli/maketestsite.php --help