Merge branch 'MDL-54576_themeSelector' of https://github.com/mrmark/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 14 Jun 2016 03:24:00 +0000 (11:24 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 16 Jun 2016 08:04:06 +0000 (09:04 +0100)
829 files changed:
.eslintrc [new file with mode: 0644]
.gitignore
.travis.yml
Gruntfile.js
admin/environment.xml
admin/roles/classes/preset.php
admin/settings/courses.php
admin/tool/assignmentupgrade/version.php
admin/tool/availabilityconditions/version.php
admin/tool/behat/version.php
admin/tool/capability/version.php
admin/tool/cohortroles/lang/en/tool_cohortroles.php
admin/tool/cohortroles/version.php
admin/tool/customlang/db/upgrade.php
admin/tool/customlang/version.php
admin/tool/dbtransfer/version.php
admin/tool/filetypes/version.php
admin/tool/generator/version.php
admin/tool/health/version.php
admin/tool/innodb/version.php
admin/tool/installaddon/version.php
admin/tool/langimport/version.php
admin/tool/log/db/upgrade.php
admin/tool/log/store/database/db/upgrade.php
admin/tool/log/store/database/version.php
admin/tool/log/store/legacy/version.php
admin/tool/log/store/standard/db/upgrade.php
admin/tool/log/store/standard/version.php
admin/tool/log/version.php
admin/tool/lp/amd/build/user_competency_course_navigation.min.js
admin/tool/lp/amd/src/competency_rule_points.js
admin/tool/lp/amd/src/user_competency_course_navigation.js
admin/tool/lp/lang/en/tool_lp.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/course_competencies_page.mustache
admin/tool/lp/templates/course_competency_statistics.mustache
admin/tool/lp/templates/manage_competency_frameworks_page.mustache
admin/tool/lp/templates/manage_templates_page.mustache
admin/tool/lp/templates/no_frameworks_warning.mustache
admin/tool/lp/templates/plan_page.mustache
admin/tool/lp/templates/plans_page.mustache
admin/tool/lp/templates/progress_bar.mustache [new file with mode: 0644]
admin/tool/lp/templates/template_competencies_page.mustache
admin/tool/lp/templates/template_statistics.mustache
admin/tool/lp/templates/user_competency_summary.mustache
admin/tool/lp/templates/user_competency_summary_in_course.mustache
admin/tool/lp/templates/user_evidence_list_page.mustache
admin/tool/lp/templates/user_evidence_page.mustache
admin/tool/lp/upgrade.txt [new file with mode: 0644]
admin/tool/lp/version.php
admin/tool/lpmigrate/version.php
admin/tool/messageinbound/version.php
admin/tool/mobile/classes/api.php
admin/tool/mobile/version.php
admin/tool/monitor/db/upgrade.php
admin/tool/monitor/version.php
admin/tool/multilangupgrade/version.php
admin/tool/phpunit/version.php
admin/tool/profiling/version.php
admin/tool/recyclebin/version.php
admin/tool/replace/version.php
admin/tool/spamcleaner/version.php
admin/tool/task/version.php
admin/tool/templatelibrary/version.php
admin/tool/unsuproles/version.php
admin/tool/uploadcourse/version.php
admin/tool/uploaduser/version.php
admin/tool/xmldb/version.php
admin/user/user_bulk.php
admin/user/user_bulk_enrol.php [deleted file]
admin/user/user_bulk_forms.php
auth/cas/db/upgrade.php
auth/cas/version.php
auth/db/version.php
auth/email/version.php
auth/fc/version.php
auth/imap/version.php
auth/ldap/db/upgrade.php
auth/ldap/version.php
auth/lti/lang/en/auth_lti.php
auth/lti/version.php
auth/manual/db/upgrade.php
auth/manual/version.php
auth/mnet/db/upgrade.php
auth/mnet/version.php
auth/nntp/version.php
auth/nologin/version.php
auth/none/version.php
auth/pam/version.php
auth/pop3/version.php
auth/radius/version.php
auth/shibboleth/version.php
auth/webservice/version.php
availability/condition/completion/version.php
availability/condition/date/version.php
availability/condition/grade/version.php
availability/condition/group/version.php
availability/condition/grouping/version.php
availability/condition/profile/version.php
backup/backup.class.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]
blocks/activity_modules/version.php
blocks/activity_results/version.php
blocks/admin_bookmarks/version.php
blocks/badges/db/upgrade.php
blocks/badges/version.php
blocks/blog_menu/version.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/blog_recent/version.php
blocks/blog_tags/version.php
blocks/calendar_month/db/upgrade.php
blocks/calendar_month/version.php
blocks/calendar_upcoming/db/upgrade.php
blocks/calendar_upcoming/version.php
blocks/comments/tests/behat/block_comment_dashboard.feature [new file with mode: 0644]
blocks/comments/version.php
blocks/community/db/upgrade.php
blocks/community/version.php
blocks/completionstatus/db/upgrade.php
blocks/completionstatus/tests/behat/block_completionstatus.feature [new file with mode: 0644]
blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature [new file with mode: 0644]
blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature [new file with mode: 0644]
blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature [new file with mode: 0644]
blocks/completionstatus/version.php
blocks/course_list/tests/behat/block_course_list_category.feature [new file with mode: 0644]
blocks/course_list/tests/behat/block_course_list_course.feature [new file with mode: 0644]
blocks/course_list/tests/behat/block_course_list_dashboard.feature [new file with mode: 0644]
blocks/course_list/tests/behat/block_course_list_frontpage.feature [new file with mode: 0644]
blocks/course_list/version.php
blocks/course_overview/tests/behat/block_course_overview.feature [new file with mode: 0644]
blocks/course_overview/tests/behat/quiz_overview.feature [new file with mode: 0644]
blocks/course_overview/version.php
blocks/course_summary/db/upgrade.php
blocks/course_summary/version.php
blocks/feedback/version.php
blocks/globalsearch/version.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/glossary_random/version.php
blocks/html/db/upgrade.php
blocks/html/version.php
blocks/login/version.php
blocks/lp/competencies_to_review.php
blocks/lp/plans_to_review.php
blocks/lp/version.php
blocks/mentees/version.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/messages/version.php
blocks/mnet_hosts/version.php
blocks/myprofile/tests/behat/block_myprofile.feature [new file with mode: 0644]
blocks/myprofile/tests/behat/block_myprofile_activity.feature [new file with mode: 0644]
blocks/myprofile/tests/behat/block_myprofile_course.feature [new file with mode: 0644]
blocks/myprofile/tests/behat/block_myprofile_dashboard.feature [new file with mode: 0644]
blocks/myprofile/tests/behat/block_myprofile_frontpage.feature [new file with mode: 0644]
blocks/myprofile/version.php
blocks/navigation/amd/build/ajax_response_renderer.min.js
blocks/navigation/amd/build/navblock.min.js
blocks/navigation/amd/src/ajax_response_renderer.js
blocks/navigation/amd/src/navblock.js
blocks/navigation/block_navigation.php
blocks/navigation/db/upgrade.php
blocks/navigation/renderer.php
blocks/navigation/styles.css
blocks/navigation/version.php
blocks/news_items/block_news_items.php
blocks/news_items/version.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/online_users/version.php
blocks/participants/version.php
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/private_files/version.php
blocks/quiz_results/db/upgrade.php
blocks/quiz_results/version.php
blocks/recent_activity/db/upgrade.php
blocks/recent_activity/version.php
blocks/rss_client/db/upgrade.php
blocks/rss_client/edit_form.php
blocks/rss_client/version.php
blocks/search_forums/version.php
blocks/section_links/db/upgrade.php
blocks/section_links/version.php
blocks/selfcompletion/db/upgrade.php
blocks/selfcompletion/version.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/renderer.php
blocks/settings/styles.css
blocks/settings/version.php
blocks/site_main_menu/version.php
blocks/social_activities/version.php
blocks/tag_flickr/version.php
blocks/tag_youtube/version.php
blocks/tags/version.php
cache/locks/file/version.php
cache/stores/file/version.php
cache/stores/memcache/version.php
cache/stores/memcached/version.php
cache/stores/mongodb/version.php
cache/stores/session/version.php
cache/stores/static/version.php
calendar/externallib.php
calendar/lib.php
calendar/tests/externallib_test.php
calendar/type/gregorian/version.php
comment/comment_post.php
competency/classes/api.php
competency/classes/persistent.php
competency/tests/api_test.php
competency/tests/persistent_test.php
completion/tests/behat/teacher_manual_completion.feature
course/classes/search/mycourse.php
course/externallib.php
course/format/lib.php
course/format/singleactivity/version.php
course/format/social/version.php
course/format/topics/version.php
course/format/weeks/version.php
course/lib.php
course/tests/restore_test.php
course/tests/search_test.php
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/toolboxes/js/resource.js
dataformat/csv/version.php
dataformat/excel/version.php
dataformat/html/version.php
dataformat/json/version.php
dataformat/ods/version.php
enrol/category/version.php
enrol/cohort/version.php
enrol/database/db/upgrade.php
enrol/database/version.php
enrol/flatfile/db/upgrade.php
enrol/flatfile/version.php
enrol/guest/db/upgrade.php
enrol/guest/version.php
enrol/imsenterprise/db/upgrade.php
enrol/imsenterprise/version.php
enrol/ldap/version.php
enrol/lti/lang/en/enrol_lti.php
enrol/lti/settings.php
enrol/lti/tests/behat/basic_settings.feature
enrol/lti/tests/behat/index_page.feature
enrol/lti/tool.php
enrol/lti/version.php
enrol/manual/ajax.php
enrol/manual/db/upgrade.php
enrol/manual/lib.php
enrol/manual/manage.php
enrol/manual/version.php
enrol/manual/yui/quickenrolment/quickenrolment.js
enrol/meta/version.php
enrol/mnet/db/upgrade.php
enrol/mnet/version.php
enrol/paypal/db/upgrade.php
enrol/paypal/version.php
enrol/self/db/upgrade.php
enrol/self/version.php
enrol/tests/behat/behat_enrol.php
enrol/tests/behat/enrol_user.feature [new file with mode: 0644]
enrol/upgrade.txt
filter/activitynames/version.php
filter/algebra/version.php
filter/censor/version.php
filter/data/version.php
filter/emailprotect/version.php
filter/emoticon/version.php
filter/glossary/version.php
filter/mathjaxloader/version.php
filter/mediaplugin/db/upgrade.php
filter/mediaplugin/version.php
filter/multilang/version.php
filter/tex/db/upgrade.php
filter/tex/version.php
filter/tidy/version.php
filter/urltolink/version.php
grade/export/ods/version.php
grade/export/txt/version.php
grade/export/xls/version.php
grade/export/xml/version.php
grade/grading/form/guide/db/upgrade.php
grade/grading/form/guide/version.php
grade/grading/form/rubric/db/upgrade.php
grade/grading/form/rubric/version.php
grade/import/csv/version.php
grade/import/direct/version.php
grade/import/xml/version.php
grade/lib.php
grade/report/grader/version.php
grade/report/history/version.php
grade/report/outcomes/version.php
grade/report/overview/version.php
grade/report/singleview/version.php
grade/report/user/db/upgrade.php
grade/report/user/version.php
grade/tests/behat/grade_letter_boundary.feature [new file with mode: 0644]
grade/tests/behat/grade_letter_boundary_20160518.feature [new file with mode: 0644]
install/lang/ca/admin.php
install/lang/ca/install.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_br/admin.php
install/lang/sv/moodle.php
lang/en/admin.php
lang/en/auth.php
lang/en/error.php
lang/en/question.php
lib/accesslib.php
lib/amd/build/notification.min.js
lib/amd/build/tree.min.js
lib/amd/src/localstorage.js
lib/amd/src/notification.js
lib/amd/src/tree.js
lib/amd/src/yui.js
lib/antivirus/clamav/db/upgrade.php
lib/antivirus/clamav/version.php
lib/behat/classes/util.php
lib/blocklib.php
lib/classes/output/notification.php
lib/classes/session/memcached.php
lib/db/install.php
lib/db/services.php
lib/db/upgrade.php
lib/db/upgradelib.php
lib/editor/atto/autosave-ajax.php
lib/editor/atto/db/upgrade.php
lib/editor/atto/plugins/accessibilitychecker/version.php
lib/editor/atto/plugins/accessibilityhelper/version.php
lib/editor/atto/plugins/align/version.php
lib/editor/atto/plugins/backcolor/version.php
lib/editor/atto/plugins/bold/version.php
lib/editor/atto/plugins/charmap/version.php
lib/editor/atto/plugins/clear/version.php
lib/editor/atto/plugins/collapse/version.php
lib/editor/atto/plugins/emoticon/version.php
lib/editor/atto/plugins/equation/db/upgrade.php
lib/editor/atto/plugins/equation/version.php
lib/editor/atto/plugins/fontcolor/version.php
lib/editor/atto/plugins/html/version.php
lib/editor/atto/plugins/image/version.php
lib/editor/atto/plugins/indent/version.php
lib/editor/atto/plugins/italic/version.php
lib/editor/atto/plugins/link/version.php
lib/editor/atto/plugins/managefiles/version.php
lib/editor/atto/plugins/media/version.php
lib/editor/atto/plugins/noautolink/version.php
lib/editor/atto/plugins/orderedlist/version.php
lib/editor/atto/plugins/rtl/version.php
lib/editor/atto/plugins/strike/version.php
lib/editor/atto/plugins/subscript/version.php
lib/editor/atto/plugins/superscript/version.php
lib/editor/atto/plugins/table/version.php
lib/editor/atto/plugins/title/version.php
lib/editor/atto/plugins/underline/version.php
lib/editor/atto/plugins/undo/version.php
lib/editor/atto/plugins/unorderedlist/version.php
lib/editor/atto/version.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/textarea/version.php
lib/editor/tinymce/db/upgrade.php
lib/editor/tinymce/plugins/ctrlhelp/version.php
lib/editor/tinymce/plugins/managefiles/version.php
lib/editor/tinymce/plugins/moodleemoticon/version.php
lib/editor/tinymce/plugins/moodleimage/version.php
lib/editor/tinymce/plugins/moodlemedia/version.php
lib/editor/tinymce/plugins/moodlenolink/version.php
lib/editor/tinymce/plugins/pdw/version.php
lib/editor/tinymce/plugins/spellchecker/db/upgrade.php
lib/editor/tinymce/plugins/spellchecker/version.php
lib/editor/tinymce/plugins/wrap/version.php
lib/editor/tinymce/version.php
lib/filestorage/file_storage.php
lib/form/modgrade.php
lib/form/tags.php
lib/form/tests/behat/modgrade_validation.feature
lib/formslib.php
lib/grade/tests/grade_item_test.php
lib/gradelib.php
lib/html2text/lib.php
lib/html2text/override.php [new file with mode: 0644]
lib/html2text/readme_moodle.txt
lib/medialib.php
lib/myprofilelib.php
lib/outputrenderers.php
lib/questionlib.php
lib/testing/classes/util.php
lib/tests/behat/behat_forms.php
lib/tests/behat/behat_hooks.php
lib/tests/behat/behat_navigation.php
lib/tests/questionlib_test.php
lib/tests/upgradelib_test.php
lib/tests/weblib_format_text_test.php
lib/tests/weblib_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/build/moodle-core-lockscroll/moodle-core-lockscroll-debug.js
lib/yui/build/moodle-core-lockscroll/moodle-core-lockscroll-min.js
lib/yui/build/moodle-core-lockscroll/moodle-core-lockscroll.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js
lib/yui/src/dock/js/dock.js
lib/yui/src/dock/meta/dock.json
lib/yui/src/event/js/event.js
lib/yui/src/lockscroll/js/lockscroll.js
lib/yui/src/notification/js/dialogue.js
message/externallib.php
message/lib.php
message/output/airnotifier/version.php
message/output/email/db/upgrade.php
message/output/email/version.php
message/output/jabber/db/upgrade.php
message/output/jabber/version.php
message/output/popup/db/upgrade.php
message/output/popup/version.php
mnet/service/enrol/version.php
mod/assign/db/upgrade.php
mod/assign/externallib.php
mod/assign/feedback/comments/db/upgrade.php
mod/assign/feedback/comments/version.php
mod/assign/feedback/editpdf/db/upgrade.php
mod/assign/feedback/editpdf/lang/en/assignfeedback_editpdf.php
mod/assign/feedback/editpdf/settings.php
mod/assign/feedback/editpdf/styles.css
mod/assign/feedback/editpdf/testunoconv.php [new file with mode: 0644]
mod/assign/feedback/editpdf/version.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/feedback/file/version.php
mod/assign/feedback/offline/importgradesform.php
mod/assign/feedback/offline/importgradeslib.php
mod/assign/feedback/offline/locallib.php
mod/assign/feedback/offline/uploadgradesform.php
mod/assign/feedback/offline/version.php
mod/assign/lang/en/assign.php
mod/assign/lib.php
mod/assign/locallib.php
mod/assign/mod_form.php
mod/assign/renderer.php
mod/assign/submission/comments/db/upgrade.php
mod/assign/submission/comments/version.php
mod/assign/submission/file/db/upgrade.php
mod/assign/submission/file/version.php
mod/assign/submission/onlinetext/db/upgrade.php
mod/assign/submission/onlinetext/version.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/version.php
mod/assignment/db/upgrade.php
mod/assignment/type/offline/version.php
mod/assignment/type/online/version.php
mod/assignment/type/upload/version.php
mod/assignment/type/uploadsingle/version.php
mod/assignment/version.php
mod/book/classes/search/chapter.php
mod/book/db/upgrade.php
mod/book/lang/en/book.php
mod/book/tool/exportimscp/version.php
mod/book/tool/importhtml/version.php
mod/book/tool/print/version.php
mod/book/version.php
mod/chat/db/upgrade.php
mod/chat/lang/en/chat.php
mod/chat/lib.php
mod/chat/version.php
mod/choice/db/upgrade.php
mod/choice/lang/en/choice.php
mod/choice/lib.php
mod/choice/version.php
mod/data/classes/search/activity.php [new file with mode: 0644]
mod/data/data.js
mod/data/db/upgrade.php
mod/data/field/checkbox/version.php
mod/data/field/date/version.php
mod/data/field/file/version.php
mod/data/field/latlong/version.php
mod/data/field/menu/version.php
mod/data/field/multimenu/version.php
mod/data/field/number/version.php
mod/data/field/picture/version.php
mod/data/field/radiobutton/version.php
mod/data/field/text/version.php
mod/data/field/textarea/version.php
mod/data/field/url/version.php
mod/data/lang/en/data.php
mod/data/preset/imagegallery/version.php
mod/data/version.php
mod/feedback/db/install.xml
mod/feedback/db/upgrade.php
mod/feedback/db/upgradelib.php
mod/feedback/lang/en/feedback.php
mod/feedback/tests/behat/coursemapping.feature
mod/feedback/tests/behat/export_import.feature
mod/feedback/tests/behat/question_types.feature
mod/feedback/tests/behat/question_types_non_anon.feature
mod/feedback/tests/upgradelib_test.php
mod/feedback/version.php
mod/folder/db/upgrade.php
mod/folder/lang/en/folder.php
mod/folder/version.php
mod/forum/classes/search/post.php
mod/forum/db/upgrade.php
mod/forum/lang/en/forum.php
mod/forum/lib.php
mod/forum/styles.css
mod/forum/user.php
mod/forum/version.php
mod/glossary/classes/search/entry.php
mod/glossary/db/upgrade.php
mod/glossary/lang/en/glossary.php
mod/glossary/version.php
mod/imscp/db/upgrade.php
mod/imscp/lang/en/imscp.php
mod/imscp/version.php
mod/label/db/upgrade.php
mod/label/lang/en/label.php
mod/label/version.php
mod/lesson/db/upgrade.php
mod/lesson/lang/en/lesson.php
mod/lesson/version.php
mod/lti/amd/build/external_registration.min.js
mod/lti/amd/build/tool_card_controller.min.js
mod/lti/amd/build/tool_configure_controller.min.js
mod/lti/amd/build/tool_proxy.min.js
mod/lti/amd/build/tool_proxy_card_controller.min.js [new file with mode: 0644]
mod/lti/amd/build/tool_type.min.js
mod/lti/amd/src/external_registration.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 [new file with mode: 0644]
mod/lti/amd/src/tool_type.js
mod/lti/classes/external.php
mod/lti/classes/output/renderer.php
mod/lti/db/services.php
mod/lti/db/upgrade.php
mod/lti/edit_form.php
mod/lti/externalregistrationreturn.php
mod/lti/lang/en/lti.php
mod/lti/lib.php
mod/lti/locallib.php
mod/lti/registersettings.php
mod/lti/service/memberships/version.php
mod/lti/service/profile/version.php
mod/lti/service/toolproxy/version.php
mod/lti/service/toolsettings/version.php
mod/lti/styles.css
mod/lti/templates/external_registration.mustache
mod/lti/templates/external_registration_return.mustache [moved from mod/lti/templates/registration_feedback.mustache with 57% similarity]
mod/lti/templates/tool_configure.mustache
mod/lti/templates/tool_list.mustache
mod/lti/templates/tool_proxy_card.mustache [new file with mode: 0644]
mod/lti/templates/tool_proxy_registration_form.mustache
mod/lti/tests/behat/addtool.feature
mod/lti/tests/behat/addtype.feature
mod/lti/tests/behat/toolconfigure.feature
mod/lti/toolssettings.php
mod/lti/typessettings.php
mod/lti/version.php
mod/page/classes/search/activity.php
mod/page/db/upgrade.php
mod/page/lang/en/page.php
mod/page/version.php
mod/quiz/accessrule/delaybetweenattempts/version.php
mod/quiz/accessrule/ipaddress/version.php
mod/quiz/accessrule/numattempts/version.php
mod/quiz/accessrule/openclosedate/version.php
mod/quiz/accessrule/password/version.php
mod/quiz/accessrule/safebrowser/version.php
mod/quiz/accessrule/securewindow/version.php
mod/quiz/accessrule/timelimit/version.php
mod/quiz/db/upgrade.php
mod/quiz/lang/en/quiz.php
mod/quiz/lib.php
mod/quiz/report/grading/version.php
mod/quiz/report/overview/db/upgrade.php
mod/quiz/report/overview/report.php
mod/quiz/report/overview/version.php
mod/quiz/report/responses/version.php
mod/quiz/report/statistics/db/upgrade.php
mod/quiz/report/statistics/version.php
mod/quiz/tests/behat/manually_mark_question.feature
mod/quiz/tests/lib_test.php
mod/quiz/version.php
mod/resource/db/upgrade.php
mod/resource/lang/en/resource.php
mod/resource/version.php
mod/scorm/db/upgrade.php
mod/scorm/lang/en/scorm.php
mod/scorm/report/basic/version.php
mod/scorm/report/graphs/version.php
mod/scorm/report/interactions/version.php
mod/scorm/report/objectives/version.php
mod/scorm/version.php
mod/survey/db/upgrade.php
mod/survey/lang/en/survey.php
mod/survey/version.php
mod/url/db/upgrade.php
mod/url/lang/en/url.php
mod/url/version.php
mod/wiki/classes/search/collaborative_page.php
mod/wiki/create_form.php
mod/wiki/db/upgrade.php
mod/wiki/lang/en/wiki.php
mod/wiki/version.php
mod/workshop/allocation/manual/version.php
mod/workshop/allocation/random/version.php
mod/workshop/allocation/scheduled/version.php
mod/workshop/db/upgrade.php
mod/workshop/eval/best/version.php
mod/workshop/form/accumulative/db/upgrade.php
mod/workshop/form/accumulative/version.php
mod/workshop/form/comments/db/upgrade.php
mod/workshop/form/comments/version.php
mod/workshop/form/numerrors/db/upgrade.php
mod/workshop/form/numerrors/version.php
mod/workshop/form/rubric/db/upgrade.php
mod/workshop/form/rubric/version.php
mod/workshop/lang/en/workshop.php
mod/workshop/lib.php
mod/workshop/mod_form.php
mod/workshop/version.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]
pix/y/loading.gif
portfolio/boxnet/db/upgrade.php
portfolio/boxnet/version.php
portfolio/download/lib.php
portfolio/download/version.php
portfolio/flickr/version.php
portfolio/googledocs/db/upgrade.php
portfolio/googledocs/version.php
portfolio/mahara/version.php
portfolio/picasa/db/upgrade.php
portfolio/picasa/version.php
question/behaviour/adaptive/version.php
question/behaviour/adaptivenopenalty/version.php
question/behaviour/deferredcbm/version.php
question/behaviour/deferredfeedback/version.php
question/behaviour/immediatecbm/version.php
question/behaviour/immediatefeedback/version.php
question/behaviour/informationitem/version.php
question/behaviour/interactive/version.php
question/behaviour/interactivecountback/version.php
question/behaviour/manualgraded/db/upgrade.php
question/behaviour/manualgraded/version.php
question/behaviour/missing/version.php
question/category.php
question/format.php
question/format/aiken/version.php
question/format/blackboard_six/version.php
question/format/examview/version.php
question/format/gift/format.php
question/format/gift/tests/giftformat_test.php
question/format/gift/version.php
question/format/missingword/version.php
question/format/multianswer/version.php
question/format/webct/version.php
question/format/xhtml/version.php
question/format/xml/version.php
question/type/calculated/db/upgrade.php
question/type/calculated/version.php
question/type/calculatedmulti/version.php
question/type/calculatedsimple/version.php
question/type/ddimageortext/version.php
question/type/ddmarker/db/upgrade.php
question/type/ddmarker/version.php
question/type/ddwtos/version.php
question/type/description/version.php
question/type/essay/db/upgrade.php
question/type/essay/version.php
question/type/gapselect/version.php
question/type/match/db/upgrade.php
question/type/match/version.php
question/type/missingtype/version.php
question/type/multianswer/backup/moodle2/restore_qtype_multianswer_plugin.class.php
question/type/multianswer/db/upgrade.php
question/type/multianswer/version.php
question/type/multichoice/db/upgrade.php
question/type/multichoice/version.php
question/type/numerical/db/upgrade.php
question/type/numerical/version.php
question/type/random/db/upgrade.php
question/type/random/version.php
question/type/randomsamatch/db/upgrade.php
question/type/randomsamatch/version.php
question/type/shortanswer/db/upgrade.php
question/type/shortanswer/version.php
question/type/truefalse/version.php
rating/lib.php
rating/tests/rating_test.php
report/backups/version.php
report/competency/amd/build/user_course_navigation.min.js
report/competency/amd/src/user_course_navigation.js
report/competency/version.php
report/completion/version.php
report/configlog/version.php
report/courseoverview/version.php
report/eventlist/version.php
report/log/version.php
report/loglive/version.php
report/outline/version.php
report/participation/version.php
report/performance/version.php
report/progress/version.php
report/questioninstances/version.php
report/search/version.php
report/security/version.php
report/stats/version.php
report/usersessions/version.php
repository/alfresco/db/upgrade.php
repository/alfresco/version.php
repository/areafiles/version.php
repository/boxnet/db/upgrade.php
repository/boxnet/version.php
repository/coursefiles/version.php
repository/dropbox/db/upgrade.php
repository/dropbox/version.php
repository/equella/version.php
repository/filesystem/version.php
repository/flickr/version.php
repository/flickr_public/version.php
repository/googledocs/db/upgrade.php
repository/googledocs/version.php
repository/lib.php
repository/local/version.php
repository/merlot/version.php
repository/picasa/db/upgrade.php
repository/picasa/version.php
repository/recent/version.php
repository/s3/version.php
repository/skydrive/version.php
repository/upload/version.php
repository/url/version.php
repository/user/version.php
repository/webdav/version.php
repository/wikimedia/version.php
repository/youtube/version.php
search/classes/area/base_activity.php
search/classes/document.php
search/engine/solr/lang/en/search_solr.php
search/engine/solr/settings.php
search/engine/solr/version.php
tag/classes/area.php
tag/classes/output/tagareacollection.php
tag/classes/tag.php
tag/tests/taglib_test.php
theme/base/style/user.css
theme/base/version.php
theme/bootstrapbase/less/moodle/search.less
theme/bootstrapbase/less/moodle/user.less
theme/bootstrapbase/style/moodle.css
theme/bootstrapbase/version.php
theme/canvas/version.php
theme/clean/version.php
theme/more/db/upgrade.php
theme/more/version.php
user/profile/field/checkbox/version.php
user/profile/field/datetime/field.class.php
user/profile/field/datetime/version.php
user/profile/field/menu/version.php
user/profile/field/text/version.php
user/profile/field/textarea/version.php
version.php
webservice/rest/locallib.php
webservice/rest/tests/server_test.php [new file with mode: 0644]
webservice/rest/version.php
webservice/soap/version.php
webservice/upgrade.txt
webservice/xmlrpc/lib.php
webservice/xmlrpc/locallib.php
webservice/xmlrpc/tests/lib_test.php
webservice/xmlrpc/version.php

diff --git a/.eslintrc b/.eslintrc
new file mode 100644 (file)
index 0000000..31bd8ab
--- /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 }],
+    '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',
+    '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 1dab0f7..71a7224 100644 (file)
@@ -36,3 +36,4 @@ composer.phar
 /lib/yuilib/*/*/*-coverage.js
 atlassian-ide-plugin.xml
 /node_modules/
+.eslintignore
index 47f3462..d1438f3 100644 (file)
@@ -27,16 +27,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 +50,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 +77,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 +86,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 +128,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 +181,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 +205,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..a1d525e 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,93 @@ 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;
+    };
+
+    // An array of paths to third party directories.
+    var thirdPartyPaths = getThirdPartyPathsFromXML();
+
+    /**
+     * Determine if the file is a Moodle file, or its listed in
+     * the thirdpartylibs.xml file paths as a third party file.
+     *
+     * @param {string} file The file path to determine if thirdparty
+     * @return {bool} false If thid party file.
+     */
+    var isMoodleFile = function(file) {
+      if (grunt.file.isMatch(thirdPartyPaths, file)) {
+        return false;
+      }
+      return true;
+    };
+
     // 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,
+              filter: isMoodleFile,
+              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'],
+               filter: isMoodleFile
+            }
+        },
         uglify: {
             amd: {
                 files: [{
                     expand: true,
                     src: amdSrc,
-                    rename: uglify_rename
+                    rename: uglifyRename
                 }]
             }
         },
@@ -102,7 +174,7 @@ module.exports = function(grunt) {
             },
             yui: {
                 files: ['**/yui/src/**/*.js'],
-                tasks: ['shifter']
+                tasks: ['yui']
             },
         },
         shifter: {
@@ -113,6 +185,15 @@ module.exports = function(grunt) {
         }
     });
 
+    /**
+     * Generate ignore files (utilising thirdpartylibs.xml data)
+     */
+    tasks.ignorefiles = function() {
+      // 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 +202,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 +256,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 +285,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');
@@ -223,7 +303,7 @@ module.exports = function(grunt) {
     var onChange = grunt.util._.debounce(function() {
           var files = Object.keys(changedFiles);
           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 +318,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 1fc8ce1..f281b45 100644 (file)
           <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 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 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 a26edfd..c733736 100644 (file)
@@ -24,7 +24,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600;
-$plugin->requires  = 2015111000;
+$plugin->version   = 2016052300;
+$plugin->requires  = 2016051900;
 $plugin->component = 'tool_assignmentupgrade';
-$plugin->dependencies = array('mod_assign' => 2015111000);
+$plugin->dependencies = array('mod_assign' => 2016051900);
index 4598707..6c9f390 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
 $plugin->component = 'tool_availabilityconditions';
index 721b644..b4ddc77 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600;   // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000;   // Requires this Moodle version
+$plugin->version   = 2016052300;   // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900;   // Requires this Moodle version
 $plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
index 270be18..eb15c22 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2015111000; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics).
index e735f7e..08f00c9 100644 (file)
 
 $string['acohortroleassignmentssaved'] = '{$a} cohort role assignments were saved.';
 $string['assign'] = 'Assign';
-$string['assignroletocohort'] = 'Assign role to users in the context of all members of these cohorts';
-$string['backgroundsync'] = 'Note: Roles assigned on this page will not take affect immediately, the changes to role assignments will be made by a background task.';
+$string['assignroletocohort'] = 'Assign user-context roles to all cohort members';
+$string['backgroundsync'] = 'Note: New cohort role assignments will not take effect immediately. Role assignment changes will be made by a scheduled task.';
 $string['cohortroleassignmentremoved'] = 'The cohort role assignment was removed.';
 $string['cohortroleassignmentnotremoved'] = 'The cohort role assignment was not removed.';
 $string['cohortroles'] = 'Cohort roles';
 $string['existingcohortroles'] = 'Existing cohort role assignments';
-$string['managecohortroles'] = 'Assign user roles for entire cohort';
-$string['noassignableroles'] = 'No roles can be assigned at a user context level. <a href="../../roles/manage.php">Manage roles</a>';
+$string['managecohortroles'] = 'Assign user roles to cohort';
+$string['noassignableroles'] = 'There are currently no roles that can be assigned in the user context. <a href="../../roles/manage.php">Manage roles</a>';
 $string['nocohortroleassignmentssaved'] = 'No cohort role assignments were saved.';
 $string['onecohortroleassignmentsaved'] = 'One cohort role assignment was saved.';
 $string['pluginname'] = 'Cohort roles management';
index bf9fb21..36c53f3 100644 (file)
@@ -25,8 +25,8 @@
 defined('MOODLE_INTERNAL') || die();
 
 
-$plugin->version   = 2015111018; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2014110400; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_cohortroles'; // Full name of the plugin (used for diagnostics).
 
 $plugin->dependencies = array(
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 4f3c8db..e2b4192 100644 (file)
@@ -25,6 +25,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600;
-$plugin->requires  = 2015111000;
+$plugin->version   = 2016052300;
+$plugin->requires  = 2016051900;
 $plugin->component = 'tool_customlang'; // Full name of the plugin (used for diagnostics)
index 75b116a..57c8112 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2015111000; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_dbtransfer'; // Full name of the plugin (used for diagnostics).
index 582294e..7140400 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
 $plugin->component = 'tool_filetypes';
index 93bcf0e..3119367 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2015111600;
-$plugin->requires = 2015111000;
+$plugin->version = 2016052300;
+$plugin->requires = 2016051900;
 $plugin->component = 'tool_generator';
index c2c6f1d..e643668 100644 (file)
@@ -25,8 +25,8 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_health'; // Full name of the plugin (used for diagnostics)
 
 $plugin->maturity  = MATURITY_ALPHA; // this version's maturity level
index 76304f4..900370a 100644 (file)
@@ -25,6 +25,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_innodb'; // Full name of the plugin (used for diagnostics)
index 3c39b1b..ec774f4 100644 (file)
@@ -24,6 +24,6 @@
 defined('MOODLE_INTERNAL') || die();
 
 $plugin->component  = 'tool_installaddon';
-$plugin->version    = 2015111600;
-$plugin->requires   = 2015111000;
+$plugin->version    = 2016052300;
+$plugin->requires   = 2016051900;
 $plugin->maturity   = MATURITY_STABLE;
index b5d5839..846d206 100644 (file)
@@ -25,6 +25,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_langimport'; // Full name of the plugin (used for diagnostics)
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;
 }
index c474829..d041ec4 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
 $plugin->component = 'logstore_database'; // Full name of the plugin (used for diagnostics).
index c17eb5b..4c77f30 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
 $plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
index 4e23361..4834535 100644 (file)
@@ -53,5 +53,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
         upgrade_plugin_savepoint(true, 2016041200, 'logstore', 'standard');
     }
 
+    // Moodle v3.1.0 release upgrade line.
+    // Put any upgrade step following this.
+
     return true;
 }
index 2e482f4..c2a4cde 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2016041200; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
 $plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
index 0036126..0edfcb1 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires = 2015111000; // Requires this Moodle version.
+$plugin->version = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_log'; // Full name of the plugin (used for diagnostics).
index e11b466..674172f 100644 (file)
Binary files a/admin/tool/lp/amd/build/user_competency_course_navigation.min.js and b/admin/tool/lp/amd/build/user_competency_course_navigation.min.js differ
index 470bb5d..db4bfe4 100644 (file)
@@ -126,6 +126,7 @@ define(['jquery',
             try {
                 config = JSON.parse(self._competency.ruleconfig);
             } catch (e) {
+                // eslint-disable-line no-empty
             }
         }
 
index a7a43ba..bf61fe5 100644 (file)
@@ -75,8 +75,6 @@ define(['jquery'], function($) {
     UserCompetencyCourseNavigation.prototype._courseId = null;
     /** @type {String} Plugin base url. */
     UserCompetencyCourseNavigation.prototype._baseUrl = null;
-    /** @type {Boolean} Ignore the first change event for users. */
-    UserCompetencyCourseNavigation.prototype._ignoreFirstUser = null;
     /** @type {Boolean} Ignore the first change event for competencies. */
     UserCompetencyCourseNavigation.prototype._ignoreFirstCompetency = null;
 
index 71f4af2..412419d 100644 (file)
@@ -144,6 +144,8 @@ $string['nfiles'] = '{$a} file(s)';
 $string['noactivities'] = 'No activities';
 $string['nocompetencies'] = 'No competencies have been created in this framework.';
 $string['nocompetenciesincourse'] = 'No competencies have been linked to this course.';
+$string['nocompetenciesinevidence'] = 'No competencies have been linked to this evidence.';
+$string['nocompetenciesinlearningplan'] = 'No competencies have been linked to this learning plan.';
 $string['nocompetenciesintemplate'] = 'No competencies have been linked to this learning plan template.';
 $string['nocompetencyframeworks'] = 'No competency frameworks have been created yet.';
 $string['nocompetencyselected'] = 'No competency selected';
index b2e894d..870104e 100644 (file)
@@ -44,7 +44,7 @@ function tool_lp_extend_navigation_course($navigation, $course, $coursecontext)
                                             navigation_node::TYPE_SETTING,
                                             null,
                                             null,
-                                            new pix_icon('competency', '', 'tool_lp'));
+                                            new pix_icon('i/competencies', ''));
     if (isset($settingsnode)) {
         $navigation->add_node($settingsnode);
     }
@@ -129,7 +129,7 @@ function tool_lp_extend_navigation_category_settings($navigation, $coursecategor
                                                 navigation_node::TYPE_SETTING,
                                                 null,
                                                 null,
-                                                new pix_icon('competency', '', 'tool_lp'));
+                                                new pix_icon('i/competencies', ''));
         if (isset($settingsnode)) {
             $navigation->add_node($settingsnode);
         }
@@ -144,7 +144,7 @@ function tool_lp_extend_navigation_category_settings($navigation, $coursecategor
                                                 navigation_node::TYPE_SETTING,
                                                 null,
                                                 null,
-                                                new pix_icon('competency', '', 'tool_lp'));
+                                                new pix_icon('i/competencies', ''));
         if (isset($settingsnode)) {
             $navigation->add_node($settingsnode);
         }
diff --git a/admin/tool/lp/pix/competency.png b/admin/tool/lp/pix/competency.png
deleted file mode 100644 (file)
index 52fe956..0000000
Binary files a/admin/tool/lp/pix/competency.png and /dev/null differ
diff --git a/admin/tool/lp/pix/competency.svg b/admin/tool/lp/pix/competency.svg
deleted file mode 100644 (file)
index e5f670e..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="32"
-   height="32"
-   id="svg2"
-   version="1.1"
-   inkscape:version="0.48.4 r9939"
-   sodipodi:docname="New document 1" preserveAspectRatio="xMinYMid meet">
-  <defs
-     id="defs4" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="5.6"
-     inkscape:cx="32.609372"
-     inkscape:cy="35.818362"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     width="33px"
-     inkscape:window-width="1916"
-     inkscape:window-height="981"
-     inkscape:window-x="0"
-     inkscape:window-y="72"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata7">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(0,-1020.3622)">
-    <g
-       id="g3050"
-       transform="matrix(0.92121849,0,0,0.92121849,-35.507391,91.120599)">
-      <path
-         style="fill:#fafafa"
-         d="m 38.892857,1026.2908 0,-17 17,0 17,0 0,17 0,17 -17,0 -17,0 0,-17 z"
-         id="path3056"
-         inkscape:connector-curvature="0" />
-      <path
-         style="fill:#989898"
-         d="m 40.954049,1037.3439 c -3.465234,-3.0054 -1.687876,-4.0531 6.875853,-4.0531 6.919599,0 7.985143,0.2502 9.263277,2.1752 0.947236,1.4266 2.021632,1.9536 3.121972,1.5314 1.37559,-0.5279 1.677706,-2.0754 1.677706,-8.5934 0,-4.3723 0.273145,-8.6614 0.606989,-9.5314 0.509481,-1.3277 -0.303204,-1.5818 -5.059017,-1.5818 -3.522693,0 -5.432219,-0.3783 -5.047972,-1 1.028329,-1.6639 14.737848,-1.2221 17.277494,0.5567 3.593622,2.5171 2.823056,4.4433 -1.777494,4.4433 l -4,0 0,7.345 c 0,9.8743 -0.892111,10.655 -12.175731,10.655 -7.005509,0 -8.916904,-0.3458 -10.763077,-1.9469 z m 3.938808,-10.6589 c 0,-2.9538 0.324365,-3.3942 2.5,-3.3942 2.153991,0 2.499902,0.4498 2.499294,3.25 -6e-4,2.7611 -0.376693,3.2717 -2.5,3.3942 -2.203157,0.1271 -2.499294,-0.2579 -2.499294,-3.25 z m 7.428571,-1.3942 c 0,-1.6931 0.666667,-2 4.344732,-2 5.000845,0 4.927087,1.9191 -0.08232,2.1419 -3.011559,0.1339 -2.966069,0.1822 0.809017,0.8581 l 4,0.7162 -4.535714,0.1419 c -3.91635,0.1225 -4.535715,-0.1312 -4.535715,-1.8581 z m -6.761904,-3.6667 c -1.167788,-1.1678 -0.718106,-4.0457 0.833333,-5.3333 1.846181,-1.5322 4.5,0.2461 4.5,3.0155 0,2.2918 -3.735778,3.9154 -5.333333,2.3178 z m 6.833333,-0.3333 c 0.339919,-0.55 2.139919,-1 4,-1 1.860081,0 3.660081,0.45 4,1 0.377944,0.6115 -1.175955,1 -4,1 -2.824045,0 -4.377944,-0.3885 -4,-1 z"
-         id="path3054"
-         inkscape:connector-curvature="0" />
-      <path
-         style="fill:#5e5e5e"
-         d="m 40.892857,1036.2908 c -1.027328,-1.9196 -0.76049,-2 6.636076,-2 5.863885,0 8.157677,0.4084 9.593719,1.708 1.429812,1.2939 2.297278,1.4506 3.578741,0.6463 1.318167,-0.8273 1.801811,-3.0713 2.191464,-10.1678 l 0.5,-9.1062 -5.5,-0.351 c -4.40263,-0.2811 -3.893849,-0.3889 2.55,-0.5402 5.16365,-0.1213 8.480263,0.2412 9.25,1.0109 2.011735,2.0117 1.364232,2.8 -2.3,2.8 l -3.5,0 0,7.0657 c 0,10.7479 -0.204518,10.9343 -12,10.9343 -8.906177,0 -10.039956,-0.2061 -11,-2 z m 5.078947,-9.0357 c -0.06465,-2.8954 0.283272,-3.5357 1.921053,-3.5357 1.608782,0 2,0.6666 2,3.4081 0,2.8111 -0.245749,3.2042 -1.402754,2.244 -1.077175,-0.894 -1.523051,-0.8644 -1.921053,0.1276 -0.285064,0.7104 -0.553825,-0.2994 -0.597246,-2.244 z m 8.682712,-0.6716 c 1.243913,-0.2392 3.043913,-0.2301 4,0.02 0.956088,0.2503 -0.06166,0.446 -2.261659,0.4349 -2.2,-0.011 -2.982253,-0.2159 -1.738341,-0.4551 z m 0,-3 c 1.243913,-0.2392 3.043913,-0.2301 4,0.02 0.956088,0.2503 -0.06166,0.446 -2.261659,0.4349 -2.2,-0.011 -2.982253,-0.2159 -1.738341,-0.4551 z m 0,-2 c 1.243913,-0.2392 3.043913,-0.2301 4,0.02 0.956088,0.2503 -0.06166,0.446 -2.261659,0.4349 -2.2,-0.011 -2.982253,-0.2159 -1.738341,-0.4551 z m -9.205886,-1.2025 c -0.810187,-1.3109 0.447721,-4.0902 1.851216,-4.0902 1.828446,0 3.499178,2.081 2.907877,3.6219 -0.592966,1.5452 -3.892838,1.87 -4.759093,0.4683 z"
-         id="path3052"
-         inkscape:connector-curvature="0" />
-    </g>
-  </g>
-</svg>
index fab384d..39d4e6e 100644 (file)
@@ -6,13 +6,14 @@
 }
 .path-admin-tool-lp .progresstext {
     display: inline-block;
-    height: 40px;
     vertical-align: top;
 }
 .path-admin-tool-lp .progress {
     width: 100%;
     display: inline-block;
-    margin-right: 2em;
+}
+.path-admin-tool-lp .progress .bar {
+    min-width: 3em;
 }
 .dir-rtl.path-admin-tool-lp .progress .bar {
     float: right;
 .path-admin-tool-lp [data-region="competencylinktree"] select {
     width: 100%;
 }
+.path-admin-tool-lp [data-region] .generaltable.fullwidth {
+    clear: both;
+}
 
 .path-admin-tool-lp .competency-rule-points {
     margin-top: 10px;
@@ -220,6 +224,10 @@ input[type="checkbox"].tool_lp_scale_proficient {
 .user-competency-course-navigation {
     width: 240px;
 }
+.user-competency-course-navigation span {
+    max-width: 100%;
+    overflow: hidden;
+}
 
 /** Competency grader */
 .competency-grader textarea {
index 963f019..674eed6 100644 (file)
 </tbody>
 </table>
 {{^competencies}}
-<p class="alert-info">
+<p class="alert alert-info">
     {{#str}}nocompetenciesincourse, tool_lp{{/str}}
 </p>
 {{/competencies}}
index e57159b..437bd53 100644 (file)
 {{#competencycount}}
 <div data-region="coursecompetencystatistics" class="well">
     {{#canbegradedincourse}}
-    <div class="clearfix">
-        <div class="span6">
-            <div class="progresstext">
+        {{< tool_lp/progress_bar}}
+            {{$progresstext}}
                 {{#str}}xcompetenciesproficientoutofyincourse, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
-            </div>
-        </div>
-        <div class="span6">
-            <span class="pull-right label label-info">{{proficientcompetencypercentageformatted}} %</span>
-            <div class="progress">
-                <div class="bar" style="width: {{proficientcompetencypercentage}}%;"></div>
-            </div>
-        </div>
-    </div>
+            {{/progresstext}}
+            {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
+            {{$percentlabel}}{{proficientcompetencypercentageformatted}}&nbsp;%{{/percentlabel}}
+        {{/tool_lp/progress_bar}}
     {{/canbegradedincourse}}
     {{#canmanagecoursecompetencies}}
     {{#leastproficientcount}}
index 93c7605..a901f4a 100644 (file)
@@ -34,7 +34,7 @@
     * navigation - array of strings containing buttons for navigation
 }}
 <div data-region="managecompetencies">
-<div class="btn-group pull-left">
+<div class="pull-left">
     {{#navigation}}
     {{{.}}}
     {{/navigation}}
@@ -86,7 +86,7 @@
     </tbody>
 </table>
 {{^competencyframeworks}}
-<p class="alert-info">
+<p class="alert alert-info">
     {{#str}}nocompetencyframeworks, tool_lp{{/str}}
 </p>
 {{/competencyframeworks}}
index bb5fc34..fbe00d6 100644 (file)
@@ -32,7 +32,7 @@
     * navigation - array of strings containing buttons for navigation
 }}
 <div data-region="managetemplates">
-<div class="btn-group pull-left">
+<div class="pull-left">
     {{#navigation}}
     {{{.}}}
     {{/navigation}}
@@ -98,7 +98,7 @@
     </tbody>
 </table>
 {{^templates}}
-<p class="alert-info">
+<p class="alert alert-info">
     {{#str}}notemplates, tool_lp{{/str}}
 </p>
 {{/templates}}
index d93b418..40eced3 100644 (file)
@@ -1,3 +1,3 @@
-<p class="alert-error">
+<p class="alert alert-error">
     {{#str}}nocompetencyframeworks, tool_lp{{/str}}
 </p>
index ee25b5c..20eb2bb 100644 (file)
             {{/description}}
             <dt>{{#str}}progress, tool_lp{{/str}}</dt>
             <dd>
-                <div class="span4">
-                    <div class="progresstext">
-                        {{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
-                    </div>
-                </div>
-                <div class="span4">
-                    <span class="pull-right label label-info">{{proficientcompetencypercentageformatted}} %</span>
-                    <div class="progress">
-                        <div class="bar" style="width: {{proficientcompetencypercentage}}%;"></div>
-                    </div>
-                </div>
+            {{< tool_lp/progress_bar}}
+                {{$progresstext}}
+                    {{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
+                {{/progresstext}}
+                {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
+                {{$percentlabel}}{{proficientcompetencypercentageformatted}}&nbsp;%{{/percentlabel}}
+            {{/tool_lp/progress_bar}}
             </dd>
         </dl>
     </div>
                 {{/competencies}}
             </tbody>
         </table>
+        {{^competencies}}
+            <p class="alert alert-info">
+                {{#str}}nocompetenciesinlearningplan, tool_lp{{/str}}
+            </p>
+        {{/competencies}}
     </div>
 </div>
 {{#js}}
index 935b76a..94226c9 100644 (file)
@@ -34,7 +34,7 @@
 }}
 
 <div data-region="plans">
-<div class="btn-group pull-left">
+<div class="pull-left">
     {{#navigation}}
     {{{.}}}
     {{/navigation}}
 </table>
 
 {{^plans}}
-<p class="alert-info">
+<p class="alert alert-info">
     {{#str}}nouserplans, tool_lp{{/str}}
 </p>
 {{/plans}}
diff --git a/admin/tool/lp/templates/progress_bar.mustache b/admin/tool/lp/templates/progress_bar.mustache
new file mode 100644 (file)
index 0000000..118f761
--- /dev/null
@@ -0,0 +1,57 @@
+{{!
+    This file is part of Moodle - http://moodle.org/
+
+    Moodle is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    Moodle is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+    @template tool_lp/progress_bar
+
+    Moodle progress bar template for tool_lp.
+
+    The purpose of this template is to render a progress bar with a brief description.
+    Inherits core/columns-1to2.
+
+    Classes required for JS:
+    * none
+
+    Data attributes required for JS:
+    * none
+
+    Context variables required for this template:
+    * progresstextvalue A brief text that describes the progress bar.
+    * percentagevalue The numeric value for the progress bar's percentage.
+    * percentlabelvalue The progress bar's label that shows the percentage value.
+
+    Example context (json):
+    {
+        "progresstextvalue": "Progress:",
+        "percentagevalue": "50",
+        "percentlabelvalue": "50.00 %"
+    }
+
+}}
+<div class="row-fluid rtl-compatible">
+    <div class="span4">
+        <div class="progresstext">
+            {{$progresstext}}{{progresstextvalue}}{{/progresstext}}
+        </div>
+    </div>
+    <div class="span8">
+        <div class="progress">
+            <div class="bar" style="width: {{$percentage}}{{percentagevalue}}{{/percentage}}%;" role="progressbar" aria-valuenow="{{$percentage}}{{percentagevalue}}{{/percentage}}" aria-valuemin="0" aria-valuemax="100">
+                {{$percentlabel}}{{percentlabelvalue}}{{/percentlabel}}
+            </div>
+        </div>
+    </div>
+</div>
index ba31740..a2ebaef 100644 (file)
@@ -68,7 +68,7 @@
             </div>
         </div>
         {{^competencies}}
-        <p class="alert-info">
+        <p class="alert alert-info">
             {{#str}}nocompetenciesintemplate, tool_lp{{/str}}
         </p>
         {{/competencies}}
index 0a8bdae..91b4512 100644 (file)
 }}
 {{#competencycount}}
 <div data-region="templatestatistics" class="well">
-    <div class="clearfix">
-        <div class="span4">
-            <div class="progresstext">
-                {{#str}}xcompetencieslinkedoutofy, tool_lp, { "x": "{{linkedcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
-            </div>
-        </div>
-        <div class="span6">
-            <span class="pull-right label label-info">{{linkedcompetencypercentageformatted}} %</span>
-            <div class="progress">
-                <div class="bar" style="width: {{linkedcompetencypercentage}}%;"></div>
-            </div>
-        </div>
-    </div>
+    {{< tool_lp/progress_bar}}
+        {{$progresstext}}
+            {{#str}}xcompetencieslinkedoutofy, tool_lp, { "x": "{{linkedcompetencycount}}", "y": "{{competencycount}}" } {{/str}}
+        {{/progresstext}}
+        {{$percentage}}{{linkedcompetencypercentage}}{{/percentage}}
+        {{$percentlabel}}{{linkedcompetencypercentageformatted}}&nbsp;%{{/percentlabel}}
+    {{/tool_lp/progress_bar}}
     {{#plancount}}
-    <div class="clearfix">
-        <div class="span4">
-            <div class="progresstext">
+        {{< tool_lp/progress_bar}}
+            {{$progresstext}}
                 {{#str}}xplanscompletedoutofy, tool_lp, { "x": "{{completedplancount}}", "y": "{{plancount}}" } {{/str}}
-            </div>
-        </div>
-        <div class="span6">
-            <span class="pull-right label label-info">{{completedplanpercentageformatted}} %</span>
-            <div class="progress">
-                <div class="bar" style="width: {{completedplanpercentage}}%;">
-
-                </div>
-            </div>
-        </div>
-    </div>
+            {{/progresstext}}
+            {{$percentage}}{{completedplanpercentage}}{{/percentage}}
+            {{$percentlabel}}{{completedplanpercentageformatted}}&nbsp;%{{/percentlabel}}
+        {{/tool_lp/progress_bar}}
     {{/plancount}}
     {{#usercompetencyplancount}}
-    <div  class="clearfix">
-        <div class="span4">
-            <div class="progresstext">
+        {{< tool_lp/progress_bar}}
+            {{$progresstext}}
                 {{#str}}averageproficiencyrate, tool_lp, {{proficientusercompetencyplanpercentageformatted}} {{/str}}
-            </div>
-        </div>
-        <div class="span6">
-            <span class="pull-right label label-info">{{proficientusercompetencyplanpercentageformatted}} %</span>
-            <div class="progress">
-                <div class="bar" style="width: {{proficientusercompetencyplanpercentage}}%;"></div>
-            </div>
-        </div>
-    </div>
+            {{/progresstext}}
+            {{$percentage}}{{proficientusercompetencyplanpercentage}}{{/percentage}}
+            {{$percentlabel}}{{proficientusercompetencyplanpercentageformatted}}&nbsp;%{{/percentlabel}}
+        {{/tool_lp/progress_bar}}
     {{/usercompetencyplancount}}
     {{#leastproficientcount}}
     <div>
index 4be2d6f..9097caa 100644 (file)
@@ -64,7 +64,7 @@
         <dt>{{#str}}rating, tool_lp{{/str}}</dt>
         <dd>{{gradename}}
             {{#cangrade}}
-                <buttn class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
+                <button class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
             {{/cangrade}}
         </dd>
         {{#js}}
index 0d05efc..03f63e4 100644 (file)
@@ -75,7 +75,7 @@
         <dt>{{#str}}rating, tool_lp{{/str}}</dt>
         <dd>{{gradename}}
             {{#cangrade}}
-                <buttn class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
+                <button class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
             {{/cangrade}}
         </dd>
         {{/usercompetencycourse}}
index 18b501b..a0e14bf 100644 (file)
@@ -33,7 +33,7 @@
 }}
 
 <div data-region="user-evidence-list">
-<div class="btn-group pull-left">
+<div class="pull-left">
     {{#navigation}}
         {{{.}}}
     {{/navigation}}
 </table>
 
 {{^evidence}}
-    <p class="alert-info">{{#str}}nouserevidence, tool_lp{{/str}}</p>
+    <p class="alert alert-info">{{#str}}nouserevidence, tool_lp{{/str}}</p>
 {{/evidence}}
 
 </div>
index e0582b2..29f28cf 100644 (file)
                 {{/usercompetencies}}
             </tbody>
         </table>
+        {{^usercompetencies}}
+            <p class="alert alert-info">
+                {{#str}}nocompetenciesinevidence, tool_lp{{/str}}
+            </p>
+        {{/usercompetencies}}
     </div>
 </div>
 
diff --git a/admin/tool/lp/upgrade.txt b/admin/tool/lp/upgrade.txt
new file mode 100644 (file)
index 0000000..4e41971
--- /dev/null
@@ -0,0 +1,10 @@
+This files describes changes in /admin/tool/lp/* - plugins,
+information provided here is intended especially for developers.
+
+=== 3.2 ===
+
+* The icon 'competency.png/svg' has been removed, please use i/competencies instead.
+
+=== 3.1.1 ===
+
+* The plugin icon 'competency.png/svg' will be removed in the future use i/competencies instead.
index f409b47..de0a106 100644 (file)
@@ -25,6 +25,6 @@
 defined('MOODLE_INTERNAL') || die();
 
 
-$plugin->version   = 2016050400; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2014110400; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics).
index 8c3976b..235f48e 100644 (file)
@@ -24,8 +24,8 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2016022401; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2014110400; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_lpmigrate'; // Full name of the plugin (used for diagnostics).
 $plugin->dependencies = array(
     'tool_lp' => ANY_VERSION
index 839e1d4..4932076 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600;
-$plugin->requires  = 2015111000;
+$plugin->version   = 2016052300;
+$plugin->requires  = 2016051900;
 $plugin->component = 'tool_messageinbound';
index c4ff370..1dbe965 100644 (file)
@@ -62,7 +62,7 @@ class api {
                         'component' => $component,
                         'version' => $version,
                         'addon' => $addonname,
-                        'dependencies' => !empty($addon['dependencies']) ? $addoninfo['dependencies'] : array(),
+                        'dependencies' => !empty($addoninfo['dependencies']) ? $addoninfo['dependencies'] : array(),
                         'fileurl' => '',
                         'filehash' => '',
                         'filesize' => 0
index 8028385..0efc6e1 100644 (file)
@@ -23,6 +23,6 @@
  */
 
 defined('MOODLE_INTERNAL') || die();
-$plugin->version   = 2016032401; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2016032400.00; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
index f02556d..9f8e53b 100644 (file)
@@ -59,5 +59,8 @@ function xmldb_tool_monitor_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 4962e90..c078165 100644 (file)
@@ -26,6 +26,6 @@
 
 defined('MOODLE_INTERNAL') || die;
 
-$plugin->version   = 2015111600;     // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2015111000;     // Requires this Moodle version.
+$plugin->version   = 2016052300;     // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900;     // Requires this Moodle version.
 $plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
index 15274f8..554aaa0 100644 (file)
@@ -25,7 +25,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_multilangupgrade'; // Full name of the plugin (used for diagnostics)
 
index 197eb06..878297a 100644 (file)
@@ -24,7 +24,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_phpunit'; // Full name of the plugin (used for diagnostics)
 
index 9b9e96e..e9de840 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
index b711511..227d96c 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2016030200; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2015111000; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).
index 81f0102..26fe31a 100644 (file)
@@ -25,8 +25,8 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_replace'; // Full name of the plugin (used for diagnostics)
 
 $plugin->maturity  = MATURITY_ALPHA; // this version's maturity level
index 63ee126..cf021d3 100644 (file)
@@ -25,7 +25,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600;
-$plugin->requires  = 2015111000;
+$plugin->version   = 2016052300;
+$plugin->requires  = 2016051900;
 $plugin->component = 'tool_spamcleaner'; // Full name of the plugin (used for diagnostics)
 
index dcca7a3..9e87a95 100644 (file)
@@ -24,7 +24,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_task'; // Full name of the plugin (used for diagnostics)
 
index b9577a1..9f4a6c2 100644 (file)
@@ -21,6 +21,6 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 defined('MOODLE_INTERNAL') || die();
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2015111000; // Requires this Moodle version.
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900; // Requires this Moodle version.
 $plugin->component = 'tool_templatelibrary'; // Full name of the plugin (used for diagnostics).
index f146b7e..c22aea6 100644 (file)
@@ -25,7 +25,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_unsuproles'; // Full name of the plugin (used for diagnostics)
 
index a45923c..fe0225d 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600;            // The current plugin version (Date: YYYYMMDDXX).
-$plugin->requires  = 2015111000;            // Requires this Moodle version.
+$plugin->version   = 2016052300;            // The current plugin version (Date: YYYYMMDDXX).
+$plugin->requires  = 2016051900;            // Requires this Moodle version.
 $plugin->component = 'tool_uploadcourse';   // Full name of the plugin (used for diagnostics).
index 9259420..e2a4ba0 100644 (file)
@@ -25,7 +25,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_uploaduser'; // Full name of the plugin (used for diagnostics)
 
index 5dc9b04..4afc779 100644 (file)
@@ -24,7 +24,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2015111600; // The current plugin version (Date: YYYYMMDDXX)
-$plugin->requires  = 2015111000; // Requires this Moodle version
+$plugin->version   = 2016052300; // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2016051900; // Requires this Moodle version
 $plugin->component = 'tool_xmldb'; // Full name of the plugin (used for diagnostics)
 
index 62a4d29..751a75b 100644 (file)
@@ -24,7 +24,6 @@ if ($data = $action_form->get_data()) {
         case 3: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_delete.php');
         case 4: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_display.php');
         case 5: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_download.php');
-        //case 6: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_enrol.php'); //TODO: MDL-24064
         case 7: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_forcepasswordchange.php');
         case 8: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_cohortadd.php');
     }
diff --git a/admin/user/user_bulk_enrol.php b/admin/user/user_bulk_enrol.php
deleted file mode 100644 (file)
index 21ad105..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-/**
-* script for bulk user multi enrol operations
-*/
-
-die('this needs to be rewritten to use new enrol framework, sorry');  //TODO: MDL-24064
-
-require_once('../../config.php');
-require_once($CFG->libdir.'/adminlib.php');
-$processed = optional_param('processed', '', PARAM_BOOL);
-$sort = optional_param('sort', 'fullname', PARAM_ALPHA); //Sort by full name
-$dir  = optional_param('dir', 'asc', PARAM_ALPHA);       //Order to sort (ASC)
-
-require_login();
-admin_externalpage_setup('userbulk');
-require_capability('moodle/role:assign', context_system::instance()); //TODO: use some enrol cap
-$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
-//If no users selected then return to user_bulk.php
-if (empty($SESSION->bulk_users)) {
-    redirect($return);
-}
-$users = $SESSION->bulk_users; //Get users to display
-$usertotal = get_users(false); //Total number of users registered
-$usercount = count($users);    //number of users
-
-echo $OUTPUT->header();
-
-//take user info
-foreach ($users as $key => $id) {
-    $user = $DB->get_record('user', array('id'=>$id));
-    $user->fullname = fullname($user, true);
-    unset($user->firstname);
-    unset($user->lastname);
-    $users[$key] = $user;
-}
-
-// Need to sort by date
-function sort_compare($a, $b) {
-    global $sort, $dir;
-    if($sort == 'lastaccess') {
-        $rez = $b->lastaccess - $a->lastaccess;
-    } else {
-        $rez = strcasecmp(@$a->$sort, @$b->$sort);
-    }
-    return $dir == 'desc' ? -$rez : $rez;
-}
-usort($users, 'sort_compare');
-
-//Take courses data (id, shortname, and fullname)
-$courses = get_courses_page(1, 'c.sortorder ASC', 'c.id,c.shortname,c.fullname,c.visible', $totalcount);
-$table = new html_table();
-$table->width = "95%";
-$columns = array('fullname');
-foreach ($courses as $v)
-{
-    $columns[] = $v->shortname;
-}
-
-//Print columns headers from table
-foreach ($columns as $column) {
-    $strtitle = $column;
-    if ($sort != $column) {
-        $columnicon = '';
-        $columndir = 'asc';
-    } else {
-        $columndir = ($dir == 'asc') ? 'desc' : 'asc';
-        $columnicon = ' <img src="'.$OUTPUT->pix_url('t/'.($dir == 'asc' ? 'down' : 'up' )).'" alt="" />';
-    }
-    $table->head[] = '<a href="user_bulk_enrol.php?sort='.$column.'&amp;dir='.$columndir.'">'.$strtitle.'</a>'.$columnicon;
-    $table->align[] = 'left';
-}
-
-// process data submitting
-if(!empty($processed)) {
-    //Process data form here
-    $total = count($courses) * count($users);
-
-    for ( $i = 0; $i < $total; $i++ )
-    {
-        $param = "selected".$i;
-        $info = optional_param($param, '', PARAM_SEQUENCE);
-        /**
-         * user id:    ids[0]
-         * course id:  ids[1]
-         * enrol stat: ids[2]
-         */
-        $ids = explode(',', $info);
-        if(!empty($ids[2])) {
-            $context = context_course::instance($ids[1]);
-            role_assign(5, $ids[0], $context->id); //TODO: horrible!!
-        } else {
-            if( empty($ids[1] ) ) {
-                continue;
-            }
-            $context = context_course::instance($ids[1]);
-            role_unassign(5, $ids[0], $context->id);
-        }
-    }
-    redirect($return, get_string('changessaved')); //TODO: horrible!!
-}
-
-//Form beginning
-echo '<form id="multienrol" name="multienrol" method="post" action="user_bulk_enrol.php">';
-echo '<input type="hidden" name="processed" value="yes" />';
-$count = 0;
-foreach($users as $user) {
-    $temparray = array (
-        '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.SITEID.'">'.$user->fullname.'</a>'
-    );
-    $mycourses = enrol_get_users_courses($user->id, false);
-    foreach($courses as $acourse) {
-        $state = '';
-        if (isset($mycourses[$acourse->id])) {
-            $state = 'checked="checked"';
-        }
-        $temparray[] = '<input type="hidden" name="selected' . $count .
-                '" value="' . $user->id . ',' . $acourse->id . ',0" />' .
-                '<input type="checkbox" name="selected' . $count .
-                '" value="' . $user->id . ',' . $acourse->id . ',1" ' . $state . '/>';
-        $count++;
-    }
-    $table->data[] = $temparray;
-}
-echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users'));
-echo html_writer::table($table);
-echo '<div class="continuebutton">';
-echo '<input type="submit" name="multienrolsubmit" value="save changes" />';
-echo '</div>';
-echo '</form>';
-
-echo $OUTPUT->footer();
index 0f7c25c..dd410f4 100644 (file)
@@ -24,10 +24,6 @@ class user_bulk_action_form extends moodleform {
         if (has_capability('moodle/user:update', $syscontext)) {
             $actions[5] = get_string('download', 'admin');
         }
-        if (has_capability('moodle/role:assign', $syscontext)){
-             //TODO: MDL-24064
-            //$actions[6] = get_string('enrolmultipleusers', 'admin');
-        }
         if (has_capability('moodle/user:update', $syscontext)) {
             $actions[7] = get_string('forcepasswordchange');
         }
index d421185..22fcb7b 100644 (file)
@@ -52,5 +52,8 @@ function xmldb_auth_cas_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;
 }