Archive for February, 2008

Dokeos videoconference 2.0 February update

February 27, 2008 31 comments

The videoconference tool for Dokeos, version 2.0, is pretty much in its final days of preparation. We hesitated to release it as standalone last Monday, but we still had a lot to fix (little graphical stuff, logging features, authentication system, etc).

It doesn’t really offer much new features. Basically it will be about the same as version 1.0 for the final user (only more beautiful and more reliable).

The improvements are:

  • improved source code lisibility
  • improved sound and video quality
  • improved styling flexibility (you still have to recompile the app, but mostly you can change a lot of things from a CSS stylesheet and image items)
  • logging features: the Red5 (streaming) server writes connection information in a log file
  • authentication feature: a password must be sent by the portal using the Red5 server
  • improved easiness of installation: you can now install the default Red5 package for Ubuntu, copy one file into its directories, configure a configuration file (for passwords) and there you go, Dokeos can use it!
  • using Dokeos language files, effectively translating the interface in over 30 languages
  • direct link to course documents (you can show slides that were previously imported inside the course)
  • improved graphical design

And here’s a screenshot for the curious (I know, the look changed since last time, and it’s probably going to change just a little bit more before Monday as well)

Videoconference 2 preview

The current plan is to come out with a release next Monday (March 3rd), with a demo website and some documentation on how to update an existing 1.8.4 portal to enable the new videoconference, and of course a package to uncompress in the Dokeos folder.

For the techies of you, it’s made in OpenLaszlo 4, generates a Flash Plugin 8 interface and uses Red5 as a streaming server, so if you exclude the player needed to use it inside a browser, it works entirely out of open-source technology, is entirely open-source (GPL) itself and works in every major browser that integrates the Flash plugin.

The Flash plugin itself, however, doesn’t accept most webcam inputs, as already stated in another of my posts and there are still sound modulation problems when using it between a Windows/Mac and a Linux computer (the sound is funny)

OTRS 2.2.1 Open Source Ticketing System – Not easy to tune

February 22, 2008 1 comment

In one of my parallel tasks, I have been asked to help tuning an OTRS installation for a small belgian association. Although I’m generally trying to avoid getting into Perl applications, this was part of a more complete service and, having a bit of experience in Perl (from 4 years ago) I decided to go for it.

Not really wanting to start a flame wars here, I think it can be said that OTRS has most of the critical flaws a bad Perl application has:

  1. not well documented (code-wise) – it takes hours to actually find where the configuration file is and that it’s actually partially overwritten by another configuration file. And so does it to understand how the Interface module calls the configuration file to display a page that is setup partially in each configuration file.
  2. the coding style uses a lot of Perl “features” that make it practically impossible for a non-Perl developer to understand what such function is actually supposed to do
  3. the resulting user interface lacks a usability touch, which makes it very impractical to use

If I were to choose a ticketing system right now, I would probably go for one of Joomla or Drupal’s plugins instead.

But this article is also meant to be a quick recap’ of how to find your way in this mess to avoid losing the time I’ve lost, in the context of trying to slightly alter the global behaviour to skip the need of maually creating a login, an e-mail address and a customer ID for a client.

I was once told that OTRS could be almost entirely configured from the database. I’m afraid this is completely wrong. The database allows for user preferences to be recorded, but that doesn’t change global behaviour.

Let’s have a look at the code hierarchy. In a Debian-packaged OTRS installation, you will find the following structure:

  • bin
    • cgi-bin
    • fcgi-bin
  • doc
  • Kernel
    • Config
    • cpan-lib
    • Language
    • Modules
    • Output
    • System
  • scripts
    • auto-build
    • database
    • test
    • tools
  • var
    • [misc stuff]

The bin directory is not really worth mentionning in the perspective of a quick hacking of OTRS.

The Kernel/Modules directory is where most of the important classes lie. The Kernel/System is where you will have to modify behaviour once you are sure there is no way to change the configuration to get the same result. The configuration files themselves are found (strangely, as the Debian install creates an /etc/otrs directory for you) in Kernel/Config.

