Home > Development, Dokkeos, English, Techie > First annoying bug in 1.8.5: learning path theme feature

First annoying bug in 1.8.5: learning path theme feature

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 ;-)

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: