The "repositories in moodle" scene has been quite exciting lately... actually I hadn't realized just how interesting things had gotten until I had a chat with MartinD today. Wow. As far as I can see we have:
- MartinD wrote
- Eloy wrote
- Helen (and Tom?) wrote
mod/objectwhich turned into
resource/type/objectand now has been folded into Eloy's
- Matt Oquist has been working on a full-blown repository API
- Jun Yamog and myself have been working on a simple repository API, reusing Eloy & Helen's code in
resource/type/imsbut with a plugin API approach to the "repository".
And last, but not least...
- In 1~2 weeks we enter the FREEZE for 1.6. We should be stable. And full of features. And solve famine too.
Heh. How's that for fun?
(Have I got the stories right? I might have gotten lost in the twists and turns. Hope I haven't accussed anyone of other people's commits.)
Anyway, I am looking at trying to consolidate some of those implementations, trying to target the 1.6 freeze, a simpler UI for users, and something that generally makes sense internally, at least in the sense that we don't paint ourselves into a corner. Being a bit naive in some aspects is not bad if the path forward remains clear...
Here's my proposal -- with an offer to get it done in time for the freeze. I want to know if it works for everyone, and I am pretty sure my plan has some holes in it... and that you'll kindly point them out
- I can work with Jun to refactor the
resource/type/imsplugin to split off the repository handling code, turning that into a repository plugin for the simple repo API. So
resource/type/imsfocuses on dealing with IMS packages, and not with repositores.
- Similarly, we can get the current Hive plugin to conform to the simple repo API trivially. Actually, with some minor changes to the API.
- The standard file selection dialog is the point where repo searches/browsing happens (I think Matt's code is similar on this respect) so all modules that use the file selection dialog get repo searching/browsing automagically.
- Still, there are a few extra tricks we can teach mod/scorm, specially around Hive repos
This will effectively merge the work that Helen/Eloy have been doing on the mod/resource side with the work Jun has done on the repository handling side -- focussing on the strengths of each implementation. One thing I don't want to do is to lose any important functionality.
Now, this doesn't take Matt's work into account, which is somewhat unfair and totally due to my lack of knowledge about it. I am not so familiar with his work, from the little I could understand from MartinD's description, it has a different set of assumptions about the repo backends than the simple API Jun has worked with, and I don't really know what the status is.
Matt, if you are reading, can you fill us in? MartinD mentioned that it is meant to provide an FS virtualization of sorts, and it sounded to me that it expects the backends to be rich, responsive and available, but I am probably wrong on all counts In any case, what I am interested in understanding is:
- How ready it is
- Whether you can help us fit it in our plans instead of the simple repo API
- Even better, if you see a way forward using today a simple API, and growing/evolving that API into your full blown implementation towards 2.0. That would be the best of the 3 worlds I suspect.
(Also: I'll post a description of the work Jun and I have been doing so this makes more sense).
Phew. Quite a bit of stuff to discuss. Naturally, MartinD is concerned that we'll be doing all this crazy stuff just before freeze, and that it shouldn't happen on HEAD because it may not be so stable in time. So anything we do should happen on a branch. Something like
MOODLE_16_REPOSCRAZYWORKJUSTBEFOREFREEZE should do the trick
The main difference with the simple API I am talking about is that it assumes that the repository looks filesystem-ish -- where this simple api has a few required calls, and is perfectly happy with repositories/backends that are not always up, or reliable, or browseable. We are extending it to support browsing optionally (as Hive offers the feature) but it works equally well with repos that are Debian-archive-like.