The configuration files are loaded, in my experience, in this order:

  1. otrs/Kernel/Config/
  2. otrs/Kernel/Config/files/

I have no idea where this config load order came from, but there you go…

Let’s get back to our list of things to achieve…

First, we want to be able to remove the necessity of an e-mail address as a mandatory field in the insertion of clients (and pretty much anywhere else). This is done by finding the CustomerUser Map in the file (around line 1150). In the mapping of fields, you will find one line that looks like this:

[ ‘UserEmail’, ‘Email’, ’email’, 1, 1, ‘var’, ”, 0 ],

As commented on the first line of this Map, the 1,1, part means the field is visible *and* mandatory. Just change the second 1 for a 0 and you should be set with the e-mail address field being mandatory. That was easy.
Be careful not to comment this setting out though, as this would result in the field becoming invisible for most parts of the application.

Second, we want the login to be generated automatically. Just above this CustomerUser map, you will find the following lines:

# generate auto logins
# AutoLoginCreation => 0,
# generate auto login prefix
# AutoLoginCreationPrefix => ‘auto’,

Make sure you change it for this:

# generate auto logins
AutoLoginCreation => 1,
# generate auto login prefix
AutoLoginCreationPrefix => ‘auto’,

And you should have auto-generated logins now. Now because you know you’re never going to want to actually enter this login manually, modify the map below to hide this field

[ ‘UserLogin’, ‘Username’, ‘login’, 0, 0, ‘var’, ”, 0 ],

Finally, we want the customer ID to be automatically generated. This is a bit more complex. We will need to customize the code a little bit. First, add an additional setting next to AutoLoginCreation, something like:

AutoCustomerIDCreation => 1,

Then move to the Kernel/System/CustomerUser/ and find the CustomerUserAdd method (around line 300). Add a section like follows:

if (!$Param{UserCustomerID})
my $SQL = “SELECT MAX(customer_id) FROM $Self->{CustomerTable}”;
$Self->{DBObject}->Prepare(SQL => $SQL);
my @Row = $Self->{DBObject}->FetchrowArray();
$Param{UserCustomerID} = sprintf(“%08d”,$Row[0]+1);
$Self->{LogObject}->Log(Priority => ‘error’, Message => “Need CustomerID!”);

I’ve let a deliberate laziness mistake here. This code will cause problems if more than one person is adding a client at the same time. There is no concurrent access prevention, which means that two employees entering a new customer at the exact same time will generate the same CustomerID.

In the case above, the newly generated customer ID will look like “00000017” (always 8 digits) and will increment each new customer ID of 1.

Obviously, you will need to make sure that if you have some data in your database already, it respects this new numbering. Otherwise, you’re in for a big surprise while trying to find out in a lot of particularly fine ways why the customer data doesn’t show in one ticket…

On a side note, you might find useful to know that logging errors in the Apache log can be done through a call like this one (pretty much anywhere in a class):

$Self->{LogObject}->Log(Priority => ‘error’, Message => “Need UserLogin!”);

Also, if you want to dump a hash, you might want to load the Data::Dumper library and then use Dump(%onehash):

use Data::Dumper;

$Self->{LogObject}->Log(Priority => ‘error’, Message => Dump(%onehash));

I hope this was useful. It certainly would have been to me, but the documentation on the OTRS website seems mostly geared towards interface-administrators…

Categories: Development, English

VLC player bug – video going back and forth

February 17, 2008 Leave a comment

VLC player is (in my view) by far the most practical and complete DVD player for Ubuntu. There is not one DVD I haven’t been able to play on my computer since I started using VLC.

Recently, however, after a low level clean-up of my Ubuntu packages, VLC player has been showing a very strange symptom: the video is was moving back and forth continuously on a half-a-second slice, while still playing ahead and the sound still being alright.

Anyway, the only way to fix it was to go to the Preferences panel (inside Settings menu), Video, Output modules, tick Advanced options. In the possible options, pick X11 video output (or any other option that fixes the problem for you).

That fixed it for me.

PHPEclipse 1.2.0 for Eclipse 3.2.2 on Ubuntu Gutsy

February 15, 2008 Leave a comment
For those having problems with more recent versions of Eclipse, I
recommend reading my other article on this blog and more importantly
the header note for a non-Ubuntu solution.

To make a long story short, it doesn’t work (at least in this versions combination)…

I’ve tried it many time with any combination of attached plugins installed or not, with GCJ instead of Java 1.6, but it always coms out with an error when trying to opening any PHP file. The error recommends checking the logs. The logs, in turn, mention that something is wrong with JFace

!ENTRY org.eclipse.jface 4 2 2008-02-15 15:34:07.081
!MESSAGE Problems occurred when invoking code from plug-in: “org.eclipse.jface”.
java.lang.NoClassDefFoundError: org/eclipse/ui/ide/FileStoreEditorInput

So in the end I searched the net a little bit and decided to downgrade a little bit to PHPEclipse 1.1.8, which following a few comments on had quite a lot of bugs that were fixed in 1.2.0.

Well, guess what? It works perfectly well. Of course, it doesn’t have fancy stuff like the XDebug plugin, but honestly this one isn’t too well documented, which makes it a bit useless in the end.

Dokeos 1.8.4 SP2

February 13, 2008 Leave a comment

Please note that this patch has been integrated in Dokeos 1.8.5, released on the 12th of June 2008, and that there is also a Dokeos 1.8.4 SP3 patch available on the security page indicated below.

There’s a new security patch out there for you if you have a Dokeos 1.8.4 portal (if you have below that, I recommend you upgrade to 1.8.4).

As stated on my “Dokeos 1.8.5” page, the release has been delayed a bit more in a hope to provide a few additional and essential features to this version (notably, and extended system of templates for exercises, that will allow for rapid exercises building of many types).

So, because of that additional delay and because these vulnerabilities were found by a Russian team in our code, I felt it was essential to provide a clean patch. You can find all the info you need on our public wiki:

As I was trying to provide this patch first to our registered users, I suddendly remembered we had a problem with the automatic-registration script, which ensures that everyone wanting to have his/her portal registered on this page could actually do that from the administration panel of Dokeos and get the administrator’s e-mail sent to us (and very short info on the portal url, number of courses and number of users) so we could send them the security updates.

As this script was broken, and as I realized it had been for quite some time (a few months), I spent most of my week-end free-time fixing and improving it. Although it doesn’t assign the country correctly just yet (which I’m going to fix as soon as I manage to install GeoIP on our server), it’s pretty much working now, and we already logged about 100 new portals since Monday morning, which makes us quite happy (the number had frozen at about 1600 campuses in May last year, and the newly registered campuses were registered in another database, so in the end we are now well over 2400 campuses all together).

New videoconference tool on its way

February 5, 2008 Leave a comment

I’ve been pretty busy the latest couple of days developing the new videoconference tool to improve its CSS configuration. It’s scheduled to be in production with Dokeos 1.8.5, but so far the main bits have been put together in a one-on-one mode only. I thought giving a little preview might be of some interest.

Videoconference 2 preview

Basically, we have reached a point where it is fully working, but the styling is only there for one-on-one and not for one-to-many or meeting-of-four. So there’s still enough work before 1.8.5, but it’s mainly a question of styling.

In response to a question I’ve been asked, Dokeos does not provide a DimDim integration (as does Moodle) because we have tried to install DimDim and it was even harder than the Dokeos videoconference tool. Also, not being entirely clear over its licensing terms, we preferred no to base our tool on DimDim. But we have thought about it for some time…

For me, however, getting to this point means I can finally get back to work on the main new features and bugfixes of Dokeos 1.8.5 ! Hurrah!

%d bloggers like this: