still producing too much data and overflowing PHP memory on busier
sites (eg moodle.org).
Now, there are more database queries, which is unfortunate, but the
data is much more specific, and no sorting needs to be done, so
this is a performance boost.
I don't know how these will cancel out ... my guess is that very
small sites may be very slightly slower on the course page, but
that large sites will be much faster.
Let's see.
Moved COURSE_TEACHER_COLOR out to style sheets where it belongs (.teacheronly)
Added some efficiency when printing recent activity
- don't print more than one weeks worth of updates
- don't keep re-parsing logs once they've been used
- rename the main_frame variable to framename, because it
- might have caused some confusion
- none of the global variables have underscores
- put the config in the config table, with a default of _top
Moodle tables.
ie user -> userid in many tables, plus in user_students
start -> starttime and end -> endtime
I've just done all this as carefully as I could ... I don't think
I missed anything but it's pretty intensive work and I'd be fooling myself
if I didn't think I'd missed a couple.
Note that this version should pretty much be able to bootstrap itself
using PostgreSQL now ... but this is untested
Basically all the Database functions are in lib/datalib.php
and the web functions are all in lib/weblib.php, so
moodlelib.php is much thinner than it was.
Data functions have been extended ... most old calls will
still work, but now many more SQL commands can be performed
using the datalib functions rather than using SQL. I'm
currently moving through the whole tree replacing SQL
calls or at least concentrating them in one section of
mod/xxx/lib.php
Still working on forums, quizzes, surveys, resources.
The tree is currently not full working ... some things are
half-completed ... will resume tomorrow.
modular (at slight cost to performance) and every modules can now
have a module_print_recent_activity() function. This function
takes a list of logs, searches for things to display and does so.
So far I've done forum and journal functions