Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Portfolio API

From MoodleDocs

Comments on specification

Please leave your name and indent according to reply structure.

Comments from Tim Hunt

Do we have to restrict it so that only admins can configure repositories

Here is an example user story:

A course somewhere out there about good online teaching requires students to participate in an online community, say, Moodle.org, and record evidence of their activity to their Portfolio. Moodle.org is a nice open place, so wants to help this sort of thing. Therefore, Martin configures it so that any user can go to their user profile, and configure any portfolio plugin for their own use, so students on this course can easily export from moodle.org to their own Portfolio.

Similarly, this may be a way to deal with Facebook authentication issues. Each student configures the facebook plugin for themselves, including some sort of secret key.

Penny's reply

Hmm. I agree with your user story but I'm not sure of the implications of it. At any rate, the portfolio plugin system must support multiple instances of a plugin being configured (iirc, this will be the first instance of this in moodle?) but then in terms of permissions I'm not sure how it would work - it's almost a new context level - so that any user could configure a plugin instance and then grant access. I think it should definitely be able to be turned off though (by an admin)

Martin Dougiamas 04:11, 24 June 2008 (CDT) Absolutely agree with Tim's picture, that is the same way the repositories API will work. Yes, the admin should choose to allow users to configure their own portfolios. This is basically saving user preferences for each plugin type, and could be part of the "save" process (use checkbox to save this portfolio for next time).

Do we really need transport APIs

I am not if transport layers really need to be pluggable APIs as such. Surely almost all Portfolio plugins will use a single transport method.

Of course, each transport method will have a library of code, for example a SOAP library, or the mnet libraries, and the Portfolio plugins will use these, but I don't see any need for all the transport mechanisms to implement some common interface. Different transport mechanisms work very differently, and tend to have different interfaces in their standard libraries. Trying to put a common wrapper round all of them seems difficult and unnecessary to me.

Penny's reply

Well theoretically moodle-moodle and moodle-mahara would both use mnet, although I guess you're right that it might be overly difficult. I was trying to avoid multiple wrappers around the same library. We started off as having formats as a plugin too and moved away from it in favour of libraries. I wonder if we gain anything in terms of test framework by adhering to one API for transport layers (think mock objects).. I'll ask Nico.