Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

deprecatedlib.php - Old functions retained only for backward compatibility Old functions retained only for backward compatibility.  New code should not use any of these functions.

Copyright: 1999 onwards Martin Dougiamas {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 3392 lines (104 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 11 classes

core_courseformat:: (24 methods):
  get_all_sections()
  add_mod_to_section()
  get_all_mods()
  get_course_section()
  format_weeks_get_section_dates()
  get_print_section_cm_text()
  print_section_add_menus()
  make_editing_buttons()
  print_section()
  print_overview()
  print_recent_activity()
  delete_course_module()
  update_category_button()
  make_categories_list()
  category_delete_move()
  category_delete_full()
  move_category()
  course_category_hide()
  course_category_show()
  get_course_category()
  create_course_category()
  get_all_subcategories()
  get_child_categories()
  get_categories()

core_course_category:: (14 methods):
  print_course_search()
  print_my_moodle()
  print_remote_course()
  print_remote_host()
  print_whole_category_list()
  print_category_info()
  get_course_category_tree()
  print_courses()
  print_course()
  get_category_courses_array()
  get_category_courses_array_recursively()
  blog_get_context_url()
  get_courses_wmanagers()
  convert_tree_to_html()

tabtree:: (38 methods):
  convert_tabrows_to_tree()
  can_use_rotated_text()
  get_context_instance_by_id()
  get_system_context()
  get_parent_contexts()
  get_parent_contextid()
  get_child_contexts()
  create_contexts()
  cleanup_contexts()
  build_context_path()
  rebuild_contexts()
  preload_course_contexts()
  context_moved()
  fetch_context_capabilities()
  context_instance_preload()
  get_contextlevel_name()
  print_context_name()
  mark_context_dirty()
  delete_context()
  get_context_url()
  get_course_context()
  get_user_courses_bycap()
  get_role_context_caps()
  get_courseid_from_context()
  context_instance_preload_sql()
  get_related_contexts_string()
  get_plugin_list_with_file()
  check_browser_operating_system()
  check_browser_version()
  get_device_type()
  get_device_type_list()
  get_selected_theme_for_device_type()
  get_device_cfg_var_name()
  set_user_device_type()
  get_user_device_type()
  get_browser_version_classes()
  generate_email_supportuser()
  badges_get_issued_badge_info()

tabtree:: (38 methods):
  convert_tabrows_to_tree()
  can_use_rotated_text()
  get_context_instance_by_id()
  get_system_context()
  get_parent_contexts()
  get_parent_contextid()
  get_child_contexts()
  create_contexts()
  cleanup_contexts()
  build_context_path()
  rebuild_contexts()
  preload_course_contexts()
  context_moved()
  fetch_context_capabilities()
  context_instance_preload()
  get_contextlevel_name()
  print_context_name()
  mark_context_dirty()
  delete_context()
  get_context_url()
  get_course_context()
  get_user_courses_bycap()
  get_role_context_caps()
  get_courseid_from_context()
  context_instance_preload_sql()
  get_related_contexts_string()
  get_plugin_list_with_file()
  check_browser_operating_system()
  check_browser_version()
  get_device_type()
  get_device_type_list()
  get_selected_theme_for_device_type()
  get_device_cfg_var_name()
  set_user_device_type()
  get_user_device_type()
  get_browser_version_classes()
  generate_email_supportuser()
  badges_get_issued_badge_info()

and:: (14 methods):
  can_use_html_editor()
  count_login_failures()
  ajaxenabled()
  coursemodule_visible_for_user()
  enrol_cohort_get_cohorts()
  enrol_cohort_can_view_cohort()
  cohort_get_visible_list()
  enrol_cohort_enrol_all_users()
  enrol_cohort_search_cohorts()
  message_current_user_is_involved()
  profile_display_badges()
  useredit_shared_definition_preferences()
  calendar_normalize_tz()
  get_user_timezone_offset()

instead:: (191 methods):
  get_timezone_offset()
  get_list_of_timezones()
  update_timezone_records()
  calculate_user_dst_table()
  dst_changes_for_year()
  get_timezone_record()
  get_referer()
  is_web_crawler()
  completion_cron()
  coursetag_get_tags()
  coursetag_get_all_tags()
  coursetag_get_jscript()
  coursetag_get_jscript_links()
  coursetag_get_records()
  coursetag_store_keywords()
  coursetag_delete_keyword()
  coursetag_get_tagged_courses()
  coursetag_delete_course_tags()
  tag_type_set()
  tag_description_set()
  tag_get_tags()
  tag_get_tags_array()
  tag_get_tags_csv()
  tag_get_tags_ids()
  tag_get_id()
  tag_rename()
  tag_delete_instance()
  tag_find_records()
  tag_add()
  tag_assign()
  tag_record_count()
  tag_record_tagged_with()
  tag_set_flag()
  tag_unset_flag()
  tag_print_cloud()
  tag_autocomplete()
  tag_print_description_box()
  tag_print_management_box()
  tag_print_search_box()
  tag_print_search_results()
  tag_print_tagged_users_table()
  tag_print_user_box()
  tag_print_user_list()
  tag_display_name()
  tag_normalize()
  tag_get_related_tags_csv()
  tag_set()
  tag_set_add()
  tag_set_delete()
  tag_get()
  tag_get_related_tags()
  tag_delete()
  tag_delete_instances()
  tag_cleanup()
  tag_bulk_delete_instances()
  tag_compute_correlations()
  tag_process_computed_correlation()
  tag_cron()
  tag_find_tags()
  tag_get_name()
  tag_get_correlated()
  tag_cloud_sort()
  events_load_def()
  events_queue_handler()
  events_dispatch()
  events_process_queued_handler()
  events_update_definition()
  events_cron()
  events_trigger_legacy()
  events_is_registered()
  events_pending_count()
  clam_message_admins()
  get_clam_error_code()
  course_get_cm_rename_action()
  course_scale_used()
  site_scale_used()
  external_function_info()
  get_records_csv()
  put_records_csv()
  css_is_colour()
  css_is_width()
  css_sort_by_count()
  message_get_course_contexts()
  message_remove_url_params()
  message_count_messages()
  message_count_blocked_users()
  message_contact_link()
  message_get_recent_notifications()
  message_history_link()
  message_search()
  message_shorten_message()
  message_get_fragment()
  message_get_history()
  message_get_contact_add_remove_link()
  message_get_contact_block_link()
  message_mark_messages_read()
  message_can_post_message()
  message_is_user_non_contact_blocked()
  message_is_user_blocked()
  print_log()
  print_mnet_log()
  print_log_csv()
  print_log_xls()
  print_log_ods()
  build_logs_array()
  get_logs_usercourse()
  get_logs_userday()
  get_logs()
  prevent_form_autofill_password()
  message_get_recent_conversations()
  calendar_preferences_button()
  calendar_wday_name()
  calendar_get_block_upcoming()
  calendar_print_month_selector()
  calendar_cron()
  load_course_context()
  load_role_access_by_context()
  dedupe_user_access()
  get_user_access_sitewide()
  calendar_get_mini()
  calendar_get_upcoming()
  allow_override()
  allow_assign()
  allow_switch()
  question_add_tops()
  question_is_only_toplevel_category_in_context()
  message_move_userfrom_unread2read()
  message_get_blocked_users()
  message_get_contacts()
  message_mark_message_read()
  message_can_delete_message()
  message_delete_message()
  calendar_get_all_allowed_types()
  groups_get_all_groups_for_courses()
  events_get_cached()
  events_uninstall()
  events_cleanup()
  events_dequeue()
  events_get_handlers()
  get_roles_on_exact_context()
  get_roles_with_assignment_on_context()
  message_add_contact()
  message_remove_contact()
  message_unblock_contact()
  message_block_contact()
  message_get_contact()
  get_courses_page()
  report_insights_context_insights()
  get_module_metadata()
  cron_run_single_task()
  cron_execute_plugin_type()
  cron_bc_hack_plugin_functions()
  user_get_participants_sql()
  user_get_total_participants()
  user_get_participants()
  plagiarism_save_form_elements()
  plagiarism_get_form_elements_module()
  make_categories_options()
  message_count_unread_messages()
  serialise_tool_proxy()
  badges_check_backpack_accessibility()
  badges_setup_backpack_js()
  badges_local_backpack_js()
  get_extra_user_fields()
  get_extra_user_fields_sql()
  get_user_field_name()
  get_all_user_name_fields()
  profile_display_fields()
  profile_edit_category()
  profile_edit_field()
  calendar_process_subscription_row()
  calendar_import_icalendar_events()
  grade_print_tabs()
  print_grade_plugin_selector()
  course_purge_section_cache()
  course_purge_module_cache()
  get_array_of_activities()
  print_error()
  cron_run()
  cron_run_scheduled_tasks()
  cron_run_adhoc_tasks()
  cron_run_inner_scheduled_task()
  cron_run_inner_adhoc_task()
  cron_set_process_title()
  cron_trace_time_and_memory()
  cron_prepare_core_renderer()
  cron_setup_user()
  badges_get_oauth2_service_options()
  theme_is_device_locked()
  theme_get_locked_theme_for_device()
  random_bytes_emulate()

instead:: (191 methods):
  get_timezone_offset()
  get_list_of_timezones()
  update_timezone_records()
  calculate_user_dst_table()
  dst_changes_for_year()
  get_timezone_record()
  get_referer()
  is_web_crawler()
  completion_cron()
  coursetag_get_tags()
  coursetag_get_all_tags()
  coursetag_get_jscript()
  coursetag_get_jscript_links()
  coursetag_get_records()
  coursetag_store_keywords()
  coursetag_delete_keyword()
  coursetag_get_tagged_courses()
  coursetag_delete_course_tags()
  tag_type_set()
  tag_description_set()
  tag_get_tags()
  tag_get_tags_array()
  tag_get_tags_csv()
  tag_get_tags_ids()
  tag_get_id()
  tag_rename()
  tag_delete_instance()
  tag_find_records()
  tag_add()
  tag_assign()
  tag_record_count()
  tag_record_tagged_with()
  tag_set_flag()
  tag_unset_flag()
  tag_print_cloud()
  tag_autocomplete()
  tag_print_description_box()
  tag_print_management_box()
  tag_print_search_box()
  tag_print_search_results()
  tag_print_tagged_users_table()
  tag_print_user_box()
  tag_print_user_list()
  tag_display_name()
  tag_normalize()
  tag_get_related_tags_csv()
  tag_set()
  tag_set_add()
  tag_set_delete()
  tag_get()
  tag_get_related_tags()
  tag_delete()
  tag_delete_instances()
  tag_cleanup()
  tag_bulk_delete_instances()
  tag_compute_correlations()
  tag_process_computed_correlation()
  tag_cron()
  tag_find_tags()
  tag_get_name()
  tag_get_correlated()
  tag_cloud_sort()
  events_load_def()
  events_queue_handler()
  events_dispatch()
  events_process_queued_handler()
  events_update_definition()
  events_cron()
  events_trigger_legacy()
  events_is_registered()
  events_pending_count()
  clam_message_admins()
  get_clam_error_code()
  course_get_cm_rename_action()
  course_scale_used()
  site_scale_used()
  external_function_info()
  get_records_csv()
  put_records_csv()
  css_is_colour()
  css_is_width()
  css_sort_by_count()
  message_get_course_contexts()
  message_remove_url_params()
  message_count_messages()
  message_count_blocked_users()
  message_contact_link()
  message_get_recent_notifications()
  message_history_link()
  message_search()
  message_shorten_message()
  message_get_fragment()
  message_get_history()
  message_get_contact_add_remove_link()
  message_get_contact_block_link()
  message_mark_messages_read()
  message_can_post_message()
  message_is_user_non_contact_blocked()
  message_is_user_blocked()
  print_log()
  print_mnet_log()
  print_log_csv()
  print_log_xls()
  print_log_ods()
  build_logs_array()
  get_logs_usercourse()
  get_logs_userday()
  get_logs()
  prevent_form_autofill_password()
  message_get_recent_conversations()
  calendar_preferences_button()
  calendar_wday_name()
  calendar_get_block_upcoming()
  calendar_print_month_selector()
  calendar_cron()
  load_course_context()
  load_role_access_by_context()
  dedupe_user_access()
  get_user_access_sitewide()
  calendar_get_mini()
  calendar_get_upcoming()
  allow_override()
  allow_assign()
  allow_switch()
  question_add_tops()
  question_is_only_toplevel_category_in_context()
  message_move_userfrom_unread2read()
  message_get_blocked_users()
  message_get_contacts()
  message_mark_message_read()
  message_can_delete_message()
  message_delete_message()
  calendar_get_all_allowed_types()
  groups_get_all_groups_for_courses()
  events_get_cached()
  events_uninstall()
  events_cleanup()
  events_dequeue()
  events_get_handlers()
  get_roles_on_exact_context()
  get_roles_with_assignment_on_context()
  message_add_contact()
  message_remove_contact()
  message_unblock_contact()
  message_block_contact()
  message_get_contact()
  get_courses_page()
  report_insights_context_insights()
  get_module_metadata()
  cron_run_single_task()
  cron_execute_plugin_type()
  cron_bc_hack_plugin_functions()
  user_get_participants_sql()
  user_get_total_participants()
  user_get_participants()
  plagiarism_save_form_elements()
  plagiarism_get_form_elements_module()
  make_categories_options()
  message_count_unread_messages()
  serialise_tool_proxy()
  badges_check_backpack_accessibility()
  badges_setup_backpack_js()
  badges_local_backpack_js()
  get_extra_user_fields()
  get_extra_user_fields_sql()
  get_user_field_name()
  get_all_user_name_fields()
  profile_display_fields()
  profile_edit_category()
  profile_edit_field()
  calendar_process_subscription_row()
  calendar_import_icalendar_events()
  grade_print_tabs()
  print_grade_plugin_selector()
  course_purge_section_cache()
  course_purge_module_cache()
  get_array_of_activities()
  print_error()
  cron_run()
  cron_run_scheduled_tasks()
  cron_run_adhoc_tasks()
  cron_run_inner_scheduled_task()
  cron_run_inner_adhoc_task()
  cron_set_process_title()
  cron_trace_time_and_memory()
  cron_prepare_core_renderer()
  cron_setup_user()
  badges_get_oauth2_service_options()
  theme_is_device_locked()
  theme_get_locked_theme_for_device()
  random_bytes_emulate()

instead:: (191 methods):
  get_timezone_offset()
  get_list_of_timezones()
  update_timezone_records()
  calculate_user_dst_table()
  dst_changes_for_year()
  get_timezone_record()
  get_referer()
  is_web_crawler()
  completion_cron()
  coursetag_get_tags()
  coursetag_get_all_tags()
  coursetag_get_jscript()
  coursetag_get_jscript_links()
  coursetag_get_records()
  coursetag_store_keywords()
  coursetag_delete_keyword()
  coursetag_get_tagged_courses()
  coursetag_delete_course_tags()
  tag_type_set()
  tag_description_set()
  tag_get_tags()
  tag_get_tags_array()
  tag_get_tags_csv()
  tag_get_tags_ids()
  tag_get_id()
  tag_rename()
  tag_delete_instance()
  tag_find_records()
  tag_add()
  tag_assign()
  tag_record_count()
  tag_record_tagged_with()
  tag_set_flag()
  tag_unset_flag()
  tag_print_cloud()
  tag_autocomplete()
  tag_print_description_box()
  tag_print_management_box()
  tag_print_search_box()
  tag_print_search_results()
  tag_print_tagged_users_table()
  tag_print_user_box()
  tag_print_user_list()
  tag_display_name()
  tag_normalize()
  tag_get_related_tags_csv()
  tag_set()
  tag_set_add()
  tag_set_delete()
  tag_get()
  tag_get_related_tags()
  tag_delete()
  tag_delete_instances()
  tag_cleanup()
  tag_bulk_delete_instances()
  tag_compute_correlations()
  tag_process_computed_correlation()
  tag_cron()
  tag_find_tags()
  tag_get_name()
  tag_get_correlated()
  tag_cloud_sort()
  events_load_def()
  events_queue_handler()
  events_dispatch()
  events_process_queued_handler()
  events_update_definition()
  events_cron()
  events_trigger_legacy()
  events_is_registered()
  events_pending_count()
  clam_message_admins()
  get_clam_error_code()
  course_get_cm_rename_action()
  course_scale_used()
  site_scale_used()
  external_function_info()
  get_records_csv()
  put_records_csv()
  css_is_colour()
  css_is_width()
  css_sort_by_count()
  message_get_course_contexts()
  message_remove_url_params()
  message_count_messages()
  message_count_blocked_users()
  message_contact_link()
  message_get_recent_notifications()
  message_history_link()
  message_search()
  message_shorten_message()
  message_get_fragment()
  message_get_history()
  message_get_contact_add_remove_link()
  message_get_contact_block_link()
  message_mark_messages_read()
  message_can_post_message()
  message_is_user_non_contact_blocked()
  message_is_user_blocked()
  print_log()
  print_mnet_log()
  print_log_csv()
  print_log_xls()
  print_log_ods()
  build_logs_array()
  get_logs_usercourse()
  get_logs_userday()
  get_logs()
  prevent_form_autofill_password()
  message_get_recent_conversations()
  calendar_preferences_button()
  calendar_wday_name()
  calendar_get_block_upcoming()
  calendar_print_month_selector()
  calendar_cron()
  load_course_context()
  load_role_access_by_context()
  dedupe_user_access()
  get_user_access_sitewide()
  calendar_get_mini()
  calendar_get_upcoming()
  allow_override()
  allow_assign()
  allow_switch()
  question_add_tops()
  question_is_only_toplevel_category_in_context()
  message_move_userfrom_unread2read()
  message_get_blocked_users()
  message_get_contacts()
  message_mark_message_read()
  message_can_delete_message()
  message_delete_message()
  calendar_get_all_allowed_types()
  groups_get_all_groups_for_courses()
  events_get_cached()
  events_uninstall()
  events_cleanup()
  events_dequeue()
  events_get_handlers()
  get_roles_on_exact_context()
  get_roles_with_assignment_on_context()
  message_add_contact()
  message_remove_contact()
  message_unblock_contact()
  message_block_contact()
  message_get_contact()
  get_courses_page()
  report_insights_context_insights()
  get_module_metadata()
  cron_run_single_task()
  cron_execute_plugin_type()
  cron_bc_hack_plugin_functions()
  user_get_participants_sql()
  user_get_total_participants()
  user_get_participants()
  plagiarism_save_form_elements()
  plagiarism_get_form_elements_module()
  make_categories_options()
  message_count_unread_messages()
  serialise_tool_proxy()
  badges_check_backpack_accessibility()
  badges_setup_backpack_js()
  badges_local_backpack_js()
  get_extra_user_fields()
  get_extra_user_fields_sql()
  get_user_field_name()
  get_all_user_name_fields()
  profile_display_fields()
  profile_edit_category()
  profile_edit_field()
  calendar_process_subscription_row()
  calendar_import_icalendar_events()
  grade_print_tabs()
  print_grade_plugin_selector()
  course_purge_section_cache()
  course_purge_module_cache()
  get_array_of_activities()
  print_error()
  cron_run()
  cron_run_scheduled_tasks()
  cron_run_adhoc_tasks()
  cron_run_inner_scheduled_task()
  cron_run_inner_adhoc_task()
  cron_set_process_title()
  cron_trace_time_and_memory()
  cron_prepare_core_renderer()
  cron_setup_user()
  badges_get_oauth2_service_options()
  theme_is_device_locked()
  theme_get_locked_theme_for_device()
  random_bytes_emulate()

instead:: (191 methods):
  get_timezone_offset()
  get_list_of_timezones()
  update_timezone_records()
  calculate_user_dst_table()
  dst_changes_for_year()
  get_timezone_record()
  get_referer()
  is_web_crawler()
  completion_cron()
  coursetag_get_tags()
  coursetag_get_all_tags()
  coursetag_get_jscript()
  coursetag_get_jscript_links()
  coursetag_get_records()
  coursetag_store_keywords()
  coursetag_delete_keyword()
  coursetag_get_tagged_courses()
  coursetag_delete_course_tags()
  tag_type_set()
  tag_description_set()
  tag_get_tags()
  tag_get_tags_array()
  tag_get_tags_csv()
  tag_get_tags_ids()
  tag_get_id()
  tag_rename()
  tag_delete_instance()
  tag_find_records()
  tag_add()
  tag_assign()
  tag_record_count()
  tag_record_tagged_with()
  tag_set_flag()
  tag_unset_flag()
  tag_print_cloud()
  tag_autocomplete()
  tag_print_description_box()
  tag_print_management_box()
  tag_print_search_box()
  tag_print_search_results()
  tag_print_tagged_users_table()
  tag_print_user_box()
  tag_print_user_list()
  tag_display_name()
  tag_normalize()
  tag_get_related_tags_csv()
  tag_set()
  tag_set_add()
  tag_set_delete()
  tag_get()
  tag_get_related_tags()
  tag_delete()
  tag_delete_instances()
  tag_cleanup()
  tag_bulk_delete_instances()
  tag_compute_correlations()
  tag_process_computed_correlation()
  tag_cron()
  tag_find_tags()
  tag_get_name()
  tag_get_correlated()
  tag_cloud_sort()
  events_load_def()
  events_queue_handler()
  events_dispatch()
  events_process_queued_handler()
  events_update_definition()
  events_cron()
  events_trigger_legacy()
  events_is_registered()
  events_pending_count()
  clam_message_admins()
  get_clam_error_code()
  course_get_cm_rename_action()
  course_scale_used()
  site_scale_used()
  external_function_info()
  get_records_csv()
  put_records_csv()
  css_is_colour()
  css_is_width()
  css_sort_by_count()
  message_get_course_contexts()
  message_remove_url_params()
  message_count_messages()
  message_count_blocked_users()
  message_contact_link()
  message_get_recent_notifications()
  message_history_link()
  message_search()
  message_shorten_message()
  message_get_fragment()
  message_get_history()
  message_get_contact_add_remove_link()
  message_get_contact_block_link()
  message_mark_messages_read()
  message_can_post_message()
  message_is_user_non_contact_blocked()
  message_is_user_blocked()
  print_log()
  print_mnet_log()
  print_log_csv()
  print_log_xls()
  print_log_ods()
  build_logs_array()
  get_logs_usercourse()
  get_logs_userday()
  get_logs()
  prevent_form_autofill_password()
  message_get_recent_conversations()
  calendar_preferences_button()
  calendar_wday_name()
  calendar_get_block_upcoming()
  calendar_print_month_selector()
  calendar_cron()
  load_course_context()
  load_role_access_by_context()
  dedupe_user_access()
  get_user_access_sitewide()
  calendar_get_mini()
  calendar_get_upcoming()
  allow_override()
  allow_assign()
  allow_switch()
  question_add_tops()
  question_is_only_toplevel_category_in_context()
  message_move_userfrom_unread2read()
  message_get_blocked_users()
  message_get_contacts()
  message_mark_message_read()
  message_can_delete_message()
  message_delete_message()
  calendar_get_all_allowed_types()
  groups_get_all_groups_for_courses()
  events_get_cached()
  events_uninstall()
  events_cleanup()
  events_dequeue()
  events_get_handlers()
  get_roles_on_exact_context()
  get_roles_with_assignment_on_context()
  message_add_contact()
  message_remove_contact()
  message_unblock_contact()
  message_block_contact()
  message_get_contact()
  get_courses_page()
  report_insights_context_insights()
  get_module_metadata()
  cron_run_single_task()
  cron_execute_plugin_type()
  cron_bc_hack_plugin_functions()
  user_get_participants_sql()
  user_get_total_participants()
  user_get_participants()
  plagiarism_save_form_elements()
  plagiarism_get_form_elements_module()
  make_categories_options()
  message_count_unread_messages()
  serialise_tool_proxy()
  badges_check_backpack_accessibility()
  badges_setup_backpack_js()
  badges_local_backpack_js()
  get_extra_user_fields()
  get_extra_user_fields_sql()
  get_user_field_name()
  get_all_user_name_fields()
  profile_display_fields()
  profile_edit_category()
  profile_edit_field()
  calendar_process_subscription_row()
  calendar_import_icalendar_events()
  grade_print_tabs()
  print_grade_plugin_selector()
  course_purge_section_cache()
  course_purge_module_cache()
  get_array_of_activities()
  print_error()
  cron_run()
  cron_run_scheduled_tasks()
  cron_run_adhoc_tasks()
  cron_run_inner_scheduled_task()
  cron_run_inner_adhoc_task()
  cron_set_process_title()
  cron_trace_time_and_memory()
  cron_prepare_core_renderer()
  cron_setup_user()
  badges_get_oauth2_service_options()
  theme_is_device_locked()
  theme_get_locked_theme_for_device()
  random_bytes_emulate()

instead:: (191 methods):
  get_timezone_offset()
  get_list_of_timezones()
  update_timezone_records()
  calculate_user_dst_table()
  dst_changes_for_year()
  get_timezone_record()
  get_referer()
  is_web_crawler()
  completion_cron()
  coursetag_get_tags()
  coursetag_get_all_tags()
  coursetag_get_jscript()
  coursetag_get_jscript_links()
  coursetag_get_records()
  coursetag_store_keywords()
  coursetag_delete_keyword()
  coursetag_get_tagged_courses()
  coursetag_delete_course_tags()
  tag_type_set()
  tag_description_set()
  tag_get_tags()
  tag_get_tags_array()
  tag_get_tags_csv()
  tag_get_tags_ids()
  tag_get_id()
  tag_rename()
  tag_delete_instance()
  tag_find_records()
  tag_add()
  tag_assign()
  tag_record_count()
  tag_record_tagged_with()
  tag_set_flag()
  tag_unset_flag()
  tag_print_cloud()
  tag_autocomplete()
  tag_print_description_box()
  tag_print_management_box()
  tag_print_search_box()
  tag_print_search_results()
  tag_print_tagged_users_table()
  tag_print_user_box()
  tag_print_user_list()
  tag_display_name()
  tag_normalize()
  tag_get_related_tags_csv()
  tag_set()
  tag_set_add()
  tag_set_delete()
  tag_get()
  tag_get_related_tags()
  tag_delete()
  tag_delete_instances()
  tag_cleanup()
  tag_bulk_delete_instances()
  tag_compute_correlations()
  tag_process_computed_correlation()
  tag_cron()
  tag_find_tags()
  tag_get_name()
  tag_get_correlated()
  tag_cloud_sort()
  events_load_def()
  events_queue_handler()
  events_dispatch()
  events_process_queued_handler()
  events_update_definition()
  events_cron()
  events_trigger_legacy()
  events_is_registered()
  events_pending_count()
  clam_message_admins()
  get_clam_error_code()
  course_get_cm_rename_action()
  course_scale_used()
  site_scale_used()
  external_function_info()
  get_records_csv()
  put_records_csv()
  css_is_colour()
  css_is_width()
  css_sort_by_count()
  message_get_course_contexts()
  message_remove_url_params()
  message_count_messages()
  message_count_blocked_users()
  message_contact_link()
  message_get_recent_notifications()
  message_history_link()
  message_search()
  message_shorten_message()
  message_get_fragment()
  message_get_history()
  message_get_contact_add_remove_link()
  message_get_contact_block_link()
  message_mark_messages_read()
  message_can_post_message()
  message_is_user_non_contact_blocked()
  message_is_user_blocked()
  print_log()
  print_mnet_log()
  print_log_csv()
  print_log_xls()
  print_log_ods()
  build_logs_array()
  get_logs_usercourse()
  get_logs_userday()
  get_logs()
  prevent_form_autofill_password()
  message_get_recent_conversations()
  calendar_preferences_button()
  calendar_wday_name()
  calendar_get_block_upcoming()
  calendar_print_month_selector()
  calendar_cron()
  load_course_context()
  load_role_access_by_context()
  dedupe_user_access()
  get_user_access_sitewide()
  calendar_get_mini()
  calendar_get_upcoming()
  allow_override()
  allow_assign()
  allow_switch()
  question_add_tops()
  question_is_only_toplevel_category_in_context()
  message_move_userfrom_unread2read()
  message_get_blocked_users()
  message_get_contacts()
  message_mark_message_read()
  message_can_delete_message()
  message_delete_message()
  calendar_get_all_allowed_types()
  groups_get_all_groups_for_courses()
  events_get_cached()
  events_uninstall()
  events_cleanup()
  events_dequeue()
  events_get_handlers()
  get_roles_on_exact_context()
  get_roles_with_assignment_on_context()
  message_add_contact()
  message_remove_contact()
  message_unblock_contact()
  message_block_contact()
  message_get_contact()
  get_courses_page()
  report_insights_context_insights()
  get_module_metadata()
  cron_run_single_task()
  cron_execute_plugin_type()
  cron_bc_hack_plugin_functions()
  user_get_participants_sql()
  user_get_total_participants()
  user_get_participants()
  plagiarism_save_form_elements()
  plagiarism_get_form_elements_module()
  make_categories_options()
  message_count_unread_messages()
  serialise_tool_proxy()
  badges_check_backpack_accessibility()
  badges_setup_backpack_js()
  badges_local_backpack_js()
  get_extra_user_fields()
  get_extra_user_fields_sql()
  get_user_field_name()
  get_all_user_name_fields()
  profile_display_fields()
  profile_edit_category()
  profile_edit_field()
  calendar_process_subscription_row()
  calendar_import_icalendar_events()
  grade_print_tabs()
  print_grade_plugin_selector()
  course_purge_section_cache()
  course_purge_module_cache()
  get_array_of_activities()
  print_error()
  cron_run()
  cron_run_scheduled_tasks()
  cron_run_adhoc_tasks()
  cron_run_inner_scheduled_task()
  cron_run_inner_adhoc_task()
  cron_set_process_title()
  cron_trace_time_and_memory()
  cron_prepare_core_renderer()
  cron_setup_user()
  badges_get_oauth2_service_options()
  theme_is_device_locked()
  theme_get_locked_theme_for_device()
  random_bytes_emulate()

instead:: (191 methods):
  get_timezone_offset()
  get_list_of_timezones()
  update_timezone_records()
  calculate_user_dst_table()
  dst_changes_for_year()
  get_timezone_record()
  get_referer()
  is_web_crawler()
  completion_cron()
  coursetag_get_tags()
  coursetag_get_all_tags()
  coursetag_get_jscript()
  coursetag_get_jscript_links()
  coursetag_get_records()
  coursetag_store_keywords()
  coursetag_delete_keyword()
  coursetag_get_tagged_courses()
  coursetag_delete_course_tags()
  tag_type_set()
  tag_description_set()
  tag_get_tags()
  tag_get_tags_array()
  tag_get_tags_csv()
  tag_get_tags_ids()
  tag_get_id()
  tag_rename()
  tag_delete_instance()
  tag_find_records()
  tag_add()
  tag_assign()
  tag_record_count()
  tag_record_tagged_with()
  tag_set_flag()
  tag_unset_flag()
  tag_print_cloud()
  tag_autocomplete()
  tag_print_description_box()
  tag_print_management_box()
  tag_print_search_box()
  tag_print_search_results()
  tag_print_tagged_users_table()
  tag_print_user_box()
  tag_print_user_list()
  tag_display_name()
  tag_normalize()
  tag_get_related_tags_csv()
  tag_set()
  tag_set_add()
  tag_set_delete()
  tag_get()
  tag_get_related_tags()
  tag_delete()
  tag_delete_instances()
  tag_cleanup()
  tag_bulk_delete_instances()
  tag_compute_correlations()
  tag_process_computed_correlation()
  tag_cron()
  tag_find_tags()
  tag_get_name()
  tag_get_correlated()
  tag_cloud_sort()
  events_load_def()
  events_queue_handler()
  events_dispatch()
  events_process_queued_handler()
  events_update_definition()
  events_cron()
  events_trigger_legacy()
  events_is_registered()
  events_pending_count()
  clam_message_admins()
  get_clam_error_code()
  course_get_cm_rename_action()
  course_scale_used()
  site_scale_used()
  external_function_info()
  get_records_csv()
  put_records_csv()
  css_is_colour()
  css_is_width()
  css_sort_by_count()
  message_get_course_contexts()
  message_remove_url_params()
  message_count_messages()
  message_count_blocked_users()
  message_contact_link()
  message_get_recent_notifications()
  message_history_link()
  message_search()
  message_shorten_message()
  message_get_fragment()
  message_get_history()
  message_get_contact_add_remove_link()
  message_get_contact_block_link()
  message_mark_messages_read()
  message_can_post_message()
  message_is_user_non_contact_blocked()
  message_is_user_blocked()
  print_log()
  print_mnet_log()
  print_log_csv()
  print_log_xls()
  print_log_ods()
  build_logs_array()
  get_logs_usercourse()
  get_logs_userday()
  get_logs()
  prevent_form_autofill_password()
  message_get_recent_conversations()
  calendar_preferences_button()
  calendar_wday_name()
  calendar_get_block_upcoming()
  calendar_print_month_selector()
  calendar_cron()
  load_course_context()
  load_role_access_by_context()
  dedupe_user_access()
  get_user_access_sitewide()
  calendar_get_mini()
  calendar_get_upcoming()
  allow_override()
  allow_assign()
  allow_switch()
  question_add_tops()
  question_is_only_toplevel_category_in_context()
  message_move_userfrom_unread2read()
  message_get_blocked_users()
  message_get_contacts()
  message_mark_message_read()
  message_can_delete_message()
  message_delete_message()
  calendar_get_all_allowed_types()
  groups_get_all_groups_for_courses()
  events_get_cached()
  events_uninstall()
  events_cleanup()
  events_dequeue()
  events_get_handlers()
  get_roles_on_exact_context()
  get_roles_with_assignment_on_context()
  message_add_contact()
  message_remove_contact()
  message_unblock_contact()
  message_block_contact()
  message_get_contact()
  get_courses_page()
  report_insights_context_insights()
  get_module_metadata()
  cron_run_single_task()
  cron_execute_plugin_type()
  cron_bc_hack_plugin_functions()
  user_get_participants_sql()
  user_get_total_participants()
  user_get_participants()
  plagiarism_save_form_elements()
  plagiarism_get_form_elements_module()
  make_categories_options()
  message_count_unread_messages()
  serialise_tool_proxy()
  badges_check_backpack_accessibility()
  badges_setup_backpack_js()
  badges_local_backpack_js()
  get_extra_user_fields()
  get_extra_user_fields_sql()
  get_user_field_name()
  get_all_user_name_fields()
  profile_display_fields()
  profile_edit_category()
  profile_edit_field()
  calendar_process_subscription_row()
  calendar_import_icalendar_events()
  grade_print_tabs()
  print_grade_plugin_selector()
  course_purge_section_cache()
  course_purge_module_cache()
  get_array_of_activities()
  print_error()
  cron_run()
  cron_run_scheduled_tasks()
  cron_run_adhoc_tasks()
  cron_run_inner_scheduled_task()
  cron_run_inner_adhoc_task()
  cron_set_process_title()
  cron_trace_time_and_memory()
  cron_prepare_core_renderer()
  cron_setup_user()
  badges_get_oauth2_service_options()
  theme_is_device_locked()
  theme_get_locked_theme_for_device()
  random_bytes_emulate()

Defines 191 functions

  add_to_log()
  events_trigger()
  get_core_subsystems()
  get_plugin_types()
  get_plugin_list()
  get_plugin_list_with_class()
  get_plugin_directory()
  normalize_component()
  get_component_directory()
  get_context_instance()
  clam_log_upload()
  clam_log_infected()
  clam_change_log()
  clam_replace_infected_file()
  clam_handle_infected_file()
  clam_scan_moodle_file()
  password_compat_not_supported()
  session_get_instance()
  session_is_legacy()
  session_kill_all()
  session_touch()
  session_kill()
  session_kill_user()
  session_set_user()
  session_is_loggedinas()
  session_get_realuser()
  session_loginas()
  js_minify()
  css_minify_css()
  check_gd_version()
  update_login_count()
  reset_login_count()
  update_log_display_entry()
  filter_text()
  httpsrequired()
  get_file_url()
  get_course_participants()
  is_course_participant()
  get_recent_enrolments()
  detect_munged_arguments()
  unzip_file()
  zip_files()
  mygroupid()
  groupmode()
  set_current_group()
  get_current_group()
  groups_filter_users_by_course_module_visible()
  groups_course_module_visible()
  error()
  current_theme()
  formerr()
  skip_main_destination()
  print_container()
  print_container_start()
  print_container_end()
  notify()
  print_continue()
  print_header()
  print_header_simple()
  print_side_block()
  print_textarea()
  print_arrow()
  choose_from_menu()
  print_scale_menu_helpbutton()
  print_checkbox()
  update_module_button()
  print_navigation()
  build_navigation()
  navmenu()
  add_event()
  update_event()
  delete_event()
  hide_event()
  show_event()
  textlib_get_instance()
  get_generic_section_name()

Class: tabtree  - X-Ref

Class: tabtree  - X-Ref

Class: instead  - X-Ref

get_timezone_offset()   X-Ref


get_list_of_timezones()   X-Ref


update_timezone_records()   X-Ref


calculate_user_dst_table()   X-Ref


dst_changes_for_year()   X-Ref


get_timezone_record()   X-Ref


get_referer()   X-Ref


is_web_crawler()   X-Ref


completion_cron()   X-Ref


coursetag_get_tags()   X-Ref


coursetag_get_all_tags()   X-Ref


coursetag_get_jscript()   X-Ref


coursetag_get_jscript_links()   X-Ref


coursetag_get_records()   X-Ref


coursetag_store_keywords()   X-Ref


coursetag_delete_keyword()   X-Ref


coursetag_get_tagged_courses()   X-Ref


coursetag_delete_course_tags()   X-Ref


tag_type_set()   X-Ref


tag_description_set()   X-Ref


tag_get_tags()   X-Ref


tag_get_tags_array()   X-Ref


tag_get_tags_csv()   X-Ref


tag_get_tags_ids()   X-Ref


tag_get_id()   X-Ref


tag_rename()   X-Ref


tag_delete_instance()   X-Ref


tag_find_records()   X-Ref


tag_add()   X-Ref


tag_assign()   X-Ref


tag_record_count()   X-Ref


tag_record_tagged_with()   X-Ref


tag_set_flag()   X-Ref


tag_unset_flag()   X-Ref


tag_print_cloud()   X-Ref


tag_autocomplete()   X-Ref


tag_print_description_box()   X-Ref


tag_print_management_box()   X-Ref


tag_print_search_box()   X-Ref


tag_print_search_results()   X-Ref


tag_print_tagged_users_table()   X-Ref


tag_print_user_box()   X-Ref


tag_print_user_list()   X-Ref


tag_display_name()   X-Ref


tag_normalize()   X-Ref


tag_get_related_tags_csv()   X-Ref


tag_set()   X-Ref


tag_set_add()   X-Ref


tag_set_delete()   X-Ref


tag_get()   X-Ref


tag_get_related_tags()   X-Ref


tag_delete()   X-Ref


tag_delete_instances()   X-Ref


tag_cleanup()   X-Ref


tag_bulk_delete_instances()   X-Ref


tag_compute_correlations()   X-Ref


tag_process_computed_correlation()   X-Ref


tag_cron()   X-Ref


tag_find_tags()   X-Ref


tag_get_name()   X-Ref


tag_get_correlated()   X-Ref


tag_cloud_sort()   X-Ref


events_load_def()   X-Ref


events_queue_handler()   X-Ref


events_dispatch()   X-Ref


events_process_queued_handler()   X-Ref


events_update_definition()   X-Ref


events_cron()   X-Ref


events_trigger_legacy()   X-Ref


events_is_registered()   X-Ref


events_pending_count()   X-Ref


clam_message_admins()   X-Ref


get_clam_error_code()   X-Ref


course_get_cm_rename_action()   X-Ref


course_scale_used()   X-Ref


site_scale_used()   X-Ref


external_function_info()   X-Ref


get_records_csv()   X-Ref


put_records_csv()   X-Ref


css_is_colour()   X-Ref


css_is_width()   X-Ref


css_sort_by_count()   X-Ref


message_get_course_contexts()   X-Ref


message_remove_url_params()   X-Ref


message_count_messages()   X-Ref


message_count_blocked_users()   X-Ref


message_contact_link()   X-Ref


message_get_recent_notifications()   X-Ref


message_history_link()   X-Ref


message_search()   X-Ref


message_shorten_message()   X-Ref


message_get_fragment()   X-Ref


message_get_history()   X-Ref


message_get_contact_add_remove_link()   X-Ref


message_get_contact_block_link()   X-Ref


message_mark_messages_read()   X-Ref


message_can_post_message()   X-Ref


message_is_user_non_contact_blocked()   X-Ref


message_is_user_blocked()   X-Ref


print_log()   X-Ref


print_mnet_log()   X-Ref


print_log_csv()   X-Ref


print_log_xls()   X-Ref


print_log_ods()   X-Ref


build_logs_array()   X-Ref


get_logs_usercourse()   X-Ref


get_logs_userday()   X-Ref


get_logs()   X-Ref


prevent_form_autofill_password()   X-Ref


message_get_recent_conversations($userorid, $limitfrom = 0, $limitto = 100)   X-Ref


calendar_preferences_button()   X-Ref


calendar_wday_name()   X-Ref


calendar_get_block_upcoming()   X-Ref


calendar_print_month_selector()   X-Ref


calendar_cron()   X-Ref


load_course_context()   X-Ref


load_role_access_by_context()   X-Ref


dedupe_user_access()   X-Ref


get_user_access_sitewide()   X-Ref


calendar_get_mini()   X-Ref


calendar_get_upcoming()   X-Ref


allow_override()   X-Ref


allow_assign()   X-Ref


allow_switch()   X-Ref


question_add_tops()   X-Ref


question_is_only_toplevel_category_in_context()   X-Ref


message_move_userfrom_unread2read()   X-Ref


message_get_blocked_users()   X-Ref


message_get_contacts()   X-Ref


message_mark_message_read()   X-Ref


message_can_delete_message()   X-Ref


message_delete_message()   X-Ref


calendar_get_all_allowed_types()   X-Ref


groups_get_all_groups_for_courses()   X-Ref


events_get_cached()   X-Ref


events_uninstall()   X-Ref


events_cleanup()   X-Ref


events_dequeue()   X-Ref


events_get_handlers()   X-Ref


get_roles_on_exact_context()   X-Ref


get_roles_with_assignment_on_context()   X-Ref


message_add_contact()   X-Ref


message_remove_contact()   X-Ref


message_unblock_contact()   X-Ref


message_block_contact()   X-Ref


message_get_contact()   X-Ref


get_courses_page()   X-Ref


report_insights_context_insights(\context $context)   X-Ref


get_module_metadata()   X-Ref


cron_run_single_task()   X-Ref


cron_execute_plugin_type()   X-Ref


cron_bc_hack_plugin_functions()   X-Ref


user_get_participants_sql()   X-Ref


user_get_total_participants()   X-Ref


user_get_participants()   X-Ref


plagiarism_save_form_elements()   X-Ref


plagiarism_get_form_elements_module()   X-Ref


make_categories_options()   X-Ref


message_count_unread_messages()   X-Ref


serialise_tool_proxy()   X-Ref


badges_check_backpack_accessibility()   X-Ref


badges_setup_backpack_js()   X-Ref


badges_local_backpack_js()   X-Ref


get_extra_user_fields()   X-Ref


get_extra_user_fields_sql()   X-Ref


get_user_field_name()   X-Ref


get_all_user_name_fields()   X-Ref


profile_display_fields()   X-Ref


profile_edit_category()   X-Ref


profile_edit_field()   X-Ref


calendar_process_subscription_row($subscriptionid, $pollinterval, $action)   X-Ref
Update a subscription from the form data in one of the rows in the existing subscriptions table.

param: int $subscriptionid The ID of the subscription we are acting upon.
param: int $pollinterval The poll interval to use.
param: int $action The action to be performed. One of update or remove.
return: string A log of the import progress, including errors

calendar_import_icalendar_events($ical, $unused = null, $subscriptionid = null)   X-Ref
Import events from an iCalendar object into a course calendar.

param: iCalendar $ical The iCalendar object.
param: int $unused Deprecated
param: int $subscriptionid The subscription ID.
return: string A log of the import progress, including errors.

grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false)   X-Ref
Print grading plugin selection tab-based navigation.

param: string  $active_type type of plugin on current page - import, export, report or edit
param: string  $active_plugin active plugin type - grader, user, cvs, ...
param: array   $plugin_info Array of plugins
param: boolean $return return as string
return: nothing or string if $return true

print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return=false)   X-Ref
Print grading plugin selection popup form.

