Offline Moodle: Moodle Client Project

Offline Moodle: Moodle Client Project

by Thanh Le -
Number of replies: 47

Moodle Client Project

Overview

This is a post to announce the work that the Open University is working on in partnership with Intel on producing a Moodle client that has the ability to synchronise with a remote Moodle server.

Trawling though the public Moodle forums there has been prior discussions which serves as useful background information to our work; see: http://moodle.org/mod/forum/discuss.php?d=45633 .

Given the complexity and scope of this project, this is an initial posting to describe our work and to gather interest. There will be future postings that cover more technical aspects of our project. At this stage, we welcome feedback from the community on any issue that arises from reading this posting.

What are the usage scenarios for this project?

Our original starting point was to provide a solution for those users who would like to use Moodle on their local desktop/laptop computer and in a situation where they are not online; whether that be because of lack of internet/network infrastructure being available or because of financial issues such that they cannot afford constant connectivity.

The scenario can be extended to users who are mobile and are constantly on the move and carries a small laptop/ultra mobile computer as part of their travels. In this scenario, they will have limited connectivity whilst travelling on public transports (planes, trains, boats, and cars) but will have intermittent connectivity when they are between destinations or when they arrive in an office or accommodation that offers internet access. As such, for some periods they will work offline and for some period work online.

A final scenario arises as a benefit of supporting the two previous scenarios. In this scenario, the Moodle client is a standalone instance of Moodle that can be synchronised with a remote Moodle server. The Moodle client can then be considered the Personal Learning Environment (PLE) that a learner controls. Through the functions of the Moodle client, he or she can synchronise with an institutional Moodle virtual learning environment (VLE) and grab content and resources as published by the teaching institution. Similarly, the Moodle client user can compose content (e.g. Moodle Forum postings, etc.) through their Moodle client in offline mode and synchronise changes to the Moodle server when they are ready.

Global benefits

Some have argued that this work is irrelevant given that today, everyone is connected to the internet such that an offline, syncrhonisable Moodle client is unnecessary.

This statement may be true of the richer nations in the world and also those living near hi-tech capital cities. But for the developing nations, connectivity is I believe a serious issue which leads to such issues as “information poverty”.

I believe this project and it's potential outcome will reinforce and add value to the various current projects related to offering laptops to each and every child. Intel is sponsoring the Classmate PC project (see: http://www.classmatepc.com/ and http://www.vnunet.com/vnunet/news/2155284/intel-takes-laptop-per-child ) and MIT’s Nicholas Negroponte is promoting the One Laptop per Child (see: http://laptop.media.mit.edu/ ). Whereas these project initiatives tackles the technology and hardware provisions, this project may offer the software solutions to the hardware package with Moodle as the central learning platform both online as the VLE and offline as a potential PLE.

Moodle Hub

There are some parallels in this project with the Moodle Community Hub project; see: http://docs.moodle.org/en/Community_hub .

I see the key difference at this stage is that the Moodle client is owned by the learner and through the Moodle client can connect with institutional Moodle servers to gather content and resources and to post personal content and resources.

The same technology and development produced by this project can be used for the Moodle Community Hub project to allow Institutional Moodle server talking to another Institutional Moodle server, but presently this is not the focus of this project.

What is the architecture of Moodle Client?

Moodle client is a full, standard installation of Moodle on a desktop/laptop computer. The key difference is where possible we will help the user configure and install Moodle on their local computer with no technical knowledge whatsoever. Assuming, the installation is a smooth process, the user will have a fully working Moodle instance on their local computer and effectively can have full admin control of that Moodle instance.

Moodle becomes Moodle Client through possessing an additional Moodle module which gives the local Moodle instance the capability of synchronising with a remote Moodle server. The remote Moodle server will have a counterpart Moodle module installed to support the synchronisation process.

The synchronisation module and all communication from it are initiated by the Moodle client. Moodle servers simply respond to Moodle Client request and can decide for security reasons to reject or deny any request from the Moodle Client and also filter and select what data processing operations to perform. Similarly no Moodle server can initiate communication with a Moodle client and as such no network ports or external public access is required from the machine running Moodle client.

Moodle client will only synchronise with those Moodle modules that have extended their capabilities to support synchronisation. Our perspective is that we are offering the infrastructure for synchronisation to happen between Moodle Client and Moodle server; but leaving the actual modules that support this capability as a decision for Moodle module developers to opt in and provide support. From our own project perspective, we are aiming to produce a fully working syncrhonisable solution for Moodle Forum as a proof of concept and also as a potential benefit for the Open University’s own business requirements.

Work done to date

We have completed technical feasibility study and technical proof of concept. This work has given us confidence to make this public posting.

Our technical proof of concept demonstrates that a client Moodle instance cans synchronise with a Moodle server instance with the focus on Moodle Forums as the module being synchronised.

In this proof of concept, synchronisation is one way with the client requesting Moodle Forum changes from the Moodle server. After the synchronisation process is completed, the Moodle client will possess the same data as the Moodle server. The test can be continued by making further changes on the Moodle server and repeating the synchronisation process to replicate the server changes to the Moodle client.

