Moodle  2.2.1
http://www.collinsharper.com
portfolio_plugin_mahara Class Reference
Inheritance diagram for portfolio_plugin_mahara:
Collaboration diagram for portfolio_plugin_mahara:

Public Member Functions

 __wakeup ()
 supported_formats ()
 expected_time ($callertime)
 admin_config_form (&$mform)
 instance_sanity_check ()
 prepare_package ()
 send_package ()
 get_static_continue_url ()
 resolve_static_continue_url ($remoteurl)
 get_interactive_continue_url ()
 steal_control ($stage)
 verify_file_request_params ($params)
 send_intent ()
 cleanup ()

Static Public Member Functions

static get_name ()
static get_allowed_config ()
static has_admin_config ()
static plugin_sanity_check ()
static fetch_file ($token)

Protected Member Functions

 init ()

Detailed Description

Definition at line 42 of file lib.php.


Member Function Documentation

__wakeup ( )

Definition at line 57 of file lib.php.

Here is the call graph for this function:

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)

Parameters:
moodleform$mformpassed by reference, add elements to it.

Reimplemented from portfolio_plugin_base.

Definition at line 87 of file lib.php.

cleanup ( )

perform any required cleanup functions

Reimplemented from portfolio_plugin_base.

Definition at line 361 of file lib.php.

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

Parameters:
string$callertime- what the caller thinks the portfolio plugin instance is given the final say because it might be (for example) download.
Returns:
string (see PORTFOLIO_TIME_* constants)

Reimplemented from portfolio_plugin_base.

Definition at line 76 of file lib.php.

static fetch_file ( token) [static]

xmlrpc (mnet) function to get the file. reads in the file and returns it base_64 encoded so that it can be enrypted by mnet.

Parameters:
string$tokenthe token recieved previously during send_content_intent

Definition at line 326 of file lib.php.

Here is the call graph for this function:

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

Returns:
array array of strings (config item names)

Reimplemented from portfolio_plugin_base.

Definition at line 65 of file lib.php.

the url for the user to continue to their portfolio during the lifecycle of the request

Returns:
string url or false.

Reimplemented from portfolio_plugin_base.

Definition at line 246 of file lib.php.

Here is the call graph for this function:

static get_name ( ) [static]

returns the user-friendly name for this plugin usually just get_string('pluginname', 'portfolio_something')

Returns:
string

Reimplemented from portfolio_plugin_base.

Definition at line 61 of file lib.php.

the url to save in the log as the continue url this is passed through resolve_static_continue_url() at display time to the user.

Reimplemented from portfolio_plugin_base.

Definition at line 228 of file lib.php.

Here is the caller graph for this function:

static has_admin_config ( ) [static]

does this plugin need any configuration by the administrator?

if you override this to return true, you must implement {

See also:
admin_config_form}

Reimplemented from portfolio_plugin_base.

Definition at line 83 of file lib.php.

init ( ) [protected]

called after __construct - allows plugins to perform initialisation tasks without having to override the constructor.

Reimplemented from portfolio_plugin_base.

Definition at line 53 of file lib.php.

Here is the call graph for this function:

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.

Returns:
mixed - string = error string KEY (must be inside portfolio_$yourplugin) or 0/false if you're ok

Reimplemented from portfolio_plugin_base.

Definition at line 98 of file lib.php.

Here is the call graph for this function:

static plugin_sanity_check ( ) [static]

check sanity of plugin if this function returns something non empty, ALL instances of your plugin will be set to invisble and not be able to be set back until it's fixed

Returns:
mixed - string = error string KEY (must be inside portfolio_$yourplugin) or 0/false if you're ok

Reimplemented from portfolio_plugin_base.

Definition at line 117 of file lib.php.

Here is the call graph for this function:

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

See also:
get_tempfiles} to get the list of files.

Reimplemented from portfolio_plugin_base.

Definition at line 173 of file lib.php.

override this function if you need to add something on to the url for post-export continues (eg from the log page) mahara does this, for example, to start a jump session

Reimplemented from portfolio_plugin_base.

Definition at line 239 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

sends the 'content_intent' ping to mahara if all goes well, this will set the 'token' and 'sendtype' member variables.

Definition at line 268 of file lib.php.

Here is the call graph for this function:

this is the function that is responsible for sending the package to the remote system, or whatever request is necessary to initiate the transfer.

Returns:
boolean success

Reimplemented from portfolio_plugin_base.

Definition at line 188 of file lib.php.

Here is the call graph for this function:

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

Parameters:
intstage to steal control *before* (see constants PARAM_STAGE_*}
Returns:
boolean or string url

Reimplemented from portfolio_plugin_base.

Definition at line 250 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_*

Returns:
array list of formats

Reimplemented from portfolio_plugin_base.

Definition at line 69 of file lib.php.

Here is the call graph for this function:

before sending the file when the pull is requested, verify the request parameters these might include a token of some sort of whatever

Parameters:
arrayrequest parameters (POST wins over GET)

Reimplemented from portfolio_plugin_pull_base.

Definition at line 258 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations