OU blog

Personal Blogs

December ForumNG release update - save draft

Visible to anyone in the world
Edited by Sam Marshall, Friday, 23 Oct 2009, 21:14

Today was our code freeze for the December 1st release. As usual, various things were delayed, but I did actually manage to finish a few new features for ForumNG. (Not as many as I'd hoped - unfortunately, what with me going on holiday and then various necessary bug fixing tasks, there was only about two weeks of development on new features. Don't know exactly how much development there was, because, er, I'm late with updating the schedule page... ah well...)

Anyhow, here are the new features since last time I posted to this blog:

  • Administrators can now choose to unsubscribe users (from the list of subscribed users). This was kind of supposed to be there already, but I'd forgotten to implement it.
  • There's a Collapse all link on discussion pages. It's no use to man nor beast, but people were disturbed by seeing the Expand all without its mirror image.
  • Moderators (by default; anyone with the appropriate capability) now get to ignore limits on posting. For example, the forum can be set to allow posting only from a certain date; now, moderators are allowed to post before that date.

And the big one - save draft. We had a customisation to existing Moodle forums that let you save draft posts. (There were lots of problems with it, too, but let's not go there.) ForumNG didn't have this, but people wanted it back, and their wish is my requirements list!

The new save draft is a lot nicer than the old one. You can conveniently use it either because you want to leave a message and finish it tomorrow, or because you're halfway through a long post and are (probably justly) paranoid that the system will crash and lose all your work. Anyhow, rather than explain how it works, I've made a 3 minute screencast to demonstrate it.

In order to see the screencast you need to be using Firefox or some other nice browser that will display .swf files that are linked to. This is because I'm too lazy to set up a proper web page for it.

That said, here's the link.

December release features (...i.e. save as draft) screencastVideo player: forumng-savedraft.swf

Enjoy! (Well, or just bear it. It's only three minutes.)

PS If you're a member of OU internal staff you can probably see the documentation page for this update. Not available for tutors or students or anyone outside the OU, sorry. (But if you read this blog you know it already! Just in a bit less detail.)

Permalink
Share post

ForumNG: Study advice

Visible to anyone in the world

Although time got eaten up by a zillion things unrelated to ForumNG changes, I did manage to develop one of the new features this week...

Study advice forum type

With this forum type, you can only see discussions that you started. (Except for moderators/advisors who have the capability that lets them see all posts.) All other discussions are entirely hidden.

So a student can post a question. Then the advisor can respond to it (and the student sees the response). But the student can't see questions that other students asked.

I'm not sure how useful this is in general; obviously we have a specific use case here which means it was 'critical' that this gets done in time! It is. Phew.

Development was a bit of a nightmare. I thought I'd finished inside half an hour... then I realised I'd only made the changes for the normal web view. Much, much, much harder were the changes to correctly display the 'unread message' count on the homepage (only includes ones in a discussion you can see), to make email subscription work (only sends emails you can see), and finally to make feeds work too. I kept realising there was another bit that needed fixing. Hopefully that is all done now.

And by the way - I haven't yet implemented the 'other' forum types in standard Moodle forum smile The Q&A type, for instance. That's scheduled for a future release.

Today we (Sharon and Lisa who are organising the 'FirstClass replacement' programme of work, plus me as the developer) met with a writer for the in-house magazine for tutors. For those not familiar with the University, FirstClass is the old, commercial conferencing software used here, and the new ForumNG software I'm working on is intended - along with the rest of our course website facilities - to finally replace it. Tutors heavily use FirstClass and are attached to the way it works, so that's why the magazine wanted to talk to us.

I said a number of inadvisable things involving the phrase 'sucks'. Let's see how many of them end up in the article. smile

Permalink
Share post

Back

Visible to anyone in the world
Edited by Sam Marshall, Friday, 9 Oct 2009, 17:39

I've been back at work this week, coping with enjoying a welcome return to ForumNG code!

The forum seems to have done okay during my absence. A few technical problems were found during this initial pilot period, and Bryan fixed a really bad one with email subscription (thanks/sorry). Other than that, there's a few serious ones, but they don't cause major problems for the test course. Which means I have been working in a calm manner to fix them for the next release rather than rushing to get stuff done.

(Of course I had to patch a totally different area of the system and rewrite a whole chunk of code that was supposed to have been done months ago... but that was quite enough rushing about for the week, so I'm glad it wasn't needed for the forum too.)

We have 3258 ForumNG posts on the live system now, which is still not that many, but a big improvement on the 20 before I went away.

  • I am trying to ensure that the community (Moodle contrib) release of ForumNG will happen soonish, possibly even actually getting time scheduled for it. Still hoping for November.
  • We added one more actual feature while I was away (again, thanks to Bryan) - you can now sort the discussion list in both directions. Previously, you could already sort by any column, but only one way (A-Z not Z-A, for instance).

Meanwhile this week I've been fixing bugs and working on an even more exciting feature - accessibility fixes! Yes, I know everyone might not be massively concerned about whether the icons are visible on a black background... but it did need fixing.

Permalink
Share post

ForumNG - the future

Visible to anyone in the world
Edited by Sam Marshall, Friday, 4 Sep 2009, 16:03

This is my last blog entry before going on holiday (from work and from everything Moodle-related!) for four weeks. So I thought I'd answer some questions about the future.

In the honourable tradition of FAQs, nobody has ever asked me a single one of the questions listed...

When is there going to be a public release of ForumNG for Moodle 1.9.x?

Hopefully the public release (to the 'contributed code' area where you can download optional extensions for your Moodle) will be around November. That depends on me sneaking it in on unscheduled time, unless I can get some scheduled...

The difficulty is not just the hassle of packaging it up and so on - code changes are required, because some JavaScript depend on TinyMCE's API and standard Moodle uses a different HTML editor. Hopefully the same things are at least possible with the Moodle 1.9 standard editor (otherwise the public release will disable HTML editor and use plain textboxes, making it not very useful).

Will ForumNG ever be the standard Moodle forum?

If the community likes it, it might be included in a 2.x release. This will obviously require us to update the module to support 2.x, and also to be able to transfer data from the old forum. (Both these things are planned.)

What new features are going to be in the OU's December release? (=same as the hopeful public release)

The December release plan includes:

  • Accessibility and usability fixes (we asked the relevant university department to do some testing for us, which identified some issues).
  • 'Study advice' forum type; a forum type where students can start discussions and reply in those discussions, but cannot see discussions started by any other user.
  • The return of the save-as-draft feature. (We had this feature in our modifications of the old forum. It didn't work properly. Unfortunately this time around I couldn't get away with the 'Moodle 2 will do this generically' excuse, because as we know, taking away features from users - even pretty annoying and not very useful features - is verböten.)
  • Ability for a user to 'flag' messages they are interested in or intend to respond to. Flagged messages get included as direct links on the front page of the forum, so you can jump straight back to them.

Hopefully there will be some other stuff, but to be honest, I might not even finish this lot as there isn't much development time...

Could you quote some useless statistics?

Okay. ForumNG went live on OU servers on Tuesday, and so far there have been a total of 20 posts. Woohoo! By comparison, we have 546,606 posts so far in old forums.

Permalink
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Friday, 15 Jan 2010, 17:33

Thankfully we only found a few more things wrong with ForumNG after the deadline. Mostly these are obscure but there's a serious IE8 problem - as it is too late to change anything before release (er, except the server OS major version... yes, let's not go there) we'll patch that the day after release.

The problem was caused by IE8 doing something right and then giving an error when it got to a bit of code where I'd done something evil to correct for IE7 doing it wrong! That's a positive sign, I think.

This week I gave a briefing and demonstrated the new forum along with the other new features, twice, to two different audiences: Helpdesk staff, and project managers.

It was basically the same briefing except helpdesk were a lot more responsive! Project managers sat there stone-faced... it's not like I have any actual jokes or anything, but I don't think the briefing was that dull, and the new software is pretty cool.. isn't it? Hmmm...

On the plus side, they didn't heckle when the system blatantly took ages to work at one point. [We were having problems with the test server, it's not a problem with forum - really! no, really really!]

Oh well, I guess they didn't want to be at that briefing. Or maybe there was a coffee shortage or something.

Another positive is that Helpdesk didn't spot anything wrong with the software. Usually when I show software to Helpdesk they are really good at spotting the stupid interface problems that are going to cause students to call them! So I end up going argh, yeah, you're absolutely right, damn, let me write that down, we'll tweak it as soon as we can... at least once. But not this time. Phew.

If I have time in next week's blog entry, I'll mention some of the areas we're planning to develop in the second release of the forum for December. I am hoping that along with these, we'll also have a working public release that other Moodle-using sites can try out, but I should say this unfortunately isn't scheduled, so we'll have to see.

Permalink
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Friday, 21 Aug 2009, 17:44

So ma-ny bugs! So little time...

We just hit the deadline for bugfixes to our next release in the start of September. Nothing else gets fixed for the release after today; if anything important is found, we'll fix it with 'catch-up' patches to the system.

The good news is that I actually fixed all the ForumNG bugs (28 this week). Bad news is that I don't really feel like we had enough testing - they also only started testing it this week. Email features haven't been tested because we had technical problems setting it up on the test system. Overall, though, I still think it probably works.

Here are some things that were found during testing despite that I also thought it 'probably worked' when we sent it for testing in the first place:

  • Students couldn't post or reply or view discussions. (Ooops.) Nor could tutors. (Ooops again.) It worked for admins though! Well, admins using Firefox, because...
  • The interactive features all broke for Internet Explorer users. (Hey, it's only 80%.)
  • The interactive features all broke rather more seriously in Internet Explorer 6 specifically.
    I decided there wasn't time to fix it and got permission to leave out all the JavaScript for that browser, at least for now. Might have to put it back in later if people complain. For now, we are proudly running an 'IE6 sucks, get a real browser' message in the footer of affected pages. (Note: The wording might be slightly different...)
  • The edit timeout implementation was a complete mess, with no checking at all, and utterly incomprehensible to students. Testers complained.
    This turned out to be kind of a plus in the end, because now there is a really nice edit timeout implementation; when you edit a post it tells you what the deadline is, if the deadline's getting near the message goes bold, and when it runs out then the Save button is greyed.
    In addition, while you're just looking at a discussion, the 'Edit' and 'Delete' links automatically vanish when time's up.
  • Pretty much every Cancel button anywhere across the entire forum broke in a different way. (Who ever tests Cancel buttons?)

So, that's the good news. (Maybe?)

I guess the less good news is that I'm not quite sure when there will be a public release for other Moodle users (to 'contrib') of this code, even after we think it's working! Hopefully we can do this alongside our next December release. There is a bit of work involved though because this code depends on TinyMCE and standard Moodle 1.9 uses HTMLArea. With luck they have similar interactive facilities, but...

By the way, if you're an Open University student/tutor/other staff member and are wondering when you get to use the new forum, the answer is probably not 'September 1st' even if we are theoretically releasing it then. smile A very few pilot courses will be using it in September, along with the staff LTS-EDIT forums, and I think the VLE examples one that tutors can see. Most people are still trundling along on the existing forum for some time to come.

Permalink 3 comments (latest comment by Douglas Beveridge, Saturday, 20 Feb 2010, 16:03)
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Friday, 17 Jul 2009, 18:42

ForumNG's coming along quite nicely. I've now implemented all the buttons along the bottom of the discussion. These are:

  • Discussion options (same as part of form you get when starting new discussion; change sticky, time restrictions, group).
  • Lock/unlock (launches form where you type text of lock message).
  • Merge (when you want to put the current discussion inside another one).
  • Delete/undelete (mark discussion deleted).
  • Show readers (slightly useless page displays people who've viewed the discussion, based on the unread data; available only for posts within the 'store read data' threshold, default 60 days).
  • Export to Word (exports the current discussion page to Word document).

The Word export is a bit of comedy* feature. Previously, I'd put effort into RTF export facilities using horrible libraries that don't work properly. Then somebody told me that you can actually just write an HTML file... give it a .doc extension or Word mime type... and Word will open it just fine. Ho hum. Anyhow, it works. [I kind of wish we could ditch this feature altogether, along with the one before it; they're both pretty useless.]

* In the geeky sense, not the 'actually funny' sense.

By the way, these buttons along the page bottom are an extension point: it's easy to add more buttons if required, without modifying any of the forum code.

Also this week I got backup and restore on the go, and integrated the OU search system, and tidied up the rating star UI a bit following (only slightly contradictory) feedback from helpful developers.

Just one more week to go before code freeze. I'm not too panicked about that - we've now agreed (er, kind of) that I won't be implementing other forum types (Q&A etc) for the first release, which means the only significant feature left is RSS/Atom feed support. Apart from that there are an awful lot of things that need checking (is email still working? it did once but that was ages back) and I probably need to search the code for TODO comments. Then if at all possible I want to do a bit of performance testing, i.e. leave my computer on overnight creating forums and check the next day that an individual forum still performs OK with much more data in the tables, maybe work on optimising the queries if they're slow, etc.

We have decided to leave the internal name at 'ForumNG' during the pilot period. I don't actually know where that naming convention came from, but suspect it's a Star Trek reference. It was also requested that the icon should be changed. Our current icon for old forum is a picture of a person wearing a green top. The new icon is identical, but I changed the shirt to red. We'll be sending this forum out on an away mission to (a small number of) OU students at the start of September...

Oh, and:

  • 1.9 PAGELIB HATE HATE HATE (why is there no $buttontext variable on the print_header for activity pages, grrrrrrr).
  • I found a slice of OU-specific code today which has been in place since last autumn, doesn't work correctly because of the old if($variable = 'value') thing, and in fact appears to have an identical result to the core code before the OU-specific bugs bits were added. Sweet.
Permalink
Share post

ForumNG discussion page

Visible to anyone in the world
Edited by Sam Marshall, Friday, 10 Jul 2009, 20:09

The ForumNG discussion page is (mostly) done, including all the fancy AJAX tricks. It was going to be way too difficult to explain everything in text, so instead I made a five minute screencast all about the new discussion page. (The software I used is in fact limited to exactly five minutes, so you'll notice me getting a little rushed at the end!)

Watch the videoVideo player: forum_discussions.swf *

* This link won't work in Internet Explorer. It will work in Firefox, or any other browser that is capable of displaying SWFs directly in the page. If you just get a download box when you click it, try using the latest Firefox instead.

A few things to note that aren't in the video:

  1. I recorded this from my home connection, which is extremely slow broadband. So the network delays you're seeing (or in most cases, not seeing) are representative of real usage.
  2. Everything shown here is subject to change. Development isn't complete yet.
  3. The discussion page is supposed to have a row of buttons along the bottom that give access to advanced features for moderators - seeing a list of students who have read the discussion, etc. This isn't implemented yet, but anyway it won't have the flashy AJAX stuff.
  4. If you have JavaScript turned off, everything still works, but the links are standard links that take you to new pages with forms on, the rating stars aren't stars but remain as a dropdown, etc.
  5. I didn't show how you add file attachments. That's because it currently doesn't work. smile
Permalink
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Friday, 3 Jul 2009, 18:02

I've got most of the ForumNG discussion page working, but there's quite a lot left to do too - the fancy AJAX stuff is half-done, and I haven't done any of the controls that go along the bottom of the discussion yet (lock, move, join, view readers, export). Also, I haven't applied the pretty blue OU theme to it. So a screenshot of that can wait for next week.

Instead, here's the History page for a post that has been edited, which I just coded:

forumhistory.jpg

This is available via a link beside the 'Edited by' text on a post. Only moderators (those who can edit other people's posts) have access to it. It shows all previous versions of the post (in this case, there were only two versions).

One possible use for this feature is so that staff can find out if a student posts something offensive, then edits it 20 minutes later, before they get told off but after they've offended someone! Hopefully not a very common occurrence with OU students, who I'm sure are always exemplary in their behaviour... although I was vaguely considering signing up for a course, in which case that will obviously change...

[The feature can also be useful if there are multiple moderators, so that one moderator can check to see what another moderator did, etc. Or for answering 'what on earth happened to this conversation?' questions if somebody edits a post to remove a section which people have already replied to. And so on.]

Old versions of edited posts are optionally deleted after a time limit, by default 30 days. We probably won't be enabling that feature at the OU.

Permalink
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Tuesday, 30 Jun 2009, 16:46

It's not a Friday, but it is way too hot (about 30C in our office) and I need a break, so here's a blog post.

This time it's about accessibility. I had a think (and discussed with one of our in-house experts) what to do about screenreader accessibility for forums. Turns out nobody really knows.

Here's my best shot at it - this is a screenshot of a ForumNG discussion with 'View / Page Style / No Style' in Firefox, which is a convenient way to approximate what screenreader users 'see'. (Yes, there are extensions etc. that do it more accurately - or you could actually use a screen reader, but last time I installed JAWS it did horrid things to my computer, so not going there again. Anyhow.)

forumaccessibility.jpg

Here are the accessibility points in the above screenshot:

  • Each post has a level-2 heading (which is not visible to sighted users). This means that screenreader users can skip through posts by pressing the H key. [If the post has a subject, that'll be a level 3 heading.]
  • The level-2 heading gives each post a number (not visible to sighted users). Numbers are in date order of posting.
  • The heading tells you which post (by number) the current one is a reply to. (That's also a link, should it be necessary to skip back up to the parent post.) This is important because screenreader users likely don't have access to the visual information that indicates it - indents to indicate which post replies to which.
  • Also in the heading is information about the category of the post that is otherwise only available visually - whether it is 'summarised' (showing only the first few words) or not, whether it is 'unread' or not.
  • All the links that are copied for each post (Reply, Edit, Expand, etc) contain the post number so that the links are unique. [Having lots of links with identical titles is an accessibility problem.] Again, the post numbers do not display to sighted users, there it just says 'Reply'.
  • There is some use of appropriate XHTML: in addition to headings (as mentioned), the per-reply commands have been formatted as an unordered list.

I'm sure we can do better but I think this is a good start and it illustrates a few tricks and issues so I thought it might be useful for other people.

If anyone has easy-to-implement suggestions about improving accessibility further over this layout, please add them here. Difficult-to-implement suggestions will probably be ignored. smile

Permalink
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Friday, 26 Jun 2009, 17:35

By today I'd hoped to have the ForumNG discussion display working in the basic non-JavaScript version, but that was not to be sad

I've got about half-way through the display of single posts, which is obviously a key part of this, but.

On the plus side, the forum view page is pretty well complete now (the sorting options work, mark read works, etc).

As for why that discussion code isn't done yet, well, out of five days this week I've recorded 1.25 days of development. The rest is code review and otherwise assisting the other developers on my team; fixing problems with our live system, and analysing a performance question (we've just made a 3% performance improvement, woohoo); providing support for users of our existing stuff; etc. I sincerely hope next week is better, otherwise I may need to go into hiding in order to get anything else done.

Oh, and I've now seen a document sent by aggrieved FirstClass users. For non-OU people: FirstClass is the existing commercial conferencing system we use; it's being phased out in favour of Moodle forums, which is basically why I'm writing an updated Moodle forum version.

They seem to be rather concerned about bandwidth usage! I'll have to make sure ForumNG is reasonably efficient in that regard... now I'm wondering whether I should change all my CSS class names that begin 'forumng-' to 'fng-', which would save a whole 5 bytes each time...

[Conclusion: Er, no.]

Or, maybe if we turn on gzip transport compression they will be perfectly happy with getting rid of FirstClass...?

[Conclusion: Hell no. smile]

Permalink
Share post

Forum start discussion

Visible to anyone in the world
Edited by Sam Marshall, Friday, 26 Jun 2009, 17:35

Here's another forum update, but first, an apology - yes these posts are getting old, but it is what I'm working on, so I'm hoping it's of interest to someone... somewhere... somehow...

I could write an amusing anecdote instead... but then I can't post it here because the wrong people might read it! Bad enough that I said in one meeting this week 'this feature is absolutely insane, I'm not doing it, just no' and only then found out that the person who requested it was sitting opposite... smile

So, forum. Well, here's the 'start new discussion' screen. In a refrain which has become depressingly familiar, it looks exactly like the old one.

forumstartdiscussion.jpg

This form basically works now, except for all the features I haven't tested. Hey, those might work too! (Not testing code is sort of the equivalent of sticking your fingers in your ears and shouting LA LA LA I'M NOT LISTENING!!!! - it's great.)

I don't think I mentioned the technical architecture yet. While it doesn't affect the screenshot above (as you may have guessed, I created the code for this form by copying and pasting all the code from the old version then changing it about), the architecture is quite a lot different.

  • This is a slightly object-oriented design: the main system is contained in classes forum, forum_discussion, and forum_post. All the back-end behaviour is handled in these classes (oh, and forum_cron).
  • Forum types are now plugins and also object-oriented. Types entirely control the display of the 'view' (discussion list) and 'discussion' [not yet implemented] page, although it's expected that they will do this by using base class methods rather than really changing it too much.

One piece of good news this week, if anyone's considering switching to this forum once it's developed: Jenny (the OpenLearn lead developer) told me she's hoping to implement the conversion code so that you can convert a standard forum with all its messages into a ForumNG. Yay!

That's it for now. I'm hoping to start work on the discussion page next week (after I deal with umpteen critical bugs) and brace yourself - it's actually going to look different!

Permalink
Share post

More tedious forum progress

Visible to anyone in the world
Edited by Sam Marshall, Friday, 26 Jun 2009, 17:34

Given the amount of time I had to spend fixing bugs and attending meetings and doing support this week, it's not surprising I didn't get that much done on the new OU forum. Still, here's another 'oh look! It's just like the old version!' screen:

forumview.jpg

As you can see, it does indeed look just like the old version - though OU users may notice we've put back user pictures, which are already in this screen on standard Moodle.

On this screen, the 'mark unread' buttons are currently non-functional, as are the links to view discussions (I haven't done that screen yet) and the 'Add a new discussion topic' button (ditto). But paging works. Woohoo! Woohoo indeed.

New features that will be on this screen, most of which also don't work yet:

  • Sorting - the default sort is by 'Last post' date (newest first). You'll also be able to click on the other column headings to sort by 'Discussion' (alphabetical), 'Started by' (alphabetical), and possibly by 'Replies' (biggest first) - not sure about this one. This will be a proper database sort, so you can use it even if there are multiple pages. Note: This feature is already in the OU's customisation of old forum.
  • Sticky discussions - this is sort of half-done. These will display at the top of the list regardless of sort (if there are multiple sticky posts, they will show in the selected order). These may look different in some way (eg pin icon) and there will be a dividing line between sticky posts and normal ones.
  • Locked discussions - again half-done. There will be an icon (eg lock icon) indicating when posts are closed for further discussion.
  • Deleted discussions - not sure if that will be at the bottom of this page, or on a linked separate page, but there will be a way for admins to view the list of deleted discussions in the forum. [In ForumNG, nothing is 'really' deleted straight away - only marked as deleted, so admins can still see it. It can be really-deleted after 30 days, or not at all if you're feeling flush with DB space.]

Another exciting progress update next week! Maybe.

Permalink 4 comments (latest comment by Sam Marshall, Tuesday, 30 Jun 2009, 16:19)
Share post

New blog post

Visible to anyone in the world
Edited by Sam Marshall, Friday, 5 Jun 2009, 17:06

I'm making some progress on the forum, in between bugfixing and eating licquorice all-sorts (thanks James!). Here's the index.php:

forumindex.jpg

If you squint, you'll see that it is basically the same as the current forum's index screen. (Of course, if you're an OU user, you may realise that we don't actually use the forum index screen here!) There are three notable changes:

  1. The 'unread' count is given as a number of discussions containing unread messages, rather than a number of posts. (This was easier to compute and makes more sense since it's next to the total number of discussions, not posts.)
  2. Feeds are available in both Atom and RSS format (like our blog). These don't actually work yet.
  3. The 'general / learning forums' dichotomy isn't present. This forum doesn't integrate with the latest course news block etc, so there isn't really any such thing as a 'general' forum.

Clicking on the links to the forum takes you to the forum discussion list, which isn't done yet either... smile In fact this is the first 'finished' main UI screen (the global settings page is finished too, but that's not very exciting).

Permalink
Share post

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

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 244844