modified the way a block of courses is pulled out for the csv output.

this makes it more efficient
added $slice to the loop
Merge pull request #675 from unikent/develop

develop to master