|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| supported_formats () | |
| prepare_package () | |
| get_interactive_continue_url () | |
| expected_time ($callertime) | |
| send_package () | |
| steal_control ($stage) | |
| post_control ($stage, $params) | |
Static Public Member Functions | |
| static | get_name () |
| static | allows_multiple_instances () |
| static allows_multiple_instances | ( | ) | [static] |
override this if your plugin doesn't allow multiple instances
Reimplemented from portfolio_plugin_base.
| expected_time | ( | $ | callertime | ) |
how long does this reasonably expect to take.. should we offer the user the option to wait.. this is deliberately nonstatic so it can take filesize into account
| string | $callertime | - what the caller thinks the portfolio plugin instance is given the final say because it might be (for example) download. |
Reimplemented from portfolio_plugin_base.
the url for the user to continue to their portfolio during the lifecycle of the request
Reimplemented from portfolio_plugin_base.
| static get_name | ( | ) | [static] |
returns the user-friendly name for this plugin usually just get_string('pluginname', 'portfolio_something')
Reimplemented from portfolio_plugin_base.
| post_control | ( | $ | stage, |
| $ | params | ||
| ) |
after a plugin has elected to steal control, and control returns to portfolio/add.php|postcontrol=1, this function is called, and passed the stage that was stolen control from and the request (get and post but not cookie) parameters this is useful for external systems that need to redirect the user back with some extra data in the url (like auth tokens etc) for an example implementation, see boxnet portfolio plugin.
| int | $stage | the stage before control was stolen |
| array | $params | a merge of $_GET and $_POST |
Reimplemented from portfolio_plugin_base.
Definition at line 72 of file lib.php.

| prepare_package | ( | ) |
called after the caller has finished having control of its prepare_package function. this function should read all the files from the portfolio working file area and zip them and send them or whatever it wants. {
Reimplemented from portfolio_plugin_base.
| send_package | ( | ) |
this is the function that is responsible for sending the package to the remote system, or whatever request is necessary to initiate the transfer.
Reimplemented from portfolio_plugin_base.
| steal_control | ( | $ | stage | ) |
If at any point the caller wants to steal control it can, by returning something that isn't false in this function The controller will redirect to whatever url this function returns. Afterwards, you can redirect back to portfolio/add.php?postcontrol=1 and post_control is called before the rest of the processing for the stage is done
| int | stage to steal control *before* (see constants PARAM_STAGE_*} |
Reimplemented from portfolio_plugin_base.
Definition at line 50 of file lib.php.

array of formats this portfolio supports the intersection of what this function returns and what the caller supports will be used use the constants PORTFOLIO_FORMAT_*
Reimplemented from portfolio_plugin_base.