***** README.txt Alan Barrett alanabarrett0@gmail.com 10/12/2007 ***** ***** Instructions to upgrade Moodle version 2007021532 (1.8.3 +) to include a per course limit on ***** ***** the number of students. ***** ***** ***** ***** Does not modify Moodle to work on a fresh installation or upgrade, ***** ***** i.e. MYSQL stuff below is still needed. ***** ***** ***** ***** Based on: http://moodle.org/mod/forum/discuss.php?d=50063 ***** This code updates the approach in the URL above to work with Moodle version 2007021532 (1.8.3 +). Instructions... 1) Change the moodle database to add a new column called 'enrolmax' (use PHPMyAdmin or MySQL Client). Here is an example with MySQL client: mysql> use moodle; Database changed mysql> ALTER TABLE `mdl_course` ADD `enrolmax` INT(10) UNSIGNED DEFAULT '0' NOT NULL AFTER `notifystudents`; Query OK, 3 rows affected (0.07 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> Quit Note that the above example assumes that you use the prefix 'mdl_' for your moodle database. 2) Replace the following moodle files with the corresponding file from 'Moodle Maximum Enrolments 1.8.3.zip': moodle/course/edit_form.php moodle/course/lib.php moodle/course/enrol.php moodle/admin/roles/assign.html moodle/lang/en_utf8/moodle.php moodle/lang/en_utf8/help/index.html Note that all changes are marked with the text 'ALAN'. If you do not have the exact same version of Moodle as noted above, you may have to cut and paste the changes manually. 3) Add the following new file 'enrolmax.html' from 'Moodle Maximum Enrolments 1.8.3.zip' to moodle/lang/en_utf8/help/ (becomes moodle/lang/en_utf8/help/enrolmax.html) FIXES 9th January 2008: Quotes added to following lines in lib.php... print_string('availableenrolments'); print_string('availableenrolmentsnone'); 6th February 2008: Moved lines followed by //ALAN from 1.8.3+ version of moodle.php to 1.8.4+ version of moodle.php (Jason Hollowell)