Developing your own application

When starting an application, you might want to consider whether you want to build a global application (rightly called "application") or a tool, that is an application limited to the context of a course. For the example here, we are going to create an "attendance" tool. Each example item given below will thus contain the "attendance" name, which you will have to replace by the name of your app or tool.

Both will have the same structure (only a few details will vary), but you will have to locate them
  • inside the /applications directory if it is an application (e.g. /applications/attendance), or
  • inside the /applications/weblcms/tool/ directory if it is a tool (e.g. /applications/weblcms/tool/attendance).

Your application will probably use content stored in the database (or somewhere else on your server). If this is the case, you will need a content object defining the structure and the basic features of your content object. Content objects are defined in the /repository/content_object directory. In this case, /repository/content_object/attendance should be the directory. We will then use this content object reference inside the dependencies defined in the application's

Bitbucket repository

If you want to start working as a team from the beginning, create your repository right away in You need a user account to do that, then go to "Create repository", choose the name of your repository as follows, enter a description, uncheck the "private" checkbox, select "PHP" and give the URL

It is important to use the following naming convention for your app if you want it to be later integrated into Chamilo:

  • if it is an application or a tool, name it chamilo-app-[your application name]-dev
  • if it is a content object, name it chamilo-[your content object name]-dev

The -dev suffix means it is a development version. Later on, when building your app into the release package of Chamilo, we will create a copy of this package without the -dev suffix. This will allow us (including you) to manage a stable version (fixing reported bugs) and a development version (less stable, developing new features).

Cloning the repos

Once/If you created your repository on (or any other nice place), pull it inside your development installation of Chamilo (see Downloading_a_Chamilo_2_development_version on how to do that).

Follow this set of rules (semi-column separate the different commands you would have to run on Linux):


cd applications/; hg clone ssh://[your bitbucket account]/chamilo-app-[your application name]-dev [your application name]

For example (for the attendance tool)

cd applications/; hg clone ssh:// attendance


cd applications/weblcms/tool; hg clone ssh://[your bitbucket account]/chamilo-app-[your application name]-dev [your application name]

For example (for the attendance tool)

cd applications/; hg clone ssh:// attendance

Content object

cd repository/content_object/; hg clone ssh://[your bitbucket account]/chamilo-[your application name]-dev [your application name]

For example (for the attendance content object)

cd repository/content_object/; hg clone ssh:// attendance

Application / tool: creating description files

An application description file ( has to be located in the "php" directory of the application and be called "". The file will look like this:

<?xml version="1.0" encoding="UTF-8"?>
        < code >attendance\< /code >
        <authors>Julio Montoya &amp; Yannick Warnier</authors>
        <description>A tool for the weblcms application where attendance content objects can be created and used.</description>
                    <version type="4">5.3.0</version>
                    <version type="4">0.0.1</version>
                    <version type="4">2.1.0</version>
                    <version type="4">2.1.0</version>

(note the spaces around the < code > tag are not supposed to be there. This is just a quick fix to showing this tag in this documentation)

There is a properties.xml as well, which is generally much shorter:

<?xml version="1.0" encoding="UTF-8"?>
<tool name="attendance">
        <property name="section" value="basic" />

Content: creating description files

The next step is to go further into the content object creation, so that we can treat the data from inside the application. The first step to do that is to

Application/tool: creating the class file

The next step is to create a class file








Submanager / subcomponents





How to start a new application


Sortable Tables

Updated by Yannick Warnier over 10 years ago ยท 5 revisions