Merge branch 'MDL-87425-main' of https://github.com/meirzamoodle/moodle
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
issueNumber: MDL-87425
|
||||
notes:
|
||||
core:
|
||||
- message: >-
|
||||
The `MOD_PURPOSE_INTERFACE` constant has been removed from
|
||||
`public/lib/moodlelib.php`.
|
||||
type: removed
|
||||
@@ -0,0 +1,7 @@
|
||||
issueNumber: MDL-87425
|
||||
notes:
|
||||
core:
|
||||
- message: >-
|
||||
The `public/lib/classes/navigation/flat_navigation_node.php` file has
|
||||
been removed.
|
||||
type: removed
|
||||
@@ -0,0 +1,5 @@
|
||||
issueNumber: MDL-87425
|
||||
notes:
|
||||
core:
|
||||
- message: The `public/question/qengine.js` file has been removed.
|
||||
type: removed
|
||||
@@ -0,0 +1,245 @@
|
||||
issueNumber: MDL-87425
|
||||
notes:
|
||||
tool_mfa:
|
||||
- message: The `\tool_mfa\output\renderer::setup_factor()` has been removed from `public/admin/tool/mfa/classes/output/renderer.php`.
|
||||
type: removed
|
||||
core_availability:
|
||||
- message: >-
|
||||
- The `public/availability/amd/src/availability_more.js` file has been removed.
|
||||
- The `public/availability/renderer.php` file has been removed.
|
||||
type: removed
|
||||
core_course:
|
||||
- message: >-
|
||||
- The `\core_course_bulk_activity_completion_renderer::edit_default_completion()` has been removed from `public/course/classes/output/bulk_activity_completion_renderer.php`.
|
||||
- The `\core_course\reportbuilder\local\formatters\enrolment::enrolment_name()` has been removed from `public/course/classes/reportbuilder/local/formatters/enrolment.php`.
|
||||
type: removed
|
||||
core_courseformat:
|
||||
- message: >-
|
||||
- The `\core_courseformat\output\local\content\section\availability::availability_info()` has been removed from `public/course/format/classes/output/local/content/section/availability.php`.
|
||||
- The `\core_courseformat\base::get_section_number()` has been removed from `public/course/format/classes/base.php`.
|
||||
- The `\core_courseformat\stateactions::section_move()` has been removed from `public/course/format/classes/stateactions.php`.
|
||||
- The `\core_courseformat\output\section_renderer\core_course_renderer::render_activity_information()` has been removed from `public/course/renderer.php`.
|
||||
type: removed
|
||||
gradereport_grader:
|
||||
- message: >-
|
||||
- The `\behat_gradereport_grader::get_grade_item_id()` has been removed from `public/grade/report/grader/tests/behat/behat_gradereport_grader.php`.
|
||||
- The following methods have been removed from `public/grade/report/grader/lib.php`:
|
||||
- `\grade_report_grader::get_left_icons_row()`
|
||||
- `\grade_report_grader::get_right_icons_row()`
|
||||
- `\grade_report_grader::get_right_avg_row()`
|
||||
- `\grade_report_grader::get_icons()`
|
||||
type: removed
|
||||
core_grades:
|
||||
- message: >-
|
||||
- The `\grade_report::get_lang_string()` has been removed from `public/grade/report/lib.php`.
|
||||
- The following methods have been removed from `public/grade/tests/behat/behat_grade.php`:
|
||||
- `\behat_grade::select_in_gradebook_tabs()`
|
||||
- `\behat_grade::select_in_gradebook_navigation_selector()`
|
||||
- The following methods have been removed from `public/grade/lib.php`:
|
||||
- `\grade_structure::get_element_icon()`
|
||||
- `\grade_structure::get_element_type_string()`
|
||||
- `\grade_structure::get_element_header()`
|
||||
- `\grade_structure::get_activity_link()`
|
||||
- `\grade_structure::get_grade_analysis_icon()`
|
||||
- `\grade_structure::get_reset_icon()`
|
||||
- `\grade_structure::get_edit_icon()`
|
||||
- `\grade_structure::get_hiding_icon()`
|
||||
- `\grade_structure::get_locking_icon()`
|
||||
- `\grade_structure::get_calculation_icon()`
|
||||
- `\grade_helper::get_lang_string()`
|
||||
type: removed
|
||||
gradereport_singleview:
|
||||
- message: >-
|
||||
- The `public/grade/report/singleview/classes/local/screen/select.php` file has been removed.
|
||||
type: removed
|
||||
core:
|
||||
- message: >-
|
||||
- The `public/lib/amd/src/addblockmodal.js` file has been removed.
|
||||
- The `request()` has been removed from `public/lib/amd/src/pending.js`.
|
||||
- The `triggerSelector()` has been removed from `public/lib/amd/src/comboboxsearch/search_combobox.js`.
|
||||
- The `public/lib/classes/navigation/flat_navigation.php` file has been removed.
|
||||
- The following methods have been removed from `public/lib/classes/output/action_menu.php`:
|
||||
- `\core\output\action_menu::set_alignment()`
|
||||
- `\core\output\action_menu::set_constraint()`
|
||||
- The following methods have been removed from `public/lib/classes/output/core_renderer.php`:
|
||||
- `\core\output\core_renderer::activity_information()`
|
||||
- `\core\output\core_renderer::htmllize_file_tree()`
|
||||
- The `\core\output\action_menu\link::instance` property has been removed from `public/lib/classes/output/action_menu/link.php`.
|
||||
- The `\core\output\renderer_base::should_display_main_logo()` has been removed from `public/lib/classes/output/renderer_base.php`.
|
||||
- The `\core\task\manager::ensure_adhoc_task_qos()` has been removed from `public/lib/classes/task/manager.php`.
|
||||
- The following methods have been removed from `public/lib/classes/task/task_base.php`:
|
||||
- `\core\task\task_base::set_blocking()`
|
||||
- `\core\task\task_base::is_blocking()`
|
||||
- The `\core\moodlenet\activity_sender::share_activity()` has been removed from `public/lib/classes/moodlenet/activity_sender.php`.
|
||||
- The `\core\encryption::is_sodium_installed()` has been removed from `public/lib/classes/encryption.php`.
|
||||
- The `\core\hook\manager::is_deprecated_plugin_callback()` has been removed from `public/lib/classes/hook/manager.php`.
|
||||
- The `\core\report_helper::save_selected_report()` has been removed from `public/lib/classes/report_helper.php`.
|
||||
- The `\core_text::reset_caches()` has been removed from `public/lib/classes/text.php`.
|
||||
- The following methods have been removed from `public/lib/classes/useragent.php`:
|
||||
- `\core_useragent::get_device_type_list()`
|
||||
- `\core_useragent::get_device_type_theme()`
|
||||
- `\core_useragent::get_device_type_cfg_var_name()`
|
||||
- The `M.util.set_user_preference()` has been removed from `public/lib/javascript-static.js`.
|
||||
type: removed
|
||||
core_enrol:
|
||||
- message: >-
|
||||
- The `\enrol_plugin::update_communication()` has been removed from `public/lib/enrollib.php`.
|
||||
type: removed
|
||||
mod_assign:
|
||||
- message: >-
|
||||
- The `ASSIGN_ATTEMPT_REOPEN_METHOD_NONE` constant has been removed from the `public/mod/assign/locallib.php`.
|
||||
- The `public/mod/assign/renderer.php` file has been removed.
|
||||
type: removed
|
||||
mod_data:
|
||||
- message: >-
|
||||
- The following functions have been removed from `public/mod/data/deprecatedlib.php`:
|
||||
- `data_print_template()`
|
||||
- `data_preset_name()`
|
||||
- `data_get_available_presets()`
|
||||
- `data_get_available_site_presets()`
|
||||
- `data_delete_site_preset()`
|
||||
- `data_presets_save()`
|
||||
- `data_presets_generate_xml()`
|
||||
- `data_presets_export()`
|
||||
- `data_user_can_delete_preset()`
|
||||
- `data_view()`
|
||||
- `is_directory_a_preset()`
|
||||
- The `\mod_data_renderer::import_setting_mappings()` has been removed from `public/mod/data/renderer.php`.
|
||||
type: removed
|
||||
mod_feedback:
|
||||
- message: >-
|
||||
- The following files have been removed:
|
||||
- `public/mod/feedback/edit_form.php`.
|
||||
- `public/mod/feedback/use_templ_form.php`.
|
||||
type: removed
|
||||
mod_quiz:
|
||||
- message: >-
|
||||
- The following functions have been removed from `public/mod/quiz/deprecatedlib.php`:
|
||||
- `quiz_has_question_use()`
|
||||
- `quiz_update_sumgrades()`
|
||||
- `quiz_update_all_attempt_sumgrades()`
|
||||
- `quiz_update_all_final_grades()`
|
||||
- `quiz_set_grade()`
|
||||
- `quiz_save_best_grade()`
|
||||
- `quiz_calculate_best_grade()`
|
||||
- `quiz_calculate_best_attempt()`
|
||||
- `quiz_delete_override()`
|
||||
- `quiz_delete_all_overrides()`
|
||||
- `quiz_add_random_questions()`
|
||||
- The following functions have been removed from `public/mod/quiz/classes/output/renderer.php`:
|
||||
- `\mod_quiz\output\renderer::no_questions_message()`
|
||||
- `\mod_quiz\output\renderer::render_mod_quiz_links_to_other_attempts()`
|
||||
- `\mod_quiz\output\renderer::render_quiz_nav_question_button()`
|
||||
- `\mod_quiz\output\renderer::render_quiz_nav_section_heading()`
|
||||
- The following functions have been removed from `public/mod/quiz/classes/local/structure/slot_random.php`:
|
||||
- `\mod_quiz\local\structure\slot_random::set_tags()`
|
||||
- `\mod_quiz\local\structure\slot_random::set_tags_by_id()`
|
||||
- The `\mod_quiz\structure::is_display_number_customised()` has been removed from `public/mod/quiz/classes/structure.php`.
|
||||
type: removed
|
||||
mod_book:
|
||||
- message: The `book_get_nav_classes()` has been removed from `public/mod/book/deprecatedlib.php`.
|
||||
type: removed
|
||||
mod_forum:
|
||||
- message: The `forum_print_discussion_header()` has been removed from `public/mod/forum/deprecatedlib.php`.
|
||||
type: removed
|
||||
mod_imscp:
|
||||
- message: The `imscp_libxml_disable_entity_loader()` has been removed from `public/mod/imscp/deprecatedlib.php`.
|
||||
type: removed
|
||||
mod_lti:
|
||||
- message: The `lti_libxml_disable_entity_loader()` has been removed from `public/mod/lti/deprecatedlib.php`.
|
||||
type: removed
|
||||
mod_folder:
|
||||
- message: >-
|
||||
- The `\mod_folder_renderer::htmllize_tree()` has been removed from `public/mod/folder/renderer.php`.
|
||||
type: removed
|
||||
mod_wiki:
|
||||
- message: The `\mod_wiki_renderer::wiki_info()` has been removed from `public/mod/wiki/renderer.php`.
|
||||
type: removed
|
||||
qbank_managecategories:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/question/bank/managecategories/classes/category_condition.php`:
|
||||
- `\qbank_managecategories\category_condition::display_options()`
|
||||
- `\qbank_managecategories\category_condition::display_options_adv()`
|
||||
- `\qbank_managecategories\category_condition::display_category_form()`
|
||||
- `\qbank_managecategories\category_condition::print_choose_category_message()`
|
||||
- `\qbank_managecategories\category_condition::get_current_category()`
|
||||
- `\qbank_managecategories\category_condition::print_category_info()`
|
||||
type: removed
|
||||
qbank_statistics:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/question/bank/statistics/classes/helper.php`:
|
||||
- `\qbank_statistics\helper::calculate_average_question_facility()`
|
||||
- `\qbank_statistics\helper::calculate_average_question_discriminative_efficiency()`
|
||||
- `\qbank_statistics\helper::calculate_average_question_discrimination_index()`
|
||||
type: removed
|
||||
qbank_history:
|
||||
- message: The `\qbank_history\question_history_view::display_advanced_search_form()` has been removed from `public/question/bank/history/classes/question_history_view.php`.
|
||||
type: removed
|
||||
qbank:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/question/engine/bank.php`:
|
||||
- `\question_finder::get_questions_from_categories_with_usage_counts()`
|
||||
- `\question_finder::get_questions_from_categories_and_tags_with_usage_counts()`
|
||||
type: removed
|
||||
core_question:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/question/renderer.php`:
|
||||
- `\core_question_bank_renderer::render_category_condition()`
|
||||
- `\core_question_bank_renderer::render_category_condition_advanced()`
|
||||
- `\core_question_bank_renderer::render_hidden_condition_advanced()`
|
||||
type: removed
|
||||
core_reportbuilder:
|
||||
- message: >-
|
||||
- The `\core_reportbuilder\local\helpers\audience::get_all_audiences_menu_types()` has been removed from `public/reportbuilder/classes/local/helpers/audience.php`.
|
||||
- The `\core_reportbuilder\local\entities\base::get_default_table_aliases()` has been removed from `public/reportbuilder/classes/local/entities/base.php`.
|
||||
- The `\core_reportbuilder\local\helpers\report::get_available_columns()` has been removed from `public/reportbuilder/classes/local/helpers/report.php`.
|
||||
type: removed
|
||||
core_repository:
|
||||
- message: The `\repository::get_file_size()` has been removed from `public/repository/lib.php`.
|
||||
type: removed
|
||||
repository_onedrive:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/repository/onedrive/lib.php`:
|
||||
- `\repository_onedrive::can_import_skydrive_files()`
|
||||
- `\repository_onedrive::import_skydrive_files()`
|
||||
type: removed
|
||||
theme_boost:
|
||||
- message: >-
|
||||
- The `public/theme/boost/templates/flat_navigation.mustache` file has been removed.
|
||||
- The `public/theme/boost/templates/nav-drawer.mustache` file has been removed.
|
||||
type: removed
|
||||
core_backup:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/backup/controller/base_controller.class.php`:
|
||||
- `\base_controller::set_copy()`
|
||||
- `\base_controller::get_copy()`
|
||||
type: removed
|
||||
enrol_self:
|
||||
- message: The `\enrol_self_plugin::get_welcome_email_contact()` has been removed from `public/enrol/self/lib.php`
|
||||
type: removed
|
||||
report_eventlist:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/report/eventlist/classes/list_generator.php`:
|
||||
- `\report_eventlist_list_generator::get_core_events_list()`
|
||||
- `\report_eventlist_list_generator::get_non_core_event_list()`
|
||||
type: removed
|
||||
core_tag:
|
||||
- message: The `public/tag/classes/manage_table.php` file has been removed.
|
||||
type: removed
|
||||
core_mnet:
|
||||
- message: The `\mnet_peer::get_public_key()` has been removed from `public/mnet/peer.php`.
|
||||
type: removed
|
||||
report_eventlist:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/report/eventlist/classes/list_generator.php`:
|
||||
- `\report_eventlist_list_generator::get_core_events_list()`
|
||||
- `\report_eventlist_list_generator::get_non_core_event_list()`
|
||||
type: removed
|
||||
core_badges:
|
||||
- message: >-
|
||||
- The following methods have been removed from `public/badges/renderer.php`:
|
||||
- `\core_badges_renderer::print_badge_table_actions()`
|
||||
- `\core_badges_renderer::render_badge_collection()`
|
||||
- `\core_badges_renderer::render_badge_management()`
|
||||
- `\core_badges_renderer::render_badge_recipients()`
|
||||
type: removed
|
||||
@@ -127,8 +127,6 @@ Since Moodle 4.4, the available activity purposes are:
|
||||
* Resource (MOD_PURPOSE_CONTENT)
|
||||
* Other (MOD_PURPOSE_OTHER)
|
||||
|
||||
> NOTE: On Moodle 4.3 downwards, MOD_PURPOSE_INTERFACE was also available, but it has been deprecated, so it's not recommended to use it.
|
||||
|
||||
### Purpose colours
|
||||
|
||||
The activity icon colours can be customised using the theme Boost 'Raw initial SCSS' feature. The following variables are available:
|
||||
|
||||
@@ -142,14 +142,6 @@ class renderer extends \plugin_renderer_base {
|
||||
return $this->render_from_template('tool_mfa/mfa_selector', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.4', mdl: 'MDL-79920', final: true)]
|
||||
public function setup_factor(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a table displaying a users active factors.
|
||||
*
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
define("core_availability/availability_more",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0;
|
||||
/**
|
||||
* Show more action for availablity information.
|
||||
*
|
||||
* @deprecated since 4.3 MDL-78204.
|
||||
* @module core_availability/availability_more
|
||||
* @copyright 2021 Bas Brands <bas@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
const Selectors_regions={availability:'[data-region="availability-multiple"]'},Selectors_actions={showmorelink:'[data-action="showmore"]'},Selectors_classes={hidden:"d-none",visible:"d-block"},showMoreHandler=event=>{const triggerElement=event.target.closest(Selectors_actions.showmorelink);if(null===triggerElement)return;const container=triggerElement.closest(Selectors_regions.availability);container.querySelectorAll("."+Selectors_classes.hidden).forEach((function(node){node.classList.remove(Selectors_classes.hidden)})),container.querySelectorAll("."+Selectors_classes.visible).forEach((function(node){node.classList.remove(Selectors_classes.visible),node.classList.add(Selectors_classes.hidden)})),event.preventDefault()};_exports.init=()=>{const body=document.querySelector("body");body.dataset.showmoreactive||(document.addEventListener("click",showMoreHandler),body.dataset.showmoreactive=1)}}));
|
||||
|
||||
//# sourceMappingURL=availability_more.min.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"availability_more.min.js","sources":["../src/availability_more.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Show more action for availablity information.\n *\n * @deprecated since 4.3 MDL-78204.\n * @module core_availability/availability_more\n * @copyright 2021 Bas Brands <[email protected]>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Availability info selectors.\n */\nconst Selectors = {\n regions: {\n availability: '[data-region=\"availability-multiple\"]',\n },\n actions: {\n showmorelink: '[data-action=\"showmore\"]'\n },\n classes: {\n hidden: 'd-none',\n visible: 'd-block',\n\n }\n};\n\n/**\n * Displays all the availability information in case part of it is hidden.\n *\n * @param {Event} event the triggered event\n */\nconst showMoreHandler = (event) => {\n const triggerElement = event.target.closest(Selectors.actions.showmorelink);\n if (triggerElement === null) {\n return;\n }\n const container = triggerElement.closest(Selectors.regions.availability);\n container.querySelectorAll('.' + Selectors.classes.hidden).forEach(function(node) {\n node.classList.remove(Selectors.classes.hidden);\n });\n container.querySelectorAll('.' + Selectors.classes.visible).forEach(function(node) {\n node.classList.remove(Selectors.classes.visible);\n node.classList.add(Selectors.classes.hidden);\n });\n event.preventDefault();\n};\n\n/**\n * Initialise the eventlister for the showmore action on availability information.\n *\n * @method init\n */\nexport const init = () => {\n const body = document.querySelector('body');\n if (!body.dataset.showmoreactive) {\n document.addEventListener('click', showMoreHandler);\n body.dataset.showmoreactive = 1;\n }\n};\n"],"names":["Selectors","availability","showmorelink","hidden","visible","showMoreHandler","event","triggerElement","target","closest","container","querySelectorAll","forEach","node","classList","remove","add","preventDefault","body","document","querySelector","dataset","showmoreactive","addEventListener"],"mappings":";;;;;;;;;MA2BMA,kBACO,CACLC,aAAc,yCAFhBD,kBAIO,CACLE,aAAc,4BALhBF,kBAOO,CACLG,OAAQ,SACRC,QAAS,WAUXC,gBAAmBC,cACfC,eAAiBD,MAAME,OAAOC,QAAQT,kBAAkBE,iBACvC,OAAnBK,4BAGEG,UAAYH,eAAeE,QAAQT,kBAAkBC,cAC3DS,UAAUC,iBAAiB,IAAMX,kBAAkBG,QAAQS,SAAQ,SAASC,MACxEA,KAAKC,UAAUC,OAAOf,kBAAkBG,WAE5CO,UAAUC,iBAAiB,IAAMX,kBAAkBI,SAASQ,SAAQ,SAASC,MACzEA,KAAKC,UAAUC,OAAOf,kBAAkBI,SACxCS,KAAKC,UAAUE,IAAIhB,kBAAkBG,WAEzCG,MAAMW,gCAQU,WACVC,KAAOC,SAASC,cAAc,QAC/BF,KAAKG,QAAQC,iBACdH,SAASI,iBAAiB,QAASlB,iBACnCa,KAAKG,QAAQC,eAAiB"}
|
||||
@@ -1,74 +0,0 @@
|
||||
// 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/>.
|
||||
|
||||
/**
|
||||
* Show more action for availablity information.
|
||||
*
|
||||
* @deprecated since 4.3 MDL-78204.
|
||||
* @module core_availability/availability_more
|
||||
* @copyright 2021 Bas Brands <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Availability info selectors.
|
||||
*/
|
||||
const Selectors = {
|
||||
regions: {
|
||||
availability: '[data-region="availability-multiple"]',
|
||||
},
|
||||
actions: {
|
||||
showmorelink: '[data-action="showmore"]'
|
||||
},
|
||||
classes: {
|
||||
hidden: 'd-none',
|
||||
visible: 'd-block',
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Displays all the availability information in case part of it is hidden.
|
||||
*
|
||||
* @param {Event} event the triggered event
|
||||
*/
|
||||
const showMoreHandler = (event) => {
|
||||
const triggerElement = event.target.closest(Selectors.actions.showmorelink);
|
||||
if (triggerElement === null) {
|
||||
return;
|
||||
}
|
||||
const container = triggerElement.closest(Selectors.regions.availability);
|
||||
container.querySelectorAll('.' + Selectors.classes.hidden).forEach(function(node) {
|
||||
node.classList.remove(Selectors.classes.hidden);
|
||||
});
|
||||
container.querySelectorAll('.' + Selectors.classes.visible).forEach(function(node) {
|
||||
node.classList.remove(Selectors.classes.visible);
|
||||
node.classList.add(Selectors.classes.hidden);
|
||||
});
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialise the eventlister for the showmore action on availability information.
|
||||
*
|
||||
* @method init
|
||||
*/
|
||||
export const init = () => {
|
||||
const body = document.querySelector('body');
|
||||
if (!body.dataset.showmoreactive) {
|
||||
document.addEventListener('click', showMoreHandler);
|
||||
body.dataset.showmoreactive = 1;
|
||||
}
|
||||
};
|
||||
@@ -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/>.
|
||||
|
||||
use core\output\plugin_renderer_base;
|
||||
use core_availability\output\availability_info;
|
||||
|
||||
/**
|
||||
* Renderer for availability display.
|
||||
*
|
||||
* @package core_availability
|
||||
* @copyright 2014 The Open University
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class core_availability_renderer extends plugin_renderer_base {
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0 MDL-71691 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated(availability_info::class, since: '4.0', mdl: 'MDL-71691', final: true)]
|
||||
public function render_core_availability_multiple_messages(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
@@ -105,20 +105,4 @@ abstract class base_controller extends backup implements loggable {
|
||||
public function get_releasesession() {
|
||||
return $this->releasesession;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-74548
|
||||
*/
|
||||
#[\core\attribute\deprecated(since: '4.1', mdl: 'MDL-74548', final: true)]
|
||||
public function set_copy(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-74548
|
||||
*/
|
||||
#[\core\attribute\deprecated('restore_controller::get_copy()', since: '4.1', mdl: 'MDL-74548', final: true)]
|
||||
public function get_copy() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,14 +281,6 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
return html_writer::div($display, null, array('id' => 'badge-overview'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated sinde Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-77061', final: true)]
|
||||
public function print_badge_table_actions() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an issued badge.
|
||||
*
|
||||
@@ -401,22 +393,6 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
return $localhtml . $externalhtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.4', mdl: 'MDL-80052', final: true)]
|
||||
protected function render_badge_collection(\core_badges\output\badge_collection $badges) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-77061', final: true)]
|
||||
protected function render_badge_management() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints badge status box.
|
||||
*
|
||||
@@ -590,14 +566,6 @@ class core_badges_renderer extends plugin_renderer_base {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.4', mdl: 'MDL-80052', final: true)]
|
||||
protected function render_badge_recipients(\core_badges\output\badge_recipients $recipients) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Helper methods
|
||||
// Reused from stamps collection plugin
|
||||
|
||||
@@ -115,14 +115,6 @@ class core_course_bulk_activity_completion_renderer extends plugin_renderer_base
|
||||
return parent::render_from_template('core_course/editbulkactivitycompletion', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-78528
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78528', final: true)]
|
||||
public function edit_default_completion() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the course completion action bar.
|
||||
*
|
||||
|
||||
@@ -31,14 +31,6 @@ use core_user\output\status_field;
|
||||
* @deprecated since Moodle 5.2
|
||||
*/
|
||||
class enrolment {
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 - please do not use this function any more (to remove in MDL-78118)
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76900', final: true)]
|
||||
public static function enrolment_name(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of enrolment statuses
|
||||
*
|
||||
|
||||
@@ -664,19 +664,6 @@ abstract class base {
|
||||
return $this->singlesectionid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since 4.4. Use set_sectionnum instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: 'base::set_sectionnum',
|
||||
since: '4.4',
|
||||
mdl: 'MDL-80248',
|
||||
final: true,
|
||||
)]
|
||||
public function set_section_number(int $singlesection): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current section number to display.
|
||||
* Some formats has the hability to swith from one section to multiple sections per page.
|
||||
@@ -727,20 +714,6 @@ abstract class base {
|
||||
return $modinfo->get_section_info_by_id($this->singlesectionid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since 4.4. Use get_sectionnum instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: 'base::get_sectionnum',
|
||||
since: '4.4',
|
||||
mdl: 'MDL-80248',
|
||||
final: true,
|
||||
)]
|
||||
public function get_section_number(): int {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the format section preferences.
|
||||
*
|
||||
|
||||
@@ -249,12 +249,4 @@ class availability implements named_templatable, renderable {
|
||||
|
||||
return (object) $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-78204. Please use {@see self::get_availability_data} instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_availability_data()', since: '4.3', mdl: 'MDL-78489', final: true)]
|
||||
protected function availability_info() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,25 +146,6 @@ class stateactions {
|
||||
return $cmids;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 MDL-77038.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: 'stateactions::section_move_after',
|
||||
since: '4.4',
|
||||
mdl: 'MDL-77038',
|
||||
final: true,
|
||||
)]
|
||||
public function section_move(
|
||||
stateupdates $updates,
|
||||
stdClass $course,
|
||||
array $ids,
|
||||
?int $targetsectionid = null,
|
||||
?int $targetcmid = null
|
||||
): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move course sections after to another location in the same course.
|
||||
*
|
||||
|
||||
@@ -1446,14 +1446,6 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
return $this->coursecat_tree($chelper, $tree);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-78744
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78744', final: true)]
|
||||
public function render_activity_information() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the activity navigation.
|
||||
*
|
||||
|
||||
@@ -1201,14 +1201,6 @@ class enrol_self_plugin extends enrol_plugin {
|
||||
return $roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4
|
||||
*/
|
||||
#[\core\attribute\deprecated('enrol_plugin::get_welcome_message_contact', since: '4.4', mdl: 'MDL-4188', final: true)]
|
||||
public function get_welcome_email_contact() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if enrolment plugin is supported in csv course upload.
|
||||
*
|
||||
|
||||
@@ -1451,38 +1451,6 @@ class grade_structure {
|
||||
*/
|
||||
public $items;
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 - please use {@see grade_helper::get_element_icon()}
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_helper::get_element_icon', since: '4.4', mdl: 'MDL-77326', final: true)]
|
||||
public function get_element_icon(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 - please use {@see grade_helper::get_element_type_string()}
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_helper::get_element_type_string', since: '4.4', mdl: 'MDL-77326', final: true)]
|
||||
public function get_element_type_string(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 - please use {@see grade_helper::get_element_header()}
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_helper::get_element_header', since: '4.4', mdl: 'MDL-77326', final: true)]
|
||||
public function get_element_header(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 - please use {@see grade_helper::get_activity_link()}
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_helper::get_activity_link', since: '4.4', mdl: 'MDL-77326', final: true)]
|
||||
private function get_activity_link(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns URL of a page that is supposed to contain detailed grade analysis
|
||||
*
|
||||
@@ -1545,14 +1513,6 @@ class grade_structure {
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_grade_analysis_icon(grade_grade $grade) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link leading to the grade analysis page
|
||||
*
|
||||
@@ -1661,14 +1621,6 @@ class grade_structure {
|
||||
return $strparams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_reset_icon($element, $gpr, $returnactionmenulink = false) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link to reset weights for the given element.
|
||||
*
|
||||
@@ -1765,14 +1717,6 @@ class grade_structure {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_edit_icon($element, $gpr, $returnactionmenulink = false) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link leading to the edit grade/grade item/category page
|
||||
*
|
||||
@@ -1899,14 +1843,6 @@ class grade_structure {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_hiding_icon($element, $gpr, $returnactionmenulink = false) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link with url to hide/unhide grade/grade item/grade category
|
||||
*
|
||||
@@ -1949,14 +1885,6 @@ class grade_structure {
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_locking_icon($element, $gpr) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns link to lock/unlock grade/grade item/grade category
|
||||
*
|
||||
@@ -2023,14 +1951,6 @@ class grade_structure {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_calculation_icon($element, $gpr, $returnactionmenulink = false) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns link to edit calculation for a grade item.
|
||||
*
|
||||
@@ -3108,14 +3028,6 @@ abstract class grade_helper {
|
||||
*/
|
||||
protected static $aggregationstrings = null;
|
||||
|
||||
/**
|
||||
* @deprecated since 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_string', since: '4.3', mdl: 'MDL-78561', final: true)]
|
||||
public static function get_lang_string(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets strings commonly used by the describe plugins
|
||||
*
|
||||
|
||||
@@ -1320,14 +1320,6 @@ class grade_report_grader extends grade_report {
|
||||
return $OUTPUT->container($html, 'gradeparent');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-76147', final: true)]
|
||||
public function get_left_icons_row($rows=array(), $colspan=1) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds and return the header for the row of ranges, for the left part of the grader report.
|
||||
* @param array $rows The Array of rows for the left part of the report
|
||||
@@ -1404,14 +1396,6 @@ class grade_report_grader extends grade_report {
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have {@see core\output\action_menu}.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-76147', final: true)]
|
||||
public function get_right_icons_row($rows=array()) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds and return the row of ranges for the right part of the grader report.
|
||||
* @param array $rows The Array of rows for the right part of the report
|
||||
@@ -1448,14 +1432,6 @@ class grade_report_grader extends grade_report {
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 - Call calculate_average instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_report::calculate_average()', since: '4.4', final: true)]
|
||||
public function get_right_avg_row() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given element category, create a collapsible icon and
|
||||
* course header.
|
||||
@@ -1487,14 +1463,6 @@ class grade_report_grader extends grade_report {
|
||||
return $courseheader;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2 - The row is not shown anymore - we have actions menu.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core\output\action_menu', since: '4.2', mdl: 'MDL-76147', final: true)]
|
||||
protected function get_icons($element) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a single action against a category, grade_item or grade.
|
||||
* @param string $target eid ({type}{id}, e.g. c4 for category4)
|
||||
|
||||
@@ -45,14 +45,6 @@ class behat_gradereport_grader extends behat_base {
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.2
|
||||
*/
|
||||
#[\core\attribute\deprecated('behat_grades::get_grade_item_id', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
protected function get_grade_item_id() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clicks on given user menu.
|
||||
*
|
||||
|
||||
@@ -332,14 +332,6 @@ abstract class grade_report {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.2
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_string', since: '4.2', mdl: 'MDL-77033', final: true)]
|
||||
public function get_lang_string(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches and returns a count of all the users that will be shown on this page.
|
||||
* @param boolean $groups include groups limit
|
||||
|
||||
@@ -1,205 +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/>.
|
||||
|
||||
/**
|
||||
* The gradebook simple view - initial view to select your search options
|
||||
*
|
||||
* @package gradereport_singleview
|
||||
* @copyright 2014 Moodle Pty Ltd (http://moodle.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace gradereport_singleview\local\screen;
|
||||
|
||||
use gradereport_singleview;
|
||||
use moodle_url;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
/**
|
||||
* The gradebook simple view - initial view to select your search options
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @package gradereport_singleview
|
||||
* @copyright 2014 Moodle Pty Ltd (http://moodle.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class select extends screen {
|
||||
|
||||
/** @var \stdClass course data. */
|
||||
public $item;
|
||||
|
||||
/**
|
||||
* Initialise this screen
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @param bool $selfitemisempty Has an item been selected (will be false)
|
||||
*/
|
||||
public function init($selfitemisempty = false) {
|
||||
global $DB;
|
||||
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
$roleids = explode(',', get_config('moodle', 'gradebookroles'));
|
||||
|
||||
$this->items = [];
|
||||
foreach ($roleids as $roleid) {
|
||||
// Keeping the first user appearance.
|
||||
$this->items = $this->items + get_role_users(
|
||||
$roleid, $this->context, false, '',
|
||||
'u.id, u.lastname, u.firstname', null, $this->groupid,
|
||||
$this->perpage * $this->page, $this->perpage
|
||||
);
|
||||
}
|
||||
$this->item = $DB->get_record('course', ['id' => $this->courseid]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type of items on this screen, not valid so return false.
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @return string|null
|
||||
*/
|
||||
public function item_type(): ?string {
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the HTML for the page.
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @return string
|
||||
*/
|
||||
public function html(): string {
|
||||
global $OUTPUT, $COURSE;
|
||||
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
if ($this->itemid === null) {
|
||||
$userlink = new \moodle_url('/grade/report/singleview/index.php', ['id' => $COURSE->id, 'item' => 'user_select']);
|
||||
$gradelink = new \moodle_url('/grade/report/singleview/index.php', ['id' => $COURSE->id, 'item' => 'grade_select']);
|
||||
$context = [
|
||||
'courseid' => $COURSE->id,
|
||||
'imglink' => $OUTPUT->image_url('zero_state', 'gradereport_singleview'),
|
||||
'userzerolink' => $userlink->out(false),
|
||||
'userselectactive' => false,
|
||||
'gradezerolink' => $gradelink->out(false),
|
||||
'gradeselectactive' => false,
|
||||
'displaylabel' => false
|
||||
];
|
||||
return $OUTPUT->render_from_template('gradereport_singleview/zero_state', $context);
|
||||
}
|
||||
|
||||
$html = '';
|
||||
|
||||
$types = gradereport_singleview\report\singleview::valid_screens();
|
||||
|
||||
foreach ($types as $type) {
|
||||
$classname = "gradereport_singleview\\local\\screen\\{$type}";
|
||||
|
||||
$screen = new $classname($this->courseid, null, $this->groupid);
|
||||
|
||||
if (!$screen instanceof selectable_items) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$options = $screen->options();
|
||||
|
||||
if (empty($options)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$params = [
|
||||
'id' => $this->courseid,
|
||||
'item' => $screen->item_type(),
|
||||
'group' => $this->groupid
|
||||
];
|
||||
|
||||
$url = new moodle_url('/grade/report/singleview/index.php', $params);
|
||||
|
||||
$select = new \single_select($url, 'itemid', $options, '', ['' => $screen->select_label()]);
|
||||
$select->set_label($screen->select_label(), ['class' => 'accesshide']);
|
||||
$html .= $OUTPUT->render($select);
|
||||
}
|
||||
$html = $OUTPUT->container($html, 'selectitems');
|
||||
|
||||
if (empty($html)) {
|
||||
$OUTPUT->notification(get_string('noscreens', 'gradereport_singleview'));
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we show the next prev selector?
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @return bool
|
||||
*/
|
||||
public function supports_next_prev(): bool {
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we show the base singlereport group selector?
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @return bool
|
||||
*/
|
||||
public function display_group_selector(): bool {
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
if ($this->itemid === null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the heading for the screen.
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @return string
|
||||
*/
|
||||
public function heading(): string {
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
return ' ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this screen support paging?
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
* @return bool
|
||||
*/
|
||||
public function supports_paging(): bool {
|
||||
debugging('The function ' . __FUNCTION__ . '() is deprecated as part of the deprecation process of the ' .
|
||||
'\gradereport_singleview\local\screen\select class which is no longer used.', DEBUG_DEVELOPER);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -239,14 +239,6 @@ class behat_grade extends behat_base {
|
||||
set_config('gradebook_calculations_freeze_' . $courseid, $version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.0 - use behat_forms::i_set_the_field_to() instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('behat_forms::i_set_the_field_to', since: '4.0', final: true)]
|
||||
protected function select_in_gradebook_tabs() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the course gradebook and selects the specified item from the general grade navigation selector.
|
||||
*
|
||||
@@ -301,12 +293,4 @@ class behat_grade extends behat_base {
|
||||
$this->i_navigate_to_in_the_course_gradebook("More > Export");
|
||||
$this->execute('behat_forms::i_set_the_field_to', [get_string('exportas', 'grades'), $gradeexportoption]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.1 - use behat_forms::i_set_the_field_to() instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('behat_forms::i_set_the_field_to', since: '4.1', final: true)]
|
||||
protected function select_in_gradebook_navigation_selector() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
define("core/addblockmodal",["exports","./modal_cancel","core/templates","core/str","core/ajax"],(function(_exports,_modal_cancel,_templates,_str,_ajax){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
|
||||
/**
|
||||
* Show an add block modal instead of doing it on a separate page.
|
||||
*
|
||||
* @module core/addblockmodal
|
||||
* @deprecated since Moodle 4.2 - please use core_block/add_modal instead.
|
||||
* @copyright 2016 Damyon Wiese <damyon@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_modal_cancel=_interopRequireDefault(_modal_cancel),_templates=_interopRequireDefault(_templates),_ajax=_interopRequireDefault(_ajax);const SELECTORS_ADD_BLOCK='[data-key="addblock"]';let listenerEventsRegistered=!1;const registerListenerEvents=(pageType,pageLayout,addBlockUrl,subPage)=>{document.addEventListener("click",(e=>{const addBlock=e.target.closest(SELECTORS_ADD_BLOCK);if(addBlock){e.preventDefault();let addBlockModal=null,addBlockModalUrl=null!=addBlockUrl?addBlockUrl:addBlock.dataset.url;buildAddBlockModal().then((modal=>{addBlockModal=modal;const modalBody=renderBlocks(addBlockModalUrl,pageType,pageLayout,subPage);return modal.setBody(modalBody),modal.show(),modalBody})).catch((()=>{addBlockModal.destroy()}))}}))},buildAddBlockModal=()=>_modal_cancel.default.create({title:(0,_str.getString)("addblock")}),renderBlocks=async(addBlockUrl,pageType,pageLayout,subPage)=>{const blocks=await getAddableBlocks(pageType,pageLayout,subPage);return _templates.default.render("core/add_block_body",{blocks:blocks,url:addBlockUrl})},getAddableBlocks=async(pageType,pageLayout,subPage)=>{const request={methodname:"core_block_fetch_addable_blocks",args:{pagecontextid:M.cfg.contextid,pagetype:pageType,pagelayout:pageLayout,subpage:subPage}};return _ajax.default.call([request])[0]};_exports.init=function(pageType,pageLayout){let addBlockUrl=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,subPage=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";listenerEventsRegistered||(registerListenerEvents(pageType,pageLayout,addBlockUrl,subPage),listenerEventsRegistered=!0)}}));
|
||||
|
||||
//# sourceMappingURL=addblockmodal.min.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -7,6 +7,6 @@ define("core/pending",["exports"],(function(_exports){Object.defineProperty(_exp
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since 3.6
|
||||
*/
|
||||
class{static request(pendingKey){return window.console.error("The core/pending::request method has been deprecated. "+"Please use one of the alternative calls to core/pending, for example \"new Pending('".concat(pendingKey,"')\". ")+"Called with ".concat(pendingKey)),new this(pendingKey)}constructor(){let resolver,rejector,pendingKey=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pendingPromise";const pendingPromise=this.constructor.Promise(((resolve,reject)=>{resolver=resolve,rejector=reject}),pendingKey);return pendingPromise.resolve=resolver,pendingPromise.reject=rejector,pendingPromise}static Promise(fn){let pendingKey=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pendingPromise";const resolver=new Promise(((resolve,reject)=>{M.util.js_pending(pendingKey),fn(resolve,reject)}));return resolver.then((()=>{M.util.js_complete(pendingKey)})).catch(),resolver}},_exports.default}));
|
||||
class{constructor(){let resolver,rejector,pendingKey=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pendingPromise";const pendingPromise=this.constructor.Promise(((resolve,reject)=>{resolver=resolve,rejector=reject}),pendingKey);return pendingPromise.resolve=resolver,pendingPromise.reject=rejector,pendingPromise}static Promise(fn){let pendingKey=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pendingPromise";const resolver=new Promise(((resolve,reject)=>{M.util.js_pending(pendingKey),fn(resolve,reject)}));return resolver.then((()=>{M.util.js_complete(pendingKey)})).catch(),resolver}},_exports.default}));
|
||||
|
||||
//# sourceMappingURL=pending.min.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,141 +0,0 @@
|
||||
// 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/>.
|
||||
|
||||
/**
|
||||
* Show an add block modal instead of doing it on a separate page.
|
||||
*
|
||||
* @module core/addblockmodal
|
||||
* @deprecated since Moodle 4.2 - please use core_block/add_modal instead.
|
||||
* @copyright 2016 Damyon Wiese <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
import CancelModal from './modal_cancel';
|
||||
import Templates from 'core/templates';
|
||||
import {getString} from 'core/str';
|
||||
import Ajax from 'core/ajax';
|
||||
|
||||
const SELECTORS = {
|
||||
ADD_BLOCK: '[data-key="addblock"]'
|
||||
};
|
||||
|
||||
// Ensure we only add our listeners once.
|
||||
let listenerEventsRegistered = false;
|
||||
|
||||
/**
|
||||
* Register related event listeners.
|
||||
*
|
||||
* @method registerListenerEvents
|
||||
* @param {String} pageType The type of the page
|
||||
* @param {String} pageLayout The layout of the page
|
||||
* @param {String|null} addBlockUrl The add block URL
|
||||
* @param {String} subPage The subpage identifier
|
||||
*/
|
||||
const registerListenerEvents = (pageType, pageLayout, addBlockUrl, subPage) => {
|
||||
document.addEventListener('click', e => {
|
||||
|
||||
const addBlock = e.target.closest(SELECTORS.ADD_BLOCK);
|
||||
if (addBlock) {
|
||||
e.preventDefault();
|
||||
|
||||
let addBlockModal = null;
|
||||
let addBlockModalUrl = addBlockUrl ?? addBlock.dataset.url;
|
||||
|
||||
buildAddBlockModal()
|
||||
.then(modal => {
|
||||
addBlockModal = modal;
|
||||
const modalBody = renderBlocks(addBlockModalUrl, pageType, pageLayout, subPage);
|
||||
modal.setBody(modalBody);
|
||||
modal.show();
|
||||
|
||||
return modalBody;
|
||||
})
|
||||
.catch(() => {
|
||||
addBlockModal.destroy();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Method that creates the 'add block' modal.
|
||||
*
|
||||
* @method buildAddBlockModal
|
||||
* @returns {Promise} The modal promise (modal's body will be rendered later).
|
||||
*/
|
||||
const buildAddBlockModal = () => {
|
||||
return CancelModal.create({
|
||||
title: getString('addblock')
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Method that renders the list of available blocks.
|
||||
*
|
||||
* @method renderBlocks
|
||||
* @param {String} addBlockUrl The add block URL
|
||||
* @param {String} pageType The type of the page
|
||||
* @param {String} pageLayout The layout of the page
|
||||
* @param {String} subPage The subpage identifier
|
||||
* @return {Promise}
|
||||
*/
|
||||
const renderBlocks = async(addBlockUrl, pageType, pageLayout, subPage) => {
|
||||
// Fetch all addable blocks in the given page.
|
||||
const blocks = await getAddableBlocks(pageType, pageLayout, subPage);
|
||||
|
||||
return Templates.render('core/add_block_body', {
|
||||
blocks: blocks,
|
||||
url: addBlockUrl
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Method that fetches all addable blocks in a given page.
|
||||
*
|
||||
* @method getAddableBlocks
|
||||
* @param {String} pageType The type of the page
|
||||
* @param {String} pageLayout The layout of the page
|
||||
* @param {String} subPage The subpage identifier
|
||||
* @return {Promise}
|
||||
*/
|
||||
const getAddableBlocks = async(pageType, pageLayout, subPage) => {
|
||||
const request = {
|
||||
methodname: 'core_block_fetch_addable_blocks',
|
||||
args: {
|
||||
pagecontextid: M.cfg.contextid,
|
||||
pagetype: pageType,
|
||||
pagelayout: pageLayout,
|
||||
subpage: subPage,
|
||||
},
|
||||
};
|
||||
|
||||
return Ajax.call([request])[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up the actions.
|
||||
*
|
||||
* @method init
|
||||
* @param {String} pageType The type of the page
|
||||
* @param {String} pageLayout The layout of the page
|
||||
* @param {String|null} addBlockUrl The add block URL
|
||||
* @param {String} subPage The subpage identifier
|
||||
*/
|
||||
export const init = (pageType, pageLayout, addBlockUrl = null, subPage = '') => {
|
||||
if (!listenerEventsRegistered) {
|
||||
registerListenerEvents(pageType, pageLayout, addBlockUrl, subPage);
|
||||
listenerEventsRegistered = true;
|
||||
}
|
||||
};
|
||||
@@ -137,14 +137,6 @@ export default class {
|
||||
throw new Error(`dropdownSelector() must be implemented in ${this.constructor.name}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub out a required function.
|
||||
* @deprecated since Moodle 4.4
|
||||
*/
|
||||
triggerSelector() {
|
||||
window.console.warning('triggerSelector() is deprecated. Consider using this.selectors.toggle');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the dataset that we will be searching upon.
|
||||
*
|
||||
|
||||
@@ -36,23 +36,6 @@
|
||||
* Note: It is recommended that a descriptive key be used to aid in debugging where possible, but this is optional.
|
||||
*/
|
||||
export default class {
|
||||
|
||||
/**
|
||||
* Create a new Pending Promise statically.
|
||||
*
|
||||
* @param {String} pendingKey An identifier to help in debugging
|
||||
* @return {Promise} A Native Promise
|
||||
* @deprecated since Moodle 4.2
|
||||
*/
|
||||
static request(pendingKey) {
|
||||
window.console.error(
|
||||
`The core/pending::request method has been deprecated. ` +
|
||||
`Please use one of the alternative calls to core/pending, for example "new Pending('${pendingKey}')". ` +
|
||||
`Called with ${pendingKey}`
|
||||
);
|
||||
return new this(pendingKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a new pendingPromise for later resolution.
|
||||
*
|
||||
|
||||
@@ -28,14 +28,6 @@ class encryption {
|
||||
/** @var string Encryption method: Sodium */
|
||||
const METHOD_SODIUM = 'sodium';
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 Sodium is always present
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'Sodium is always present', since: '4.3', mdl: 'MDL-71421', final: true)]
|
||||
public static function is_sodium_installed() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the encryption method to use
|
||||
*
|
||||
|
||||
@@ -594,14 +594,6 @@ final class manager implements
|
||||
return $classmethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated in favour of get_hooks_deprecating_plugin_callback since Moodle 4.4.
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_hooks_deprecating_plugin_callback', since: '4.4', mdl: 'MDL-80099', final: true)]
|
||||
public function is_deprecated_plugin_callback(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the plugin callback from lib.php is deprecated by any hooks, return the hooks' classnames.
|
||||
*
|
||||
|
||||
@@ -57,14 +57,6 @@ class activity_sender extends resource_sender {
|
||||
$this->packager = new activity_packager($this->cminfo, $this->userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-75318
|
||||
*/
|
||||
#[\core\attribute\deprecated('share_resource()', since: '4.3', mdl: 'MDL-75318', final: true)]
|
||||
public function share_activity() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Share an activity/resource to MoodleNet.
|
||||
*
|
||||
|
||||
@@ -1,177 +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/>.
|
||||
|
||||
namespace core\navigation;
|
||||
|
||||
use core\context\course as context_course;
|
||||
use core\context_helper;
|
||||
use core\url;
|
||||
use moodle_page;
|
||||
|
||||
/**
|
||||
* Class used to generate a collection of navigation nodes most closely related
|
||||
* to the current page.
|
||||
*
|
||||
* @deprecated since Moodle 4.0 - do not use any more. Leverage secondary/tertiary navigation concepts
|
||||
* @package core
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
since: '4.0',
|
||||
reason: 'Do not use this class any more. Leverage secondary/tertiary navigation concepts.'
|
||||
)]
|
||||
class flat_navigation extends navigation_node_collection {
|
||||
/** @var moodle_page the moodle page that the navigation belongs to */
|
||||
protected $page;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param moodle_page $page
|
||||
*/
|
||||
public function __construct(moodle_page &$page) {
|
||||
if (during_initial_install()) {
|
||||
return;
|
||||
}
|
||||
debugging("Flat navigation has been deprecated in favour of primary/secondary navigation concepts");
|
||||
$this->page = $page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the list of navigation nodes based on the current navigation and settings trees.
|
||||
*
|
||||
*/
|
||||
public function initialise() {
|
||||
global $PAGE, $USER, $OUTPUT, $CFG;
|
||||
if (during_initial_install()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$current = false;
|
||||
|
||||
$course = $PAGE->course;
|
||||
|
||||
$this->page->navigation->initialise();
|
||||
|
||||
// First walk the nav tree looking for "flat_navigation" nodes.
|
||||
if ($course->id > 1) {
|
||||
// It's a real course.
|
||||
$url = new url('/course/view.php', ['id' => $course->id]);
|
||||
|
||||
$coursecontext = context_course::instance($course->id, MUST_EXIST);
|
||||
$displaycontext = context_helper::get_navigation_filter_context($coursecontext);
|
||||
// This is the name that will be shown for the course.
|
||||
$coursename = empty($CFG->navshowfullcoursenames) ?
|
||||
format_string($course->shortname, true, ['context' => $displaycontext]) :
|
||||
format_string($course->fullname, true, ['context' => $displaycontext]);
|
||||
|
||||
$flat = new flat_navigation_node(navigation_node::create($coursename, $url), 0);
|
||||
$flat->set_collectionlabel($coursename);
|
||||
$flat->key = 'coursehome';
|
||||
$flat->icon = new pix_icon('i/course', '');
|
||||
|
||||
$courseformat = course_get_format($course);
|
||||
$coursenode = $PAGE->navigation->find_active_node();
|
||||
$targettype = navigation_node::TYPE_COURSE;
|
||||
|
||||
// Single activity format has no course node - the course node is swapped for the activity node.
|
||||
if (!$courseformat->has_view_page()) {
|
||||
$targettype = navigation_node::TYPE_ACTIVITY;
|
||||
}
|
||||
|
||||
while (!empty($coursenode) && ($coursenode->type != $targettype)) {
|
||||
$coursenode = $coursenode->parent;
|
||||
}
|
||||
// There is one very strange page in mod/feedback/view.php which thinks it is both site and course
|
||||
// context at the same time. That page is broken but we need to handle it (hence the SITEID).
|
||||
if ($coursenode && $coursenode->key != SITEID) {
|
||||
$this->add($flat);
|
||||
foreach ($coursenode->children as $child) {
|
||||
if ($child->action) {
|
||||
$flat = new flat_navigation_node($child, 0);
|
||||
$this->add($flat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->page->navigation->build_flat_navigation_list($this, true, get_string('site'));
|
||||
} else {
|
||||
$this->page->navigation->build_flat_navigation_list($this, false, get_string('site'));
|
||||
}
|
||||
|
||||
$admin = $PAGE->settingsnav->find('siteadministration', navigation_node::TYPE_SITE_ADMIN);
|
||||
if (!$admin) {
|
||||
// Try again - crazy nav tree!
|
||||
$admin = $PAGE->settingsnav->find('root', navigation_node::TYPE_SITE_ADMIN);
|
||||
}
|
||||
if ($admin) {
|
||||
$flat = new flat_navigation_node($admin, 0);
|
||||
$flat->set_showdivider(true, get_string('sitesettings'));
|
||||
$flat->key = 'sitesettings';
|
||||
$flat->icon = new pix_icon('t/preferences', '');
|
||||
$this->add($flat);
|
||||
}
|
||||
|
||||
// Add-a-block in editing mode.
|
||||
if (
|
||||
isset($this->page->theme->addblockposition) &&
|
||||
$this->page->theme->addblockposition == BLOCK_ADDBLOCK_POSITION_FLATNAV &&
|
||||
$PAGE->user_is_editing() && $PAGE->user_can_edit_blocks()
|
||||
) {
|
||||
$url = new url($PAGE->url, ['bui_addblock' => '', 'sesskey' => sesskey()]);
|
||||
$addablock = navigation_node::create(get_string('addblock'), $url);
|
||||
$flat = new flat_navigation_node($addablock, 0);
|
||||
$flat->set_showdivider(true, get_string('blocksaddedit'));
|
||||
$flat->key = 'addblock';
|
||||
$flat->icon = new pix_icon('i/addblock', '');
|
||||
$this->add($flat);
|
||||
|
||||
$addblockurl = "?{$url->get_query_string(false)}";
|
||||
|
||||
$PAGE->requires->js_call_amd(
|
||||
'core_block/add_modal',
|
||||
'init',
|
||||
[$addblockurl, $this->page->get_edited_page_hash()]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the parent so we can set a label for this collection if it has not been set yet.
|
||||
*
|
||||
* @param navigation_node $node Node to add
|
||||
* @param string $beforekey If specified, adds before a node with this key,
|
||||
* otherwise adds at end
|
||||
* @return navigation_node Added node
|
||||
*/
|
||||
public function add(navigation_node $node, $beforekey = null) {
|
||||
$result = parent::add($node, $beforekey);
|
||||
// Extend the parent to get a name for the collection of nodes if required.
|
||||
if (empty($this->collectionlabel)) {
|
||||
if ($node instanceof flat_navigation_node) {
|
||||
$this->set_collectionlabel($node->get_collectionlabel());
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
// Alias this class to the old name.
|
||||
// This file will be autoloaded by the legacyclasses autoload system.
|
||||
// In future all uses of this class will be corrected and the legacy references will be removed.
|
||||
class_alias(flat_navigation::class, \flat_navigation::class);
|
||||
@@ -1,157 +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/>.
|
||||
|
||||
namespace core\navigation;
|
||||
|
||||
use core\exception\coding_exception;
|
||||
|
||||
/**
|
||||
* Subclass of navigation_node allowing different rendering for the flat navigation
|
||||
* in particular allowing dividers and indents.
|
||||
*
|
||||
* @deprecated since Moodle 4.0 - do not use any more. Leverage secondary/tertiary navigation concepts
|
||||
* @package core
|
||||
* @category navigation
|
||||
* @copyright 2016 Damyon Wiese
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class flat_navigation_node extends navigation_node {
|
||||
/** @var $indent integer The indent level */
|
||||
private $indent = 0;
|
||||
|
||||
/** @var $showdivider bool Show a divider before this element */
|
||||
private $showdivider = false;
|
||||
|
||||
/** @var $collectionlabel string Label for a group of nodes */
|
||||
private $collectionlabel = '';
|
||||
|
||||
/**
|
||||
* A proxy constructor
|
||||
*
|
||||
* @param mixed $navnode A navigation_node or an array
|
||||
*/
|
||||
public function __construct($navnode, $indent) {
|
||||
debugging("Flat nav has been deprecated in favour of primary/secondary navigation concepts");
|
||||
if (is_array($navnode)) {
|
||||
parent::__construct($navnode);
|
||||
} else if ($navnode instanceof navigation_node) {
|
||||
// Just clone everything.
|
||||
$objvalues = get_object_vars($navnode);
|
||||
foreach ($objvalues as $key => $value) {
|
||||
$this->$key = $value;
|
||||
}
|
||||
} else {
|
||||
throw new coding_exception('Not a valid flat_navigation_node');
|
||||
}
|
||||
$this->indent = $indent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter, a label is required for a flat navigation node that shows a divider.
|
||||
*
|
||||
* @param string $label
|
||||
*/
|
||||
public function set_collectionlabel($label) {
|
||||
$this->collectionlabel = $label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter, get the label for this flat_navigation node, or it's parent if it doesn't have one.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_collectionlabel() {
|
||||
if (!empty($this->collectionlabel)) {
|
||||
return $this->collectionlabel;
|
||||
}
|
||||
if ($this->parent && ($this->parent instanceof flat_navigation_node || $this->parent instanceof flat_navigation)) {
|
||||
return $this->parent->get_collectionlabel();
|
||||
}
|
||||
debugging('Navigation region requires a label', DEBUG_DEVELOPER);
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this node represent a course section link.
|
||||
* @return boolean
|
||||
*/
|
||||
public function is_section() {
|
||||
return $this->type == navigation_node::TYPE_SECTION;
|
||||
}
|
||||
|
||||
/**
|
||||
* In flat navigation - sections are active if we are looking at activities in the section.
|
||||
* @return boolean
|
||||
*/
|
||||
public function isactive() {
|
||||
global $PAGE;
|
||||
|
||||
if ($this->is_section()) {
|
||||
$active = $PAGE->navigation->find_active_node();
|
||||
if ($active) {
|
||||
while ($active = $active->parent) {
|
||||
if ($active->key == $this->key && $active->type == $this->type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->isactive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for "showdivider"
|
||||
* @return boolean
|
||||
*/
|
||||
public function showdivider() {
|
||||
return $this->showdivider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for "showdivider"
|
||||
* @param $val boolean
|
||||
* @param $label string Label for the group of nodes
|
||||
*/
|
||||
public function set_showdivider($val, $label = '') {
|
||||
$this->showdivider = $val;
|
||||
if ($this->showdivider && empty($label)) {
|
||||
debugging('Navigation region requires a label', DEBUG_DEVELOPER);
|
||||
} else {
|
||||
$this->set_collectionlabel($label);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for "indent"
|
||||
* @return boolean
|
||||
*/
|
||||
public function get_indent() {
|
||||
return $this->indent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for "indent"
|
||||
* @param $val boolean
|
||||
*/
|
||||
public function set_indent($val) {
|
||||
$this->indent = $val;
|
||||
}
|
||||
}
|
||||
|
||||
// Alias this class to the old name.
|
||||
// This file will be autoloaded by the legacyclasses autoload system.
|
||||
// In future all uses of this class will be corrected and the legacy references will be removed.
|
||||
class_alias(flat_navigation_node::class, \flat_navigation_node::class);
|
||||
@@ -386,14 +386,6 @@ class action_menu implements renderable, templatable {
|
||||
$this->attributes['data-owner'] = $selector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0, use action_menu::set_menu_left().
|
||||
*/
|
||||
#[\core\attribute\deprecated('action_menu::set_menu_left', since: '4.0', mdl: 'MDL-72466', final: true)]
|
||||
public function set_alignment(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string to describe the alignment.
|
||||
*
|
||||
@@ -423,14 +415,6 @@ class action_menu implements renderable, templatable {
|
||||
$this->dropdownalignment = 'dropdown-menu-start';
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3, use set_boundary() method instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('action_menu::set_boundary', since: '4.3', mdl: 'MDL-77375', final: true)]
|
||||
public function set_constraint(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the overflow constraint boundary of the dropdown menu.
|
||||
* @see https://getbootstrap.com/docs/4.6/components/dropdowns/#options The 'boundary' option in the Bootstrap documentation
|
||||
|
||||
@@ -45,14 +45,6 @@ class link extends action_link implements renderable {
|
||||
*/
|
||||
public $actionmenu = null;
|
||||
|
||||
/**
|
||||
* The number of instances of this action menu link (and its subclasses).
|
||||
*
|
||||
* @var int
|
||||
* @deprecated since Moodle 4.4.
|
||||
*/
|
||||
protected static $instance = 1;
|
||||
|
||||
/**
|
||||
* Constructs the object.
|
||||
*
|
||||
|
||||
@@ -461,14 +461,6 @@ class core_renderer extends renderer_base {
|
||||
return '<div role="main">' . $this->unique_main_content_token . '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-78744
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78744', final: true)]
|
||||
public function activity_information() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns standard navigation between activities in a course.
|
||||
*
|
||||
@@ -2383,13 +2375,6 @@ class core_renderer extends renderer_base {
|
||||
return html_writer::tag('a', $output, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
public function htmllize_file_tree() {
|
||||
throw new coding_exception('This function is deprecated and no longer relevant.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML to display the file picker
|
||||
*
|
||||
|
||||
@@ -421,14 +421,6 @@ class renderer_base {
|
||||
return !empty($logo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)]
|
||||
public function should_display_main_logo() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the moodle page object.
|
||||
*
|
||||
|
||||
@@ -476,10 +476,6 @@ class page_requirements_manager {
|
||||
* @param bool $inhead initialise in head
|
||||
*/
|
||||
public function js($url, $inhead = false) {
|
||||
if ($url == '/question/qengine.js') {
|
||||
debugging('The question/qengine.js has been deprecated. ' .
|
||||
'Please use core_question/question_engine', DEBUG_DEVELOPER);
|
||||
}
|
||||
$url = $this->js_fix_url($url);
|
||||
$where = $inhead ? 'head' : 'footer';
|
||||
$this->jsincludes[$where][$url->out()] = $url;
|
||||
@@ -862,13 +858,6 @@ class page_requirements_manager {
|
||||
'requires' => ['node', 'overlay', 'event-mouseenter'],
|
||||
];
|
||||
break;
|
||||
case 'core_question_engine':
|
||||
$module = [
|
||||
'name' => 'core_question_engine',
|
||||
'fullpath' => '/question/qengine.js',
|
||||
'requires' => ['node', 'event'],
|
||||
];
|
||||
break;
|
||||
case 'core_rating':
|
||||
$module = [
|
||||
'name' => 'core_rating',
|
||||
|
||||
@@ -91,14 +91,6 @@ class report_helper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)]
|
||||
public static function save_selected_report() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the right SQL / params for the group filter depending on the filterparams, course and group settings.
|
||||
*
|
||||
|
||||
@@ -688,14 +688,6 @@ class manager {
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-67648
|
||||
*/
|
||||
#[\core\attribute\deprecated('\core\task\manager::get_next_adhoc_task()', since: '4.1', mdl: 'MDL-67648', final: true)]
|
||||
public static function ensure_adhoc_task_qos(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will dispatch the next adhoc task in the queue. The task will be handed out
|
||||
* with an open lock - possibly on the entire cron process. Make sure you call either
|
||||
|
||||
@@ -115,34 +115,6 @@ abstract class task_base {
|
||||
return $this->cronlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 See MDL-67667
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: null,
|
||||
since: '4.4',
|
||||
mdl: 'MDL-67667',
|
||||
reason: 'Blocking tasks are no longer supported',
|
||||
final: true,
|
||||
)]
|
||||
public function set_blocking() {
|
||||
\core\deprecation::emit_deprecation([$this, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 See MDL-67667
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: null,
|
||||
since: '4.4',
|
||||
mdl: 'MDL-67667',
|
||||
reason: 'Blocking tasks are no longer supported',
|
||||
final: true,
|
||||
)]
|
||||
public function is_blocking() {
|
||||
\core\deprecation::emit_deprecation([$this, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for $component.
|
||||
* @param string $component
|
||||
|
||||
@@ -74,20 +74,6 @@ class core_text {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0. See MDL-53544.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'core_text::reset_caches',
|
||||
since: '4.0',
|
||||
reason:'Typo3 has been removed and caches aren\'t used anymore.',
|
||||
mdl: 'MDL-53544',
|
||||
final: true,
|
||||
)]
|
||||
public static function reset_caches(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Standardise charset name
|
||||
*
|
||||
|
||||
@@ -206,42 +206,6 @@ class core_useragent {
|
||||
return (preg_match($regex, $this->useragent));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Moodle 4.3 MDL-78468 - No longer used. Please use core_useragent::devicetypes instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('core_useragent::devicetypes', since: '4.3', mdl: 'MDL-78468', final: true)]
|
||||
public static function get_device_type_list($includecustomtypes = true) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.3.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
null,
|
||||
since: '4.3',
|
||||
reason: 'All functions associated with device specific themes are being removed',
|
||||
mdl: 'MDL-77793',
|
||||
final: true
|
||||
)]
|
||||
public static function get_device_type_theme($devicetype = null) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.3.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
null,
|
||||
since: '4.3',
|
||||
reason: 'All functions associated with device specific themes are being removed',
|
||||
mdl: 'MDL-77793',
|
||||
final: true
|
||||
)]
|
||||
public static function get_device_type_cfg_var_name($devicetype = null) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the device type the user is currently using.
|
||||
* @return string
|
||||
|
||||
@@ -191,7 +191,6 @@ $legacyclasses = [
|
||||
// Navigation API.
|
||||
\breadcrumb_navigation_node::class => 'navigation/breadcrumb_navigation_node.php',
|
||||
\flat_navigation::class => 'navigation/flat_navigation.php',
|
||||
\flat_navigation_node::class => 'navigation/flat_navigation_node.php',
|
||||
\global_navigation::class => 'navigation/global_navigation.php',
|
||||
\global_navigation_for_ajax::class => 'navigation/global_navigation_for_ajax.php',
|
||||
\navbar::class => 'navigation/navbar.php',
|
||||
|
||||
@@ -2731,14 +2731,6 @@ abstract class enrol_plugin {
|
||||
$context->mark_dirty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since Moodle 4.4.0.
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'Replaced with hooks', since: '4.4', mdl: 'MDL-78551', final: true)]
|
||||
public function update_communication(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete course enrol plugin instance, unenrol all users.
|
||||
* @param object $instance
|
||||
|
||||
+1
-1
@@ -15,6 +15,6 @@ define("core_form/events",["exports","core/str","core/event_dispatcher"],(functi
|
||||
* window.console.log(e.detail.skipValidation); // Whether form validation was skipped.
|
||||
* });
|
||||
*/
|
||||
let changesMadeString;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.types=_exports.triggerUploadStarted=_exports.triggerUploadCompleted=_exports.notifyUploadStarted=_exports.notifyUploadCompleted=_exports.notifyUploadChanged=_exports.notifyFormSubmittedByJavascript=_exports.notifyFormError=_exports.notifyFieldValidationFailure=_exports.notifyFieldStructureChanged=_exports.eventTypes=void 0;const changesMadeCheck=e=>{e&&(e.returnValue=changesMadeString)},eventTypes={formError:"core_form/error",formSubmittedByJavascript:"core_form/submittedByJavascript",formFieldValidationFailed:"core_form/fieldValidationFailed",uploadStarted:"core_form/uploadStarted",uploadCompleted:"core_form/uploadCompleted",uploadChanged:"core_form/uploadChanged",fieldStructureChanged:"core_form/fieldStructureChanged"};_exports.eventTypes=eventTypes;_exports.notifyFormError=field=>(0,_event_dispatcher.dispatchEvent)(eventTypes.formError,{},field);_exports.notifyFormSubmittedByJavascript=function(form){let skipValidation=arguments.length>1&&void 0!==arguments[1]&&arguments[1],fallbackHandled=arguments.length>2&&void 0!==arguments[2]&&arguments[2];skipValidation&&(window.skipClientValidation=!0);const customEvent=(0,_event_dispatcher.dispatchEvent)(eventTypes.formSubmittedByJavascript,{skipValidation:skipValidation,fallbackHandled:fallbackHandled},form);return skipValidation&&(window.skipClientValidation=!1),customEvent};_exports.notifyFieldValidationFailure=(field,message)=>(0,_event_dispatcher.dispatchEvent)(eventTypes.formFieldValidationFailed,{message:message},field,{cancelable:!0});const notifyUploadStarted=async elementId=>(changesMadeString=await(0,_str.getString)("changesmadereallygoaway","moodle"),window.addEventListener("beforeunload",changesMadeCheck),(0,_event_dispatcher.dispatchEvent)(eventTypes.uploadStarted,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1}));_exports.notifyUploadStarted=notifyUploadStarted;const notifyUploadCompleted=elementId=>(window.removeEventListener("beforeunload",changesMadeCheck),(0,_event_dispatcher.dispatchEvent)(eventTypes.uploadCompleted,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1}));_exports.notifyUploadCompleted=notifyUploadCompleted;const triggerUploadStarted=notifyUploadStarted;_exports.triggerUploadStarted=triggerUploadStarted;const triggerUploadCompleted=notifyUploadCompleted;_exports.triggerUploadCompleted=triggerUploadCompleted;_exports.types={uploadStarted:"core_form/uploadStarted",uploadCompleted:"core_form/uploadCompleted"};_exports.notifyUploadChanged=elementId=>(0,_event_dispatcher.dispatchEvent)(eventTypes.uploadChanged,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1});_exports.notifyFieldStructureChanged=elementId=>(0,_event_dispatcher.dispatchEvent)(eventTypes.fieldStructureChanged,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1})}));
|
||||
let changesMadeString;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.triggerUploadStarted=_exports.triggerUploadCompleted=_exports.notifyUploadStarted=_exports.notifyUploadCompleted=_exports.notifyUploadChanged=_exports.notifyFormSubmittedByJavascript=_exports.notifyFormError=_exports.notifyFieldValidationFailure=_exports.notifyFieldStructureChanged=_exports.eventTypes=void 0;const changesMadeCheck=e=>{e&&(e.returnValue=changesMadeString)},eventTypes={formError:"core_form/error",formSubmittedByJavascript:"core_form/submittedByJavascript",formFieldValidationFailed:"core_form/fieldValidationFailed",uploadStarted:"core_form/uploadStarted",uploadCompleted:"core_form/uploadCompleted",uploadChanged:"core_form/uploadChanged",fieldStructureChanged:"core_form/fieldStructureChanged"};_exports.eventTypes=eventTypes;_exports.notifyFormError=field=>(0,_event_dispatcher.dispatchEvent)(eventTypes.formError,{},field);_exports.notifyFormSubmittedByJavascript=function(form){let skipValidation=arguments.length>1&&void 0!==arguments[1]&&arguments[1],fallbackHandled=arguments.length>2&&void 0!==arguments[2]&&arguments[2];skipValidation&&(window.skipClientValidation=!0);const customEvent=(0,_event_dispatcher.dispatchEvent)(eventTypes.formSubmittedByJavascript,{skipValidation:skipValidation,fallbackHandled:fallbackHandled},form);return skipValidation&&(window.skipClientValidation=!1),customEvent};_exports.notifyFieldValidationFailure=(field,message)=>(0,_event_dispatcher.dispatchEvent)(eventTypes.formFieldValidationFailed,{message:message},field,{cancelable:!0});const notifyUploadStarted=async elementId=>(changesMadeString=await(0,_str.getString)("changesmadereallygoaway","moodle"),window.addEventListener("beforeunload",changesMadeCheck),(0,_event_dispatcher.dispatchEvent)(eventTypes.uploadStarted,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1}));_exports.notifyUploadStarted=notifyUploadStarted;const notifyUploadCompleted=elementId=>(window.removeEventListener("beforeunload",changesMadeCheck),(0,_event_dispatcher.dispatchEvent)(eventTypes.uploadCompleted,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1}));_exports.notifyUploadCompleted=notifyUploadCompleted;const triggerUploadStarted=notifyUploadStarted;_exports.triggerUploadStarted=triggerUploadStarted;const triggerUploadCompleted=notifyUploadCompleted;_exports.triggerUploadCompleted=triggerUploadCompleted;_exports.notifyUploadChanged=elementId=>(0,_event_dispatcher.dispatchEvent)(eventTypes.uploadChanged,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1});_exports.notifyFieldStructureChanged=elementId=>(0,_event_dispatcher.dispatchEvent)(eventTypes.fieldStructureChanged,{},document.getElementById(elementId),{bubbles:!0,cancellable:!1})}));
|
||||
|
||||
//# sourceMappingURL=events.min.js.map
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -255,16 +255,6 @@ export const triggerUploadStarted = notifyUploadStarted;
|
||||
*/
|
||||
export const triggerUploadCompleted = notifyUploadCompleted;
|
||||
|
||||
/**
|
||||
* List of the events.
|
||||
*
|
||||
* @deprecated since Moodle 4.0. See {@link module:core_form/events.eventTypes eventTypes} instead.
|
||||
**/
|
||||
export const types = {
|
||||
uploadStarted: 'core_form/uploadStarted',
|
||||
uploadCompleted: 'core_form/uploadCompleted',
|
||||
};
|
||||
|
||||
/**
|
||||
* Trigger an event to notify the file upload field has been changed.
|
||||
*
|
||||
|
||||
@@ -114,20 +114,10 @@ export default class ModalForm {
|
||||
* @returns {Promise}
|
||||
*/
|
||||
getModalModule() {
|
||||
if (!this.config.moduleName && this.config.modalConfig.type && this.config.modalConfig.type !== 'SAVE_CANCEL') {
|
||||
// Legacy loader for plugins that were not updated with Moodle 4.3 changes.
|
||||
window.console.warn(
|
||||
'Passing config.modalConfig.type to ModalForm has been deprecated since Moodle 4.3. ' +
|
||||
'Please pass config.modalName instead with the full module name.',
|
||||
);
|
||||
return import('core/modal')
|
||||
.then((Modal) => Modal.create(this.config.modalConfig));
|
||||
} else {
|
||||
// New loader for Moodle 4.3 and above.
|
||||
const moduleName = this.config.moduleName ?? 'core/modal_save_cancel';
|
||||
return import(moduleName)
|
||||
.then((module) => module.create(this.config.modalConfig));
|
||||
}
|
||||
// New loader for Moodle 4.3 and above.
|
||||
const moduleName = this.config.moduleName ?? 'core/modal_save_cancel';
|
||||
return import(moduleName)
|
||||
.then((module) => module.create(this.config.modalConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -193,13 +193,6 @@ M.util.CollapsibleRegion.prototype.div = null;
|
||||
*/
|
||||
M.util.CollapsibleRegion.prototype.icon = null;
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3.
|
||||
*/
|
||||
M.util.set_user_preference = function() {
|
||||
throw new Error('M.util.set_user_preference is deprecated. Please use the "core_user/repository" module instead.');
|
||||
};
|
||||
|
||||
/**
|
||||
* Prints a confirmation dialog in the style of DOM.confirm().
|
||||
*
|
||||
|
||||
@@ -500,12 +500,6 @@ define('MOD_PURPOSE_CONTENT', 'content');
|
||||
define('MOD_PURPOSE_INTERACTIVECONTENT', 'interactivecontent');
|
||||
/** Module purpose other */
|
||||
define('MOD_PURPOSE_OTHER', 'other');
|
||||
/**
|
||||
* Module purpose interface
|
||||
* @deprecated since Moodle 4.4
|
||||
* @todo MDL-80701 Remove in Moodle 4.8
|
||||
*/
|
||||
define('MOD_PURPOSE_INTERFACE', 'interface');
|
||||
|
||||
/** True if module can be quickly created without filling a previous form. */
|
||||
define('FEATURE_QUICKCREATE', 'quickcreate');
|
||||
|
||||
@@ -316,12 +316,4 @@ class mnet_peer {
|
||||
$this->application = $DB->get_record('mnet_application', array('id'=>$this->applicationid));
|
||||
$this->bootstrapped = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-77341', final: true)]
|
||||
public function get_public_key(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,13 +46,6 @@ define('ASSIGN_FILTER_DRAFT', 'draft');
|
||||
define('ASSIGN_MARKER_FILTER_NO_MARKER', -1);
|
||||
|
||||
// Reopen attempt methods.
|
||||
/**
|
||||
* ASSIGN_ATTEMPT_REOPEN_METHOD_NONE - Reopening attempts is not allowed.
|
||||
*
|
||||
* @deprecated since Moodle 4.4
|
||||
* @todo MDL-81977 This will be deleted in Moodle 4.8.
|
||||
*/
|
||||
define('ASSIGN_ATTEMPT_REOPEN_METHOD_NONE', 'none');
|
||||
define('ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL', 'manual');
|
||||
define('ASSIGN_ATTEMPT_REOPEN_METHOD_AUTOMATIC', 'automatic');
|
||||
define('ASSIGN_ATTEMPT_REOPEN_METHOD_UNTILPASS', 'untilpass');
|
||||
|
||||
@@ -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/>.
|
||||
|
||||
/**
|
||||
* Legacy file to avoid exceptions when scripts require it.
|
||||
* Please use classes from mod/assign/classes/output instead.
|
||||
*
|
||||
* @deprecated since Moodle 4.0 - please do not include this file anymore.
|
||||
* @package mod_assign
|
||||
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
// TODO - MDL-72749 add debugging message.
|
||||
@@ -21,11 +21,3 @@
|
||||
* @copyright 2024 Paul Holden <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4.
|
||||
*/
|
||||
#[\core\attribute\deprecated('book_get_nav_classes', since: '4.4', final: true)]
|
||||
function book_get_nav_classes() {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
@@ -22,99 +22,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75146 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'mod_data\manager::get_template and mod_data\template::parse_entries',
|
||||
since: '4.1',
|
||||
mdl: 'MDL-75146',
|
||||
final: true,
|
||||
)]
|
||||
function data_print_template(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75148 - please, use the preset::get_name_from_plugin() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::get_name_from_plugin()', since: '4.1', mdl: 'MDL-75148', final: true)]
|
||||
function data_preset_name(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75148 - please, use the manager::get_available_presets() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\manager::get_available_presets()', since: '4.1', mdl: 'MDL-75148', final: true)]
|
||||
function data_get_available_presets(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75148 - please, use the manager::get_available_saved_presets() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\manager::get_available_saved_presets()', since: '4.1', mdl: 'MDL-75148', final: true)]
|
||||
function data_get_available_site_presets(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75187 - please, use the preset::delete() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::delete()', since: '4.1', mdl: 'MDL-75187', final: true)]
|
||||
function data_delete_site_preset(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75142 - please, use the preset::save() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::save()', since: '4.1', mdl: 'MDL-75142', final: true)]
|
||||
function data_presets_save(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75142 - please, use the protected preset::generate_preset_xml() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::generate_preset_xml()', since: '4.1', mdl: 'MDL-75142', final: true)]
|
||||
function data_presets_generate_xml(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75142 - please, use the preset::export() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::export()', since: '4.1', mdl: 'MDL-75142', final: true)]
|
||||
function data_presets_export(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75187 - please, use the preset::can_manage() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::can_manage()', since: '4.1', mdl: 'MDL-75187', final: true)]
|
||||
function data_user_can_delete_preset(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75146 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\manager::set_module_viewed', since: '4.1', mdl: 'MDL-75146', final: true)]
|
||||
function data_view(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75148 - please, use the preset::is_directory_a_preset() function instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data\preset::is_directory_a_preset()', since: '4.1', mdl: 'MDL-75148', final: true)]
|
||||
function is_directory_a_preset(): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3.
|
||||
* @global object
|
||||
|
||||
@@ -27,15 +27,6 @@ use mod_data\manager;
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
class mod_data_renderer extends plugin_renderer_base {
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 MDL-75140 - please do not use this class any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_data_renderer::importing_preset()', since: '4.1', mdl: 'MDL-75140', final: true)]
|
||||
public function import_setting_mappings(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Importing a preset on a database module.
|
||||
*
|
||||
|
||||
@@ -1,295 +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/>.
|
||||
|
||||
/**
|
||||
* prints the forms to choose an item-typ to create items and to choose a template to use
|
||||
*
|
||||
* @author Andreas Grabs
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
* @package mod_feedback
|
||||
*/
|
||||
|
||||
//It must be included from a Moodle page
|
||||
if (!defined('MOODLE_INTERNAL')) {
|
||||
die('Direct access to this script is forbidden.');
|
||||
}
|
||||
|
||||
require_once($CFG->libdir.'/formslib.php');
|
||||
|
||||
/**
|
||||
* The feedback_edit_use_template_form
|
||||
*
|
||||
* @deprecated since 4.0 new dynamic forms created
|
||||
* @todo MDL-83522 This class will be deleted in Moodle 6.0.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: 'mod_feedback\form\use_template_form',
|
||||
since: '4.0',
|
||||
mdl: 'MDL-71914',
|
||||
reason: 'New dynamic forms have been created instead.'
|
||||
)]
|
||||
class feedback_edit_use_template_form extends moodleform {
|
||||
public function __construct($action = null, $customdata = null, $method = 'post', $target = '',
|
||||
$attributes = null, $editable = true, $ajaxformdata = null) {
|
||||
debugging('Class feedback_edit_use_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
parent::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @return array
|
||||
*/
|
||||
public static function get_js_module() {
|
||||
debugging('Class feedback_edit_use_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::get_js_module();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $simulatedsubmitteddata
|
||||
* @param array $simulatedsubmittedfiles
|
||||
* @param string $method
|
||||
* @param null $formidentifier
|
||||
* @return array
|
||||
*/
|
||||
public static function mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
|
||||
$method = 'post', $formidentifier = null) {
|
||||
debugging('Class feedback_edit_use_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public static function mock_generate_submit_keys($data = []) {
|
||||
debugging('Class feedback_edit_use_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::mock_generate_submit_keys($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $simulatedsubmitteddata
|
||||
* @param array $simulatedsubmittedfiles
|
||||
* @param string $method
|
||||
* @param null $formidentifier
|
||||
*/
|
||||
public static function mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
|
||||
$method = 'post', $formidentifier = null) {
|
||||
debugging('Class feedback_edit_use_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
parent::mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Form definition
|
||||
*/
|
||||
public function definition() {
|
||||
$mform =& $this->_form;
|
||||
|
||||
$course = $this->_customdata['course'];
|
||||
|
||||
$elementgroup = array();
|
||||
//headline
|
||||
$mform->addElement('header', 'using_templates', get_string('using_templates', 'feedback'));
|
||||
// hidden elements
|
||||
$mform->addElement('hidden', 'id');
|
||||
$mform->setType('id', PARAM_INT);
|
||||
|
||||
// visible elements
|
||||
$templates_options = array();
|
||||
$owntemplates = feedback_get_template_list($course, 'own');
|
||||
$publictemplates = feedback_get_template_list($course, 'public');
|
||||
|
||||
$options = array();
|
||||
if ($owntemplates or $publictemplates) {
|
||||
$options[''] = array('' => get_string('choosedots'));
|
||||
|
||||
if ($owntemplates) {
|
||||
$courseoptions = array();
|
||||
foreach ($owntemplates as $template) {
|
||||
$courseoptions[$template->id] = format_string($template->name);
|
||||
}
|
||||
$options[get_string('course')] = $courseoptions;
|
||||
}
|
||||
|
||||
if ($publictemplates) {
|
||||
$publicoptions = array();
|
||||
foreach ($publictemplates as $template) {
|
||||
$publicoptions[$template->id] = format_string($template->name);
|
||||
}
|
||||
$options[get_string('public', 'feedback')] = $publicoptions;
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
'onChange="this.form.submit()"',
|
||||
'data-form-change-checker-override="1"',
|
||||
];
|
||||
$elementgroup[] = $mform->createElement(
|
||||
'selectgroups',
|
||||
'templateid',
|
||||
get_string('using_templates', 'feedback'),
|
||||
$options,
|
||||
implode(' ', $attributes)
|
||||
);
|
||||
|
||||
$elementgroup[] = $mform->createElement('submit',
|
||||
'use_template',
|
||||
get_string('use_this_template', 'feedback'),
|
||||
array('class' => 'hiddenifjs'));
|
||||
|
||||
$mform->addGroup($elementgroup, 'elementgroup', '', array(' '), false);
|
||||
} else {
|
||||
$mform->addElement('static', 'info', get_string('no_templates_available_yet', 'feedback'));
|
||||
}
|
||||
|
||||
$this->set_data(array('id' => $this->_customdata['id']));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The feedback_edit_create_template_form
|
||||
*
|
||||
* @deprecated since 4.0, new dynamic forms have been created instead.
|
||||
*/
|
||||
class feedback_edit_create_template_form extends moodleform {
|
||||
public function __construct($action = null, $customdata = null, $method = 'post',
|
||||
$target = '', $attributes = null, $editable = true, $ajaxformdata = null) {
|
||||
debugging('Class feedback_edit_create_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
parent::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @return array
|
||||
*/
|
||||
public static function get_js_module() {
|
||||
debugging('Class feedback_edit_create_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::get_js_module();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $simulatedsubmitteddata
|
||||
* @param array $simulatedsubmittedfiles
|
||||
* @param string $method
|
||||
* @param null $formidentifier
|
||||
* @return array
|
||||
*/
|
||||
public static function mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
|
||||
$method = 'post', $formidentifier = null) {
|
||||
debugging('Class feedback_edit_create_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public static function mock_generate_submit_keys($data = []) {
|
||||
debugging('Class feedback_edit_create_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::mock_generate_submit_keys($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $simulatedsubmitteddata
|
||||
* @param array $simulatedsubmittedfiles
|
||||
* @param string $method
|
||||
* @param null $formidentifier
|
||||
*/
|
||||
public static function mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
|
||||
$method = 'post', $formidentifier = null) {
|
||||
debugging('Class feedback_edit_create_template_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
parent::mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Form definition
|
||||
*/
|
||||
public function definition() {
|
||||
$mform =& $this->_form;
|
||||
|
||||
// hidden elements
|
||||
$mform->addElement('hidden', 'id');
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'do_show');
|
||||
$mform->setType('do_show', PARAM_ALPHANUMEXT);
|
||||
$mform->setConstant('do_show', 'edit');
|
||||
|
||||
// visible elements
|
||||
$elementgroup = array();
|
||||
|
||||
$elementgroup[] = $mform->createElement('text',
|
||||
'templatename',
|
||||
get_string('name', 'feedback'),
|
||||
['maxlength' => '200']);
|
||||
|
||||
if (has_capability('mod/feedback:createpublictemplate', context_system::instance())) {
|
||||
$elementgroup[] = $mform->createElement('checkbox',
|
||||
'ispublic', '',
|
||||
get_string('public', 'feedback'));
|
||||
}
|
||||
|
||||
|
||||
$mform->addGroup($elementgroup,
|
||||
'elementgroup',
|
||||
get_string('name', 'feedback'),
|
||||
array(' '),
|
||||
false);
|
||||
|
||||
// Buttons.
|
||||
$mform->addElement('submit', 'create_template', get_string('save_as_new_template', 'feedback'));
|
||||
|
||||
$mform->setType('templatename', PARAM_TEXT);
|
||||
|
||||
$this->set_data(array('id' => $this->_customdata['id']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Form validation
|
||||
*
|
||||
* @param array $data array of ("fieldname"=>value) of submitted data
|
||||
* @param array $files array of uploaded files "element_name"=>tmp_file_path
|
||||
* @return array of "element_name"=>"error_description" if there are errors,
|
||||
* or an empty array if everything is OK (true allowed for backwards compatibility too).
|
||||
*/
|
||||
public function validation($data, $files) {
|
||||
$errors = parent::validation($data, $files);
|
||||
if (!isset($data['templatename']) || trim(strval($data['templatename'])) === '') {
|
||||
$errors['elementgroup'] = get_string('name_required', 'feedback');
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,128 +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/>.
|
||||
|
||||
/**
|
||||
* prints the form to confirm use template
|
||||
*
|
||||
* @author Andreas Grabs
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
* @package mod_feedback
|
||||
*/
|
||||
|
||||
if (!defined('MOODLE_INTERNAL')) {
|
||||
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
||||
}
|
||||
|
||||
require_once($CFG->libdir.'/formslib.php');
|
||||
|
||||
/**
|
||||
* The mod_feedback_use_templ_form
|
||||
*
|
||||
* @deprecated since 4.0. New dynamic forms have been created instead.
|
||||
* @todo MDL-83522 This class will be deleted in Moodle 6.0.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
replacement: 'mod_feedback\form\use_template_form',
|
||||
since: '4.0',
|
||||
mdl: 'MDL-71914',
|
||||
reason: 'New dynamic forms have been created instead.'
|
||||
)]
|
||||
class mod_feedback_use_templ_form extends moodleform {
|
||||
public function __construct($action = null, $customdata = null, $method = 'post', $target = '',
|
||||
$attributes = null, $editable = true, $ajaxformdata = null) {
|
||||
debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
parent::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata);
|
||||
}
|
||||
|
||||
public function definition() {
|
||||
$mform =& $this->_form;
|
||||
|
||||
// visible elements
|
||||
$mform->addElement('radio', 'deleteolditems', '', get_string('delete_old_items', 'feedback'), 1);
|
||||
$mform->addElement('radio', 'deleteolditems', '', get_string('append_new_items', 'feedback'), 0);
|
||||
$mform->setType('deleteolditems', PARAM_INT);
|
||||
$mform->setDefault('deleteolditems', 1);
|
||||
|
||||
// hidden elements
|
||||
$mform->addElement('hidden', 'id');
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$mform->addElement('hidden', 'templateid');
|
||||
$mform->setType('templateid', PARAM_INT);
|
||||
$mform->addElement('hidden', 'do_show');
|
||||
$mform->setType('do_show', PARAM_INT);
|
||||
$mform->setConstant('do_show', 'edit');
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// buttons
|
||||
$this->add_action_buttons();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @return array
|
||||
*/
|
||||
public static function get_js_module() {
|
||||
debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::get_js_module();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $simulatedsubmitteddata
|
||||
* @param array $simulatedsubmittedfiles
|
||||
* @param string $method
|
||||
* @param null $formidentifier
|
||||
* @return array
|
||||
*/
|
||||
public static function mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
|
||||
$method = 'post', $formidentifier = null) {
|
||||
debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::mock_ajax_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public static function mock_generate_submit_keys($data = []) {
|
||||
debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
return parent::mock_generate_submit_keys($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides parent static method for deprecation purposes.
|
||||
*
|
||||
* @deprecated since 4.0
|
||||
* @param array $simulatedsubmitteddata
|
||||
* @param array $simulatedsubmittedfiles
|
||||
* @param string $method
|
||||
* @param null $formidentifier
|
||||
*/
|
||||
public static function mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles = array(),
|
||||
$method = 'post', $formidentifier = null) {
|
||||
debugging('Class mod_feedback_use_templ_form is deprecated. Replaced with dynamic forms.', DEBUG_DEVELOPER);
|
||||
parent::mock_submit($simulatedsubmitteddata, $simulatedsubmittedfiles, $method, $formidentifier);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,14 +95,6 @@ class mod_folder_renderer extends plugin_renderer_base {
|
||||
return $this->render_from_template('mod_folder/folder', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('renderable_tree_elements()', since: '4.3', mdl: 'MDL-78847', final: true)]
|
||||
protected function htmllize_tree() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal function - Creates elements structure suitable for mod_folder/folder template.
|
||||
*
|
||||
|
||||
@@ -22,18 +22,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* This function prints the overview of a discussion in the forum listing.
|
||||
* It needs some discussion information and some post information, these
|
||||
* happen to be combined for efficiency in the $post parameter by the function
|
||||
* that calls this one: forum_print_latest_discussions()
|
||||
*
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
function forum_print_discussion_header() {
|
||||
throw new \coding_exception('forum_print_discussion_header has been deprecated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of forums not tracked by the user.
|
||||
*
|
||||
|
||||
@@ -21,11 +21,3 @@
|
||||
* @copyright 2024 Paul Holden <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76953', final: true)]
|
||||
function imscp_libxml_disable_entity_loader() {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
@@ -21,11 +21,3 @@
|
||||
* @copyright 2022 Mihail Geshoski <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76953', final: true)]
|
||||
function lti_libxml_disable_entity_loader() {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
@@ -111,22 +111,6 @@ class slot_random {
|
||||
$this->record->quizid = $quiz->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function set_tags($tags) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function set_tags_by_id($tagids) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set filter condition.
|
||||
*
|
||||
|
||||
@@ -998,14 +998,6 @@ class renderer extends plugin_renderer_base {
|
||||
return $this->render($button) . ($preflightcheckform ? $preflightcheckform->render() : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0 MDL-71915 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated('generate_no_questions_message()', since: '4.0', mdl: 'MDL-71915', final: true)]
|
||||
public function no_questions_message($canedit, $editurl) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs an error message for any guests accessing the quiz
|
||||
*
|
||||
@@ -1459,28 +1451,4 @@ class renderer extends plugin_renderer_base {
|
||||
['id' => 'connection-error', 'style' => 'display: none;', 'role' => 'alert']) .
|
||||
html_writer::tag('div', $ok, ['id' => 'connection-ok', 'style' => 'display: none;', 'role' => 'alert']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use render_links_to_other_attempts instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('render_links_to_other_attempts()', since: '4.2', mdl: 'MDL-76614', final: true)]
|
||||
protected function render_mod_quiz_links_to_other_attempts(links_to_other_attempts $links) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use render_navigation_question_button instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('render_navigation_question_button()', since: '4.2', mdl: 'MDL-76614', final: true)]
|
||||
protected function render_quiz_nav_question_button(navigation_question_button $button) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use render_navigation_section_heading instead.
|
||||
*/
|
||||
#[\core\attribute\deprecated('render_navigation_section_heading()', since: '4.2', mdl: 'MDL-76614', final: true)]
|
||||
protected function render_quiz_nav_section_heading(navigation_section_heading $heading) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,15 +183,6 @@ class structure {
|
||||
return $this->is_real_question($slotnumber) && !quiz_has_attempts($this->quizobj->get_quizid());
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.2. $slot->displayednumber is no longer used. If you need this,
|
||||
* use isset(...->displaynumber), but this method was not used.
|
||||
*/
|
||||
#[\core\attribute\deprecated('isset(...->displaynumber)()', since: '4.2', mdl: 'MDL-77656', final: true)]
|
||||
public function is_display_number_customised(int $slotid): bool {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make slot display number in place editable api call.
|
||||
|
||||
|
||||
@@ -22,95 +22,3 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
use mod_quiz\quiz_settings;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* @deprecated in 4.1 use mod_quiz\structure::has_use_capability(...) instead. MDL-76898
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_quiz\structure::has_use_capability()', since: '4.1', mdl: 'MDL-76898', final: true)]
|
||||
function quiz_has_question_use($quiz, $slot) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use grade_calculator::recompute_quiz_sumgrades.
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_calculator::recompute_quiz_sumgrades()', since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_update_sumgrades($quiz) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use grade_calculator::recompute_all_attempt_sumgrades.
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_calculator::recompute_all_attempt_sumgrades()', since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_update_all_attempt_sumgrades($quiz) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use grade_calculator::recompute_all_final_grades.
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_calculator::recompute_all_final_grades()', since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_update_all_final_grades($quiz) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use grade_calculator::update_quiz_maximum_grade.
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_calculator::update_quiz_maximum_grade()', since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_set_grade($newgrade, $quiz) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. Please use grade_calculator::recompute_final_grade.
|
||||
*/
|
||||
#[\core\attribute\deprecated('grade_calculator::recompute_final_grade()', since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_save_best_grade($quiz, $userid = null, $attempts = []) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. No direct replacement.
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_calculate_best_grade($quiz, $attempts) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.2. No direct replacement.
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.2', mdl: 'MDL-76897', final: true)]
|
||||
function quiz_calculate_best_attempt($quiz, $attempts) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 MDL-80300
|
||||
*/
|
||||
#[\core\attribute\deprecated('override_manager::delete_override_by_id', since: '4.4', mdl: '80300', final: true)]
|
||||
function quiz_delete_override($quiz, $overrideid, $log = true) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 MDL-80300
|
||||
*/
|
||||
#[\core\attribute\deprecated('override_manager::delete_all_overrides', since: '4.4', mdl: '80300', final: true)]
|
||||
function quiz_delete_all_overrides($quiz, $log = true) {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('mod_quiz\structure::add_random_questions()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
function quiz_add_random_questions(stdClass $quiz, int $addonpage, int $categoryid, int $number): void {
|
||||
\core\deprecation::emit_deprecation(__FUNCTION__);
|
||||
}
|
||||
|
||||
@@ -1643,8 +1643,7 @@ function quiz_get_js_module() {
|
||||
return [
|
||||
'name' => 'mod_quiz',
|
||||
'fullpath' => '/mod/quiz/module.js',
|
||||
'requires' => ['base', 'dom', 'event-delegate', 'event-key',
|
||||
'core_question_engine'],
|
||||
'requires' => ['base', 'dom', 'event-delegate', 'event-key'],
|
||||
'strings' => [
|
||||
['cancel', 'moodle'],
|
||||
['flagged', 'question'],
|
||||
|
||||
@@ -239,14 +239,6 @@ class mod_wiki_renderer extends plugin_renderer_base {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0 MDL-72413. Now handled in PAGE's activity header
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72413', final: true)]
|
||||
public function wiki_info() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
public function tabs($page, $tabitems, $options) {
|
||||
$tabs = array();
|
||||
$context = context_module::instance($this->page->cm->id);
|
||||
|
||||
@@ -90,14 +90,6 @@ class question_history_view extends view {
|
||||
return $this->requiredcolumns;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function display_advanced_search_form($advancedsearch): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
public function allow_add_questions(): bool {
|
||||
// As we dont want to create questions in this page.
|
||||
return false;
|
||||
|
||||
@@ -108,46 +108,6 @@ class category_condition extends condition {
|
||||
return $this->course->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function display_options() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated('foobar::blah()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function display_options_adv() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('core_question renderer', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function display_category_form($contexts, $pageurl, $current) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('qbank_managecategories/choose_category template', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public static function print_choose_category_message(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public static function get_current_category($categoryandcontext) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return category and context ID from compound parameter.
|
||||
*
|
||||
@@ -178,14 +138,6 @@ class category_condition extends condition {
|
||||
MUST_EXIST);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321 - please do not use this function any more.
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function print_category_info($category): string {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
public static function build_query_from_filter(array $filter): array {
|
||||
global $DB;
|
||||
$recursive = false;
|
||||
|
||||
@@ -36,45 +36,6 @@ class helper {
|
||||
*/
|
||||
private const NEED_FOR_REVISION_UPPER_THRESHOLD = 50;
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 please use the method from statistics_bulk_loader.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'statistics_bulk_loader or get_required_statistics_fields',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-75576',
|
||||
final: true
|
||||
)]
|
||||
public static function calculate_average_question_facility(int $questionid): ?float {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 please use the method from statistics_bulk_loader.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'statistics_bulk_loader or get_required_statistics_fields',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-75576',
|
||||
final: true
|
||||
)]
|
||||
public static function calculate_average_question_discriminative_efficiency(int $questionid): ?float {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 please use the method from statistics_bulk_loader.
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'statistics_bulk_loader or get_required_statistics_fields',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-75576',
|
||||
final: true
|
||||
)]
|
||||
public static function calculate_average_question_discrimination_index(int $questionid): ?float {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a number to a localised percentage with specified decimal points.
|
||||
*
|
||||
|
||||
@@ -89,11 +89,4 @@ abstract class bulk_action_base extends view_component {
|
||||
public function initialise_javascript(): void {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0
|
||||
*/
|
||||
public function get_bulk_action_key() {
|
||||
throw new \coding_exception(__FUNCTION__ . '() has been removed.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,15 +101,6 @@ class random_question_loader {
|
||||
return $questionid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_next_filtered_question_id()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function get_next_question_id($categoryid, $includesubcategories, $tagids = []): ?int {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Key for filtered questions.
|
||||
* This function replace get_category_key
|
||||
@@ -121,14 +112,6 @@ class random_question_loader {
|
||||
return sha1(json_encode($filters));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_filtered_questions_key()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function get_category_key($categoryid, $includesubcategories, $tagids = []): string {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate {@see $availablequestionscache} according to filter conditions.
|
||||
*
|
||||
@@ -228,14 +211,6 @@ class random_question_loader {
|
||||
ksort($this->availablequestionscache[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('ensure_filtered_questions_loaded()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function ensure_questions_for_category_loaded($categoryid, $includesubcategories, $tagids = []): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the internal data structures to indicate that a given question has
|
||||
* been used one more time.
|
||||
@@ -282,14 +257,6 @@ class random_question_loader {
|
||||
return $questionids;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_filtered_question_ids()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function get_question_ids($categoryid, $includesubcategories, $tagids = []): array {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a given question is available in a given category. If so, mark it used.
|
||||
* If an optional list of tag ids are provided, then the question must be tagged with
|
||||
@@ -313,14 +280,6 @@ class random_question_loader {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('is_filtered_question_available()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function is_question_available($categoryid, $includesubcategories, $questionid, $tagids = []): bool {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of available questions for the given criteria.
|
||||
*
|
||||
@@ -368,14 +327,6 @@ class random_question_loader {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('get_filtered_questions()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function get_questions($categoryid, $includesubcategories, $tagids = [], $limit = 100, $offset = 0, $fields = []) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count number of filtered questions
|
||||
*
|
||||
@@ -386,12 +337,4 @@ class random_question_loader {
|
||||
$questionids = $this->get_filtered_question_ids($filters);
|
||||
return count($questionids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('count_filtered_questions()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function count_questions($categoryid, $includesubcategories, $tagids = []): int {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,19 +326,6 @@ class view {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'create a qbank plugin and implement a filter object',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-72321',
|
||||
final: true
|
||||
)]
|
||||
protected function init_search_conditions(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise list of menu actions for enabled question bank plugins.
|
||||
*
|
||||
@@ -935,56 +922,6 @@ class view {
|
||||
echo $OUTPUT->render($filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'question/bank/managecategories/classes/category_confition.php',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-72321',
|
||||
final: true
|
||||
)]
|
||||
protected function print_choose_category_message(): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'question/bank/managecategories/classes/category_confition.php',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-72321',
|
||||
final: true
|
||||
)]
|
||||
protected function get_current_category($categoryandcontext) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function display_options_form($showquestiontext): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function display_advanced_search_form($advancedsearch): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function display_showtext_checkbox($showquestiontext): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the header element for the question bank.
|
||||
*/
|
||||
@@ -1154,22 +1091,6 @@ class view {
|
||||
return $this->loadedstatistics[$questionid][$fieldname];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('display_questions()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function display_top_pagnation($pagination): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated('display_questions()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function display_bottom_pagination($pagination, $totalnumber, $perpage, $pageurl): void {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the controls at the bottom of the list of questions.
|
||||
*
|
||||
@@ -1308,22 +1229,6 @@ class view {
|
||||
echo \html_writer::end_tag('table');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('print_table()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function start_table() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3 MDL-72321
|
||||
*/
|
||||
#[\core\attribute\deprecated('print_table()', since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
protected function end_table() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print table headers from child classes.
|
||||
*/
|
||||
|
||||
@@ -658,33 +658,6 @@ class question_finder implements data_source_interface {
|
||||
return $DB->get_records_sql_menu($sql, $qcparams + $extraparams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function get_questions_from_categories_with_usage_counts(
|
||||
$categoryids,
|
||||
qubaid_condition $qubaids,
|
||||
$extraconditions = '',
|
||||
$extraparams = []
|
||||
) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function get_questions_from_categories_and_tags_with_usage_counts(
|
||||
$categoryids,
|
||||
qubaid_condition $qubaids,
|
||||
$extraconditions = '',
|
||||
$extraparams = [],
|
||||
$tagids = []
|
||||
) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function load_for_cache($questionid) {
|
||||
global $DB;
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
// 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/>.
|
||||
|
||||
/**
|
||||
* JavaScript required by the question engine.
|
||||
*
|
||||
* @package moodlecore
|
||||
* @subpackage questionengine
|
||||
* @copyright 2008 The Open University
|
||||
* @deprecated since Moodle 4.0
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
|
||||
M.core_scroll_manager = M.core_scroll_manager || {};
|
||||
|
||||
// TODO Remove the scroll manager and deprecation layer in 4.6 MDL-76685.
|
||||
/* eslint-disable */
|
||||
var loadedPromise = new Promise(function(resolve) {
|
||||
require(['core/scroll_manager'], function(ScrollManager) {
|
||||
var transitionLayer = {};
|
||||
|
||||
var deprecatedNotice = function(functionName, newFunctionName) {
|
||||
window.console.error(
|
||||
"The " + functionName + " function has been deprecated. " +
|
||||
"Please use core/scroll_manager::" + newFunctionName + "() instead"
|
||||
);
|
||||
};
|
||||
|
||||
transitionLayer.save_scroll_pos = function(Y, element) {
|
||||
deprecatedNotice('save_scroll_pos', 'saveScrollPos');
|
||||
ScrollManager.saveScrollPos(element);
|
||||
};
|
||||
|
||||
transitionLayer.scroll_to_saved_pos = function() {
|
||||
deprecatedNotice('scroll_to_saved_pos', 'scrollToSavedPosition');
|
||||
ScrollManager.scrollToSavedPosition();
|
||||
};
|
||||
|
||||
M.core_scroll_manager = transitionLayer;
|
||||
|
||||
resolve(transitionLayer);
|
||||
});
|
||||
});
|
||||
|
||||
var callPromisedFunction = function(functionName, args) {
|
||||
loadedPromise.then(function(transitionLayer) {
|
||||
transitionLayer[functionName].apply(null, args);
|
||||
});
|
||||
};
|
||||
|
||||
if (!M.core_scroll_manager.save_scroll_pos) {
|
||||
// Note: This object is short lived.
|
||||
// It only lives until the new scroll manager is loaded, at which point it is replaced.
|
||||
|
||||
/**
|
||||
* In the form that contains the element, set the value of the form field with
|
||||
* name scrollpos to the current scroll position. If there is no element with
|
||||
* that name, it creates a hidden form field with that name within the form.
|
||||
* @deprecated since Moodle 4.0
|
||||
* @see core/scroll_manager
|
||||
* @param element the element in the form. Should be something that can be
|
||||
* passed to Y.one.
|
||||
*/
|
||||
M.core_scroll_manager.save_scroll_pos = function(Y, element) {
|
||||
callPromisedFunction(M.core_scroll_manager.save_scroll_pos, [Y, element]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Event handler that can be used on a link. Assumes that the link already
|
||||
* contains at least one URL parameter.
|
||||
* @deprecated since Moodle 4.0
|
||||
* @see core/scroll_manager
|
||||
*/
|
||||
M.core_scroll_manager.save_scroll_action = function() {
|
||||
Y.log("The scroll_to_saved_pos function has been deprecated. " +
|
||||
"Please use initLinksScrollPos in core/scroll_manager instead.", 'moodle-core-notification', 'warn');
|
||||
};
|
||||
}
|
||||
/* eslint-enable */
|
||||
|
||||
M.core_question_engine = M.core_question_engine || {};
|
||||
|
||||
/**
|
||||
* Initialise a question submit button. This saves the scroll position and
|
||||
* sets the fragment on the form submit URL so the page reloads in the right place.
|
||||
* @deprecated since Moodle 4.0
|
||||
* @see core_question/question_engine
|
||||
* @param button the id of the button in the HTML.
|
||||
*/
|
||||
M.core_question_engine.init_submit_button = function(Y, button) {
|
||||
Y.log("The core_question_engine.init_submit_button function has been deprecated. " +
|
||||
"Please use initSubmitButton in core_question/question_engine instead.", 'moodle-core-notification', 'warn');
|
||||
|
||||
require(['core_form/submit'], function(submit) {
|
||||
submit.init(button);
|
||||
});
|
||||
var totalQuestionsInPage = document.querySelectorAll('div.que').length;
|
||||
var buttonel = document.getElementById(button);
|
||||
var outeruniqueid = buttonel.closest('.que').id;
|
||||
Y.on('click', function(e) {
|
||||
M.core_scroll_manager.save_scroll_pos(Y, button);
|
||||
if (totalQuestionsInPage > 1) {
|
||||
// Only change the form action if the page have more than one question.
|
||||
buttonel.form.action = buttonel.form.action + '#' + outeruniqueid;
|
||||
}
|
||||
}, buttonel);
|
||||
}
|
||||
@@ -91,40 +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.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'qbank_managecategories\output\renderer::render_category_condition()',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-72321',
|
||||
final: true
|
||||
)]
|
||||
public function render_category_condition($displaydata) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)]
|
||||
public function render_category_condition_advanced($displaydata) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(
|
||||
'qbank_deletequestion\output\renderer::render_hidden_condition_advanced()',
|
||||
since: '4.3',
|
||||
mdl: 'MDL-72321',
|
||||
final: true
|
||||
)]
|
||||
public function render_hidden_condition_advanced($displaydata) {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render question pagination.
|
||||
*
|
||||
|
||||
@@ -72,14 +72,6 @@ class report_eventlist_list_generator {
|
||||
return $eventinformation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.0 use {@see get_all_events_list} instead
|
||||
*/
|
||||
#[\core\attribute\deprecated('::get_all_events_list', since: '4.0', mdl: 'MDL-72498', final: true)]
|
||||
public static function get_core_events_list() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the appropriate string for the CRUD character.
|
||||
*
|
||||
@@ -130,14 +122,6 @@ class report_eventlist_list_generator {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 4.0 use {@see get_all_events_list} instead
|
||||
*/
|
||||
#[\core\attribute\deprecated('::get_all_events_list', since: '4.0', mdl: 'MDL-72498', final: true)]
|
||||
public static function get_non_core_event_list() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full list of observers for the system.
|
||||
*
|
||||
|
||||
@@ -62,15 +62,6 @@ abstract class base {
|
||||
*/
|
||||
abstract protected function get_default_tables(): array;
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.4 - aliases are now autogenerated, please implement {@see get_default_tables} instead
|
||||
*/
|
||||
#[\core\attribute\deprecated('::get_default_tables', since: '4.4', mdl: 'MDL-79397', final: true)]
|
||||
protected function get_default_table_aliases(): array {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Database tables that the entity once used but now no longer does. To prevent errors in third-party code, rather than
|
||||
* simply removing the table from {@see get_default_tables} you can override this method, which will emit developer debug
|
||||
|
||||
@@ -288,12 +288,4 @@ class audience {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 - please do not use this function any more, {@see custom_report_audience_cards_exporter}
|
||||
*/
|
||||
#[\core\attribute\deprecated('custom_report_audience_cards_exporter', since: '4.1', final: true)]
|
||||
public static function get_all_audiences_menu_types() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,14 +530,6 @@ class report {
|
||||
return $table->get_total_row_count();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.1 - please do not use this function any more, {@see custom_report_column_cards_exporter}
|
||||
*/
|
||||
#[\core\attribute\deprecated('custom_report_column_cards_exporter', since: '4.1', final: true)]
|
||||
public static function get_available_columns() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Duplicate report content to given report ID
|
||||
*
|
||||
|
||||
@@ -1787,14 +1787,6 @@ abstract class repository implements cacheable_object {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.3
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'No longer used', since: '4.3', mdl: 'MDL-50272', final: true)]
|
||||
public function get_file_size() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return is the instance is visible
|
||||
* (is the type visible ? is the context enable ?)
|
||||
|
||||
@@ -1015,22 +1015,6 @@ class repository_onedrive extends repository {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)]
|
||||
public static function can_import_skydrive_files() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 4.0
|
||||
*/
|
||||
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)]
|
||||
public static function import_skydrive_files() {
|
||||
\core\deprecation::emit_deprecation([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit/Create Admin Settings Moodle form.
|
||||
*
|
||||
|
||||
@@ -1,308 +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/>.
|
||||
|
||||
use core\output\checkbox_toggleall;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir . '/tablelib.php');
|
||||
|
||||
/**
|
||||
* Class core_tag_manage_table
|
||||
*
|
||||
* @package core_tag
|
||||
* @copyright 2015 Marina Glancy
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @deprecated since Moodle 4.4
|
||||
*/
|
||||
class core_tag_manage_table extends table_sql {
|
||||
|
||||
/** @var int stores the total number of found tags */
|
||||
public $totalcount = null;
|
||||
|
||||
/** @var int */
|
||||
protected $tagcollid;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param int $tagcollid
|
||||
*/
|
||||
public function __construct($tagcollid) {
|
||||
global $USER, $PAGE, $OUTPUT;
|
||||
|
||||
debugging('core_tag_manage_table is deprecated, please use the new system report', DEBUG_DEVELOPER);
|
||||
|
||||
parent::__construct('tag-management-list-'.$USER->id);
|
||||
|
||||
$this->tagcollid = $tagcollid;
|
||||
|
||||
$perpage = optional_param('perpage', 30, PARAM_INT);
|
||||
$page = optional_param('page', 0, PARAM_INT);
|
||||
$filter = optional_param('filter', '', PARAM_NOTAGS);
|
||||
$baseurl = new moodle_url('/tag/manage.php', array('tc' => $tagcollid,
|
||||
'perpage' => $perpage, 'page' => $page, 'filter' => $filter));
|
||||
|
||||
$checkboxall = new checkbox_toggleall('tags-manage', true, [
|
||||
'id' => 'select-all-tags',
|
||||
'name' => 'select-all-tags',
|
||||
'checked' => false,
|
||||
'label' => get_string('selectall'),
|
||||
'labelclasses' => 'accesshide',
|
||||
]);
|
||||
|
||||
$tablecolumns = array('select', 'name', 'fullname', 'count', 'flag', 'timemodified', 'isstandard', 'controls');
|
||||
$tableheaders = array($OUTPUT->render($checkboxall),
|
||||
get_string('name', 'tag'),
|
||||
get_string('owner', 'tag'),
|
||||
get_string('count', 'tag'),
|
||||
get_string('flag', 'tag'),
|
||||
get_string('timemodified', 'tag'),
|
||||
get_string('standardtag', 'tag'),
|
||||
'');
|
||||
|
||||
$this->define_columns($tablecolumns);
|
||||
$this->define_headers($tableheaders);
|
||||
$this->define_baseurl($baseurl);
|
||||
|
||||
$this->column_class('select', 'mdl-align col-select');
|
||||
$this->column_class('name', 'col-name');
|
||||
$this->column_class('owner', 'col-owner');
|
||||
$this->column_class('count', 'mdl-align col-count');
|
||||
$this->column_class('flag', 'mdl-align col-flag');
|
||||
$this->column_class('timemodified', 'col-timemodified');
|
||||
$this->column_class('isstandard', 'mdl-align col-isstandard');
|
||||
$this->column_class('controls', 'mdl-align col-controls');
|
||||
|
||||
$this->sortable(true, 'flag', SORT_DESC);
|
||||
$this->no_sorting('select');
|
||||
$this->no_sorting('controls');
|
||||
|
||||
$this->set_attribute('cellspacing', '0');
|
||||
$this->set_attribute('id', 'tag-management-list');
|
||||
$this->set_attribute('class', 'admintable table generaltable tag-management-table');
|
||||
|
||||
$totalcount = "SELECT COUNT(tg.id)
|
||||
FROM {tag} tg
|
||||
WHERE tg.tagcollid = :tagcollid";
|
||||
$params = array('tagcollid' => $this->tagcollid);
|
||||
|
||||
$this->set_count_sql($totalcount, $params);
|
||||
|
||||
$this->set_sql('', '', '', $params);
|
||||
|
||||
$this->collapsible(true);
|
||||
|
||||
$PAGE->requires->js_call_amd('core/tag', 'initManagePage', array());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string sql to add to where statement.
|
||||
*/
|
||||
function get_sql_where() {
|
||||
$filter = optional_param('filter', '', PARAM_NOTAGS);
|
||||
list($wsql, $wparams) = parent::get_sql_where();
|
||||
if ($filter !== '') {
|
||||
$wsql .= ($wsql ? ' AND ' : '') . 'tg.name LIKE :tagfilter';
|
||||
$wparams['tagfilter'] = '%' . $filter . '%';
|
||||
}
|
||||
return array($wsql, $wparams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the db. Store results in the table object for use by build_table.
|
||||
*
|
||||
* @param int $pagesize size of page for paginated displayed table.
|
||||
* @param bool $useinitialsbar do you want to use the initials bar. Bar
|
||||
* will only be used if there is a fullname column defined for the table.
|
||||
*/
|
||||
public function query_db($pagesize, $useinitialsbar = true) {
|
||||
global $DB;
|
||||
$where = '';
|
||||
if (!$this->is_downloading()) {
|
||||
$grandtotal = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||
|
||||
list($wsql, $wparams) = $this->get_sql_where();
|
||||
if ($wsql) {
|
||||
$this->countsql .= ' AND '.$wsql;
|
||||
$this->countparams = array_merge($this->countparams, $wparams);
|
||||
|
||||
$where .= ' AND '.$wsql;
|
||||
$this->sql->params = array_merge($this->sql->params, $wparams);
|
||||
|
||||
$total = $DB->count_records_sql($this->countsql, $this->countparams);
|
||||
} else {
|
||||
$total = $grandtotal;
|
||||
}
|
||||
|
||||
$this->pagesize(min($pagesize, $total), $total);
|
||||
$this->totalcount = $total;
|
||||
}
|
||||
|
||||
// Fetch the attempts.
|
||||
$sort = $this->get_sql_sort();
|
||||
if ($sort) {
|
||||
$sort .= ", tg.name";
|
||||
} else {
|
||||
$sort = "tg.name";
|
||||
}
|
||||
|
||||
$userfieldsapi = \core_user\fields::for_name();
|
||||
$allusernames = $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
$sql = "
|
||||
SELECT tg.id, tg.name, tg.rawname, tg.isstandard, tg.flag, tg.timemodified,
|
||||
u.id AS owner, $allusernames,
|
||||
COUNT(ti.id) AS count, tg.tagcollid
|
||||
FROM {tag} tg
|
||||
LEFT JOIN {tag_instance} ti ON ti.tagid = tg.id
|
||||
LEFT JOIN {user} u ON u.id = tg.userid
|
||||
WHERE tagcollid = :tagcollid $where
|
||||
GROUP BY tg.id, tg.name, tg.rawname, tg.isstandard, tg.flag, tg.timemodified,
|
||||
u.id, $allusernames, tg.tagcollid
|
||||
ORDER BY $sort";
|
||||
|
||||
if (!$this->is_downloading()) {
|
||||
$this->rawdata = $DB->get_records_sql($sql, $this->sql->params, $this->get_page_start(), $this->get_page_size());
|
||||
} else {
|
||||
$this->rawdata = $DB->get_records_sql($sql, $this->sql->params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the table show_hide_link to not show for select column.
|
||||
*
|
||||
* @param string $column the column name, index into various names
|
||||
* @param int $index numerical index of the column
|
||||
* @return string HTML fragment
|
||||
*/
|
||||
protected function show_hide_link($column, $index) {
|
||||
if ($index > 0) {
|
||||
return parent::show_hide_link($column, $index);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get any extra classes names to add to this row in the HTML
|
||||
*
|
||||
* @param stdClass $row array the data for this row.
|
||||
* @return string added to the class="" attribute of the tr.
|
||||
*/
|
||||
public function get_row_class($row) {
|
||||
return $row->flag ? 'table-warning' : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Column name
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_name($tag) {
|
||||
global $OUTPUT;
|
||||
$tagoutput = new core_tag\output\tagname($tag);
|
||||
return $tagoutput->render($OUTPUT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Column flag
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_flag($tag) {
|
||||
global $OUTPUT;
|
||||
$tagoutput = new core_tag\output\tagflag($tag);
|
||||
return $tagoutput->render($OUTPUT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Column fullname (user name)
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_fullname($tag) {
|
||||
$params = array('id' => $tag->owner);
|
||||
$ownerlink = new moodle_url('/user/view.php', $params);
|
||||
$owner = html_writer::link($ownerlink, fullname($tag));
|
||||
return $owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Column time modified
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_timemodified($tag) {
|
||||
return format_time(time() - $tag->timemodified);
|
||||
}
|
||||
|
||||
/**
|
||||
* Column tag type
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_isstandard($tag) {
|
||||
global $OUTPUT;
|
||||
$tagoutput = new core_tag\output\tagisstandard($tag);
|
||||
return $tagoutput->render($OUTPUT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Column select
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_select($tag) {
|
||||
global $OUTPUT;
|
||||
|
||||
$checkbox = new checkbox_toggleall('tags-manage', false, [
|
||||
'id' => 'tagselect' . $tag->id,
|
||||
'name' => 'tagschecked[]',
|
||||
'value' => $tag->id,
|
||||
'checked' => false,
|
||||
'label' => get_string('selecttag', 'tag', $tag->rawname),
|
||||
'labelclasses' => 'accesshide',
|
||||
]);
|
||||
|
||||
return $OUTPUT->render($checkbox);
|
||||
}
|
||||
|
||||
/**
|
||||
* Column controls
|
||||
*
|
||||
* @param stdClass $tag
|
||||
* @return string
|
||||
*/
|
||||
public function col_controls($tag) {
|
||||
global $OUTPUT, $PAGE;
|
||||
$o = '';
|
||||
// Edit.
|
||||
$url = new moodle_url('/tag/edit.php', array('id' => $tag->id, 'returnurl' => $PAGE->url->out_as_local_url()));
|
||||
$o .= $OUTPUT->action_icon($url, new pix_icon('t/edit', get_string('edittag', 'tag')));
|
||||
// Delete.
|
||||
$url = new moodle_url($this->baseurl, array('action' => 'delete',
|
||||
'tagid' => $tag->id, 'sesskey' => sesskey()));
|
||||
$o .= $OUTPUT->action_icon($url, new pix_icon('t/delete', get_string('delete', 'tag')),
|
||||
null, array('class' => 'action-icon tagdelete'));
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
{{!
|
||||
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/>.
|
||||
}}
|
||||
{{!
|
||||
@deprecated since Moodle 4.0
|
||||
@template theme_boost/flat_navigation
|
||||
|
||||
Display the flat navigation for the boost theme
|
||||
|
||||
Classes required for JS:
|
||||
* none
|
||||
|
||||
Data attributes required for JS:
|
||||
* none
|
||||
|
||||
Context variables required for this template:
|
||||
* flatnavigation - array of flat_navigation_nodes
|
||||
* showdivider - boolean
|
||||
* action - string
|
||||
* isactive - boolean
|
||||
* get_indent - integer
|
||||
* is_section - boolean
|
||||
* text - HTML
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"flatnavigation" : [
|
||||
{
|
||||
"showdivider": false,
|
||||
"action": "#",
|
||||
"isactive": true,
|
||||
"get_indent": 1,
|
||||
"is_section": false,
|
||||
"text": "First"
|
||||
},{
|
||||
"showdivider": true,
|
||||
"action": "#",
|
||||
"isactive": false,
|
||||
"get_indent": 0,
|
||||
"is_section": true,
|
||||
"text": "Last & Second"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
<nav class="list-group" aria-label="{{firstcollectionlabel}}">
|
||||
<ul>
|
||||
{{# flatnavigation }}
|
||||
{{#showdivider}}
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="list-group mt-1" aria-label="{{get_collectionlabel}}">
|
||||
<ul>
|
||||
{{/showdivider}}
|
||||
{{#action}}
|
||||
<li>
|
||||
<a class="list-group-item list-group-item-action {{#isactive}}active{{/isactive}} {{#classes}}{{.}} {{/classes}}" href="{{{action}}}" data-key="{{key}}" data-isexpandable="{{isexpandable}}" data-indent="{{get_indent}}" data-showdivider="{{showdivider}}" data-type="{{type}}" data-nodetype="{{nodetype}}" data-collapse="{{collapse}}" data-forceopen="{{forceopen}}" data-isactive="{{isactive}}" data-hidden="{{hidden}}" data-preceedwithhr="{{preceedwithhr}}" {{#parent.key}}data-parent-key="{{.}}"{{/parent.key}}>
|
||||
<div class="ms-{{get_indent}}">
|
||||
<div class="d-flex">
|
||||
{{#icon.pix}}
|
||||
<span class="flex-shrink-0">
|
||||
{{#pix}}{{{icon.pix}}}, {{{icon.component}}}, {{{icon.alt}}}{{/pix}}
|
||||
</span>
|
||||
{{/icon.pix}}
|
||||
<span class="flex-grow-1 ms-3 {{#isactive}}fw-bold{{/isactive}}">{{{text}}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{{/action}}
|
||||
{{^action}}
|
||||
<li>
|
||||
<div class="list-group-item {{#classes}}{{.}} {{/classes}}" data-key="{{key}}" data-isexpandable="{{isexpandable}}" data-indent="{{get_indent}}" data-showdivider="{{showdivider}}" data-type="{{type}}" data-nodetype="{{nodetype}}" data-collapse="{{collapse}}" data-forceopen="{{forceopen}}" data-isactive="{{isactive}}" data-hidden="{{hidden}}" data-preceedwithhr="{{preceedwithhr}}" {{#parent.key}}data-parent-key="{{.}}"{{/parent.key}}>
|
||||
<div class="ms-{{get_indent}}">
|
||||
<div class="d-flex">
|
||||
{{#icon.pix}}
|
||||
<span class="flex-shrink-0">
|
||||
{{#pix}}{{{icon.pix}}}, {{{icon.component}}}, {{{icon.alt}}}{{/pix}}
|
||||
</span>
|
||||
{{/icon.pix}}
|
||||
<span class="flex-grow-1 ms-3">{{{text}}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/action}}
|
||||
{{/ flatnavigation }}
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -1,10 +0,0 @@
|
||||
{{!
|
||||
@deprecated since 4.0
|
||||
@template theme_boost/nav-drawer
|
||||
|
||||
|
||||
Example context (json): {}
|
||||
}}
|
||||
<div id="nav-drawer" data-region="drawer" class="d-print-none moodle-has-zindex {{^navdraweropen}}closed{{/navdraweropen}}" aria-hidden="{{#navdraweropen}}false{{/navdraweropen}}{{^navdraweropen}}true{{/navdraweropen}}" tabindex="-1">
|
||||
{{> theme_boost/flat_navigation }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user