Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
mod_glossary

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  behat_mod_glossary_generator.php
 Behat data generator for mod_glossary.
 
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
 Provides support for the conversion of moodle1 backup to the moodle2 format.
 
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
 mod_glossary data generator.
 
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

namespace  mod_glossary\analytics\indicator
  
 
namespace  mod_glossary\event
  
 
namespace  mod_glossary\local
  
 
namespace  mod_glossary\privacy
  
 
namespace  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  behat_mod_glossary_generator
 
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...
 

Variables

 $capabilities
 
 $definitions
 
 $functions
 
 $logs
 
 $observers
 
 $plugin = 2020060900
 
 $tagareas
 
$plugin component = 'mod_glossary'
 
$plugin cron = 0
 
const GLOSSARY_ADDENTRY_VIEW 4
 
const GLOSSARY_APPROVAL_VIEW 7
 
const GLOSSARY_AUTHOR 'author'
 
const GLOSSARY_AUTHOR_VIEW 3
 
const GLOSSARY_CATEGORY 'category'
 
const GLOSSARY_CATEGORY_VIEW 1
 
const GLOSSARY_CONTINUOUS 'continuous'
 
const GLOSSARY_DATE 'date'
 
const GLOSSARY_DATE_VIEW 2
 
const GLOSSARY_DICTIONARY 'dictionary'
 
const GLOSSARY_EXPORT_VIEW 6
 
const GLOSSARY_FULLWITHOUTAUTHOR 'fullwithoutauthor'
 
const GLOSSARY_IMPORT_VIEW 5
 
const GLOSSARY_NO_VIEW -1
 
const GLOSSARY_SHOW_ALL_CATEGORIES 0
 
const GLOSSARY_SHOW_NOT_CATEGORISED -1
 
const GLOSSARY_STANDARD 'standard'
 
const GLOSSARY_STANDARD_VIEW 0
 
$plugin version = 2020061500
 

Detailed Description

Function Documentation

◆ glossary_add_instance()

object glossary_add_instance (   $glossary)

STANDARD FUNCTIONS ///////////////////////////////////////////////////////////.

Parameters
object$glossary
Return values
int

◆ glossary_can_view_entry()

glossary_can_view_entry (   $entry,
  $cminfo 
)

Checks if the current user can see the glossary entry.

Since
Moodle 3.1
Parameters
stdClass$entry
cm_info$cminfo
Return values
bool

◆ glossary_check_updates_since()

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.

Parameters
cm_info$cmcourse module data
int$fromthe time to check updates from
array$filterif we need to check only specific updates
Return values
stdClassan object with the different type of areas indicating if they were updated or not
Since
Moodle 3.2

◆ glossary_concept_exists()

glossary_concept_exists (   $glossary,
  $concept 
)

Check if a concept exists in a glossary.

Parameters
stdClass$glossaryglossary object
string$conceptthe concept to check
Return values
booltrue if exists
Since
Moodle 3.2

◆ glossary_count_unrated_entries()

moodle_database glossary_count_unrated_entries (   $glossaryid,
  $userid 
)

How many unrated entries are in the given glossary for a given user?

$DB

Parameters
int$glossaryid
int$userid
Return values
int

◆ glossary_cron()

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

Return values
bool

◆ glossary_debug()

glossary_debug (   $debug,
  $text,
  $br = 1 
)
Parameters
bool$debug
string$text
int$br

◆ glossary_delete_instance()

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.

Parameters
int$idglossary id
Return values
boolsuccess

◆ glossary_edit_entry()

glossary_edit_entry (   $entry,
  $course,
  $cm,
  $glossary,
  $context 
)

Creates or updates a glossary entry.

Parameters
stdClass$entryentry data
stdClass$coursecourse object
stdClass$cmcourse module object
stdClass$glossaryglossary object
stdClass$contextcontext object
Return values
stdClassthe complete new or updated entry
Since
Moodle 3.2

◆ glossary_end_tag()

