|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
| enum GLOSSARY_AUTHOR_VIEW |
| enum GLOSSARY_DATE_VIEW |
| enum GLOSSARY_EXPORT_VIEW |
| enum GLOSSARY_IMPORT_VIEW |
| enum GLOSSARY_NO_VIEW |
| glossary_add_instance | ( | $ | glossary | ) |
STANDARD FUNCTIONS ///////////////////////////////////////////////////////////.
object
| object | $glossary |
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will create a new instance and return the id number of the new instance.
Definition at line 47 of file lib.php.

| glossary_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 } |
| glossary_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 2817 of file lib.php.

| glossary_count_unrated_entries | ( | $ | glossaryid, |
| $ | userid | ||
| ) |
How many unrated entries are in the given glossary for a given user?
moodle_database $DB
| int | $glossaryid | |
| int | $userid |
| glossary_cron | ( | ) |
| glossary_debug | ( | $ | debug, |
| $ | text, | ||
| $ | br = 1 |
||
| ) |
| glossary_delete_instance | ( | $ | id | ) |
| glossary_end_tag | ( | $ | tag, |
| $ | level = 0, |
||
| $ | endline = true |
||
| ) |
| glossary_extend_navigation | ( | $ | navigation, |
| $ | course, | ||
| $ | module, | ||
| $ | cm | ||
| ) |
| glossary_extend_settings_navigation | ( | settings_navigation $ | settings, |
| navigation_node $ | glossarynode | ||
| ) |
Adds module specific settings to the settings block
| settings_navigation | $settings | The settings navigation object |
| navigation_node | $glossarynode | The node to add module settings to |
Definition at line 2750 of file lib.php.

| glossary_full_tag | ( | $ | tag, |
| $ | level = 0, |
||
| $ | endline = true, |
||
| $ | content | ||
| ) |
| glossary_generate_export_csv | ( | $ | entries, |
| $ | aliases, | ||
| $ | categories | ||
| ) |
| glossary_generate_export_file | ( | $ | glossary, |
| $ | ignored = "", |
||
| $ | hook = 0 |
||
| ) |
Any other glossary functions go here. Each of them must have a name that starts with glossary_ This function return an array of valid glossary_formats records Everytime it's called, every existing format is checked, new formats are included if detected and old formats are deleted and any glossary using an invalid format is updated to the default (dictionary).
object object
Definition at line 765 of file lib.php.


| glossary_get_completion_state | ( | $ | course, |
| $ | cm, | ||
| $ | userid, | ||
| $ | type | ||
| ) |
Obtains the automatic completion state for this glossary based on any conditions in glossary settings.
object object
| object | $course | Course |
| object | $cm | Course-module |
| int | $userid | User ID |
| bool | $type | Type of comparison (or/and; can be used as return value if no conditions) |
| glossary_get_entries | ( | $ | glossaryid, |
| $ | entrylist, | ||
| $ | pivot = "" |
||
| ) |
| glossary_get_entries_search | ( | $ | concept, |
| $ | courseid | ||
| ) |
| glossary_get_file_areas | ( | $ | course, |
| $ | cm, | ||
| $ | context | ||
| ) |
| glossary_get_paging_bar | ( | $ | totalcount, |
| $ | page, | ||
| $ | perpage, | ||
| $ | baseurl, | ||
| $ | maxpageallowed = 99999, |
||
| $ | maxdisplay = 20, |
||
| $ | separator = " ", |
||
| $ | specialtext = "", |
||
| $ | specialvalue = -1, |
||
| $ | previousandnext = true |
||
| ) |
Returns the html code to represent any pagging bar. Paramenters are:
The function dinamically show the first and last pages, and "scroll" over pages. Fully compatible with Moodle's print_paging_bar() function. Perhaps some day this could replace the general one. ;-)
| int | $totalcount | total number of records to be displayed |
| int | $page | page currently selected (0 based) |
| int | $perpage | number of records per page |
| string | $baseurl | url to link in each page, the string 'page=XX' will be added automatically. |
| int | $maxpageallowed | Optional maximum number of page allowed. |
| int | $maxdisplay | Optional maximum number of page links to show in the bar |
| string | $separator | Optional string to be used between pages in the bar |
| string | $specialtext | Optional string to be showed as an special link |
| string | $specialvalue | Optional value (page) to be used in the special link |
| bool | $previousandnext | Optional to decide if we want the previous and next links |
| glossary_get_participants | ( | $ | glossaryid | ) |
| glossary_get_user_entries | ( | $ | glossaryid, |
| $ | userid | ||
| ) |
| glossary_get_user_grades | ( | $ | glossary, |
| $ | userid = 0 |
||
| ) |
| glossary_grade_item_delete | ( | $ | glossary | ) |
| glossary_grade_item_update | ( | $ | glossary, |
| $ | grades = NULL |
||
| ) |
Create/update grade item for given glossary
object
| object | $glossary | object with extra cmidnumber |
| mixed | optional array/object of grade(s); 'reset' means reset grades in gradebook |
Definition at line 650 of file lib.php.


| glossary_log_info | ( | $ | log | ) |
| glossary_page_type_list | ( | $ | pagetype, |
| $ | parentcontext, | ||
| $ | currentcontext | ||
| ) |
| glossary_pluginfile | ( | $ | course, |
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| $ | args, | ||
| $ | forcedownload | ||
| ) |
Serves the glossary attachments. Implements needed access control ;-)
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| array | $args | |
| bool | $forcedownload |
Definition at line 1475 of file lib.php.

| glossary_print_all_links | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook | ||
| ) |
| glossary_print_alphabet_links | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | sortkey, | ||
| $ | sortorder | ||
| ) |
| glossary_print_alphabet_menu | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | sortkey = '', |
||
| $ | sortorder = '' |
||
| ) |
| glossary_print_approval_menu | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | sortkey = '', |
||
| $ | sortorder = '' |
||
| ) |
| glossary_print_attachments | ( | $ | entry, |
| $ | cm, | ||
| $ | type = NULL, |
||
| $ | align = "left" |
||
| ) |
if return=html, then return a html string. if return=text, then return a text-only string. otherwise, print HTML for non-images, and return image HTML if attachment is an image, $align set its aligment.
object object
| object | $entry | |
| object | $cm | |
| string | $type | html, txt, empty |
| string | $align | left or right |
Definition at line 1391 of file lib.php.


| glossary_print_author_menu | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | sortkey = '', |
||
| $ | sortorder = '' |
||
| ) |
| glossary_print_categories_menu | ( | $ | cm, |
| $ | glossary, | ||
| $ | hook, | ||
| $ | category | ||
| ) |
| glossary_print_dynaentry | ( | $ | courseid, |
| $ | entries, | ||
| $ | displayformat = -1 |
||
| ) |
| glossary_print_entry | ( | $ | course, |
| $ | cm, | ||
| $ | glossary, | ||
| $ | entry, | ||
| $ | mode = '', |
||
| $ | hook = '', |
||
| $ | printicons = 1, |
||
| $ | displayformat = -1, |
||
| $ | printview = false |
||
| ) |
| glossary_print_entry_aliases | ( | $ | course, |
| $ | cm, | ||
| $ | glossary, | ||
| $ | entry, | ||
| $ | mode = '', |
||
| $ | hook = '', |
||
| $ | type = 'print' |
||
| ) |
| glossary_print_entry_approval | ( | $ | cm, |
| $ | entry, | ||
| $ | mode, | ||
| $ | align = "right", |
||
| $ | insidetable = true |
||
| ) |
| glossary_print_entry_attachment | ( | $ | entry, |
| $ | cm, | ||
| $ | format = NULL, |
||
| $ | align = "right", |
||
| $ | insidetable = true |
||
| ) |
valid format values: html : Return the HTML link for the attachment as an icon text : Return the HTML link for tha attachment as text blank : Print the output to the screen
Definition at line 1225 of file lib.php.


| glossary_print_entry_concept | ( | $ | entry, |
| $ | return = false |
||
| ) |
| glossary_print_entry_default | ( | $ | entry, |
| $ | glossary, | ||
| $ | cm | ||
| ) |
| glossary_print_entry_definition | ( | $ | entry, |
| $ | glossary, | ||
| $ | cm | ||
| ) |
| glossary_print_entry_icons | ( | $ | course, |
| $ | cm, | ||
| $ | glossary, | ||
| $ | entry, | ||
| $ | mode = '', |
||
| $ | hook = '', |
||
| $ | type = 'print' |
||
| ) |
| glossary_print_entry_lower_section | ( | $ | course, |
| $ | cm, | ||
| $ | glossary, | ||
| $ | entry, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | printicons, | ||
| $ | aliases = true |
||
| ) |
| glossary_print_entry_ratings | ( | $ | course, |
| $ | entry | ||
| ) |
| glossary_print_export_menu | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | sortkey = '', |
||
| $ | sortorder = '' |
||
| ) |
| glossary_print_import_menu | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook, | ||
| $ | sortkey = '', |
||
| $ | sortorder = '' |
||
| ) |
| glossary_print_recent_activity | ( | $ | course, |
| $ | viewfullnames, | ||
| $ | timestart | ||
| ) |
Given a course and a time, this module should find recent activity that has occurred in glossary activities and print it out. Return true if there was output, or false is there was none.
object object object
| object | $course | |
| object | $viewfullnames | |
| int | $timestart |
Definition at line 325 of file lib.php.

| glossary_print_sorting_links | ( | $ | cm, |
| $ | mode, | ||
| $ | sortkey = '', |
||
| $ | sortorder = '' |
||
| ) |
| glossary_print_special_links | ( | $ | cm, |
| $ | glossary, | ||
| $ | mode, | ||
| $ | hook | ||
| ) |
| glossary_rating_permissions | ( | $ | contextid, |
| $ | component, | ||
| $ | ratingarea | ||
| ) |
Return rating related permissions
| int | $contextid | the context id |
| string | $component | The component we want to get permissions for |
| string | $ratingarea | The ratingarea that we want to get permissions for |
Definition at line 474 of file lib.php.

| glossary_rating_validate | ( | $ | params | ) |
Validates a submitted rating
| array | $params | submitted data context => object the context in which the rated items exists [required] component => The component for this module - should always be mod_forum [required] ratingarea => object the context in which the rated items exists [required] itemid => int the ID of the object being rated [required] 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 [optional] |
Definition at line 502 of file lib.php.

| glossary_read_imported_file | ( | $ | file_content | ) |
| glossary_reset_course_form_defaults | ( | $ | course | ) |
| glossary_reset_course_form_definition | ( | &$ | mform | ) |
| glossary_reset_gradebook | ( | $ | courseid, |
| $ | type = '' |
||
| ) |
| glossary_reset_userdata | ( | $ | data | ) |
Actual implementation of the reset course functionality, delete all the glossary responses for course $data->courseid.
object
| $data | the data submitted from the reset course. |
updating dates - shift may be negative too
Definition at line 2477 of file lib.php.

| glossary_scale_used | ( | $ | glossaryid, |
| $ | scaleid | ||
| ) |
| glossary_scale_used_anywhere | ( | $ | scaleid | ) |
| glossary_search | ( | $ | course, |
| $ | searchterms, | ||
| $ | extended = 0, |
||
| $ | glossary = NULL |
||
| ) |
It returns all entries from all glossaries that matches the specified criteria within a given $course. It performs an $extended search if necessary. It restrict the search to only one $glossary if the $glossary parameter is set.
object object
| object | $course | |
| array | $searchterms | |
| int | $extended | |
| object | $glossary |
Initially we aren't going to perform NOT LIKE searches, only MSSQL and Oracle
will use it to simulate the "-" operator with LIKE clause
Under Oracle and MSSQL, trim the + and - operators and perform simpler LIKE (or NOT LIKE) queries
Definition at line 1275 of file lib.php.


| glossary_search_entries | ( | $ | searchterms, |
| $ | glossary, | ||
| $ | extended | ||
| ) |
| glossary_sort_entries | ( | $ | entry0, |
| $ | entry1 | ||
| ) |
| glossary_start_tag | ( | $ | tag, |
| $ | level = 0, |
||
| $ | endline = false |
||
| ) |
| glossary_supports | ( | $ | feature | ) |
| glossary_update_grades | ( | $ | glossary = null, |
| $ | userid = 0, |
||
| $ | nullifnone = true |
||
| ) |
| glossary_update_instance | ( | $ | glossary | ) |
| glossary_user_complete | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | glossary | ||
| ) |
| glossary_user_outline | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | glossary | ||
| ) |
Return a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports. $return->time = the time they did it $return->info = a short text description
| object | $course | |
| object | $user | |
| object | $mod | |
| object | $glossary |
Definition at line 220 of file lib.php.
