Dokeos in Peru

July, 4 2008

In case it would be of any interest to you, I am currently developing a kind of “branch” of Dokeos (although nothing legally-binding about the branch stuff) in Latin America, and more specifically in Peru.

Peru is still what I would call a developing country, so at the same time it is hard to get used to (living there) and possibly excellent for future business opportunities. Of course, “developing” comes from “development”, and “development” means investments, which means a lot of money could be made (theoretically) from being in the right place at the right time.

Although I feel I’m still a bit ahead of “the right time”, I’ve invested a considerable amount of my time in developing the presence of Dokeos locally, and until now (about a year on) it’s not been very rewarding.

As I’m writing these lines, however, I just finished my first installation of Dokeos, or rather its videoconference module, on a Fedora 7 system. It ended up working nicely, but there wasn’t really any other expected outcome.

However, the interesting bit here is that it’s my first contract in Peru (most of my work so far has been a continuation of my work in Belgium) and it comes with a lot of simultaneous requests for information. I don’t know exactly why it’s all starting at the same time, but it is. So I might only have finished my first Peruvian job, but I’m still with 4 very serious leads for large-scale installations and training sessions, and a few more of unqualified leads, plus a bunch of people that know they can act as resellers of my (or should I say “our” as we’re a company of three now) services and take a nice commission.

So today, I might only being up to my first install, I am really positive about the future!

One of my serious leads is actually for software development, and is a request for a quote about the development of an add-on to the videoconference tool that will enable teachers to pass the video and voice to the user to ask a question. The feature has been requested a few times in the past, but we never managed to suggest a development time that satisfied the customers. However, now we have a much more reliable videoconferencing system (thanks to Arnaud Ligot and Frédéric Burlet), this might be much easier to work on (and so, cheaper). If you have an interest in this feature and would like to contribute to make it possible, just give me a shout. Otherwise, there is still a possibility that this client will not be able to finance the development and that we just leave it for another client, later on…

It always surprises me, though, how people are happy to pay 10u a year for a finished product, but reluctant to pay 2u for the development of the only missing feature in a product that costs 1u… (values provided for demonstration purposes, it doesn’t match anything).

Well, anyway, the point of this article was to let you know a little bit about my stuff, locally. The next articles will be a bunch of incredibly technical stuff, so this was just a big breath before the dive.


A strange learning path bug… fixed

June, 30 2008
See update below for the fix

I’m trying to get my head around a super-tricky bug since last Friday. Basically, the bug happens only on one portal and with a specific learning path imported by Oogie.

The bug appears due to a loss of session before the generation of the table of contents.

Something like this appears:

Fatal error: Call to a member function get_theme() on a non-object in /var/www/yourportal/main/newscorm/lp_toc.php on line 39

The bug is not in the Oogie conversion (no strange characters) as the same content works on another portal on the same server.

The bug is not a PHP configuration problem either, as again, another portal on the same server, with the same PHP configuration, works perfectly.

The problem seems to reside in the time the newscorm tool needs to generate some of the frames. Apparently, one of the frames loads before the others, and looses the session data, but only on this portal.

I’m not out of things to try out, but this one is really a painful one.

2008-07-04 Update

After a long week of interrupted searches, I realised (mostly thanks to a conversation with Arnaud) that the bug was caused by an overflow in the session size capacity.

Now most of you PHP developers will think “mmmmh, is there actually a way to limit sessions file size on disk?”. Well, the answer is “no”, not in the predefined PHP5 options, anyway. However, there is kind of a special condition here: the portal on which this error occured had the setting configured to save the sessions inside the database, using the dokeos_main.php_session table.

The thing is, inside this table, we defined the field to store the session as a “text”-type field (or blog, which is the same for MySQL 5). However, I did an enormous mistake in thinking that a “text”-type field could actually store up to 4MB. It can’t. It just stores a maximum of 16KB.

This size should be enough, in most situations… yes, but not in the learning path object situation. Learning paths are very large objects with a structure set to limit the number of queries made on the database. Even then, however, it coped nicely with *most* learning paths, until this 56-pages learning path appeared. Apparently, the structure was too large and went over the 16KB limit, making it unproper to serialization into the database field.

So basically, turning the field to a MEDIUMTEXT field fixed the problem:

ALTER TABLE php_session CHANGE session_value session_value MEDIUMTEXT NOT NULL;

To make things clear, the problem appeared to be a loss of session, somewhere between the script where the learning path object is built and the first script using it straight from the session.

Debugging the second script showed that the session was recovered (or rebuilt), but without that large element, which just couldn’t be stored in the database. This made it really difficult to track down, as nothing is telling you anywhere (even with full debugging on) that the problem comes from the session size and the database field limit…

Of course, this has all been fixed in the Dokeos code for the next version of Dokeos, so you don’t have to worry too much about it, it will just get updated automatically.


First annoying bug in 1.8.5: learning path theme feature

June, 24 2008

Yes, we have our first annoying bug in Dokeos 1.8.5. It has a very restricted scope, and only happens once you voluntarily activate a new function, but it is there…

When you *upgrade* your portal from anything to a 1.8.5, there is a missing bit of SQL in the upgrade process that mean you will not have a column called “theme” inside your courses’ lp tables.

