2

hi i'm pretty new to the moodle and i would like to get some idea on making the moodle offline and the synchronization techniques that could be used between the server and the clients. (for both db synchronization and folder content synchronization). Please provide some information regarding this. Thanks in advance

Scott
  • 21
  • 1
  • 2

2 Answers2

3

You can use Gears for this. Check out this plugin:

Offline Moodle: Google Gears caching http://moodle.org/mod/data/view.php?d=13&rid=2636&filter=1

Jorge
  • 95
  • 1
  • 7
1

Here are my ideas. This is assuming clients have a local copy of Moodle installed but all the data is on the server.

Server -> Client synchronization is easy. Your server needs to expose the db schema + data. When your database grows large, it may be wise to send only a db diff (every time a client synchronizes with the server, take a snapshot of the db dump and note the time of synchronization, then when a client wants to synchronize again compare the current db and the snapshot at the time of last sync and send only the diff). You can synchronize files and folders easily with rsync.

Client -> Server synchronization is tricky. Let's say Prof A and Prof B create two different courses with two different names while they are offline. However, because of the way databases work both courses are likely to have the same ID in the database and it will break things. Here is a crazy idea how to solve it without modifying Moodle codebase: if you use MySQL, give each user a different AUTO_INCREMENT number on every sync. For example, after Prof A syncs with the server he receives info that the next automatically generated ID for the courses table should be 10000 and for Prof B it is 20000. If Prof A creates a new course it will have ID = 10001 and Prof B's new course will be 20001. This way Profs can create up to 10000 new courses without causing ID clashes. This will not however protect you from someone with malicious intents.

It looks like you are not the only one who has thought about taking Moodle offline.

mak
  • 13,267
  • 5
  • 41
  • 47