Merge branch 'MDL-70004-310' of git://github.com/junpataleta/moodle into MOODLE_310_S...
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 28 Oct 2020 05:14:12 +0000 (13:14 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 28 Oct 2020 05:14:12 +0000 (13:14 +0800)
834 files changed:
.gitignore
admin/classes/form/testoutgoingmailconf_form.php
admin/classes/local/settings/filesize.php
admin/classes/local/settings/manage_payment_gateway_plugins.php [new file with mode: 0644]
admin/roles/tests/privacy_test.php
admin/settings/analytics.php
admin/settings/courses.php
admin/settings/payment.php [new file with mode: 0644]
admin/settings/plugins.php
admin/settings/server.php
admin/settings/top.php
admin/templates/setting_configcheckbox.mustache
admin/templates/setting_configcolourpicker.mustache
admin/templates/setting_configdirectory.mustache
admin/templates/setting_configduration.mustache
admin/templates/setting_configexecutable.mustache
admin/templates/setting_configfile.mustache
admin/templates/setting_configfilesize.mustache
admin/templates/setting_configmultiselect.mustache
admin/templates/setting_configmultiselect_optgroup.mustache
admin/templates/setting_configpasswordunmask.mustache
admin/templates/setting_configselect.mustache
admin/templates/setting_configselect_optgroup.mustache
admin/templates/setting_configtext.mustache
admin/templates/setting_configtextarea.mustache
admin/templates/setting_configtime.mustache
admin/tests/behat/language_settings.feature [new file with mode: 0644]
admin/tool/analytics/tests/external_test.php
admin/tool/behat/tests/manager_util_test.php
admin/tool/capability/tests/events_test.php
admin/tool/cohortroles/tests/api_test.php
admin/tool/cohortroles/tests/privacy_test.php
admin/tool/customlang/lang/en/tool_customlang.php
admin/tool/dataprivacy/tests/api_test.php
admin/tool/dataprivacy/tests/expired_data_requests_test.php
admin/tool/dataprivacy/tests/manager_observer_test.php
admin/tool/dataprivacy/tests/privacy_provider_test.php
admin/tool/dataprivacy/tests/task_test.php
admin/tool/httpsreplace/tests/httpsreplace_test.php
admin/tool/installaddon/tests/installer_test.php
admin/tool/langimport/tests/events_test.php
admin/tool/log/store/database/tests/privacy_test.php
admin/tool/log/store/legacy/tests/privacy_test.php
admin/tool/log/store/standard/tests/privacy_test.php
admin/tool/log/store/standard/tests/store_test.php
admin/tool/log/tests/manager_test.php
admin/tool/log/tests/privacy_test.php
admin/tool/lp/tests/externallib_test.php
admin/tool/lpmigrate/tests/processor_test.php
admin/tool/messageinbound/tests/manager_test.php
admin/tool/messageinbound/tests/privacy_test.php
admin/tool/mobile/classes/api.php
admin/tool/mobile/lang/en/tool_mobile.php
admin/tool/mobile/tests/api_test.php
admin/tool/mobile/tests/externallib_test.php
admin/tool/mobile/tests/privacy_provider_test.php
admin/tool/monitor/tests/eventobservers_test.php
admin/tool/monitor/tests/events_test.php
admin/tool/monitor/tests/generator_test.php
admin/tool/monitor/tests/privacy_test.php
admin/tool/monitor/tests/rule_manager_test.php
admin/tool/monitor/tests/subscription_test.php
admin/tool/monitor/tests/task_check_subscriptions_test.php
admin/tool/monitor/tests/task_clean_events_test.php
admin/tool/policy/tests/externallib_test.php
admin/tool/policy/tests/privacy_provider_test.php
admin/tool/recyclebin/tests/category_bin_test.php
admin/tool/recyclebin/tests/course_bin_test.php
admin/tool/recyclebin/tests/events_test.php
admin/tool/replace/lang/en/tool_replace.php
admin/tool/task/lang/en/tool_task.php
admin/tool/task/tests/behat/running_tasks.feature
admin/tool/templatelibrary/tests/externallib_test.php
admin/tool/uploadcourse/tests/course_test.php
admin/tool/uploadcourse/tests/processor_test.php
admin/tool/usertours/tests/accessdate_filter_test.php
admin/tool/usertours/tests/cache_test.php
admin/tool/usertours/tests/manager_test.php
admin/tool/usertours/tests/privacy_provider_test.php
admin/tool/usertours/tests/role_filter_test.php
admin/tool/usertours/tests/step_test.php
admin/tool/usertours/tests/tour_test.php
analytics/classes/model.php
analytics/tests/course_test.php
analytics/tests/dataset_manager_test.php
analytics/tests/indicator_test.php
analytics/tests/model_test.php
analytics/tests/prediction_actions_test.php
analytics/tests/prediction_test.php
analytics/tests/privacy_test.php
analytics/tests/stats_test.php
auth/email/tests/external_test.php
auth/manual/tests/manual_test.php
auth/manual/tests/privacy_provider_test.php
auth/mnet/tests/privacy_provider_test.php
auth/oauth2/tests/auth_test.php
auth/oauth2/tests/privacy_provider_test.php
auth/tests/external_test.php
auth/tests/privacy_test.php
availability/condition/completion/tests/condition_test.php
availability/condition/date/tests/condition_test.php
availability/condition/grade/tests/condition_test.php
availability/condition/group/tests/condition_test.php
availability/condition/grouping/tests/condition_test.php
availability/condition/profile/tests/condition_test.php
availability/tests/info_test.php
availability/tests/tree_test.php
backup/controller/tests/controller_test.php
backup/converter/moodle1/tests/moodle1_converter_test.php
backup/moodle2/backup_activity_task.class.php
backup/moodle2/restore_activity_task.class.php
backup/moodle2/tests/backup_encrypted_content_test.php
backup/moodle2/tests/backup_xml_transformer_test.php
backup/tests/automated_backup_test.php
backup/tests/course_copy_test.php
backup/tests/externallib_test.php
backup/tests/privacy_provider_test.php
backup/util/checks/tests/checks_test.php
backup/util/dbops/tests/backup_dbops_test.php
backup/util/factories/tests/factories_test.php
backup/util/helper/tests/restore_structure_parser_processor_test.php
backup/util/plan/tests/plan_test.php
backup/util/plan/tests/step_test.php
backup/util/plan/tests/task_test.php
backup/util/structure/tests/structure_test.php
backup/util/ui/base_moodleform.class.php
badges/backpack-add.php
badges/backpack-connect.php
badges/backpack-export.php
badges/backpackemailverify.php
badges/backpacks.php
badges/classes/backpack_api.php
badges/classes/backpack_api_mapping.php
badges/classes/form/backpack.php
badges/classes/form/external_backpack.php
badges/mybackpack.php
badges/renderer.php
badges/tests/badgeslib_test.php
badges/tests/behat/backpack.feature
badges/tests/external_test.php
badges/tests/privacy_test.php
badges/upgrade.txt
blocks/comments/tests/events_test.php
blocks/comments/tests/privacy_provider_test.php
blocks/myoverview/tests/behat/block_myoverview_dashboard.feature
blocks/news_items/block_news_items.php
blocks/online_users/tests/online_users_test.php
blocks/recentlyaccesseditems/tests/observer_test.php
blocks/rss_client/tests/cron_test.php
blocks/rss_client/tests/privacy_test.php
blocks/tests/privacy_test.php
blog/tests/events_test.php
blog/tests/external_test.php
blog/tests/lib_test.php
blog/tests/privacy_test.php
cache/stores/apcu/tests/apcu_test.php
cache/stores/redis/tests/compressor_test.php
cache/stores/redis/tests/redis_test.php
cache/tests/administration_helper_test.php
cache/tests/cache_test.php
cache/tests/config_writer_test.php
cache/tests/fixtures/stores.php
calendar/templates/month_detailed.mustache
calendar/tests/calendartype_test.php
calendar/tests/container_test.php
calendar/tests/events_related_objects_cache_test.php
calendar/tests/events_test.php
calendar/tests/externallib_test.php
calendar/tests/lib_test.php
calendar/tests/local_api_test.php
calendar/tests/privacy_test.php
calendar/tests/raw_event_retrieval_strategy_test.php
calendar/tests/rrule_manager_test.php
calendar/tests/std_proxy_test.php
cohort/tests/cohortlib_test.php
cohort/tests/externallib_test.php
cohort/tests/privacy_test.php
comment/tests/externallib_test.php
comment/tests/privacy_test.php
competency/tests/api_test.php
competency/tests/event_test.php
competency/tests/external_test.php
competency/tests/lib_test.php
competency/tests/plan_test.php
competency/tests/privacy_test.php
completion/tests/api_test.php
completion/tests/progress_test.php
composer.json
composer.lock
contentbank/contenttype/h5p/tests/contenttype_h5p_test.php
contentbank/tests/contentbank_test.php
contentbank/tests/contenttype_test.php
course/amd/build/downloadcontent.min.js [new file with mode: 0644]
course/amd/build/downloadcontent.min.js.map [new file with mode: 0644]
course/amd/src/downloadcontent.js [new file with mode: 0644]
course/classes/local/service/content_item_service.php
course/classes/output/content_export_link.php [new file with mode: 0644]
course/classes/search/customfield.php
course/downloadcontent.php [new file with mode: 0644]
course/edit_form.php
course/format/weeks/tests/observer_test.php
course/lib.php
course/tests/behat/course_download_content.feature [new file with mode: 0644]
course/tests/behat/course_download_content_permissions.feature [new file with mode: 0644]
course/tests/category_hooks_test.php
course/tests/category_test.php
course/tests/courselib_test.php
course/tests/customfield_test.php
course/tests/events_test.php
course/tests/externallib_test.php
course/tests/management_helper_test.php
course/tests/search_test.php
course/view.php
customfield/field/checkbox/tests/plugin_test.php
customfield/field/date/tests/plugin_test.php
customfield/field/select/tests/plugin_test.php
customfield/field/text/tests/plugin_test.php
customfield/field/textarea/tests/plugin_test.php
customfield/tests/privacy_test.php
enrol/fee/classes/payment/service_provider.php [new file with mode: 0644]
enrol/fee/classes/plugin.php [new file with mode: 0644]
enrol/fee/classes/privacy/provider.php [new file with mode: 0644]
enrol/fee/db/access.php [new file with mode: 0644]
enrol/fee/lang/en/enrol_fee.php [new file with mode: 0644]
enrol/fee/lib.php [new file with mode: 0644]
enrol/fee/pix/icon.svg [new file with mode: 0644]
enrol/fee/settings.php [new file with mode: 0644]
enrol/fee/templates/payment_region.mustache [new file with mode: 0644]
enrol/fee/tests/behat/fee.feature [new file with mode: 0644]
enrol/fee/version.php [new file with mode: 0644]
enrol/flatfile/tests/privacy_provider_test.php
enrol/imsenterprise/tests/imsenterprise_test.php
enrol/lti/tests/data_connector_test.php
enrol/lti/tests/helper_test.php
enrol/lti/tests/lib_test.php
enrol/lti/tests/privacy_provider_test.php
enrol/lti/tests/sync_members_test.php
enrol/lti/tests/tool_provider_test.php
enrol/manual/lang/en/enrol_manual.php
enrol/manual/tests/lib_test.php
enrol/meta/tests/privacy_test.php
enrol/paypal/tests/privacy_provider_test.php
enrol/self/tests/self_test.php
enrol/tests/course_enrolment_manager_test.php
enrol/tests/enrollib_test.php
enrol/tests/externallib_test.php
enrol/tests/role_external_test.php
favourites/tests/component_favourite_service_test.php
favourites/tests/privacy_test.php
favourites/tests/repository_test.php
favourites/tests/user_favourite_service_test.php
files/tests/conversion_test.php
filter/algebra/tests/filter_test.php
filter/displayh5p/tests/filter_test.php
filter/mediaplugin/tests/filter_test.php
filter/multilang/tests/filter_test.php
filter/tex/tests/filter_test.php
grade/export/ods/tests/logging_test.php
grade/export/txt/tests/logging_test.php
grade/export/xls/tests/logging_test.php
grade/export/xml/tests/logging_test.php
grade/grading/tests/grading_manager_test.php
grade/import/csv/tests/load_data_test.php
grade/report/grader/tests/privacy_test.php
grade/report/overview/tests/externallib_test.php
grade/report/singleview/lang/en/gradereport_singleview.php
grade/report/user/tests/lib_test.php
grade/report/user/tests/privacy_test.php
grade/tests/edittreelib_test.php
grade/tests/events_test.php
grade/tests/grades_grader_gradingpanel_point_external_store_test.php
grade/tests/importlib_test.php
grade/tests/privacy_test.php
grade/tests/report_graderlib_test.php
group/tests/behat/overview.feature
group/tests/privacy_provider_test.php
h5p/tests/editor_ajax_test.php
h5p/tests/editor_framework_test.php
h5p/tests/event_h5p_deleted_test.php
h5p/tests/event_h5p_viewed_test.php
h5p/tests/external_test.php
h5p/tests/framework_test.php
h5p/tests/generator_test.php
h5p/tests/h5p_core_test.php
h5p/tests/h5p_file_storage_test.php
h5p/tests/helper_test.php
iplookup/tests/geoip_test.php
iplookup/tests/geoplugin_test.php
lang/en/admin.php
lang/en/analytics.php
lang/en/antivirus.php
lang/en/backup.php
lang/en/badges.php
lang/en/completion.php
lang/en/contentbank.php
lang/en/course.php
lang/en/deprecated.txt
lang/en/error.php
lang/en/group.php
lang/en/langconfig.php
lang/en/moodle.php
lang/en/payment.php [new file with mode: 0644]
lang/en/plugin.php
lang/en/repository.php
lang/en/role.php
lang/en/user.php
lib/adminlib.php
lib/amd/build/modal.min.js
lib/amd/build/modal.min.js.map
lib/amd/build/modal_events.min.js
lib/amd/build/modal_events.min.js.map
lib/amd/build/tree.min.js
lib/amd/build/tree.min.js.map
lib/amd/src/modal.js
lib/amd/src/modal_events.js
lib/amd/src/tree.js
lib/antivirus/clamav/tests/scanner_test.php
lib/badgeslib.php
lib/blocklib.php
lib/classes/content.php
lib/classes/form/persistent.php
lib/classes/output/mustache_template_source_loader.php
lib/classes/plugin_manager.php
lib/classes/plugininfo/paygw.php [new file with mode: 0644]
lib/classes/session/manager.php
lib/classes/string_manager_standard.php
lib/components.json
lib/db/access.php
lib/db/install.xml
lib/db/services.php
lib/db/upgrade.php
lib/ddl/tests/ddl_test.php
lib/dml/tests/dml_test.php
lib/dml/tests/pgsql_native_recordset_test.php
lib/dml/tests/recordset_walk_test.php
lib/dml/tests/sqlsrv_native_moodle_database_test.php
lib/filebrowser/tests/file_browser_test.php
lib/filestorage/tests/file_storage_test.php
lib/filestorage/tests/file_system_filedir_test.php
lib/filestorage/tests/file_system_test.php
lib/filestorage/tests/zip_packer_test.php
lib/form/tests/course_test.php
lib/form/tests/dateselector_test.php
lib/form/tests/datetimeselector_test.php
lib/form/tests/duration_test.php
lib/form/tests/external_test.php
lib/form/tests/filetypes_util_test.php
lib/form/tests/privacy_provider_test.php
lib/grade/tests/fixtures/lib.php
lib/grade/tests/grade_item_test.php
lib/moodlelib.php
lib/navigationlib.php
lib/pagelib.php
lib/phpunit/classes/advanced_testcase.php
lib/phpunit/classes/arraydataset.php [deleted file]
lib/phpunit/classes/constraint_object_is_equal_with_exceptions.php
lib/phpunit/classes/database_driver_testcase.php
lib/phpunit/classes/hint_resultprinter.php [deleted file]
lib/phpunit/classes/phpunit_dataset.php [new file with mode: 0644]
lib/phpunit/classes/restore_date_testcase.php
lib/phpunit/lib.php
lib/phpunit/tests/advanced_test.php
lib/phpunit/tests/basic_test.php
lib/phpunit/tests/fixtures/sample_dataset.csv
lib/phpunit/tests/fixtures/sample_dataset.txt [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset.xml
lib/phpunit/tests/fixtures/sample_dataset2.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_col_before_row.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_insert.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_many.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_many_with_empty.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_number_of_columns.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_only_colrow.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_repeated.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_row_after_col.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_wrong_attribute.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_wrong_dataset.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_wrong_table.xml [new file with mode: 0644]
lib/phpunit/tests/fixtures/sample_dataset_wrong_value.xml [new file with mode: 0644]
lib/phpunit/tests/phpunit_dataset.test.php [new file with mode: 0644]
lib/templates/loginform.mustache
lib/testing/tests/generator_test.php
lib/tests/accesslib_test.php
lib/tests/admintree_test.php
lib/tests/ajaxlib_test.php
lib/tests/antivirus_test.php
lib/tests/authlib_test.php
lib/tests/blocklib_test.php
lib/tests/calendar_cron_task_test.php
lib/tests/collator_test.php
lib/tests/completionlib_test.php
lib/tests/component_test.php
lib/tests/content_test.php [new file with mode: 0644]
lib/tests/core_media_player_native.php
lib/tests/core_renderer_template_exploit_test.php
lib/tests/csvclass_test.php
lib/tests/customcontext_test.php
lib/tests/event/contentbank_content_created_test.php
lib/tests/event/contentbank_content_deleted_test.php
lib/tests/event/contentbank_content_updated_test.php
lib/tests/event/contentbank_content_uploaded_test.php
lib/tests/event/contentbank_content_viewed_test.php
lib/tests/event_course_module_viewed.php
lib/tests/event_profile_field_test.php
lib/tests/event_test.php
lib/tests/event_user_graded_test.php
lib/tests/events_test.php
lib/tests/exporter_test.php
lib/tests/externallib_test.php
lib/tests/filelib_test.php
lib/tests/filetypes_test.php
lib/tests/filterlib_test.php
lib/tests/gdlib_test.php
lib/tests/grouplib_test.php
lib/tests/h5p_get_content_types_task_test.php
lib/tests/jquery_test.php
lib/tests/lock_test.php
lib/tests/mathslib_test.php
lib/tests/medialib_test.php
lib/tests/messagelib_test.php
lib/tests/minify_test.php
lib/tests/modinfolib_test.php
lib/tests/moodle_page_test.php
lib/tests/moodle_url_test.php
lib/tests/moodlelib_test.php
lib/tests/mustache_template_finder_test.php
lib/tests/mustache_template_source_loader_test.php
lib/tests/myprofilelib_test.php
lib/tests/notification_test.php
lib/tests/outputcomponents_test.php
lib/tests/outputrequirementslib_test.php
lib/tests/persistent_test.php
lib/tests/plugin_manager_test.php
lib/tests/plugininfo/base_test.php
lib/tests/progress_display_test.php
lib/tests/qrcode_test.php
lib/tests/questionlib_test.php
lib/tests/requirejs_test.php
lib/tests/rsslib_test.php
lib/tests/scheduled_task_test.php
lib/tests/session_manager_test.php
lib/tests/session_redis_test.php
lib/tests/setuplib_test.php
lib/tests/statslib_test.php
lib/tests/string_manager_standard_test.php
lib/tests/tablelib_test.php
lib/tests/task_database_logger_test.php
lib/tests/task_logging_test.php
lib/tests/time_splittings_test.php
lib/tests/update_checker_test.php
lib/tests/update_code_manager_test.php
lib/tests/update_validator_test.php
lib/tests/user_test.php
lib/tests/useragent_test.php
lib/upgrade.txt
lib/xapi/tests/external/post_statement_test.php
media/player/html5audio/tests/player_test.php
media/player/html5video/tests/player_test.php
media/player/swf/tests/player_test.php
media/player/videojs/tests/player_test.php
media/player/vimeo/tests/player_test.php
media/player/youtube/tests/player_test.php
message/externallib.php
message/output/airnotifier/tests/externallib_test.php
message/output/airnotifier/tests/privacy_test.php
message/output/email/tests/privacy_test.php
message/output/email/tests/send_email_task_test.php
message/output/jabber/tests/privacy_test.php
message/output/popup/tests/api_test.php
message/output/popup/tests/externallib_test.php
message/tests/api_test.php
message/tests/events_test.php
message/tests/externallib_test.php
message/tests/helper_test.php
message/tests/inbound_test.php
message/tests/messagelib_test.php
message/tests/migrate_message_data_task_test.php
message/tests/privacy_provider_test.php
message/tests/search_received_test.php
message/tests/search_sent_test.php
mnet/service/enrol/tests/privacy_test.php
mnet/tests/events_test.php
mod/assign/feedback/comments/tests/privacy_test.php
mod/assign/feedback/editpdf/tests/editpdf_test.php
mod/assign/feedback/editpdf/tests/privacy_test.php
mod/assign/styles.css
mod/assign/submission/comments/tests/privacy_test.php
mod/assign/tests/base_test.php
mod/assign/tests/externallib_test.php
mod/assign/tests/locallib_test.php
mod/assign/tests/privacy_test.php
mod/book/tests/events_test.php
mod/book/tests/lib_test.php
mod/book/tests/search_test.php
mod/book/tool/exportimscp/tests/events_test.php
mod/book/tool/importhtml/tests/locallib_test.php
mod/book/tool/print/tests/events_test.php
mod/chat/tests/lib_test.php
mod/chat/tests/privacy_test.php
mod/choice/tests/events_test.php
mod/choice/tests/lib_test.php
mod/choice/tests/privacy_provider_test.php
mod/data/tests/events_test.php
mod/data/tests/externallib_test.php
mod/data/tests/import_test.php
mod/data/tests/lib_test.php
mod/data/tests/privacy_provider_test.php
mod/data/tests/search_test.php
mod/feedback/lang/en/feedback.php
mod/feedback/tests/behat/question_types_non_anon.feature
mod/feedback/tests/events_test.php
mod/feedback/tests/external_test.php
mod/feedback/tests/privacy_test.php
mod/folder/tests/events_test.php
mod/folder/tests/lib_test.php
mod/folder/tests/search_test.php
mod/forum/classes/local/exporters/post.php
mod/forum/tests/behat/discussion_lock.feature
mod/forum/tests/builders_exported_posts_test.php
mod/forum/tests/events_test.php
mod/forum/tests/exporters_discussion_test.php
mod/forum/tests/exporters_post_test.php
mod/forum/tests/externallib_test.php
mod/forum/tests/generator_test.php
mod/forum/tests/grades_gradeitems_test.php
mod/forum/tests/lib_test.php
mod/forum/tests/mail_group_test.php
mod/forum/tests/mail_test.php
mod/forum/tests/maildigest_test.php
mod/forum/tests/managers_capability_test.php
mod/forum/tests/privacy_provider_test.php
mod/forum/tests/private_replies_test.php
mod/forum/tests/qanda_test.php
mod/forum/tests/search_test.php
mod/forum/tests/subscriptions_test.php
mod/forum/tests/vaults_discussion_list_test.php
mod/forum/tests/vaults_discussion_test.php
mod/forum/tests/vaults_post_test.php
mod/glossary/tests/events_test.php
mod/glossary/tests/external_test.php
mod/glossary/tests/privacy_provider_test.php
mod/glossary/tests/search_test.php
mod/label/tests/lib_test.php
mod/lesson/tests/events_test.php
mod/lesson/tests/external_test.php
mod/lesson/tests/privacy_test.php
mod/lti/amd/build/tool_card_controller.min.js
mod/lti/amd/build/tool_card_controller.min.js.map
mod/lti/amd/build/tool_configure_controller.min.js
mod/lti/amd/build/tool_configure_controller.min.js.map
mod/lti/amd/src/tool_card_controller.js
mod/lti/amd/src/tool_configure_controller.js
mod/lti/certs.php
mod/lti/classes/local/ltiopenid/jwks_helper.php [new file with mode: 0644]
mod/lti/classes/local/ltiopenid/registration_exception.php [new file with mode: 0644]
mod/lti/classes/local/ltiopenid/registration_helper.php [new file with mode: 0644]
mod/lti/classes/local/ltiservice/service_base.php
mod/lti/lang/en/lti.php
mod/lti/locallib.php
mod/lti/openid-configuration.php [new file with mode: 0644]
mod/lti/openid-registration.php [new file with mode: 0644]
mod/lti/service/basicoutcomes/classes/local/service/basicoutcomes.php
mod/lti/service/gradebookservices/classes/local/service/gradebookservices.php
mod/lti/service/gradebookservices/tests/privacy_provider_test.php
mod/lti/service/gradebookservices/tests/task_cleanup_test.php
mod/lti/service/memberships/classes/local/service/memberships.php
mod/lti/service/memberships/tests/privacy_provider_test.php
mod/lti/service/toolsettings/classes/local/service/toolsettings.php
mod/lti/startltiadvregistration.php [new file with mode: 0644]
mod/lti/templates/cartridge_registration_form.mustache
mod/lti/templates/external_registration.mustache
mod/lti/templates/loader.mustache
mod/lti/templates/tool_configure.mustache
mod/lti/tests/behat/toolconfigure.feature
mod/lti/tests/externallib_test.php
mod/lti/tests/lib_test.php
mod/lti/tests/openidregistration_test.php [new file with mode: 0644]
mod/lti/tests/task_clean_access_tokens_test.php
mod/page/tests/lib_test.php
mod/quiz/accessrule/seb/tests/access_manager_test.php
mod/quiz/accessrule/seb/tests/backup_restore_test.php
mod/quiz/accessrule/seb/tests/event_test.php
mod/quiz/accessrule/seb/tests/link_generator_test.php
mod/quiz/accessrule/seb/tests/quiz_settings_test.php
mod/quiz/accessrule/seb/tests/rule_test.php
mod/quiz/accessrule/seb/tests/template_test.php
mod/quiz/report/overview/tests/report_test.php
mod/quiz/report/responses/tests/responses_from_steps_walkthrough_test.php
mod/quiz/report/statistics/tests/statistics_test.php
mod/quiz/report/statistics/tests/stats_from_steps_walkthrough_test.php
mod/quiz/tests/attempt_walkthrough_from_csv_test.php
mod/quiz/tests/external_test.php
mod/quiz/tests/local_structure_slot_random_test.php
mod/quiz/tests/locallib_test.php
mod/quiz/tests/privacy_provider_test.php
mod/quiz/tests/quiz_question_bank_view_test.php
mod/quiz/tests/repaginate_test.php
mod/quiz/tests/structure_test.php
mod/quiz/tests/tags_test.php
mod/resource/tests/events_test.php
mod/resource/tests/lib_test.php
mod/resource/tests/search_test.php
mod/scorm/report/basic/tests/privacy_test.php
mod/scorm/report/interactions/tests/privacy_test.php
mod/scorm/report/objectives/tests/privacy_test.php
mod/scorm/tests/events_test.php
mod/scorm/tests/externallib_test.php
mod/scorm/tests/lib_test.php
mod/scorm/tests/locallib_test.php
mod/survey/tests/events_test.php
mod/survey/tests/externallib_test.php
mod/survey/tests/lib_test.php
mod/survey/tests/privacy_test.php
mod/url/tests/lib_test.php
mod/wiki/tests/events_test.php
mod/wiki/tests/externallib_test.php
mod/wiki/tests/lib_test.php
mod/wiki/tests/privacy_test.php
mod/wiki/tests/search_test.php
mod/wiki/tests/wikiparser_test.php
mod/workshop/allocation/manual/tests/privacy_provider_test.php
mod/workshop/allocation/random/tests/allocator_test.php
mod/workshop/eval/best/tests/lib_test.php
mod/workshop/form/accumulative/tests/lib_test.php
mod/workshop/form/numerrors/tests/lib_test.php
mod/workshop/form/rubric/tests/lib_test.php
mod/workshop/tests/cron_task_test.php
mod/workshop/tests/events_test.php
mod/workshop/tests/external_test.php
mod/workshop/tests/locallib_test.php
mod/workshop/tests/portfolio_caller_test.php
mod/workshop/tests/privacy_provider_test.php
my/tests/events_test.php
notes/tests/events_test.php
notes/tests/generator_test.php
notes/tests/lib_test.php
payment/accounts.php [new file with mode: 0644]
payment/amd/build/events.min.js [new file with mode: 0644]
payment/amd/build/events.min.js.map [new file with mode: 0644]
payment/amd/build/gateways_modal.min.js [new file with mode: 0644]
payment/amd/build/gateways_modal.min.js.map [new file with mode: 0644]
payment/amd/build/modal_gateways.min.js [new file with mode: 0644]
payment/amd/build/modal_gateways.min.js.map [new file with mode: 0644]
payment/amd/build/repository.min.js [new file with mode: 0644]
payment/amd/build/repository.min.js.map [new file with mode: 0644]
payment/amd/build/selectors.min.js [new file with mode: 0644]
payment/amd/build/selectors.min.js.map [new file with mode: 0644]
payment/amd/src/events.js [new file with mode: 0644]
payment/amd/src/gateways_modal.js [new file with mode: 0644]
payment/amd/src/modal_gateways.js [new file with mode: 0644]
payment/amd/src/repository.js [new file with mode: 0644]
payment/amd/src/selectors.js [new file with mode: 0644]
payment/classes/account.php [new file with mode: 0644]
payment/classes/account_gateway.php [new file with mode: 0644]
payment/classes/event/account_created.php [new file with mode: 0644]
payment/classes/event/account_deleted.php [new file with mode: 0644]
payment/classes/event/account_updated.php [new file with mode: 0644]
payment/classes/external/get_available_gateways.php [new file with mode: 0644]
payment/classes/form/account.php [new file with mode: 0644]
payment/classes/form/account_gateway.php [new file with mode: 0644]
payment/classes/gateway.php [new file with mode: 0644]
payment/classes/helper.php [new file with mode: 0644]
payment/classes/local/callback/service_provider.php [new file with mode: 0644]
payment/classes/local/entities/payable.php [new file with mode: 0644]
payment/classes/privacy/consumer_provider.php [new file with mode: 0644]
payment/classes/privacy/paygw_provider.php [new file with mode: 0644]
payment/classes/privacy/provider.php [new file with mode: 0644]
payment/gateway/paypal/amd/build/gateways_modal.min.js [new file with mode: 0644]
payment/gateway/paypal/amd/build/gateways_modal.min.js.map [new file with mode: 0644]
payment/gateway/paypal/amd/build/repository.min.js [new file with mode: 0644]
payment/gateway/paypal/amd/build/repository.min.js.map [new file with mode: 0644]
payment/gateway/paypal/amd/src/gateways_modal.js [new file with mode: 0644]
payment/gateway/paypal/amd/src/repository.js [new file with mode: 0644]
payment/gateway/paypal/classes/external/get_config_for_js.php [new file with mode: 0644]
payment/gateway/paypal/classes/external/transaction_complete.php [new file with mode: 0644]
payment/gateway/paypal/classes/gateway.php [new file with mode: 0644]
payment/gateway/paypal/classes/paypal_helper.php [new file with mode: 0644]
payment/gateway/paypal/classes/privacy/provider.php [new file with mode: 0644]
payment/gateway/paypal/db/install.php [new file with mode: 0644]
payment/gateway/paypal/db/install.xml [new file with mode: 0644]
payment/gateway/paypal/db/services.php [new file with mode: 0644]
payment/gateway/paypal/lang/en/paygw_paypal.php [new file with mode: 0644]
payment/gateway/paypal/pix/img.svg [new file with mode: 0644]
payment/gateway/paypal/settings.php [new file with mode: 0644]
payment/gateway/paypal/styles.css [new file with mode: 0644]
payment/gateway/paypal/templates/paypal_button_placeholder.mustache [new file with mode: 0644]
payment/gateway/paypal/version.php [new file with mode: 0644]
payment/manage_account.php [new file with mode: 0644]
payment/manage_gateway.php [new file with mode: 0644]
payment/templates/fee_breakdown.mustache [new file with mode: 0644]
payment/templates/gateway.mustache [new file with mode: 0644]
payment/templates/gateways.mustache [new file with mode: 0644]
payment/templates/gateways_modal.mustache [new file with mode: 0644]
payment/templates/gateways_placeholder.mustache [new file with mode: 0644]
payment/templates/modal_gateways.mustache [new file with mode: 0644]
payment/tests/behat/accounts.feature [new file with mode: 0644]
payment/tests/generator/behat_core_payment_generator.php [new file with mode: 0644]
payment/tests/generator/lib.php [new file with mode: 0644]
payment/tests/generator_test.php [new file with mode: 0644]
payment/tests/helper_test.php [new file with mode: 0644]
phpunit.xml.dist
privacy/classes/tests/provider_testcase.php
privacy/tests/manager_test.php
privacy/tests/provider_test.php
privacy/tests/request_transform_test.php
privacy/tests/writer_test.php
question/behaviour/adaptive/tests/behaviourtype_test.php
question/behaviour/adaptive/tests/mark_display_test.php
question/behaviour/adaptive/tests/walkthrough_test.php
question/behaviour/adaptivenopenalty/tests/walkthrough_test.php
question/behaviour/deferredcbm/tests/behaviourtype_test.php
question/behaviour/deferredcbm/tests/question_cbm_test.php
question/behaviour/deferredcbm/tests/walkthrough_test.php
question/behaviour/deferredfeedback/tests/behaviourtype_test.php
question/behaviour/deferredfeedback/tests/walkthrough_test.php
question/behaviour/immediatecbm/tests/behaviourtype_test.php
question/behaviour/immediatecbm/tests/walkthrough_test.php
question/behaviour/immediatefeedback/tests/behaviourtype_test.php
question/behaviour/immediatefeedback/tests/walkthrough_test.php
question/behaviour/informationitem/tests/behaviourtype_test.php
question/behaviour/interactive/renderer.php
question/behaviour/interactive/tests/behaviourtype_test.php
question/behaviour/interactive/tests/walkthrough_test.php
question/behaviour/interactivecountback/tests/behaviourtype_test.php
question/behaviour/manualgraded/tests/behaviourtype_test.php
question/behaviour/missing/tests/behaviourtype_test.php
question/behaviour/missing/tests/missingbehaviour_test.php
question/engine/tests/helpers.php
question/engine/tests/questionattempt_test.php
question/engine/tests/questionattempt_with_steps_test.php
question/engine/tests/questionattemptiterator_test.php
question/engine/tests/questionattemptstep_test.php
question/engine/tests/questionattemptstepiterator_test.php
question/engine/tests/questionengine_test.php
question/engine/tests/questionusage_autosave_test.php
question/engine/tests/questionutils_test.php
question/engine/tests/unitofwork_test.php
question/engine/upgrade/tests/helper.php
question/format/aiken/tests/aikenformat_test.php
question/format/multianswer/tests/multianswerformat_test.php
question/format/xml/tests/qformat_xml_import_export_test.php
question/tests/bank_view_test.php
question/tests/category_class_test.php
question/tests/events_test.php
question/tests/externallib_test.php
question/tests/privacy_provider_test.php
question/tests/question_bank_column_test.php
question/type/calculated/tests/formula_validation_test.php
question/type/calculated/tests/questiontype_test.php
question/type/calculated/tests/variablesubstituter_test.php
question/type/calculatedsimple/tests/questiontype_test.php
question/type/ddimageortext/tests/questiontype_test.php
question/type/ddmarker/tests/questiontype_test.php
question/type/ddwtos/tests/questiontype_test.php
question/type/description/tests/questiontype_test.php
question/type/essay/tests/questiontype_test.php
question/type/essay/tests/walkthrough_test.php
question/type/gapselect/tests/questiontype_test.php
question/type/match/tests/questiontype_test.php
question/type/missingtype/tests/missingtype_test.php
question/type/multianswer/tests/questiontype_test.php
question/type/multichoice/tests/question_multi_test.php
question/type/multichoice/tests/question_single_test.php
question/type/multichoice/tests/questiontype_test.php
question/type/numerical/tests/answerprocessor_test.php
question/type/numerical/tests/questiontype_test.php
question/type/random/tests/questiontype_test.php
question/type/shortanswer/tests/questiontype_test.php
question/type/tests/question_first_matching_answer_grading_strategy_test.php
question/type/truefalse/tests/questiontype_test.php
rating/tests/externallib_test.php
rating/tests/rating_test.php
report/completion/tests/events_test.php
report/infectedfiles/lang/en/report_infectedfiles.php
report/log/tests/events_test.php
report/log/tests/lib_test.php
report/loglive/tests/events_test.php
report/outline/tests/lib_test.php
report/questioninstances/tests/events_test.php
report/stats/tests/events_test.php
report/stats/tests/lib_test.php
report/usersessions/tests/lib_test.php
repository/contentbank/tests/behat/file_update.feature
repository/contentbank/tests/browser_test.php
repository/contentbank/tests/search_test.php
repository/flickr/tests/privacy_test.php
repository/nextcloud/tests/access_controlled_link_manager_test.php
repository/nextcloud/tests/lib_test.php
repository/nextcloud/tests/ocs_test.php
repository/onedrive/lang/en/repository_onedrive.php
repository/onedrive/tests/privacy_test.php
repository/recent/tests/lib_test.php
repository/tests/behat/create_shortcut.feature
repository/tests/privacy_test.php
repository/tests/repositorylib_test.php
rss/tests/privacy_test.php
search/engine/simpledb/tests/engine_test.php
search/engine/simpledb/tests/privacy_test.php
search/engine/solr/tests/engine_test.php
search/tests/base_activity_test.php
search/tests/base_test.php
search/tests/document_test.php
search/tests/engine_test.php
search/tests/external_test.php
search/tests/generator/lib.php
search/tests/manager_test.php
tag/tests/events_test.php
tag/tests/taglib_test.php
theme/boost/scss/moodle/calendar.scss
theme/boost/scss/moodle/core.scss
theme/boost/scss/moodle/forms.scss
theme/boost/scss/moodle/question.scss
theme/boost/scss/preset/default.scss
theme/boost/style/moodle.css
theme/classic/scss/preset/default.scss
theme/classic/style/moodle.css
user/profile/field/checkbox/tests/privacy_test.php
user/profile/field/datetime/tests/privacy_test.php
user/profile/field/menu/tests/privacy_test.php
user/profile/field/text/tests/privacy_test.php
user/profile/field/textarea/tests/privacy_test.php
user/tests/externallib_test.php
user/tests/myprofile_test.php
user/tests/search_test.php
user/tests/userlib_test.php
user/tests/userroleseditable_test.php
version.php
webservice/tests/events_test.php
webservice/tests/externallib_test.php
webservice/tests/lib_test.php
webservice/tests/privacy_test.php
webservice/xmlrpc/tests/lib_test.php
webservice/xmlrpc/tests/locallib_test.php
webservice/xmlrpc/tests/xmlrpc_server_test.php

index 9d02c9b..41e19ac 100644 (file)
@@ -33,6 +33,7 @@ CVS
 /.project
 /.buildpath
 /.cache
+.phpunit.result.cache
 phpunit.xml
 # Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us.
 composer.phar
index fbf8ac4..f344cfe 100644 (file)
@@ -43,7 +43,7 @@ class testoutgoingmailconf_form extends \moodleform {
         $mform = $this->_form;
 
         // Recipient.
-        $options = ['maxlength' => '100', 'size' => '25'];
+        $options = ['maxlength' => '100', 'size' => '25', 'autocomplete' => 'email'];
         $mform->addElement('text', 'recipient', get_string('testoutgoingmailconf_toemail', 'admin'), $options);
         $mform->setType('recipient', PARAM_EMAIL);
         $mform->addRule('recipient', get_string('required'), 'required');
index e5a6edb..3352f1e 100644 (file)
@@ -178,6 +178,7 @@ class filesize extends \admin_setting {
             'id' => $this->get_id(),
             'name' => $this->get_full_name(),
             'value' => $data['v'],
+            'readonly' => $this->is_readonly(),
             'options' => array_map(function($unit, $title) use ($data, $defaultunit) {
                 return [
                     'value' => $unit,
diff --git a/admin/classes/local/settings/manage_payment_gateway_plugins.php b/admin/classes/local/settings/manage_payment_gateway_plugins.php
new file mode 100644 (file)
index 0000000..f61951c
--- /dev/null
@@ -0,0 +1,74 @@
+<?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/>.
+
+/**
+ * Payment gateway admin setting.
+ *
+ * @package    core_admin
+ * @copyright  2020 Shamim Rezaie <shamim@moodle.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+namespace core_admin\local\settings;
+
+/**
+ * Generic class for managing plugins in a table that allows re-ordering and enable/disable of each plugin.
+ */
+class manage_payment_gateway_plugins extends \admin_setting_manage_plugins {
+    /**
+     * Get the admin settings section title (use get_string).
+     *
+     * @return string
+     */
+    public function get_section_title() {
+        return get_string('type_paygw_plural', 'plugin');
+    }
+
+    /**
+     * Get the type of plugin to manage.
+     *
+     * @return string
+     */
+    public function get_plugin_type() {
+        return 'paygw';
+    }
+
+    /**
+     * Get the name of the second column.
+     *
+     * @return string
+     */
+    public function get_info_column_name() {
+        return get_string('supportedcurrencies', 'core_payment');
+    }
+
+    /**
+     * Get the type of plugin to manage.
+     *
+     * @param plugininfo The plugin info class.
+     * @return string
+     */
+    public function get_info_column($plugininfo) {
+        $codes = $plugininfo->get_supported_currencies();
+
+        $currencies = [];
+        foreach ($codes as $c) {
+            $currencies[$c] = new \lang_string($c, 'core_currencies');
+        }
+
+        return implode(get_string('listsep', 'langconfig') . ' ', $currencies);
+    }
+}
index 258b5a7..82203c1 100644 (file)
@@ -536,7 +536,7 @@ class core_role_privacy_testcase extends provider_testcase {
             $user1->id,
             $admin->id
         ];
-        $this->assertEquals($expected, $userlist2->get_userids(), '', 0.0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $userlist2->get_userids());
 
         // The user list for coursecontext1 should user1, user2 and admin (role creator).
         $userlist3 = new \core_privacy\local\request\userlist($coursecontext1, $component);
@@ -547,7 +547,7 @@ class core_role_privacy_testcase extends provider_testcase {
             $user2->id,
             $admin->id
         ];
-        $this->assertEquals($expected, $userlist3->get_userids(), '', 0.0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $userlist3->get_userids());
 
         // The user list for coursecatcontext should user2 and admin (role creator).
         $userlist4 = new \core_privacy\local\request\userlist($coursecatcontext, $component);
@@ -557,7 +557,7 @@ class core_role_privacy_testcase extends provider_testcase {
             $user2->id,
             $admin->id
         ];
-        $this->assertEquals($expected, $userlist4->get_userids(), '', 0.0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $userlist4->get_userids());
 
         // The user list for systemcontext should user1 and admin (role creator).
         $userlist6 = new \core_privacy\local\request\userlist($systemcontext, $component);
@@ -567,7 +567,7 @@ class core_role_privacy_testcase extends provider_testcase {
             $user1->id,
             $admin->id
         ];
-        $this->assertEquals($expected, $userlist6->get_userids(), '', 0.0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $userlist6->get_userids());
 
         // The user list for cmcontext should user1, user2 and admin (role creator).
         $userlist7 = new \core_privacy\local\request\userlist($cmcontext, $component);
@@ -578,7 +578,7 @@ class core_role_privacy_testcase extends provider_testcase {
             $user2->id,
             $admin->id
         ];
-        $this->assertEquals($expected, $userlist7->get_userids(), '', 0.0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $userlist7->get_userids());
 
         // The user list for blockcontext should user1 and admin (role creator).
         $userlist8 = new \core_privacy\local\request\userlist($blockcontext, $component);
@@ -588,7 +588,7 @@ class core_role_privacy_testcase extends provider_testcase {
             $user1->id,
             $admin->id
         ];
-        $this->assertEquals($expected, $userlist8->get_userids(), '', 0.0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $userlist8->get_userids());
     }
 
     /**
@@ -744,4 +744,4 @@ class core_role_privacy_testcase extends provider_testcase {
         }
         return $rolesnames;
     }
-}
\ No newline at end of file
+}
index a722244..30b6a22 100644 (file)
@@ -131,15 +131,10 @@ if ($hassiteconfig && \core_analytics\manager::is_analytics_enabled()) {
             $timesplittingdefaults, $timesplittingoptions)
         );
 
-        // Predictions processor output dir.
-        $defaultmodeloutputdir = rtrim($CFG->dataroot, '/') . DIRECTORY_SEPARATOR . 'models';
-        if (empty(get_config('analytics', 'modeloutputdir')) && !file_exists($defaultmodeloutputdir) &&
-                is_writable($defaultmodeloutputdir)) {
-            // Automatically create the dir for them so users don't see the invalid value red cross.
-            mkdir($defaultmodeloutputdir, $CFG->directorypermissions, true);
-        }
+        // Predictions processor output dir - specify default in setting description (used if left blank).
+        $defaultmodeloutputdir = \core_analytics\model::default_output_dir();
         $settings->add(new admin_setting_configdirectory('analytics/modeloutputdir', new lang_string('modeloutputdir', 'analytics'),
-            new lang_string('modeloutputdirinfo', 'analytics'), $defaultmodeloutputdir));
+            new lang_string('modeloutputdirwithdefaultinfo', 'analytics', $defaultmodeloutputdir), ''));
 
         // Disable web interface evaluation and get predictions.
         $settings->add(new admin_setting_configcheckbox('analytics/onlycli', new lang_string('onlycli', 'analytics'),
index 6b53eb0..c0da1aa 100644 (file)
@@ -22,6 +22,8 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+use core_admin\local\settings\filesize;
+
 $capabilities = array(
     'moodle/backup:backupcourse',
     'moodle/category:manage',
@@ -75,6 +77,17 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
     $temp->add(new admin_setting_configselect('moodlecourse/visible', new lang_string('visible'), new lang_string('visible_help'),
         1, $choices));
 
+    // Enable/disable download course content.
+    $choices = [
+        DOWNLOAD_COURSE_CONTENT_DISABLED => new lang_string('no'),
+        DOWNLOAD_COURSE_CONTENT_ENABLED => new lang_string('yes'),
+    ];
+    $downloadcontentsitedefault = new admin_setting_configselect('moodlecourse/downloadcontentsitedefault',
+            new lang_string('enabledownloadcoursecontent', 'course'),
+            new lang_string('downloadcoursecontent_help', 'course'), 0, $choices);
+    $downloadcontentsitedefault->add_dependent_on('downloadcoursecontentallowed');
+    $temp->add($downloadcontentsitedefault);
+
     // Course format.
     $temp->add(new admin_setting_heading('courseformathdr', new lang_string('type_format', 'plugin'), ''));
 
@@ -161,6 +174,21 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
 
     $ADMIN->add('courses', $temp);
 
+    // Download course content.
+    $downloadcoursedefaulturl = new moodle_url('/admin/settings.php', ['section' => 'coursesettings']);
+    $temp = new admin_settingpage('downloadcoursecontent', new lang_string('downloadcoursecontent', 'course'));
+    $temp->add(new admin_setting_configcheckbox('downloadcoursecontentallowed',
+            new lang_string('downloadcoursecontentallowed', 'admin'),
+            new lang_string('downloadcoursecontentallowed_desc', 'admin', $downloadcoursedefaulturl->out()), 0));
+
+    // 50MB default maximum size per file when downloading course content.
+    $defaultmaxdownloadsize = 50 * filesize::UNIT_MB;
+    $temp->add(new filesize('maxsizeperdownloadcoursefile', new lang_string('maxsizeperdownloadcoursefile', 'admin'),
+            new lang_string('maxsizeperdownloadcoursefile_desc', 'admin'), $defaultmaxdownloadsize, filesize::UNIT_MB));
+    $temp->hide_if('maxsizeperdownloadcoursefile', 'downloadcoursecontentallowed');
+
+    $ADMIN->add('courses', $temp);
+
     // "courserequests" settingpage.
     $temp = new admin_settingpage('courserequest', new lang_string('courserequest'));
     $temp->add(new admin_setting_configcheckbox('enablecourserequests',
diff --git a/admin/settings/payment.php b/admin/settings/payment.php
new file mode 100644 (file)
index 0000000..ab4fe79
--- /dev/null
@@ -0,0 +1,29 @@
+<?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/>.
+
+/**
+ * Adds payments links to the admin tree
+ *
+ * @package    core
+ * @copyright  2020 Marina Glancy
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+$ADMIN->add('payment', new admin_externalpage(
+    'paymentaccounts',
+    new lang_string('paymentaccounts', 'payment'),
+    new moodle_url("/payment/accounts.php"),
+    ['moodle/payment:manageaccounts', 'moodle/payment:viewpayments']));
index 249bd53..8def3d7 100644 (file)
@@ -280,6 +280,25 @@ if ($hassiteconfig) {
         $plugin->load_settings($ADMIN, 'mediaplayers', $hassiteconfig);
     }
 
+    // Payment gateway plugins.
+    $ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
+    $temp = new admin_settingpage('managepaymentgateways', new lang_string('type_paygwmanage', 'plugin'));
+    $temp->add(new \core_admin\local\settings\manage_payment_gateway_plugins());
+    $temp->add(new admin_setting_description(
+        'managepaymentgatewayspostfix',
+        '',
+        new lang_string('gotopaymentaccounts', 'payment',
+            html_writer::link(new moodle_url('/payment/accounts.php'), get_string('paymentaccounts', 'payment')))
+    ));
+    $ADMIN->add('paymentgateways', $temp);
+
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('paygw');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
+        /** @var \core\plugininfo\paygw $plugin */
+        $plugin->load_settings($ADMIN, 'paymentgateways', $hassiteconfig);
+    }
+
     // Data format settings.
     $ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
     $temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
index cb586b4..11541bb 100644 (file)
@@ -455,6 +455,15 @@ if ($hassiteconfig) {
         new lang_string('divertallemailsexcept_desc', 'admin'),
         '', PARAM_RAW, '50', '4'));
 
+    $noreplyaddress = isset($CFG->noreplyaddress) ? $CFG->noreplyaddress : 'noreply@example.com';
+    $dkimdomain = substr(strrchr($noreplyaddress, "@"), 1);
+    $dkimselector = empty($CFG->emaildkimselector) ? '[selector]' : $CFG->emaildkimselector;
+    $pempath = "\$CFG->dataroot/dkim/{$dkimdomain}/{$dkimselector}.private";
+    $temp->add(new admin_setting_heading('emaildkim', new lang_string('emaildkim', 'admin'),
+        new lang_string('emaildkiminfo', 'admin', ['path' => $pempath, 'docs' => \get_docs_url('Mail_configuration#DKIM')])));
+    $temp->add(new admin_setting_configtext('emaildkimselector', new lang_string('emaildkimselector', 'admin'),
+        new lang_string('configemaildkimselector', 'admin'), '', PARAM_FILE));
+
     $url = new moodle_url('/admin/testoutgoingmailconf.php');
     $link = html_writer::link($url, get_string('testoutgoingmailconf', 'admin'));
     $temp->add(new admin_setting_heading('testoutgoinmailc', new lang_string('testoutgoingmailconf', 'admin'),
index 992436b..d567741 100644 (file)
@@ -39,6 +39,7 @@ $ADMIN->add('root', new admin_category('license', new lang_string('license')));
 $ADMIN->add('root', new admin_category('location', new lang_string('location','admin')));
 $ADMIN->add('root', new admin_category('language', new lang_string('language')));
 $ADMIN->add('root', new admin_category('messaging', new lang_string('messagingcategory', 'admin')));
+$ADMIN->add('root', new admin_category('payment', new lang_string('payments', 'payment')));
 $ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
 $ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
 $ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
index f41e5a2..48e0471 100644 (file)
@@ -25,6 +25,7 @@
     * value - yes value
     * id - element id
     * checked - boole
+    * readonly - bool
 
     Example context (json):
     {
         "no": "False",
         "value": "True",
         "id": "test0",
-        "checked": "checked"
+        "checked": "checked",
+        "readonly": false
     }
 }}
 <div class="form-checkbox defaultsnext">
     <input type="hidden" name="{{name}}" value="{{no}}">
-    <input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
+    <input {{#readonly}}disabled{{/readonly}} type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
 </div>
index 3de5aac..50b7da1 100644 (file)
@@ -25,6 +25,7 @@
     * id - element id
     * value - element value
     * haspreviewconfig - show preview of selected color
+    * readonly - bool
 
     Example context (json):
     {
@@ -32,6 +33,7 @@
         "name": "name0",
         "id": "id0",
         "value": "#555655",
+        "readonly": false,
         "haspreviewconfig": false
     }
 }}
@@ -44,7 +46,7 @@
             {{>core/pix_icon}}
         {{/icon}}
     </div>
-    <input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr">
+    <input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
     {{#haspreviewconfig}}
         <input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview">
     {{/haspreviewconfig}}
index 1804787..cfe8a7d 100644 (file)
@@ -33,7 +33,7 @@
         "name": "test",
         "value": "/my-super-secret-path/",
         "id": "test0",
-        "readonly": true,
+        "readonly": false,
         "showvalidity": true,
         "valid": false
     }
index d20dabc..1a880c1 100644 (file)
@@ -23,6 +23,7 @@
     * name - form element name
     * options - list of options for units containing name, value, selected
     * value - yes
+    * readonly - bool
     * id - element id
 
     Example context (json):
@@ -30,6 +31,7 @@
         "name": "test",
         "value": "5",
         "id": "test0",
+        "readonly": false,
         "options": [ { "name": "Minutes", "value": "mins", "selected": true } ]
     }
 }}
@@ -38,9 +40,9 @@
 }}
 <div class="form-duration defaultsnext">
     <div class="form-inline">
-        <input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
+        <input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
         <label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
-        <select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
+        <select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
             {{#options}}
                 <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
             {{/options}}
index 72187f2..773b07d 100644 (file)
@@ -33,7 +33,7 @@
         "name": "test",
         "value": "/usr/bin/cowsay",
         "id": "test0",
-        "readonly": true,
+        "readonly": false,
         "showvalidity": true,
         "valid": false
     }
index 1f0b5d5..15a45ce 100644 (file)
@@ -26,6 +26,7 @@
     * readonly - Make the field readonly
     * value - value
     * showvalidity - Show a green check if the path is readable
+    * readonly - bool
     * valid - True if the path is readable
 
     Example context (json):
@@ -33,8 +34,9 @@
         "name": "test",
         "value": "/my-super-secret-path/file",
         "id": "test0",
-        "readonly": true,
+        "readonly": false,
         "showvalidity": true,
+        "readonly": false,
         "valid": false
     }
 }}
index 4716c6e..355cc6d 100644 (file)
     * options - list of options for units containing name, value, selected
     * value - yes
     * id - element id
+    * readonly - bool
 
     Example context (json):
     {
         "name": "test",
         "value": "5",
         "id": "test0",
+        "readonly": false,
         "options": [ { "name": "KB", "value": "1024", "selected": true } ]
     }
 }}
@@ -38,9 +40,9 @@
 }}
 <div class="form-filesize defaultsnext">
     <div class="form-inline">
-        <input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
+        <input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
         <label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
-        <select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
+        <select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
             {{#options}}
                 <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
             {{/options}}
index 49eb55c..c19b1fd 100644 (file)
     * id - element id
     * size - element size
     * options - list of options containing name, value, selected
+    * readonly - bool
 
     Example context (json):
     {
         "name": "test",
         "id": "test0",
+        "readonly": false,
         "size": "3",
         "options": [ { "name": "Option 1", "value": "V", "selected": true },
                      { "name": "Option 2", "value": "V", "selected": true } ]
@@ -39,7 +41,7 @@
 }}
 <div class="form-select">
     <input type="hidden" name="{{name}}[xxxxx]" value="1">
-    <select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
+    <select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
         {{#options}}
             <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
         {{/options}}
index 20d66e1..a1cbc9d 100644 (file)
     * size - element size
     * options - list of options not grouped
     * optgroups - list of options grouped containing the group label and for each option: name, value, selected
+    * readonly - bool
 
     Example context (json):
     {
         "name": "test",
         "id": "test0",
+        "readonly": false,
         "size": "3",
         "options": [
             { "name": "Option 1", "value": "V", "selected": false },
@@ -58,7 +60,7 @@
 }}
 <div class="form-select">
     <input type="hidden" name="{{name}}[xxxxx]" value="1">
-    <select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
+    <select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
     {{#options}}
         <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
     {{/options}}
index 7092e82..84a27a6 100644 (file)
@@ -24,7 +24,7 @@
     * size - form element size
     * value - form element value
     * id - element id
-    * forced - has value been defined in config.php
+    * readonly - has value been defined in config.php
 
     Example context (json):
     {
         "id": "test0",
         "size": "8",
         "value": "secret",
-        "forced": false
+        "readonly": false
     }
 }}
-{{#forced}}
+{{#readonly}}
     <div class="form-password">
         <input type="text"
                name = "{{ name }}"
@@ -46,8 +46,8 @@
                disabled
         >
     </div>
-{{/forced}}
-{{^forced}}
+{{/readonly}}
+{{^readonly}}
 <div class="form-password">
     <span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
         <span data-passwordunmask="editor">
@@ -76,4 +76,4 @@ require(['core_form/passwordunmask'], function(PasswordUnmask) {
     new PasswordUnmask("{{ id }}");
 });
 {{/js}}
-{{/forced}}
+{{/readonly}}
index 9b6c6e1..eb18b4b 100644 (file)
     * name - form element name
     * id - element id
     * options - list of options containing name, value, selected
+    * readonly - bool
 
     Example context (json):
     {
         "name": "test",
         "id": "test0",
+        "readonly": false,
         "options": [
             { "name": "Option 1", "value": "V", "selected": true },
             { "name": "Option 2", "value": "V", "selected": true }
@@ -38,7 +40,7 @@
     Setting configselect.
 }}
 <div class="form-select defaultsnext">
-    <select id="{{id}}" name="{{name}}" class="custom-select">
+    <select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
         {{#options}}
             <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
         {{/options}}
index 95f818b..862ac61 100644 (file)
@@ -22,6 +22,7 @@
     Context variables required for this template:
     * name - form element name
     * id - element id
+    * readonly - bool
     * options - list of options (not grouped)
     * optgroups - list of options grouped containing the group label and for each option: name, value, selected
 
@@ -29,6 +30,7 @@
     {
         "name": "test",
         "id": "test0",
+        "readonly": false,
         "options": [
             { "name": "Option 1", "value": "V", "selected": false },
             { "name": "Option 2", "value": "V", "selected": false }
@@ -55,7 +57,7 @@
     Setting configselect with optgroup support.
 }}
 <div class="form-select defaultsnext">
-    <select id="{{id}}" name="{{name}}" class="custom-select">
+    <select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
         {{#options}}
             <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
         {{/options}}
index a31f73a..1238c8e 100644 (file)
@@ -26,6 +26,7 @@
     * size - element size
     * forceltr - always display as ltr
     * attributes - list of additional attributes containing name, value
+    * readonly - bool
 
     Example context (json):
     {
@@ -34,6 +35,7 @@
         "value": "A tall, dark stranger will have more fun than you.",
         "size": "21",
         "forceltr": false,
+        "readonly": false,
         "attributes": [ { "name": "readonly", "value": "readonly" } ]
     }
 }}
@@ -41,5 +43,5 @@
     Setting configtext.
 }}
 <div class="form-text defaultsnext">
-    <input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">
+    <input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}}>
 </div>
index 002b0cd..c877d94 100644 (file)
@@ -33,6 +33,7 @@
         "cols": "30",
         "rows": "3",
         "value": "Excellent day for putting Slinkies on an escalator.",
+        "readonly": false,
         "id": "test0"
     }
 }}
@@ -40,5 +41,5 @@
     Setting configtextarea.
 }}
 <div class="form-textarea">
-    <textarea rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
+    <textarea {{#readonly}}disabled{{/readonly}} rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
 </div>
index 90d37b3..af4435a 100644 (file)
     * id - element id
     * hours - list of valid hour options containing name, value, selected
     * minutes - list of valid minute options containing name, value, selected
+    * readonly - bool
 
     Example context (json):
     {
         "name": "test",
         "id": "test0",
+        "readonly": false,
         "minutes": [
             { "name": "00", "value": "0", "selected": true },
             { "name": "01", "value": "1", "selected": false }
 <div class="form-time defaultsnext">
     <div class="form-inline text-ltr">
         <label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
-        <select id="{{id}}h" name="{{name}}[h]" class="custom-select">
+        <select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
             {{#hours}}
                 <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
             {{/hours}}
         </select>:
         <label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
-        <select id="{{id}}m" name="{{name}}[m]" class="custom-select">
+        <select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
             {{#minutes}}
                 <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
             {{/minutes}}
diff --git a/admin/tests/behat/language_settings.feature b/admin/tests/behat/language_settings.feature
new file mode 100644 (file)
index 0000000..6d00ebe
--- /dev/null
@@ -0,0 +1,34 @@
+@core @core_admin
+Feature: Configure language settings for the site
+  In order to configure language settings for the site
+  As an admin
+  I want to set language settings relevant to my site users
+
+  Scenario: Set languages on language menu
+    Given I log in as "admin"
+    And I navigate to "Language > Language settings" in site administration
+    When I set the field "Languages on language menu" to "en"
+    And I press "Save changes"
+    Then I should not see "Invalid language code"
+
+  Scenario: Reset languages on language menu
+    Given I log in as "admin"
+    And I navigate to "Language > Language settings" in site administration
+    When I set the field "Languages on language menu" to ""
+    And I press "Save changes"
+    Then I should not see "Invalid language code"
+
+  Scenario Outline: Set languages on language menu with invalid language
+    Given I log in as "admin"
+    And I navigate to "Language > Language settings" in site administration
+    When I set the field "Languages on language menu" to "<fieldvalue>"
+    And I press "Save changes"
+    Then I should see "Invalid language code: <invalidlang>"
+    Examples:
+      | fieldvalue | invalidlang |
+      | xx         | xx          |
+      | xx\|Bad    | xx          |
+      | en,qq      | qq          |
+      | en,qq\|Bad | qq          |
+      | en$$       | en$$        |
+      | en$$\|Bad  | en$$        |
index ff26c64..597dda7 100644 (file)
@@ -66,8 +66,6 @@ class tool_analytics_external_testcase extends externallib_advanced_testcase {
 
     /**
      * test_potential_contexts description
-     *
-     * @expectedException required_capability_exception
      */
     public function test_potential_contexts_no_manager() {
         $this->resetAfterTest();
@@ -75,6 +73,7 @@ class tool_analytics_external_testcase extends externallib_advanced_testcase {
         $user = $this->getDataGenerator()->create_user();
         $this->setUser($user);
 
+        $this->expectException(required_capability_exception::class);
         $this->assertCount(2, \tool_analytics\external::potential_contexts());
     }
 }
index 98ccd03..71b4b94 100644 (file)
@@ -87,7 +87,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
     /**
      * Setup test.
      */
-    public function setup() {
+    public function setUp(): void {
         global $CFG;
 
         $this->resetAfterTest();
@@ -165,7 +165,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
 
@@ -219,7 +219,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
 
@@ -264,7 +264,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
 
@@ -295,7 +295,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -324,7 +324,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -368,7 +368,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -399,7 +399,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -428,7 +428,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -532,7 +532,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -611,7 +611,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
         // Check contexts.
@@ -646,7 +646,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
 
@@ -662,7 +662,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
 
@@ -678,7 +678,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
 
@@ -693,7 +693,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
             $this->assertCount(count($paths), $suites[$themename]['paths']);
 
             foreach ($paths as $key => $feature) {
-                $this->assertContains($feature, $suites[$themename]['paths'][$key]);
+                $this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
             }
         }
     }
index 30942ca..1e3e8d5 100644 (file)
@@ -36,7 +36,7 @@ class tool_capability_events_testcase extends advanced_testcase {
     /**
      * Setup testcase.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->setAdminUser();
         $this->resetAfterTest();
     }
index 2d99e5c..0464370 100644 (file)
@@ -49,7 +49,7 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
     /**
      * Setup function- we will create a course and add an assign instance to it.
      */
-    protected function setUp() {
+    protected function setUp(): void {
         $this->resetAfterTest(true);
 
         // Create some users.
@@ -60,9 +60,6 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
         cohort_add_member($this->cohort->id, $this->userassignover->id);
     }
 
-    /**
-     * @expectedException required_capability_exception
-     */
     public function test_create_cohort_role_assignment_without_permission() {
         $this->setUser($this->userassignto);
         $params = (object) array(
@@ -70,12 +67,10 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
             'roleid' => $this->roleid,
             'cohortid' => $this->cohort->id
         );
+        $this->expectException(required_capability_exception::class);
         api::create_cohort_role_assignment($params);
     }
 
-    /**
-     * @expectedException core_competency\invalid_persistent_exception
-     */
     public function test_create_cohort_role_assignment_with_invalid_data() {
         $this->setAdminUser();
         $params = (object) array(
@@ -83,6 +78,7 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
             'roleid' => -8,
             'cohortid' => $this->cohort->id
         );
+        $this->expectException(\core_competency\invalid_persistent_exception::class);
         api::create_cohort_role_assignment($params);
     }
 
@@ -100,9 +96,6 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
         $this->assertEquals($result->get('cohortid'), $this->cohort->id);
     }
 
-    /**
-     * @expectedException required_capability_exception
-     */
     public function test_delete_cohort_role_assignment_without_permission() {
         $this->setAdminUser();
         $params = (object) array(
@@ -112,12 +105,10 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
         );
         $result = api::create_cohort_role_assignment($params);
         $this->setUser($this->userassignto);
+        $this->expectException(required_capability_exception::class);
         api::delete_cohort_role_assignment($result->get('id'));
     }
 
-    /**
-     * @expectedException dml_missing_record_exception
-     */
     public function test_delete_cohort_role_assignment_with_invalid_data() {
         $this->setAdminUser();
         $params = (object) array(
@@ -126,6 +117,7 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
             'cohortid' => $this->cohort->id
         );
         $result = api::create_cohort_role_assignment($params);
+        $this->expectException(dml_missing_record_exception::class);
         api::delete_cohort_role_assignment($result->get('id') + 1);
     }
 
index 6399314..e5c4b9c 100644 (file)
@@ -43,7 +43,7 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
     /**
      * Overriding setUp() function to always reset after tests.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest(true);
     }
 
@@ -87,7 +87,7 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
             CONTEXT_COURSECAT
         ];
         // Test the User's contexts equal the system and course category context.
-        $this->assertEquals($expected, $contextlevels, '', 0, 10, true);
+        $this->assertEqualsCanonicalizing($expected, $contextlevels);
     }
 
     /**
index 29dd1e2..882f920 100644 (file)
@@ -33,8 +33,8 @@ $string['checkoutinprogress'] = 'Loading language pack';
 $string['cliexportfileexists'] = 'File for {$a->lang} already exists, skipping. If you want to overwrite add the --override=true option.';
 $string['cliexportheading'] = 'Starting to export lang files.';
 $string['cliexportnofilefoundforlang'] = 'No file found to export. Skipping export for this language.';
-$string['cliexportfilenotfoundforcomponent'] = 'File {$a->filepath} not found for language {$a->lang}.Skipping this file.';
-$string['cliexportstartexport'] = 'Exporting language "{$a}"';
+$string['cliexportfilenotfoundforcomponent'] = 'File {$a->filepath} not found for language {$a->lang}. Skipping this file.';
+$string['cliexportstartexport'] = 'Exporting language {$a}';
 $string['cliexportzipdone'] = 'Zip created: {$a}';
 $string['cliexportzipfail'] = 'Cannot create zip {$a}';
 $string['clifiles'] = 'Files to import into {$a}';
index 7bf94cc..4cb3450 100644 (file)
@@ -997,8 +997,8 @@ class tool_dataprivacy_api_testcase extends advanced_testcase {
         $this->assertEquals($subject, $message->subject);
         $this->assertEquals('tool_dataprivacy', $message->component);
         $this->assertEquals('contactdataprotectionofficer', $message->eventtype);
-        $this->assertContains(fullname($dpo), $message->fullmessage);
-        $this->assertContains(fullname($user1), $message->fullmessage);
+        $this->assertStringContainsString(fullname($dpo), $message->fullmessage);
+        $this->assertStringContainsString(fullname($user1), $message->fullmessage);
     }
 
     /**
index eec0bd5..32c4f56 100644 (file)
@@ -44,7 +44,7 @@ class tool_dataprivacy_expired_data_requests_testcase extends data_privacy_testc
     /**
      * Test tearDown.
      */
-    public function tearDown() {
+    public function tearDown(): void {
         \core_privacy\local\request\writer::reset();
     }
 
index 1c47153..a68bd88 100644 (file)
@@ -63,7 +63,7 @@ class tool_dataprivacy_manager_observer_testcase extends data_privacy_testcase {
             return $message->useridto;
         }, $messages);
 
-        $this->assertEquals(array_keys($dpos), $messageusers, '', 0.0, 0, true);
+        $this->assertEqualsCanonicalizing(array_keys($dpos), $messageusers);
     }
 
     /**
index e671fa7..cfbaac3 100644 (file)
@@ -142,7 +142,7 @@ class tool_dataprivacy_privacy_provider_testcase extends provider_testcase {
         $this->assertEquals($strs->statusrejected, $data[1]->status);
         $this->assertEquals($strs->creationmanual, $data[1]->creationmethod);
         $this->assertEmpty($data[1]->comments);
-        $this->assertContains('Nope', $data[1]->dpocomment);
+        $this->assertStringContainsString('Nope', $data[1]->dpocomment);
         $this->assertNotEmpty($data[1]->timecreated);
     }
 
@@ -184,4 +184,4 @@ class tool_dataprivacy_privacy_provider_testcase extends provider_testcase {
 
         $this->assertEquals(6, $preferences[helper::PREF_REQUEST_PERPAGE]->value);
     }
-}
\ No newline at end of file
+}
index 0dc614a..8ab8919 100644 (file)
@@ -39,7 +39,7 @@ class tool_dataprivacy_task_testcase extends data_privacy_testcase {
     /**
      * Test tearDown.
      */
-    public function tearDown() {
+    public function tearDown(): void {
         \core_privacy\local\request\writer::reset();
     }
 
index e3599c6..fb60090 100644 (file)
@@ -155,7 +155,7 @@ class httpsreplace_test extends \advanced_testcase {
         $finder->upgrade_http_links();
 
         $summary = $DB->get_field('course', 'summary', ['id' => $course->id]);
-        $this->assertContains($expectedcontent, $summary);
+        $this->assertStringContainsString($expectedcontent, $summary);
     }
 
     /**
@@ -253,10 +253,10 @@ class httpsreplace_test extends \advanced_testcase {
         $this->assertCount(0, $results);
 
         $summary = $DB->get_field('course', 'summary', ['id' => $course->id]);
-        $this->assertContains('http://intentionally.unavailable/page.php', $summary);
-        $this->assertContains('http://other.unavailable/page.php', $summary);
-        $this->assertNotContains('https://intentionally.unavailable', $summary);
-        $this->assertNotContains('https://other.unavailable', $summary);
+        $this->assertStringContainsString('http://intentionally.unavailable/page.php', $summary);
+        $this->assertStringContainsString('http://other.unavailable/page.php', $summary);
+        $this->assertStringNotContainsString('https://intentionally.unavailable', $summary);
+        $this->assertStringNotContainsString('https://other.unavailable', $summary);
     }
 
     /**
@@ -281,7 +281,7 @@ class httpsreplace_test extends \advanced_testcase {
 
         $finder->upgrade_http_links();
         $summary = $DB->get_field('course', 'summary', ['id' => $course->id]);
-        $this->assertContains($CFG->wwwroot, $summary);
+        $this->assertStringContainsString($CFG->wwwroot, $summary);
     }
 
     /**
@@ -298,10 +298,10 @@ class httpsreplace_test extends \advanced_testcase {
         $output = ob_get_contents();
         ob_end_clean();
         $this->assertTrue($results);
-        $this->assertNotContains('https://somesite', $output);
+        $this->assertStringNotContainsString('https://somesite', $output);
         $testconf = get_config('core', 'test_upgrade_http_links');
-        $this->assertContains('http://somesite', $testconf);
-        $this->assertNotContains('https://somesite', $testconf);
+        $this->assertStringContainsString('http://somesite', $testconf);
+        $this->assertStringNotContainsString('https://somesite', $testconf);
     }
 
     /**
@@ -331,8 +331,8 @@ class httpsreplace_test extends \advanced_testcase {
         $finder->upgrade_http_links();
 
         $summary = $DB->get_field('course', 'summary', ['id' => $course->id]);
-        $this->assertContains('https://secure.example.com', $summary);
-        $this->assertNotContains('http://example.com', $summary);
+        $this->assertStringContainsString('https://secure.example.com', $summary);
+        $this->assertStringNotContainsString('http://example.com', $summary);
         $this->assertEquals('<script src="https://secure.example.com/test.js">' .
             '<img src="https://secure.example.com/someimage.png">', $summary);
     }
@@ -401,7 +401,7 @@ class httpsreplace_test extends \advanced_testcase {
         $finder->upgrade_http_links();
 
         $record = $DB->get_record('reserved_words_temp', []);
-        $this->assertContains($expectedcontent, $record->where);
+        $this->assertStringContainsString($expectedcontent, $record->where);
 
         $dbman->drop_table($table);
     }
index 55a0608..cff9578 100644 (file)
@@ -44,7 +44,7 @@ class tool_installaddon_installer_testcase extends advanced_testcase {
         $this->assertEquals(1, preg_match('~^site=(.+)$~', $query, $matches));
         $site = rawurldecode($matches[1]);
         $site = json_decode(base64_decode($site), true);
-        $this->assertInternalType('array', $site);
+        $this->assertIsArray($site);
         $this->assertEquals(3, count($site));
         $this->assertSame('Nasty site', $site['fullname']);
         $this->assertSame('file:///etc/passwd', $site['url']);
index d2164cf..84a9488 100644 (file)
@@ -36,7 +36,7 @@ class tool_langimport_events_testcase extends advanced_testcase {
     /**
      * Setup testcase.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->setAdminUser();
         $this->resetAfterTest();
     }
@@ -56,12 +56,10 @@ class tool_langimport_events_testcase extends advanced_testcase {
         $this->assertEquals(context_system::instance(), $event->get_context());
     }
 
-    /**
-     * @expectedException        coding_exception
-     * @expectedExceptionMessage The 'langcode' value must be set to a valid language code
-     */
     public function test_langpack_updated_validation() {
 
+        $this->expectException('coding_exception');
+        $this->expectExceptionMessage("The 'langcode' value must be set to a valid language code");
         \tool_langimport\event\langpack_updated::event_with_langcode('broken langcode');
     }
 
@@ -78,12 +76,10 @@ class tool_langimport_events_testcase extends advanced_testcase {
         $this->assertEquals(context_system::instance(), $event->get_context());
     }
 
-    /**
-     * @expectedException        coding_exception
-     * @expectedExceptionMessage The 'langcode' value must be set to a valid language code
-     */
     public function test_langpack_installed_validation() {
 
+        $this->expectException('coding_exception');
+        $this->expectExceptionMessage("The 'langcode' value must be set to a valid language code");
         \tool_langimport\event\langpack_imported::event_with_langcode('broken langcode');
     }
 
@@ -100,12 +96,10 @@ class tool_langimport_events_testcase extends advanced_testcase {
         $this->assertEquals(context_system::instance(), $event->get_context());
     }
 
-    /**
-     * @expectedException        coding_exception
-     * @expectedExceptionMessage The 'langcode' value must be set to a valid language code
-     */
     public function test_langpack_removed_validation() {
 
+        $this->expectException('coding_exception');
+        $this->expectExceptionMessage("The 'langcode' value must be set to a valid language code");
         \tool_langimport\event\langpack_removed::event_with_langcode('broken langcode');
     }
 }
index 085ce1b..86b8b37 100644 (file)
@@ -50,7 +50,7 @@ require_once(__DIR__ . '/fixtures/event.php');
  */
 class logstore_database_privacy_testcase extends provider_testcase {
 
-    public function setUp() {
+    public function setUp(): void {
         global $CFG;
         $this->resetAfterTest();
         $this->preventResetByRollback(); // Logging waits till the transaction gets committed.
index d6d2a6c..ad0e992 100644 (file)
@@ -48,7 +48,7 @@ require_once(__DIR__ . '/fixtures/event.php');
  */
 class logstore_legacy_privacy_testcase extends provider_testcase {
 
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest();
     }
 
index 1e23599..d324d79 100644 (file)
@@ -47,7 +47,7 @@ require_once(__DIR__ . '/fixtures/event.php');
  */
 class logstore_standard_privacy_testcase extends provider_testcase {
 
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest();
         $this->preventResetByRollback(); // Logging waits till the transaction gets committed.
     }
index 1492718..aeb15c6 100644 (file)
@@ -540,7 +540,7 @@ class logstore_standard_store_testcase extends advanced_testcase {
     /**
      * Reset any garbage collector changes to the previous state at the end of the test.
      */
-    public function tearDown() {
+    public function tearDown(): void {
         if ($this->wedisabledgc) {
             gc_enable();
         }
index e9e3164..1cd1a92 100644 (file)
@@ -33,7 +33,7 @@ class tool_log_manager_testcase extends advanced_testcase {
         $this->assertInstanceOf('core\log\manager', $manager);
 
         $stores = $manager->get_readers();
-        $this->assertInternalType('array', $stores);
+        $this->assertIsArray($stores);
         $this->assertCount(0, $stores);
 
         $this->assertFileExists("$CFG->dirroot/$CFG->admin/tool/log/store/standard/version.php");
@@ -44,27 +44,27 @@ class tool_log_manager_testcase extends advanced_testcase {
         $this->assertInstanceOf('core\log\manager', $manager);
 
         $stores = $manager->get_readers();
-        $this->assertInternalType('array', $stores);
+        $this->assertIsArray($stores);
         $this->assertCount(2, $stores);
         foreach ($stores as $key => $store) {
-            $this->assertInternalType('string', $key);
+            $this->assertIsString($key);
             $this->assertInstanceOf('core\log\sql_reader', $store);
         }
 
         $stores = $manager->get_readers('core\log\sql_internal_table_reader');
-        $this->assertInternalType('array', $stores);
+        $this->assertIsArray($stores);
         $this->assertCount(1, $stores);
         foreach ($stores as $key => $store) {
-            $this->assertInternalType('string', $key);
+            $this->assertIsString($key);
             $this->assertSame('logstore_standard', $key);
             $this->assertInstanceOf('core\log\sql_internal_table_reader', $store);
         }
 
         $stores = $manager->get_readers('core\log\sql_reader');
-        $this->assertInternalType('array', $stores);
+        $this->assertIsArray($stores);
         $this->assertCount(2, $stores);
         foreach ($stores as $key => $store) {
-            $this->assertInternalType('string', $key);
+            $this->assertIsString($key);
             $this->assertInstanceOf('core\log\sql_reader', $store);
         }
     }
index ae85b86..f697387 100644 (file)
@@ -51,7 +51,7 @@ require_once($CFG->dirroot . '/admin/tool/log/store/standard/tests/fixtures/even
  */
 class tool_log_privacy_testcase extends provider_testcase {
 
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest();
         $this->preventResetByRollback(); // Logging waits till the transaction gets committed.
     }
index 8511c84..338bdeb 100644 (file)
@@ -75,7 +75,7 @@ class tool_lp_external_testcase extends externallib_advanced_testcase {
     /**
      * Setup function- we will create a course and add an assign instance to it.
      */
-    protected function setUp() {
+    protected function setUp(): void {
         global $DB, $CFG;
 
         $this->resetAfterTest(true);
index c8db5c1..b133672 100644 (file)
@@ -46,7 +46,7 @@ class tool_lpmigrate_framework_processor_testcase extends advanced_testcase {
      * Then we create 2 courses, and in each 1 CM.
      * Then we attach some competencies from the first framework to courses and CM.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest(true);
         $dg = $this->getDataGenerator();
         $lpg = $dg->get_plugin_generator('core_competency');
index b88a742..0ba834c 100644 (file)
@@ -44,7 +44,7 @@ use tool_messageinbound\privacy\provider;
  */
 class tool_messageinbound_manager_testcase extends provider_testcase {
 
-    public function setUp() {
+    public function setUp(): void {
         global $CFG;
         $this->resetAfterTest();
 
index e98c027..65d6869 100644 (file)
@@ -46,7 +46,7 @@ use tool_messageinbound\privacy\provider;
  */
 class tool_messageinbound_privacy_testcase extends provider_testcase {
 
-    public function setUp() {
+    public function setUp(): void {
         global $CFG;
         $this->resetAfterTest();
 
index 9ea41b0..45f0d25 100644 (file)
@@ -603,8 +603,21 @@ class api {
                 $timenow = time();
                 $expectedissuer = null;
                 foreach ($info['certinfo'] as $cert) {
+
+                    // Due to a bug in certain curl/openssl versions the signature algorithm isn't always correctly parsed.
+                    // See https://github.com/curl/curl/issues/3706 for reference.
+                    if (!array_key_exists('Signature Algorithm', $cert)) {
+                        // The malformed field that does contain the algorithm we're looking for looks like the following:
+                        // <WHITESPACE>Signature Algorithm: <ALGORITHM><CRLF><ALGORITHM>.
+                        preg_match('/\s+Signature Algorithm: (?<algorithm>[^\s]+)/', $cert['Public Key Algorithm'], $matches);
+
+                        $signaturealgorithm = $matches['algorithm'] ?? '';
+                    } else {
+                        $signaturealgorithm = $cert['Signature Algorithm'];
+                    }
+
                     // Check if the signature algorithm is weak (Android won't work with SHA-1).
-                    if ($cert['Signature Algorithm'] == 'sha1WithRSAEncryption' || $cert['Signature Algorithm'] == 'sha1WithRSA') {
+                    if ($signaturealgorithm == 'sha1WithRSAEncryption' || $signaturealgorithm == 'sha1WithRSA') {
                         $warnings[] = ['insecurealgorithmwarning', 'tool_mobile'];
                     }
                     // Check certificate start date.
index f3e6d7d..6eedc75 100644 (file)
@@ -64,7 +64,7 @@ $string['downloadcourses'] = 'Download courses';
 $string['enablesmartappbanners'] = 'Enable App Banners';
 $string['enablesmartappbanners_desc'] = 'If enabled, a banner promoting the mobile app will be displayed when accessing the site using a mobile browser.';
 $string['filetypeexclusionlist'] = 'File type exclusion list';
-$string['filetypeexclusionlist_desc'] = 'List of file types that we don\'t want users to try and open in the app. These files will still be listed on the app\'s course screen, but attempting to open them on iOS or Android would display a warning to the user indicating that this file type is not intended for use on a mobile device. They can then either cancel the open, or ignore the warning and open anyway.';
+$string['filetypeexclusionlist_desc'] = 'Select all file types which are not for use on a mobile device. Such files will be listed in the course, then if a user attempts to open them, a warning will be displayed advising that the file type is not intended for use on a mobile device. The user can then cancel or ignore the warning and open the file anyway.';
 $string['filetypeexclusionlistplaceholder'] = 'Mobile file type exclusion list';
 $string['forcedurlscheme'] = 'If you want to allow only your custom branded app to be opened via a browser window, then specify its URL scheme here. If you want to allow only the official app, then set the default value. Leave the field empty if you want to allow any app.';
 $string['forcedurlscheme_key'] = 'URL scheme';
index 18721a2..e9fc4f4 100644 (file)
@@ -132,7 +132,7 @@ class tool_mobile_api_testcase extends externallib_advanced_testcase {
         $email = reset($emails);
 
         // Check we got the promotion text.
-        $this->assertContains($mobileappdownloadpage, quoted_printable_decode($email->body));
+        $this->assertStringContainsString($mobileappdownloadpage, quoted_printable_decode($email->body));
         $sink->clear();
 
         // Disable mobile so we don't get mobile promotions.
@@ -142,7 +142,7 @@ class tool_mobile_api_testcase extends externallib_advanced_testcase {
         $this->assertCount(1, $emails);
         $email = reset($emails);
         // Check we don't get the promotion text.
-        $this->assertNotContains($mobileappdownloadpage, quoted_printable_decode($email->body));
+        $this->assertStringNotContainsString($mobileappdownloadpage, quoted_printable_decode($email->body));
         $sink->clear();
 
         // Enable mobile again and set current user mobile token so we don't get mobile promotions.
@@ -158,7 +158,7 @@ class tool_mobile_api_testcase extends externallib_advanced_testcase {
         $this->assertCount(1, $emails);
         $email = reset($emails);
         // Check we don't get the promotion text.
-        $this->assertNotContains($mobileappdownloadpage, quoted_printable_decode($email->body));
+        $this->assertStringNotContainsString($mobileappdownloadpage, quoted_printable_decode($email->body));
         $sink->clear();
         $sink->close();
     }
index 0909aaf..00d75a6 100644 (file)
@@ -158,11 +158,11 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
 
         $this->assertEquals('Google', $identityproviders[0]['name']);
         $this->assertEquals($irecord->image, $identityproviders[0]['iconurl']);
-        $this->assertContains($CFG->wwwroot, $identityproviders[0]['url']);
+        $this->assertStringContainsString($CFG->wwwroot, $identityproviders[0]['url']);
 
         $this->assertEquals('CAS', $identityproviders[1]['name']);
         $this->assertEmpty($identityproviders[1]['iconurl']);
-        $this->assertContains($CFG->wwwroot, $identityproviders[1]['url']);
+        $this->assertStringContainsString($CFG->wwwroot, $identityproviders[1]['url']);
 
         $this->assertEquals($expected, $result);
 
@@ -171,7 +171,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
         set_config('auth_logo', $newurl, 'auth_cas');
         $result = external::get_public_config();
         $result = external_api::clean_returnvalue(external::get_public_config_returns(), $result);
-        $this->assertContains($newurl, $result['identityproviders'][1]['iconurl']);
+        $this->assertStringContainsString($newurl, $result['identityproviders'][1]['iconurl']);
     }
 
     /**
index 6e1da9c..c1469f4 100644 (file)
@@ -40,7 +40,7 @@ class tool_mobile_privacy_testcase extends \core_privacy\tests\provider_testcase
     /**
      * Basic setup for these tests.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest(true);
     }
 
index f74c10b..d6b50a4 100644 (file)
@@ -38,7 +38,7 @@ class tool_monitor_eventobservers_testcase extends advanced_testcase {
     /**
      * Set up method.
      */
-    public function setUp() {
+    public function setUp(): void {
         // Enable monitor.
         set_config('enablemonitor', 1, 'tool_monitor');
     }
@@ -500,18 +500,18 @@ class tool_monitor_eventobservers_testcase extends advanced_testcase {
 
         $this->assertRegExp('~<h2>.*' . preg_quote($event->get_url()->out(), '~') . '.*</h2>~', $msg->fullmessagehtml);
         $this->assertRegExp('~<li>.*' . preg_quote($modurl->out(), '~') . '.*</li>~', $msg->fullmessagehtml);
-        $this->assertContains('<li><strong>'.$rule->get_name($context).'</strong></li>', $msg->fullmessagehtml);
-        $this->assertContains('<li>'.$rule->get_description($context).'</li>', $msg->fullmessagehtml);
-        $this->assertContains('<li>'.$rule->get_event_name().'</li>', $msg->fullmessagehtml);
+        $this->assertStringContainsString('<li><strong>'.$rule->get_name($context).'</strong></li>', $msg->fullmessagehtml);
+        $this->assertStringContainsString('<li>'.$rule->get_description($context).'</li>', $msg->fullmessagehtml);
+        $this->assertStringContainsString('<li>'.$rule->get_event_name().'</li>', $msg->fullmessagehtml);
 
         $this->assertEquals(FORMAT_PLAIN, $msg->fullmessageformat);
-        $this->assertNotContains('<h2>', $msg->fullmessage);
-        $this->assertNotContains('##', $msg->fullmessage);
-        $this->assertContains(strtoupper($event->get_url()->out()), $msg->fullmessage);
-        $this->assertContains('* '.$modurl->out(), $msg->fullmessage);
-        $this->assertContains('* '.strtoupper($rule->get_name($context)), $msg->fullmessage);
-        $this->assertContains('* '.$rule->get_description($context), $msg->fullmessage);
-        $this->assertContains('* '.$rule->get_event_name(), $msg->fullmessage);
+        $this->assertStringNotContainsString('<h2>', $msg->fullmessage);
+        $this->assertStringNotContainsString('##', $msg->fullmessage);
+        $this->assertStringContainsString(strtoupper($event->get_url()->out()), $msg->fullmessage);
+        $this->assertStringContainsString('* '.$modurl->out(), $msg->fullmessage);
+        $this->assertStringContainsString('* '.strtoupper($rule->get_name($context)), $msg->fullmessage);
+        $this->assertStringContainsString('* '.$rule->get_description($context), $msg->fullmessage);
+        $this->assertStringContainsString('* '.$rule->get_event_name(), $msg->fullmessage);
     }
 
     /**
index 4ed829d..109bc7f 100644 (file)
@@ -33,7 +33,7 @@ class tool_monitor_events_testcase extends advanced_testcase {
     /**
      * Tests set up.
      */
-    public function setUp() {
+    public function setUp(): void {
         set_config('enablemonitor', 1, 'tool_monitor');
         $this->resetAfterTest();
     }
index 7c4ae86..c2672a8 100644 (file)
@@ -39,7 +39,7 @@ class tool_monitor_generator_testcase extends advanced_testcase {
     /**
      * Set up method.
      */
-    public function setUp() {
+    public function setUp(): void {
         // Enable monitor.
         set_config('enablemonitor', 1, 'tool_monitor');
     }
@@ -138,4 +138,4 @@ class tool_monitor_generator_testcase extends advanced_testcase {
         $this->assertEquals(1, $historydata->userid);
         $this->assertEquals(1, $historydata->sid);
     }
-}
\ No newline at end of file
+}
index 3d419c7..871b11d 100644 (file)
@@ -43,7 +43,7 @@ class tool_monitor_privacy_testcase extends provider_testcase {
     /**
      * Set up method.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest();
         // Enable monitor.
         set_config('enablemonitor', 1, 'tool_monitor');
index a5173fa..fd334e6 100644 (file)
@@ -37,7 +37,7 @@ class tool_monitor_rule_manager_testcase extends advanced_testcase {
     /**
      * Set up method.
      */
-    public function setUp() {
+    public function setUp(): void {
         // Enable monitor.
         set_config('enablemonitor', 1, 'tool_monitor');
     }
@@ -192,4 +192,4 @@ class tool_monitor_rule_manager_testcase extends advanced_testcase {
         $this->assertEmpty(array_diff(array_keys($ruledata), $ruleids));
         $this->assertCount(10, $ruledata);
     }
-}
\ No newline at end of file
+}
index b3511b5..364b1c4 100644 (file)
@@ -34,7 +34,7 @@ class tool_monitor_subscription_testcase extends advanced_testcase {
     /**
      * Test set up.
      */
-    public function setUp() {
+    public function setUp(): void {
         $this->resetAfterTest(true);
 
         // Create the mock subscription.
@@ -59,11 +59,10 @@ class tool_monitor_subscription_testcase extends advanced_testcase {
 
     /**
      * Test for the magic __get method.
-     *
-     * @expectedException coding_exception
      */
     public function test_magic_get() {
         $this->assertEquals(20, $this->subscription->courseid);
+        $this->expectException(coding_exception::class);
         $this->subscription->ruleid;
     }
 }
index b526784..10a5e98 100644 (file)
@@ -36,7 +36,7 @@ class tool_monitor_task_check_subscriptions_testcase extends advanced_testcase {
     /**
      * Test set up.
      */
-    public function setUp() {
+    public function setUp(): void {
         global $DB;
         set_config('enablemonitor', 1, 'tool_monitor');
         $this->resetAfterTest(true);