Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/user/profile/definelib.php File Reference

Go to the source code of this file.

Data Structures

class  profile_define_base

Functions

 profile_reorder_fields ()
 profile_reorder_categories ()
 profile_delete_category ($id)
 profile_delete_field ($id)
 profile_move_field ($id, $move)
 profile_move_category ($id, $move)
 profile_list_datatypes ()
 profile_list_categories ()
 profile_edit_category ($id, $redirect)
 Are we adding or editing a cateogory?
 profile_edit_field ($id, $datatype, $redirect)

Function Documentation

Delete a profile category

Parameters:
integerid of the category to be deleted
Returns:
boolean success of operation

Retrieve the category

Does the category contain any fields

Finally we get to delete the category

Definition at line 234 of file definelib.php.

Here is the call graph for this function:

Remove any user data associated with this field

Try to remove the record from the database

Reorder the remaining fields in the same category

Definition at line 283 of file definelib.php.

Here is the call graph for this function:

profile_edit_category ( id,
redirect 
)

Are we adding or editing a cateogory?

Print the page

Definition at line 410 of file definelib.php.

Here is the call graph for this function:

profile_edit_field ( id,
datatype,
redirect 
)

Print the page

Definition at line 452 of file definelib.php.

Here is the call graph for this function:

Retrieve a list of categories and ids suitable for use in a form

Returns:
array

Definition at line 400 of file definelib.php.

Here is the caller graph for this function:

Retrieve a list of all the available data types

Returns:
array a list of the datatypes suitable to use in a select statement

Definition at line 382 of file definelib.php.

Here is the call graph for this function:

profile_move_category ( id,
move 
)

Change the sortorder of a category

Parameters:
integerid of the category
stringdirection of move
Returns:
boolean success of operation

Get the category object

Count the number of categories

Calculate the new sortorder

Retrieve the category object that is currently residing in the new position

Swap the sortorders

Update the category records

Definition at line 344 of file definelib.php.

profile_move_field ( id,
move 
)

Change the sortorder of a field

Parameters:
integerid of the field
stringdirection of move
Returns:
boolean success of operation

Get the field object

Count the number of fields in this category

Calculate the new sortorder

Retrieve the field object that is currently residing in the new position

Swap the sortorders

Update the field records

Definition at line 304 of file definelib.php.

Here is the call graph for this function:

Reorder the profile categoriess starting at the category at the given startorder

Definition at line 215 of file definelib.php.

Here is the caller graph for this function:

Reorder the profile fields within a given category starting at the field at the given startorder

Definition at line 193 of file definelib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations