On developing a Flash Module

On developing a Flash Module

by Josep M. Fontana -
Number of replies: 2

Hi everyone,

Ive just got a grant from my government to develop a language learning platform to help college students improve their foreign language skills. Well, the platform is already developed and its name is Moodle. There is no need to reinvent the wheel, more so when the wheel you have is an almost perfect wheel. Yet I would like to use this grant  to make Moodle do even more things than the many things already does so well.

The grant is rather modest (my government, the Catalan government, pays a lot of lip service to education, like all governments, but like most governments the money they wind up devoting to improve education is rather scarce).

But although it is not too much, I do have some money (some other governments do much worse) to hire expert people to help me with this project. Heres what I would like to do. I hope it will be of interest to everybody. Since Im not a skilled programmer, I cannot contribute myself directly to this wonderful community effort that is Moodle. But if I hire some good programmers that can do the job I have in mind, I will very happy to "donate" the product of their work so that it can be integrated into Moodle (possibly as a new module for Moodle).

What I have in mind is the following. I would like to create a module, similar to the Quiz module, where teachers could fill up a form, like they do when building quizzes, but instead of generating the enormously useful (but a little tiring) multiple choice, true or false, matching etc., what would be generated would be a more "interactive" activity in Flash.

Of course, each one of the Flash activities would have to be designed separately (as some kind of template) and each type of form would be connected to a specific type of Flash activity (as people develop new types of activities or templates, these would be added to the repository of Flash activities or modules). We would be working with the so-called components available in Flash MX.

My problem is the following and here is how YOU can help. Ive contacted a group of professionals that are totally committed to open source software and although they will get paid (they need to eat and pay mortgages, which are very high in Barcelona) they are enthusiastic enough about the project that I am sure they will put in way more hours and efforts than what I will ever be able to pay them. These people have good knowledge of Flash and PHP, but the problem is that they are totally unfamiliar with Moodle. Im a total novice in Moodle, let alone in terms of development for Moodle. I havent been able to find detailed documentation that they could use to figure out how to go about developing such a module for Moodle.

Could any of you give us some help with that? If you do know of some existing documentation that could help us save some valuable time trying to figure out where to start, we would be enormously grateful. I would like to contact Martin Dougiamas directly because I think he might be especially interested in expanding the capabilities of Moodle by integrating Flash in such a way, but I open the question to everybody who might be interested since Moodle is after all a community effort (I think we would all agree Martin deserves a lot of credit and a special mention, though).

If no such detailed documentation is available, would you at least help us by telling us the basics of building and integrating a new module in Moodle. I imagine as the project develops we would have some more specific questions that Im sure someone will be able to answer, but right now we are a little bit at a loss as to where to start. We have some basic things that are independent of Moodle figured out, such as for instance how to transfer data back and forth from Flash and a MySQL database. The problem is how to integrate this into the general functioning of Moodle. We think it is possible, but we need the assistance of people that are more knowleadgeable than us in the Moodle side of things.

Thanks very much in advance.

Josep M. Fontana

Average of ratings: Useful (1)
In reply to Josep M. Fontana

Implementing quizzes using Flash

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Congratulations for the grant, Josep, and thanks for using Moodle as a platform to implement your dream module! smile

Perhaps you can describe your ideas in a little more detail, because there is a possibility that is would fit into the new quiz framework.

The quiz has just been refactored into a more modular structure using classes that now treats question types as "plugins". This is to set the stage for user-contributed question types to be added.

So, it's possible that your Flash questions might possibly slot into this framework. Even if the match is not perfect, then there are probably modifications we can make to improve Quiz so it does fit your requirements.

If, of course, you have a quite different vision for this module then it may work better as a standalone thing, but I'll need to know more about your plans to help you make this decision.

Finally, in any case you should aim for interacting with Moodle code via the API it has, sending data to PHP scripts which then contact the databases, for example. This will make it easier for you to leverage all the work going on in Moodle as it develops.
In reply to Martin Dougiamas

Re: Implementing quizzes using Flash

by Josep M. Fontana -

> Congratulations for the grant, Josep, and
> thanks for using Moodle as a platform to
> implement your dream module!

Well, thank YOU for making it possible for me and for so many people to use this wonderful tool. Actually I feel a little stupid because I only found out about Moodle after having forked out quite a bit of money (a third of my grant) to a company that promissed me that they would develop an e-learning platform that would allow members in our faculty to create activities in flash without having to learn Flash. It's a long and sad story I don't feel like going into. But after having lost all that money (the company simply left me stranded) it occurred to me to look for alternatives in the Open Source community. That's why I feel so stupid. If only I would have done a bit of research before, I would have a few thousand dollars more to devote to some useful things.

> Perhaps you can describe your ideas in a
> little more detail, because there is a
> possibility that is would fit into the new quiz
> framework.

I'm afraid my ideas are not much more developed than what you could see in my first posting, though. But let's see if I can do a better job. I'll do my best to explain myself even though I'm neither a native English speaker nor an expert in Flash or in Web development in general.

If you go to the following link ( www.roothouse.com/Root ) you can see a simplified version of what I'm trying to achieve. What you can see there is just a toy application built completely in Flash (using Actionscript). On the first page you see a form (which would not have to be built in Flash once the product were integrated in Moodle) where the person creating the activity introduces the data which will be then transferred to the Flash object to determine its possible behaviors.

In this case we built something very simple just to start. The goal of the final activity is to classify a list of words according to whether they are nouns, verbs or adjectives. On the initial page, the person who creates the activity introduces any word in the upper field and then assigns the right category by clicking on the appropriate checkbox (this toy application only allows you to introduce 3 words). If you then press the button "Next Step", you can see the activity that is automatically generated.

In fact as most of the participants in this forum probably know, you don't need Flash to do that (I understand Hot Potatoes does something like that just using JavaScript) but it is enough to get the idea. My goal is to be able to design more complex Flash applications that could be generated automatically in a similar fashion. If I understand Martin correctly, each one of them could be integrated as a "plugin".

What we need to know is just how to do that. If you have designed a particular activity in Flash, let's say it is the one in the simple example in www.roothouse.com/Root, how do you do it so that it becomes a particular question type among the question types available in the Quiz section in Moodle. The goal would be to have a particular subset of question types in the Quiz module which would automatically generate activities built in Flash. By integration in Moodle I mean that for every intent and purpose these Flash modules or activities (I think I'm starting to get a bit confused with the terminology here) would work like the rest of activities created via the Quiz module: they would feed and be fed by the internal MySQL database and hence you should be able to generate reports with the scores obtained by the users.

With Flash the sky is the limit and you can create some pretty complex interactive objects that are taylored to your specific needs. So I imagine that many things that could be built would not be of interest to most people. But if the basic infrastructure that allows you to do what I describe is built into Moodle, then perhaps the activity types that are more likely to be used by a wider audience could be built in, leaving the rest in an open repository that people could check to see if it contains something that could be useful for them and if so they could integrate them in their particular Moodle sites at will.

I'm sorry if I'm not making myself clear. I'm feeling kind of tired after a few sleepless nights. Perhaps if you ask me some specific questions about things that are not clear in my explanation I can do a better job.

> If, of course, you have a quite different
> vision for this module then it may work better
> as a standalone thing, but I'll need to know
> more about your plans to help you make this
> decision.

Well, if more people are interested in this general idea and if it is possible to implement it, I would like to make it an integral part of Moodle. I've received a lot from the Open Source community and I feel it is time to contribute with something. If we are able to contribute with something that other people can use and extend, that would be great.

> Finally, in any case you should aim for
> interacting with Moodle code via the API it has,
> sending data to PHP scripts which then contact
> the databases, for example. This will make it
> easier for you to leverage all the work going on
> in Moodle as it develops.

OK, this is the key word. Is there any documentation on this API? When I was searching for documentation specifically dealing with development issues within Moodle I wasn't able to find any information on this API.

By the way, I know this is not the forum to ask this question but while I'm at it I might as well ask. How can I associate pictures or images to the different users in the Moodle site I administer? It is definitely the least of my worries, but it would be kind of nice if the different students that participate in the forums in my courses could identify themselves with a picture or an image like we do here in the main Moodle site.

Josep M.