Many thanks to Mike Churchward for his work on this and persevering
with sending updated versions to me. :-)
Shane and I have polished it up, rewritten a few parts (display-related)
and here it is, finally in CVS!
I think there will still need to be some optimisation for the SQL,
since it's still pretty intensive. Perhaps some sort of caching in
the session that gets modified along with the database whenever
something gets read.
However if there are problems the whole thing can be switched off
in the forum module config so this is not crucially urgent.
Some strings (RSS related) has been moved from forum.php to moodle.php
to avoid suplicating them once per module.
It seems to work fine, please test...:-)
1) There is a new site-wide configuration variable called maxbytes,
which provides an upper filesize limit for all (student) uploads.
2) There is a new course-level variable called maxbytes, which further
limits uploads within a course.
3) There is a new maxbytes field for forums, which further restricts
the size allowed in a particular forum. There is also a new config
variable in the module configuration to specify a default size
to use when defining a new forum.
4) Assignments already had a limit, but this is now aware of the other
limits, and like forums there is now a settable default value.
5) Finally, the sizes of files (Gb, Mb, Kb, bytes) is now translatable
in the language packs.