OU blog

Personal Blogs

New forum - start!

Visible to anyone in the world
Edited by Sam Marshall, Friday, 29 May 2009, 14:46

Okay, it's not really the start. I did a lot of back-end implementation before. But I've just begun the serious development phase for the new Moodle forum we're developing, 'forumng'.

(Just to clarify for anyone not aware of the situation: we are developing a new forum independently, for our Moodle 1.9-based system. This is not going to be included directly in standard Moodle. However there is a prospect that our new forum might be considered for inclusion somewhere in the Moodle 2.x series.)

Since the 'basic' part of the back-end was done, this week I've been focusing on the next task on the list: getting email (subscription) support to work. It turns out that this is a pain in the backside to test when you have literally no user interface. smile However, I've managed to do this using the utility I built for load testing which creates forums, discussions, etc.

I've been taking lots of code from the existing forum, and then changing it to fit in with my new infrastructure. That leaves the code almost entirely different, but should still mean that behaviour is rather similar to the current forum. The worst bit was digests where all my assumptions were wrong. Yay!

  • I assumed digests were sent out at an arbitrary time per-forum. They're not, the time is specified and it is done across the system.
  • I assumed this time would be the same for everyone. In fact, in the current system, if digest time is 17:00 then it is sent out at 17:00 in each individual's timezone. Because this would be a right pain in the backside to implement, I decided not to bother; in forumng it always uses server time. I didn't see that much extra value in the current behaviour, especially as most sites relate to only one timezone.
  • I assumed digests were sent per-forum. They're not, they're sent per-course. (They do only include forum messages though and not anything from other activities! Phew.)

As a result I had to change my data model in this area, although the good news is that I was able to throw away one table altogether.

Anyhow it all appears to work now, but I guess I wanted to post because (a) this is what I've been doing for most of the week, and (b) there's a moral to the story: I don't personally use digest mode. That means I don't know how it works and any assumptions I make are liable to be wrong! And they were.

 

PS I'd be interested in stats for how many people actually use digest mode. Here's a query that works in Postgres:

select 100.0 * (select count(1) from mdl_user where maildigest<>0) / (select count(1) from mdl_user) AS percentage

Our percentage is... drum roll... 0.1%! Ho hum. But to be fair, we don't exactly make it easy for people to edit their user profile options.

Permalink
Share post