Posted
3 days
ago
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
... [More]
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.)
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. :) [Less]
Posted
4 days
ago
Having read the article Cannot Get to a Conference? Get on Twitter (thanks to my twitter mentor for the link), I've just checked that all the upcoming events in the moodle.org calendar include a hash tag, and have updated the list of tags in use in
... [More]
Standard Moodle tags.
If you can't manage to attend one of our upcoming MoodleMoots, you can always get live news reports instead by monitoring the event's hash tag! [Less]
Posted
5 days
ago
Have you ever considered rating any useful forum posts in Using Moodle? Here are my reasons for doing so:
Ratings make useful posts easily identifiable for others browsing the forums.
Ratings provide feedback for forum posters.
... [More]
Particularly helpful Moodlers are calculated based on forum ratings.
Useful posts are highlighted in the recently rated posts block on the Using Moodle course page (which uses the RSS feed from http://moodle.org/useful).
Useful posts are shared via http://twitter.com/moodle. (As a recent twitter convert, I especially appreciate the value of this!) [Less]
Posted
6 days
ago
by
nos...@example.com (Dan Poltawski)
Having ended up with a spare iPhone from a recent upgrade I decided to try jail-breaking the old one and see what software was out there away from the restrictions of the app store. I discovered that lighttpd, php and sqlite were all available from
... [More]
the software repositories for download - these three combined are enough to run a Moodle server. So out the window went cleaning my flat and sensible tasks - I had to make my phone into a Moodle server!
Getting the software for moodle installed and configured was relatively painless, the 'cydia' software installer appears to use dpkg under the hood, so I installed openssh server and apt through the gui installer and then sshed onto the phone to do the work with a full size keyboard and the moodle server was up and running quite quickly. (More details for configuration below).
Sqlite is a really interesting technology which seems to be making its way into a lot of software and I was quite interested to see Moodle support for lightweight testing sorts of applications and it has made its way into Moodle thanks to the great work of Andrei Bautu in his GSOC project last year. It only exists in the highly unstable Moodle 2.0 development branch so I needed to install this on my iPhone. Development is moving incredibly fast in the Moodle 2.0 branch so I was not at all suprised to see that the sqlite driver was not working. It took a bit of time to find out what the major issue with the driver as it was a silent error. But I eventually found and fixed the major issue.
Sadly, despite successfully installing and passing most of the database unit tests on my development machine with sqlite, some database queries were continuing to cause the iPhone server issues. I spent some bit of time improving the sqlite driver to show more debugging information and get to the bottom of the issue.
After a lot of debugging and irritation, it seems that the sqlite library version (3.3.7) linked to from php has a bug/incompatibility which means it does not like queries like:
SELECT student.id FROM mdl_user student JOIN (SELECT ra.userid FROM mdl_role_assignments ra) roles ON student.id = roles.userid
It'll report: SQLSTATE[HY000]: General error: 1 no such column: roles.userid
Where as it will work fine with something like:
SELECT student.id FROM mdl_user student JOIN (SELECT userid FROM mdl_role_assignments ra) roles ON student.id = roles.userid
(That was a simple example to try and find the problem - the SQL we have in moodle is a lot more complex that that).
To confuse matters, the sqlite command line tool I was using to test on the phone itself was a newer version (3.6.12), which works absolutely fine with both queries. The same was true on my development machine, which meant that I could install with sqlite succesfully everywhere but the iPhone itself. I assume the php version has been linked to the iPhone OS version - but I am too lazy to check/do something about it!
While I don't yet have a working moodle server install running on the phone itself, the exercise in improving the sqlite driver has been really useful. I've updated the driver in CVS, on recent sqlite versions it is only currently failing 9 of 1298 tests. (CEIL and SUBSTR being the major issues - but they are only used for stats and the admin healthcheck) so its really looking like a really useful option for those situations where a full-grown database server is overkill.
I've put a video of the (disapointing) install on youtube and you can find details of the various bits of configuration below.
Configuration Details
I love apt
apt-get install lighttpd php sqlite3 git
I've never configured lighttpd before, but a quick search for configuring with php and I made a very simple config with /etc/lighttpd/lighttpd.conf and /etc/lighttpd/mod_fastcgi.conf
JB-Phone:~ root# cat /etc/lighttpd/lighttpd.conf
include "mod_fastcgi.conf"
server.document-root = "/htdocs/moodle"
server.port = 80
server.tag ="lighttpd"
server.errorlog = "/htdocs/log/error.log"
accesslog.filename = "/htdocs/log/access.log"
server.modules = (
"mod_access",
"mod_accesslog",
"mod_fastcgi",
"mod_rewrite",
"mod_auth",
"mod_fastcgi"
)
index-file.names = ( "index.html", "index.php" )
# cat /etc/lighttpd/mod_fastcgi.conf
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)
)
)
And started the webserver manually with:
lighttpd -f /etc/lighttpd/lighttpd.conf
I created the /htdocs/ directories - and git cloned moodle into /htdocs/moodle and created the moodle config file as mentioned in the sqlite moodle docs:
$CFG->prefix = 'mdl_'; // prefix to use for all table namesV
$CFG->dbtype = 'sqlite3';
$CFG->dblibrary = 'pdo';
$CFG->dbhost = 'localhost';// leave dbhost to localhost (or blank) to store the database file in Moodle data directory
Oh and I was also naughty and made the 'zip' php extension an optional item (as it wasn't in the packed php version):
diff --git a/admin/environment.xml b/admin/environment.xml
index e15a33b..94ed8f2 100644
--- a/admin/environment.xml
+++ b/admin/environment.xml
@@ -262,7 +262,7 @@
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
- <PHP_EXTENSION name="zip" level="required">
+ <PHP_EXTENSION name="zip" level="optional">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
Enjoy! [Less]
Posted
7 days
ago
By today I'd hoped to have the ForumNG discussion display working in the basic non-JavaScript version, but that was not to be :(
I've got about half-way through the display of single posts, which is obviously a key part of this
... [More]
, 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. :)] [Less]