glossary_end_tag (   $tag,
  $level = 0,
  $endline = true 
)

Return the xml end tag.

Parameters
string$tag
int$level
bool$endline
Return values
string

◆ glossary_entry_view()

glossary_entry_view (   $entry,
  $context 
)

Notify that a glossary entry was viewed.

This will trigger relevant events.

Parameters
stdClass$entryThe entry object.
stdClass$contextThe context object.
Since
Moodle 3.1

◆ glossary_extend_settings_navigation()

glossary_extend_settings_navigation ( settings_navigation  $settings,
navigation_node  $glossarynode 
)

Adds module specific settings to the settings block.

Parameters
settings_navigation$settingsThe settings navigation object
navigation_node$glossarynodeThe node to add module settings to

◆ glossary_full_tag()

object glossary_full_tag (   $tag,
  $level = 0,
  $endline = true,
  $content 
)

Return the start tag, the contents and the end tag.

Parameters
string$tag
int$level
bool$endline
string$content
Return values
string

◆ glossary_generate_export_csv()

object glossary_generate_export_csv (   $entries,
  $aliases,
  $categories 
)
Parameters
array$entries
array$aliases
array$categories
Return values
string

◆ glossary_generate_export_file()

glossary_generate_export_file (   $glossary,
  $ignored = "",
  $hook = 0 
)
Parameters
object$glossary
string$ignoredinvalid parameter
int | string$hook
Return values
string

◆ glossary_get_all_tabs()

glossary_get_all_tabs ( )

Return list of all glossary tabs.

Exceptions
coding_exception
Return values
array

◆ glossary_get_authors()

glossary_get_authors (   $glossary,
  $context,
  $limit,
  $from,
  $options = array() 
)

Returns the authors in a glossary.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
int$limitNumber of records to fetch.
int$fromFetch records from.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes self even if all of their entries require approval. When true, also includes authors only having entries pending approval.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_available_formats()

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

Return values
array

◆ glossary_get_categories()

glossary_get_categories (   $glossary,
  $from,
  $limit 
)

Returns the categories of a glossary.

Parameters
object$glossaryThe glossary.
int$fromFetch records from.
int$limitNumber of records to fetch.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_completion_state()

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

Parameters
object$courseCourse
object$cmCourse-module
int$useridUser ID
bool$typeType of comparison (or/and; can be used as return value if no conditions)
Return values
boolTrue if completed, false if not. (If no conditions, then return value depends on comparison type)

◆ glossary_get_coursemodule_info()

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.

Parameters
stdClass$coursemoduleThe coursemodule object (record).
Return values
cached_cm_infoAn object on information that the courses will know about (most noticeably, an icon).

◆ glossary_get_editor_and_attachment_options()

glossary_get_editor_and_attachment_options (   $course,
  $context,
  $entry 
)

Return the editor and attachment options when editing a glossary entry.

Parameters
stdClass$coursecourse object
stdClass$contextcontext object
stdClass$entryentry object
Return values
arrayarray containing the editor and attachment options
Since
Moodle 3.2

◆ glossary_get_entries()

object glossary_get_entries (   $glossaryid,
  $entrylist,
  $pivot = "" 
)
Parameters
int$glossaryid
string$entrylist
string$pivot
Return values
array

◆ glossary_get_entries_by_author()