The outcome is a simple synchronisation between two Moodle instances, but the bulk of our work has been developing the needed infrastructure to support this processes with minimal changes to Moodle core code and also minimising the impact required from Moodle module developers to make their Moodle module synchornisable.

We have technical documents outlining our solution and also a downloadable demonstration of our technical studies. Please contact me ( d.t.le@open.ac.uk ) to register your interest and I will provide details to the documentation and code.

Work Schedules

We are aiming to provide a working solution with Moodle Forums as our key demonstrator for the next Moodle Moot in October 2007.

Given the technical feasibility is now completed, in mid-May 2007 we will start in earnest in developing Moodle Forum as a synchronisable Module.

The latter half of the development will concentrate on developing an installation wizard that will help a non-technical user install Moodle Client on their local desktop/laptop computer and have it configured to talk to a remove Moodle server.

Final words

There is a lot more to say about this project, but this posting serves as an initial posting to gather people’s interest and feedback in helping this project develop.

I am very keen to gather community ineterest in this project and also whether people are keen to donate their time and effort.

Feel free to contact me directly or through the postings.

Thanks,

Thanh Le.

Average of ratings: -
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Larry Elchuck -
Excellent Project Thanh Le

I am in a country that has a pretty good deployment of broadband (Canada) but we still have need for such a setup to allow teachers to work offline and sync back to the main moodle server. Some do live in rural parts of Nova Scotia and broadband is an issue. Others prefer the independence that such a synchronizing capability gives them.

Currently I maintain a MAMP version (for macs) and an XAMPP version for PCs that users download and can use to create local installs of their courses. When I update the linux server, I also update the moodle folders for the mac and PC builds and allow teachers to update their builds by replacing these folders. Of issue, is the ability to update their databases, particularly with any system changes done at the admin level (adding/removing modules, admin settings, etc.)

The teachers' courses (or parts of courses) can be uploaded back to the main server but the synchronization of student data between the two is also of concern. In a post I made in the past couple of days, I raised this issue, so your announcement is timely for us.

Our local versions include the core and third party modules that we deem essential. The issue of backup and restore exists for some of these third party mods, and this creates a problem for us. No doubt, this can be an issue for the client project, as well. I am hopeful that your institution or others will take up the challenge to ensure that popular third party mods can be easily adapted to allow for syncing, in addition to those that are part of the official core. I realize it is a big task.

We consider an internal mail mod (such as internal mail), a student files area (such as MyFiles), a true survey module (such as feedback) and a booking module (such as scheduler) to be core to our implementation of Moodle. I'm sure that others have differing views on which third-party mods (if any) are needed to round out their moodle installations. Ensuring that the code is available to allow for syncing of these modules will allow for local versions of the main site to replicate the entire course for individual teachers.

Many of our teachers are moving to Moodle from WebCT and from Microsoft Class Server. Some have had access to this feature in at least one of these systems and they are dependent upon this approach to get their job done.

As this project evolves, we are desirous to implement it in our systems.

regards
larry

In reply to Larry Elchuck

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Hi Larry,

I'm Colin Chambers and am working closely with Thanh Le on this project and have worked on the majority of the code to date. This posting is a summary of a much large document we have created which outlines the work we have done and our future intentions much more clearly. Due to space reasons we haven't included it here. Please contact myself at c.chambers@open.ac.uk.

It's great to get some positive feedback and to hear some more ideas that could be developed. We certainly feel that this project can address some of the issues you have highlighted such as :
  • Synchronising scores from a teachers laptop
  • maintaining courses locally and synchronising when possible
To give everyone a bit more information I have included an excerpt from our documentation which gives more detail on how the synchronisation process is expected to occur from the perspective of the user. Our apologies if the text is too technical, however we have attempted to give a general idea of the steps involved and how this will appear to the user:

 

Overview

The synchronisation of Moodle Components is a complex process which is guaranteed to require input from the user. A basic configuration interface will be provided using the standard functionality provided by Moodle blocks. This will allow configuration of Moodle Server and Moodle Mobile details and specific defaults to be used during the synchronisation process. The administration of the synchronisation process itself will provide methods to resolve merging conflicts that occur when the same item has been edited by multiple Mobile instances.

Process in detail

There are two distinct sub-processes to the overall synchronisation process following the principal that the mobile instance must initiate and control the synchronisation process. These are:

1. Identification. The mobile user must select the mobile and server data to synchronise

2. Export. Synchronisation of data from the server to the mobile instance.

3. Import: Synchronisation of data from the mobile instance to the server.

The export process must happen before the import process. Therefore the export process will present the greatest challenge because all merging conflicts must be addressed. This makes the import process very simple since all conflicts have been dealt with and data can be updated without further processing.

The option exists to perform the export and import processes as discrete steps. Synchronising each set of data in turn. This would result in a lengthy and inefficient process. Therefore once the data set, the items to be synchronised, has been identified by the user the export process will be applied to entire the data set before the import process can be applied.

Now we will illustrate this process in more detail.

Step 1: Identification of data

The synchronisation process has the potential for taking longer than the user would prefer if for example the Mobile Moodle instance contains a large number of courses and modules that could be synchronised, and the internet connection speed and bandwidth being used is limited. To address this we feel it best to allow the user to synchronise only the items they desire. For example there may be courses and modules available on the Mobile instance that the user is following but is not working on at the current time. Thus related changes are not relevant as they can be synchronised at a later time. Therefore an interface will be provided to enable the user to identify the data that is relevant to this synchronisation session. This has the added benefit of also reducing the load on the server. The level of granularity provided is yet to be determined. The user will not control synchronisation of core data as this will be handled internally. The user will only control the synchronisation of course data. We plan, initially, to provide the option to select items at the level of courses and forums but not discussions or posts.

Step 2:

The main challenge of the export process is handling conflicts where items have been edited by multiple Moodle Mobile instances or by the Moodle Server itself.

The overall process is expected to be:

1. From the database synchronisation tables identify the items with and without conflicts.

2. Synchronise the items without conflicts ignoring the items identified as having a parent with a conflict.

3. Return to the Mobile instance details of the items with conflicts along with details necessary to resolve the conflict.

4. The user at the mobile end will choose to either:

· update the server with the change on the mobile instance.

· leave the server unchanged. This will remove the record of the change from the Mobile instance ensuring that the conflict is resolved. The local item will only be updated when the import process is run.

· edit their post on the Mobile instance, make the necessary changes and then post this update to the server taking account of the conflict.

Repeat steps 2, 3 and 4 until all conflicts have been resolved.

The document goes on to describe the various conflict scenarios that we envisage.
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Rick Barnes -
Have you considered giving the user teh option to decide what needs to be synchronised. I'm thinking of teachers who for example may be creating anew course or preparing posts to a forum ahead of lessons being able to use their moodle to create information that they do not want to sync imediately.
thsi could allow staff to use their moodle as a training and practice moodle with admin rights as well as synching some content with their institutions moodle.

Rick.

In reply to Rick Barnes

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Hi Rick,

I'm a technical developer on the project. Your question is a good one and we do indeed have a plan to allow users to choose what to synchronise at any particular time. The main reasons we feel this is necessary are:
  1. Reduce bandwidth use between client and server
  2. Reduce overall load on the main server
  3. Allow fast synchronisation of selected items when required
  4. Avoid synchronising large files or sets of data when time or bandwidth is reduced
The granularity that the process will allow via its interface has yet to be decided so whether users can pick and choose individual posts and threads or just forums for example isn't yet clear.

Permissions are also synchronised and used to filter the content passed to the client. so, given your example, a teacher could avoid giving pupils permission to the content until it is ready. Until that point pupils would not be able to include the new course in the synchronisation process.

It is also worth checking my response to Larry's comments above as I have provided more detail into how the user will be able to interact with the synchronisation process.
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Hugues Pisapia -
Just a question: how are Activity modules and Blocks going to be handled in this tool?
- Hugues
In reply to Hugues Pisapia

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Hi Hugues,

Your question is quite far ranging so I will try to answer it from a couple of angles.

At a basic level our work on synchronising the Forum activity module from client to server has required synchronisation of related blocks. In this context Blocks provide discrete sections in the moodle interface often used to provide summary information for courses or modules. They provide little in the way of interactivity that needs to be synchronised except for configuration information, for example the block title and its position. Modules, including activity and resource modules, often provide many tools for interactivity and thus lots of information to synchronise.

To ensure the client project does not interfere with current work our aim is to provide an object oriented synchronisation interface that is extremely simple and efficient for developers to use. However it will not be mandatory for blocks or modules to implement and support the synchronisation feature.

Perhaps this question can also be answered by this excerpt from our technical documentation:

The overall requirement is that after a synchronisation session the databases on the servers must be identical at the record level for the items that were synchronised. This will ease the management of the servers and assist in determining the source of a problem by comparing the records on each server.

We hope this answers your question Hugues.

In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Sharon Collins -

Hi all,

I am located at East Carolina University and we are also very interested in finding a way to synchronize the information in the course.  We have a large distance education population that is on deployment and does not always have access or has limited access.  I will email you separately to find out more about the project. 

Sharon Collins

In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -

Hi Everyone,

We’ve been working feverishly and now have a snapshot of theuser interface to be used for synchronisation. It is still very much a work inprogress but is beginning to take shape. Hopefully this will give others anidea of how we are intending to tackle the process. You can access the snapshot at http://webfc1.open.ac.uk/~colin_chambers_2/shares/Offline%20Moodle/Snapshots/introduction.html.

We have also provided a few more diagrams along with thelatest version of our continually improving Specification document to helpeveryone understand where we are heading. We have begun to get more and moreinterest which is great to see. Hopefully the release of this snapshot willgive you all something to get your teeth into.

So what is a snapshot you ask? Well simply put we want toprovide an ultra realistic vision of the interface Moodle will get to enablesynchronisation. It’s extremely realistic because it’s provided in exactly thesame way Moodle is i.e. via a web browser, and uses all the same components.The only difference is that it is not dynamic i.e. it is not hosted on a webservice and it doesn’t actually manage anything .

So if it works in your browser it will work in the realthing and vice versa. You are welcome to pass this url to anyone you want totest it. The files are available in a zip, so if you need an offline versionjust get in touch. So now is your opportunity to really get involved and give us some feedback.

  • Tell us the key features we’re missing.
  • Tell us if it’s accessible/usable.
  • Tell us if you would/ would not use it.
  • And above all tell us how to improve it.

If you need to contact me my email address is c.chambers@open.ac.uk

In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
The previous url for the Snapshot files was on a temporary host. East Carolina University have expressed their interest in this project and have begun working closely with us. They have provided a more permanent host for the snapshot files at http://hawk.aos.ecu.edu/mobilemoodle/introduction.html

Please go to the introduction.html file as written above. Firefox no longer redirects from the index.html at http://hawk.aos.ecu.edu/mobilemoodle/ for some reason. We'll address this in the next snapshot
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
As part of our collaboration with East Carolina University we wanted a common work are to discuss and manage the project in a collaborative fashion. We agreed to set up a Moodle course with which we could work together and share our thoughts. If you would like to get involved then just visit http://hawk.aos.ecu.edu/moodle/course/view.php?id=22
As the project progresses more and more of the documentation and discourse will be provided here.
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
The latest snapshot version v0.4 has just been released and is available at http://hawk.aos.ecu.edu/mobilemoodle/ .This release focuses mainly on consolidating the work already done. Improvements have mainly been made around the areas of usability and accessibility. There are plenty of improvements planned but I think you will agree the interface is beginning to take shape.

We need your comments and ideas on how to take things forward. We especially need to know if there are any significant issues that we have failed to address or that we have introduced that could cause particular problems in the future.

If you want to get a bit more involved then you're welcome to visit http://hawk.aos.ecu.edu/moodle/mod/forum/discuss.php?d=23 to have your say.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Martín Langhoff -

Hi Colin and Than!

hadn't seen this thread before. Really interesting! This is an area I have in the backburner to explore as soon as I get a chance. A couple of quick questions / ideas...

  • Have you explored a GoogleGears type approach? I am very keen on it as a soft-install path if GG can be counted on. (A big if, I know). I am exploring this track on behalf of OLPC - they have a python-based thingy that is pretty close to GG. The main downside is that it would involve re-implementing/shadowing a lot of moodle functionality on the JS side.
  • On the full moodle-on-student-computer track, it should be "relatively trivial" to port moodle to sqlite - which is compiled into the PHP package of Moodle-on-a-stick and related projects. Shedding MySQL things a ton lighter.
  • On the synchronisation track - what techniques are you using? I know a team in Sydney has a Firebird port of Moodle 1.7 that reportedly has built-in transparent bi-directional sync, but I have no idea how it works. Sounds too good to be true, but the developers said it was all made easy by some Firebird features. (I think David from Edumate has posted here before about it, but cannot find it now...)

And last, but not least - is there anywhere I can track your code changes? smile

In reply to Martín Langhoff

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -

Wow Martin, thanks that’s really helpful. I have answered each question in turn:

· We’ve looked briefly at Google gears and decidednot to go with it for now. The reason is that the code that does the workappear to be javascript on the client side. There isn’t a web server behind thescenes running php. It seems more logical to enhance the existing php code andfind a way to run this on a client rather than create a ported version ofMoodle which must be maintained. It’s also so early in the game we want to seehow GG develops.
We’re leaning towards an XAMPP or dsl (Damn Small Linux) approach and are notfocussing so much on the size of the installation. A colleague has an XAMPP installtaking around 500mb. On a 1gb usb stick this leaves just 500mb for coursedetails but 4gb and possibly 8gb sticks aren’t that far away from beingeconomically viable. I’ve also found tiny hard drives no bigger than an ipodfor around £40 with 40gb space. Again these will be coming down in price andjust need institutions to figure out how to pay for these things. I’ve heard that many institutions give their students technology from laptops to usb sticks so I’m sure some financial types will figure out how to make this viable.Check out http://hawk.aos.ecu.edu/moodle/course/view.php?id=22 and look at the Moodle on a stick area. Please chip in, it sounds like you’ve got some great ideas. Just register yourself and you’ll have full access.

· We’re looking at SQL lite and may go with this but it hasn’t been decided yet. Partly because all the Moodle on a stick options currently have mysql as the chosen db so it’s just easy to stick with that for now. We also haven’t fully test sql lite on Moodle. Could be a goodchange to make though if code footprint becomes an issue.

· We are simply using Moodle core components such as backup and mnet to do a large part of the work. We’ll add some extra synchronisation classes as required to do the rest of the work. We store details of changes and use the backup module to pack and unpack these changes in a standard fashion that can be easily transported. We then use mnet to provide web services between the server and offline client. The extra classes will perform merging of the data and filter out unnecessary or insecure data.

That’s the gist of our approach. The project is about proving the process is possible and reliable. So by the Moodle Moot we will have a basic synchronisation working and we’ll be much clearer about all the issues that still need to be addressed. Lots of things such as security, scalability and cost to name a few things will become relevant at that point. Before that we've been tasked with providing something worth talking about.

