|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
| enum DATA_APPROVED |
| enum DATA_CAP_EXPORT |
| enum DATA_FIRSTNAME |
| enum DATA_LASTNAME |
| enum DATA_MAX_ENTRIES |
| enum DATA_PERPAGE_SINGLE |
| enum DATA_PRESET_CONTEXT |
| enum DATA_PRESET_FILEAREA |
| enum DATA_TIMEADDED |
| enum DATA_TIMEMODIFIED |
| data_add_instance | ( | $ | data | ) |
| data_add_record | ( | $ | data, |
| $ | groupid = 0 |
||
| ) |
| data_append_new_field_to_templates | ( | $ | data, |
| $ | newfieldname | ||
| ) |
| data_atmaxentries | ( | $ | data | ) |
| data_comment_permissions | ( | $ | comment_param | ) |
Running addtional permission check on plugin, for example, plugins may have switch to turn on/off comments option, this callback will affect UI display, not like pluginname_comment_validate only throw exceptions. Capability check has been done in comment->check_permissions(), we don't need to do it again here.
| stdClass | $comment_param | { context => context the context object courseid => int course id cm => stdClass course module object commentarea => string comment area itemid => int itemid } |
| data_comment_validate | ( | $ | comment_param | ) |
Validate comment parameter before perform other comments actions
| stdClass | $comment_param | { context => context the context object courseid => int course id cm => stdClass course module object commentarea => string comment area itemid => int itemid } |
Definition at line 3291 of file lib.php.

| data_convert_arrays_to_strings | ( | &$ | fieldinput | ) |
| data_convert_to_roles | ( | $ | data, |
| $ | teacherroles = array(), |
||
| $ | studentroles = array(), |
||
| $ | cmid = NULL |
||
| ) |
Converts a database (module instance) to use the Roles System
object object CONTEXT_MODULE CAP_PREVENT CAP_ALLOW
| object | $data | a data object with the same attributes as a record from the data database table |
| int | $datamodid | the id of the data module, from the modules table |
| array | $teacherroles | array of roles that have archetype teacher |
| array | $studentroles | array of roles that have archetype student |
| array | $guestroles | array of roles that have archetype guest |
| int | $cmid | the course_module id for this data instance |
Definition at line 1787 of file lib.php.

| data_delete_instance | ( | $ | id | ) |
| data_delete_site_preset | ( | $ | name | ) |
| data_export_csv | ( | $ | export, |
| $ | delimiter_name, | ||
| $ | dataname, | ||
| $ | count, | ||
| $ | return = false |
||
| ) |
| data_export_ods | ( | $ | export, |
| $ | dataname, | ||
| $ | count | ||
| ) |
| data_export_xls | ( | $ | export, |
| $ | dataname, | ||
| $ | count | ||
| ) |
| data_extend_navigation | ( | $ | navigation, |
| $ | course, | ||
| $ | module, | ||
| $ | cm | ||
| ) |
| data_extend_settings_navigation | ( | settings_navigation $ | settings, |
| navigation_node $ | datanode | ||
| ) |
Adds module specific settings to the settings block
| settings_navigation | $settings | The settings navigation object |
| navigation_node | $datanode | The node to add module settings to |
Definition at line 2980 of file lib.php.

| data_fieldname_exists | ( | $ | name, |
| $ | dataid, | ||
| $ | fieldid = 0 |
||
| ) |
| data_generate_default_template | ( | &$ | data, |
| $ | template, | ||
| $ | recordid = 0, |
||
| $ | form = false, |
||
| $ | update = true |
||
| ) |
Given a template and a dataid, generate a default case template
object
| object | $data | |
| string | template [addtemplate, singletemplate, listtempalte, rsstemplate] | |
| int | $recordid | |
| bool | $form | |
| bool | $update |
Definition at line 490 of file lib.php.


| data_get_available_presets | ( | $ | context | ) |
| data_get_available_site_presets | ( | $ | context, |
| array $ | presets = array() |
||
| ) |
Gets an array of all of the presets that users have saved to the site.
| stdClass | $context | The context that we are looking from. |
| array | $presets |
Definition at line 1974 of file lib.php.


| data_get_exportdata | ( | $ | dataid, |
| $ | fields, | ||
| $ | selectedfields, | ||
| $ | currentgroup = 0 |
||
| ) |
| data_get_field | ( | $ | field, |
| $ | data, | ||
| $ | cm = null |
||
| ) |
| data_get_field_from_id | ( | $ | fieldid, |
| $ | data | ||
| ) |
| data_get_field_from_name | ( | $ | name, |
| $ | data | ||
| ) |
| data_get_field_new | ( | $ | type, |
| $ | data | ||
| ) |
| data_get_file_areas | ( | $ | course, |
| $ | cm, | ||
| $ | context | ||
| ) |
| data_get_participants | ( | $ | dataid | ) |
| data_get_user_grades | ( | $ | data, |
| $ | userid = 0 |
||
| ) |
| data_grade_item_delete | ( | $ | data | ) |
Delete grade item for given data
object
| object | $data | object |
Definition at line 1139 of file lib.php.


| data_grade_item_update | ( | $ | data, |
| $ | grades = NULL |
||
| ) |
Update/create grade item for given data
object
| object | $data | object with extra cmidnumber |
| mixed | optional array/object of grade(s); 'reset' means reset grades in gradebook |
Definition at line 1105 of file lib.php.


| data_isowner | ( | $ | record | ) |
| data_numentries | ( | $ | data | ) |
| data_page_type_list | ( | $ | pagetype, |
| $ | parentcontext, | ||
| $ | currentcontext | ||
| ) |
| data_pluginfile | ( | $ | course, |
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| $ | args, | ||
| $ | forcedownload | ||
| ) |
Serves the data attachments. Implements needed access control ;-)
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| array | $args | |
| bool | $forcedownload |
Definition at line 2878 of file lib.php.

| data_preset_name | ( | $ | shortname, |
| $ | path | ||
| ) |
| data_preset_path | ( | $ | course, |
| $ | userid, | ||
| $ | shortname | ||
| ) |
| data_presets_export | ( | $ | course, |
| $ | cm, | ||
| $ | data, | ||
| $ | tostorage = false |
||
| ) |
| data_presets_generate_xml | ( | $ | course, |
| $ | cm, | ||
| $ | data | ||
| ) |
Generates the XML for the database module provided
moodle_database $DB
| stdClass | $course | The course the database module belongs to. |
| stdClass | $cm | The course module record |
| stdClass | $data | The database record |
Definition at line 3102 of file lib.php.


| data_presets_save | ( | $ | course, |
| $ | cm, | ||
| $ | data, | ||
| $ | path | ||
| ) |
| data_print_header | ( | $ | course, |
| $ | cm, | ||
| $ | data, | ||
| $ | currenttab = '' |
||
| ) |
| data_print_preference_form | ( | $ | data, |
| $ | perpage, | ||
| $ | search, | ||
| $ | sort = '', |
||
| $ | order = 'ASC', |
||
| $ | search_array = '', |
||
| $ | advanced = 0, |
||
| $ | mode = '' |
||
| ) |
function that takes in the current data, number of items per page, a search string and prints a preference box in view.php
This preference box prints a searchable advanced search template if a) A template is defined b) The advanced search checkbox is checked.
object object
| object | $data | |
| int | $perpage | |
| string | $search | |
| string | $sort | |
| string | $order | |
| array | $search_array | |
| int | $advanced | |
| string | $mode |
Definition at line 1528 of file lib.php.

| data_print_ratings | ( | $ | data, |
| $ | record | ||
| ) |
| data_print_template | ( | $ | template, |
| $ | records, | ||
| $ | data, | ||
| $ | search = '', |
||
| $ | page = 0, |
||
| $ | return = false |
||
| ) |
takes a list of records, the current data, a search string, and mode to display prints the translated template
object object
| string | $template | |
| array | $records | |
| object | $data | |
| string | $search | |
| int | $page | |
| bool | $return |
Definition at line 1226 of file lib.php.


| data_rating_permissions | ( | $ | contextid, |
| $ | component, | ||
| $ | ratingarea | ||
| ) |
Return rating related permissions
| string | $contextid | the context id |
| string | $component | the component to get rating permissions for |
| string | $ratingarea | the rating area to get permissions for |
Definition at line 1389 of file lib.php.

| data_rating_validate | ( | $ | params | ) |
Validates a submitted rating
| array | $params | submitted data context => object the context in which the rated items exists [required] itemid => int the ID of the object being rated scaleid => int the scale from which the user can select a rating. Used for bounds checking. [required] rating => int the submitted rating rateduserid => int the id of the user whose items have been rated. NOT the user who submitted the ratings. 0 to update all. [required] aggregation => int the aggregation method to apply when calculating grades ie RATING_AGGREGATE_AVERAGE [required] |
Definition at line 1413 of file lib.php.

| data_replace_field_in_templates | ( | $ | data, |
| $ | searchfieldname, | ||
| $ | newfieldname | ||
| ) |
| data_reset_course_form_defaults | ( | $ | course | ) |
| data_reset_course_form_definition | ( | &$ | mform | ) |
| data_reset_gradebook | ( | $ | courseid, |
| $ | type = '' |
||
| ) |
| data_reset_userdata | ( | $ | data | ) |
Actual implementation of the reset course functionality, delete all the data responses for course $data->courseid.
object object
| object | $data | the data submitted from the reset course. |
Definition at line 2531 of file lib.php.

| data_supports | ( | $ | feature | ) |
| data_tags_check | ( | $ | dataid, |
| $ | template | ||
| ) |
| data_update_grades | ( | $ | data, |
| $ | userid = 0, |
||
| $ | nullifnone = true |
||
| ) |
| data_update_instance | ( | $ | data | ) |
| data_user_can_add_entry | ( | $ | data, |
| $ | currentgroup, | ||
| $ | groupmode, | ||
| $ | context = null |
||
| ) |
| data_user_complete | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | data | ||
| ) |
| data_user_outline | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | data | ||
| ) |
| is_directory_a_preset | ( | $ | directory | ) |