Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Files | |
file | access.php |
Plugin capabilities. | |
file | activity.php |
Search area for mod_glossary activities. | |
file | activity_base.php |
Activity base class. | |
file | backup_glossary_activity_task.class.php |
Defines backup_glossary_activity_task class. | |
file | backup_glossary_stepslib.php |
@subpackage backup-moodle2 | |
file | behat_mod_glossary.php |
Steps definitions related with the glossary activity. | |
file | caches.php |
Glossary cache definitions. | |
file | category_created.php |
The mod_glossary glossary category created event. | |
file | category_deleted.php |
The mod_glossary glossary category deleted event. | |
file | category_updated.php |
The mod_glossary glossary category updated event. | |
file | cognitive_depth.php |
Cognitive depth indicator - glossary. | |
file | comment_created.php |
The mod_glossary comment created event. | |
file | comment_deleted.php |
The mod_glossary comment deleted event. | |
file | concept_cache.php |
Entry caching for glossary filter. | |
file | course_module_instance_list_viewed.php |
The mod_glossary instance list viewed event. | |
file | course_module_viewed.php |
The mod_glossary course module viewed event. | |
file | entry.php |
Glossary entries search. | |
file | entry_approved.php |
The mod_glossary entry approved event. | |
file | entry_created.php |
The mod_glossary entry created event. | |
file | entry_deleted.php |
The mod_glossary entry deleted event. | |
file | entry_disapproved.php |
The mod_glossary entry disapproved event. | |
file | entry_query_builder.php |
Entry query builder. | |
file | entry_updated.php |
The mod_glossary entry updated event. | |
file | entry_viewed.php |
The mod_glossary entry viwed event. | |
file | events.php |
Glossary event observer. | |
file | external.php |
Glossary module external API. | |
file | lib.php |
mod_glossary data generator. | |
file | lib.php |
Library of functions and constants for module glossary (replace glossary with the name of your module and delete this line) | |
file | lib.php |
Provides support for the conversion of moodle1 backup to the moodle2 format. | |
file | locallib.php |
Library of functions and constants for module glossary outside of what is required for the core moodle api. | |
file | log.php |
Definition of log events. | |
file | provider.php |
Privacy Subsystem implementation for mod_glossary. | |
file | restore_glossary_activity_task.class.php |
@subpackage backup-moodle2 | |
file | restore_glossary_stepslib.php |
@subpackage backup-moodle2 | |
file | rsslib.php |
This file adds support to rss feeds generation. | |
file | services.php |
Glossary module external functions. | |
file | social_breadth.php |
Social breadth indicator - glossary. | |
file | tag.php |
Tag areas in component mod_glossary. | |
file | version.php |
Glossary module version information. | |
Namespaces | |
mod_glossary\analytics\indicator | |
| |
mod_glossary\event | |
| |
mod_glossary\local | |
| |
mod_glossary\privacy | |
| |
mod_glossary\search | |
| |
Classes | |
class | backup_glossary_activity_structure_step |
Define all the backup steps that will be used by the backup_glossary_activity_task. More... | |
class | backup_glossary_activity_task |
Provides the steps to perform one complete backup of the Glossary instance. More... | |
class | behat_mod_glossary |
class | glossary_entry_portfolio_caller |
class to export a single glossary entry More... | |
class | glossary_file_info_container |
class | glossary_full_portfolio_caller |
class to handle exporting an entire glossary database More... | |
class | mod_glossary\analytics\indicator\activity_base |
Activity base class. More... | |
class | mod_glossary\analytics\indicator\cognitive_depth |
Cognitive depth indicator - glossary. More... | |
class | mod_glossary\analytics\indicator\social_breadth |
Social breadth indicator - glossary. More... | |
class | mod_glossary\event\category_created |
The mod_glossary glossary category created event class. More... | |
class | mod_glossary\event\category_deleted |
The mod_glossary glossary category deleted event class. More... | |
class | mod_glossary\event\category_updated |
The mod_glossary glossary category updated event class. More... | |
class | mod_glossary\event\comment_created |
The mod_glossary comment created event class. More... | |
class | mod_glossary\event\comment_deleted |
The mod_glossary comment deleted event class. More... | |
class | mod_glossary\event\course_module_instance_list_viewed |
The mod_glossary instance list viewed event class. More... | |
class | mod_glossary\event\course_module_viewed |
class | mod_glossary\event\entry_approved |
The mod_glossary entry approved event class. More... | |
class | mod_glossary\event\entry_created |
class | mod_glossary\event\entry_deleted |
class | mod_glossary\event\entry_disapproved |
The mod_glossary entry disapproved event. More... | |
class | mod_glossary\event\entry_updated |
class | mod_glossary\event\entry_viewed |
The mod_glossary entry viewed event class. More... | |
class | mod_glossary\local\concept_cache |
Concept caching for glossary filter. More... | |
class | mod_glossary\privacy\provider |
Implementation of the privacy subsystem plugin provider for the glossary activity module. More... | |
class | mod_glossary\search\activity |
Search area for mod_glossary activities. More... | |
class | mod_glossary\search\entry |
Glossary entries search. More... | |
class | mod_glossary_entry_query_builder |
Entry query builder class. More... | |
class | mod_glossary_external |
class | mod_glossary_generator |
class | moodle1_mod_glossary_handler |
Glossary conversion handler. More... | |
class | restore_glossary_activity_structure_step |
Define all the restore steps that will be used by the restore_glossary_activity_task. More... | |
class | restore_glossary_activity_task |
glossary restore task that provides all the settings and steps to perform one complete restore of the activity More... | |
Functions | |
object | glossary_add_instance ($glossary) |
STANDARD FUNCTIONS ///////////////////////////////////////////////////////////. More... | |
glossary_can_view_entry ($entry, $cminfo) | |
Checks if the current user can see the glossary entry. More... | |
glossary_check_updates_since (cm_info $cm, $from, $filter=array()) | |
Check if the module has any update that affects the current user since a given time. More... | |
glossary_comment_permissions ($comment_param) | |
glossary_comment_validate ($comment_param) | |
glossary_concept_exists ($glossary, $concept) | |
Check if a concept exists in a glossary. More... | |
moodle_database | glossary_count_unrated_entries ($glossaryid, $userid) |
How many unrated entries are in the given glossary for a given user? More... | |
glossary_cron () | |
Function to be run periodically according to the moodle cron This function searches for things that need to be done, such as sending out mail, toggling flags etc ... More... | |
glossary_debug ($debug, $text, $br=1) | |
object | glossary_delete_instance ($id) |
Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it. More... | |
glossary_edit_entry ($entry, $course, $cm, $glossary, $context) | |
Creates or updates a glossary entry. More... | |
glossary_end_tag ($tag, $level=0, $endline=true) | |
Return the xml end tag. More... | |
glossary_entry_view ($entry, $context) | |
Notify that a glossary entry was viewed. More... | |
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. More... | |
object | glossary_full_tag ($tag, $level=0, $endline=true, $content) |
Return the start tag, the contents and the end tag. More... | |
object | glossary_generate_export_csv ($entries, $aliases, $categories) |
glossary_generate_export_file ($glossary, $ignored="", $hook=0) | |
glossary_get_all_tabs () | |
Return list of all glossary tabs. More... | |
glossary_get_authors ($glossary, $context, $limit, $from, $options=array()) | |
Returns the authors in a glossary. More... | |
object | glossary_get_available_formats () |
Any other glossary functions go here. More... | |
glossary_get_categories ($glossary, $from, $limit) | |
Returns the categories of a glossary. More... | |
object | glossary_get_completion_state ($course, $cm, $userid, $type) |
Obtains the automatic completion state for this glossary based on any conditions in glossary settings. More... | |
glossary_get_coursemodule_info ($coursemodule) | |
Add a get_coursemodule_info function in case any glossary type wants to add 'extra' information for the course (see resource). More... | |
glossary_get_editor_and_attachment_options ($course, $context, $entry) | |
Return the editor and attachment options when editing a glossary entry. More... | |
object | glossary_get_entries ($glossaryid, $entrylist, $pivot="") |
glossary_get_entries_by_author ($glossary, $context, $letter, $field, $sort, $from, $limit, $options=array()) | |
Returns the entries of a glossary by author. More... | |
glossary_get_entries_by_author_id ($glossary, $context, $authorid, $order, $sort, $from, $limit, $options=array()) | |
Returns the entries of a glossary by category. More... | |
glossary_get_entries_by_category ($glossary, $context, $categoryid, $from, $limit, $options=array()) | |
Returns the entries of a glossary by category. More... | |
glossary_get_entries_by_date ($glossary, $context, $order, $sort, $from, $limit, $options=array()) | |
Returns the entries of a glossary by date. More... | |
glossary_get_entries_by_letter ($glossary, $context, $letter, $from, $limit, $options=array()) | |
Returns the entries of a glossary by letter. More... | |
glossary_get_entries_by_search ($glossary, $context, $query, $fullsearch, $order, $sort, $from, $limit, $options=array()) | |
Returns the entries of a glossary by search. More... | |
glossary_get_entries_by_term ($glossary, $context, $term, $from, $limit, $options=array()) | |
Returns the entries of a glossary by term. More... | |
object | glossary_get_entries_search ($concept, $courseid) |
@global object More... | |
glossary_get_entries_to_approve ($glossary, $context, $letter, $order, $sort, $from, $limit) | |
Returns the entries to be approved. More... | |
glossary_get_entry_by_id ($id) | |
Fetch an entry. More... | |
glossary_get_extra_capabilities () | |
Returns all other caps used in module. More... | |
glossary_get_file_areas ($course, $cm, $context) | |
glossary_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) | |
File browsing support for glossary module. More... | |
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. More... | |
glossary_get_post_actions () | |
List the actions that correspond to a post of this module. More... | |
glossary_get_recent_mod_activity (&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) | |
Returns all glossary entries since a given time for specified glossary. More... | |
glossary_get_search_terms_sql (array $terms, $fullsearch=true, $glossaryid=null) | |
Get the SQL where clause for searching terms. More... | |
object | glossary_get_user_entries ($glossaryid, $userid) |
glossary_get_user_grades ($glossary, $userid=0) | |
Return grade for given user or all users. More... | |
glossary_get_view_actions () | |
List the actions that correspond to a view of this module. More... | |
glossary_get_visible_tabs ($displayformat) | |
Convert 'showtabs' string to array. More... | |
glossary_grade_item_delete ($glossary) | |
glossary_grade_item_update ($glossary, $grades=NULL) | |
object | glossary_log_info ($log) |
glossary_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. More... | |
glossary_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) | |
object | glossary_print_all_links ($cm, $glossary, $mode, $hook) |
object | 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='') | |
object | glossary_print_attachments ($entry, $cm, $type=NULL, $unused=null) |
if return=html, then return a html string. More... | |
glossary_print_author_menu ($cm, $glossary, $mode, $hook, $sortkey='', $sortorder='') | |
object | glossary_print_categories_menu ($cm, $glossary, $hook, $category) |
@global object More... | |
object | glossary_print_dynaentry ($courseid, $entries, $displayformat=-1) |
@global object @global object More... | |
object | glossary_print_entry ($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $displayformat=-1, $printview=false) |
@global object More... | |
object | glossary_print_entry_aliases ($course, $cm, $glossary, $entry, $mode='', $hook='', $type='print') |
object | glossary_print_entry_approval ($cm, $entry, $mode, $align="right", $insidetable=true) |
glossary_print_entry_attachment ($entry, $cm, $format=null, $unused1=null, $unused2=null) | |
Print the list of attachments for this glossary entry. More... | |
glossary_print_entry_concept ($entry, $return=false) | |
Print glossary concept/term as a heading <h4> More... | |
glossary_print_entry_default ($entry, $glossary, $cm) | |
Default (old) print format used if custom function doesn't exist in format. More... | |
moodle_database | glossary_print_entry_definition ($entry, $glossary, $cm) |
DB. More... | |
object | glossary_print_entry_icons ($course, $cm, $glossary, $entry, $mode='', $hook='', $type='print') |
@global object @global object More... | |
glossary_print_entry_lower_section ($course, $cm, $glossary, $entry, $mode, $hook, $printicons, $aliases=true) | |
object | glossary_print_entry_ratings ($course, $entry) |
@global object @global object More... | |
glossary_print_export_menu ($cm, $glossary, $mode, $hook, $sortkey='', $sortorder='') | |
glossary_print_import_menu ($cm, $glossary, $mode, $hook, $sortkey='', $sortorder='') | |
object | 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. More... | |
glossary_print_recent_mod_activity ($activity, $courseid, $detail, $modnames, $viewfullnames) | |
Outputs the glossary entry indicated by $activity. More... | |
object | glossary_print_sorting_links ($cm, $mode, $sortkey='', $sortorder='') |
object | glossary_print_special_links ($cm, $glossary, $mode, $hook) |
glossary_print_tabbed_table_end () | |
glossary_rating_permissions ($contextid, $component, $ratingarea) | |
Return rating related permissions. More... | |
glossary_rating_validate ($params) | |
Validates a submitted rating. More... | |
object | glossary_read_imported_file ($file_content) |
Functions designed by Eloy Lafuente Functions to create, open and write header of the xml file. More... | |
glossary_reset_course_form_defaults ($course) | |
Course reset form defaults. More... | |
glossary_reset_course_form_definition (&$mform) | |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the glossary. More... | |
glossary_reset_gradebook ($courseid, $type='') | |
Removes all grades from gradebook. More... | |
object | glossary_reset_userdata ($data) |
Actual implementation of the reset course functionality, delete all the glossary responses for course $data->courseid. More... | |
glossary_rss_delete_file ($glossary) | |
Given a glossary object, deletes all cached RSS files associated with it. More... | |
glossary_rss_get_feed ($context, $args) | |
Returns the path to the cached rss feed contents. More... | |
glossary_rss_get_sql ($glossary, $time=0) | |
The appropriate SQL query for the glossary items to go into the RSS feed. More... | |
glossary_rss_newstuff ($glossary, $time) | |
If there is new stuff in since $time this returns true Otherwise it returns false. More... | |
glossary_scale_used () | |
object | glossary_scale_used_anywhere ($scaleid) |
Checks if scale is being used by any instance of glossary. More... | |
object | glossary_search ($course, $searchterms, $extended=0, $glossary=NULL) |
It returns all entries from all glossaries that matches the specified criteria within a given $course. More... | |
object | glossary_search_entries ($searchterms, $glossary, $extended) |
glossary_set_default_visible_tabs ($glossaryformat) | |
Set 'showtabs' value for glossary formats. More... | |
glossary_sort_entries ( $entry0, $entry1) | |
glossary_start_tag ($tag, $level=0, $endline=false) | |
Return the xml start tag. More... | |
glossary_supports ($feature) | |
glossary_update_grades ($glossary=null, $userid=0, $nullifnone=true) | |
object | glossary_update_instance ($glossary) |
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data. More... | |
object | glossary_user_complete ($course, $user, $mod, $glossary) |
Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports. More... | |
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. More... | |
glossary_view ($glossary, $course, $cm, $context, $mode) | |
Notify that the glossary was viewed. More... | |
glossary_xml_export_files ($tag, $taglevel, $contextid, $filearea, $itemid) | |
Prepares file area to export as part of XML export. More... | |
glossary_xml_import_files ($xmlparent, $tag, $contextid, $filearea, $itemid) | |
Parses files from XML import and inserts them into file system. More... | |
mod_glossary_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, int $userid=0) | |
This function receives a calendar event and returns the action associated with it, or null if there is none. More... | |
mod_glossary_get_completion_active_rule_descriptions ($cm) | |
Callback which returns human-readable strings describing the active completion custom rules for the module instance. More... | |
mod_glossary_get_fontawesome_icon_map () | |
Get icon mapping for font-awesome. More... | |
mod_glossary_get_tagged_entries ($tag, $exclusivemode=false, $fromctx=0, $ctx=0, $rec=1, $page=0) | |
Returns glossary entries tagged with a specified tag. More... | |
object glossary_add_instance | ( | $glossary | ) |
STANDARD FUNCTIONS ///////////////////////////////////////////////////////////.
object | $glossary |
int |
glossary_can_view_entry | ( | $entry, | |
$cminfo | |||
) |
Checks if the current user can see the glossary entry.
stdClass | $entry | |
cm_info | $cminfo |
bool |
glossary_check_updates_since | ( | cm_info | $cm, |
$from, | |||
$filter = array() |
|||
) |
Check if the module has any update that affects the current user since a given time.
cm_info | $cm | course module data |
int | $from | the time to check updates from |
array | $filter | if we need to check only specific updates |
stdClass | an object with the different type of areas indicating if they were updated or not |
glossary_concept_exists | ( | $glossary, | |
$concept | |||
) |
Check if a concept exists in a glossary.
stdClass | $glossary | glossary object |
string | $concept | the concept to check |
bool | true if exists |
moodle_database glossary_count_unrated_entries | ( | $glossaryid, | |
$userid | |||
) |
How many unrated entries are in the given glossary for a given user?
$DB
int | $glossaryid | |
int | $userid |
int |
glossary_cron | ( | ) |
Function to be run periodically according to the moodle cron This function searches for things that need to be done, such as sending out mail, toggling flags etc ...
bool |
glossary_debug | ( | $debug, | |
$text, | |||
$br = 1 |
|||
) |
bool | $debug | |
string | $text | |
int | $br |
object glossary_delete_instance | ( | $id | ) |
Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it.
int | $id | glossary id |
bool | success |
glossary_edit_entry | ( | $entry, | |
$course, | |||
$cm, | |||
$glossary, | |||
$context | |||
) |
Creates or updates a glossary entry.
stdClass | $entry | entry data |
stdClass | $course | course object |
stdClass | $cm | course module object |
stdClass | $glossary | glossary object |
stdClass | $context | context object |
stdClass | the complete new or updated entry |
glossary_end_tag | ( | $tag, | |
$level = 0 , |
|||
$endline = true |
|||
) |
Return the xml end tag.
string | $tag | |
int | $level | |
bool | $endline |
string |
glossary_entry_view | ( | $entry, | |
$context | |||
) |
Notify that a glossary entry was viewed.
This will trigger relevant events.
stdClass | $entry | The entry object. |
stdClass | $context | The context object. |
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 |
object glossary_full_tag | ( | $tag, | |
$level = 0 , |
|||
$endline = true , |
|||
$content | |||
) |
Return the start tag, the contents and the end tag.
string | $tag | |
int | $level | |
bool | $endline | |
string | $content |
string |
object glossary_generate_export_csv | ( | $entries, | |
$aliases, | |||
$categories | |||
) |
array | $entries | |
array | $aliases | |
array | $categories |
string |
glossary_generate_export_file | ( | $glossary, | |
$ignored = "" , |
|||
$hook = 0 |
|||
) |
object | $glossary | |
string | $ignored | invalid parameter |
int | string | $hook |
string |
glossary_get_all_tabs | ( | ) |
glossary_get_authors | ( | $glossary, | |
$context, | |||
$limit, | |||
$from, | |||
$options = array() |
|||
) |
Returns the authors in a glossary.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
int | $limit | Number of records to fetch. |
int | $from | Fetch records from. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
object glossary_get_available_formats | ( | ) |
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).
@global object
array |
glossary_get_categories | ( | $glossary, | |
$from, | |||
$limit | |||
) |
Returns the categories of a glossary.
object | $glossary | The glossary. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | The first element being the recordset, the second the number of entries. |
object glossary_get_completion_state | ( | $course, | |
$cm, | |||
$userid, | |||
$type | |||
) |
Obtains the automatic completion state for this glossary based on any conditions in glossary settings.
@global 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) |
bool | True if completed, false if not. (If no conditions, then return value depends on comparison type) |
glossary_get_coursemodule_info | ( | $coursemodule | ) |
Add a get_coursemodule_info function in case any glossary type wants to add 'extra' information for the course (see resource).
Given a course_module object, this function returns any "extra" information that may be needed when printing this activity in a course listing. See get_array_of_activities() in course/lib.php.
stdClass | $coursemodule | The coursemodule object (record). |
cached_cm_info | An object on information that the courses will know about (most noticeably, an icon). |
glossary_get_editor_and_attachment_options | ( | $course, | |
$context, | |||
$entry | |||
) |
Return the editor and attachment options when editing a glossary entry.
stdClass | $course | course object |
stdClass | $context | context object |
stdClass | $entry | entry object |
array | array containing the editor and attachment options |
object glossary_get_entries | ( | $glossaryid, | |
$entrylist, | |||
$pivot = "" |
|||
) |
int | $glossaryid | |
string | $entrylist | |
string | $pivot |
array |
glossary_get_entries_by_author | ( | $glossary, | |
$context, | |||
$letter, | |||
$field, | |||
$sort, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by author.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
string | $letter | The letter |
string | $field | The field to search: FIRSTNAME or LASTNAME. |
string | $sort | The sorting: ASC or DESC. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
glossary_get_entries_by_author_id | ( | $glossary, | |
$context, | |||
$authorid, | |||
$order, | |||
$sort, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by category.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
int | $authorid | The author ID. |
string | $order | The mode of ordering: CONCEPT, CREATION or UPDATE. |
string | $sort | The direction of the ordering: ASC or DESC. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
glossary_get_entries_by_category | ( | $glossary, | |
$context, | |||
$categoryid, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by category.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
int | $categoryid | The category ID, or GLOSSARY_SHOW_* constant. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
glossary_get_entries_by_date | ( | $glossary, | |
$context, | |||
$order, | |||
$sort, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by date.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
string | $order | The mode of ordering: CREATION or UPDATE. |
string | $sort | The direction of the ordering: ASC or DESC. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
glossary_get_entries_by_letter | ( | $glossary, | |
$context, | |||
$letter, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by letter.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
string | $letter | The letter, or ALL, or SPECIAL. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
glossary_get_entries_by_search | ( | $glossary, | |
$context, | |||
$query, | |||
$fullsearch, | |||
$order, | |||
$sort, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by search.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
string | $query | The search query. |
bool | $fullsearch | Whether or not full search is required. |
string | $order | The mode of ordering: CONCEPT, CREATION or UPDATE. |
string | $sort | The direction of the ordering: ASC or DESC. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the array of results, the second the number of entries. |
glossary_get_entries_by_term | ( | $glossary, | |
$context, | |||
$term, | |||
$from, | |||
$limit, | |||
$options = array() |
|||
) |
Returns the entries of a glossary by term.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
string | $term | The term we are searching for, a concept or alias. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | $options | Accepts:
|
array | The first element being the recordset, the second the number of entries. |
object glossary_get_entries_search | ( | $concept, | |
$courseid | |||
) |
@global object
object | $concept | |
string | $courseid |
array |
glossary_get_entries_to_approve | ( | $glossary, | |
$context, | |||
$letter, | |||
$order, | |||
$sort, | |||
$from, | |||
$limit | |||
) |
Returns the entries to be approved.
object | $glossary | The glossary. |
context | $context | The context of the glossary. |
string | $letter | The letter, or ALL, or SPECIAL. |
string | $order | The mode of ordering: CONCEPT, CREATION or UPDATE. |
string | $sort | The direction of the ordering: ASC or DESC. |
int | $from | Fetch records from. |
int | $limit | Number of records to fetch. |
array | The first element being the recordset, the second the number of entries. |
glossary_get_entry_by_id | ( | $id | ) |
Fetch an entry.
int | $id | The entry ID. |
object|false | The entry, or false when not found. |
glossary_get_extra_capabilities | ( | ) |
Returns all other caps used in module.
array |
glossary_get_file_info | ( | $browser, | |
$areas, | |||
$course, | |||
$cm, | |||
$context, | |||
$filearea, | |||
$itemid, | |||
$filepath, | |||
$filename | |||
) |
File browsing support for glossary module.
file_browser | $browser | |
array | $areas | |
stdClass | $course | |
cm_info | $cm | |
context | $context | |
string | $filearea | |
int | $itemid | |
string | $filepath | |
string | $filename |
file_info_stored | file_info_stored instance or null if not found |
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 |
string |
glossary_get_post_actions | ( | ) |
List the actions that correspond to a post of this module.
This is used by the participation report.
Note: This is not used by new logging system. Event with crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING will be considered as post action.
array |
glossary_get_recent_mod_activity | ( | & | $activities, |
& | $index, | ||
$timestart, | |||
$courseid, | |||
$cmid, | |||
$userid = 0 , |
|||
$groupid = 0 |
|||
) |
Returns all glossary entries since a given time for specified glossary.
array | $activities | sequentially indexed array of objects |
int | $index | |
int | $timestart | |
int | $courseid | |
int | $cmid | |
int | $userid | defaults to 0 |
int | $groupid | defaults to 0 |
void | adds items into $activities and increases $index |
glossary_get_search_terms_sql | ( | array | $terms, |
$fullsearch = true , |
|||
$glossaryid = null |
|||
) |
Get the SQL where clause for searching terms.
Note that this does not handle invalid or too short terms.
array | $terms | Array of terms. |
bool | $fullsearch | Whether or not full search should be enabled. |
int | $glossaryid | The ID of a glossary to reduce the search results. |
array | The first element being the where clause, the second array of parameters. |
object glossary_get_user_entries | ( | $glossaryid, | |
$userid | |||
) |
int | $glossaryid | |
int | $userid |
array |
glossary_get_user_grades | ( | $glossary, | |
$userid = 0 |
|||
) |
Return grade for given user or all users.
stdClass | $glossary | A glossary instance |
int | $userid | Optional user id, 0 means all users |
array | An array of grades, false if none |
glossary_get_view_actions | ( | ) |
List the actions that correspond to a view of this module.
This is used by the participation report.
Note: This is not used by new logging system. Event with crud = 'r' and edulevel = LEVEL_PARTICIPATING will be considered as view action.
array |
glossary_get_visible_tabs | ( | $displayformat | ) |
Convert 'showtabs' string to array.
stdClass | $displayformat | record from 'glossary_formats' table |
array |
object glossary_log_info | ( | $log | ) |
object | $log |
glossary_page_type_list | ( | $pagetype, | |
$parentcontext, | |||
$currentcontext | |||
) |
Return a list of page types.
string | $pagetype | current page type |
stdClass | $parentcontext | Block's parent context |
stdClass | $currentcontext | Current context of block |
object glossary_print_all_links | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook | |||
) |
object | $cm | |
object | $glossary | |
string | $mode | |
string | $hook |
object glossary_print_alphabet_links | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook, | |||
$sortkey, | |||
$sortorder | |||
) |
object | $glossary | |
string | $mode | |
string | $hook | |
string | $sortkey | |
string | $sortorder |
glossary_print_alphabet_menu | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook, | |||
$sortkey = '' , |
|||
$sortorder = '' |
|||
) |
object | $cm | |
object | $glossary | |
string | $hook | |
string | $sortkey | |
string | $sortorder |
glossary_print_approval_menu | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook, | |||
$sortkey = '' , |
|||
$sortorder = '' |
|||
) |
object | $cm | |
object | $glossary | |
string | $mode | |
string | $hook | |
string | $sortkey | |
string | $sortorder |
object glossary_print_attachments | ( | $entry, | |
$cm, | |||
$type = NULL , |
|||
$unused = null |
|||
) |
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.
@global object
object | $entry | |
object | $cm | |
string | $type | html, txt, empty |
string | $unused | This parameter is no longer used |
string | image string or nothing depending on $type param |
glossary_print_author_menu | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook, | |||
$sortkey = '' , |
|||
$sortorder = '' |
|||
) |
object | $cm | |
object | $glossary | |
string | $hook | |
string | $sortkey | |
string | $sortorder |
object glossary_print_categories_menu | ( | $cm, | |
$glossary, | |||
$hook, | |||
$category | |||
) |
@global object
object | $cm | |
object | $glossary | |
string | $hook | |
object | $category |
object glossary_print_dynaentry | ( | $courseid, | |
$entries, | |||
$displayformat = -1 |
|||
) |
@global object @global object
int | $courseid | |
array | $entries | |
int | $displayformat |
object glossary_print_entry | ( | $course, | |
$cm, | |||
$glossary, | |||
$entry, | |||
$mode = '' , |
|||
$hook = '' , |
|||
$printicons = 1 , |
|||
$displayformat = -1 , |
|||
$printview = false |
|||
) |
@global object
object | $course | |
object | $course | |
object | $glossary | |
object | $entry | |
string | $mode | |
string | $hook | |
int | $printicons | |
int | $displayformat | |
bool | $printview |
mixed |
object glossary_print_entry_aliases | ( | $course, | |
$cm, | |||
$glossary, | |||
$entry, | |||
$mode = '' , |
|||
$hook = '' , |
|||
$type = 'print' |
|||
) |
object | $course | |
object | $cm | |
object | $glossary | |
object | $entry | |
string | $mode | |
string | $hook | |
string | $type |
string|void |
object glossary_print_entry_approval | ( | $cm, | |
$entry, | |||
$mode, | |||
$align = "right" , |
|||
$insidetable = true |
|||
) |
object | $cm | |
object | $entry | |
string | $mode | |
string | $align | |
bool | $insidetable |
glossary_print_entry_attachment | ( | $entry, | |
$cm, | |||
$format = null , |
|||
$unused1 = null , |
|||
$unused2 = null |
|||
) |
Print the list of attachments for this glossary entry.
object | $entry | |
object | $cm | The coursemodule |
string | $format | The format for this view (html, or text) |
string | $unused1 | This parameter is no longer used |
string | $unused2 | This parameter is no longer used |
glossary_print_entry_concept | ( | $entry, | |
$return = false |
|||
) |
Print glossary concept/term as a heading <h4>
object | $entry |
glossary_print_entry_default | ( | $entry, | |
$glossary, | |||
$cm | |||
) |
Default (old) print format used if custom function doesn't exist in format.
object | $entry | |
object | $glossary | |
object | $cm |
void | Output is echo'd |
moodle_database glossary_print_entry_definition | ( | $entry, | |
$glossary, | |||
$cm | |||
) |
DB.
object | $entry | |
object | $glossary | |
object | $cm |
object glossary_print_entry_icons | ( | $course, | |
$cm, | |||
$glossary, | |||
$entry, | |||
$mode = '' , |
|||
$hook = '' , |
|||
$type = 'print' |
|||
) |
@global object @global object
object | $course | |
object | $cm | |
object | $glossary | |
object | $entry | |
string | $mode | |
string | $hook | |
string | $type |
string|void |
glossary_print_entry_lower_section | ( | $course, | |
$cm, | |||
$glossary, | |||
$entry, | |||
$mode, | |||
$hook, | |||
$printicons, | |||
$aliases = true |
|||
) |
object | $course | |
object | $cm | |
object | $glossary | |
object | $entry | |
string | $mode | |
object | $hook | |
bool | $printicons | |
bool | $aliases |
void |
object glossary_print_entry_ratings | ( | $course, | |
$entry | |||
) |
@global object @global object
object | $course | |
object | $entry |
bool |
glossary_print_export_menu | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook, | |||
$sortkey = '' , |
|||
$sortorder = '' |
|||
) |
object | $cm | |
object | $glossary | |
string | $hook | |
string | $sortkey | |
string | $sortorder |
glossary_print_import_menu | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook, | |||
$sortkey = '' , |
|||
$sortorder = '' |
|||
) |
object | $cm | |
object | $glossary | |
string | $hook | |
string | $sortkey | |
string | $sortorder |
object 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.
@global object @global object
object | $course | |
object | $viewfullnames | |
int | $timestart |
bool |
glossary_print_recent_mod_activity | ( | $activity, | |
$courseid, | |||
$detail, | |||
$modnames, | |||
$viewfullnames | |||
) |
Outputs the glossary entry indicated by $activity.
object | $activity | the activity object the glossary resides in |
int | $courseid | the id of the course the glossary resides in |
bool | $detail | not used, but required for compatibilty with other modules |
int | $modnames | not used, but required for compatibilty with other modules |
bool | $viewfullnames | not used, but required for compatibilty with other modules |
void |
object glossary_print_sorting_links | ( | $cm, | |
$mode, | |||
$sortkey = '' , |
|||
$sortorder = '' |
|||
) |
object | $cm | |
string | $mode | |
string | $sortkey | |
string | $sortorder |
object glossary_print_special_links | ( | $cm, | |
$glossary, | |||
$mode, | |||
$hook | |||
) |
object | $cm | |
object | $glossary | |
string | $mode | |
string | $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 |
array | an associative array of the user's rating permissions |
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] |
boolean | true if the rating is valid. Will throw rating_exception if not |
object glossary_read_imported_file | ( | $file_content | ) |
Functions designed by Eloy Lafuente Functions to create, open and write header of the xml file.
Read import file and convert to current charset
string | $file |
string |
glossary_reset_course_form_defaults | ( | $course | ) |
Course reset form defaults.
array |
glossary_reset_course_form_definition | ( | & | $mform | ) |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the glossary.
object | $mform | form passed by reference |
glossary_reset_gradebook | ( | $courseid, | |
$type = '' |
|||
) |
Removes all grades from gradebook.
int | $courseid | The ID of the course to reset |
string | $type | The optional type of glossary. 'main', 'secondary' or '' |
object glossary_reset_userdata | ( | $data | ) |
Actual implementation of the reset course functionality, delete all the glossary responses for course $data->courseid.
$data | the data submitted from the reset course. |
array | status array |
glossary_rss_delete_file | ( | $glossary | ) |
Given a glossary object, deletes all cached RSS files associated with it.
stdClass | $glossary |
glossary_rss_get_feed | ( | $context, | |
$args | |||
) |
Returns the path to the cached rss feed contents.
Creates/updates the cache if necessary.
stdClass | $context | the context |
array | $args | the arguments received in the url |
string | the full path to the cached RSS feed directory. Null if there is a problem. |
glossary_rss_get_sql | ( | $glossary, | |
$time = 0 |
|||
) |
The appropriate SQL query for the glossary items to go into the RSS feed.
stdClass | $glossary | the glossary object |
int | $time | check for items since this epoch timestamp |
string | the SQL query to be used to get the entried from the glossary table of the database |
glossary_rss_newstuff | ( | $glossary, | |
$time | |||
) |
If there is new stuff in since $time this returns true Otherwise it returns false.
stdClass | $glossary | the glossary activity object |
int | $time | epoch timestamp to compare new items against, 0 for everyting |
bool | true if there are new items |
glossary_scale_used | ( | ) |
object glossary_scale_used_anywhere | ( | $scaleid | ) |
Checks if scale is being used by any instance of glossary.
This is used to find out if scale used anywhere
int | $scaleid |
boolean | True if the scale is used by any glossary |
object 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.
@global object
object | $course | |
array | $searchterms | |
int | $extended | |
object | $glossary |
array |
object glossary_search_entries | ( | $searchterms, | |
$glossary, | |||
$extended | |||
) |
array | $searchterms | |
object | $glossary | |
bool | $extended |
array |
glossary_set_default_visible_tabs | ( | $glossaryformat | ) |
Set 'showtabs' value for glossary formats.
stdClass | $glossaryformat | record from 'glossary_formats' table |
glossary_sort_entries | ( | $entry0, | |
$entry1 | |||
) |
object | $entry0 | |
object | $entry1 |
int | [-1 | 0 | 1] |
glossary_start_tag | ( | $tag, | |
$level = 0 , |
|||
$endline = false |
|||
) |
Return the xml start tag.
string | $tag | |
int | $level | |
bool | $endline |
string |
glossary_supports | ( | $feature | ) |
string | $feature | FEATURE_xx constant for requested feature |
mixed | True if module supports feature, null if doesn't know |
object glossary_update_instance | ( | $glossary | ) |
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data.
@global object
object | $glossary |
bool |
object glossary_user_complete | ( | $course, | |
$user, | |||
$mod, | |||
$glossary | |||
) |
Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports.
object | $course | |
object | $user | |
object | $mod | |
object | $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 |
object|null |
glossary_view | ( | $glossary, | |
$course, | |||
$cm, | |||
$context, | |||
$mode | |||
) |
Notify that the glossary was viewed.
This will trigger relevant events and activity completion.
stdClass | $glossary | The glossary object. |
stdClass | $course | The course object. |
stdClass | $cm | The course module object. |
stdClass | $context | The context object. |
string | $mode | The mode in which the glossary was viewed. |
glossary_xml_export_files | ( | $tag, | |
$taglevel, | |||
$contextid, | |||
$filearea, | |||
$itemid | |||
) |
Prepares file area to export as part of XML export.
string | $tag | XML tag to use for the group |
int | $taglevel | |
int | $contextid | |
string | $filearea | |
int | $itemid |
string |
glossary_xml_import_files | ( | $xmlparent, | |
$tag, | |||
$contextid, | |||
$filearea, | |||
$itemid | |||
) |
Parses files from XML import and inserts them into file system.
array | $xmlparent | parent element in parsed XML tree |
string | $tag | |
int | $contextid | |
string | $filearea | |
int | $itemid |
int |
mod_glossary_core_calendar_provide_event_action | ( | calendar_event | $event, |
core_calendar\action_factory | $factory, | ||
int | $userid = 0 |
||
) |
This function receives a calendar event and returns the action associated with it, or null if there is none.
This is used by block_myoverview in order to display the event appropriately. If null is returned then the event is not displayed on the block.
calendar_event | $event | |
core_calendar\action_factory | $factory | |
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
core_calendar |
mod_glossary_get_completion_active_rule_descriptions | ( | $cm | ) |
Callback which returns human-readable strings describing the active completion custom rules for the module instance.
cm_info | stdClass | $cm | object with fields ->completion and ->customdata['customcompletionrules'] |
array::$descriptions | the array of descriptions for the custom rules. |
mod_glossary_get_fontawesome_icon_map | ( | ) |
Get icon mapping for font-awesome.
array |
mod_glossary_get_tagged_entries | ( | $tag, | |
$exclusivemode = false , |
|||
$fromctx = 0 , |
|||
$ctx = 0 , |
|||
$rec = 1 , |
|||
$page = 0 |
|||
) |
Returns glossary entries tagged with a specified tag.
This is a callback used by the tag area mod_glossary/glossary_entries to search for glossary entries tagged with a specific tag.
core_tag_tag | $tag | |
bool | $exclusivemode | if set to true it means that no other entities tagged with this tag are displayed on the page and the per-page limit may be bigger |
int | $fromctx | context id where the link was displayed, may be used by callbacks to display items in the same context first |
int | $ctx | context id where to search for records |
bool | $rec | search in subcontexts as well |
int | $page | 0-based number of page being displayed |
core_tag |
$definitions |
$logs |
$observers |
$tagareas |