Merge branch 'MDL-84674_trim-old-deprecations' of https://github.com/ziegenberg/moodle

This commit is contained in:
Andrew Nicols 2025-03-21 08:15:12 +08:00
commit 2c121ab509
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
78 changed files with 2 additions and 2279 deletions

View File

@ -105,13 +105,6 @@ abstract class base {
$this->log = array();
}
/**
* @deprecated since Moodle 3.7
*/
public function get_analysables() {
throw new \coding_exception('get_analysables() method has been removed and cannot be used any more.');
}
/**
* Returns the list of analysable elements available on the site.
*

View File

@ -304,15 +304,6 @@ class manager {
return self::$alltimesplittings;
}
/**
* @deprecated since Moodle 3.7 use get_time_splitting_methods_for_evaluation instead
*/
public static function get_enabled_time_splitting_methods() {
throw new coding_exception(__FUNCTION__ . '() has been removed. You can use self::get_time_splitting_methods_for_evaluation if ' .
'you want to get the default time splitting methods for evaluation, or you can use self::get_all_time_splittings if ' .
'you want to get all the time splitting methods available on this site.');
}
/**
* Returns the time-splitting methods for model evaluation.
*

View File

@ -446,13 +446,6 @@ class core_badges_renderer extends plugin_renderer_base {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
}
/**
* @deprecated since Moodle 4.0 - Use the manage_badge_action_bar tertiary navigation instead.
*/
public function print_badge_tabs() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Prints badge status box.
*

View File

@ -69,11 +69,4 @@ class block_calendar_upcoming extends block_base {
return $this->content;
}
/**
* @deprecated since 3.4
*/
public static function get_upcoming_content() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
}

View File

@ -388,16 +388,6 @@ class block_base {
return false;
}
/**
* Default behavior: save all variables as $CFG properties
* You don't need to override this if you 're satisfied with the above
*
* @deprecated since Moodle 2.9 MDL-49385 - Please use Admin Settings functionality to save block configuration.
*/
function config_save($data) {
throw new coding_exception('config_save() can not be used any more, use Admin Settings functionality to save block configuration.');
}
/**
* Which page types this block may appear on.
*

View File

@ -108,23 +108,6 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
}
}
/**
* remove all associations for the blog entries of a particular user
* @param int userid - id of user whose blog associations will be deleted
*/
function blog_remove_associations_for_user($userid) {
global $DB;
throw new coding_exception('function blog_remove_associations_for_user() is not finished');
/*
$blogentries = blog_fetch_entries(array('user' => $userid), 'lasmodified DESC');
foreach ($blogentries as $entry) {
if (blog_user_can_edit_entry($entry)) {
blog_remove_associations_for_entry($entry->id);
}
}
*/
}
/**
* remove all associations for the blog entries of a particular course
* @param int courseid - id of user whose blog associations will be deleted

View File

@ -1308,15 +1308,6 @@ class cache implements loader_interface {
return $this->nativelocking;
}
/**
* @deprecated since 2.6
* @see cache::use_static_acceleration()
*/
protected function is_using_persist_cache() {
throw new coding_exception('cache::is_using_persist_cache() can not be used anymore.' .
' Please use cache::use_static_acceleration() instead.');
}
/**
* Returns true if this cache is making use of the static acceleration array.
*
@ -1326,15 +1317,6 @@ class cache implements loader_interface {
return $this->staticacceleration;
}
/**
* @see cache::static_acceleration_has
* @deprecated since 2.6
*/
protected function is_in_persist_cache() {
throw new coding_exception('cache::is_in_persist_cache() can not be used anymore.' .
' Please use cache::static_acceleration_has() instead.');
}
/**
* Returns true if the requested key exists within the static acceleration array.
*
@ -1350,15 +1332,6 @@ class cache implements loader_interface {
return true;
}
/**
* @deprecated since 2.6
* @see cache::static_acceleration_get
*/
protected function get_from_persist_cache() {
throw new coding_exception('cache::get_from_persist_cache() can not be used anymore.' .
' Please use cache::static_acceleration_get() instead.');
}
/**
* Returns the item from the static acceleration array if it exists there.
*
@ -1401,15 +1374,6 @@ class cache implements loader_interface {
}
}
/**
* @deprecated since 2.6
* @see cache::static_acceleration_set
*/
protected function set_in_persist_cache() {
throw new coding_exception('cache::set_in_persist_cache() can not be used anymore.' .
' Please use cache::static_acceleration_set() instead.');
}
/**
* Sets a key value pair into the static acceleration array.
*
@ -1449,15 +1413,6 @@ class cache implements loader_interface {
return true;
}
/**
* @deprecated since 2.6
* @see cache::static_acceleration_delete()
*/
protected function delete_from_persist_cache() {
throw new coding_exception('cache::delete_from_persist_cache() can not be used anymore.' .
' Please use cache::static_acceleration_delete() instead.');
}
/**
* Deletes an item from the static acceleration array.
*

View File

@ -813,17 +813,6 @@ class definition {
return $requires;
}
/**
* Please call {@link definition::use_static_acceleration()} instead.
*
* @see definition::use_static_acceleration()
* @deprecated since 2.6
*/
public function should_be_persistent() {
throw new coding_exception('definition::should_be_persistent() can not be used anymore.' .
' Please use definition::use_static_acceleration() instead.');
}
/**
* Returns true if we should hold onto the data flowing through the cache.
*
@ -840,17 +829,6 @@ class definition {
return $this->staticacceleration;
}
/**
* Please call {@link definition::get_static_acceleration_size()} instead.
*
* @see definition::get_static_acceleration_size()
* @deprecated since 2.6
*/
public function get_persistent_max_size() {
throw new coding_exception('definition::get_persistent_max_size() can not be used anymore.' .
' Please use definition::get_static_acceleration_size() instead.');
}
/**
* Returns the max size for the static acceleration array.
* @return int

View File

@ -198,15 +198,6 @@ abstract class store implements store_interface {
*/
abstract public function purge();
/**
* @deprecated since 2.5
* @see store::instance_deleted()
*/
public function cleanup() {
throw new coding_exception('store::cleanup() can not be used anymore.' .
' Please use store::instance_deleted() instead.');
}
/**
* Performs any necessary operation when the store instance has been created.
*

View File

@ -49,13 +49,6 @@ class core_calendar_renderer extends plugin_renderer_base {
return html_writer::end_tag('div');
}
/**
* @deprecated since 4.0 MDL-72810.
*/
public function fake_block_threemonths() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Adds a pretent calendar block
*

View File

@ -294,13 +294,6 @@ class manager {
return false;
}
/**
* @deprecated since Moodle 4.0
*/
public static function get_available_completion_tabs() {
throw new \coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Returns an array with the available completion options (url => name) for the current course and user.
*

View File

@ -61,19 +61,6 @@ class core_course_management_renderer extends plugin_renderer_base {
);
}
/**
* @deprecated since Moodle 4.0. This is now handled/replaced with the tertiary navigation
*/
#[\core\attribute\deprecated(
replacement: 'manage_categories_action_bar',
since: '4.0',
mdl: 'MDL-73462',
final: true,
)]
public function management_heading() {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
}
/**
* Prepares the form element for the course category listing bulk actions.
*
@ -1278,19 +1265,6 @@ class core_course_management_renderer extends plugin_renderer_base {
return html_writer::span(join('', $actions), 'course-item-actions item-actions');
}
/**
* @deprecated since Moodle 4.0. This is now handled within manage_categories_action_bar
*/
#[\core\attribute\deprecated(
replacement: 'manage_categories_action_bar',
since: '4.0',
mdl: 'MDL-73462',
final: true,
)]
public function course_search_form() {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
}
/**
* Creates access hidden skip to links for the displayed sections.
*

View File

@ -29,13 +29,6 @@ require_once($CFG->dirroot.'/course/renderer.php');
*/
class core_course_bulk_activity_completion_renderer extends plugin_renderer_base {
/**
* @deprecated since Moodle 4.0
*/
public function navigation() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Render the bulk completion tab.
*

View File

@ -200,169 +200,6 @@ abstract class section_renderer extends core_course_renderer {
return $this->render($widget);
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_edit_control_menu($controls, $course, $section) {
throw new coding_exception('section_edit_control_menu() can not be used anymore. Please use ' .
'core_courseformat\\output\\local\\content\\section to render a section. In case you need to modify those controls ' .
'override core_courseformat\\output\\local\\content\\section\\controlmenu in your format plugin.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_right_content($section, $course, $onsectionpage) {
throw new coding_exception('section_right_content() can not be used anymore. Please use ' .
'core_courseformat\\output\\local\\content\\section to render a section.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_left_content($section, $course, $onsectionpage) {
throw new coding_exception('section_left_content() can not be used anymore. Please use ' .
'core_courseformat\\output\\local\\content\\section to render a section.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_header($section, $course, $onsectionpage, $sectionreturn = null) {
throw new coding_exception('section_header() can not be used any more. Please use ' .
'core_courseformat\\output\\local\\content\\section to render a section ' .
'or core_courseformat\output\\local\\content\\section\\header ' .
'to print only the header.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_footer() {
throw new coding_exception('section_footer() can not be used any more. Please use ' .
'core_courseformat\\output\\local\\content\\section to render individual sections or .' .
'core_courseformat\\output\\local\\content to render the full course');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function start_section_list() {
throw new coding_exception('start_section_list() can not be used any more. Please use ' .
'core_courseformat\\output\\local\\content\\section to render individual sections or .' .
'core_courseformat\\output\\local\\content to render the full course');
}
/**
* @deprecated since 4.0 - use core_course output components instead.y
*/
protected function end_section_list() {
throw new coding_exception('end_section_list() can not be used any more. Please use ' .
'core_courseformat\\output\\local\\content\\section to render individual sections or .' .
'core_courseformat\\output\\local\\content to render the full course');
}
/**
* Old method to print section edit controls. Do not use it!
*
* @deprecated since Moodle 3.0 MDL-48947 - Use core_courseformat\output\section_renderer::section_edit_control_items() instead
*/
protected function section_edit_controls() {
throw new coding_exception('section_edit_controls() can not be used anymore. Please use ' .
'section_edit_control_items() instead.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_edit_control_items($course, $section, $onsectionpage = false) {
throw new coding_exception('section_edit_control_items() can not be used any more. Please use or extend' .
'core_courseformat\output\\local\\content\\section\\controlmenu instead (like topics format does).');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_summary($section, $course, $mods) {
throw new coding_exception('section_summary() can not be used any more. Please use ' .
'core_courseformat\output\\local\\content\\section to render sections. If you need to modify those summary, extend ' .
'core_courseformat\output\\local\\content\\section\\summary in your format plugin.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_activity_summary($section, $course, $mods) {
throw new coding_exception('section_activity_summary() can not be used any more. Please use ' .
'core_courseformat\output\\local\\content\\section to render sections. ' .
'If you need to modify those information, extend ' .
'core_courseformat\output\\local\\content\\section\\cmsummary in your format plugin.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_availability_message($section, $canviewhidden) {
throw new coding_exception('section_availability_message() can not be used any more. Please use ' .
'core_courseformat\output\\local\\content\\section to render sections. If you need to modify this element, extend ' .
'core_courseformat\output\\local\\content\\section\\availability in your format plugin.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
public function section_availability($section) {
throw new coding_exception('section_availability() can not be used any more. Please use ' .
'core_courseformat\output\\local\\content\\section to render sections. If you need to modify this element, extend ' .
'core_courseformat\output\\local\\content\\section\\availability in your format plugin.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function course_activity_clipboard($course, $sectionno = null) {
throw new coding_exception('Non ajax course edition using course_activity_clipboard is not supported anymore.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function get_nav_links($course, $sections, $sectionno) {
throw new coding_exception('get_nav_links() can not be used any more. Please use ' .
'core_courseformat\\output\\local\\content to render a course. If you need to modify this element, extend ' .
'core_courseformat\\output\\local\\content\\sectionnavigation in your format plugin.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function stealth_section_header($sectionno) {
throw new coding_exception('stealth_section_header() can not be used any more. Please use ' .
'core_courseformat\output\\local\\content\\section to render sections.');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function stealth_section_footer() {
throw new coding_exception('stealth_section_footer() can not be used any more. Please use ' .
'core_courseformat\output\\local\\content\\section to render sections.');
}
/**
* Generate the html for a hidden section
*
@ -392,53 +229,4 @@ abstract class section_renderer extends core_course_renderer {
$o .= html_writer::end_tag('li');
return $o;
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function section_nav_selection($course, $sections, $displaysection) {
throw new coding_exception('section_nav_selection() can not be used anymore. Please use ' .
'core_courseformat\\output\\local\\content to render a course. If you need to modify this element, extend ' .
'core_courseformat\\output\\local\\content\\sectionnavigation or ' .
'core_courseformat\\output\\local\\content\\sectionselector in your format plugin.');
}
/**
* @deprecated since 4.0
*/
public function print_single_section_page($course, $sections, $mods, $modnames, $modnamesused, $displaysection) {
throw new coding_exception('Method print_single_section_page can not be used anymore. Please use' .
'core_courseformat\\output\\local\\content instead ' .
'or override render_content method to use a different template');
}
/**
* @deprecated since 4.0
*/
public function print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused) {
throw new coding_exception('Method print_multiple_section_page can not be used anymore. Please use' .
'core_courseformat\\output\\local\\content instead ' .
'or override render_content method to use a diferent template');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function change_number_sections($course, $sectionreturn = null) {
throw new coding_exception('Method change_number_sections can not be used anymore. Please use' .
'core_courseformat\\output\\local\\content\\addsection instead');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
protected function format_summary_text($section) {
throw new coding_exception('Method format_summary_text can not be used anymore. Please use' .
'core_courseformat\output\\local\\content\\section\\summary::format_summary_text instead');
}
}

View File

@ -70,13 +70,6 @@ class core_course_renderer extends plugin_renderer_base {
parent::__construct($page, $target);
}
/**
* @deprecated since 3.2
*/
protected function add_modchoosertoggle() {
throw new coding_exception('core_course_renderer::add_modchoosertoggle() can not be used anymore.');
}
/**
* Renders course info box.
*
@ -168,13 +161,6 @@ class core_course_renderer extends plugin_renderer_base {
return $this->render_from_template('core_course/modchooser', $modchooser->export_for_template($this));
}
/**
* @deprecated since 3.9
*/
public function course_modchooser() {
throw new coding_exception('course_modchooser() can not be used anymore, please use course_activitychooser() instead.');
}
/**
* Build the HTML for the module chooser javascript popup.
*
@ -232,17 +218,6 @@ class core_course_renderer extends plugin_renderer_base {
return '';
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function course_section_cm_edit_actions($actions, ?cm_info $mod = null, $displayoptions = array()) {
throw new coding_exception(
'course_section_cm_edit_actions can not be used any more. Please, use ' .
'core_courseformat\\output\\local\\content\\cm\\controlmenu instead.'
);
}
/**
* Renders HTML for the menus to add activities and resources to the current course
*
@ -297,108 +272,6 @@ class core_course_renderer extends plugin_renderer_base {
return $this->render_from_template('core/search_input', $data);
}
/**
* @deprecated since Moodle 3.11
*/
public function course_section_cm_completion() {
throw new coding_exception(__FUNCTION__ . ' is deprecated. Use the activity_completion output component instead.');
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function is_cm_conditionally_hidden(cm_info $mod) {
throw new coding_exception(
'is_cm_conditionally_hidden can not be used any more. Please, use ' .
'\core_availability\info_module::is_available_for_all instead'
);
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function course_section_cm_name(cm_info $mod, $displayoptions = array()) {
throw new coding_exception(
'course_section_cm_name can not be used any more. Please, use ' .
'core_courseformat\\output\\local\\content\\cm\\cmname class instead.'
);
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
protected function course_section_cm_classes(cm_info $mod) {
throw new coding_exception(
'course_section_cm_classes can not be used any more. Now it is part of core_courseformat\\output\\local\\content\\cm'
);
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function course_section_cm_name_title(cm_info $mod, $displayoptions = array()) {
throw new coding_exception(
'course_section_cm_name_title can not be used any more. Please, use ' .
'core_courseformat\\output\\local\\cm\\title class instead'
);
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function course_section_cm_text(cm_info $mod, $displayoptions = array()) {
throw new coding_exception(
'course_section_cm_text can not be used any more. Now it is part of core_courseformat\\output\\local\\content\\cm'
);
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function availability_info($text, $additionalclasses = '') {
throw new coding_exception(
'availability_info can not be used any more. Please, use ' .
'core_courseformat\\output\\local\\content\\section\\availability instead'
);
}
/**
* @deprecated since 4.0 - please do not use this function any more.
*/
public function course_section_cm_availability(cm_info $mod, $displayoptions = array()) {
throw new coding_exception(
'course_section_cm_availability can not be used any more. Please, use ' .
'core_courseformat\\output\\local\\content\\cm\\availability instead'
);
}
/**
* @deprecated since 4.0 - use core_course output components or course_format::course_section_updated_cm_item instead.
*/
public function course_section_cm_list_item($course, &$completioninfo, cm_info $mod, $sectionreturn, $displayoptions = []) {
throw new coding_exception(
'course_section_cm_list_item can not be used any more. Please, use renderer course_section_updated_cm_item instead'
);
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
public function course_section_cm($course, &$completioninfo, cm_info $mod, $sectionreturn, $displayoptions = []) {
throw new coding_exception(
'course_section_cm can not be used any more. Please, use core_courseformat\\output\\content\\cm output class instead'
);
}
/**
* Message displayed to the user when they try to access unavailable activity following URL
*
@ -427,17 +300,6 @@ class core_course_renderer extends plugin_renderer_base {
html_writer::div($formattedinfo, 'availabilityinfo-error');
}
/**
* @deprecated since 4.0 - use core_course output components instead.
*/
public function course_section_cm_list($course, $section, $sectionreturn = null, $displayoptions = []) {
throw new coding_exception(
'course_section_cm_list can not be used any more. Please, use ' .
'core_courseformat\\output\\local\\content\\section\\cmlist class instead'
);
}
/**
* Displays a custom list of courses with paging bar if necessary
*

View File

@ -47,13 +47,6 @@ class field_controller extends \core_customfield\field_controller {
$mform->setType('configdata[defaultvalue]', PARAM_TEXT);
}
/**
* @deprecated since Moodle 3.10 - MDL-68569 please use $field->get_options
*/
public static function get_options_array(): void {
throw new coding_exception('get_options_array() is deprecated, please use $field->get_options() instead');
}
/**
* Return configured field options
*

View File

@ -650,23 +650,6 @@ class grade_report_grader extends grade_report {
}
}
/**
* Gets html toggle
* @deprecated since Moodle 2.4 as it appears not to be used any more.
*/
public function get_toggles_html() {
throw new coding_exception('get_toggles_html() can not be used any more');
}
/**
* Prints html toggle
* @deprecated since 2.4 as it appears not to be used any more.
* @param unknown $type
*/
public function print_toggle($type) {
throw new coding_exception('print_toggle() can not be used any more');
}
/**
* Builds and returns the rows that will make up the left part of the grader report
* This consists of student names and icons, links to user reports and id numbers, as well
@ -1636,15 +1619,6 @@ class grade_report_grader extends grade_report {
return $OUTPUT->container($editicon.$editcalculationicon.$showhideicon.$lockunlockicon.$gradeanalysisicon, 'grade_icons');
}
/**
* Given a category element returns collapsing +/- icon if available
*
* @deprecated since Moodle 2.9 MDL-46662 - please do not use this function any more.
*/
protected function get_collapsing_icon($element) {
throw new coding_exception('get_collapsing_icon() can not be used any more, please use get_course_header() instead.');
}
/**
* Processes a single action against a category, grade_item or grade.
* @param string $target eid ({type}{id}, e.g. c4 for category4)

View File

@ -80,13 +80,6 @@ class db_record_lock_factory implements lock_factory {
return true;
}
/**
* @deprecated since Moodle 3.10.
*/
public function supports_recursion() {
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
}
/**
* This function generates a unique token for the lock to use.
* It is important that this token is not solely based on time as this could lead
@ -175,13 +168,6 @@ class db_record_lock_factory implements lock_factory {
return $result;
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend_lock() {
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
}
/**
* Auto release any open locks on shutdown.
* This is required, because we may be using persistent DB connections.

View File

@ -96,13 +96,6 @@ class file_lock_factory implements lock_factory {
return !$preventfilelocking || !$lockdirisdataroot;
}
/**
* @deprecated since Moodle 3.10.
*/
public function supports_recursion() {
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
}
/**
* Get some info that might be useful for debugging.
* @return boolean - string
@ -174,12 +167,4 @@ class file_lock_factory implements lock_factory {
fclose($handle);
return $result;
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend_lock() {
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
}
}

View File

@ -64,13 +64,6 @@ class installation_lock_factory implements lock_factory {
return during_initial_install();
}
/**
* @deprecated since Moodle 3.10.
*/
public function supports_recursion() {
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
}
/**
* Get some info that might be useful for debugging.
* @return boolean - string
@ -100,12 +93,4 @@ class installation_lock_factory implements lock_factory {
public function release_lock(lock $lock) {
return true;
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend_lock() {
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
}
}

View File

@ -81,13 +81,6 @@ class lock {
return $this->key;
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend() {
throw new coding_exception('The function extend() has been removed, please do not use it anymore.');
}
/**
* Release this lock
* @return bool

View File

@ -91,13 +91,6 @@ class mysql_lock_factory implements lock_factory {
return true;
}
/**
* @deprecated since Moodle 3.10.
*/
public function supports_recursion() {
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
}
/**
* Create and get a lock
* @param string $resource - The identifier for the lock. Should use frankenstyle prefix.
@ -149,13 +142,6 @@ class mysql_lock_factory implements lock_factory {
return $result;
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend_lock() {
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
}
/**
* Auto release any open locks on shutdown.
* This is required, because we may be using persistent DB connections.

View File

@ -113,13 +113,6 @@ class postgres_lock_factory implements lock_factory {
return true;
}
/**
* @deprecated since Moodle 3.10.
*/
public function supports_recursion() {
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
}
/**
* This function generates the unique index for a specific lock key using
* a sha1 prefix converted to decimal.
@ -224,13 +217,6 @@ class postgres_lock_factory implements lock_factory {
return $result;
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend_lock() {
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
}
/**
* Auto release any open locks on shutdown.
* This is required, because we may be using persistent DB connections.

View File

@ -166,13 +166,6 @@ class timing_wrapper_lock_factory implements lock_factory {
return $this->factory->supports_auto_release();
}
/**
* @deprecated since Moodle 3.10.
*/
public function supports_recursion() {
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
}
/**
* Calls parent factory to check if it is available.
*
@ -181,11 +174,4 @@ class timing_wrapper_lock_factory implements lock_factory {
public function is_available() {
return $this->factory->is_available();
}
/**
* @deprecated since Moodle 3.10.
*/
public function extend_lock() {
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
}
}

View File

@ -2135,15 +2135,6 @@ class core_renderer extends renderer_base {
return $this->heading($image . $text . $help, $level, $classnames);
}
/**
* Returns HTML to display a help icon.
*
* @deprecated since Moodle 2.0
*/
public function old_help_icon($helpidentifier, $title, $component = 'moodle', $linktext = '') {
throw new coding_exception('old_help_icon() can not be used any more, please see help_icon().');
}
/**
* Returns HTML to display a help icon.
*
@ -2486,15 +2477,6 @@ EOD;
return $html;
}
/**
* @deprecated since Moodle 3.2
*/
public function update_module_button() {
throw new coding_exception('core_renderer::update_module_button() can not be used anymore. Activity ' .
'modules should not add the edit module button, the link is already available in the Administration block. ' .
'Themes can choose to display the link in the buttons row consistently for all module types.');
}
/**
* Returns HTML to display a "Turn editing on/off" button in a form.
*
@ -2738,38 +2720,6 @@ EOD;
return $this->render_from_template($notification->get_template_name(), $notification->export_for_template($this));
}
/**
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
*/
public function notify_problem() {
throw new coding_exception('core_renderer::notify_problem() can not be used any more, ' .
'please use \core\notification::add(), or \core\output\notification as required.');
}
/**
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
*/
public function notify_success() {
throw new coding_exception('core_renderer::notify_success() can not be used any more, ' .
'please use \core\notification::add(), or \core\output\notification as required.');
}
/**
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
*/
public function notify_message() {
throw new coding_exception('core_renderer::notify_message() can not be used any more, ' .
'please use \core\notification::add(), or \core\output\notification as required.');
}
/**
* @deprecated since Moodle 3.1 MDL-30811 - please do not use this function any more.
*/
public function notify_redirect() {
throw new coding_exception('core_renderer::notify_redirect() can not be used any more, ' .
'please use \core\notification::add(), or \core\output\notification as required.');
}
/**
* Render a notification (that is, a status message about something that has
* just happened).

View File

@ -153,15 +153,6 @@ class single_select implements renderable, templatable {
$this->actions[] = $action;
}
/**
* Adds help icon.
*
* @deprecated since Moodle 2.0
*/
public function set_old_help_icon($helppage, $title, $component = 'moodle') {
throw new coding_exception('set_old_help_icon() can not be used any more, please see set_help_icon().');
}
/**
* Adds help icon.
*

View File

@ -126,15 +126,6 @@ class url_select implements renderable, templatable {
$this->disabledoptions[$urlkey] = $disabled;
}
/**
* Adds help icon.
*
* @deprecated since Moodle 2.0
*/
public function set_old_help_icon($helppage, $title, $component = 'moodle') {
throw new coding_exception('set_old_help_icon() can not be used any more, please see set_help_icon().');
}
/**
* Adds help icon.
*

View File

@ -320,20 +320,6 @@ class completion_info {
return $cm->completion;
}
/**
* @deprecated since Moodle 2.0 - Use display_help_icon instead.
*/
public function print_help_icon() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 - The 'Your progress' info isn't displayed any more.
*/
public function display_help_icon() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Get a course completion for a user
*
@ -490,13 +476,6 @@ class completion_info {
return $aggregation->method;
}
/**
* @deprecated since Moodle 2.8 MDL-46290.
*/
public function get_incomplete_criteria() {
throw new coding_exception('completion_info->get_incomplete_criteria() is removed.');
}
/**
* Clear old course completion criteria
*/

View File

@ -1,29 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* DO NOT INCLUDE THIS FILE.
*
* @package core_availability
* @copyright 2014 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @deprecated Since Moodle 2.7
*/
defined('MOODLE_INTERNAL') || die();
throw new coding_exception('condition_info,condition_info_section,condition_info_base classes can not be used any more,
please use respective classes from \core_availability namespace');

View File

@ -113,19 +113,6 @@ class mysql_sql_generator extends sql_generator {
return array("ALTER TABLE $this->prefix$tablename AUTO_INCREMENT = $value");
}
/**
* Calculate proximate row size when using InnoDB
* tables in Antelope row format.
*
* Note: the returned value is a bit higher to compensate for
* errors and changes of column data types.
*
* @deprecated since Moodle 2.9 MDL-49723 - please do not use this function any more.
*/
public function guess_antolope_row_size(array $columns) {
throw new coding_exception('guess_antolope_row_size() can not be used any more, please use guess_antelope_row_size() instead.');
}
/**
* Calculate proximate row size when using InnoDB tables in Antelope row format.
*

View File

@ -439,105 +439,6 @@ function endecrypt($pwd, $data, $case) {
return $cipher;
}
/**
* @deprecated since Moodle 4.0
*/
function question_preview_url() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function question_preview_popup_params() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function question_hash() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71573
*/
function question_make_export_url() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function question_get_export_single_question_url() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_remove_stale_questions_from_category() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function flatten_category_tree() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function add_indented_names() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_category_select_menu() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function get_categories_for_contexts() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_category_options() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_add_context_in_key() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_fix_top_names() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 2.9
*/
#[\core\attribute\deprecated('search_generate_SQL', since: '2.9', mdl: 'MDL-48939', final: true)]
function search_generate_text_SQL() {
\core\deprecation::emit_deprecation_if_present(__FUNCTION__);
}
/**
* @deprecated Since Moodle 4.5
*/

View File

@ -1291,15 +1291,6 @@ abstract class moodle_database {
return $this->debug;
}
/**
* Enable/disable detailed sql logging
*
* @deprecated since Moodle 2.9
*/
public function set_logging($state) {
throw new coding_exception('set_logging() can not be used any more.');
}
/**
* Do NOT use in code, this is for use by database_manager only!
* @param string|array $sql query or array of queries

View File

@ -2447,14 +2447,6 @@ abstract class enrol_plugin {
return NULL;
}
/**
* @deprecated since Moodle 2.8 MDL-35864 - please use can_delete_instance() instead.
*/
public function instance_deleteable($instance) {
throw new coding_exception('Function enrol_plugin::instance_deleteable() is deprecated, use
enrol_plugin::can_delete_instance() instead');
}
/**
* Is it possible to delete enrol instance via standard UI?
*

View File

@ -264,17 +264,6 @@ class stored_file {
$this->update($filerecord);
}
/**
* Function stored_file::replace_content_with() is deprecated. Please use stored_file::replace_file_with()
*
* @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
* @see stored_file::replace_file_with()
*/
public function replace_content_with(stored_file $storedfile) {
throw new coding_exception('Function stored_file::replace_content_with() can not be used any more . ' .
'Please use stored_file::replace_file_with()');
}
/**
* Replaces the fields that might have changed when file was overriden in filepicker:
* reference, contenthash, filesize, userid
@ -749,17 +738,6 @@ class stored_file {
}
/**
* Function stored_file::set_filesize() is deprecated. Please use stored_file::replace_file_with
*
* @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
* @see stored_file::replace_file_with()
*/
public function set_filesize($filesize) {
throw new coding_exception('Function stored_file::set_filesize() can not be used any more. ' .
'Please use stored_file::replace_file_with()');
}
/**
* Returns mime type of file.
*
* @return string
@ -973,18 +951,6 @@ class stored_file {
return $this->file_record->referencelastsync;
}
/**
* Function stored_file::get_referencelifetime() is deprecated as reference
* life time is no longer stored in DB or returned by repository. Each
* repository should decide by itself when to synchronise the references.
*
* @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
* @see repository::sync_reference()
*/
public function get_referencelifetime() {
throw new coding_exception('Function stored_file::get_referencelifetime() can not be used any more. ' .
'See repository::sync_reference().');
}
/**
* Returns file reference
*

View File

@ -275,13 +275,6 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element implements templatab
return (isset($this->_options['required']) && $this->_options['required']);
}
/**
* @deprecated since Moodle 2.0
*/
function setHelpButton($_helpbuttonargs, $function='_helpbutton') {
throw new coding_exception('setHelpButton() can not be used any more, please see MoodleQuickForm::addHelpButton().');
}
/**
* Returns html for help button.
*

View File

@ -62,14 +62,6 @@ class MoodleQuickForm_hidden extends HTML_QuickForm_hidden{
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
return self::__construct($elementName, $value, $attributes);
}
/**
* @deprecated since Moodle 2.0
*/
function setHelpButton($helpbuttonargs, $function='helpbutton'){
throw new coding_exception('setHelpButton() can not be used any more, please see MoodleQuickForm::addHelpButton().');
}
/**
* get html for help button
*

View File

@ -92,13 +92,6 @@ class license_manager {
return true;
}
/**
* @deprecated Since Moodle 3.9, MDL-45184.
*/
public function add() {
throw new coding_exception('license_manager::add() is deprecated. Please use license_manager::save() instead.');
}
/**
* Create a license record.
*

View File

@ -693,17 +693,6 @@ class course_modinfo {
ksort($this->sectioninfobynum);
}
/**
* This method can not be used anymore.
*
* @see course_modinfo::build_course_cache()
* @deprecated since 2.6
*/
public static function build_section_cache($courseid) {
throw new coding_exception('Function course_modinfo::build_section_cache() can not be used anymore.' .
' Please use course_modinfo::build_course_cache() whenever applicable.');
}
/**
* Builds a list of information about sections on a course to be stored in
* the course cache. (Does not include information that is already cached
@ -2635,18 +2624,6 @@ class cm_info implements IteratorAggregate {
return $this->available;
}
/**
* This method can not be used anymore.
*
* @see \core_availability\info_module::filter_user_list()
* @deprecated Since Moodle 2.8
*/
private function get_deprecated_group_members_only() {
throw new coding_exception('$cm->groupmembersonly can not be used anymore. ' .
'If used to restrict a list of enrolled users to only those who can ' .
'access the module, consider \core_availability\info_module::filter_user_list.');
}
/**
* Getter method for property $availableinfo, ensures that dynamic data is retrieved
*
@ -2708,17 +2685,6 @@ class cm_info implements IteratorAggregate {
}
}
/**
* This method has been deprecated and should not be used.
*
* @see $uservisible
* @deprecated Since Moodle 2.8
*/
public function is_user_access_restricted_by_group() {
throw new coding_exception('cm_info::is_user_access_restricted_by_group() can not be used any more.' .
' Use $cm->uservisible to decide whether the current user can access an activity.');
}
/**
* Checks whether mod/...:view capability restricts the current user's access.
*
@ -2740,19 +2706,6 @@ class cm_info implements IteratorAggregate {
return !has_capability($capability, $this->get_context(), $userid);
}
/**
* Checks whether the module's conditional access settings mean that the
* user cannot see the activity at all
*
* @deprecated since 2.7 MDL-44070
*/
public function is_user_access_restricted_by_conditional_access() {
throw new coding_exception('cm_info::is_user_access_restricted_by_conditional_access() ' .
'can not be used any more; this function is not needed (use $cm->uservisible ' .
'and $cm->availableinfo to decide whether it should be available ' .
'or appear)');
}
/**
* Calls a module function (if exists), passing in one parameter: this object.
* @param string $type Name of function e.g. if this is 'grooblezorb' and the modname is

View File

@ -1669,20 +1669,6 @@ class moodle_page {
$this->_forcelockallblocks = true;
}
/**
* @deprecated since Moodle 3.4
*/
public function https_required() {
throw new coding_exception('https_required() cannot be used anymore.');
}
/**
* @deprecated since Moodle 3.4
*/
public function verify_https_required() {
throw new coding_exception('verify_https_required() cannot be used anymore.');
}
/**
* Allows to 'serialize' the edited page information and store it in the session cache
*

View File

@ -133,34 +133,6 @@ abstract class advanced_testcase extends base_testcase {
}
}
/**
* @deprecated since Moodle 3.10 - See MDL-67673 and MDL-64600 for more info.
*/
protected function createXMLDataSet() {
throw new coding_exception(__FUNCTION__ . '() is deprecated. Please use dataset_from_files() instead.');
}
/**
* @deprecated since Moodle 3.10 - See MDL-67673 and MDL-64600 for more info.
*/
protected function createCsvDataSet() {
throw new coding_exception(__FUNCTION__ . '() is deprecated. Please use dataset_from_files() instead.');
}
/**
* @deprecated since Moodle 3.10 - See MDL-67673 and MDL-64600 for more info.
*/
protected function createArrayDataSet() {
throw new coding_exception(__FUNCTION__ . '() is deprecated. Please use dataset_from_array() instead.');
}
/**
* @deprecated since Moodle 3.10 - See MDL-67673 and MDL-64600 for more info.
*/
protected function loadDataSet() {
throw new coding_exception(__FUNCTION__ . '() is deprecated. Please use dataset->to_database() instead.');
}
/**
* Creates a new dataset from CVS/XML files.
*

View File

@ -389,15 +389,6 @@ function get_exception_info($ex): stdClass {
return $info;
}
/**
* @deprecated since Moodle 3.8 MDL-61038 - please do not use this function any more.
* @see \core\uuid::generate()
*/
function generate_uuid() {
throw new coding_exception('generate_uuid() cannot be used anymore. Please use ' .
'\core\uuid::generate() instead.');
}
/**
* Returns the Moodle Docs URL in the users language for a given 'More help' link.
*

View File

@ -44,14 +44,6 @@ use Behat\Gherkin\Node\TableNode;
*/
class behat_transformations extends behat_base {
/**
* @deprecated since Moodle 3.2
*/
public function prefixed_tablenode_transformations() {
throw new coding_exception('prefixed_tablenode_transformations() can not be used anymore. ' .
'Please use tablenode_transformations() instead.');
}
/**
* Removes escaped argument delimiters.
*

View File

@ -97,7 +97,6 @@ return new class extends phpunit_coverage_info {
'statslib.php',
'tablelib.php',
'upgradelib.php',
'uploadlib.php',
'webdavlib.php',
'weblib.php',
'xsendfilelib.php',

View File

@ -1,51 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* uploadlib.php - This class handles all aspects of fileuploading
*
* @package core
* @subpackage file
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* This class handles all aspects of fileuploading
*
* @deprecated since 2.7 - use new file pickers instead
*
* @package moodlecore
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class upload_manager {
/**
* Constructor, sets up configuration stuff so we know how to act.
*
* Note: destination not taken as parameter as some modules want to use the insertid in the path and we need to check the other stuff first.
*
* @deprecated since 2.7 - use new file pickers instead
*
*/
function __construct($inputname='', $deleteothers=false, $handlecollisions=false, $course=null, $recoverifmultiple=false, $modbytes=0, $silent=false, $allownull=false, $allownullmultiple=true) {
throw new coding_exception('upload_manager class can not be used any more, please use file picker instead');
}
}

View File

@ -138,13 +138,6 @@ final class core_media_manager {
}
}
/**
* @deprecated since Moodle 3.3. The setup is now done in ::instance() so there is no need to call this.
*/
public function setup() {
throw new coding_exception('core_media_manager::setup() can not be used any more because it is done in ::instance()');
}
/**
* Resets cached singleton instance. To be used after $CFG->media_plugins_sortorder is modified
*/

View File

@ -153,13 +153,6 @@ abstract class core_media_player {
*/
abstract public function get_rank();
/**
* @deprecated since Moodle 3.2
*/
public function is_enabled() {
throw new coding_exception('core_media_player::is_enabled() can not be used anymore.');
}
/**
* Given a list of URLs, returns a reduced array containing only those URLs
* which are supported by this player. (Empty if none.)
@ -205,13 +198,6 @@ abstract class core_media_player {
return $name;
}
/**
* @deprecated since Moodle 3.2
*/
public static function compare_by_rank() {
throw new coding_exception('core_media_player::compare_by_rank() can not be used anymore.');
}
/**
* Utility function that sets width and height to defaults if not specified
* as a parameter to the function (will be specified either if, (a) the calling

View File

@ -535,13 +535,6 @@ abstract class assign_plugin {
return false;
}
/**
* @deprecated since 2.7
*/
public function format_for_log() {
throw new coding_exception(__FUNCTION__ . ' has been deprecated, please do not use it any more');
}
/**
* The assignment has been deleted - remove the plugin specific data
*

View File

@ -1,60 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List of deprecated mod_assign functions.
*
* @package mod_assign
* @copyright 2021 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function assign_get_completion_state() {
$completionclass = \mod_assign\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function assign_print_overview() {
throw new coding_exception('assign_print_overview() can not be used any more and is obsolete.');
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function assign_get_mysubmission_details_for_print_overview() {
throw new coding_exception('assign_get_mysubmission_details_for_print_overview() can not be used any more and is obsolete.');
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function assign_get_grade_details_for_print_overview() {
throw new coding_exception('assign_get_grade_details_for_print_overview() can not be used any more and is obsolete.');
}
/**
* @deprecated since Moodle 3.8
*/
function assign_scale_used() {
throw new coding_exception('assign_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}

View File

@ -25,8 +25,6 @@
*/
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/deprecatedlib.php');
/**
* Adds an assignment instance
*

View File

@ -3722,13 +3722,6 @@ class assign {
return $result;
}
/**
* @deprecated since 2.7 - Use new events system instead.
*/
public function add_to_log() {
throw new coding_exception(__FUNCTION__ . ' has been deprecated, please do not use it any more');
}
/**
* Lazy load the page renderer and expose the renderer to plugins.
*
@ -7405,20 +7398,6 @@ class assign {
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
}
/**
* @deprecated since 2.7
*/
public function format_grade_for_log() {
throw new coding_exception(__FUNCTION__ . ' has been deprecated, please do not use it any more');
}
/**
* @deprecated since 2.7
*/
public function format_submission_for_log() {
throw new coding_exception(__FUNCTION__ . ' has been deprecated, please do not use it any more');
}
/**
* Require a valid sess key and then call copy_previous_attempt.
*

View File

@ -22,21 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.8
*/
function book_scale_used() {
throw new coding_exception('book_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* @deprecated since Moodle 4.0
*/
function book_get_nav_types() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.4.
*/

View File

@ -23,7 +23,8 @@
*/
require(__DIR__.'/../../../../config.php');
require_once(__DIR__.'/locallib.php');
require_once(__DIR__.'/lib.php');
require_once(__DIR__.'/../../locallib.php');
$id = required_param('id', PARAM_INT); // Course Module ID
$chapterid = optional_param('chapterid', 0, PARAM_INT); // Chapter ID

View File

@ -1,36 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Book print lib
*
* @package booktool_print
* @copyright 2011 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
require_once(__DIR__.'/lib.php');
require_once($CFG->dirroot.'/mod/book/locallib.php');
/**
* @deprecated since Moodle 3.7
*/
function booktool_print_get_toc() {
throw new coding_exception(__FUNCTION__ . ' can not be used any more. Please use booktool_print renderer
function render_print_book_toc().');
}

View File

@ -1,31 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List of deprecated mod_choice functions.
*
* @package mod_choice
* @copyright 2021 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function choice_get_completion_state() {
$completionclass = \mod_choice\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}

View File

@ -62,8 +62,6 @@ global $CHOICE_DISPLAY;
$CHOICE_DISPLAY = array (CHOICE_DISPLAY_HORIZONTAL => get_string('displayhorizontal', 'choice'),
CHOICE_DISPLAY_VERTICAL => get_string('displayvertical','choice'));
require_once(__DIR__ . '/deprecatedlib.php');
/// Standard functions /////////////////////////////////////////////////////////
/**
@ -893,14 +891,6 @@ function choice_page_type_list($pagetype, $parentcontext, $currentcontext) {
return $module_pagetype;
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function choice_print_overview() {
throw new coding_exception('choice_print_overview() can not be used any more and is obsolete.');
}
/**
* Get responses of a given user on a given choice.
*

View File

@ -22,14 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function data_get_completion_state() {
$completionclass = \mod_data\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}
/**
* @deprecated since Moodle 4.1 MDL-75146 - please do not use this function any more.
*/

View File

@ -22,14 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function feedback_get_completion_state() {
$completionclass = \mod_feedback\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}
/**
* Returns true if the current role is faked by switching role feature
*

View File

@ -563,14 +563,6 @@ function feedback_cron () {
return true;
}
/**
* @deprecated since Moodle 3.8
*/
function feedback_scale_used() {
throw new coding_exception('feedback_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* Checks if scale is being used by any instance of feedback
*
@ -919,13 +911,6 @@ function feedback_delete_course_module($id) {
//functions to handle capabilities
////////////////////////////////////////////////
/**
* @deprecated since 3.1
*/
function feedback_get_context() {
throw new coding_exception('feedback_get_context() can not be used anymore.');
}
/**
* count users which have not completed the feedback
*
@ -1549,13 +1534,6 @@ function feedback_get_depend_candidates_for_item($feedback, $item) {
return $dependitems;
}
/**
* @deprecated since 3.1
*/
function feedback_create_item() {
throw new coding_exception('feedback_create_item() can not be used anymore.');
}
/**
* save the changes of a given item.
*
@ -1819,30 +1797,6 @@ function feedback_move_item($moveitem, $pos) {
return false;
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_print_item_preview() {
throw new coding_exception('feedback_print_item_preview() can not be used anymore. '
. 'Items must implement complete_form_element().');
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_print_item_complete() {
throw new coding_exception('feedback_print_item_complete() can not be used anymore. '
. 'Items must implement complete_form_element().');
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_print_item_show_value() {
throw new coding_exception('feedback_print_item_show_value() can not be used anymore. '
. 'Items must implement complete_form_element().');
}
/**
* if the user completes a feedback and there is a pagebreak so the values are saved temporary.
* the values are not saved permanently until the user click on save button
@ -1947,14 +1901,6 @@ function feedback_save_tmp_values($feedbackcompletedtmp, ?stdClass $feedbackcomp
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_delete_completedtmp() {
throw new coding_exception('feedback_delete_completedtmp() can not be used anymore.');
}
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
@ -2027,41 +1973,12 @@ function feedback_get_last_break_position($feedbackid) {
return $allbreaks[count($allbreaks) - 1];
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_get_page_to_continue() {
throw new coding_exception('feedback_get_page_to_continue() can not be used anymore.');
}
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
//functions to handle the values
////////////////////////////////////////////////
/**
* @deprecated since Moodle 3.1
*/
function feedback_clean_input_value() {
throw new coding_exception('feedback_clean_input_value() can not be used anymore. '
. 'Items must implement complete_form_element().');
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_save_values() {
throw new coding_exception('feedback_save_values() can not be used anymore.');
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_save_guest_values() {
throw new coding_exception('feedback_save_guest_values() can not be used anymore.');
}
/**
* get the value from the given item related to the given completed.
@ -2105,28 +2022,6 @@ function feedback_compare_item_value($completedid, $item, $dependvalue, $tmp = f
return $itemobj->compare_value($item, $dbvalue, $dependvalue); //true or false
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_check_values() {
throw new coding_exception('feedback_check_values() can not be used anymore. '
. 'Items must implement complete_form_element().');
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_create_values() {
throw new coding_exception('feedback_create_values() can not be used anymore.');
}
/**
* @deprecated since Moodle 3.1
*/
function feedback_update_values() {
throw new coding_exception('feedback_update_values() can not be used anymore.');
}
/**
* get the values of an item depending on the given groupid.
* if the feedback is anonymous so the values are shuffled
@ -2221,14 +2116,6 @@ function feedback_is_already_submitted($feedbackid, $courseid = false) {
return $DB->record_exists('feedback_completed', $params);
}
/**
* @deprecated since Moodle 3.1. Use feedback_get_current_completed_tmp() or feedback_get_last_completed.
*/
function feedback_get_current_completed() {
throw new coding_exception('feedback_get_current_completed() can not be used anymore. Please ' .
'use either feedback_get_current_completed_tmp() or feedback_get_last_completed()');
}
/**
* get the completeds depending on the given groupid.
*
@ -2396,20 +2283,6 @@ function feedback_delete_completed($completed, $feedback = null, $cm = null, $co
//functions to handle sitecourse mapping
////////////////////////////////////////////////
/**
* @deprecated since 3.1
*/
function feedback_is_course_in_sitecourse_map() {
throw new coding_exception('feedback_is_course_in_sitecourse_map() can not be used anymore.');
}
/**
* @deprecated since 3.1
*/
function feedback_is_feedback_in_sitecourse_map() {
throw new coding_exception('feedback_is_feedback_in_sitecourse_map() can not be used anymore.');
}
/**
* gets the feedbacks from table feedback_sitecourse_map.
* this is used to show the global feedbacks on the feedback block
@ -2512,25 +2385,12 @@ function feedback_update_sitecourse_map($feedback, $courses) {
// TODO MDL-53574 add events.
}
/**
* @deprecated since 3.1
*/
function feedback_clean_up_sitecourse_map() {
throw new coding_exception('feedback_clean_up_sitecourse_map() can not be used anymore.');
}
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
//not relatable functions
////////////////////////////////////////////////
/**
* @deprecated since 3.1
*/
function feedback_print_numeric_option_list() {
throw new coding_exception('feedback_print_numeric_option_list() can not be used anymore.');
}
/**
* sends an email to the teachers of the course where the given feedback is placed.

View File

@ -22,413 +22,6 @@
defined('MOODLE_INTERNAL') || die();
// Deprecated a very long time ago.
/**
* @deprecated since Moodle 1.1 - please do not use this function any more.
*/
function forum_count_unrated_posts() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Since Moodle 1.5.
/**
* @deprecated since Moodle 1.5 - please do not use this function any more.
*/
function forum_tp_count_discussion_read_records() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 1.5 - please do not use this function any more.
*/
function forum_get_user_discussions() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Since Moodle 1.6.
/**
* @deprecated since Moodle 1.6 - please do not use this function any more.
*/
function forum_tp_count_forum_posts() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 1.6 - please do not use this function any more.
*/
function forum_tp_count_forum_read_records() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Since Moodle 1.7.
/**
* @deprecated since Moodle 1.7 - please do not use this function any more.
*/
function forum_get_open_modes() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Since Moodle 1.9.
/**
* @deprecated since Moodle 1.9 MDL-13303 - please do not use this function any more.
*/
function forum_get_child_posts() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 1.9 MDL-13303 - please do not use this function any more.
*/
function forum_get_discussion_posts() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Since Moodle 2.0.
/**
* @deprecated since Moodle 2.0 MDL-21657 - please do not use this function any more.
*/
function forum_get_ratings() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 2.0 MDL-14632 - please do not use this function any more.
*/
function forum_get_tracking_link() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 2.0 MDL-14113 - please do not use this function any more.
*/
function forum_tp_count_discussion_unread_posts() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 2.0 MDL-23479 - please do not use this function any more.
*/
function forum_convert_to_roles() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 2.0 MDL-14113 - please do not use this function any more.
*/
function forum_tp_get_read_records() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 2.0 MDL-14113 - please do not use this function any more.
*/
function forum_tp_get_discussion_read_records() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Deprecated in 2.3.
/**
* @deprecated since Moodle 2.3 MDL-33166 - please do not use this function any more.
*/
function forum_user_enrolled() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Deprecated in 2.4.
/**
* @deprecated since Moodle 2.4 use forum_user_can_see_post() instead
*/
function forum_user_can_view_post() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
// Deprecated in 2.6.
/**
* FORUM_TRACKING_ON - deprecated alias for FORUM_TRACKING_FORCED.
* @deprecated since 2.6
*/
define('FORUM_TRACKING_ON', 2);
/**
* @deprecated since Moodle 2.6
* @see shorten_text()
*/
function forum_shorten_post($message) {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. '
. 'Please use shorten_text($message, $CFG->forum_shortpost) instead.');
}
// Deprecated in 2.8.
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::is_subscribed() instead
*/
function forum_is_subscribed() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more.');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::subscribe_user() instead
*/
function forum_subscribe() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::subscribe_user() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::unsubscribe_user() instead
*/
function forum_unsubscribe() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::unsubscribe_user() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::fetch_subscribed_users() instead
*/
function forum_subscribed_users() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::fetch_subscribed_users() instead');
}
/**
* Determine whether the forum is force subscribed.
*
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::is_forcesubscribed() instead
*/
function forum_is_forcesubscribed($forum) {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::is_forcesubscribed() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::set_subscription_mode() instead
*/
function forum_forcesubscribe($forumid, $value = 1) {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::set_subscription_mode() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::get_subscription_mode() instead
*/
function forum_get_forcesubscribed($forum) {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::set_subscription_mode() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::is_subscribed in combination wtih
* \mod_forum\subscriptions::fill_subscription_cache_for_course instead.
*/
function forum_get_subscribed_forums() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::is_subscribed(), and '
. \mod_forum\subscriptions::class . '::fill_subscription_cache_for_course() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::get_unsubscribable_forums() instead
*/
function forum_get_optional_subscribed_forums() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::get_unsubscribable_forums() instead');
}
/**
* @deprecated since Moodle 2.8 use \mod_forum\subscriptions::get_potential_subscribers() instead
*/
function forum_get_potential_subscribers() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. \mod_forum\subscriptions::class . '::get_potential_subscribers() instead');
}
/**
* @deprecated since Moodle 3.0 use \mod_forum\output\forum_post_email instead
*/
function forum_make_mail_text() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. '\mod_forum\output\forum_post_email');
}
/**
* @deprecated since Moodle 3.0 use \mod_forum\output\forum_post_email instead
*/
function forum_make_mail_html() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. '\mod_forum\output\forum_post_email');
}
/**
* @deprecated since Moodle 3.0 use \mod_forum\output\forum_post_email instead
*/
function forum_make_mail_post() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use '
. '\mod_forum\output\forum_post_email');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_cron_minimise_user_record() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. It has not been replaced.');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_cron() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. Please use the forum tasks');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_discussion() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\discussion instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_post_nesting_cache() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_should_start_post_nesting() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_should_end_post_nesting() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_post_start() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_post_end() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_post() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_posts_flat() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_posts_threaded() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_posts_nested() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ' .
'please use \mod_forum\local\renderers\posts instead');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_print_latest_discussions() {
throw new coding_exception(__FUNCTION__ . '() can not be used any more. ');
}
/**
* @deprecated since Moodle 3.7
*/
function forum_count_replies() {
throw new coding_exception(__FUNCTION__ . ' has been removed. Please use get_reply_count_for_post_id_in_discussion_id in
the post vault.');
}
/**
* @deprecated since Moodle 3.8
*/
function forum_scale_used() {
throw new coding_exception('forum_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* @deprecated since Moodle 3.8
*/
function forum_get_user_grades() {
throw new \coding_exception('forum_get_user_grades() is deprecated and no longer used. ' .
'Please use rating_manager::get_user_grades() instead.');
}
/**
* @deprecated since Moodle 3.11
*/
function forum_get_completion_state() {
$completionclass = \mod_forum\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}
/**
* @deprecated since Moodle 4.0
*/
#[\core\attribute\deprecated(
since: '4.0',
reason: 'The \'Manage subscribers\' button has been replaced with tertiary navigation.',
mdl: 'MDL-73415',
final: true
)]
function forum_update_subscriptions_button(): void {
\core\deprecation::emit_deprecation_if_present(__FUNCTION__);
}
/**
* This function prints the overview of a discussion in the forum listing.

View File

@ -527,13 +527,6 @@ function forum_user_complete($course, $user, $mod, $forum) {
}
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function forum_filter_user_groups_discussions() {
throw new coding_exception('forum_filter_user_groups_discussions() can not be used any more and is obsolete.');
}
/**
* Returns whether the discussion group is visible by the current user or not.
*
@ -560,13 +553,6 @@ function forum_is_user_group_discussion(cm_info $cm, $discussiongroupid) {
return false;
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function forum_print_overview() {
throw new coding_exception('forum_print_overview() can not be used any more and is obsolete.');
}
/**
* Given a course and a date, prints a summary of all the new
* messages posted in the course since that date

View File

@ -1,31 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List of deprecated mod_glossary functions.
*
* @package mod_glossary
* @copyright 2021 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function glossary_get_completion_state() {
$completionclass = \mod_glossary\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}

View File

@ -49,8 +49,6 @@ define('GLOSSARY_CONTINUOUS', 'continuous');
define('GLOSSARY_DICTIONARY', 'dictionary');
define('GLOSSARY_FULLWITHOUTAUTHOR', 'fullwithoutauthor');
require_once(__DIR__ . '/deprecatedlib.php');
/// STANDARD FUNCTIONS ///////////////////////////////////////////////////////////
/**
* @global object
@ -862,14 +860,6 @@ function glossary_grade_item_delete($glossary) {
return grade_update('mod/glossary', $glossary->course, 'mod', 'glossary', $glossary->id, 0, NULL, array('deleted'=>1));
}
/**
* @deprecated since Moodle 3.8
*/
function glossary_scale_used() {
throw new coding_exception('glossary_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* Checks if scale is being used by any instance of glossary
*

View File

@ -1,38 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List of deprecated mod_lesson functions.
*
* @package mod_lesson
* @copyright 2021 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function lesson_get_completion_state() {
$completionclass = \mod_lesson\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}
/**
* @deprecated since Moodle 4.0
*/
function lesson_add_header_buttons() {
throw new coding_exception(__FUNCTION__ . '() has been removed');
}

View File

@ -29,7 +29,6 @@ defined('MOODLE_INTERNAL') || die();
define('LESSON_EVENT_TYPE_OPEN', 'open');
define('LESSON_EVENT_TYPE_CLOSE', 'close');
require_once(__DIR__ . '/deprecatedlib.php');
/* Do not include any libraries here! */
/**
@ -547,13 +546,6 @@ function lesson_user_complete($course, $user, $mod, $lesson) {
return true;
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function lesson_print_overview() {
throw new coding_exception('lesson_print_overview() can not be used any more and is obsolete.');
}
/**
* Function to be run periodically according to the moodle cron
* This function searches for things that need to be done, such

View File

@ -22,15 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since 3.9
**/
function lti_get_shortcuts() {
throw new coding_exception(
'The callback get_shortcuts() is now removed. Please use get_course_content_items and get_all_content_items instead.'
);
}
/**
* @deprecated since Moodle 4.3
*/

View File

@ -463,14 +463,6 @@ function lti_grades($basicltiid) {
return null;
}
/**
* @deprecated since Moodle 3.8
*/
function lti_scale_used() {
throw new coding_exception('lti_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* Checks if scale is being used by any instance of basiclti.
* This function was added in 1.9

View File

@ -26,21 +26,6 @@ use mod_quiz\access_manager;
use mod_quiz\quiz_settings;
use mod_quiz\task\update_overdue_attempts;
/**
* @deprecated since Moodle 3.11
*/
function quiz_get_completion_state() {
$completionclass = \mod_quiz\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}
/**
* @deprecated since Moodle 4.0
*/
function quiz_retrieve_tags_for_slot_ids() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Verify that the question exists, and the user has permission to use it.
*

View File

@ -1,31 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List of deprecated mod_scorm functions.
*
* @package mod_scorm
* @copyright 2021 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 3.11
*/
function scorm_get_completion_state() {
$completionclass = \mod_scorm\completion\custom_completion::class;
throw new coding_exception(__FUNCTION__ . "() has been removed, please use the '{$completionclass}' class instead");
}

View File

@ -54,8 +54,6 @@ define('SCORM_DISPLAY_ATTEMPTSTATUS_ENTRY', 3);
define('SCORM_EVENT_TYPE_OPEN', 'open');
define('SCORM_EVENT_TYPE_CLOSE', 'close');
require_once(__DIR__ . '/deprecatedlib.php');
/**
* Return an array of status options
*
@ -1104,13 +1102,6 @@ function scorm_debug_log_remove($type, $scoid) {
return @unlink($logfile);
}
/**
* @deprecated since Moodle 3.3, when the block_course_overview block was removed.
*/
function scorm_print_overview() {
throw new coding_exception('scorm_print_overview() can not be used any more and is obsolete.');
}
/**
* Return a list of page types
* @param string $pagetype current page type

View File

@ -383,14 +383,6 @@ function wiki_grades($wikiid) {
return null;
}
/**
* @deprecated since Moodle 3.8
*/
function wiki_scale_used() {
throw new coding_exception('wiki_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* Checks if scale is being used by any instance of wiki.
* This function was added in 1.9

View File

@ -1059,14 +1059,6 @@ function workshop_print_recent_mod_activity($activity, $courseid, $detail, $modn
echo html_writer::empty_tag('br', array('style'=>'clear:both'));
}
/**
* @deprecated since Moodle 3.8
*/
function workshop_scale_used() {
throw new coding_exception('workshop_scale_used() can not be used anymore. Plugins can implement ' .
'<modname>_scale_used_anywhere, all implementations of <modname>_scale_used are now ignored');
}
/**
* Is a given scale used by any instance of workshop?
*

View File

@ -877,13 +877,6 @@ class view {
return $this->contexts->lowest();
}
/**
* @deprecated since Moodle 4.0
*/
public function preview_question_url() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Get fields from the pagevars array.
*
@ -1548,20 +1541,6 @@ class view {
}
}
/**
* @deprecated since Moodle 4.0
*/
public function process_actions(): void {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
public function process_actions_needing_ui() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Add another search control to this view.
* @param condition $searchcondition the condition to add.

View File

@ -1,93 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* List of deprecated question functions.
*
* @package core_question
* @copyright 2024 Mathew May <mathew.solutions>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_is_only_child_of_top_category_in_context() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_is_top_category() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0 MDL-71585
*/
function question_can_delete_cat() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function print_choose_qtype_to_add_form() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function create_new_question_button() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function core_question_output_fragment_tags_form() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function question_preview_question_pluginfile() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function question_preview_action_url() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function question_preview_form_url() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
function restart_preview() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}

View File

@ -38,13 +38,6 @@ defined('MOODLE_INTERNAL') || die();
*/
class core_question_renderer extends plugin_renderer_base {
/**
* @deprecated since Moodle 4.0
*/
public function question_preview_link() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Generate the display of a question in a particular state, and with certain
* display options. Normally you do not call this method directly. Intsead

View File

@ -91,13 +91,6 @@ class core_question_bank_renderer extends plugin_renderer_base {
return $this->render_from_template('core_question/column_sort', $sortdata);
}
/**
* @deprecated since Moodle 4.0
*/
public function render_qbank_chooser() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* Render category condition.
*
@ -182,33 +175,4 @@ class core_question_bank_renderer extends plugin_renderer_base {
public function render_bulk_actions_ui($displaydata) {
return $this->render_from_template('core_question/bulk_actions_ui', $displaydata);
}
/**
* @deprecated since Moodle 4.0
*/
public function qbank_chooser() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
protected function qbank_chooser_types() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
protected function qbank_chooser_qtype() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
/**
* @deprecated since Moodle 4.0
*/
protected function qbank_chooser_title() {
throw new coding_exception(__FUNCTION__ . '() has been removed.');
}
}

View File

@ -96,15 +96,6 @@ class report_log_table_log extends table_sql {
$this->pageable(true);
}
/**
* Generate the course column.
*
* @deprecated since Moodle 2.9 MDL-48595 - please do not use this function any more.
*/
public function col_course($event) {
throw new coding_exception('col_course() can not be used any more, there is no such column.');
}
/**
* Gets the user full name.
*
@ -531,16 +522,4 @@ class report_log_table_log extends table_sql {
$this->initialbars($total > $pagesize);
}
}
/**
* Helper function to create list of course shortname and user fullname shown in log report.
*
* This will update $this->userfullnames and $this->courseshortnames array with userfullname and courseshortname (with link),
* which will be used to render logs in table.
*
* @deprecated since Moodle 2.9 MDL-48595 - please do not use this function any more.
*/
public function update_users_and_courses_used() {
throw new coding_exception('update_users_and_courses_used() can not be used any more.');
}
}

View File

@ -2676,25 +2676,6 @@ abstract class repository implements cacheable_object {
}
}
/**
* Function repository::reset_caches() is deprecated, cache is handled by MUC now.
* @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
*/
public static function reset_caches() {
throw new coding_exception('Function repository::reset_caches() can not be used any more, cache is handled by MUC now.');
}
/**
* Function repository::sync_external_file() is deprecated. Use repository::sync_reference instead
*
* @deprecated since Moodle 2.6 MDL-42016 - please do not use this function any more.
* @see repository::sync_reference()
*/
public static function sync_external_file($file, $resetsynchistory = false) {
throw new coding_exception('Function repository::sync_external_file() can not be used any more. ' .
'Use repository::sync_reference instead.');
}
/**
* Performs synchronisation of an external file if the previous one has expired.
*

View File

@ -186,15 +186,6 @@ function useredit_update_user_preference($usernew) {
}
}
/**
* @deprecated since Moodle 3.2
* @see core_user::update_picture()
*/
function useredit_update_picture() {
throw new coding_exception('useredit_update_picture() can not be used anymore. Please use ' .
'core_user::update_picture() instead.');
}
/**
* Updates the user email bounce + send counts when the user is edited.
*