EXELearning Tinkering Under the Hood

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] What is eXeLearning:)?

eXeLearning is a program to help teachers produce learning content (courses) and distribute them online via web pages, and LMS's and offline via CDRoms.

[edit] Why tinker?

EXELearning is an open source project. Version 1 is bieng funded by the New Zealand Ministry of Education up until 31 April 2006. After this of course the project will apply for more funding, but really it will be community that will help eXe to grow.

[edit] Step 1: Getting the source

The source for exe can be found on the exe SVN server. You'll need an SVN client program in order to download the source.

[edit] For Windows Users

For Windows users I recommend using Tortoise SVN (http://tortoisesvn.tigris.org).

1. Download and install Tortoise SVN. 2. Create an empty folder called "exe" 3. Right click the folder and select "Tortoise SVN checkout" 4. In the URL type: http://exelearning.org/svn/exe/trunk 5. Pressing OK will create a copy of the trunk source code in a sub folder called "trunk"

Later you can get other updates to the source by right clicking the "trunk" folder and selecting "Tortoise SVN update".

[edit] For Linux Users

Most linux distributions come with an SVN command line client.

1. In your home directory make a folder called projects or source or work or whatever, (Mine is ~/work/projects). 2. Change to that directory (eg. cd ~/work/projects) 3. Type: svn co http://exelearning.org/svn/exe/trunk exe

This will create subdirectory called "exe" (~/work/projects/exe in my case) containing the source.

[edit] Get the dependencies

Please help in filling out this section. Basically dependencies are: python twisted nevow firefox

[edit] Windows Users

[edit] Linux Users

[edit] Gentoo

emerge python twisted nevow

[edit] Fedora

[edit] Patch Twisted

Twisted 2.0 doesn't have some of the features that exe needs, so we need to add them.

[edit] In Windows

[edit] In linux

cd ~/work/projects/exe patch /usr/lib/python2.4/site-packages/twisted/spread/jelly.py patches/jelly.patch

[edit] Run exe from source

[edit] Remove old config files

If you have a binary version of exe installed, you need to remove the old config files or the source version will be getting content from the binary version and when you change the source version you won't see your changes when you run it.

[edit] In Windows

1. Start, Run 2. "Application Data" 3. Here you may need to make hidden and system files visible. I think it is in the tools menu or something... 4. Delete the "exe" folder

Beware that this will delete all your custom idevices too, sorry.

[edit] In Linux

rm -rf ~/.exe

[edit] Running

Change to the "exe" subdirectory of where you downloaded the source and run the program.

[edit] In Windows

1. Start, Run 2. cmd 3. cd Desktop\exe\trunk\exe 4. python exe

[edit] In Linux

1. cd ~/work/projects/exe/exe 2. ./exe

[edit] Tinkering

[edit] File layout

EXE's source tree is laid out something like this:

exe

|_patches
|_installs
| |_windows
| |_redhat
| |_debian
|   |_ubuntu
|_doc
|_exe
  |_engine
  |_webui
  |_xului

The real code is mostly in the exe/exe subdirectory.

All the "business logic" is in "engine", this is where each Idevice is defined, however, these objects, don't know how to render/show themselves (they know nothing of HTML) they only know how to save and load their data, and how to behave/what that data means.

Each "Idevice" is made up of "fields". There are two types of Idevice, normal ones and "generic ones". Generic Idevices are what one can edit in the Idevice editor; they have no special behaviour, they are just a collection of fields.

All the rendering is done in "webui". An Idevice is rendered with by "block". A field is rendered by and "element"; at the moment all the element classes are defined in one file called "element.py".

The stuff outside of the authoring page (the menus and toolbars and treeviews etc.) are handled by the files in "xului".

[edit] Example Change

Let's change how a Idevice titles are rendered: