Merge branch 'wip-MDL-37946-master' of https://github.com/marinaglancy/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 4 Jul 2016 22:19:59 +0000 (00:19 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 4 Jul 2016 22:19:59 +0000 (00:19 +0200)
882 files changed:
.eslintignore [new file with mode: 0644]
.eslintrc [new file with mode: 0644]
.travis.yml
Gruntfile.js
admin/cli/automated_backups.php
admin/cli/backup.php
admin/cli/cron.php
admin/cli/install.php
admin/cli/install_database.php
admin/cli/mysql_collation.php
admin/cli/mysql_compressed_rows.php
admin/cli/mysql_engine.php
admin/cli/purge_caches.php
admin/cli/reset_password.php
admin/cli/upgrade.php
admin/environment.xml
admin/filters.php
admin/localplugins.php
admin/mailout-debugger.php
admin/message.php
admin/mnet/access_control.php
admin/mnet/delete.php
admin/mnet/index.php
admin/mnet/peers.php
admin/mnet/profilefields.php
admin/mnet/services.php
admin/mnet/testclient.php
admin/mnet/trustedhosts.php
admin/oauth2callback.php
admin/plagiarism.php
admin/plugins.php
admin/portfolio.php
admin/process_email.php
admin/qbehaviours.php
admin/qtypes.php
admin/reports.php
admin/repository.php
admin/repositoryinstance.php
admin/resetemoticons.php
admin/roles/ajax.php
admin/roles/allow.php
admin/roles/check.php
admin/roles/classes/preset.php
admin/roles/define.php
admin/roles/manage.php
admin/settings/courses.php
admin/settings/plugins.php
admin/tool/assignmentupgrade/batchupgrade.php
admin/tool/assignmentupgrade/index.php
admin/tool/assignmentupgrade/listnotupgraded.php
admin/tool/assignmentupgrade/upgradesingle.php
admin/tool/assignmentupgrade/upgradesingleconfirm.php
admin/tool/behat/cli/run.php
admin/tool/capability/index.php
admin/tool/cohortroles/index.php
admin/tool/customlang/db/upgrade.php
admin/tool/customlang/edit.php
admin/tool/customlang/index.php
admin/tool/generator/cli/maketestcourse.php
admin/tool/generator/cli/maketestplan.php
admin/tool/generator/index.php
admin/tool/health/styles.css
admin/tool/installaddon/index.php
admin/tool/installaddon/permcheck.php
admin/tool/log/db/upgrade.php
admin/tool/log/store/database/db/upgrade.php
admin/tool/log/store/standard/db/upgrade.php
admin/tool/lp/amd/build/competencies.min.js
admin/tool/lp/amd/build/tree.min.js
admin/tool/lp/amd/build/user_competency_course_navigation.min.js
admin/tool/lp/amd/src/actionselector.js
admin/tool/lp/amd/src/competencies.js
admin/tool/lp/amd/src/competency_outcomes.js
admin/tool/lp/amd/src/competency_plan_navigation.js
admin/tool/lp/amd/src/competency_rule.js
admin/tool/lp/amd/src/competency_rule_points.js
admin/tool/lp/amd/src/competencyactions.js
admin/tool/lp/amd/src/competencydialogue.js
admin/tool/lp/amd/src/competencypicker.js
admin/tool/lp/amd/src/competencypicker_user_plans.js
admin/tool/lp/amd/src/competencyruleconfig.js
admin/tool/lp/amd/src/course_competency_settings.js
admin/tool/lp/amd/src/dialogue.js
admin/tool/lp/amd/src/dragdrop-reorder.js
admin/tool/lp/amd/src/event_base.js
admin/tool/lp/amd/src/evidence_delete.js
admin/tool/lp/amd/src/frameworkactions.js
admin/tool/lp/amd/src/frameworks_datasource.js
admin/tool/lp/amd/src/grade_dialogue.js
admin/tool/lp/amd/src/grade_user_competency_inline.js
admin/tool/lp/amd/src/menubar.js
admin/tool/lp/amd/src/parentcompetency_form.js
admin/tool/lp/amd/src/planactions.js
admin/tool/lp/amd/src/scaleconfig.js
admin/tool/lp/amd/src/scalevalues.js
admin/tool/lp/amd/src/templateactions.js
admin/tool/lp/amd/src/tree.js
admin/tool/lp/amd/src/user_competency_course_navigation.js
admin/tool/lp/amd/src/user_competency_info.js
admin/tool/lp/amd/src/user_competency_plan_popup.js
admin/tool/lp/amd/src/user_competency_workflow.js
admin/tool/lp/amd/src/user_evidence_actions.js
admin/tool/lp/classes/external/course_module_summary_exporter.php
admin/tool/lp/coursecompetencies.php
admin/tool/lp/lib.php
admin/tool/lp/pix/competency.png [deleted file]
admin/tool/lp/pix/competency.svg [deleted file]
admin/tool/lp/styles.css
admin/tool/lp/templates/user_competency_summary.mustache
admin/tool/lp/templates/user_competency_summary_in_course.mustache
admin/tool/lp/upgrade.txt [new file with mode: 0644]
admin/tool/messageinbound/index.php
admin/tool/mobile/tests/externallib_test.php
admin/tool/monitor/db/upgrade.php
admin/tool/multilangupgrade/index.php
admin/tool/phpunit/index.php
admin/tool/phpunit/webrunner.php
admin/tool/profiling/export.php
admin/tool/profiling/import.php
admin/tool/profiling/index.php
admin/tool/recyclebin/index.php
admin/tool/task/scheduledtasks.php
admin/tool/templatelibrary/amd/build/display.min.js
admin/tool/templatelibrary/amd/src/display.js
admin/tool/templatelibrary/amd/src/search.js
admin/tool/unsuproles/index.php
admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php
admin/tool/xmldb/actions/generate_documentation/generate_documentation.class.php
admin/tools.php
admin/user/user_bulk.php
admin/user/user_bulk_enrol.php [deleted file]
admin/user/user_bulk_forms.php
auth/cas/cli/sync_users.php
auth/cas/db/upgrade.php
auth/ldap/cli/sync_users.php
auth/ldap/db/upgrade.php
auth/ldap/ntlmsso_attempt.php
auth/ldap/ntlmsso_finish.php
auth/ldap/ntlmsso_magic.php
auth/manual/db/upgrade.php
auth/mnet/db/upgrade.php
auth/mnet/jump.php
auth/mnet/land.php
auth/upgrade.txt
backup/backup.class.php
backup/backupfilesedit.php
backup/cc/cc_lib/gral_lib/ccdependencyparser.php
backup/cc/cc_lib/gral_lib/functions.php
backup/converter/moodle1/lib.php
backup/moodle2/backup_stepslib.php
backup/moodle2/restore_qtype_plugin.class.php
backup/moodle2/restore_stepslib.php
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/1.expectation [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/1.test [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/2.expectation [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/2.test [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/3.expectation [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/3.test [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/4.expectation [new file with mode: 0644]
backup/moodle2/tests/fixtures/rewrite_step_backup_file_for_legacy_freeze/4.test [new file with mode: 0644]
backup/moodle2/tests/restore_gradebook_structure_step_test.php [new file with mode: 0644]
backup/restorefile.php
badges/action.php
badges/ajax.php
badges/assertion.php
badges/award.php
badges/backpackconnect.php
badges/badge.php
badges/criteria.php
badges/criteria_action.php
badges/criteria_settings.php
badges/edit.php
badges/external.php
badges/index.php
badges/mybackpack.php
badges/mybadges.php
badges/newbadge.php
badges/overview.php
badges/preferences.php
badges/recipients.php
badges/view.php
blocks/badges/db/upgrade.php
blocks/blog_recent/tests/behat/block_blog_recent.feature [new file with mode: 0644]
blocks/blog_recent/tests/behat/block_blog_recent_activity.feature [new file with mode: 0644]
blocks/blog_recent/tests/behat/block_blog_recent_course.feature [new file with mode: 0644]
blocks/blog_recent/tests/behat/block_blog_recent_frontpage.feature [new file with mode: 0644]
blocks/calendar_month/db/upgrade.php
blocks/calendar_upcoming/db/upgrade.php
blocks/comments/tests/behat/block_comment_dashboard.feature [new file with mode: 0644]
blocks/community/db/upgrade.php
blocks/community/styles.css
blocks/completionstatus/block_completionstatus.php
blocks/completionstatus/db/upgrade.php
blocks/completionstatus/details.php
blocks/course_overview/move.php
blocks/course_overview/save.php
blocks/course_overview/tests/behat/quiz_overview.feature [new file with mode: 0644]
blocks/course_summary/db/upgrade.php
blocks/glossary_random/backup/moodle2/restore_glossary_random_block_task.class.php
blocks/glossary_random/block_glossary_random.php
blocks/glossary_random/tests/behat/glossary_random_global.feature [new file with mode: 0644]
blocks/html/db/upgrade.php
blocks/lp/competencies_to_review.php
blocks/lp/plans_to_review.php
blocks/messages/tests/behat/block_messages_course.feature [new file with mode: 0644]
blocks/messages/tests/behat/block_messages_dashboard.feature [new file with mode: 0644]
blocks/messages/tests/behat/block_messages_frontpage.feature [new file with mode: 0644]
blocks/myprofile/edit_form.php
blocks/myprofile/lang/en/block_myprofile.php
blocks/myprofile/lang/en/deprecated.txt [new file with mode: 0644]
blocks/navigation/amd/build/navblock.min.js
blocks/navigation/amd/src/ajax_response_renderer.js
blocks/navigation/amd/src/nav_loader.js
blocks/navigation/amd/src/navblock.js
blocks/navigation/block_navigation.php
blocks/navigation/db/upgrade.php
blocks/navigation/styles.css
blocks/news_items/block_news_items.php
blocks/online_users/block_online_users.php
blocks/online_users/tests/behat/block_online_users_course.feature [new file with mode: 0644]
blocks/online_users/tests/behat/block_online_users_dashboard.feature [new file with mode: 0644]
blocks/online_users/tests/behat/block_online_users_frontpage.feature [new file with mode: 0644]
blocks/private_files/tests/behat/block_private_files_activity.feature [new file with mode: 0644]
blocks/private_files/tests/behat/block_private_files_course.feature [new file with mode: 0644]
blocks/private_files/tests/behat/block_private_files_dashboard.feature [new file with mode: 0644]
blocks/private_files/tests/behat/block_private_files_frontpage.feature [new file with mode: 0644]
blocks/private_files/tests/fixtures/testfile.txt [new file with mode: 0644]
blocks/quiz_results/db/upgrade.php
blocks/recent_activity/db/upgrade.php
blocks/rss_client/db/upgrade.php
blocks/rss_client/editfeed.php
blocks/rss_client/managefeeds.php
blocks/rss_client/tests/cron_test.php
blocks/rss_client/viewfeed.php
blocks/section_links/db/upgrade.php
blocks/selfcompletion/block_selfcompletion.php
blocks/selfcompletion/db/upgrade.php
blocks/settings/amd/build/settingsblock.min.js
blocks/settings/amd/src/settingsblock.js
blocks/settings/block_settings.php
blocks/settings/db/upgrade.php
blocks/settings/styles.css
blog/edit.php
blog/index.php
calendar/classes/export_form.php
calendar/export_execute.php
calendar/tests/behat/export.feature [new file with mode: 0644]
comment/comment_post.php
comment/lib.php
competency/classes/api.php
competency/classes/course_competency_settings.php
competency/classes/evidence.php
competency/tests/api_test.php
completion/criteria/completion_criteria_activity.php
composer.json
composer.lock
config-dist.php
course/category.ajax.php
course/changenumsections.php
course/completion_form.php
course/delete.php
course/dndupload.php
course/externallib.php
course/format/README.txt
course/format/lib.php
course/format/topics/tests/behat/edit_delete_sections.feature
course/format/upgrade.txt
course/lib.php
course/modduplicate.php
course/pending.php
course/renderer.php
course/request.php
course/rest.php
course/tests/behat/behat_course.php
course/tests/behat/restrict_available_activities.feature
course/tests/externallib_test.php
course/upgrade.txt [new file with mode: 0644]
course/view.php
course/yui/build/moodle-course-modchooser/moodle-course-modchooser-debug.js
course/yui/build/moodle-course-modchooser/moodle-course-modchooser-min.js
course/yui/build/moodle-course-modchooser/moodle-course-modchooser.js
course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes-debug.js
course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes-min.js
course/yui/build/moodle-course-toolboxes/moodle-course-toolboxes.js
course/yui/src/modchooser/js/modchooser.js
course/yui/src/toolboxes/js/resource.js
enrol/database/db/upgrade.php
enrol/flatfile/db/upgrade.php
enrol/guest/db/upgrade.php
enrol/imsenterprise/db/upgrade.php
enrol/imsenterprise/importnow.php
enrol/lti/classes/helper.php
enrol/lti/index.php
enrol/lti/tool.php
enrol/manual/ajax.php
enrol/manual/db/upgrade.php
enrol/manual/lib.php
enrol/manual/manage.php
enrol/manual/yui/quickenrolment/quickenrolment.js
enrol/meta/cli/sync.php
enrol/mnet/db/upgrade.php
enrol/mnet/enrol.php
enrol/paypal/db/upgrade.php
enrol/self/db/upgrade.php
enrol/tests/behat/behat_enrol.php
files/coursefilesedit.php
filter/manage.php
filter/mediaplugin/db/upgrade.php
filter/mediaplugin/dev/perftest.php
filter/mediaplugin/styles.css
filter/tex/db/upgrade.php
grade/edit/outcome/import.php
grade/edit/outcome/index.php
grade/grading/form/guide/amd/src/comment_chooser.js
grade/grading/form/guide/db/upgrade.php
grade/grading/form/guide/edit.php
grade/grading/form/guide/edit_form.php
grade/grading/form/guide/lang/en/gradingform_guide.php
grade/grading/form/guide/preview.php
grade/grading/form/guide/tests/behat/behat_gradingform_guide.php
grade/grading/form/guide/tests/behat/edit_guide.feature
grade/grading/form/rubric/db/upgrade.php
grade/grading/form/rubric/edit.php
grade/grading/form/rubric/edit_form.php
grade/grading/form/rubric/preview.php
grade/grading/manage.php
grade/grading/pick.php
grade/import/keymanager.php
grade/lib.php
grade/report/grader/styles.css
grade/report/grader/tests/behat/ajax_grader.feature
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-min.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js
grade/report/grader/yui/src/gradereporttable/js/floatingheaders.js
grade/report/singleview/styles.css
grade/report/user/db/upgrade.php
group/clientlib.js
group/members.php
help.php
install.php
install/css.php
install/lang/ca/admin.php
install/lang/ca/install.php
install/lang/da_rum/langconfig.php [new file with mode: 0644]
install/lang/dz/admin.php
install/lang/dz/moodle.php
install/lang/he/admin.php
install/lang/he/install.php
install/lang/he/moodle.php
install/lang/oc_lnc/error.php
install/lang/pt/install.php
install/lang/pt/moodle.php
install/lang/ro/install.php
install/lang/ru/admin.php
install/lang/ru/moodle.php
install/lang/sv/moodle.php
install/lang/zh_tw/install.php
lang/en/admin.php
lang/en/auth.php
lang/en/backup.php
lang/en/badges.php
lang/en/calendar.php
lang/en/deprecated.txt
lang/en/error.php
lang/en/install.php
lang/en/moodle.php
lang/en/question.php
lang/en/search.php
lib/accesslib.php
lib/adminlib.php
lib/ajax/blocks.php
lib/ajax/getnavbranch.php
lib/ajax/getsiteadminbranch.php
lib/ajax/service.php
lib/ajax/setuserpref.php
lib/amd/build/form-autocomplete.min.js
lib/amd/build/permissionmanager.min.js
lib/amd/build/templates.min.js
lib/amd/src/ajax.js
lib/amd/src/event.js
lib/amd/src/first.js
lib/amd/src/form-autocomplete.js
lib/amd/src/fragment.js
lib/amd/src/localstorage.js
lib/amd/src/log.js
lib/amd/src/notification.js
lib/amd/src/permissionmanager.js
lib/amd/src/str.js
lib/amd/src/tag.js
lib/amd/src/templates.js
lib/amd/src/tree.js
lib/amd/src/url.js
lib/amd/src/yui.js
lib/antivirus/clamav/db/upgrade.php
lib/authlib.php
lib/badgeslib.php
lib/behat/behat_base.php
lib/behat/form_field/behat_form_select.php
lib/blocklib.php
lib/classes/session/memcached.php
lib/classes/update/code_manager.php
lib/classes/user.php
lib/db/upgrade.php
lib/dml/pgsql_native_moodle_database.php
lib/dml/pgsql_native_moodle_recordset.php
lib/dml/tests/dml_test.php
lib/editor/atto/autosave-ajax.php
lib/editor/atto/db/upgrade.php
lib/editor/atto/plugins/equation/ajax.php
lib/editor/atto/plugins/equation/db/upgrade.php
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
lib/editor/atto/yui/src/editor/build.json
lib/editor/atto/yui/src/editor/js/autosave-io.js [new file with mode: 0644]
lib/editor/atto/yui/src/editor/js/autosave.js
lib/editor/atto/yui/src/editor/meta/editor.json
lib/editor/tinymce/db/upgrade.php
lib/editor/tinymce/plugins/moodleemoticon/dialog.php
lib/editor/tinymce/plugins/moodlemedia/preview.php
lib/editor/tinymce/plugins/spellchecker/db/upgrade.php
lib/editor/tinymce/plugins/spellchecker/includes/general.php
lib/filestorage/file_storage.php
lib/form/form.js
lib/form/tags.php
lib/installlib.php
lib/medialib.php
lib/messagelib.php
lib/moodlelib.php
lib/myprofilelib.php
lib/navigationlib.php
lib/outputrenderers.php
lib/pdflib.php
lib/phpmailer/moodle_phpmailer.php
lib/questionlib.php
lib/sessionkeepalive_ajax.php
lib/setup.php
lib/setuplib.php
lib/tests/behat/behat_general.php
lib/tests/behat/behat_hooks.php
lib/tests/fixtures/update_validator/zips/multidir.zip [new file with mode: 0644]
lib/tests/moodlelib_test.php
lib/tests/other/jquerypage.php
lib/tests/other/pdflibtestpage.php
lib/tests/other/todochecker.php
lib/tests/performance/filtersettingsperformancetester.php
lib/tests/questionlib_test.php
lib/tests/string_manager_standard_test.php
lib/tests/text_test.php
lib/tests/update_code_manager_test.php
lib/tests/weblib_format_text_test.php
lib/upgrade.txt
lib/upgradelib.php
lib/weblib.php
lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js
lib/yui/build/moodle-core-dock/moodle-core-dock-min.js
lib/yui/build/moodle-core-dock/moodle-core-dock.js
lib/yui/build/moodle-core-event/moodle-core-event-debug.js
lib/yui/build/moodle-core-event/moodle-core-event-min.js
lib/yui/build/moodle-core-event/moodle-core-event.js
lib/yui/src/dock/js/dock.js
lib/yui/src/dock/meta/dock.json
lib/yui/src/event/js/event.js
login/tests/behat/behat_login.php [new file with mode: 0644]
login/tests/behat/change_password.feature [new file with mode: 0644]
login/token.php
message/defaultoutputs.php
message/discussion.php
message/edit.php
message/externallib.php
message/lib.php
message/output/airnotifier/rest.php
message/output/email/db/upgrade.php
message/output/jabber/db/upgrade.php
message/output/popup/db/upgrade.php
message/output/popup/message_output_popup.php
mnet/publickey.php
mnet/service/enrol/course.php
mnet/service/enrol/host.php
mnet/service/enrol/index.php
mnet/xmlrpc/server.php
mod/assign/adminmanageplugins.php
mod/assign/amd/src/grading_actions.js
mod/assign/amd/src/grading_navigation.js
mod/assign/amd/src/grading_navigation_user_info.js
mod/assign/amd/src/grading_panel.js
mod/assign/db/services.php
mod/assign/db/upgrade.php
mod/assign/externallib.php
mod/assign/feedback/comments/db/upgrade.php
mod/assign/feedback/editpdf/db/upgrade.php
mod/assign/feedback/editpdf/styles.css
mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature
mod/assign/feedback/editpdf/tests/behat/group_annotations.feature
mod/assign/feedback/editpdf/testunoconv.php
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js
mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js
mod/assign/feedback/editpdf/yui/src/editor/js/comment.js
mod/assign/feedback/editpdf/yui/src/editor/js/editor.js
mod/assign/feedback/file/db/upgrade.php
mod/assign/lang/en/assign.php
mod/assign/lib.php
mod/assign/locallib.php
mod/assign/mod_form.php
mod/assign/submission/comments/db/upgrade.php
mod/assign/submission/file/db/upgrade.php
mod/assign/submission/file/locallib.php
mod/assign/submission/file/tests/locallib_test.php [new file with mode: 0644]
mod/assign/submission/onlinetext/db/upgrade.php
mod/assign/submission/onlinetext/locallib.php
mod/assign/submission/onlinetext/tests/locallib_test.php [new file with mode: 0644]
mod/assign/submission_form.php
mod/assign/submissionplugin.php
mod/assign/templates/grading_navigation.mustache
mod/assign/tests/base_test.php
mod/assign/tests/behat/quickgrading.feature
mod/assign/tests/externallib_test.php
mod/assign/tests/locallib_test.php
mod/assign/upgrade.txt
mod/assign/version.php
mod/assignment/db/upgrade.php
mod/book/db/upgrade.php
mod/book/delete.php
mod/book/edit.php
mod/book/index.php
mod/book/lib.php
mod/book/locallib.php
mod/book/mod_form.php
mod/book/move.php
mod/book/settings.php
mod/book/show.php
mod/book/tool/exportimscp/index.php
mod/book/tool/exportimscp/locallib.php
mod/book/tool/importhtml/index.php
mod/book/tool/importhtml/locallib.php
mod/book/tool/print/index.php
mod/book/tool/print/locallib.php
mod/book/tool/print/print.css
mod/book/view.php
mod/chat/chat_ajax.php
mod/chat/chatd.php
mod/chat/db/upgrade.php
mod/chat/gui_ajax/index.php
mod/chat/gui_header_js/jsupdate.php
mod/chat/gui_header_js/jsupdated.php
mod/chat/lib.php
mod/chat/view.php
mod/choice/backup/moodle2/backup_choice_stepslib.php
mod/choice/db/upgrade.php
mod/choice/lang/en/choice.php
mod/choice/lib.php
mod/choice/mod_form.php
mod/choice/styles.css
mod/choice/tests/behat/allow_preview.feature
mod/choice/tests/behat/publish_results.feature
mod/data/classes/search/activity.php [moved from course/category.php with 62% similarity]
mod/data/data.js
mod/data/db/upgrade.php
mod/data/lang/en/data.php
mod/data/mod_form.php
mod/data/preset/imagegallery/csstemplate.css
mod/data/view.php
mod/feedback/ajax.php
mod/feedback/classes/observer.php [new file with mode: 0644]
mod/feedback/db/events.php [new file with mode: 0644]
mod/feedback/db/upgrade.php
mod/feedback/lang/en/feedback.php
mod/feedback/lib.php
mod/feedback/mod_form.php
mod/feedback/tests/behat/behat_mod_feedback.php
mod/feedback/tests/events_test.php
mod/feedback/version.php
mod/folder/db/upgrade.php
mod/forum/db/upgrade.php
mod/forum/index.php
mod/forum/lang/en/forum.php
mod/forum/lib.php
mod/forum/maildigest.php
mod/forum/styles.css
mod/forum/subscribe.php
mod/forum/subscribe_ajax.php
mod/forum/tests/behat/discussion_navigation.feature
mod/forum/user.php
mod/glossary/db/upgrade.php
mod/imscp/db/upgrade.php
mod/label/db/upgrade.php
mod/lesson/db/upgrade.php
mod/lesson/lib.php
mod/lesson/mod_form.php
mod/lesson/overridedelete.php
mod/lesson/overrideedit.php
mod/lesson/overrides.php
mod/lesson/view.php
mod/lti/ajax.php
mod/lti/amd/build/cartridge_registration_form.min.js
mod/lti/amd/build/external_registration.min.js
mod/lti/amd/build/tool_configure_controller.min.js
mod/lti/amd/src/cartridge_registration_form.js
mod/lti/amd/src/external_registration.js
mod/lti/amd/src/external_registration_return.js
mod/lti/amd/src/tool_card_controller.js
mod/lti/amd/src/tool_configure_controller.js
mod/lti/amd/src/tool_proxy.js
mod/lti/amd/src/tool_proxy_card_controller.js
mod/lti/amd/src/tool_type.js
mod/lti/classes/external.php
mod/lti/db/upgrade.php
mod/lti/lang/en/lti.php
mod/lti/lib.php
mod/lti/locallib.php
mod/lti/service.php
mod/lti/services.php
mod/lti/tests/behat/addtool.feature
mod/lti/tests/behat/toolconfigure.feature
mod/lti/tests/externallib_test.php
mod/lti/typessettings.php
mod/lti/view.php
mod/page/db/upgrade.php
mod/quiz/amd/src/preflightcheck.js
mod/quiz/attempt.php
mod/quiz/autosave.ajax.php
mod/quiz/db/upgrade.php
mod/quiz/grade.php
mod/quiz/lib.php
mod/quiz/overridedelete.php
mod/quiz/overrideedit.php
mod/quiz/overrides.php
mod/quiz/processattempt.php
mod/quiz/report.php
mod/quiz/report/overview/db/upgrade.php
mod/quiz/report/overview/overviewgraph.php
mod/quiz/report/overview/report.php
mod/quiz/report/statistics/db/upgrade.php
mod/quiz/report/statistics/statistics_graph.php
mod/quiz/review.php
mod/quiz/reviewquestion.php
mod/quiz/startattempt.php
mod/quiz/styles.css
mod/quiz/summary.php
mod/quiz/tests/behat/attempt_begin.feature
mod/quiz/tests/behat/editing_add.feature
mod/quiz/tests/lib_test.php
mod/quiz/view.php
mod/resource/db/upgrade.php
mod/scorm/datamodels/scormlib.php
mod/scorm/db/upgrade.php
mod/scorm/lang/en/scorm.php
mod/scorm/mod_form.php
mod/scorm/report/graphs/graph.php
mod/scorm/styles.css
mod/survey/backup/moodle2/backup_survey_stepslib.php
mod/survey/db/install.xml
mod/survey/db/upgrade.php
mod/survey/lang/en/survey.php
mod/survey/lib.php
mod/survey/mod_form.php
mod/survey/save.php
mod/survey/tests/behat/survey_completion.feature [new file with mode: 0644]
mod/survey/version.php
mod/upgrade.txt
mod/url/db/upgrade.php
mod/wiki/create.php
mod/wiki/create_form.php
mod/wiki/db/upgrade.php
mod/wiki/filesedit.php
mod/wiki/pagelib.php
mod/workshop/aggregate.php
mod/workshop/allocation.php
mod/workshop/allocation/manual/lib.php
mod/workshop/allocation/random/lib.php
mod/workshop/allocation/random/settings.php
mod/workshop/allocation/scheduled/lib.php
mod/workshop/allocation/scheduled/settings_form.php
mod/workshop/assessment.php
mod/workshop/backup/moodle1/lib.php
mod/workshop/db/upgrade.php
mod/workshop/editform.php
mod/workshop/editformpreview.php
mod/workshop/eval/best/lib.php
mod/workshop/exassessment.php
mod/workshop/excompare.php
mod/workshop/exsubmission.php
mod/workshop/form/accumulative/assessment_form.php
mod/workshop/form/accumulative/db/upgrade.php
mod/workshop/form/accumulative/edit_form.php
mod/workshop/form/accumulative/lib.php
mod/workshop/form/comments/assessment_form.php
mod/workshop/form/comments/db/upgrade.php
mod/workshop/form/comments/edit_form.php
mod/workshop/form/comments/lib.php
mod/workshop/form/numerrors/assessment_form.php
mod/workshop/form/numerrors/db/upgrade.php
mod/workshop/form/numerrors/edit_form.php
mod/workshop/form/numerrors/lib.php
mod/workshop/form/rubric/assessment_form.php
mod/workshop/form/rubric/db/upgrade.php
mod/workshop/form/rubric/edit_form.php
mod/workshop/form/rubric/lib.php
mod/workshop/index.php
mod/workshop/lib.php
mod/workshop/locallib.php
mod/workshop/mod_form.php
mod/workshop/submission.php
mod/workshop/switchphase.php
mod/workshop/toolbox.php
mod/workshop/view.php
my/index.php
my/indexsys.php
my/lib.php
npm-shrinkwrap.json
package.json
pix/i/competencies.png [new file with mode: 0644]
pix/i/competencies.svg [new file with mode: 0644]
portfolio/add.php
portfolio/boxnet/db/upgrade.php
portfolio/download/file.php
portfolio/download/lib.php
portfolio/file.php
portfolio/googledocs/db/upgrade.php
portfolio/mahara/preconfig.php
portfolio/picasa/db/upgrade.php
question/addquestion.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/behaviour.php
question/behaviour/adaptivenopenalty/behaviourtype.php
question/behaviour/adaptivenopenalty/renderer.php
question/behaviour/adaptivenopenalty/tests/walkthrough_test.php
question/behaviour/deferredcbm/behaviour.php
question/behaviour/deferredcbm/behaviourtype.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/behaviour.php
question/behaviour/immediatecbm/behaviourtype.php
question/behaviour/immediatecbm/renderer.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/informationitem/tests/walkthrough_test.php
question/behaviour/interactive/tests/behaviourtype_test.php
question/behaviour/interactive/tests/walkthrough_test.php
question/behaviour/interactivecountback/behaviour.php
question/behaviour/interactivecountback/behaviourtype.php
question/behaviour/interactivecountback/renderer.php
question/behaviour/interactivecountback/tests/behaviourtype_test.php
question/behaviour/interactivecountback/tests/walkthrough_test.php
question/behaviour/manualgraded/db/upgrade.php
question/behaviour/manualgraded/tests/behaviourtype_test.php
question/behaviour/manualgraded/tests/walkthrough_test.php
question/behaviour/missing/tests/behaviourtype_test.php
question/behaviour/missing/tests/missingbehaviour_test.php
question/category.php
question/edit.php
question/engine/bank.php
question/engine/lib.php
question/engine/tests/datalib_reporting_queries_test.php
question/engine/tests/datalib_test.php
question/engine/tests/qubaid_condition_test.php
question/engine/tests/questionattempt_db_test.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_db_test.php
question/engine/tests/questionattemptstep_test.php
question/engine/tests/questionattemptstepiterator_test.php
question/engine/tests/questionbank_test.php
question/engine/tests/questionengine_test.php
question/engine/tests/questionstate_test.php
question/engine/tests/questionusage_autosave_test.php
question/engine/tests/questionusagebyactivity_data_test.php
question/engine/tests/questionusagebyactivity_test.php
question/engine/tests/questionutils_test.php
question/engine/tests/unitofwork_test.php
question/engine/upgrade/tests/helper.php
question/export.php
question/format.php
question/format/gift/format.php
question/format/gift/tests/giftformat_test.php
question/import.php
question/preview.php
question/question.php
question/type/calculated/db/upgrade.php
question/type/calculated/styles.css
question/type/calculatedsimple/styles.css
question/type/ddmarker/db/upgrade.php
question/type/essay/db/upgrade.php
question/type/match/db/upgrade.php
question/type/missingtype/tests/missingtype_test.php
question/type/multianswer/backup/moodle2/restore_qtype_multianswer_plugin.class.php
question/type/multianswer/db/upgrade.php
question/type/multichoice/db/upgrade.php
question/type/multichoice/lang/en/qtype_multichoice.php
question/type/multichoice/renderer.php
question/type/numerical/db/upgrade.php
question/type/numerical/styles.css
question/type/random/db/upgrade.php
question/type/randomsamatch/db/upgrade.php
question/type/shortanswer/db/upgrade.php
question/type/shortanswer/styles.css
report/competency/amd/build/user_course_navigation.min.js
report/competency/amd/src/grading_popup.js
report/competency/amd/src/user_course_navigation.js
report/completion/index.php
report/configlog/index.php
report/eventlist/tests/behat/mainsection.feature
report/log/locallib.php
report/outline/locallib.php
report/questioninstances/index.php
report/stats/locallib.php
report/upgrade.txt
repository/alfresco/db/upgrade.php
repository/boxnet/db/upgrade.php
repository/dropbox/db/upgrade.php
repository/dropbox/lib.php
repository/dropbox/thumbnail.php
repository/equella/callback.php
repository/filepicker.php
repository/filesystem/lib.php
repository/flickr_public/lib.php
repository/googledocs/db/upgrade.php
repository/lib.php
repository/manage_instances.php
repository/picasa/db/upgrade.php
repository/repository_ajax.php
repository/repository_callback.php
repository/upgrade.txt
repository/url/lib.php
repository/wikimedia/lib.php
search/classes/document.php
search/classes/manager.php
search/classes/output/form/search.php
search/tests/fixtures/mock_search_area.php
search/tests/fixtures/testable_core_search.php
search/tests/manager_test.php
tag/classes/output/tagareacollection.php
tag/classes/tag.php
theme/base/style/core.css
theme/bootstrapbase/less/moodle/modules.less
theme/bootstrapbase/less/moodle/search.less
theme/bootstrapbase/style/moodle.css
theme/index.php
theme/more/db/upgrade.php
user/classes/course_form.php [new file with mode: 0644]
user/classes/search/user.php [new file with mode: 0644]
user/course.php [new file with mode: 0644]
user/edit.php
user/editadvanced.php
user/editadvanced_form.php
user/editlib.php
user/externallib.php
user/portfolio.php
user/portfoliologs.php
user/profile.php
user/profile/definelib.php
user/profile/field/datetime/field.class.php
user/profilesys.php
user/repository.php
user/selector/search.php
user/tests/behat/course_preference.feature [new file with mode: 0644]
user/tests/externallib_test.php
user/tests/search_test.php [new file with mode: 0644]
version.php
webservice/lib.php
webservice/pluginfile.php
webservice/rest/locallib.php
webservice/rest/tests/server_test.php [new file with mode: 0644]
webservice/soap/locallib.php
webservice/tests/externallib_test.php
webservice/upgrade.txt
webservice/upload.php
webservice/xmlrpc/locallib.php
webservice/xmlrpc/tests/locallib_test.php [new file with mode: 0644]
webservice/xmlrpc/tests/xmlrpc_server_test.php [new file with mode: 0644]

diff --git a/.eslintignore b/.eslintignore
new file mode 100644 (file)
index 0000000..4c89fdb
--- /dev/null
@@ -0,0 +1,57 @@
+# Generated by "grunt ignorefiles"
+*/**/yui/src/*/meta/
+*/**/build/
+node_modules/
+vendor/
+auth/cas/CAS/
+auth/fc/fcFPP.php
+enrol/lti/ims-blti/
+filter/algebra/AlgParser.pm
+filter/tex/mimetex.*
+lib/editor/atto/yui/src/rangy/js/*.*
+lib/editor/tinymce/plugins/pdw/tinymce/
+lib/editor/tinymce/plugins/spellchecker/rpc.php
+lib/editor/tinymce/tiny_mce/
+lib/adodb/
+lib/alfresco/
+lib/bennu/
+lib/evalmath/
+lib/lessphp/
+lib/phpexcel/
+lib/pear/Net/
+lib/google/
+lib/htmlpurifier/
+lib/jabber/
+lib/minify/
+lib/flowplayer/
+lib/password_compat/
+lib/pear/Auth/RADIUS.php
+lib/pear/Crypt/CHAP.php
+lib/pear/HTML/Common.php
+lib/pear/HTML/QuickForm.php
+lib/pear/HTML/QuickForm/
+lib/pear/PEAR.php
+lib/phpmailer/
+lib/simplepie/
+lib/tcpdf/
+lib/typo3/
+lib/yuilib/
+lib/yuilib/gallery/
+lib/jquery/
+lib/html2text/
+lib/markdown/
+lib/recaptchalib.php
+lib/xhprof/
+lib/xmlize.php
+lib/horde/
+lib/requirejs/
+lib/amd/src/loglevel.js
+lib/mustache/
+lib/amd/src/mustache.js
+lib/graphlib.php
+lib/spout/
+mod/assign/feedback/editpdf/fpdi/
+repository/s3/S3.php
+theme/bootstrapbase/less/bootstrap/
+theme/bootstrapbase/javascript/html5shiv.js
+theme/bootstrapbase/amd/src/bootstrap.js
\ No newline at end of file
diff --git a/.eslintrc b/.eslintrc
new file mode 100644 (file)
index 0000000..03dc85a
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,164 @@
+{
+  'env': {
+    'browser': true,
+    'amd': true
+  },
+  'globals': {
+    'M': true,
+    'Y': true
+  },
+  'rules': {
+    // See http://eslint.org/docs/rules/ for all rules and explanations of all
+    // rules. Commented out rules with 'DEFINE POLICY' are rules Dan P has flagged
+    // for discussion and possible enable soon.
+    // === Possible Errors ===
+    // DEFINE POLICY: 'comma-dangle': ['off', 'always'],
+    'no-cond-assign': 'error',
+    'no-console': 'error',
+    'no-constant-condition': 'error',
+    'no-control-regex': 'error',
+    'no-debugger': 'error',
+    'no-dupe-args': 'error',
+    'no-dupe-keys': 'error',
+    'no-duplicate-case': 'error',
+    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-empty': 'error',
+    'no-empty-character-class': 'error',
+    'no-ex-assign': 'error',
+    'no-extra-boolean-cast': 'error',
+    'no-extra-parens': 'off',
+    'no-extra-semi': 'error',
+    'no-func-assign': 'error',
+    'no-inner-declarations': 'error',
+    'no-invalid-regexp': 'error',
+    'no-irregular-whitespace': 'error',
+    'no-negated-in-lhs': 'error',
+    'no-obj-calls': 'error',
+    'no-prototype-builtins': 'off',
+    'no-regex-spaces': 'error',
+    'no-sparse-arrays': 'error',
+    'no-unexpected-multiline': 'error',
+    'no-unreachable': 'warn',
+    'no-unsafe-finally': 'error',
+    'use-isnan': 'error',
+    'valid-jsdoc': ['warn', { 'requireReturn': false, 'requireParamDescription': false, 'requireReturnDescription': false }],
+    'valid-typeof': 'error',
+
+    // === Best Practices ===
+    // (these mostly match our jshint config)
+    'curly': 'error',
+    'dot-notation': 'warn',
+    'no-alert': 'warn',
+    'no-caller': 'error',
+    'no-case-declarations': 'error',
+    'no-empty-pattern': 'error',
+    'no-empty-function': 'warn',
+    //DEFINE POLICY: 'no-eq-null': 'warn',
+    'no-eval': 'error',
+    //DEFINE POLICY: 'no-extra-bind': 'warn',
+    'no-fallthrough': 'error',
+    //DEFINE POLICY: 'no-implicit-globals': 'warn',
+    'no-implied-eval': 'error',
+    'no-invalid-this': 'error',
+    'no-iterator': 'error',
+    'no-labels': 'error',
+    'no-loop-func': 'error',
+    'no-multi-spaces': 'warn',
+    'no-multi-str': 'error',
+    'no-native-reassign': 'warn',
+    'no-new-func': 'error',
+    'no-new-wrappers': 'error',
+    // DEFINE POLICY: no-octal: "error"
+    // DEFINE POLICY: no-octal-escape: "error"
+    'no-proto': 'error',
+    'no-redeclare': 'warn',
+    'no-return-assign': 'error',
+    'no-script-url': 'error',
+    'no-self-assign': 'error',
+    'no-self-compare': 'error',
+    'no-unmodified-loop-condition': 'error',
+    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-expressions': 'error',
+    'no-unused-labels': 'error',
+    //DEFINE POLICY: 'no-useless-call': 'error',
+    'no-useless-escape': 'warn',
+    //DEFINE POLICY: 'no-with': 'error',
+    'wrap-iife': ['error', 'any'],
+
+    // === Variables ===
+    'no-delete-var': 'error',
+    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-undef': 'off',
+    //DEFINE POLICY: 'no-undef-init': 'error',
+    // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-vars': 'error',
+
+    // === Stylistic Issues ===
+    'array-bracket-spacing': 'warn',
+    'block-spacing': 'warn',
+    'brace-style': ['warn', '1tbs'],
+    'camelcase': 'warn',
+    'comma-spacing': ['warn', { 'before': false, 'after': true }],
+    'comma-style': ['warn', 'last'],
+    'computed-property-spacing': 'error',
+    'consistent-this': 'off',
+    'eol-last': 'off',
+    'func-names': 'off',
+    'func-style': 'off',
+    // indent currently not doing well with our wrapping style, so disabled.
+    'indent': ['off', 4, { 'SwitchCase': 1 }],
+    'key-spacing': ['warn', { 'beforeColon': false, 'afterColon': true, 'mode': minimum }],
+    'keyword-spacing': 'warn',
+    'linebreak-style': ['error', 'unix'],
+    'lines-around-comment': 'off',
+    'max-len': ['error', 132],
+    'max-lines': 'off',
+    // DEFINE POLICY: turn on some of these max values?
+    'max-depth': 'off',
+    'max-nested-callbacks': 'off',
+    'max-params': 'off',
+    'max-statements': 'off',
+    'max-statements-per-line': 'off',
+    'new-cap': ['warn', { 'properties': false }],
+    'new-parens': 'warn',
+    'newline-after-var': 'off',
+    'newline-before-return': 'off',
+    // REVIST POLICY: 'newline-per-chained-call': 'warn',
+    'no-array-constructor': 'off',
+    'no-bitwise': 'error',
+    'no-continue': 'off',
+    'no-inline-comments': 'off',
+    'no-lonely-if': 'off',
+    'no-mixed-operators': 'off',
+    'no-mixed-spaces-and-tabs': 'error',
+    'no-multiple-empty-lines': 'warn',
+    'no-negated-condition': 'off',
+    'no-nested-ternary': 'warn',
+    'no-new-object': 'off',
+    'no-plusplus': 'off',
+    'no-spaced-func': 'warn',
+    'no-ternary': 'off',
+    'no-trailing-spaces': 'error',
+    'no-underscore-dangle': 'off',
+    // DEFINE POLICY: 'no-unneeded-ternary': 'off',
+    'no-whitespace-before-property': 'warn',
+    // DEFINE POLICY: 'object-curly-newline': 'off,
+    // DEFINE POLICY: 'object-curly-spacing': 'off',
+    // DEFINE POLICY: 'object-property-newline': 'off',
+    'one-var': 'off',
+    // DEFINE POLICY: 'one-var-declaration-per-line': 'off',
+    'operator-assignment': 'off',
+    'operator-linebreak': 'off',
+    'padded-blocks': 'off',
+    // DEFINE POLICY: 'quote-props': 'off',
+    'quotes': 'off',
+    'require-jsdoc': 'warn',
+    'semi': 'error',
+    'semi-spacing': ['warn', {'before': false, 'after': true}],
+    'sort-vars': 'off',
+    'space-before-blocks': 'warn',
+    'space-before-function-paren': ['warn', 'never'],
+    'space-in-parens': 'warn',
+    'space-infix-ops': 'warn',
+    'space-unary-ops': 'warn',
+    'spaced-comment': 'warn',
+    'unicode-bom': 'error',
+    'wrap-regex': 'off',
+  }
+}
index 47f3462..65cd7d1 100644 (file)
@@ -14,9 +14,7 @@ language: php
 php:
     # We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
     - 7.0
-    # - 5.6
-    # - 5.5
-    - 5.4
+    - 5.6
 
 env:
     # Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
@@ -27,16 +25,19 @@ env:
     # Postgres is significantly is pretty reasonable in its run-time.
 
     # Run unit tests on MySQL
-    - DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
+    - DB=mysqli   TASK=PHPUNIT
 
     # Run CI Tests without running PHPUnit.
-    - DB=none     PHPUNIT=false   INSTALL=false   CITEST=true
+    - DB=none     TASK=CITEST
 
     # Run unit tests on Postgres
-    - DB=pgsql    PHPUNIT=true    INSTALL=false   CITEST=false
+    - DB=pgsql    TASK=PHPUNIT
 
     # Perform an upgrade test too.
-    - DB=pgsql    PHPUNIT=false   INSTALL=true   CITEST=false   UPGRADE=true
+    - DB=pgsql    TASK=UPGRADE
+
+    # Run a check for unbuilt files with Grunt.
+    - DB=none     TASK=GRUNT
 
 matrix:
     # Enable fast finish.
@@ -47,22 +48,26 @@ matrix:
     exclude:
         # MySQL - it's just too slow.
         # Exclude it on all versions except for 7.0
-        # - env: DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
+        # - env: DB=mysqli   TASK=PHPUNIT
         #   php: 5.6
         #
-        # - env: DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
+        # - env: DB=mysqli   TASK=PHPUNIT
         #   php: 5.5
 
-        - env: DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
+        - env: DB=mysqli   TASK=PHPUNIT
+          php: 5.4
+
+        - env: DB=none     TASK=GRUNT
           php: 5.4
 
         # Moodle 2.7 is not compatible with PHP 7 for the upgrade test.
-        - env: DB=pgsql    PHPUNIT=false   INSTALL=true   CITEST=false   UPGRADE=true
+        - env: DB=pgsql    TASK=UPGRADE
           php: 7.0
 
 cache:
     directories:
       - $HOME/.composer/cache
+      - $HOME/.npm
 
 install:
     # Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
@@ -70,6 +75,7 @@ install:
 
     # Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
     - if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
+    - echo 'auth.json' >> .git/info/exclude
 
     # Install composer dependencies.
     # We need --no-interaction in case we hit API limits for composer. This causes it to fall back to a standard clone.
@@ -78,7 +84,7 @@ install:
 
 before_script:
     - >
-      if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
+      if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
       then
         # Copy generic configuration in place.
         cp config-dist.php config.php ;
@@ -120,38 +126,37 @@ before_script:
           mysql -u root -e 'SET GLOBAL innodb_file_per_table=ON;' ;
           mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;' ;
         fi
+      fi
 
-        if [ "$PHPUNIT" = 'true' ];
-        then
-          # Create a directory for the phpunit dataroot.
-          mkdir -p "$HOME"/roots/phpunit
+    - >
+      if [ "$TASK" = 'PHPUNIT' ];
+      then
+        # Create a directory for the phpunit dataroot.
+        mkdir -p "$HOME"/roots/phpunit
 
-          # The phpunit dataroot and prefix..
-          sed -i \
-            -e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-            -e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
-            config.php ;
+        # The phpunit dataroot and prefix..
+        sed -i \
+          -e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
+          -e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
+          config.php ;
 
-          # Initialise PHPUnit for Moodle.
-          php admin/tool/phpunit/cli/init.php
-        fi
+        # Initialise PHPUnit for Moodle.
+        php admin/tool/phpunit/cli/init.php
       fi
 
-script:
-    ########################################################################
-    # PHPUnit
-    ########################################################################
     - >
-      if [ "$PHPUNIT" = 'true' ];
+      if [ "$TASK" = 'GRUNT' ];
       then
-        vendor/bin/phpunit;
+        npm install ;
+        npm install -g grunt ;
+        grunt ;
       fi
 
     ########################################################################
     # CI Tests
     ########################################################################
     - >
-      if [ "$CITEST" = 'true' ];
+      if [ "$TASK" = 'CITEST' ];
       then
         # Note - this is deliberately placed in the script section as we
         # should not add any code until after phpunit has run.
@@ -174,18 +179,11 @@ script:
         export phpcmd=`which php`;
       fi
 
-    # Actually run the CI Tests - do this outside of the main test to make output clearer.
-    - >
-      if [ "$CITEST" = 'true' ];
-      then
-        bash local/ci/php_lint/php_lint.sh;
-      fi
-
     ########################################################################
     # Upgrade test
     ########################################################################
     - >
-      if [ "$UPGRADE" = 'true' ];
+      if [ "$TASK" = 'UPGRADE' ];
       then
         # We need the official upstream.
         git remote add upstream https://github.com/moodle/moodle.git;
@@ -205,7 +203,36 @@ script:
 
         # The local_ci repository can be used to check upgrade savepoints.
         git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
+      fi
 
+script:
+    - >
+      if [ "$TASK" = 'PHPUNIT' ];
+      then
+        vendor/bin/phpunit;
+      fi
+
+    - >
+      if [ "$TASK" = 'CITEST' ];
+      then
+        bash local/ci/php_lint/php_lint.sh;
+      fi
+
+    - >
+      if [ "$TASK" = 'GRUNT' ];
+      then
+        # Add all files to the git index and then run diff --cached to see all changes.
+        # This ensures that we get the status of all files, including new files.
+        git add . ;
+        git diff --cached --exit-code ;
+      fi
+
+    ########################################################################
+    # Upgrade test
+    ########################################################################
+    - >
+      if [ "$TASK" = 'UPGRADE' ];
+      then
         cp local/ci/check_upgrade_savepoints/check_upgrade_savepoints.php ./check_upgrade_savepoints.php
         result=`php check_upgrade_savepoints.php`;
         # Check if there are problems
index 7412970..d832153 100644 (file)
@@ -13,6 +13,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 /* jshint node: true, browser: false */
+/* eslint-env node */
 
 /**
  * @copyright  2014 Andrew Nicols
 module.exports = function(grunt) {
     var path = require('path'),
         tasks = {},
-        cwd = process.env.PWD || process.cwd();
+        cwd = process.env.PWD || process.cwd(),
+        async = require('async'),
+        DOMParser = require('xmldom').DOMParser,
+        xpath = require('xpath');
 
     // Windows users can't run grunt in a subdirectory, so allow them to set
     // the root by passing --root=path/to/dir.
@@ -34,9 +38,9 @@ module.exports = function(grunt) {
         var root = grunt.option('root');
         if (grunt.file.exists(__dirname, root)) {
             cwd = path.join(__dirname, root);
-            grunt.log.ok('Setting root to '+cwd);
+            grunt.log.ok('Setting root to ' + cwd);
         } else {
-            grunt.fail.fatal('Setting root to '+root+' failed - path does not exist');
+            grunt.fail.fatal('Setting root to ' + root + ' failed - path does not exist');
         }
     }
 
@@ -55,25 +59,75 @@ module.exports = function(grunt) {
      * @param {String} srcPath the  matched src path
      * @return {String} The rewritten destination path.
      */
-    var uglify_rename = function (destPath, srcPath) {
+    var uglifyRename = function(destPath, srcPath) {
         destPath = srcPath.replace('src', 'build');
         destPath = destPath.replace('.js', '.min.js');
         destPath = path.resolve(cwd, destPath);
         return destPath;
     };
 
+    /**
+     * Find thirdpartylibs.xml and generate an array of paths contained within
+     * them (used to generate ignore files and so on).
+     *
+     * @return {array} The list of thirdparty paths.
+     */
+    var getThirdPartyPathsFromXML = function() {
+        var thirdpartyfiles = grunt.file.expand('*/**/thirdpartylibs.xml');
+        var libs = ['node_modules/', 'vendor/'];
+
+        thirdpartyfiles.forEach(function(file) {
+          var dirname = path.dirname(file);
+
+          var doc = new DOMParser().parseFromString(grunt.file.read(file));
+          var nodes = xpath.select("/libraries/library/location/text()", doc);
+
+          nodes.forEach(function(node) {
+            var lib = path.join(dirname, node.toString());
+            if (grunt.file.isDir(lib)) {
+                // Ensure trailing slash on dirs.
+                lib = lib.replace(/\/?$/, '/');
+            }
+
+            // Look for duplicate paths before adding to array.
+            if (libs.indexOf(lib) === -1) {
+                libs.push(lib);
+            }
+          });
+        });
+        return libs;
+    };
+
+
     // Project configuration.
     grunt.initConfig({
         jshint: {
             options: {jshintrc: '.jshintrc'},
             amd: { src: amdSrc }
         },
+        eslint: {
+            // Even though warnings dont stop the build we don't display warnings by default because
+            // at this moment we've got too many core warnings.
+            options: { quiet: !grunt.option('show-lint-warnings') },
+            // Check AMD files. We add some stricter rules which we can't apply to the default configuration due
+            // to YUI rollups.
+            amd: {
+              src: amdSrc,
+              options: {
+                  rules: {'no-undef': 'error', 'no-unused-vars': 'error', 'no-empty': 'error', 'no-unused-expressions': 'error'}
+              }
+            },
+            // Check YUI module source files.
+            yui: {
+               src: ['**/yui/src/**/*.js', '!*/**/yui/src/*/meta/*.js'],
+            }
+        },
         uglify: {
             amd: {
                 files: [{
                     expand: true,
                     src: amdSrc,
-                    rename: uglify_rename
+                    rename: uglifyRename
                 }]
             }
         },
@@ -102,7 +156,7 @@ module.exports = function(grunt) {
             },
             yui: {
                 files: ['**/yui/src/**/*.js'],
-                tasks: ['shifter']
+                tasks: ['yui']
             },
         },
         shifter: {
@@ -113,6 +167,17 @@ module.exports = function(grunt) {
         }
     });
 
+    /**
+     * Generate ignore files (utilising thirdpartylibs.xml data)
+     */
+    tasks.ignorefiles = function() {
+      // An array of paths to third party directories.
+      var thirdPartyPaths = getThirdPartyPathsFromXML();
+      // Generate .eslintignore.
+      var eslintIgnores = ['# Generated by "grunt ignorefiles"', '*/**/yui/src/*/meta/', '*/**/build/'].concat(thirdPartyPaths);
+      grunt.file.write('.eslintignore', eslintIgnores.join('\n'));
+    };
+
     /**
      * Shifter task. Is configured with a path to a specific file or a directory,
      * in the case of a specific file it will work out the right module to be built.
@@ -121,14 +186,13 @@ module.exports = function(grunt) {
      * so be careful to to call done().
      */
     tasks.shifter = function() {
-        var async = require('async'),
-            done = this.async(),
+        var done = this.async(),
             options = grunt.config('shifter.options');
 
         // Run the shifter processes one at a time to avoid confusing output.
-        async.eachSeries(options.paths, function (src, filedone) {
+        async.eachSeries(options.paths, function(src, filedone) {
             var args = [];
-            args.push( path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
+            args.push(path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
 
             // Always ignore the node_modules directory.
             args.push('--excludes', 'node_modules');
@@ -176,7 +240,7 @@ module.exports = function(grunt) {
                     cmd: "node",
                     args: args,
                     opts: {cwd: src, stdio: 'inherit', env: process.env}
-                }, function (error, result, code) {
+                }, function(error, result, code) {
                     if (code) {
                         grunt.fail.fatal('Shifter failed with code: ' + code);
                     } else {
@@ -205,7 +269,7 @@ module.exports = function(grunt) {
     tasks.startup = function() {
         // Are we in a YUI directory?
         if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
-            grunt.task.run('shifter');
+            grunt.task.run('yui');
         // Are we in an AMD directory?
         } else if (inAMD) {
             grunt.task.run('amd');
@@ -222,8 +286,10 @@ module.exports = function(grunt) {
     var changedFiles = Object.create(null);
     var onChange = grunt.util._.debounce(function() {
           var files = Object.keys(changedFiles);
+          grunt.config('eslint.amd.src', files);
+          grunt.config('eslint.yui.src', files);
           grunt.config('jshint.amd.src', files);
-          grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglify_rename }]);
+          grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglifyRename }]);
           grunt.config('shifter.options.paths', files);
           changedFiles = Object.create(null);
     }, 200);
@@ -238,11 +304,14 @@ module.exports = function(grunt) {
     grunt.loadNpmTasks('grunt-contrib-jshint');
     grunt.loadNpmTasks('grunt-contrib-less');
     grunt.loadNpmTasks('grunt-contrib-watch');
+    grunt.loadNpmTasks('grunt-eslint');
 
     // Register JS tasks.
     grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
-    grunt.registerTask('amd', ['jshint', 'uglify']);
-    grunt.registerTask('js', ['amd', 'shifter']);
+    grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles);
+    grunt.registerTask('yui', ['eslint:yui', 'shifter']);
+    grunt.registerTask('amd', ['eslint:amd', 'jshint', 'uglify']);
+    grunt.registerTask('js', ['amd', 'yui']);
 
     // Register CSS taks.
     grunt.registerTask('css', ['less:bootstrapbase']);
index 3c3841e..0b03282 100644 (file)
@@ -28,7 +28,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');      // cli only functions
 require_once($CFG->libdir.'/cronlib.php');
 
index 2770c03..b8be318 100644 (file)
@@ -25,7 +25,7 @@
 
 define('CLI_SCRIPT', 1);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');
 require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
 
index 527aa72..3ece44a 100644 (file)
@@ -30,7 +30,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');      // cli only functions
 require_once($CFG->libdir.'/cronlib.php');
 
index 523f9e8..9f3c0df 100644 (file)
@@ -90,7 +90,7 @@ Example:
 
 
 // distro specific customisation
-$distrolibfile = dirname(dirname(dirname(__FILE__))).'/install/distrolib.php';
+$distrolibfile = __DIR__.'/../../install/distrolib.php';
 $distro = null;
 if (file_exists($distrolibfile)) {
     require_once($distrolibfile);
@@ -100,7 +100,7 @@ if (file_exists($distrolibfile)) {
 }
 
 // Nothing to do if config.php exists
-$configfile = dirname(dirname(dirname(__FILE__))).'/config.php';
+$configfile = __DIR__.'/../../config.php';
 if (file_exists($configfile)) {
     require($configfile);
     require_once($CFG->libdir.'/clilib.php');
@@ -159,7 +159,7 @@ if (version_compare(phpversion(), "5.4.4") < 0) {
 global $CFG;
 $CFG = new stdClass();
 $CFG->lang                 = 'en';
-$CFG->dirroot              = dirname(dirname(dirname(__FILE__)));
+$CFG->dirroot              = dirname(dirname(__DIR__));
 $CFG->libdir               = "$CFG->dirroot/lib";
 $CFG->wwwroot              = "http://localhost";
 $CFG->httpswwwroot         = $CFG->wwwroot;
@@ -172,7 +172,7 @@ $CFG->debug                = (E_ALL | E_STRICT);
 $CFG->debugdisplay         = true;
 $CFG->debugdeveloper       = true;
 
-$parts = explode('/', str_replace('\\', '/', dirname(dirname(__FILE__))));
+$parts = explode('/', str_replace('\\', '/', dirname(__DIR__)));
 $CFG->admin                = array_pop($parts);
 
 //point pear include path to moodles lib/pear so that includes and requires will search there for files before anywhere else
@@ -244,7 +244,7 @@ list($options, $unrecognized) = cli_get_params(
         'chmod'             => isset($distro->directorypermissions) ? sprintf('%04o',$distro->directorypermissions) : '2777', // let distros set dir permissions
         'lang'              => $CFG->lang,
         'wwwroot'           => '',
-        'dataroot'          => empty($distro->dataroot) ? str_replace('\\', '/', dirname(dirname(dirname(dirname(__FILE__)))).'/moodledata'): $distro->dataroot, // initialised later after including libs or by distro
+        'dataroot'          => empty($distro->dataroot) ? str_replace('\\', '/', dirname(dirname(dirname(__DIR__))).'/moodledata'): $distro->dataroot, // initialised later after including libs or by distro
         'dbtype'            => empty($distro->dbtype) ? $defaultdb : $distro->dbtype, // let distro skip dbtype selection
         'dbhost'            => empty($distro->dbhost) ? 'localhost' : $distro->dbhost, // let distros set dbhost
         'dbname'            => 'moodle',
index cb768c3..b66805e 100644 (file)
@@ -72,7 +72,7 @@ if (version_compare(phpversion(), "5.4.4") < 0) {
 }
 
 // Nothing to do if config.php does not exist
-$configfile = dirname(dirname(dirname(__FILE__))).'/config.php';
+$configfile = __DIR__.'/../../config.php';
 if (!file_exists($configfile)) {
     fwrite(STDERR, 'config.php does not exist, can not continue'); // do not localize
     fwrite(STDERR, "\n");
index 9938a3a..131b8f4 100644 (file)
@@ -24,7 +24,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');      // cli only functions
 
 if ($DB->get_dbfamily() !== 'mysql') {
index df69376..e90060c 100644 (file)
@@ -25,7 +25,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(__FILE__).'/../../config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir . '/clilib.php');
 
 if ($DB->get_dbfamily() !== 'mysql') {
index 6bc3642..d392b0b 100644 (file)
@@ -26,7 +26,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');      // cli only functions
 
 if ($DB->get_dbfamily() !== 'mysql') {
index f008da2..7c9d344 100644 (file)
@@ -23,7 +23,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');
 
 list($options, $unrecognized) = cli_get_params(array('help' => false), array('h' => 'help'));
index d7b4f74..27f4ca9 100644 (file)
@@ -26,7 +26,7 @@
 
 define('CLI_SCRIPT', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/clilib.php');      // cli only functions
 
 
index cefb990..6de2e13 100644 (file)
@@ -38,7 +38,7 @@ if (function_exists('opcache_reset') and !isset($_SERVER['REMOTE_ADDR'])) {
 define('CLI_SCRIPT', true);
 define('CACHE_DISABLE_ALL', true);
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');       // various admin-only functions
 require_once($CFG->libdir.'/upgradelib.php');     // general upgrade/install related functions
 require_once($CFG->libdir.'/clilib.php');         // cli only functions
index f281b45..7bef8fc 100644 (file)
       </CUSTOM_CHECK>
     </CUSTOM_CHECKS>
   </MOODLE>
+  <MOODLE version="3.2" requires="2.7">
+    <UNICODE level="required">
+      <FEEDBACK>
+        <ON_ERROR message="unicoderequired" />
+      </FEEDBACK>
+    </UNICODE>
+    <DATABASE level="required">
+      <VENDOR name="mariadb" version="5.5.31" />
+      <VENDOR name="mysql" version="5.5.31" />
+      <VENDOR name="postgres" version="9.1" />
+      <VENDOR name="mssql" version="10.0" />
+      <VENDOR name="oracle" version="10.2" />
+    </DATABASE>
+    <PHP version="5.6.5" level="required">
+    </PHP>
+    <PCREUNICODE level="optional">
+      <FEEDBACK>
+        <ON_CHECK message="pcreunicodewarning" />
+      </FEEDBACK>
+    </PCREUNICODE>
+    <PHP_EXTENSIONS>
+      <PHP_EXTENSION name="iconv" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="iconvrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="mbstring" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="mbstringrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="curl" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="curlrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="openssl" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="opensslrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="tokenizer" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="tokenizerrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="xmlrpc" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="xmlrpcrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="soap" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="soaprecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="ctype" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="ctyperequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="zip" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="ziprequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="zlib" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="gd" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="gdrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="simplexml" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="simplexmlrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="spl" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="splrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="pcre" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="dom" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="xml" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="xmlreader" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="intl" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="intlrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="json" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="hash" level="required"/>
+    </PHP_EXTENSIONS>
+    <PHP_SETTINGS>
+      <PHP_SETTING name="memory_limit" value="96M" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="settingmemorylimit" />
+        </FEEDBACK>
+      </PHP_SETTING>
+      <PHP_SETTING name="file_uploads" value="1" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="settingfileuploads" />
+        </FEEDBACK>
+      </PHP_SETTING>
+      <PHP_SETTING name="opcache.enable" value="1" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="opcacherecommended" />
+        </FEEDBACK>
+      </PHP_SETTING>
+    </PHP_SETTINGS>
+    <CUSTOM_CHECKS>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="unsupporteddbstorageengine" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="quizattemptsupgradedmessage" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="slashargumentswarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="unsupporteddbtablerowformat" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="unoconvwarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
+    </CUSTOM_CHECKS>
+  </MOODLE>
 </COMPATIBILITY_MATRIX>
index 6313d08..b112767 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 
 $action = optional_param('action', '', PARAM_ALPHA);
index fb5c4cf..eb6862d 100644 (file)
@@ -27,7 +27,7 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->libdir.'/tablelib.php');
 
index d183fa4..ae9fc85 100644 (file)
@@ -29,7 +29,7 @@
    */
 
 // Security check.
-if (!file_exists(dirname(__FILE__).'/mailout-debugger.enable')) {
+if (!file_exists(__DIR__.'/mailout-debugger.enable')) {
     mdie("Disabled.");
 }
 $tmpdir=sys_get_temp_dir(); // default
index 270a230..52cb560 100644 (file)
@@ -21,7 +21,7 @@
  * @copyright  2011 Lancaster University Network Services Limited
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-require_once(dirname(__FILE__) . '/../config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->dirroot . '/message/lib.php');
 require_once($CFG->libdir.'/adminlib.php');
 
index 375b3fa..6b1cebc 100644 (file)
@@ -2,7 +2,7 @@
 
 // Allows the admin to control user logins from remote moodles.
 
-require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
+require_once(__DIR__ . '/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 include_once($CFG->dirroot.'/mnet/lib.php');
 
index c078b27..03eac9b 100644 (file)
@@ -27,7 +27,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 
 $step   = optional_param('step', 'verify', PARAM_ALPHA);
index d6e544e..879caa8 100644 (file)
@@ -2,7 +2,7 @@
 
     // Allows the admin to configure mnet stuff
 
-    require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
+    require(__DIR__.'/../../config.php');
     require_once($CFG->libdir.'/adminlib.php');
     include_once($CFG->dirroot.'/mnet/lib.php');
 
index 24ef9b6..df1f6e2 100644 (file)
@@ -27,7 +27,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->dirroot.'/mnet/lib.php');
 require_once($CFG->dirroot.'/'.$CFG->admin.'/mnet/peer_forms.php');
index 5f5fd6b..24ba79c 100644 (file)
@@ -24,7 +24,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->dirroot . '/admin/mnet/profilefields_form.php');
 $mnet = get_mnet_environment();
index cdc4fe3..ea588cd 100644 (file)
@@ -25,7 +25,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
+require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->dirroot . '/admin/mnet/services_form.php');
 $mnet = get_mnet_environment();
index f43225c..2560e84 100644 (file)
@@ -12,7 +12,7 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
  * @package mnet
  */
-require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
+require(__DIR__.'/../../config.php');
 require_once $CFG->dirroot.'/mnet/xmlrpc/client.php';
 require_once($CFG->libdir.'/adminlib.php');
 include_once($CFG->dirroot.'/mnet/lib.php');
index 290c0ae..cbbbfa3 100644 (file)
@@ -1,7 +1,7 @@
 <?php
     // Allows the admin to configure services for remote hosts
 
-    require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
+    require(__DIR__.'/../../config.php');
     require_once($CFG->libdir.'/adminlib.php');
     include_once($CFG->dirroot.'/mnet/lib.php');
 
index c032a9c..08bb01d 100644 (file)
@@ -28,7 +28,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(__FILE__)).'/config.php');
+require_once(__DIR__ . '/../config.php');
 
 // The authorization code generated by the authorization server.
 $code = required_param('code', PARAM_RAW);
index d004869..d0a3f5f 100644 (file)
@@ -26,7 +26,7 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->libdir.'/tablelib.php');
 
index 39510cc..1176f3b 100644 (file)
@@ -24,7 +24,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->libdir . '/filelib.php');
 
index 48237bb..6a33fc0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir . '/portfoliolib.php');
 require_once($CFG->libdir . '/portfolio/forms.php');
 require_once($CFG->libdir . '/adminlib.php');
index 20ad4c1..6d7ed71 100644 (file)
@@ -3,7 +3,7 @@
 
 //error_reporting(0);
 //ini_set('display_errors',0);
-require_once(dirname(dirname(__FILE__)).'/config.php');
+require_once(__DIR__ . '/../config.php');
 $tmp = explode('@',$_ENV['RECIPIENT']);
 $address = $tmp[0];
 
index 7cd027e..057429c 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 
-require_once(dirname(__FILE__) . '/../config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir . '/questionlib.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->libdir . '/tablelib.php');
index 80c6c6d..b13baf0 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 
-require_once(dirname(__FILE__) . '/../config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir . '/questionlib.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->libdir . '/tablelib.php');
index e4db149..c3d648c 100644 (file)
@@ -27,7 +27,7 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->libdir.'/tablelib.php');
 
index e01490e..bf10f51 100644 (file)
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->dirroot . '/repository/lib.php');
 require_once($CFG->libdir . '/adminlib.php');
 
index 0373857..960d0ff 100644 (file)
@@ -14,7 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once(__DIR__ . '/../config.php');
 require_once($CFG->dirroot . '/repository/lib.php');
 require_once($CFG->libdir . '/adminlib.php');
 
index 09a44bb..5c65c55 100644 (file)
@@ -23,7 +23,7 @@
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require(dirname(dirname(__FILE__)) . '/config.php');
+require(__DIR__ . '/../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 
 admin_externalpage_setup('resetemoticons');
index 717b8f2..2b66c9f 100644 (file)
@@ -36,6 +36,8 @@ require_login($course, false, $cm);
 require_capability('moodle/role:review', $context);
 require_sesskey();
 
+$OUTPUT->header();
+
 list($overridableroles, $overridecounts, $nameswithcounts) = get_overridable_roles($context,
         ROLENAME_BOTH, true);
 
index 8ffd54d..383455e 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../config.php');
+require_once(__DIR__ . '/../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 
 $mode = required_param('mode', PARAM_ALPHANUMEXT);
index 79c697b..6649aaf 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../config.php');
+require_once(__DIR__ . '/../../config.php');
 
 $contextid = required_param('contextid', PARAM_INT);
 
index 85904eb..256f635 100644 (file)
@@ -71,8 +71,9 @@ class core_role_preset {
         $dom->appendChild($top);
 
         $top->appendChild($dom->createElement('shortname', $role->shortname));
-        $top->appendChild($dom->createElement('name', $role->name));
-        $top->appendChild($dom->createElement('description', $role->description));
+        $top->appendChild($dom->createElement('name', htmlspecialchars($role->name, ENT_COMPAT | ENT_HTML401, 'UTF-8')));
+        $top->appendChild($dom->createElement('description', htmlspecialchars($role->description, ENT_COMPAT | ENT_HTML401,
+                'UTF-8')));
         $top->appendChild($dom->createElement('archetype', $role->archetype));
 
         $contextlevels = $dom->createElement('contextlevels');
index 8e98399..5a5e6a3 100644 (file)
@@ -28,7 +28,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../config.php');
+require_once(__DIR__ . '/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 
 $action = required_param('action', PARAM_ALPHA);
index 6cd63ab..d5a9532 100644 (file)
@@ -31,7 +31,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../config.php');
+require_once(__DIR__ . '/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');
 
index 21ecab7..2d0dd1b 100644 (file)
@@ -72,13 +72,13 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
         $formcourseformats[$courseformat] = new lang_string('pluginname', "format_$courseformat");
     }
     $temp->add(new admin_setting_configselect('moodlecourse/format', new lang_string('format'), new lang_string('coursehelpformat'),
-        'weeks',$formcourseformats));
+        'topics', $formcourseformats));
 
     $temp->add(new admin_setting_configtext('moodlecourse/maxsections', new lang_string('maxnumberweeks'),
         new lang_string('maxnumberweeks_desc'), 52));
 
     $temp->add(new admin_settings_num_course_sections('moodlecourse/numsections', new lang_string('numberweeks'),
-        new lang_string('coursehelpnumberweeks'), 10));
+        new lang_string('coursehelpnumberweeks'), 4));
 
     $choices = array();
     $choices['0'] = new lang_string('hiddensectionscollapsed');
index 1beaca5..680bd3d 100644 (file)
@@ -40,7 +40,9 @@ if ($hassiteconfig) {
         get_string('requiremodintro', 'admin'), get_string('requiremodintro_desc', 'admin'), 0));
     $ADMIN->add('modsettings', $temp);
 
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('mod') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('mod');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\mod $plugin */
         $plugin->load_settings($ADMIN, 'modsettings', $hassiteconfig);
     }
@@ -50,7 +52,9 @@ if ($hassiteconfig) {
     $temp = new admin_settingpage('manageformats', new lang_string('manageformats', 'core_admin'));
     $temp->add(new admin_setting_manageformats());
     $ADMIN->add('formatsettings', $temp);
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('format') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('format');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\format $plugin */
         $plugin->load_settings($ADMIN, 'formatsettings', $hassiteconfig);
     }
@@ -58,7 +62,9 @@ if ($hassiteconfig) {
     // blocks
     $ADMIN->add('modules', new admin_category('blocksettings', new lang_string('blocks')));
     $ADMIN->add('blocksettings', new admin_page_manageblocks());
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('block') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('block');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\block $plugin */
         $plugin->load_settings($ADMIN, 'blocksettings', $hassiteconfig);
     }
@@ -67,7 +73,9 @@ if ($hassiteconfig) {
     $ADMIN->add('modules', new admin_category('messageoutputs', new lang_string('messageoutputs', 'message')));
     $ADMIN->add('messageoutputs', new admin_page_managemessageoutputs());
     $ADMIN->add('messageoutputs', new admin_page_defaultmessageoutputs());
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('message') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('message');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\message $plugin */
         $plugin->load_settings($ADMIN, 'messageoutputs', $hassiteconfig);
     }
@@ -108,7 +116,9 @@ if ($hassiteconfig) {
     $temp = new admin_externalpage('authtestsettings', get_string('testsettings', 'core_auth'), new moodle_url("/auth/test_settings.php"), 'moodle/site:config', true);
     $ADMIN->add('authsettings', $temp);
 
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('auth') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('auth');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\auth $plugin */
         $plugin->load_settings($ADMIN, 'authsettings', $hassiteconfig);
     }
@@ -122,7 +132,9 @@ if ($hassiteconfig) {
     $temp = new admin_externalpage('enroltestsettings', get_string('testsettings', 'core_enrol'), new moodle_url("/enrol/test_settings.php"), 'moodle/site:config', true);
     $ADMIN->add('enrolments', $temp);
 
-    foreach(core_plugin_manager::instance()->get_plugins_of_type('enrol') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('enrol');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\enrol $plugin */
         $plugin->load_settings($ADMIN, 'enrolments', $hassiteconfig);
     }
@@ -133,7 +145,9 @@ if ($hassiteconfig) {
     $temp = new admin_settingpage('manageeditors', new lang_string('editorsettings', 'editor'));
     $temp->add(new admin_setting_manageeditors());
     $ADMIN->add('editorsettings', $temp);
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('editor') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('editor');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\editor $plugin */
         $plugin->load_settings($ADMIN, 'editorsettings', $hassiteconfig);
     }
@@ -143,7 +157,9 @@ if ($hassiteconfig) {
     $temp = new admin_settingpage('manageantiviruses', new lang_string('antivirussettings', 'antivirus'));
     $temp->add(new admin_setting_manageantiviruses());
     $ADMIN->add('antivirussettings', $temp);
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('antivirus') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('antivirus');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /* @var \core\plugininfo\antivirus $plugin */
         $plugin->load_settings($ADMIN, 'antivirussettings', $hassiteconfig);
     }
@@ -182,7 +198,9 @@ if ($hassiteconfig) {
     }
     $ADMIN->add('filtersettings', $temp);
 
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('filter') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('filter');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\filter $plugin */
         $plugin->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
     }
@@ -283,7 +301,9 @@ if ($hassiteconfig) {
         new lang_string('createrepository', 'repository'), $url, 'moodle/site:config', true));
     $ADMIN->add('repositorysettings', new admin_externalpage('repositoryinstanceedit',
         new lang_string('editrepositoryinstance', 'repository'), $url, 'moodle/site:config', true));
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('repository') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('repository');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\repository $plugin */
         $plugin->load_settings($ADMIN, 'repositorysettings', $hassiteconfig);
     }
@@ -337,7 +357,9 @@ if ($hassiteconfig) {
                         'admin'), new lang_string('configenablewsdocumentation', 'admin', $wsdoclink), false));
     $ADMIN->add('webservicesettings', $temp);
     /// links to protocol pages
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('webservice') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('webservice');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\webservice $plugin */
         $plugin->load_settings($ADMIN, 'webservicesettings', $hassiteconfig);
     }
@@ -409,7 +431,9 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
             get_string('responsehistory', 'question'), '', 0, $hiddenofvisible));
 
     // Settings for particular question types.
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('qtype') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('qtype');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\qtype $plugin */
         $plugin->load_settings($ADMIN, 'qtypesettings', $hassiteconfig);
     }
@@ -421,7 +445,9 @@ if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
     $ADMIN->add('plagiarism', new admin_externalpage('manageplagiarismplugins', new lang_string('manageplagiarism', 'plagiarism'),
         $CFG->wwwroot . '/' . $CFG->admin . '/plagiarism.php'));
 
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('plagiarism') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('plagiarism');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\plagiarism $plugin */
         $plugin->load_settings($ADMIN, 'plagiarism', $hassiteconfig);
     }
@@ -445,6 +471,7 @@ if ($hassiteconfig) {
     }
     if (!empty($pages)) {
         $ADMIN->add('modules', new admin_category('coursereports', new lang_string('coursereports')));
+        core_collator::asort_objects_by_property($pages, 'visiblename');
         foreach ($pages as $page) {
             $ADMIN->add('coursereports', $page);
         }
@@ -468,6 +495,7 @@ foreach (core_component::get_plugin_list('report') as $report => $plugindir) {
 $ADMIN->add('modules', new admin_category('reportplugins', new lang_string('reports')));
 $ADMIN->add('reportplugins', new admin_externalpage('managereports', new lang_string('reportsmanage', 'admin'),
                                                     $CFG->wwwroot . '/' . $CFG->admin . '/reports.php'));
+core_collator::asort_objects_by_property($pages, 'visiblename');
 foreach ($pages as $page) {
     $ADMIN->add('reportplugins', $page);
 }
@@ -510,6 +538,7 @@ if ($hassiteconfig) {
     }
     $ADMIN->add('searchplugins', $temp);
 
+    core_collator::asort_objects_by_property($pages, 'visiblename');
     foreach ($pages as $page) {
         $ADMIN->add('searchplugins', $page);
     }
@@ -523,7 +552,9 @@ if ($hassiteconfig) {
 }
 
 // Now add various admin tools.
-foreach (core_plugin_manager::instance()->get_plugins_of_type('tool') as $plugin) {
+$plugins = core_plugin_manager::instance()->get_plugins_of_type('tool');
+core_collator::asort_objects_by_property($plugins, 'displayname');
+foreach ($plugins as $plugin) {
     /** @var \core\plugininfo\tool $plugin */
     $plugin->load_settings($ADMIN, null, $hassiteconfig);
 }
@@ -534,6 +565,7 @@ if ($hassiteconfig) {
     $ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
     $ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
     $ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
+    $ADMIN->locate('cachestores')->set_sorting(true);
     foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) {
         $settingspath = $path.'/settings.php';
         if (file_exists($settingspath)) {
@@ -547,7 +579,9 @@ if ($hassiteconfig) {
 // Add Calendar type settings.
 if ($hassiteconfig) {
     $ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
-    foreach (core_plugin_manager::instance()->get_plugins_of_type('calendartype') as $plugin) {
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('calendartype');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
         /** @var \core\plugininfo\calendartype $plugin */
         $plugin->load_settings($ADMIN, 'calendartype', $hassiteconfig);
     }
@@ -562,7 +596,9 @@ if ($hassiteconfig) {
 
 // Extend settings for each local plugin. Note that their settings may be in any part of the
 // settings tree and may be visible not only for administrators.
-foreach (core_plugin_manager::instance()->get_plugins_of_type('local') as $plugin) {
+$plugins = core_plugin_manager::instance()->get_plugins_of_type('local');
+core_collator::asort_objects_by_property($plugins, 'displayname');
+foreach ($plugins as $plugin) {
     /** @var \core\plugininfo\local $plugin */
     $plugin->load_settings($ADMIN, null, $hassiteconfig);
 }
index 0d92dc0..7744063 100644 (file)
@@ -24,7 +24,7 @@
 
 define('NO_OUTPUT_BUFFERING', true);
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
index d9e554d..7720ac7 100644 (file)
@@ -33,7 +33,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
 
index 048ded5..0836076 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
index 5a5679a..8a1f78d 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
 
index 88be9a5..3c41fd9 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir . '/adminlib.php');
 require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
 
index 98fc305..f8a37e7 100644 (file)
@@ -101,6 +101,9 @@ if (empty($options['torun'])) {
 if (extension_loaded('pcntl')) {
     $disabled = explode(',', ini_get('disable_functions'));
     if (!in_array('pcntl_signal', $disabled)) {
+        // Handle interrupts on PHP7.
+        declare(ticks = 1);
+
         pcntl_signal(SIGTERM, "signal_handler");
         pcntl_signal(SIGINT, "signal_handler");
     }
index 45f9002..57f0716 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/capability/locallib.php');
 require_once($CFG->libdir.'/adminlib.php');
 
index d53af3e..cc9947c 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require_once(dirname(__FILE__) . '/../../../config.php');
+require_once(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 require_once($CFG->libdir.'/tablelib.php');
 
index b3c5c03..b63626f 100644 (file)
@@ -38,5 +38,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
     // Moodle v3.0.0 release upgrade line.
     // Put any upgrade step following this.
 
+    // Moodle v3.1.0 release upgrade line.
+    // Put any upgrade step following this.
+
     return true;
 }
index 8ad4536..aabc31e 100644 (file)
@@ -21,7 +21,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require(dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php');
+require(__DIR__ . '/../../../config.php');
 require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/customlang/locallib.php');
 require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/customlang/filter_form.php');
 require_once($CFG->libdir.'/adminlib.php');
index 4d120ff..9031329 100644 (file)
@@ -25,7 +25,7 @@
 
 define('NO_OUTPUT_BUFFERING', true); // progress bar is used here
 
-require(dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php');
+require(__DIR__ . '/../../../config.php');
 require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/customlang/locallib.php');
 require_once($CFG->libdir.'/adminlib.php');
 
index cbd43e1..124e286 100644 (file)
@@ -25,7 +25,7 @@
 define('CLI_SCRIPT', true);
 define('NO_OUTPUT_BUFFERING', true);
 
-require(dirname(__FILE__) . '/../../../../config.php');
+require(__DIR__ . '/../../../../config.php');
 require_once($CFG->libdir. '/clilib.php');
 
 // CLI options.
index 78ab7e4..1dbb2ae 100644 (file)
@@ -25,7 +25,7 @@
 define('CLI_SCRIPT', true);
 define('NO_OUTPUT_BUFFERING', true);
 
-require(dirname(__FILE__) . '/../../../../config.php');
+require(__DIR__ . '/../../../../config.php');
 require_once($CFG->libdir. '/clilib.php');
 
 // CLI options.
index 3c26f50..84341b3 100644 (file)
@@ -21,7 +21,7 @@
  * @copyright  2009 Nicolas Connault
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-require(dirname(__FILE__) . '/../../../config.php');
+require(__DIR__ . '/../../../config.php');
 
 // This index page was previously in use, for now we redirect to the make test
 // course page - but we might reinstate this page in the future.
index 7994a8c..6a625f6 100644 (file)
 .path-admin-tool-health dl.notice dd {
     background-color: #e5db36;
 }
-.path-admin-tool-health dt.solution,
-.path-admin-tool-health dd.solution,
+.path-admin-tool-health dl dt.solution,
+.path-admin-tool-health dl dd.solution,
 .path-admin-tool-health div#healthnoproblemsfound {
-    background-color: #5BB83E !important;
+    background-color: #5BB83E;
 }
 .path-admin-tool-health dl.healthissues dt,
 .path-admin-tool-health dl.healthissues dd {
index cd6e7f4..453eed4 100644 (file)
@@ -23,7 +23,7 @@
  * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-require(dirname(__FILE__) . '/../../../config.php');
+require(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 
 admin_externalpage_setup('tool_installaddon_index');
index 8df27d0..db48884 100644 (file)
@@ -26,7 +26,7 @@
 
 define('AJAX_SCRIPT', true);
 
-require(dirname(__FILE__) . '/../../../config.php');
+require(__DIR__ . '/../../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
 
 require_login();
index ef219e0..042ed97 100644 (file)
@@ -42,5 +42,8 @@ function xmldb_tool_log_upgrade($oldversion) {
     // Moodle v3.0.0 release upgrade line.
     // Put any upgrade step following this.
 
+    // Moodle v3.1.0 release upgrade line.
+    // Put any upgrade step following this.
+
     return true;
 }
index dc92035..21e34e0 100644 (file)
@@ -36,5 +36,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
     // Moodle v3.0.0 release upgrade line.
     // Put any upgrade step following this.
 
+    // Moodle v3.1.0 release upgrade line.
+    // Put any upgrade step following this.
+
     return true;
 }