I checked out Firebird but google brings up a RDBMS and Moodle shows a different version of Firefox. So I’m not sure which you’re referring to. Also if you could put me in touch with the guys at Edumate that would be excellent. It would be great to swap ideas.

· At this stage our cvs is internal only. So we zip and email the code base when necessary. I can certainly put a zip of the latest code on the web for you to download if you’d like and I could include a readme on the changes we’ve made.

It’s worth bearing in mind that we’re very much in a proof of concept mode. We want to develop a working solution and provide it to the community after the Moot. We’ve kept things componentised so that when it is released to the community we can all look at each component and, if necessary, redesign it or swap it out for another component without affecting the other parts.

Thanks a lot for the input Martin, good points and we're looking forward to your response.

In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
Hi Colin,

very interesting project. I ever told people an offline Moodle is not possible.

<We’re leaning towards an XAMPP or dsl (Damn Small Linux) approach and are notfocussing so much on the size of the installation. A colleague has an XAMPP installtaking around 500mb. On a 1gb usb stick this leaves just 500mb for coursedetails but 4gb and possibly 8gb sticks aren’t that far away from beingeconomically viable.>
2 answers about using XAMPP
  • we are using uniform server. This package including a moodle 1.8 needs 75 MB on HD. We use it also as a working system from USB stick without problems. We use a virtual folder w:\ and the complete system works on this folder
  • I don't know what you do with XAMPP if a student can't install the system on the folder you've defined for the Moodle system.
In reply to Ralf Hilgenstock

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Fantastic Ralf,

I certainly hadn't heard of uniform server, sounds interesting. We'll look into this thanks.

Installation and support issues are likely to be a real bug bear. That's why we're keeping this as a POC for now. Best to prove it can be done and then look at what issues still remain. For now there are a few options we have in installing Moodle.
  1. for laptops Moodle could be installed directly. Not an ideal solution but at least we know it will definitely work and have sufficent resource to work with.
  2. Install to a removable storage device: most likely solution long term
  3. As 2 but have the code encapsulated in an OS (Probably Linux) that can provide a layer for security etc. Offers benefits but also potential support and development issues
So in answer to your question, you raise one of many questions we have on installation. We're confident that over time these can be addressed but we don't have the answer right now.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Frederic Lepied -
Hello,

I'm working for Intel and I'm involved with the Open University on this project. Colin would like that I describe what we are doing currently. So here we go.

Installer

About the delivery of the solution, we are working on creating an installer to simplify the deployment and test of a Mobile Moodle. The idea is for the POC is to deliver a self extractable installer that will install a WAMP stack and Moodle already installed and preloaded with data to be ready for synchronization. The choice of the components are the following:

The choice is based on experimentations and just finding working solutions. There is no optimization or quality criteria. So any advice is welcome.

Sqlite3

We also worked on a patch to support sqlite3 as a database backend but the modifications don't work anymore as Moodle has evolved since we made them. Let me know if you would like to give them a try.
--
Fred - May the source be with you

In reply to Frederic Lepied

Re: Offline Moodle: Moodle Client Project

by Larry Elchuck -
Are you limiting this Moodle Client Project to Windows desktops only .. or are you going to develop Mac (and Linux) one(s) as well?

larry
In reply to Larry Elchuck

Re: Offline Moodle: Moodle Client Project

by Frederic Lepied -
Larry,

The installer for the POC will be Windows only but there will be no limitation with respect to the OS for the Moodle Mobile code. I do all my work under Linux for every thing out of the installer wink

Fred

In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Martín Langhoff -

Colin,

great -- I'll get to see it at the Mook UK then wide eyes

I mention the SQLite track because its lighter in memory, disk access and other bits and pieces. On a usb stick specially, disk access is important, and I think SQLite will be significantly faster. And once you've gotten rid of MySQL, you can also get rid of Apache. Writing a mini forking/threading webserver directly in PHP isn't that hard, and it means you are automagically "precompiled" without needing to have eaccelerator in the package either.

When you move from Proof-of-Concept to more deploy-in-the-field, the current Moodle-on-a-stick has full installs of everything and ends up being very heavy. IMHO, having an extremely lightweight PHP + Moodle + starter-miniapp can reduce your "surface" a lot, and make things simpler to support.

I can certainly put a zip of the latest code

I'd love to view it in patchsets format rather than a big tarball/zipfile. I want to see what commits you've made on top of the existing Moodle -- and the commit messages, etc. Can you import the cvs repo into git and publish it on repo.or.cz perhaps? Or perhaps use cvsps if you think it shows your patches correctly...?

WRT Firebird, I was thinking of the RDBMS wink

In reply to Martín Langhoff

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Your idea of reducing and simplifying the technology stack (using sql lite and removing Apache) is very interesting. If things are this simple then I'd be all for it. Hopefully that'll be another area that we can simplify and make better for everyone. Is there anything I can take a look at or are these ideas your putting forth.