First, let me tell you that you can fix it pretty easily before upgrading, by adding this line to the end of main/install/migrate-db-1.8.4-1.8.5.pre.sql:

ALTER TABLE lp ADD theme varchar(255) not null default ”;

And the conditions to reproduce the bug are these:

  1. upgrade to 1.8.5 (the bug doesn’t appear on fresh installs)
  2. in a course that existed before the upgrade, go to the course settings
  3. activate the option to set a CSS theme by learning path
  4. go to the learning paths page
  5. edit a learning path’s properties by clicking the pencil icon
  6. change the theme used for this learning path
  7. click ok

That will display a horrible SQL error (that is, if you left your PHP settings on display_errors=on) that will tell you that the field “theme” does not exist in that table.

You can fix it by manually updating the database (using the field definition above) or writing a script that will update all courses databases to add the field. The writing of this script is left to the reader as an exercise ;-)


Video activity report for Dokeos

June, 22 2008

There’s some new stuff on the net in terms of code analysis. If you already knew about the CIA project and the Ohloh.net website, and you liked it, you might get a good interest in code_swarm, a java tool that uses SVN logs to generate a (good-looking) video of the project activity in terms of code development.

I played with it a little bit for you, and this is what it looks like…

The video itself doesn’t look too great once it has been processed by YouTube, but you can get a better quality one from here (about 7MB): http://www.dokeos.com/download/dokeos-activity2.avi


No security flaw so far…

June, 19 2008

It might seem kind of weird to mention it, but I had somewhat of a big scare when Secunia sent us an e-mail entitled “Security Patches in Dokeos 1.8.5″. If my fears had been right, it would have meant that we would have needed to re-package 1.8.5 only two days after the official release. Not something I would have liked to do…

However, it was just a basic “request for information” e-mail asking what security improvements had been added to Dokeos 1.8.5 as we mentioned so in our changelog.

The answer is that we integrated Dokeos 1.8.4 SP1, SP2 and SP3, as well as improved input filtering all over (more than anything in the survey and forum tools).

So we still have a robust 1.8.5, which makes me very happy.


Dokeos 1.8.5 released!

June, 13 2008

Dokeos 1.8.5 has been released, after a long 8 months development! Check it out on http://www.dokeos.com/download.php

There’s a lot to say, so I won’t comment about the release itself in this post. You can find out more about this release and what it brings you on the official website, by following the link on the right panel.

We are sorry to have kept you waiting for so long for a new version, but we’re sure you’ll understand why when using it!


CSS changes in Dokeos 1.8.5

June, 12 2008

For the ones of you who are using their own CSS, there are a few changes that have appeared in Dokeos 1.8.5 that might affect you…

First of all, we have removed the “default” style (in the Dokeos package, that is, so it won’t affect you if you are migrating from a 1.8.x). This might affect you if you are upgrading from a 1.6.5, as the upgrade doesn’t handle the preservation of the “default” style, so you first need to copy your “default” style directory over from your old installation, then go into the admin page and change it to the current default, which is “public admin”.

Second, we have added a header and a footer element (look for “corner” in the default.css file) to allow you to style the header a little bit more.

Third, we have fixed the fact that the CSS sheets from the learning path tool were inside the newscorm/ directory. They are now back to the css/[your style]/ directory, which will allow you to finetune them as well.

Fourth, we have *fixed* (I’m hesitating there) the problem of the learning path tool not allowing
the header to be resized (a large header would make the top frame disappear). We know we shouldn’t be using frames, and we tried hard no to, but still, SCORM kinds of blocks you from not using them. So yes, we *fixed* it by removing the top frame, as the Dokeos header just didn’t make sense in this context (it was reducing the view of the actual content which is what everybody wants to see).

Finally, there is now an option to upload new CSS stylesheets directly from the web interface, so you won’t even need to upload your files via FTP anymore. This being said, you need to change the permissions on the main/css directory first, otherwise it won’t let you.


Dokeos 1.8.5 API documentation available

June, 12 2008

I’ve just finished generating the new API documentation for Dokeos 1.8.5. It’s meant for PHP developers only.

http://www.dokeos.com/doc/dokeos_api_1.8.5/


Dokeos 1.8.5 released… kind of!

June, 12 2008

It’s still a bit premature because we’d like to try it out a few times more before officially announcing it on the website, so if you want to help, feel free to download your version from here: http://www.dokeos.com/download/dokeos-1.8.5.zip

In a few hours from now we will make the official announcement, so the official release date will be the 12th of June anyway.

If you happen to witness some wierd thing in the install or upgrade procedure, please, let me know as soon as possible!

Otherwise, just enjoy the ride. Dokeos 1.8.5 is concrete-stable, and this is a stability we will now be able to build on for the next version.


Dokeos 1.8 Code Walkthrough

June, 11 2008

After having a look at a nice little game in Python (Frets on Fire, try it, it’s a game of the likes of Guitar Hero, totally GPL) and seeing that they had a “code walkthrough” page on their wiki, I thought that the name “code walkthrough” was very explicit and helpful so…

I have put together a few lines of explanation regarding the Dokeos 1.8 code for those who just joined the Dokeos development community.

http://www.dokeos.com/wiki/index.php/Dokeos_1.8_Code_walkthrough

It’s not much but hopefully it might save you a few hours of finding your way through the code…