glossary_get_entries_by_author (   $glossary,
  $context,
  $letter,
  $field,
  $sort,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by author.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
string$letterThe letter
string$fieldThe field to search: FIRSTNAME or LASTNAME.
string$sortThe sorting: ASC or DESC.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_by_author_id()

glossary_get_entries_by_author_id (   $glossary,
  $context,
  $authorid,
  $order,
  $sort,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by category.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
int$authoridThe author ID.
string$orderThe mode of ordering: CONCEPT, CREATION or UPDATE.
string$sortThe direction of the ordering: ASC or DESC.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_by_category()

glossary_get_entries_by_category (   $glossary,
  $context,
  $categoryid,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by category.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
int$categoryidThe category ID, or GLOSSARY_SHOW_* constant.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_by_date()

glossary_get_entries_by_date (   $glossary,
  $context,
  $order,
  $sort,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by date.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
string$orderThe mode of ordering: CREATION or UPDATE.
string$sortThe direction of the ordering: ASC or DESC.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_by_letter()

glossary_get_entries_by_letter (   $glossary,
  $context,
  $letter,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by letter.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
string$letterThe letter, or ALL, or SPECIAL.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_by_search()

glossary_get_entries_by_search (   $glossary,
  $context,
  $query,
  $fullsearch,
  $order,
  $sort,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by search.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
string$queryThe search query.
bool$fullsearchWhether or not full search is required.
string$orderThe mode of ordering: CONCEPT, CREATION or UPDATE.
string$sortThe direction of the ordering: ASC or DESC.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the array of results, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_by_term()

glossary_get_entries_by_term (   $glossary,
  $context,
  $term,
  $from,
  $limit,
  $options = array() 
)

Returns the entries of a glossary by term.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
string$termThe term we are searching for, a concept or alias.
int$fromFetch records from.
int$limitNumber of records to fetch.
array$optionsAccepts:
  • (bool) includenotapproved. When false, includes the non-approved entries created by the current user. When true, also includes the ones that the user has the permission to approve.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entries_search()

object glossary_get_entries_search (   $concept,
  $courseid 
)

@global object

Parameters
object$concept
string$courseid
Return values
array

◆ glossary_get_entries_to_approve()

glossary_get_entries_to_approve (   $glossary,
  $context,
  $letter,
  $order,
  $sort,
  $from,
  $limit 
)

Returns the entries to be approved.

Parameters
object$glossaryThe glossary.
context$contextThe context of the glossary.
string$letterThe letter, or ALL, or SPECIAL.
string$orderThe mode of ordering: CONCEPT, CREATION or UPDATE.
string$sortThe direction of the ordering: ASC or DESC.
int$fromFetch records from.
int$limitNumber of records to fetch.
Return values
arrayThe first element being the recordset, the second the number of entries.
Since
Moodle 3.1

◆ glossary_get_entry_by_id()

glossary_get_entry_by_id (   $id)

Fetch an entry.

Parameters
int$idThe entry ID.
Return values
object|falseThe entry, or false when not found.
Since
Moodle 3.1

◆ glossary_get_extra_capabilities()

glossary_get_extra_capabilities ( )

Returns all other caps used in module.

Return values
array

◆ glossary_get_file_info()

glossary_get_file_info (   $browser,
  $areas,
  $course,
  $cm,
  $context,
  $filearea,
  $itemid,
  $filepath,
  $filename 
)

File browsing support for glossary module.

Parameters
file_browser$browser
array$areas
stdClass$course
cm_info$cm
context$context
string$filearea
int$itemid
string$filepath
string$filename
Return values
file_info_storedfile_info_stored instance or null if not found

◆ glossary_get_paging_bar()

glossary_get_paging_bar (   $totalcount,
  $page,
  $perpage,
  $baseurl,
  $maxpageallowed = 99999,
  $maxdisplay = 20,
  $separator = "&nbsp;",
  $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. ;-)

Parameters
int$totalcounttotal number of records to be displayed
int$pagepage currently selected (0 based)
int$perpagenumber of records per page
string$baseurlurl to link in each page, the string 'page=XX' will be added automatically.
int$maxpageallowedOptional maximum number of page allowed.
int$maxdisplayOptional maximum number of page links to show in the bar
string$separatorOptional string to be used between pages in the bar
string$specialtextOptional string to be showed as an special link
string$specialvalueOptional value (page) to be used in the special link
bool$previousandnextOptional to decide if we want the previous and next links
Return values
string

◆ glossary_get_post_actions()

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.

Return values
array

◆ glossary_get_recent_mod_activity()

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.

Parameters
array$activitiessequentially indexed array of objects
int$index
int$timestart
int$courseid
int$cmid
int$useriddefaults to 0
int$groupiddefaults to 0
Return values
voidadds items into $activities and increases $index

◆ glossary_get_search_terms_sql()

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.

Parameters
array$termsArray of terms.
bool$fullsearchWhether or not full search should be enabled.
int$glossaryidThe ID of a glossary to reduce the search results.
Return values
arrayThe first element being the where clause, the second array of parameters.
Since
Moodle 3.1

◆ glossary_get_user_entries()

object glossary_get_user_entries (   $glossaryid,
  $userid 
)
Parameters
int$glossaryid
int$userid
Return values
array

◆ glossary_get_user_grades()

glossary_get_user_grades (   $glossary,
  $userid = 0 
)

Return grade for given user or all users.

Parameters
stdClass$glossaryA glossary instance
int$useridOptional user id, 0 means all users
Return values
arrayAn array of grades, false if none

◆ glossary_get_view_actions()

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.

Return values
array

◆ glossary_get_visible_tabs()

glossary_get_visible_tabs (   $displayformat)

Convert 'showtabs' string to array.

Parameters
stdClass$displayformatrecord from 'glossary_formats' table
Return values
array

◆ glossary_log_info()

object glossary_log_info (   $log)
Parameters
object$log

◆ glossary_page_type_list()

glossary_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block

◆ glossary_print_all_links()

object glossary_print_all_links (   $cm,
  $glossary,
  $mode,
  $hook 
)
Parameters
object$cm
object$glossary
string$mode
string$hook

◆ glossary_print_alphabet_links()

object glossary_print_alphabet_links (   $cm,
  $glossary,
  $mode,
  $hook,
  $sortkey,
  $sortorder 
)
Parameters
object$glossary
string$mode
string$hook
string$sortkey
string$sortorder

◆ glossary_print_alphabet_menu()

glossary_print_alphabet_menu (   $cm,
  $glossary,
  $mode,
  $hook,
  $sortkey = '',
  $sortorder = '' 
)
Parameters
object$cm
object$glossary
string$hook
string$sortkey
string$sortorder

◆ glossary_print_approval_menu()

glossary_print_approval_menu (   $cm,
  $glossary,
  $mode,
  $hook,
  $sortkey = '',
  $sortorder = '' 
)
Parameters
object$cm
object$glossary
string$mode
string$hook
string$sortkey
string$sortorder

◆ glossary_print_attachments()

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

Parameters
object$entry
object$cm
string$typehtml, txt, empty
string$unusedThis parameter is no longer used
Return values
stringimage string or nothing depending on $type param

◆ glossary_print_author_menu()

glossary_print_author_menu (   $cm,
  $glossary,
  $mode,
  $hook,
  $sortkey = '',
  $sortorder = '' 
)
Parameters
object$cm
object$glossary
string$hook
string$sortkey
string$sortorder

◆ glossary_print_categories_menu()

object glossary_print_categories_menu (   $cm,
  $glossary,
  $hook,
  $category 
)

@global object

Parameters
object$cm
object$glossary
string$hook
object$category

◆ glossary_print_dynaentry()

object glossary_print_dynaentry (   $courseid,
  $entries,
  $displayformat = -1 
)

@global object @global object

Parameters
int$courseid
array$entries
int$displayformat

◆ glossary_print_entry()

object glossary_print_entry (   $course,
  $cm,
  $glossary,
  $entry,
  $mode = '',
  $hook = '',
  $printicons = 1,
  $displayformat = -1,
  $printview = false 
)

@global object

Parameters
object$course
object$course
object$glossary
object$entry
string$mode
string$hook
int$printicons
int$displayformat
bool$printview
Return values
mixed

◆ glossary_print_entry_aliases()

object glossary_print_entry_aliases (   $course,
  $cm,
  $glossary,
  $entry,
  $mode = '',
  $hook = '',
  $type = 'print' 
)
Parameters
object$course
object$cm
object$glossary
object$entry
string$mode
string$hook
string$type
Return values
string|void

◆ glossary_print_entry_approval()

object glossary_print_entry_approval (   $cm,
  $entry,
  $mode,
  $align = "right",
  $insidetable = true 
)
Parameters
object$cm
object$entry
string$mode
string$align
bool$insidetable

◆ glossary_print_entry_attachment()

glossary_print_entry_attachment (   $entry,
  $cm,
  $format = null,
  $unused1 = null,
  $unused2 = null 
)

Print the list of attachments for this glossary entry.

Parameters
object$entry
object$cmThe coursemodule
string$formatThe format for this view (html, or text)
string$unused1This parameter is no longer used
string$unused2This parameter is no longer used

◆ glossary_print_entry_concept()

glossary_print_entry_concept (   $entry,
  $return = false 
)

Print glossary concept/term as a heading <h4>

Parameters
object$entry

◆ glossary_print_entry_default()

glossary_print_entry_default (   $entry,
  $glossary,
  $cm 
)

Default (old) print format used if custom function doesn't exist in format.

Parameters
object$entry
object$glossary
object$cm
Return values
voidOutput is echo'd

◆ glossary_print_entry_definition()

moodle_database glossary_print_entry_definition (   $entry,
  $glossary,
  $cm 
)

DB.

Parameters
object$entry
object$glossary
object$cm

◆ glossary_print_entry_icons()

object glossary_print_entry_icons (   $course,
  $cm,
  $glossary,
  $entry,
  $mode = '',
  $hook = '',
  $type = 'print' 
)

@global object @global object

Parameters
object$course
object$cm
object$glossary
object$entry
string$mode
string$hook
string$type
Return values
string|void

◆ glossary_print_entry_lower_section()

glossary_print_entry_lower_section (   $course,
  $cm,
  $glossary,
  $entry,
  $mode,
  $hook,
  $printicons,
  $aliases = true 
)
Parameters
object$course
object$cm
object$glossary
object$entry
string$mode
object$hook
bool$printicons
bool$aliases
Return values
void

◆ glossary_print_entry_ratings()

object glossary_print_entry_ratings (   $course,
  $entry 
)

@global object @global object

Parameters
object$course
object$entry
Return values
bool

◆ glossary_print_export_menu()

glossary_print_export_menu (   $cm,
  $glossary,
  $mode,
  $hook,
  $sortkey = '',
  $sortorder = '' 
)
Parameters
object$cm
object$glossary
string$hook
string$sortkey
string$sortorder

◆ glossary_print_import_menu()

glossary_print_import_menu (   $cm,
  $glossary,
  $mode,
  $hook,
  $sortkey = '',
  $sortorder = '' 
)
Parameters
object$cm
object$glossary
string$hook
string$sortkey
string$sortorder

◆ glossary_print_recent_activity()

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

Parameters
object$course
object$viewfullnames
int$timestart
Return values
bool

◆ glossary_print_recent_mod_activity()

glossary_print_recent_mod_activity (   $activity,
  $courseid,
  $detail,
  $modnames,
  $viewfullnames 
)

Outputs the glossary entry indicated by $activity.

Parameters
object$activitythe activity object the glossary resides in
int$courseidthe id of the course the glossary resides in
bool$detailnot used, but required for compatibilty with other modules
int$modnamesnot used, but required for compatibilty with other modules
bool$viewfullnamesnot used, but required for compatibilty with other modules
Return values
void

◆ glossary_print_sorting_links()

object glossary_print_sorting_links (   $cm,
  $mode,
  $sortkey = '',
  $sortorder = '' 
)
Parameters
object$cm
string$mode
string$sortkey
string$sortorder

◆ glossary_print_special_links()

object glossary_print_special_links (   $cm,
  $glossary,
  $mode,
  $hook 
)
Parameters
object$cm
object$glossary
string$mode
string$hook

◆ glossary_rating_permissions()

glossary_rating_permissions (   $contextid,
  $component,
  $ratingarea 
)

Return rating related permissions.

Parameters
int$contextidthe context id
string$componentThe component we want to get permissions for
string$ratingareaThe ratingarea that we want to get permissions for
Return values
arrayan associative array of the user's rating permissions

◆ glossary_rating_validate()

glossary_rating_validate (   $params)

Validates a submitted rating.

Parameters
array$paramssubmitted 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]
Return values
booleantrue if the rating is valid. Will throw rating_exception if not

◆ glossary_read_imported_file()

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

Parameters
string$file
Return values
string

◆ glossary_reset_course_form_defaults()

glossary_reset_course_form_defaults (   $course)

Course reset form defaults.

Return values
array

◆ glossary_reset_course_form_definition()

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.

Parameters
object$mformform passed by reference

◆ glossary_reset_gradebook()

glossary_reset_gradebook (   $courseid,
  $type = '' 
)

Removes all grades from gradebook.

Parameters
int$courseidThe ID of the course to reset
string$typeThe optional type of glossary. 'main', 'secondary' or ''

◆ glossary_reset_userdata()

object glossary_reset_userdata (   $data)

Actual implementation of the reset course functionality, delete all the glossary responses for course $data->courseid.

Parameters
$datathe data submitted from the reset course.
Return values
arraystatus array

◆ glossary_rss_delete_file()

glossary_rss_delete_file (   $glossary)

Given a glossary object, deletes all cached RSS files associated with it.

Parameters
stdClass$glossary

◆ glossary_rss_get_feed()

glossary_rss_get_feed (   $context,
  $args 
)

Returns the path to the cached rss feed contents.

Creates/updates the cache if necessary.

Parameters
stdClass$contextthe context
array$argsthe arguments received in the url
Return values
stringthe full path to the cached RSS feed directory. Null if there is a problem.

◆ glossary_rss_get_sql()

glossary_rss_get_sql (   $glossary,
  $time = 0 
)

The appropriate SQL query for the glossary items to go into the RSS feed.

Parameters
stdClass$glossarythe glossary object
int$timecheck for items since this epoch timestamp
Return values
stringthe SQL query to be used to get the entried from the glossary table of the database

◆ glossary_rss_newstuff()

glossary_rss_newstuff (   $glossary,
  $time 
)

If there is new stuff in since $time this returns true Otherwise it returns false.

Parameters
stdClass$glossarythe glossary activity object
int$timeepoch timestamp to compare new items against, 0 for everyting
Return values
booltrue if there are new items

◆ glossary_scale_used()

glossary_scale_used ( )
Deprecated:
since Moodle 3.8

◆ glossary_scale_used_anywhere()

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

Parameters
int$scaleid
Return values
booleanTrue if the scale is used by any glossary

◆ glossary_search()

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

Parameters
object$course
array$searchterms
int$extended
object$glossary
Return values
array

◆ glossary_search_entries()

object glossary_search_entries (   $searchterms,
  $glossary,
  $extended 
)
Parameters
array$searchterms
object$glossary
bool$extended
Return values
array

◆ glossary_set_default_visible_tabs()

glossary_set_default_visible_tabs (   $glossaryformat)

Set 'showtabs' value for glossary formats.

Parameters
stdClass$glossaryformatrecord from 'glossary_formats' table

◆ glossary_sort_entries()

glossary_sort_entries (   $entry0,
  $entry1 
)
Parameters
object$entry0
object$entry1
Return values
int[-1 | 0 | 1]

◆ glossary_start_tag()

glossary_start_tag (   $tag,
  $level = 0,
  $endline = false 
)

Return the xml start tag.

Parameters
string$tag
int$level
bool$endline
Return values
string

◆ glossary_supports()

glossary_supports (   $feature)
Parameters
string$featureFEATURE_xx constant for requested feature
Return values
mixedTrue if module supports feature, null if doesn't know

◆ glossary_update_instance()

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

Parameters
object$glossary
Return values
bool

◆ glossary_user_complete()

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.

Parameters
object$course
object$user
object$mod
object$glossary

◆ glossary_user_outline()

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

Parameters
object$course
object$user
object$mod
object$glossary
Return values
object|null

◆ glossary_view()

glossary_view (   $glossary,
  $course,
  $cm,
  $context,
  $mode 
)

Notify that the glossary was viewed.

This will trigger relevant events and activity completion.

Parameters
stdClass$glossaryThe glossary object.
stdClass$courseThe course object.
stdClass$cmThe course module object.
stdClass$contextThe context object.
string$modeThe mode in which the glossary was viewed.
Since
Moodle 3.1

◆ glossary_xml_export_files()

glossary_xml_export_files (   $tag,
  $taglevel,
  $contextid,
  $filearea,
  $itemid 
)

Prepares file area to export as part of XML export.

Parameters
string$tagXML tag to use for the group
int$taglevel
int$contextid
string$filearea
int$itemid
Return values
string

◆ glossary_xml_import_files()

glossary_xml_import_files (   $xmlparent,
  $tag,
  $contextid,
  $filearea,
  $itemid 
)

Parses files from XML import and inserts them into file system.

Parameters
array$xmlparentparent element in parsed XML tree
string$tag
int$contextid
string$filearea
int$itemid
Return values
int

◆ mod_glossary_core_calendar_provide_event_action()

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.

Parameters
calendar_event$event
core_calendar::action_factory$factory
int$useridUser id to use for all capability checks, etc. Set to 0 for current user (default).
Return values
core_calendar::local::event::entities::action_interface|null

◆ mod_glossary_get_completion_active_rule_descriptions()

mod_glossary_get_completion_active_rule_descriptions (   $cm)

Callback which returns human-readable strings describing the active completion custom rules for the module instance.

Parameters
cm_info | stdClass$cmobject with fields ->completion and ->customdata['customcompletionrules']
Return values
array::$descriptionsthe array of descriptions for the custom rules.

◆ mod_glossary_get_fontawesome_icon_map()

mod_glossary_get_fontawesome_icon_map ( )

Get icon mapping for font-awesome.

Return values
array

◆ mod_glossary_get_tagged_entries()

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.

Parameters
core_tag_tag$tag
bool$exclusivemodeif 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$fromctxcontext id where the link was displayed, may be used by callbacks to display items in the same context first
int$ctxcontext id where to search for records
bool$recsearch in subcontexts as well
int$page0-based number of page being displayed
Return values
core_tag::output::tagindex

Variable Documentation

◆ $definitions

$definitions
Initial value:
= array(
'concepts' => array(
'simplekeys' => true,
'simpledata' => false,
'staticacceleration' => true,
'staticaccelerationsize' => 30,
),
)
const MODE_APPLICATION
Application caches.
Definition: store.php:138

◆ $logs

$logs
Initial value:
= array(
array('module'=>'glossary', 'action'=>'add', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'update', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'view', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'view all', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'add entry', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'update entry', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'add category', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'update category', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'delete category', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'approve entry', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'disapprove entry', 'mtable'=>'glossary', 'field'=>'name'),
array('module'=>'glossary', 'action'=>'view entry', 'mtable'=>'glossary_entries', 'field'=>'concept'),
)

◆ $observers

$observers
Initial value:
= array(
array (
'eventname' => '\core\event\course_module_updated',
'callback' => '\mod_glossary\local\concept_cache::cm_updated',
),
)

◆ $tagareas

$tagareas
Initial value:
= array(
array(
'itemtype' => 'glossary_entries',
'component' => 'mod_glossary',
'callback' => 'mod_glossary_get_tagged_entries',
'callbackfile' => '/mod/glossary/locallib.php',
),
)