I'll see what I can do about getting the code to you. I'm not so experienced with cvs or eclipse patches but I'm sure I can figure something. out. We created a distributable back around April which showed our changes at that point but we are still in a state of flux with the backup and mnet integration. We aim to have another distributable available at the end of either this week or next. How does that sound.


In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Martín Langhoff -

How does that sound.

Very cool. Specially if you can post a patchseries showing your work on top of a vanilla moodle wink

In reply to Martín Langhoff

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
OK, it seems I was a tad optimistic about releasing a code snapshot by now. I'm happy to create one if people want it but my feeling is that it is too soon because it doesn't quite show enough of what we intend and isn't so well commented. We're very much at the first stage of creating the end to end process. Which means that of the 3 parts of the process:
  1. Navigate content and identify items to synch
  2. Perform synchronisation
  3. Resolve conflicts
We have created code for part one for an individual Moodle instance. We haven't tied this up with mNet and retrieved the content from the main server at this point.

Our thoughts are to get through stages 2 and 3 using dummy data first then wire up to mnet afterwards. This should provide a simple and effective progression.

So you see we're not as far along as we were hoping to be. That said it's working really nicely, albeit in a basic fashion.

We've also decided to break down the user interface for synching into 3 main pages compared to the one we currently use.

A snapshot of this should be available by the end of the week. It should make it a lot simpler for the user and much easier to code. The user interface is very flexible so in time if required this could all be moved back to one page. However manipulating this through the dom in an accessible way is just too difficult with the current set of browser and dom UI resources.

So if any one wants a snapshot of our code as it is now please let me know. Otherwise our plan is to provide a distributable version in around 3 weeks time smile.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Martín Langhoff -
> Is there anything I can take a look at or are these ideas your putting forth.

For SQLite support, look into adding support for it in XMLDB. Shouldn't be too hard.

In terms of a forking webserver written in pure PHP, we don't have pcntl_fork() on windows, so it might be tricky to get rid of Apache wink
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
I am now pleased to announce v0.5 of the user interface has now been released at http://hawk.aos.ecu.edu/mobilemoodle/

The main change is that the process of synchronisation has been split across several pages instead of being all on one page. the main intention is to make the process easier for both the new user and for development.
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Ok, so now we are beginning to look at taking the Offline Moodle project into its next phase and we'd love some input from any one who wants to use an Offline Moodle any time soon. We've created a forum thread at http://hawk.aos.ecu.edu/moodle/mod/forum/discuss.php?d=31 where we'd love to discuss all the different usage scenarios that are being thought of. We've got a bunch of ideas of who will use it and why but if you want to make sure your particular situation is considered and added to the list then please get involved.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Martín Langhoff -
What I wonder about the most is whether you'll want to keep the mnet-based approach, and how far will that take you. It's one of the challenges I face myself with other projects - and I _really_ want to have a good solution so people can make the most of things like olpc, eee pc, and the lightweight notebook-as-elearning-appliance that I'd love to help succeeed...
In reply to Martín Langhoff

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
I really see mNet as a web service layer that is a core part of Moodle. We may have to subclass it and add on extra layers of security or whatever but the basic functionality it provides and the basic roadmap you have laid out fit our purposes for now.

We're not using mNet to transfer the backup files themselves. We're using it for all the communication that happens upto and after the transfer.

So the basic functionality we require is a basic web service layer with security etc handled by mNet. Transferring the actual backups will be handled elsewhere.
What are your concerns Martin?
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Martín Langhoff -
Oh - I love that you're using mnet wink

My curiosity (no concerns actually) is more about the disconnected client model - how far can you get with a "fat client" model where the client has a full-blown moodle (as opposed to a google-gears thin -nish client).

It presents quite a few challenges - and you've got some unique approach to some of them. I specially like the idea you've suggested of embracing the concept of the user having "admin" control.
In reply to Martín Langhoff

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Thanks Martin.

I think a lot of it comes down to having worked in companies where I had a really slow developer machine.... seriously to make the point I actually know how bad a memory hog flash can be because I was developing a site for a client and the very simple flash animation they used on every page crashed my machine every time it loaded. As you can guess this was impossible. So I found a plugin for firefox that lets you chose whether an animation would run or not so it effectively turned flash off until I turned it on.

This was only a year or so ago so that might give you some idea of the class of machine I've had to develop full blown apps on. So any way what has this got to do with Offline Moodle. Well basically OM has to be capable of running on a really slow machine for all sorts of reasons perhaps with less ram then we'd like. Php is also an interpreted language so has the advantages and drawbacks of such. I developed using asp classic and javascript combined for several years which is also an interpreted loosely typed language and so I had the time to investigate some of the issues related to it.

We were developing a complex content management system which did all sorts of fancy things so in terms of cpu load and memoroy requirements there are some similarities. When I first started working on the application it was really slow to develop. We worked on it and learnt all sorts of performance tweaks. Generally simple things just like you have mentioned about programming in subtly different ways. Eventually the app was running like a dream on my clapped out machine yet we had actually built more features in to it. We had just learned to include things when necessary and respect the database and things like that.

