ajax inclussion in moodle

ajax inclussion in moodle

by angel díaz -
Number of replies: 9
hello,
I am a student of the university pompeu fabra (Barcelona) and in one of our subjets we must of project increase the functionalities of moodle.

in concrete to my it has touched the following thing to me :
somebody has tried sometimes to do that moodle loaded the information of the forums through ajax?

excuse the annoyances to that him cannot interest the message.

greetings!
Average of ratings: -
In reply to angel díaz

Re: ajax inclussion in moodle

by Gustav W Delius -
There is a lot of potential for improving the Moodle interface with Ajax. When you search for 'Ajax' in the forums you will find what other people have suggested.
In reply to Gustav W Delius

Re: ajax inclussion in moodle

by Janne Mikkonen -
Really bad joke: don't know what ajax has to do with Moodle?
In reply to Janne Mikkonen

Re: ajax inclussion in moodle

by Darren Smith -
I agree - Us brits don't see how Ajax can benifit Moodle either.
In reply to angel díaz

Re: ajax inclussion in moodle

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello Angel,

I don't know how Moodle can benefit from Ajax, but I've only just discovered the little XMLHTTPRequest object which goes with Ajax technology. It really saved my day. I had a vocabulary learning/testing exercise written in HTML which extracted its data from an XML file. Basically a list of English words and a list of their French equivalents, nothing fancy see extract below.

<vocablist>
<voc>
<english>ability</english>
<french>capacité</french>
</voc>
<voc>
<english>able</english>
<french>capable</french>
</voc>
etc.
</vocablist>

I had succeeded in making an HTML + Javascript file which worked perfectly in MSIE, using the proprietary MSIE "data island" as in :

<XML ID="vocablist" SRC="vocablist.xml"></XML>

Unfortunately this is not recognized in Mozilla/FF browsers. Using the XMLHttpRequest Object allowed me to make an HTML+Javascript file which works in both browser standards. It's also supposed to work OK in Safari, but I didn't test.

Joseph

PS Thanks to Janne and Darren (and congratulations to Julian) for their contribution to the Ajax debate.cool

In reply to angel díaz

Re: ajax inclussion in moodle

by Urs Hunkler -
Picture of Core developers

Angel, your project sounds great.

Ajax can enhance the user experience where Moodle page reloading after changes takes some time. For example when you edit the course page. In the moment I do not see the advantage of loading forum postings. The page with the threads is loaded once and no changes are made. Probably when you edit your posting and want to change the text asynchronous loading and saving will increase performance.

The Moodle admin interface can also benefit from Ajax technologies to enhance working speed. And to get some fun into such boring tasks as administrating a learning environment.

Martin Dougiamas created a Student projects page in Moodle Docs. There you can read about interesting projects nobody is working on in the moment.

I collected some Moodle Ajax projects in a forum posting. You may look what people already have created using Ajax technologies. Perhaps you can get some ideas for your project too.

I wish you much success with your work
Urs

In reply to angel díaz

Re: ajax inclussion in moodle

by Janne Mikkonen -
I found this toolkit and it seems to be quite mature, just in case you don't want to invent wheel again. Hopefully it'll help you with your project: http://www.zimbra.com/community/ajaxtk_download.html
- Janne -
In reply to Janne Mikkonen

Re: ajax inclussion in moodle

by Joan Codina Filba -
There are some ajax libraries that can be used, but they should have la license compatible with moodle GPL license. The zimbra has a Mozilla or Apache license, but both are incompatible with gpl.
Moodle as a project should choose an Ajax lib, GNU compatible, to allow developers to work in the correct direction

in the GNU license compatibility thre is this information about these licenses:

Mozilla Public License (MPL)

This is a free software license which is not a strong copyleft; unlike the X11 license, it has some complex restrictions that make it incompatible with the GNU GPL. That is, a module covered by the GPL and a module covered by the MPL cannot legally be linked together. We urge you not to use the MPL for this reason.

However, MPL 1.1 has a provision (section 13) that allows a program (or parts of it) to offer a choice of another license as well. If part of a program allows the GNU GPL as an alternate choice, or any other GPL-compatible license as an alternate choice, that part of the program has a GPL-compatible license.

Apache Software License, version 2.0

This is a free software license but it is incompatible with the GPL. The Apache Software License is incompatible with the GPL because it has a specific requirement that is not in the GPL: it has certain patent termination cases that the GPL does not require. (We don't think those patent termination cases are inherently a bad idea, but nonetheless they are incompatible with the GNU GPL.)