You will need to change the timeout settings in your php settings. This is done on the server and not through the web interface. I would start by upping the max_execution_time - mine is currently set to 360. This setting on a linux is found in the /etc/php5/apache2/php.ini file.
You might look at cohorts for your enrollment. Seems like a lot of work to enroll in so many courses. With cohorts, you can enroll a whole bunch of students into several courses at once.