So my years of experience developing this system on less then ideal machines taught me a lot about how to get performance etc out of an application and I feel there is a lot that can be done to Moodle to both the back end and the front end to speed up its performance and consequently reduce the spec machine that it needs to run on.

I'm certainly not saying I'm any where near an expert on performance, merely that I've learnt a lot of tips and tricks and that I would like to see if my experience on javascript can translate to php. So far it has quite a lot.

Sorry for the ramble , So... anyway until we get Moodle to a point where we can't really improve its performance much I'll still believe it is possible to run it on a slow machine because I've seen slow apps becoming usable with a little bit of work.

I also feel people forget that people over the world are running machines that are really slow and they just get used to them. I think for pete's sake how do you get any work done. They get a new machine and are amazed how much faster everything is but the thing is they thought their old machine was just fine. So some times I think we assume everyone will hate a slow machine. Lots of people will but there are 6.6 billion people who could take advantage Offline Moodle so I think there will be plenty who can put up with it.

That's not to say we couldn't do a thin client but I am averse to creating an entirely new application which since google gears doesn't run php, you would have to do. I'd rather go down the route I have seen mentioned elsewhere of a Moodle Lite which just like loads of other apps only includes the bare bones that you need for Moodle.

anyway I could say loads more but then I would finish. Thanks for the input Martin.
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Hi everyone,

I am preparing the latest download of distributable code so you can all see how far we've got. Sorry to delay but the code doesn't make much sense to anyone but me at the moment so I'm tidying it up and adding comments etc so you can atleast follow what is happening.

In the process I noticed the very first proof of concept isn't freely available because we didn't initially have somewhere to put a 12mb download. Now we do so it's available at the Project Development Course at http://hawk.aos.ecu.edu/moodle/course/view.php?id=22 in the downloads section as 'Proof of Concept' .

This work is key because it shows how synchronisation of forums is possible. It works directly on the database rather than using the backup and restore process we are using in our latest code and taught us what needs to be done at a course, block, user etc level to correctly synch forums and their threads and posts. The process used in this will be developed further as the Offline Moodle project continues however it hasn't been implemented in the latest download we are working on because we don't need to prove it at the moment.

So if you're interested in the synchronisation and merging functionality then you may want to look here for now as it contains a document that explains the process included.

Enjoy!!!
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Ok, so I've now uploaded the files for phase 2 of the proof of concept. In this phase we proved that it's possible to get moodles talking to each other and share lost of information. We also designed an interface tohelp manage this process.

There's a 13.5mb zip of the code, sorry if it's so large I haven't had time to separate it from the Moodle 1.9 beta I used. to help with installation and use there are a bunch of flash video files that take you through all the necessary steps.

So if you want to try out the concept of Offline Moodle nows your chance. To get the files and to get involved go to http://hawk.aos.ecu.edu/moodle/course/view.php?id=22 and scroll to the section 'Proof of concept Phase 2'.

You can get in a a guest. If you want to contribute then register and come and join in.

I look forward to everyones feedback and suggestions.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Cristian Alvarado -
Something I'm not clear on, and perhaps I just missed it in skimming over the post history in this thread, but basically this will require that the offline user have an installation of moodle on their local machine?
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Ok, we've been quiet on this for a little while so I thought I'd post what we've got up to.

We've broken our plan down into steps with the first step as follows. Use the existing Moodle on a stick as a Moodle client on a students machine and get content to it through the backup and restore process.

The procedure for this will essentially be manual at first and needs to be fleshed out. Suffice to say a user is expected to download a backup from the OU site for the course they're on. The Offline Moodle is expected to contain a wizard that installs the backup and either creates or updates the course.

This approach is deliberately simplified compared to the original brief to ensure the roll out process is smooth. In time as the tool is adopted more widely the extra functionality previously described may be introduced.

We're currently looking at how to reduce the size of each backup, possibly by developing an incremental backup process. You can follow the discussion at
http://moodle.org/mod/forum/discuss.php?d=89434#p395963
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Liam green-hughes has provided instructions for installing moodle on a stick on the kubuntu linux of an Asus EEE ultramobile PC http://www.greenhughes.com/content/installing-moodle-asus-eee-pc . This is great news and where I felt we could go in the future.

Our current focus is to support a windows version of Offline Moodle because most of our students use windows however we're fully aware of the need to support alternatives. Hence using Moodle and xampp as the core. If a simple to use reliable installer were in place soon we may able to consider offering this to users. It would certainly make learning more open and flexible.
In reply to Thanh Le

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
So here's a quick update.

We've released two alpha versions of the Moodle on a stick part of Offline Moodle. What we;'ve essentially done is use windows xampp and combined it with Moodle 1.8.4. We've preinstalled Moodle to save the user the trouble. We've spent most of our time so far tweaking small things to make it easier to use. Like adding internet shortcuts to localhost/moodle, simple I know but important to helping users with none of our expertise to use this out of the box.

The releases are available at http://hawk.aos.ecu.edu/moodle/mod/wiki/view.php?id=944 just login as a guest or register if you want to contribute.

