Fosdem 2005 - Presentation about code structure

From Dokeos

Jump to: navigation, search

This presentation will last 10 minutes, after that we have to allow room for questions. Since we have so little time, we will have to focus on directly practical stuff. We will explain the current status of Dokeos, which means the CVS code, because that's where developers should focus on.

Contents

Folder structure

Inside the Dokeos installation folder, you will find several folders:

  • archive folder, where course backups are created
  • course folder, which holds all the courses
  • code folder (called claroline)

The course folder is new, will be released to the public in Dokeos 1.6. It's a big cleanup since all versions before that (up to 1.5.5) stored courses directly inside the install folder, drowning all the others with hundreds of course folders. Having them inside a separate folder also makes security easier.

The code folder (which is called claroline as a sort of tribute

Single and multiple database

Dokeos can work with one single database, or with multiple databases: three main databases and one extra database per course that is created.

The single database mode is often used for people who don't want a big installation or pollution of their MySQL database. It's also very convenient to install Dokeos on a commercial provider.

The multiple database mode is the one that is always used in large universities.

API

The Dokeos developers, especially after version 1.4, have wanted to reduce the code size and complexity and create larger, easier to use "building blocks" for tool, module, plugin prorammers. That's why we are building code libraries so no tool has to reinvent the wheel. We're far from finished though.

Current good and usable API's are the main api, the display and database libraries, and the XML Dom library. These are all up to date and often improved. There are XML Dom libraries native in PHP, but we have a special one (by Rene haentjens) that works for our needs and works in PHP 4 and 5.

The next serious updates will probably be in the document, user and course library

File structure

Configuration files are at inc/conf/ The claro_main.conf.php is the main configuration file, holding very important information like the database user and password, the web and file system location of Dokeos, etc. Other configuration files hold option sfor tools, but we are converting to a new system where admins can change settings through the web.

We are not going to discuss this in detail. The

  • claro_init_global.inc.php

Code libraries are at inc/lib/

  • main_api.lib.php
  • claro_init_local.inc.php

The most basic plugin (plugin/template.php)

Explain the code at http://cvs.sourceforge.net/viewcvs.py/dokeos/dokeos/dokeos/claroline/plugin/template.php

but we keep it simple, and next Yannick will have much more to say about this

I want to know more

Great. That's why we've just started a whole new Dokeos programming tutorial.

Personal tools