I want to ajaxify the Portfolio code to make the UI similar to the file picker but while doing a walkthrough of how this might work with Nico we came across the following problem.
The portfolio API uses mforms as a standard way for plugins and pieces of moodle that export content to communicate their export-time options.
The way I imagined the 'ajaxification' to work would be that the js would make xmlhttp requests to a portfolio handler, which would call the same functions in the exporter library as normal, and send back XHTML as the response, which the js would use to replace the contents of the popup div.
This bug should serve as a dicsussion for how we can find a workaround, because changing the code to not use mforms is really not an option, I think. It's the standard way to make forms in Moodle.