I'm still getting used to the installer. Creating the current installer overwrote some of the features I added. So please bear with us. We're working on a release early, release often principle so these versions just represent where we are at the moment.

Upcoming improvments should include:
  • upgrade to moodle 1.9 now it's been released
  • preinstalled course content to introduce moodle and specifically offline moodle
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
As part of a quick update I've added a list of our current tasks and plan for the July 2008 beta release of Offline Moodle. Visit http://hawk.aos.ecu.edu/moodle/mod/wiki/view.php?id=947

I've also created a new discussion for everyone to discuss the features and functioinality they'd like to see in Offline Moodle so we can create a roadmap and task list that includes requirements from the wider community. Visit
http://hawk.aos.ecu.edu/moodle/mod/forum/discuss.php?d=142 if you want to have your say.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Cory Gordon -

Hi Colin!

This all looks very exciting! This project you're working on is exactly what we're looking for - Moodle on the go!

I have a question for you about the synchronisation process. I've read alot about the user being able to sync their side of moodle with new updates and courses, but what about the provider? Is there going to be a way the user can upload all their grade information back to the providers central database?

Would be great if once a student has completed a course, they could then send all their course details (quiz results, activity) etc back to the provider through an easy to use, and clean synchronisation process!

Thoughts?

Thanks,
Cory

In reply to Cory Gordon

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Thanks for that question Cory.

The long term plan is to support what you're asking. That is to synchronise the info back to the provider. Unfortunately that's going to be one of the big jobs. Up until that point security issues will be important but not huge but suddenly they'll be every where.

As far as what the user sees it should be a simple easy to use process. That's the aim anyway.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Thomas Rochford -

Hi Everyone!

Can anyone tell me what has become of this project. Here in the UK we have deployed Moodle on the Stick using XAMPP. It seems pretty straightforward. We have also combined it with the module development tool, XERTE (http://www.nottingham.ac.uk/xerte) to compile a fairly comprehensive development environment. I would very much like to see the client synchroninsation project running alongside this, particularly to support users in rural and deprived areas in the UK where there is no internet access. This has become more important as school grades consistently improve and more children are going forward to study for higher educational qualifications from areas where participation in this has traditionally been very low.

Any information can be sent to me at

t.rochford@rsc-eastern.ac.uk

Kindest regards to you all,
Thomas

In reply to Thomas Rochford

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Hi Thomas,

You're right it's been a while since this thread was updated. Apologies. There has certainly been a lot on.

In short we have documented the process of packaging up xampp and moodle into file you can install and run on a local machine or from a portable storage device.

It sounds like you've done the same. The work on synchronisation began with adding incremental backup capability to the backup/restore component of Moodle.

The work was completed. I had a little trouble packaging it up due to file path lengths and by the time I resolved this I didn't have to time to test the installer before making it available. Unfortunately work pressures have prevented me taking this any further and uploading the latest installer.

The OU's Moodle install has diverged a little from standard so I've done some work to convert non standard items to standard. This has been a good learning experience but distracted from work on the installer.

The work on backup was undertaken by Catalyst and we asked that they try and get this into Moodle core so that every one can benefit. At this point I know it's on the list to be included in backup in Moodle 2.0. Whether it will make it in I cannot say. Whether it makes it into Moodle 1.9.* I cannot say either. Shame.

If you'd like a copy of the latest version just email me at c.chambers@open.ac.uk





Average of ratings: Useful (1)
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
ok, to continue this thread. Thomas asked a good question. Where are we with synchronisation. Shame is the question was private, via email, and so was the response. so to address this I posted it at http://colchambers.blogspot.com/2009/02/taking-moodle-offline-how-can-we-sync.html since I think a lot of people have the same basic question.

I hope it answers the basic premise of what people want to know. If not then I look forward to the repsonses.

Tom, if you don't like this direct approach just let me know and we can agree something. I just don't like to hold back on important info. smile
In reply to Thomas Rochford

Re: Offline Moodle: Moodle Client Project

by Colin Chambers -
Just thought I'd update everyone. The course used to coordinate this work is hosted by university of east carolina. They've moved things around on their servers so the url has changed. It's now http://hawk.aos.ecu.edu/moodle2/course/view.php?id=22

All user accounts etc are still exactly the same.
In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Leo Burd -

Hello there,

I'm new to the Moodle world and have a couple of questions for you:

a) what is the best way to find out information about the current state of the Moodle Client Project?  Is there any demo already available?

b) has anyone already developed any sort of "simple offline player" for Moodle courses?  I mean, some sort of RSS client application that merely downloaded static course materials and provided links to the dynamic content?

Thanks,

Leo

In reply to Colin Chambers

Re: Offline Moodle: Moodle Client Project

by Manuel Lorente -

Hi:

My name is Manuel and I am eLearning Project coordinator in Doctors Without Borders. We work with moodle and now we want to explore the possibility of having an offline version of moodle. Is still this project active? Havethere been any results?

This solution for is capital as it will increase access to learning in our projects.

Thanks for the responses.

Manuel

Mail: josemanuel.lorente@barcelona.msf.org