Create a course with 5,000 students. Now create a metacourse. Add the 5k-student course to the metacourse.
After 10 seconds, depending on whether you have debug turned on or not, either you get an error message about time limit running out, or the page loads entirely blank. (Hrm. That's helpful!)
This is caused because adding students to a course takes longer under the new role system. The old timeouts were intended presumably to avoid the risk of timeout (since the timeout is 10 seconds per course) but in fact they cause one. A 5,000 user course on our slow development hardware takes approximately 2 minutes to transfer in current stable moodle.
In case it's useful, here's some hacky code that (on a test server you don't care about) makes 5,000 students on the course:
<?php
require_once('config.php');
set_time_limit(0);
// Add 5k users to course 2
$course=get_record('course','id',2);
if(!$course) {
error('No 1');
}
for($i=1;$i<=5000;$i++) {
$user=new StdClass;
$user->username="User$i";
$user->firstname="First$i";
$user->lastname="Last$i";
if(!insert_record('user',$user))
if(!enrol_into_course($course,$user,'manual'))
{ error('No 3'); }
if($i%100 == 0)
}
?>