csvan_foreach_semantics

Up until now, older Moodle code used reference semantics in foreach loops which are illegal as of PHP 5.2. This patch replaces these operations with equivalent PHP 5.2+ ones, allowing better compatibility between Moodle and modern PHP runtimes.