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


Public Member Functions | |
| prepare_package () | |
| send_package () | |
| get_export_summary () | |
| get_interactive_continue_url () | |
| expected_time ($callertime) | |
| has_export_config () | |
| get_allowed_user_config () | |
| get_allowed_export_config () | |
| export_config_form (&$mform) | |
| export_config_validation ($data) | |
| admin_config_form (&$mform) | |
| steal_control ($stage) | |
| post_control ($stage, $params) | |
| instance_sanity_check () | |
| supported_formats () | |
Static Public Member Functions | |
| static | get_name () |
| static | has_admin_config () |
| static | get_allowed_config () |
| static | allows_multiple_instances () |
| static | allows_multiple_exports () |
Data Fields | |
| $boxclient | |
| admin_config_form | ( | &$ | mform | ) |
mform to display to the admin configuring the plugin. if your plugin can't be configured by the admin, (see has_admin_config) don't bother overriding this function
this function can be called statically or non statically, depending on whether it's creating a new instance (statically), or editing an existing one (non statically)
| moodleform | $mform | passed by reference, add elements to it. |
Reimplemented from portfolio_plugin_base.
| static allows_multiple_exports | ( | ) | [static] |
whether this plugin supports multiple exports in the same session most plugins should handle this, but some that require a redirect for authentication and then don't support dynamically constructed urls to return to (eg box.net) need to override this to return false. this means that moodle will prevent multiple exports of this *type* of plugin occurring in the same session.
Reimplemented from portfolio_plugin_base.
| 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.
| export_config_form | ( | &$ | mform | ) |
mform to display to the user exporting data using this plugin. if your plugin doesn't need user input at this time, (see has_export_config don't bother overrideing this function
| moodleform | $mform | passed by reference, add elements to it. |
Reimplemented from portfolio_plugin_base.
| export_config_validation | ( | $ | data | ) |
| static get_allowed_config | ( | ) | [static] |
a list of fields that can be configured per instance. this is used for the save handlers of the config form and as checks in set_config and get_config
Reimplemented from portfolio_plugin_base.
a list of fields that can be configured by the user. this is used for the save handlers in the config form and as checks in set_export_config and get_export_config.
Reimplemented from portfolio_plugin_base.
a list of fields that can be configured by the user. this is used for the save handlers in the config form and as checks in set_user_config and get_user_config.
Reimplemented from portfolio_plugin_base.
after the user submits their config they're given a confirm screen summarising what they've chosen.
this function should return a table of nice strings => values of what they've chosen to be displayed in a table.
Reimplemented from portfolio_plugin_base.
Definition at line 50 of file lib.php.

the url for the user to continue to their portfolio during the lifecycle of the request
Reimplemented from portfolio_plugin_base.
Definition at line 64 of file lib.php.

| static get_name | ( | ) | [static] |
returns the user-friendly name for this plugin usually just get_string('pluginname', 'portfolio_something')
Reimplemented from portfolio_plugin_base.
| static has_admin_config | ( | ) | [static] |
does this plugin need any configuration by the administrator?
if you override this to return true, you must implement {
Reimplemented from portfolio_plugin_base.
does this plugin need configuration during export time?
if you override this to return true, you must implement {
Reimplemented from portfolio_plugin_base.
check sanity of instances if this function returns something non empty, the instance will be set to invislbe and not be able to be set back until it's fixed.
Reimplemented from portfolio_plugin_base.
Definition at line 234 of file lib.php.

| 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 141 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.
Definition at line 22 of file lib.php.

| 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 121 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.