param: array   $plugin_info An array of plugins containing information for the selector
param: boolean $return return as string
return: nothing or string if $return true

course_purge_section_cache(object $sectioninfo)   X-Ref
Purge the cache of a course section.

$sectioninfo must have following attributes:
- course: course id
- section: section number

param: object $sectioninfo section info
return: void

course_purge_module_cache($cm)   X-Ref
Purge the cache of a course module.

$cm must have following attributes:
- id: cmid
- course: course id

param: cm_info|stdClass $cm course module
return: void

get_array_of_activities(int $courseid, bool $usecache = false)   X-Ref
For a given course, returns an array of course activity objects
Each item in the array contains he following properties:

param: int $courseid course id
param: bool $usecache get activities from cache if modinfo exists when $usecache is true
return: array list of activities

print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null)   X-Ref
Abort execution by throwing of a general exception,
default exception handler displays the error message in most cases.

param: string $errorcode The name of the language string containing the error message.
param: string $module The language file to get the error message from.
param: string $link The url where the user will be prompted to continue.
param: object $a Extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information
return: void, always throws exception!

cron_run(?int $keepalive = null)   X-Ref
Execute cron tasks

param: int|null $keepalive The keepalive time for this cron run.

cron_run_scheduled_tasks(int $timenow)   X-Ref
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.

cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)   X-Ref
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.
param: int     $keepalive Keep this function alive for N seconds and poll for new adhoc tasks.
param: bool    $checklimits Should we check limits?

cron_run_inner_scheduled_task(\core\task\task_base $task)   X-Ref
Shared code that handles running of a single scheduled task within the cron.

Not intended for calling directly outside of this library!

param: \core\task\task_base $task

cron_run_inner_adhoc_task(\core\task\adhoc_task $task)   X-Ref
Shared code that handles running of a single adhoc task within the cron.

param: \core\task\adhoc_task $task

cron_set_process_title(string $title)   X-Ref
Sets the process title

This makes it very easy for a sysadmin to immediately see what task
a cron process is running at any given moment.

param: string $title process status title

cron_trace_time_and_memory()   X-Ref
Output some standard information during cron runs. Specifically current time
and memory usage. This method also does gc_collect_cycles() (before displaying
memory usage) to try to help PHP manage memory better.


cron_prepare_core_renderer($restore = false)   X-Ref
Prepare the output renderer for the cron run.

This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing
any other.

param: bool    $restore Whether to restore the original PAGE and OUTPUT

cron_setup_user($user = null, $course = null, $leavepagealone = false)   X-Ref
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!

param: stdClass $user full user object, null means default cron user (admin),
param: stdClass $course full course record, null means $SITE
param: bool $leavepagealone If specified, stops it messing with global page object
return: void

badges_get_oauth2_service_options()   X-Ref
Get OAuth2 services for the external backpack.

return: array

theme_is_device_locked($device)   X-Ref
Checks if the given device has a theme defined in config.php.

param: string $device The device
return: bool

theme_get_locked_theme_for_device($device)   X-Ref
Returns the theme named defined in config.php for the given device.

param: string $device The device
return: string or null

random_bytes_emulate($length)   X-Ref
Try to generate cryptographically secure pseudo-random bytes.

Note this is achieved by fallbacking between:
- PHP 7 random_bytes().
- OpenSSL openssl_random_pseudo_bytes().
- In house random generator getting its entropy from various, hard to guess, pseudo-random sources.

param: int $length requested length in bytes
return: string binary data

Class: instead  - X-Ref

get_timezone_offset()   X-Ref


get_list_of_timezones()   X-Ref


update_timezone_records()   X-Ref


calculate_user_dst_table()   X-Ref


dst_changes_for_year()   X-Ref


get_timezone_record()   X-Ref


get_referer()   X-Ref


is_web_crawler()   X-Ref


completion_cron()   X-Ref


coursetag_get_tags()   X-Ref


coursetag_get_all_tags()   X-Ref


coursetag_get_jscript()   X-Ref


coursetag_get_jscript_links()   X-Ref


coursetag_get_records()   X-Ref


coursetag_store_keywords()   X-Ref


coursetag_delete_keyword()   X-Ref


coursetag_get_tagged_courses()   X-Ref


coursetag_delete_course_tags()   X-Ref


tag_type_set()   X-Ref


tag_description_set()   X-Ref


tag_get_tags()   X-Ref


tag_get_tags_array()   X-Ref


tag_get_tags_csv()   X-Ref


tag_get_tags_ids()   X-Ref


tag_get_id()   X-Ref


tag_rename()   X-Ref


tag_delete_instance()   X-Ref


tag_find_records()   X-Ref


tag_add()   X-Ref


tag_assign()   X-Ref


tag_record_count()   X-Ref


tag_record_tagged_with()   X-Ref


tag_set_flag()   X-Ref


tag_unset_flag()   X-Ref


tag_print_cloud()   X-Ref


tag_autocomplete()   X-Ref


tag_print_description_box()   X-Ref


tag_print_management_box()   X-Ref


tag_print_search_box()   X-Ref


tag_print_search_results()   X-Ref


tag_print_tagged_users_table()   X-Ref


tag_print_user_box()   X-Ref


tag_print_user_list()   X-Ref


tag_display_name()   X-Ref


tag_normalize()   X-Ref


tag_get_related_tags_csv()   X-Ref


tag_set()   X-Ref


tag_set_add()   X-Ref


tag_set_delete()   X-Ref


tag_get()   X-Ref


tag_get_related_tags()   X-Ref


tag_delete()   X-Ref


tag_delete_instances()   X-Ref


tag_cleanup()   X-Ref


tag_bulk_delete_instances()   X-Ref


tag_compute_correlations()   X-Ref


tag_process_computed_correlation()   X-Ref


tag_cron()   X-Ref


tag_find_tags()   X-Ref


tag_get_name()   X-Ref


tag_get_correlated()   X-Ref


tag_cloud_sort()   X-Ref


events_load_def()   X-Ref


events_queue_handler()   X-Ref


events_dispatch()   X-Ref


events_process_queued_handler()   X-Ref


events_update_definition()   X-Ref


events_cron()   X-Ref


events_trigger_legacy()   X-Ref


events_is_registered()   X-Ref


events_pending_count()   X-Ref


clam_message_admins()   X-Ref


get_clam_error_code()   X-Ref


course_get_cm_rename_action()   X-Ref


course_scale_used()   X-Ref


site_scale_used()   X-Ref


external_function_info()   X-Ref


get_records_csv()   X-Ref


put_records_csv()   X-Ref


css_is_colour()   X-Ref


css_is_width()   X-Ref


css_sort_by_count()   X-Ref


message_get_course_contexts()   X-Ref


message_remove_url_params()   X-Ref


message_count_messages()   X-Ref


message_count_blocked_users()   X-Ref


message_contact_link()   X-Ref


message_get_recent_notifications()   X-Ref


message_history_link()   X-Ref


message_search()   X-Ref


message_shorten_message()   X-Ref


message_get_fragment()   X-Ref


message_get_history()   X-Ref


message_get_contact_add_remove_link()   X-Ref


message_get_contact_block_link()   X-Ref


message_mark_messages_read()   X-Ref


message_can_post_message()   X-Ref


message_is_user_non_contact_blocked()   X-Ref


message_is_user_blocked()   X-Ref


print_log()   X-Ref


print_mnet_log()   X-Ref


print_log_csv()   X-Ref


print_log_xls()   X-Ref


print_log_ods()   X-Ref


build_logs_array()   X-Ref


get_logs_usercourse()   X-Ref


get_logs_userday()   X-Ref


get_logs()   X-Ref


prevent_form_autofill_password()   X-Ref


message_get_recent_conversations($userorid, $limitfrom = 0, $limitto = 100)   X-Ref


calendar_preferences_button()   X-Ref


calendar_wday_name()   X-Ref


calendar_get_block_upcoming()   X-Ref


calendar_print_month_selector()   X-Ref


calendar_cron()   X-Ref


load_course_context()   X-Ref


load_role_access_by_context()   X-Ref


dedupe_user_access()   X-Ref


get_user_access_sitewide()   X-Ref


calendar_get_mini()   X-Ref


calendar_get_upcoming()   X-Ref


allow_override()   X-Ref


allow_assign()   X-Ref


allow_switch()   X-Ref


question_add_tops()   X-Ref


question_is_only_toplevel_category_in_context()   X-Ref


message_move_userfrom_unread2read()   X-Ref


message_get_blocked_users()   X-Ref


message_get_contacts()   X-Ref


message_mark_message_read()   X-Ref


message_can_delete_message()   X-Ref


message_delete_message()   X-Ref


calendar_get_all_allowed_types()   X-Ref


groups_get_all_groups_for_courses()   X-Ref


events_get_cached()   X-Ref


events_uninstall()   X-Ref


events_cleanup()   X-Ref


events_dequeue()   X-Ref


events_get_handlers()   X-Ref


get_roles_on_exact_context()   X-Ref


get_roles_with_assignment_on_context()   X-Ref


message_add_contact()   X-Ref


message_remove_contact()   X-Ref


message_unblock_contact()   X-Ref


message_block_contact()   X-Ref


message_get_contact()   X-Ref


get_courses_page()   X-Ref


report_insights_context_insights(\context $context)   X-Ref


get_module_metadata()   X-Ref


cron_run_single_task()   X-Ref


cron_execute_plugin_type()   X-Ref


cron_bc_hack_plugin_functions()   X-Ref


user_get_participants_sql()   X-Ref


user_get_total_participants()   X-Ref


user_get_participants()   X-Ref


plagiarism_save_form_elements()   X-Ref


plagiarism_get_form_elements_module()   X-Ref


make_categories_options()   X-Ref


message_count_unread_messages()   X-Ref


serialise_tool_proxy()   X-Ref


badges_check_backpack_accessibility()   X-Ref


badges_setup_backpack_js()   X-Ref


badges_local_backpack_js()   X-Ref


get_extra_user_fields()   X-Ref


get_extra_user_fields_sql()   X-Ref


get_user_field_name()   X-Ref


get_all_user_name_fields()   X-Ref


profile_display_fields()   X-Ref


profile_edit_category()   X-Ref


profile_edit_field()   X-Ref


calendar_process_subscription_row($subscriptionid, $pollinterval, $action)   X-Ref
Update a subscription from the form data in one of the rows in the existing subscriptions table.

param: int $subscriptionid The ID of the subscription we are acting upon.
param: int $pollinterval The poll interval to use.
param: int $action The action to be performed. One of update or remove.
return: string A log of the import progress, including errors

calendar_import_icalendar_events($ical, $unused = null, $subscriptionid = null)   X-Ref
Import events from an iCalendar object into a course calendar.

param: iCalendar $ical The iCalendar object.
param: int $unused Deprecated
param: int $subscriptionid The subscription ID.
return: string A log of the import progress, including errors.

grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false)   X-Ref
Print grading plugin selection tab-based navigation.

param: string  $active_type type of plugin on current page - import, export, report or edit
param: string  $active_plugin active plugin type - grader, user, cvs, ...
param: array   $plugin_info Array of plugins
param: boolean $return return as string
return: nothing or string if $return true

print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return=false)   X-Ref
Print grading plugin selection popup form.

param: array   $plugin_info An array of plugins containing information for the selector
param: boolean $return return as string
return: nothing or string if $return true

course_purge_section_cache(object $sectioninfo)   X-Ref
Purge the cache of a course section.

$sectioninfo must have following attributes:
- course: course id
- section: section number

param: object $sectioninfo section info
return: void

course_purge_module_cache($cm)   X-Ref
Purge the cache of a course module.

$cm must have following attributes:
- id: cmid
- course: course id

param: cm_info|stdClass $cm course module
return: void

get_array_of_activities(int $courseid, bool $usecache = false)   X-Ref
For a given course, returns an array of course activity objects
Each item in the array contains he following properties:

param: int $courseid course id
param: bool $usecache get activities from cache if modinfo exists when $usecache is true
return: array list of activities

print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null)   X-Ref
Abort execution by throwing of a general exception,
default exception handler displays the error message in most cases.

param: string $errorcode The name of the language string containing the error message.
param: string $module The language file to get the error message from.
param: string $link The url where the user will be prompted to continue.
param: object $a Extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information
return: void, always throws exception!

cron_run(?int $keepalive = null)   X-Ref
Execute cron tasks

param: int|null $keepalive The keepalive time for this cron run.

cron_run_scheduled_tasks(int $timenow)   X-Ref
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.

cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)   X-Ref
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.
param: int     $keepalive Keep this function alive for N seconds and poll for new adhoc tasks.
param: bool    $checklimits Should we check limits?

cron_run_inner_scheduled_task(\core\task\task_base $task)   X-Ref
Shared code that handles running of a single scheduled task within the cron.

Not intended for calling directly outside of this library!

param: \core\task\task_base $task

cron_run_inner_adhoc_task(\core\task\adhoc_task $task)   X-Ref
Shared code that handles running of a single adhoc task within the cron.

param: \core\task\adhoc_task $task

cron_set_process_title(string $title)   X-Ref
Sets the process title

This makes it very easy for a sysadmin to immediately see what task
a cron process is running at any given moment.

param: string $title process status title

cron_trace_time_and_memory()   X-Ref
Output some standard information during cron runs. Specifically current time
and memory usage. This method also does gc_collect_cycles() (before displaying
memory usage) to try to help PHP manage memory better.


cron_prepare_core_renderer($restore = false)   X-Ref
Prepare the output renderer for the cron run.

This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing
any other.

param: bool    $restore Whether to restore the original PAGE and OUTPUT

cron_setup_user($user = null, $course = null, $leavepagealone = false)   X-Ref
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!

param: stdClass $user full user object, null means default cron user (admin),
param: stdClass $course full course record, null means $SITE
param: bool $leavepagealone If specified, stops it messing with global page object
return: void

badges_get_oauth2_service_options()   X-Ref
Get OAuth2 services for the external backpack.

return: array

theme_is_device_locked($device)   X-Ref
Checks if the given device has a theme defined in config.php.

param: string $device The device
return: bool

theme_get_locked_theme_for_device($device)   X-Ref
Returns the theme named defined in config.php for the given device.

param: string $device The device
return: string or null

random_bytes_emulate($length)   X-Ref
Try to generate cryptographically secure pseudo-random bytes.

Note this is achieved by fallbacking between:
- PHP 7 random_bytes().
- OpenSSL openssl_random_pseudo_bytes().
- In house random generator getting its entropy from various, hard to guess, pseudo-random sources.

param: int $length requested length in bytes
return: string binary data

Class: instead  - X-Ref

get_timezone_offset()   X-Ref


get_list_of_timezones()   X-Ref


update_timezone_records()   X-Ref


calculate_user_dst_table()   X-Ref


dst_changes_for_year()   X-Ref


get_timezone_record()   X-Ref


get_referer()   X-Ref


is_web_crawler()   X-Ref


completion_cron()   X-Ref


coursetag_get_tags()   X-Ref


coursetag_get_all_tags()   X-Ref


coursetag_get_jscript()   X-Ref


coursetag_get_jscript_links()   X-Ref


coursetag_get_records()   X-Ref


coursetag_store_keywords()   X-Ref


coursetag_delete_keyword()   X-Ref


coursetag_get_tagged_courses()   X-Ref


coursetag_delete_course_tags()   X-Ref


tag_type_set()   X-Ref


tag_description_set()   X-Ref


tag_get_tags()   X-Ref


tag_get_tags_array()   X-Ref


tag_get_tags_csv()   X-Ref


tag_get_tags_ids()   X-Ref


tag_get_id()   X-Ref


tag_rename()   X-Ref


tag_delete_instance()   X-Ref


tag_find_records()   X-Ref


tag_add()   X-Ref


tag_assign()   X-Ref


tag_record_count()   X-Ref


tag_record_tagged_with()   X-Ref


tag_set_flag()   X-Ref


tag_unset_flag()   X-Ref


tag_print_cloud()   X-Ref


tag_autocomplete()   X-Ref


tag_print_description_box()   X-Ref


tag_print_management_box()   X-Ref


tag_print_search_box()   X-Ref


tag_print_search_results()   X-Ref


tag_print_tagged_users_table()   X-Ref


tag_print_user_box()   X-Ref


tag_print_user_list()   X-Ref


tag_display_name()   X-Ref


tag_normalize()   X-Ref


tag_get_related_tags_csv()   X-Ref


tag_set()   X-Ref


tag_set_add()   X-Ref


tag_set_delete()   X-Ref


tag_get()   X-Ref


tag_get_related_tags()   X-Ref


tag_delete()   X-Ref


tag_delete_instances()   X-Ref


tag_cleanup()   X-Ref


tag_bulk_delete_instances()   X-Ref


tag_compute_correlations()   X-Ref


tag_process_computed_correlation()   X-Ref


tag_cron()   X-Ref


tag_find_tags()   X-Ref


tag_get_name()   X-Ref


tag_get_correlated()   X-Ref


tag_cloud_sort()   X-Ref


events_load_def()   X-Ref


events_queue_handler()   X-Ref


events_dispatch()   X-Ref


events_process_queued_handler()   X-Ref


events_update_definition()   X-Ref


events_cron()   X-Ref


events_trigger_legacy()   X-Ref


events_is_registered()   X-Ref


events_pending_count()   X-Ref


clam_message_admins()   X-Ref


get_clam_error_code()   X-Ref


course_get_cm_rename_action()   X-Ref


course_scale_used()   X-Ref


site_scale_used()   X-Ref


external_function_info()   X-Ref


get_records_csv()   X-Ref


put_records_csv()   X-Ref


css_is_colour()   X-Ref


css_is_width()   X-Ref


css_sort_by_count()   X-Ref


message_get_course_contexts()   X-Ref


message_remove_url_params()   X-Ref


message_count_messages()   X-Ref


message_count_blocked_users()   X-Ref


message_contact_link()   X-Ref


message_get_recent_notifications()   X-Ref


message_history_link()   X-Ref


message_search()   X-Ref


message_shorten_message()   X-Ref


message_get_fragment()   X-Ref


message_get_history()   X-Ref


message_get_contact_add_remove_link()   X-Ref


message_get_contact_block_link()   X-Ref


message_mark_messages_read()   X-Ref


message_can_post_message()   X-Ref


message_is_user_non_contact_blocked()   X-Ref


message_is_user_blocked()   X-Ref


print_log()   X-Ref


print_mnet_log()   X-Ref


print_log_csv()   X-Ref


print_log_xls()   X-Ref


print_log_ods()   X-Ref


build_logs_array()   X-Ref


get_logs_usercourse()   X-Ref


get_logs_userday()   X-Ref


get_logs()   X-Ref


prevent_form_autofill_password()   X-Ref


message_get_recent_conversations($userorid, $limitfrom = 0, $limitto = 100)   X-Ref


calendar_preferences_button()   X-Ref


calendar_wday_name()   X-Ref


calendar_get_block_upcoming()   X-Ref


calendar_print_month_selector()   X-Ref


calendar_cron()   X-Ref


load_course_context()   X-Ref


load_role_access_by_context()   X-Ref


dedupe_user_access()   X-Ref


get_user_access_sitewide()   X-Ref


calendar_get_mini()   X-Ref


calendar_get_upcoming()   X-Ref


allow_override()   X-Ref


allow_assign()   X-Ref


allow_switch()   X-Ref


question_add_tops()   X-Ref


question_is_only_toplevel_category_in_context()   X-Ref


message_move_userfrom_unread2read()   X-Ref


message_get_blocked_users()   X-Ref


message_get_contacts()   X-Ref


message_mark_message_read()   X-Ref


message_can_delete_message()   X-Ref


message_delete_message()   X-Ref


calendar_get_all_allowed_types()   X-Ref


groups_get_all_groups_for_courses()   X-Ref


events_get_cached()   X-Ref


events_uninstall()   X-Ref


events_cleanup()   X-Ref


events_dequeue()   X-Ref


events_get_handlers()   X-Ref


get_roles_on_exact_context()   X-Ref


get_roles_with_assignment_on_context()   X-Ref


message_add_contact()   X-Ref


message_remove_contact()   X-Ref


message_unblock_contact()   X-Ref


message_block_contact()   X-Ref


message_get_contact()   X-Ref


get_courses_page()   X-Ref


report_insights_context_insights(\context $context)   X-Ref


get_module_metadata()   X-Ref


cron_run_single_task()   X-Ref


cron_execute_plugin_type()   X-Ref


cron_bc_hack_plugin_functions()   X-Ref


user_get_participants_sql()   X-Ref


user_get_total_participants()   X-Ref


user_get_participants()   X-Ref


plagiarism_save_form_elements()   X-Ref


plagiarism_get_form_elements_module()   X-Ref


make_categories_options()   X-Ref


message_count_unread_messages()   X-Ref


serialise_tool_proxy()   X-Ref


badges_check_backpack_accessibility()   X-Ref


badges_setup_backpack_js()   X-Ref


badges_local_backpack_js()   X-Ref


get_extra_user_fields()   X-Ref


get_extra_user_fields_sql()   X-Ref


get_user_field_name()   X-Ref


get_all_user_name_fields()   X-Ref


profile_display_fields()   X-Ref


profile_edit_category()   X-Ref


profile_edit_field()   X-Ref


calendar_process_subscription_row($subscriptionid, $pollinterval, $action)   X-Ref
Update a subscription from the form data in one of the rows in the existing subscriptions table.

param: int $subscriptionid The ID of the subscription we are acting upon.
param: int $pollinterval The poll interval to use.
param: int $action The action to be performed. One of update or remove.
return: string A log of the import progress, including errors

calendar_import_icalendar_events($ical, $unused = null, $subscriptionid = null)   X-Ref
Import events from an iCalendar object into a course calendar.

param: iCalendar $ical The iCalendar object.
param: int $unused Deprecated
param: int $subscriptionid The subscription ID.
return: string A log of the import progress, including errors.

grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false)   X-Ref
Print grading plugin selection tab-based navigation.

param: string  $active_type type of plugin on current page - import, export, report or edit
param: string  $active_plugin active plugin type - grader, user, cvs, ...
param: array   $plugin_info Array of plugins
param: boolean $return return as string
return: nothing or string if $return true

print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return=false)   X-Ref
Print grading plugin selection popup form.

param: array   $plugin_info An array of plugins containing information for the selector
param: boolean $return return as string
return: nothing or string if $return true

course_purge_section_cache(object $sectioninfo)   X-Ref
Purge the cache of a course section.

$sectioninfo must have following attributes:
- course: course id
- section: section number

param: object $sectioninfo section info
return: void

course_purge_module_cache($cm)   X-Ref
Purge the cache of a course module.

$cm must have following attributes:
- id: cmid
- course: course id

param: cm_info|stdClass $cm course module
return: void

get_array_of_activities(int $courseid, bool $usecache = false)   X-Ref
For a given course, returns an array of course activity objects
Each item in the array contains he following properties:

param: int $courseid course id
param: bool $usecache get activities from cache if modinfo exists when $usecache is true
return: array list of activities

print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null)   X-Ref
Abort execution by throwing of a general exception,
default exception handler displays the error message in most cases.

param: string $errorcode The name of the language string containing the error message.
param: string $module The language file to get the error message from.
param: string $link The url where the user will be prompted to continue.
param: object $a Extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information
return: void, always throws exception!

cron_run(?int $keepalive = null)   X-Ref
Execute cron tasks

param: int|null $keepalive The keepalive time for this cron run.

cron_run_scheduled_tasks(int $timenow)   X-Ref
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.

cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)   X-Ref
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.
param: int     $keepalive Keep this function alive for N seconds and poll for new adhoc tasks.
param: bool    $checklimits Should we check limits?

cron_run_inner_scheduled_task(\core\task\task_base $task)   X-Ref
Shared code that handles running of a single scheduled task within the cron.

Not intended for calling directly outside of this library!

param: \core\task\task_base $task

cron_run_inner_adhoc_task(\core\task\adhoc_task $task)   X-Ref
Shared code that handles running of a single adhoc task within the cron.

param: \core\task\adhoc_task $task

cron_set_process_title(string $title)   X-Ref
Sets the process title

This makes it very easy for a sysadmin to immediately see what task
a cron process is running at any given moment.

param: string $title process status title

cron_trace_time_and_memory()   X-Ref
Output some standard information during cron runs. Specifically current time
and memory usage. This method also does gc_collect_cycles() (before displaying
memory usage) to try to help PHP manage memory better.


cron_prepare_core_renderer($restore = false)   X-Ref
Prepare the output renderer for the cron run.

This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing
any other.

param: bool    $restore Whether to restore the original PAGE and OUTPUT

cron_setup_user($user = null, $course = null, $leavepagealone = false)   X-Ref
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!

param: stdClass $user full user object, null means default cron user (admin),
param: stdClass $course full course record, null means $SITE
param: bool $leavepagealone If specified, stops it messing with global page object
return: void

badges_get_oauth2_service_options()   X-Ref
Get OAuth2 services for the external backpack.

return: array

theme_is_device_locked($device)   X-Ref
Checks if the given device has a theme defined in config.php.

param: string $device The device
return: bool

theme_get_locked_theme_for_device($device)   X-Ref
Returns the theme named defined in config.php for the given device.

param: string $device The device
return: string or null

random_bytes_emulate($length)   X-Ref
Try to generate cryptographically secure pseudo-random bytes.

Note this is achieved by fallbacking between:
- PHP 7 random_bytes().
- OpenSSL openssl_random_pseudo_bytes().
- In house random generator getting its entropy from various, hard to guess, pseudo-random sources.

param: int $length requested length in bytes
return: string binary data

Class: instead  - X-Ref

get_timezone_offset()   X-Ref


get_list_of_timezones()   X-Ref


update_timezone_records()   X-Ref


calculate_user_dst_table()   X-Ref


dst_changes_for_year()   X-Ref


get_timezone_record()   X-Ref


get_referer()   X-Ref


is_web_crawler()   X-Ref


completion_cron()   X-Ref


coursetag_get_tags()   X-Ref


coursetag_get_all_tags()   X-Ref


coursetag_get_jscript()   X-Ref


coursetag_get_jscript_links()   X-Ref


coursetag_get_records()   X-Ref


coursetag_store_keywords()   X-Ref


coursetag_delete_keyword()   X-Ref


coursetag_get_tagged_courses()   X-Ref


coursetag_delete_course_tags()   X-Ref


tag_type_set()   X-Ref


tag_description_set()   X-Ref


tag_get_tags()   X-Ref


tag_get_tags_array()   X-Ref


tag_get_tags_csv()   X-Ref


tag_get_tags_ids()   X-Ref


tag_get_id()   X-Ref


tag_rename()   X-Ref


tag_delete_instance()   X-Ref


tag_find_records()   X-Ref


tag_add()   X-Ref


tag_assign()   X-Ref


tag_record_count()   X-Ref


tag_record_tagged_with()   X-Ref


tag_set_flag()   X-Ref


tag_unset_flag()   X-Ref


tag_print_cloud()   X-Ref


tag_autocomplete()   X-Ref


tag_print_description_box()   X-Ref


tag_print_management_box()   X-Ref


tag_print_search_box()   X-Ref


tag_print_search_results()   X-Ref


tag_print_tagged_users_table()   X-Ref


tag_print_user_box()   X-Ref


tag_print_user_list()   X-Ref


tag_display_name()   X-Ref


tag_normalize()   X-Ref


tag_get_related_tags_csv()   X-Ref


tag_set()   X-Ref


tag_set_add()   X-Ref


tag_set_delete()   X-Ref


tag_get()   X-Ref


tag_get_related_tags()   X-Ref


tag_delete()   X-Ref


tag_delete_instances()   X-Ref


tag_cleanup()   X-Ref


tag_bulk_delete_instances()   X-Ref


tag_compute_correlations()   X-Ref


tag_process_computed_correlation()   X-Ref


tag_cron()   X-Ref


tag_find_tags()   X-Ref


tag_get_name()   X-Ref


tag_get_correlated()   X-Ref


tag_cloud_sort()   X-Ref


events_load_def()   X-Ref


events_queue_handler()   X-Ref


events_dispatch()   X-Ref


events_process_queued_handler()   X-Ref


events_update_definition()   X-Ref


events_cron()   X-Ref


events_trigger_legacy()   X-Ref


events_is_registered()   X-Ref


events_pending_count()   X-Ref


clam_message_admins()   X-Ref


get_clam_error_code()   X-Ref


course_get_cm_rename_action()   X-Ref


course_scale_used()   X-Ref


site_scale_used()   X-Ref


external_function_info()   X-Ref


get_records_csv()   X-Ref


put_records_csv()   X-Ref


css_is_colour()   X-Ref


css_is_width()   X-Ref


css_sort_by_count()   X-Ref


message_get_course_contexts()   X-Ref


message_remove_url_params()   X-Ref


message_count_messages()   X-Ref


message_count_blocked_users()   X-Ref


message_contact_link()   X-Ref


message_get_recent_notifications()   X-Ref


message_history_link()   X-Ref


message_search()   X-Ref


message_shorten_message()   X-Ref


message_get_fragment()   X-Ref


message_get_history()   X-Ref


message_get_contact_add_remove_link()   X-Ref


message_get_contact_block_link()   X-Ref


message_mark_messages_read()   X-Ref


message_can_post_message()   X-Ref


message_is_user_non_contact_blocked()   X-Ref


message_is_user_blocked()   X-Ref


print_log()   X-Ref


print_mnet_log()   X-Ref


print_log_csv()   X-Ref


print_log_xls()   X-Ref


print_log_ods()   X-Ref


build_logs_array()   X-Ref


get_logs_usercourse()   X-Ref


get_logs_userday()   X-Ref


get_logs()   X-Ref


prevent_form_autofill_password()   X-Ref


message_get_recent_conversations($userorid, $limitfrom = 0, $limitto = 100)   X-Ref


calendar_preferences_button()   X-Ref


calendar_wday_name()   X-Ref


calendar_get_block_upcoming()   X-Ref


calendar_print_month_selector()   X-Ref


calendar_cron()   X-Ref


load_course_context()   X-Ref


load_role_access_by_context()   X-Ref


dedupe_user_access()   X-Ref


get_user_access_sitewide()   X-Ref


calendar_get_mini()   X-Ref


calendar_get_upcoming()   X-Ref


allow_override()   X-Ref


allow_assign()   X-Ref


allow_switch()   X-Ref


question_add_tops()   X-Ref


question_is_only_toplevel_category_in_context()   X-Ref


message_move_userfrom_unread2read()   X-Ref


message_get_blocked_users()   X-Ref


message_get_contacts()   X-Ref


message_mark_message_read()   X-Ref


message_can_delete_message()   X-Ref


message_delete_message()   X-Ref


calendar_get_all_allowed_types()   X-Ref


groups_get_all_groups_for_courses()   X-Ref


events_get_cached()   X-Ref


events_uninstall()   X-Ref


events_cleanup()   X-Ref


events_dequeue()   X-Ref


events_get_handlers()   X-Ref


get_roles_on_exact_context()   X-Ref


get_roles_with_assignment_on_context()   X-Ref


message_add_contact()   X-Ref


message_remove_contact()   X-Ref


message_unblock_contact()   X-Ref


message_block_contact()   X-Ref


message_get_contact()   X-Ref


get_courses_page()   X-Ref


report_insights_context_insights(\context $context)   X-Ref


get_module_metadata()   X-Ref


cron_run_single_task()   X-Ref


cron_execute_plugin_type()   X-Ref


cron_bc_hack_plugin_functions()   X-Ref


user_get_participants_sql()   X-Ref


user_get_total_participants()   X-Ref


user_get_participants()   X-Ref


plagiarism_save_form_elements()   X-Ref


plagiarism_get_form_elements_module()   X-Ref


make_categories_options()   X-Ref


message_count_unread_messages()   X-Ref


serialise_tool_proxy()   X-Ref


badges_check_backpack_accessibility()   X-Ref


badges_setup_backpack_js()   X-Ref


badges_local_backpack_js()   X-Ref


get_extra_user_fields()   X-Ref


get_extra_user_fields_sql()   X-Ref


get_user_field_name()   X-Ref


get_all_user_name_fields()   X-Ref


profile_display_fields()   X-Ref


profile_edit_category()   X-Ref


profile_edit_field()   X-Ref


calendar_process_subscription_row($subscriptionid, $pollinterval, $action)   X-Ref
Update a subscription from the form data in one of the rows in the existing subscriptions table.

param: int $subscriptionid The ID of the subscription we are acting upon.
param: int $pollinterval The poll interval to use.
param: int $action The action to be performed. One of update or remove.
return: string A log of the import progress, including errors

calendar_import_icalendar_events($ical, $unused = null, $subscriptionid = null)   X-Ref
Import events from an iCalendar object into a course calendar.

param: iCalendar $ical The iCalendar object.
param: int $unused Deprecated
param: int $subscriptionid The subscription ID.
return: string A log of the import progress, including errors.

grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false)   X-Ref
Print grading plugin selection tab-based navigation.

param: string  $active_type type of plugin on current page - import, export, report or edit
param: string  $active_plugin active plugin type - grader, user, cvs, ...
param: array   $plugin_info Array of plugins
param: boolean $return return as string
return: nothing or string if $return true

print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return=false)   X-Ref
Print grading plugin selection popup form.

param: array   $plugin_info An array of plugins containing information for the selector
param: boolean $return return as string
return: nothing or string if $return true

course_purge_section_cache(object $sectioninfo)   X-Ref
Purge the cache of a course section.

$sectioninfo must have following attributes:
- course: course id
- section: section number

param: object $sectioninfo section info
return: void

course_purge_module_cache($cm)   X-Ref
Purge the cache of a course module.

$cm must have following attributes:
- id: cmid
- course: course id

param: cm_info|stdClass $cm course module
return: void

get_array_of_activities(int $courseid, bool $usecache = false)   X-Ref
For a given course, returns an array of course activity objects
Each item in the array contains he following properties:

param: int $courseid course id
param: bool $usecache get activities from cache if modinfo exists when $usecache is true
return: array list of activities

print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null)   X-Ref
Abort execution by throwing of a general exception,
default exception handler displays the error message in most cases.

param: string $errorcode The name of the language string containing the error message.
param: string $module The language file to get the error message from.
param: string $link The url where the user will be prompted to continue.
param: object $a Extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information
return: void, always throws exception!

cron_run(?int $keepalive = null)   X-Ref
Execute cron tasks

param: int|null $keepalive The keepalive time for this cron run.

cron_run_scheduled_tasks(int $timenow)   X-Ref
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.

cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)   X-Ref
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.
param: int     $keepalive Keep this function alive for N seconds and poll for new adhoc tasks.
param: bool    $checklimits Should we check limits?

cron_run_inner_scheduled_task(\core\task\task_base $task)   X-Ref
Shared code that handles running of a single scheduled task within the cron.

Not intended for calling directly outside of this library!

param: \core\task\task_base $task

cron_run_inner_adhoc_task(\core\task\adhoc_task $task)   X-Ref
Shared code that handles running of a single adhoc task within the cron.

param: \core\task\adhoc_task $task

cron_set_process_title(string $title)   X-Ref
Sets the process title

This makes it very easy for a sysadmin to immediately see what task
a cron process is running at any given moment.

param: string $title process status title

cron_trace_time_and_memory()   X-Ref
Output some standard information during cron runs. Specifically current time
and memory usage. This method also does gc_collect_cycles() (before displaying
memory usage) to try to help PHP manage memory better.


cron_prepare_core_renderer($restore = false)   X-Ref
Prepare the output renderer for the cron run.

This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing
any other.

param: bool    $restore Whether to restore the original PAGE and OUTPUT

cron_setup_user($user = null, $course = null, $leavepagealone = false)   X-Ref
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!

param: stdClass $user full user object, null means default cron user (admin),
param: stdClass $course full course record, null means $SITE
param: bool $leavepagealone If specified, stops it messing with global page object
return: void

badges_get_oauth2_service_options()   X-Ref
Get OAuth2 services for the external backpack.

return: array

theme_is_device_locked($device)   X-Ref
Checks if the given device has a theme defined in config.php.

param: string $device The device
return: bool

theme_get_locked_theme_for_device($device)   X-Ref
Returns the theme named defined in config.php for the given device.

param: string $device The device
return: string or null

random_bytes_emulate($length)   X-Ref
Try to generate cryptographically secure pseudo-random bytes.

Note this is achieved by fallbacking between:
- PHP 7 random_bytes().
- OpenSSL openssl_random_pseudo_bytes().
- In house random generator getting its entropy from various, hard to guess, pseudo-random sources.

param: int $length requested length in bytes
return: string binary data

Class: instead  - X-Ref

get_timezone_offset()   X-Ref


get_list_of_timezones()   X-Ref


update_timezone_records()   X-Ref


calculate_user_dst_table()   X-Ref


dst_changes_for_year()   X-Ref


get_timezone_record()   X-Ref


get_referer()   X-Ref


is_web_crawler()   X-Ref


completion_cron()   X-Ref


coursetag_get_tags()   X-Ref


coursetag_get_all_tags()   X-Ref


coursetag_get_jscript()   X-Ref


coursetag_get_jscript_links()   X-Ref


coursetag_get_records()   X-Ref


coursetag_store_keywords()   X-Ref


coursetag_delete_keyword()   X-Ref


coursetag_get_tagged_courses()   X-Ref


coursetag_delete_course_tags()   X-Ref


tag_type_set()   X-Ref


tag_description_set()   X-Ref


tag_get_tags()   X-Ref


tag_get_tags_array()   X-Ref


tag_get_tags_csv()   X-Ref


tag_get_tags_ids()   X-Ref


tag_get_id()   X-Ref


tag_rename()   X-Ref


tag_delete_instance()   X-Ref


tag_find_records()   X-Ref


tag_add()   X-Ref


tag_assign()   X-Ref


tag_record_count()   X-Ref


tag_record_tagged_with()   X-Ref


tag_set_flag()   X-Ref


tag_unset_flag()   X-Ref


tag_print_cloud()   X-Ref


tag_autocomplete()   X-Ref


tag_print_description_box()   X-Ref


tag_print_management_box()   X-Ref


tag_print_search_box()   X-Ref


tag_print_search_results()   X-Ref


tag_print_tagged_users_table()   X-Ref


tag_print_user_box()   X-Ref


tag_print_user_list()   X-Ref


tag_display_name()   X-Ref


tag_normalize()   X-Ref


tag_get_related_tags_csv()   X-Ref


tag_set()   X-Ref


tag_set_add()   X-Ref


tag_set_delete()   X-Ref


tag_get()   X-Ref


tag_get_related_tags()   X-Ref


tag_delete()   X-Ref


tag_delete_instances()   X-Ref


tag_cleanup()   X-Ref


tag_bulk_delete_instances()   X-Ref


tag_compute_correlations()   X-Ref


tag_process_computed_correlation()   X-Ref


tag_cron()   X-Ref


tag_find_tags()   X-Ref


tag_get_name()   X-Ref


tag_get_correlated()   X-Ref


tag_cloud_sort()   X-Ref


events_load_def()   X-Ref


events_queue_handler()   X-Ref


events_dispatch()   X-Ref


events_process_queued_handler()   X-Ref


events_update_definition()   X-Ref


events_cron()   X-Ref


events_trigger_legacy()   X-Ref


events_is_registered()   X-Ref


events_pending_count()   X-Ref


clam_message_admins()   X-Ref


get_clam_error_code()   X-Ref


course_get_cm_rename_action()   X-Ref


course_scale_used()   X-Ref


site_scale_used()   X-Ref


external_function_info()   X-Ref


get_records_csv()   X-Ref


put_records_csv()   X-Ref


css_is_colour()   X-Ref


css_is_width()   X-Ref


css_sort_by_count()   X-Ref


message_get_course_contexts()   X-Ref


message_remove_url_params()   X-Ref


message_count_messages()   X-Ref


message_count_blocked_users()   X-Ref


message_contact_link()   X-Ref


message_get_recent_notifications()   X-Ref


message_history_link()   X-Ref


message_search()   X-Ref


message_shorten_message()   X-Ref


message_get_fragment()   X-Ref


message_get_history()   X-Ref


message_get_contact_add_remove_link()   X-Ref


message_get_contact_block_link()   X-Ref


message_mark_messages_read()   X-Ref


message_can_post_message()   X-Ref


message_is_user_non_contact_blocked()   X-Ref


message_is_user_blocked()   X-Ref


print_log()   X-Ref


print_mnet_log()   X-Ref


print_log_csv()   X-Ref


print_log_xls()   X-Ref


print_log_ods()   X-Ref


build_logs_array()   X-Ref


get_logs_usercourse()   X-Ref


get_logs_userday()   X-Ref


get_logs()   X-Ref


prevent_form_autofill_password()   X-Ref


message_get_recent_conversations($userorid, $limitfrom = 0, $limitto = 100)   X-Ref


calendar_preferences_button()   X-Ref


calendar_wday_name()   X-Ref


calendar_get_block_upcoming()   X-Ref


calendar_print_month_selector()   X-Ref


calendar_cron()   X-Ref


load_course_context()   X-Ref


load_role_access_by_context()   X-Ref


dedupe_user_access()   X-Ref


get_user_access_sitewide()   X-Ref


calendar_get_mini()   X-Ref


calendar_get_upcoming()   X-Ref


allow_override()   X-Ref


allow_assign()   X-Ref


allow_switch()   X-Ref


question_add_tops()   X-Ref


question_is_only_toplevel_category_in_context()   X-Ref


message_move_userfrom_unread2read()   X-Ref


message_get_blocked_users()   X-Ref


message_get_contacts()   X-Ref


message_mark_message_read()   X-Ref


message_can_delete_message()   X-Ref


message_delete_message()   X-Ref


calendar_get_all_allowed_types()   X-Ref


groups_get_all_groups_for_courses()   X-Ref


events_get_cached()   X-Ref


events_uninstall()   X-Ref


events_cleanup()   X-Ref


events_dequeue()   X-Ref


events_get_handlers()   X-Ref


get_roles_on_exact_context()   X-Ref


get_roles_with_assignment_on_context()   X-Ref


message_add_contact()   X-Ref


message_remove_contact()   X-Ref


message_unblock_contact()   X-Ref


message_block_contact()   X-Ref


message_get_contact()   X-Ref


get_courses_page()   X-Ref


report_insights_context_insights(\context $context)   X-Ref


get_module_metadata()   X-Ref


cron_run_single_task()   X-Ref


cron_execute_plugin_type()   X-Ref


cron_bc_hack_plugin_functions()   X-Ref


user_get_participants_sql()   X-Ref


user_get_total_participants()   X-Ref


user_get_participants()   X-Ref


plagiarism_save_form_elements()   X-Ref


plagiarism_get_form_elements_module()   X-Ref


make_categories_options()   X-Ref


message_count_unread_messages()   X-Ref


serialise_tool_proxy()   X-Ref


badges_check_backpack_accessibility()   X-Ref


badges_setup_backpack_js()   X-Ref


badges_local_backpack_js()   X-Ref


get_extra_user_fields()   X-Ref


get_extra_user_fields_sql()   X-Ref


get_user_field_name()   X-Ref


get_all_user_name_fields()   X-Ref


profile_display_fields()   X-Ref


profile_edit_category()   X-Ref


profile_edit_field()   X-Ref


calendar_process_subscription_row($subscriptionid, $pollinterval, $action)   X-Ref
Update a subscription from the form data in one of the rows in the existing subscriptions table.

param: int $subscriptionid The ID of the subscription we are acting upon.
param: int $pollinterval The poll interval to use.
param: int $action The action to be performed. One of update or remove.
return: string A log of the import progress, including errors

calendar_import_icalendar_events($ical, $unused = null, $subscriptionid = null)   X-Ref
Import events from an iCalendar object into a course calendar.

param: iCalendar $ical The iCalendar object.
param: int $unused Deprecated
param: int $subscriptionid The subscription ID.
return: string A log of the import progress, including errors.

grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false)   X-Ref
Print grading plugin selection tab-based navigation.

param: string  $active_type type of plugin on current page - import, export, report or edit
param: string  $active_plugin active plugin type - grader, user, cvs, ...
param: array   $plugin_info Array of plugins
param: boolean $return return as string
return: nothing or string if $return true

print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return=false)   X-Ref
Print grading plugin selection popup form.

param: array   $plugin_info An array of plugins containing information for the selector
param: boolean $return return as string
return: nothing or string if $return true

course_purge_section_cache(object $sectioninfo)   X-Ref
Purge the cache of a course section.

$sectioninfo must have following attributes:
- course: course id
- section: section number

param: object $sectioninfo section info
return: void

course_purge_module_cache($cm)   X-Ref
Purge the cache of a course module.

$cm must have following attributes:
- id: cmid
- course: course id

param: cm_info|stdClass $cm course module
return: void

get_array_of_activities(int $courseid, bool $usecache = false)   X-Ref
For a given course, returns an array of course activity objects
Each item in the array contains he following properties:

param: int $courseid course id
param: bool $usecache get activities from cache if modinfo exists when $usecache is true
return: array list of activities

print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null)   X-Ref
Abort execution by throwing of a general exception,
default exception handler displays the error message in most cases.

param: string $errorcode The name of the language string containing the error message.
param: string $module The language file to get the error message from.
param: string $link The url where the user will be prompted to continue.
param: object $a Extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information
return: void, always throws exception!

cron_run(?int $keepalive = null)   X-Ref
Execute cron tasks

param: int|null $keepalive The keepalive time for this cron run.

cron_run_scheduled_tasks(int $timenow)   X-Ref
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.

cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)   X-Ref
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.
param: int     $keepalive Keep this function alive for N seconds and poll for new adhoc tasks.
param: bool    $checklimits Should we check limits?

cron_run_inner_scheduled_task(\core\task\task_base $task)   X-Ref
Shared code that handles running of a single scheduled task within the cron.

Not intended for calling directly outside of this library!

param: \core\task\task_base $task

cron_run_inner_adhoc_task(\core\task\adhoc_task $task)   X-Ref
Shared code that handles running of a single adhoc task within the cron.

param: \core\task\adhoc_task $task

cron_set_process_title(string $title)   X-Ref
Sets the process title

This makes it very easy for a sysadmin to immediately see what task
a cron process is running at any given moment.

param: string $title process status title

cron_trace_time_and_memory()   X-Ref
Output some standard information during cron runs. Specifically current time
and memory usage. This method also does gc_collect_cycles() (before displaying
memory usage) to try to help PHP manage memory better.


cron_prepare_core_renderer($restore = false)   X-Ref
Prepare the output renderer for the cron run.

This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing
any other.

param: bool    $restore Whether to restore the original PAGE and OUTPUT

cron_setup_user($user = null, $course = null, $leavepagealone = false)   X-Ref
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!

param: stdClass $user full user object, null means default cron user (admin),
param: stdClass $course full course record, null means $SITE
param: bool $leavepagealone If specified, stops it messing with global page object
return: void

badges_get_oauth2_service_options()   X-Ref
Get OAuth2 services for the external backpack.

return: array

theme_is_device_locked($device)   X-Ref
Checks if the given device has a theme defined in config.php.

param: string $device The device
return: bool

theme_get_locked_theme_for_device($device)   X-Ref
Returns the theme named defined in config.php for the given device.

param: string $device The device
return: string or null

random_bytes_emulate($length)   X-Ref
Try to generate cryptographically secure pseudo-random bytes.

Note this is achieved by fallbacking between:
- PHP 7 random_bytes().
- OpenSSL openssl_random_pseudo_bytes().
- In house random generator getting its entropy from various, hard to guess, pseudo-random sources.

param: int $length requested length in bytes
return: string binary data

Class: instead  - X-Ref

get_timezone_offset()   X-Ref


get_list_of_timezones()   X-Ref


update_timezone_records()   X-Ref


calculate_user_dst_table()   X-Ref


dst_changes_for_year()   X-Ref


get_timezone_record()   X-Ref


get_referer()   X-Ref


is_web_crawler()   X-Ref


completion_cron()   X-Ref


coursetag_get_tags()   X-Ref


coursetag_get_all_tags()   X-Ref


coursetag_get_jscript()   X-Ref


coursetag_get_jscript_links()   X-Ref


coursetag_get_records()   X-Ref


coursetag_store_keywords()   X-Ref


coursetag_delete_keyword()   X-Ref


coursetag_get_tagged_courses()   X-Ref


coursetag_delete_course_tags()   X-Ref


tag_type_set()   X-Ref


tag_description_set()   X-Ref


tag_get_tags()   X-Ref


tag_get_tags_array()   X-Ref


tag_get_tags_csv()   X-Ref


tag_get_tags_ids()   X-Ref


tag_get_id()   X-Ref


tag_rename()   X-Ref


tag_delete_instance()   X-Ref


tag_find_records()   X-Ref


tag_add()   X-Ref


tag_assign()   X-Ref


tag_record_count()   X-Ref


tag_record_tagged_with()   X-Ref


tag_set_flag()   X-Ref


tag_unset_flag()   X-Ref


tag_print_cloud()   X-Ref


tag_autocomplete()   X-Ref


tag_print_description_box()   X-Ref


tag_print_management_box()   X-Ref


tag_print_search_box()   X-Ref


tag_print_search_results()   X-Ref


tag_print_tagged_users_table()   X-Ref


tag_print_user_box()   X-Ref


tag_print_user_list()   X-Ref


tag_display_name()   X-Ref


tag_normalize()   X-Ref


tag_get_related_tags_csv()   X-Ref


tag_set()   X-Ref


tag_set_add()   X-Ref


tag_set_delete()   X-Ref


tag_get()   X-Ref


tag_get_related_tags()   X-Ref


tag_delete()   X-Ref


tag_delete_instances()   X-Ref


tag_cleanup()   X-Ref


tag_bulk_delete_instances()   X-Ref


tag_compute_correlations()   X-Ref


tag_process_computed_correlation()   X-Ref


tag_cron()   X-Ref


tag_find_tags()   X-Ref


tag_get_name()   X-Ref


tag_get_correlated()   X-Ref


tag_cloud_sort()   X-Ref


events_load_def()   X-Ref


events_queue_handler()   X-Ref


events_dispatch()   X-Ref


events_process_queued_handler()   X-Ref


events_update_definition()   X-Ref


events_cron()   X-Ref


events_trigger_legacy()   X-Ref


events_is_registered()   X-Ref


events_pending_count()   X-Ref


clam_message_admins()   X-Ref


get_clam_error_code()   X-Ref


course_get_cm_rename_action()   X-Ref


course_scale_used()   X-Ref


site_scale_used()   X-Ref


external_function_info()   X-Ref


get_records_csv()   X-Ref


put_records_csv()   X-Ref


css_is_colour()   X-Ref


css_is_width()   X-Ref


css_sort_by_count()   X-Ref


message_get_course_contexts()   X-Ref


message_remove_url_params()   X-Ref


message_count_messages()   X-Ref


message_count_blocked_users()   X-Ref


message_contact_link()   X-Ref


message_get_recent_notifications()   X-Ref


message_history_link()   X-Ref


message_search()   X-Ref


message_shorten_message()   X-Ref


message_get_fragment()   X-Ref


message_get_history()   X-Ref


message_get_contact_add_remove_link()   X-Ref


message_get_contact_block_link()   X-Ref


message_mark_messages_read()   X-Ref


message_can_post_message()   X-Ref


message_is_user_non_contact_blocked()   X-Ref


message_is_user_blocked()   X-Ref


print_log()   X-Ref


print_mnet_log()   X-Ref


print_log_csv()   X-Ref


print_log_xls()   X-Ref


print_log_ods()   X-Ref


build_logs_array()   X-Ref


get_logs_usercourse()   X-Ref


get_logs_userday()   X-Ref


get_logs()   X-Ref


prevent_form_autofill_password()   X-Ref


message_get_recent_conversations($userorid, $limitfrom = 0, $limitto = 100)   X-Ref


calendar_preferences_button()   X-Ref


calendar_wday_name()   X-Ref


calendar_get_block_upcoming()   X-Ref


calendar_print_month_selector()   X-Ref


calendar_cron()   X-Ref


load_course_context()   X-Ref


load_role_access_by_context()   X-Ref


dedupe_user_access()   X-Ref


get_user_access_sitewide()   X-Ref


calendar_get_mini()   X-Ref


calendar_get_upcoming()   X-Ref


allow_override()   X-Ref


allow_assign()   X-Ref


allow_switch()   X-Ref


question_add_tops()   X-Ref


question_is_only_toplevel_category_in_context()   X-Ref


message_move_userfrom_unread2read()   X-Ref


message_get_blocked_users()   X-Ref


message_get_contacts()   X-Ref


message_mark_message_read()   X-Ref


message_can_delete_message()   X-Ref


message_delete_message()   X-Ref


calendar_get_all_allowed_types()   X-Ref


groups_get_all_groups_for_courses()   X-Ref


events_get_cached()   X-Ref


events_uninstall()   X-Ref


events_cleanup()   X-Ref


events_dequeue()   X-Ref


events_get_handlers()   X-Ref


get_roles_on_exact_context()   X-Ref


get_roles_with_assignment_on_context()   X-Ref


message_add_contact()   X-Ref


message_remove_contact()   X-Ref


message_unblock_contact()   X-Ref


message_block_contact()   X-Ref


message_get_contact()   X-Ref


get_courses_page()   X-Ref


report_insights_context_insights(\context $context)   X-Ref


get_module_metadata()   X-Ref


cron_run_single_task()   X-Ref


cron_execute_plugin_type()   X-Ref


cron_bc_hack_plugin_functions()   X-Ref


user_get_participants_sql()   X-Ref


user_get_total_participants()   X-Ref


user_get_participants()   X-Ref


plagiarism_save_form_elements()   X-Ref


plagiarism_get_form_elements_module()   X-Ref


make_categories_options()   X-Ref


message_count_unread_messages()   X-Ref


serialise_tool_proxy()   X-Ref


badges_check_backpack_accessibility()   X-Ref


badges_setup_backpack_js()   X-Ref


badges_local_backpack_js()   X-Ref


get_extra_user_fields()   X-Ref


get_extra_user_fields_sql()   X-Ref


get_user_field_name()   X-Ref


get_all_user_name_fields()   X-Ref


profile_display_fields()   X-Ref


profile_edit_category()   X-Ref


profile_edit_field()   X-Ref


calendar_process_subscription_row($subscriptionid, $pollinterval, $action)   X-Ref
Update a subscription from the form data in one of the rows in the existing subscriptions table.

param: int $subscriptionid The ID of the subscription we are acting upon.
param: int $pollinterval The poll interval to use.
param: int $action The action to be performed. One of update or remove.
return: string A log of the import progress, including errors

calendar_import_icalendar_events($ical, $unused = null, $subscriptionid = null)   X-Ref
Import events from an iCalendar object into a course calendar.

param: iCalendar $ical The iCalendar object.
param: int $unused Deprecated
param: int $subscriptionid The subscription ID.
return: string A log of the import progress, including errors.

grade_print_tabs($active_type, $active_plugin, $plugin_info, $return=false)   X-Ref
Print grading plugin selection tab-based navigation.

param: string  $active_type type of plugin on current page - import, export, report or edit
param: string  $active_plugin active plugin type - grader, user, cvs, ...
param: array   $plugin_info Array of plugins
param: boolean $return return as string
return: nothing or string if $return true

print_grade_plugin_selector($plugin_info, $active_type, $active_plugin, $return=false)   X-Ref
Print grading plugin selection popup form.

param: array   $plugin_info An array of plugins containing information for the selector
param: boolean $return return as string
return: nothing or string if $return true

course_purge_section_cache(object $sectioninfo)   X-Ref
Purge the cache of a course section.

$sectioninfo must have following attributes:
- course: course id
- section: section number

param: object $sectioninfo section info
return: void

course_purge_module_cache($cm)   X-Ref
Purge the cache of a course module.

$cm must have following attributes:
- id: cmid
- course: course id

param: cm_info|stdClass $cm course module
return: void

get_array_of_activities(int $courseid, bool $usecache = false)   X-Ref
For a given course, returns an array of course activity objects
Each item in the array contains he following properties:

param: int $courseid course id
param: bool $usecache get activities from cache if modinfo exists when $usecache is true
return: array list of activities

print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null)   X-Ref
Abort execution by throwing of a general exception,
default exception handler displays the error message in most cases.

param: string $errorcode The name of the language string containing the error message.
param: string $module The language file to get the error message from.
param: string $link The url where the user will be prompted to continue.
param: object $a Extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information
return: void, always throws exception!

cron_run(?int $keepalive = null)   X-Ref
Execute cron tasks

param: int|null $keepalive The keepalive time for this cron run.

cron_run_scheduled_tasks(int $timenow)   X-Ref
Execute all queued scheduled tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.

cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)   X-Ref
Execute all queued adhoc tasks, applying necessary concurrency limits and time limits.

param: int     $timenow The time this process started.
param: int     $keepalive Keep this function alive for N seconds and poll for new adhoc tasks.
param: bool    $checklimits Should we check limits?

cron_run_inner_scheduled_task(\core\task\task_base $task)   X-Ref
Shared code that handles running of a single scheduled task within the cron.

Not intended for calling directly outside of this library!

param: \core\task\task_base $task

cron_run_inner_adhoc_task(\core\task\adhoc_task $task)   X-Ref
Shared code that handles running of a single adhoc task within the cron.

param: \core\task\adhoc_task $task

cron_set_process_title(string $title)   X-Ref
Sets the process title

This makes it very easy for a sysadmin to immediately see what task
a cron process is running at any given moment.

param: string $title process status title

cron_trace_time_and_memory()   X-Ref
Output some standard information during cron runs. Specifically current time
and memory usage. This method also does gc_collect_cycles() (before displaying
memory usage) to try to help PHP manage memory better.


cron_prepare_core_renderer($restore = false)   X-Ref
Prepare the output renderer for the cron run.

This involves creating a new $PAGE, and $OUTPUT fresh for each task and prevents any one task from influencing
any other.

param: bool    $restore Whether to restore the original PAGE and OUTPUT

cron_setup_user($user = null, $course = null, $leavepagealone = false)   X-Ref
Sets up current user and course environment (lang, etc.) in cron.
Do not use outside of cron script!

param: stdClass $user full user object, null means default cron user (admin),
param: stdClass $course full course record, null means $SITE
param: bool $leavepagealone If specified, stops it messing with global page object
return: void

badges_get_oauth2_service_options()   X-Ref
Get OAuth2 services for the external backpack.

return: array

theme_is_device_locked($device)   X-Ref
Checks if the given device has a theme defined in config.php.

param: string $device The device
return: bool

theme_get_locked_theme_for_device($device)   X-Ref
Returns the theme named defined in config.php for the given device.

param: string $device The device
return: string or null

random_bytes_emulate($length)   X-Ref
Try to generate cryptographically secure pseudo-random bytes.

Note this is achieved by fallbacking between:
- PHP 7 random_bytes().
- OpenSSL openssl_random_pseudo_bytes().
- In house random generator getting its entropy from various, hard to guess, pseudo-random sources.

param: int $length requested length in bytes
return: string binary data

Functions that are not part of a class:

add_to_log()   X-Ref


events_trigger()   X-Ref


get_core_subsystems($fullpaths = false)   X-Ref
List all core subsystems and their location

This is a list of components that are part of the core and their
language strings are defined in /lang/en/<<subsystem>>.php. If a given
plugin is not listed here and it does not have proper plugintype prefix,
then it is considered as course activity module.

The location is optionally dirroot relative path. NULL means there is no special
directory for this subsystem. If the location is set, the subsystem's
renderer.php is expected to be there.

param: bool $fullpaths false means relative paths from dirroot, use true for performance reasons
return: array of (string)name => (string|null)location

get_plugin_types($fullpaths = true)   X-Ref
Lists all plugin types.

param: bool $fullpaths false means relative paths from dirroot
return: array Array of strings - name=>location

get_plugin_list($plugintype)   X-Ref
Use when listing real plugins of one type.

param: string $plugintype type of plugin
return: array name=>fulllocation pairs of plugins of given type

get_plugin_list_with_class($plugintype, $class, $file)   X-Ref
Get a list of all the plugins of a given type that define a certain class
in a certain file. The plugin component names and class names are returned.

param: string $plugintype the type of plugin, e.g. 'mod' or 'report'.
param: string $class the part of the name of the class after the
param: string $file the name of file within the plugin that defines the class.
return: array with frankenstyle plugin names as keys (e.g. 'report_courselist', 'mod_forum')

get_plugin_directory($plugintype, $name)   X-Ref
Returns the exact absolute path to plugin directory.

param: string $plugintype type of plugin
param: string $name name of the plugin
return: string full path to plugin directory; NULL if not found

normalize_component($component)   X-Ref
Normalize the component name using the "frankenstyle" names.

param: string $component
return: array two-items list of [(string)type, (string|null)name]

get_component_directory($component)   X-Ref
Return exact absolute path to a plugin directory.

param: string $component name such as 'moodle', 'mod_forum'
return: string full path to component directory; NULL if not found

get_context_instance($contextlevel, $instance = 0, $strictness = IGNORE_MISSING)   X-Ref
Get the context instance as an object. This function will create the
context instance if it does not exist yet.

param: integer $contextlevel The context level, for example CONTEXT_COURSE, or CONTEXT_MODULE.
param: integer $instance The instance id. For $level = CONTEXT_COURSE, this would be $course->id,
param: int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
return: context The context object.

clam_log_upload()   X-Ref


clam_log_infected()   X-Ref


clam_change_log()   X-Ref


clam_replace_infected_file()   X-Ref


clam_handle_infected_file()   X-Ref


clam_scan_moodle_file()   X-Ref


password_compat_not_supported()   X-Ref


session_get_instance()   X-Ref


session_is_legacy()   X-Ref


session_kill_all()   X-Ref


session_touch()   X-Ref


session_kill()   X-Ref


session_kill_user()   X-Ref


session_set_user()   X-Ref


session_is_loggedinas()   X-Ref


session_get_realuser()   X-Ref


session_loginas()   X-Ref


js_minify()   X-Ref


css_minify_css()   X-Ref


check_gd_version()   X-Ref


update_login_count()   X-Ref


reset_login_count()   X-Ref


update_log_display_entry()   X-Ref


filter_text()   X-Ref


httpsrequired()   X-Ref


get_file_url()   X-Ref


get_course_participants()   X-Ref


is_course_participant()   X-Ref


get_recent_enrolments()   X-Ref


detect_munged_arguments()   X-Ref


unzip_file()   X-Ref


zip_files()   X-Ref


mygroupid()   X-Ref


groupmode()   X-Ref


set_current_group()   X-Ref


get_current_group()   X-Ref


groups_filter_users_by_course_module_visible()   X-Ref


groups_course_module_visible()   X-Ref


error()   X-Ref


current_theme()   X-Ref


formerr()   X-Ref


skip_main_destination()   X-Ref


print_container()   X-Ref


print_container_start()   X-Ref


print_container_end()   X-Ref


notify()   X-Ref


print_continue()   X-Ref


print_header()   X-Ref


print_header_simple()   X-Ref


print_side_block()   X-Ref


print_textarea()   X-Ref


print_arrow($direction='up', $strsort=null, $return=false)   X-Ref
Returns an image of an up or down arrow, used for column sorting. To avoid unnecessary DB accesses, please
provide this function with the language strings for sortasc and sortdesc.

param: string $direction 'up' or 'down'
param: string $strsort The language string used for the alt attribute of this image
param: bool $return Whether to print directly or return the html string
return: string|void depending on $return

choose_from_menu()   X-Ref


print_scale_menu_helpbutton()   X-Ref


print_checkbox()   X-Ref


update_module_button()   X-Ref


print_navigation()   X-Ref


build_navigation()   X-Ref


navmenu()   X-Ref


add_event()   X-Ref


update_event()   X-Ref


delete_event()   X-Ref


hide_event()   X-Ref


show_event()   X-Ref


textlib_get_instance()   X-Ref


get_generic_section_name()   X-Ref