Note:

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

Talk:Paint tool integration

From MoodleDocs

Re: An additional vector of PaintWeb integration is Moodleforms, something like $mform->addElement('paintweb', 'targetInputElement', options).

Just a little point about API. I think that 'paintweb' is an implementation detail. It would be better to call the element something like 'sketch'. Also, the details of the API should try not to assume that the drawing app used is paintweb. Presumbaly, from a programmer's point of view, it should be just like a file upload control where the use can choose a single image file to upload (although the UI will be very different.--Tim Hunt 02:23, 2 August 2009 (UTC)

Thanks for your comment! Agreed, it's something only for illustrative purposes. However, in Moodle 1.9, there's not very much point in being too "generalistic", since it's going to be a contrib patch for Moodle 1.9 which adds only PaintWeb, and there won't be any official release based on it, with the possibility of addition of multiple image editors (or not that I foresee any, hehe). Nonetheless, what I had in mind was something like $mform-addElement('image', 'targetInputElement', options). I should also aim to make the API for using PaintWeb as similar as possible between Moodle 1.9 and 2.0. Still, I presume there will be important differences: at least the new file API and the new editors embedding API have an important influence on the way PaintWeb is going to be integrated. Mihai Sucan 08:52, 2 August 2009 (UTC)