Merge branch 'MDL-55566_m32v1' of https://github.com/sbourget/moodle
authorDavid Monllao <davidm@moodle.com>
Fri, 18 Nov 2016 01:05:13 +0000 (09:05 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 18 Nov 2016 01:05:13 +0000 (09:05 +0800)
691 files changed:
.eslintignore
.stylelintignore
admin/category.php
admin/environment.xml
admin/index.php
admin/media.php [new file with mode: 0644]
admin/message.php
admin/mnet/peer_forms.php
admin/mnet/peers.php
admin/mnet/profilefields.php
admin/mnet/services.php
admin/roles/admins.php
admin/roles/allow.php
admin/roles/assign.php
admin/roles/check.php
admin/roles/classes/define_role_table_advanced.php
admin/roles/classes/define_role_table_basic.php
admin/roles/classes/permissions_table.php
admin/roles/define.php
admin/roles/module.js
admin/roles/override.php
admin/settings/appearance.php
admin/settings/plugins.php
admin/settings/security.php
admin/tool/behat/cli/run.php
admin/tool/behat/tests/behat/get_and_set_fields.feature
admin/tool/behat/tests/behat/nasty_strings.feature
admin/tool/langimport/classes/controller.php
admin/tool/lp/amd/build/menubar.min.js
admin/tool/lp/amd/src/menubar.js
admin/tool/lp/classes/external/cohort_summary_exporter.php
admin/tool/lp/classes/form/framework_autocomplete.php
admin/tool/lp/classes/output/manage_competency_frameworks_page.php
admin/tool/lp/lang/en/tool_lp.php
admin/tool/lp/lib.php
admin/tool/lp/styles.css
admin/tool/lp/templates/action_selector.mustache
admin/tool/lp/templates/comment_area.mustache
admin/tool/lp/templates/competencies_move_tree.mustache
admin/tool/lp/templates/competencies_tree.mustache
admin/tool/lp/templates/competencies_tree_root.mustache
admin/tool/lp/templates/competency_grader.mustache
admin/tool/lp/templates/competency_path.mustache
admin/tool/lp/templates/competency_picker.mustache
admin/tool/lp/templates/competency_picker_competencyform.mustache
admin/tool/lp/templates/competency_picker_user_plans.mustache
admin/tool/lp/templates/competency_plan_navigation.mustache
admin/tool/lp/templates/competency_rule_config.mustache
admin/tool/lp/templates/competency_rule_points.mustache
admin/tool/lp/templates/competency_summary.mustache
admin/tool/lp/templates/course_competencies_page.mustache
admin/tool/lp/templates/course_competency_settings.mustache
admin/tool/lp/templates/course_competency_statistics.mustache
admin/tool/lp/templates/evidence_summary.mustache
admin/tool/lp/templates/linked_courses_summary.mustache
admin/tool/lp/templates/manage_competencies_page.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/related_competencies.mustache
admin/tool/lp/templates/scale_configuration_page.mustache
admin/tool/lp/templates/template_competencies_page.mustache
admin/tool/lp/templates/template_statistics.mustache
admin/tool/lp/templates/user_competency_course_navigation.mustache
admin/tool/lp/templates/user_competency_summary.mustache
admin/tool/lp/templates/user_competency_summary_in_course.mustache
admin/tool/lp/templates/user_competency_summary_in_plan.mustache
admin/tool/lp/templates/user_evidence_list_page.mustache
admin/tool/lp/templates/user_evidence_page.mustache
admin/tool/lp/tests/behat/behat_tool_lp.php
admin/tool/lpimportcsv/classes/form/import.php
admin/tool/lpimportcsv/lang/en/tool_lpimportcsv.php
admin/tool/lpmigrate/tests/processor_test.php
admin/tool/mobile/classes/api.php
admin/tool/mobile/classes/external.php
admin/tool/mobile/lang/en/tool_mobile.php
admin/tool/mobile/launch.php
admin/tool/mobile/settings.php
admin/tool/mobile/tests/externallib_test.php
admin/tool/monitor/index.php
admin/tool/recyclebin/lib.php
admin/tool/recyclebin/tests/behat/backup_user_data.feature
admin/tool/recyclebin/tests/behat/basic_functionality.feature
admin/tool/recyclebin/tests/course_bin_test.php
admin/tool/templatelibrary/amd/build/search.min.js
admin/tool/templatelibrary/amd/src/search.js
admin/tool/usertours/amd/build/popper.min.js
admin/tool/usertours/amd/build/tour.min.js
admin/tool/usertours/amd/src/popper.js
admin/tool/usertours/amd/src/tour.js
admin/tool/usertours/classes/manager.php
admin/tool/usertours/lang/en/tool_usertours.php
admin/tool/usertours/thirdpartylibs.xml
admin/upgradesettings.php
auth/email/auth.php
auth/email/classes/external.php
auth/upgrade.txt
availability/classes/tree_node.php
availability/condition/completion/classes/frontend.php
availability/condition/completion/tests/behat/conditional_bug.feature
availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-debug.js
availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form-min.js
availability/condition/completion/yui/build/moodle-availability_completion-form/moodle-availability_completion-form.js
availability/condition/completion/yui/src/form/js/form.js
availability/condition/date/classes/frontend.php
availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-debug.js
availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form-min.js
availability/condition/date/yui/build/moodle-availability_date-form/moodle-availability_date-form.js
availability/condition/date/yui/src/form/js/form.js
availability/condition/grade/classes/frontend.php
availability/condition/grade/tests/behat/availability_grade.feature
availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-debug.js
availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form-min.js
availability/condition/grade/yui/build/moodle-availability_grade-form/moodle-availability_grade-form.js
availability/condition/grade/yui/src/form/js/form.js
availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-debug.js
availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form-min.js
availability/condition/group/yui/build/moodle-availability_group-form/moodle-availability_group-form.js
availability/condition/group/yui/src/form/js/form.js
availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-debug.js
availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form-min.js
availability/condition/grouping/yui/build/moodle-availability_grouping-form/moodle-availability_grouping-form.js
availability/condition/grouping/yui/src/form/js/form.js
availability/condition/profile/yui/build/moodle-availability_profile-form/moodle-availability_profile-form-debug.js
availability/condition/profile/yui/build/moodle-availability_profile-form/moodle-availability_profile-form-min.js
availability/condition/profile/yui/build/moodle-availability_profile-form/moodle-availability_profile-form.js
availability/condition/profile/yui/src/form/js/form.js
availability/tests/tree_test.php
availability/yui/build/moodle-core_availability-form/moodle-core_availability-form-debug.js
availability/yui/build/moodle-core_availability-form/moodle-core_availability-form-min.js
availability/yui/build/moodle-core_availability-form/moodle-core_availability-form.js
availability/yui/src/form/js/form.js
backup/util/dbops/backup_plan_dbops.class.php
backup/util/loggers/base_logger.class.php
backup/util/ui/renderer.php
backup/util/ui/tests/behat/behat_backup.php
badges/tests/badgeslib_test.php
blocks/login/block_login.php
blocks/recent_activity/tests/behat/structural_changes.feature
blog/index.php
blog/rsslib.php
cache/stores/redis/lang/en/cachestore_redis.php
calendar/classes/export_form.php
calendar/lib.php
calendar/tests/lib_test.php
competency/classes/user_competency_plan.php
completion/tests/behat/restrict_activity_by_grade.feature
completion/tests/behat/restrict_section_availability.feature
composer.json
composer.lock
course/classes/task/course_delete_modules.php [new file with mode: 0644]
course/editsection.php
course/externallib.php
course/lib.php
course/rest.php
course/tests/behat/activities_edit_completion.feature
course/tests/behat/category_management.feature
course/tests/courselib_test.php
course/upgrade.txt
enrol/manual/yui/quickenrolment/assets/skins/sam/quickenrolment.css
enrol/manual/yui/quickenrolment/quickenrolment.js
enrol/meta/locallib.php
enrol/self/lang/en/enrol_self.php
enrol/yui/rolemanager/rolemanager.js
filter/mediaplugin/dev/perftest.php
filter/mediaplugin/filter.php
filter/mediaplugin/lang/en/filter_mediaplugin.php
filter/mediaplugin/settings.php [new file with mode: 0644]
filter/mediaplugin/styles.css
filter/mediaplugin/tests/filter_test.php
grade/grading/form/guide/tests/behat/edit_guide.feature
grade/grading/tests/behat/behat_grading.php
grade/lib.php
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-min.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js
grade/report/grader/yui/src/gradereporttable/js/floatingheaders.js
grade/report/singleview/tests/behat/bulk_insert_grades.feature
grade/tests/behat/grade_point_maximum.feature
grade/tests/behat/grade_scales.feature
grade/tests/behat/grade_single_item_scales.feature
group/index.php
index.php
install/lang/da/admin.php
install/lang/da/error.php
install/lang/da/install.php
install/lang/kab/langconfig.php [new file with mode: 0644]
lang/en/admin.php
lang/en/cache.php
lang/en/calendar.php
lang/en/deprecated.txt
lang/en/error.php
lang/en/grades.php
lang/en/media.php
lang/en/message.php
lang/en/moodle.php
lang/en/plugin.php
lang/en/role.php
lang/en/webservice.php
lib/accesslib.php
lib/adminlib.php
lib/ajax/service.php
lib/amd/build/backoff_timer.min.js [new file with mode: 0644]
lib/amd/build/chart_output_chartjs.min.js
lib/amd/src/backoff_timer.js [new file with mode: 0644]
lib/amd/src/chart_output_chartjs.js
lib/badgeslib.php
lib/behat/classes/partial_named_selector.php
lib/classes/component.php
lib/classes/files/curl_security_helper.php [new file with mode: 0644]
lib/classes/files/curl_security_helper_base.php [new file with mode: 0644]
lib/classes/filetypes.php
lib/classes/plugin_manager.php
lib/classes/plugininfo/media.php [new file with mode: 0644]
lib/classes/plugininfo/theme.php
lib/classes/plugininfo/webservice.php
lib/classes/session/manager.php
lib/classes/session/redis.php
lib/classes/upgrade/util.php
lib/classes/useragent.php
lib/completionlib.php
lib/configonlylib.php
lib/coursecatlib.php
lib/db/caches.php
lib/db/install.php
lib/db/install.xml
lib/db/upgrade.php
lib/deprecatedlib.php
lib/editor/atto/plugins/image/styles.css
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/js/editor.js
lib/editor/tinymce/plugins/moodlemedia/preview.php
lib/editor/tinymce/styles.css
lib/environmentlib.php
lib/externallib.php
lib/filelib.php
lib/filestorage/file_storage.php
lib/filestorage/zip_archive.php
lib/flowplayer/LICENSE.txt [deleted file]
lib/flowplayer/README.txt [deleted file]
lib/flowplayer/README_audio.txt [deleted file]
lib/flowplayer/flowplayer-3.2.13.js [deleted file]
lib/flowplayer/flowplayer-3.2.13.min.js [deleted file]
lib/flowplayer/flowplayer-3.2.18.swf [deleted file]
lib/flowplayer/flowplayer-3.2.18.swf.bin [deleted file]
lib/flowplayer/flowplayer.audio-3.2.11.swf [deleted file]
lib/flowplayer/flowplayer.audio-3.2.11.swf.bin [deleted file]
lib/flowplayer/flowplayer.controls-3.2.16.swf [deleted file]
lib/flowplayer/flowplayer.controls-3.2.16.swf.bin [deleted file]
lib/flowplayer/lib.php [deleted file]
lib/flowplayer/readme_moodle.txt [deleted file]
lib/form/amd/build/passwordunmask.min.js
lib/form/amd/src/passwordunmask.js
lib/form/searchableselector.js [deleted file]
lib/form/searchableselector.php
lib/form/select.php
lib/form/templatable_form_element.php
lib/form/tests/behat/modgrade_validation.feature
lib/grade/grade_item.php
lib/javascript-static.js
lib/medialib.php
lib/messagelib.php
lib/modinfolib.php
lib/moodlelib.php
lib/navigationlib.php
lib/outputcomponents.php
lib/outputfactories.php
lib/outputlib.php
lib/outputrenderers.php
lib/phpunit/classes/util.php
lib/portfoliolib.php
lib/questionlib.php
lib/setup.php
lib/setuplib.php
lib/templates/popover_region.mustache
lib/templates/settings_link_page.mustache
lib/templates/settings_link_page_single.mustache
lib/tests/behat/behat_general.php
lib/tests/coursecatlib_test.php
lib/tests/curl_security_helper_test.php [new file with mode: 0644]
lib/tests/filelib_test.php
lib/tests/medialib_test.php
lib/tests/upgrade_util_test.php
lib/tests/upgradelib_test.php
lib/thirdpartylibs.xml
lib/upgrade.txt
lib/upgradelib.php
lib/webdavlib.php
lib/weblib.php
lib/yui/build/moodle-core-actionmenu/moodle-core-actionmenu-debug.js
lib/yui/build/moodle-core-actionmenu/moodle-core-actionmenu-min.js
lib/yui/build/moodle-core-actionmenu/moodle-core-actionmenu.js
lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-debug.js
lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert-min.js
lib/yui/build/moodle-core-notification-alert/moodle-core-notification-alert.js
lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-debug.js
lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm-min.js
lib/yui/build/moodle-core-notification-confirm/moodle-core-notification-confirm.js
lib/yui/src/actionmenu/js/actionmenu.js
lib/yui/src/notification/js/alert.js
lib/yui/src/notification/js/confirm.js
login/confirm.php
login/token.php
media/classes/manager.php [new file with mode: 0644]
media/classes/player.php [new file with mode: 0644]
media/classes/player_external.php [new file with mode: 0644]
media/classes/player_native.php [new file with mode: 0644]
media/player/html5audio/classes/plugin.php [new file with mode: 0644]
media/player/html5audio/lang/en/media_html5audio.php [moved from lib/flowplayer/flowplayer-3.2.18.swf.php with 63% similarity]
media/player/html5audio/pix/icon.png [new file with mode: 0644]
media/player/html5audio/tests/player_test.php [new file with mode: 0644]
media/player/html5audio/version.php [new file with mode: 0644]
media/player/html5video/classes/plugin.php [new file with mode: 0644]
media/player/html5video/lang/en/media_html5video.php [moved from lib/flowplayer/flowplayer.audio-3.2.11.swf.php with 63% similarity]
media/player/html5video/pix/icon.png [new file with mode: 0644]
media/player/html5video/tests/player_test.php [new file with mode: 0644]
media/player/html5video/version.php [new file with mode: 0644]
media/player/swf/classes/plugin.php [new file with mode: 0644]
media/player/swf/lang/en/media_swf.php [new file with mode: 0644]
media/player/swf/pix/icon.png [new file with mode: 0644]
media/player/swf/tests/player_test.php [new file with mode: 0644]
media/player/swf/version.php [moved from lib/flowplayer/flowplayer.controls-3.2.16.swf.php with 62% similarity]
media/player/videojs/amd/build/Youtube.min.js [new file with mode: 0644]
media/player/videojs/amd/build/video.min.js [new file with mode: 0644]
media/player/videojs/amd/src/Youtube.js [new file with mode: 0644]
media/player/videojs/amd/src/video.js [new file with mode: 0644]
media/player/videojs/classes/plugin.php [new file with mode: 0644]
media/player/videojs/fonts/VideoJS.eot [new file with mode: 0644]
media/player/videojs/fonts/VideoJS.svg [new file with mode: 0644]
media/player/videojs/fonts/VideoJS.ttf [new file with mode: 0644]
media/player/videojs/fonts/VideoJS.woff [new file with mode: 0644]
media/player/videojs/lang/en/media_videojs.php [new file with mode: 0644]
media/player/videojs/pix/icon.png [new file with mode: 0644]
media/player/videojs/readme_moodle.txt [new file with mode: 0644]
media/player/videojs/settings.php [new file with mode: 0644]
media/player/videojs/styles.css [new file with mode: 0644]
media/player/videojs/tests/player_test.php [new file with mode: 0644]
media/player/videojs/thirdpartylibs.xml [new file with mode: 0644]
media/player/videojs/version.php [new file with mode: 0644]
media/player/videojs/videojs/LICENSE [new file with mode: 0644]
media/player/videojs/videojs/lang/ar.js [new file with mode: 0644]
media/player/videojs/videojs/lang/ba.js [new file with mode: 0644]
media/player/videojs/videojs/lang/bg.js [new file with mode: 0644]
media/player/videojs/videojs/lang/ca.js [new file with mode: 0644]
media/player/videojs/videojs/lang/cs.js [new file with mode: 0644]
media/player/videojs/videojs/lang/da.js [new file with mode: 0644]
media/player/videojs/videojs/lang/de.js [new file with mode: 0644]
media/player/videojs/videojs/lang/el.js [new file with mode: 0644]
media/player/videojs/videojs/lang/en.js [new file with mode: 0644]
media/player/videojs/videojs/lang/es.js [new file with mode: 0644]
media/player/videojs/videojs/lang/fa.js [new file with mode: 0644]
media/player/videojs/videojs/lang/fi.js [new file with mode: 0644]
media/player/videojs/videojs/lang/fr.js [new file with mode: 0644]
media/player/videojs/videojs/lang/hr.js [new file with mode: 0644]
media/player/videojs/videojs/lang/hu.js [new file with mode: 0644]
media/player/videojs/videojs/lang/it.js [new file with mode: 0644]
media/player/videojs/videojs/lang/ja.js [new file with mode: 0644]
media/player/videojs/videojs/lang/ko.js [new file with mode: 0644]
media/player/videojs/videojs/lang/nb.js [new file with mode: 0644]
media/player/videojs/videojs/lang/nl.js [new file with mode: 0644]
media/player/videojs/videojs/lang/nn.js [new file with mode: 0644]
media/player/videojs/videojs/lang/pl.js [new file with mode: 0644]
media/player/videojs/videojs/lang/pt-BR.js [new file with mode: 0644]
media/player/videojs/videojs/lang/ru.js [new file with mode: 0644]
media/player/videojs/videojs/lang/sr.js [new file with mode: 0644]
media/player/videojs/videojs/lang/sv.js [new file with mode: 0644]
media/player/videojs/videojs/lang/tr.js [new file with mode: 0644]
media/player/videojs/videojs/lang/uk.js [new file with mode: 0644]
media/player/videojs/videojs/lang/vi.js [new file with mode: 0644]
media/player/videojs/videojs/lang/zh-CN.js [new file with mode: 0644]
media/player/videojs/videojs/lang/zh-TW.js [new file with mode: 0644]
media/player/videojs/videojs/video-js.swf [new file with mode: 0644]
media/player/vimeo/classes/plugin.php [new file with mode: 0644]
media/player/vimeo/lang/en/media_vimeo.php [moved from message/output/airnotifier/style.css with 71% similarity]
media/player/vimeo/pix/icon.png [new file with mode: 0644]
media/player/vimeo/tests/player_test.php [new file with mode: 0644]
media/player/vimeo/version.php [new file with mode: 0644]
media/player/youtube/classes/plugin.php [new file with mode: 0644]
media/player/youtube/lang/en/media_youtube.php [new file with mode: 0644]
media/player/youtube/pix/icon.png [new file with mode: 0644]
media/player/youtube/tests/player_test.php [new file with mode: 0644]
media/player/youtube/version.php [new file with mode: 0644]
message/amd/build/message_area.min.js
message/amd/build/message_area_contacts.min.js
message/amd/build/message_area_messages.min.js
message/amd/build/message_area_search.min.js
message/amd/build/preferences_notifications_list_controller.min.js
message/amd/src/message_area.js
message/amd/src/message_area_contacts.js
message/amd/src/message_area_messages.js
message/amd/src/message_area_search.js
message/amd/src/preferences_notifications_list_controller.js
message/classes/api.php
message/classes/helper.php
message/classes/output/messagearea/message.php
message/classes/output/messagearea/message_area.php
message/classes/time_last_message_between_users.php [new file with mode: 0644]
message/externallib.php
message/index.php
message/lib.php
message/output/airnotifier/message_output_airnotifier.php
message/output/airnotifier/yui/build/moodle-message_airnotifier-toolboxes/moodle-message_airnotifier-toolboxes-debug.js
message/output/airnotifier/yui/build/moodle-message_airnotifier-toolboxes/moodle-message_airnotifier-toolboxes-min.js
message/output/airnotifier/yui/build/moodle-message_airnotifier-toolboxes/moodle-message_airnotifier-toolboxes.js
message/output/airnotifier/yui/src/toolboxes/js/toolboxes.js
message/output/popup/classes/api.php
message/output/popup/lib.php
message/output/popup/templates/message_popover.mustache
message/templates/message_area.mustache
message/templates/message_area_contacts_area.mustache
message/templates/message_area_messages_area.mustache
message/tests/api_test.php
message/tests/behat/search_messages.feature
message/tests/externallib_test.php
mod/assign/amd/build/grading_panel.min.js
mod/assign/amd/build/participant_selector.min.js
mod/assign/amd/src/grading_panel.js
mod/assign/amd/src/participant_selector.js
mod/assign/backup/moodle2/backup_assign_stepslib.php
mod/assign/backup/moodle2/restore_assign_stepslib.php
mod/assign/classes/event/group_override_created.php [new file with mode: 0644]
mod/assign/classes/event/group_override_deleted.php [new file with mode: 0644]
mod/assign/classes/event/group_override_updated.php [new file with mode: 0644]
mod/assign/classes/event/user_override_created.php [new file with mode: 0644]
mod/assign/classes/event/user_override_deleted.php [new file with mode: 0644]
mod/assign/classes/event/user_override_updated.php [new file with mode: 0644]
mod/assign/classes/group_observers.php [new file with mode: 0644]
mod/assign/db/access.php
mod/assign/db/events.php [new file with mode: 0644]
mod/assign/db/install.xml
mod/assign/db/upgrade.php
mod/assign/externallib.php
mod/assign/feedback/editpdf/fpdi/fpdi_bridge.php
mod/assign/feedback/editpdf/fpdi/readme_moodle.txt
mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature
mod/assign/feedback/editpdf/tests/behat/group_annotations.feature
mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature
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/editor.js
mod/assign/feedback/file/tests/behat/feedback_file.feature
mod/assign/gradingtable.php
mod/assign/lang/en/assign.php
mod/assign/lib.php
mod/assign/locallib.php
mod/assign/override_form.php [new file with mode: 0644]
mod/assign/overridedelete.php [new file with mode: 0644]
mod/assign/overrideedit.php [new file with mode: 0644]
mod/assign/overrides.php [new file with mode: 0644]
mod/assign/styles.css
mod/assign/templates/grading_navigation.mustache
mod/assign/templates/grading_navigation_user_summary.mustache
mod/assign/tests/behat/allow_another_attempt.feature
mod/assign/tests/behat/assign_course_reset.feature [new file with mode: 0644]
mod/assign/tests/behat/assign_group_override.feature [new file with mode: 0644]
mod/assign/tests/behat/assign_user_override.feature [new file with mode: 0644]
mod/assign/tests/behat/comment_inline.feature
mod/assign/tests/behat/display_error_message_onbadformat.feature
mod/assign/tests/behat/display_grade.feature
mod/assign/tests/behat/edit_previous_feedback.feature
mod/assign/tests/behat/edit_student_submission.feature
mod/assign/tests/behat/filter_by_marker.feature
mod/assign/tests/behat/grading_status.feature
mod/assign/tests/behat/grant_extension.feature
mod/assign/tests/behat/group_submission.feature
mod/assign/tests/behat/outcome_grading.feature
mod/assign/tests/behat/prevent_submission_changes.feature
mod/assign/tests/behat/quickgrading.feature
mod/assign/tests/behat/reopen_locked_submission.feature
mod/assign/tests/behat/rescale_grades.feature
mod/assign/tests/behat/steps_blind_marking.feature
mod/assign/tests/behat/submission_comments.feature
mod/assign/tests/behat/submit_without_group.feature
mod/assign/tests/events_test.php
mod/assign/tests/locallib_test.php
mod/assign/upgrade.txt
mod/assign/version.php
mod/assign/view.php
mod/book/tests/behat/show_hide_chapters.feature
mod/chat/gui_ajax/index.php
mod/chat/gui_ajax/module.js
mod/chat/gui_basic/index.php
mod/chat/report.php
mod/choice/renderer.php
mod/choice/report.php
mod/choice/styles.css [deleted file]
mod/choice/tests/behat/modify_choice.feature
mod/data/edit.php
mod/data/export_form.php
mod/data/field.php
mod/data/field/checkbox/field.class.php
mod/data/field/date/field.class.php
mod/data/field/file/field.class.php
mod/data/field/latlong/field.class.php
mod/data/field/menu/field.class.php
mod/data/field/multimenu/field.class.php
mod/data/field/number/field.class.php
mod/data/field/picture/field.class.php
mod/data/field/radiobutton/field.class.php
mod/data/field/text/field.class.php
mod/data/field/textarea/field.class.php
mod/data/field/url/field.class.php
mod/data/lib.php
mod/data/renderer.php
mod/data/styles.css
mod/data/templates.php
mod/data/tests/behat/add_entries.feature
mod/data/tests/behat/behat_mod_data.php
mod/data/view.php
mod/feedback/edit_form.php
mod/feedback/show_nonrespondents.php
mod/feedback/tests/behat/anonymous.feature
mod/feedback/tests/behat/coursemapping.feature
mod/feedback/tests/behat/groups.feature
mod/feedback/tests/behat/multichoice.feature
mod/feedback/tests/behat/non_anonymous.feature
mod/feedback/tests/behat/question_types.feature
mod/feedback/tests/behat/question_types_non_anon.feature
mod/feedback/tests/behat/show_nonrespondents.feature
mod/folder/renderer.php
mod/forum/classes/observer.php
mod/forum/db/events.php
mod/forum/discuss.php
mod/forum/externallib.php
mod/forum/tests/behat/forum_subscriptions_availability.feature
mod/forum/version.php
mod/glossary/export.php
mod/glossary/lib.php
mod/glossary/styles.css
mod/glossary/view.php
mod/lesson/edit.php
mod/lesson/lib.php
mod/lesson/locallib.php
mod/lesson/pagetypes/branchtable.php
mod/lesson/pagetypes/matching.php
mod/lesson/pagetypes/numerical.php
mod/lesson/pagetypes/shortanswer.php
mod/lesson/report.php
mod/lesson/tests/behat/import_images.feature
mod/lesson/tests/behat/lesson_course_reset.feature
mod/lesson/tests/behat/lesson_group_override.feature
mod/lesson/tests/behat/lesson_user_override.feature
mod/lti/templates/cartridge_registration_form.mustache
mod/lti/templates/tool_card.mustache
mod/lti/templates/tool_configure.mustache
mod/lti/templates/tool_list.mustache
mod/lti/templates/tool_proxy_card.mustache
mod/lti/view.php
mod/quiz/amd/build/preflightcheck.min.js
mod/quiz/amd/src/preflightcheck.js
mod/quiz/classes/output/edit_renderer.php
mod/quiz/lib.php
mod/quiz/override_form.php
mod/quiz/renderer.php
mod/quiz/report/attemptsreport_table.php
mod/quiz/report/overview/overview_table.php
mod/quiz/report/overview/report.php
mod/quiz/tests/behat/backup.feature
mod/quiz/tests/behat/editing_add.feature
mod/quiz/tests/behat/editing_move_by_click.feature
mod/quiz/tests/behat/editing_remove_question.feature
mod/quiz/tests/behat/editing_repaginate.feature
mod/quiz/tests/behat/editing_require_previous.feature
mod/quiz/tests/behat/editing_section_headings.feature
mod/quiz/tests/behat/editing_set_marks_no_attempts.feature
mod/quiz/tests/behat/editing_set_marks_with_attempts.feature
mod/quiz/tests/behat/preview.feature [new file with mode: 0644]
mod/quiz/tests/behat/quiz_reset.feature
mod/quiz/view.php
mod/resource/locallib.php
mod/scorm/locallib.php
mod/scorm/mod_form.php
mod/scorm/styles.css
mod/scorm/view.php
mod/survey/lib.php
mod/survey/report.php
mod/survey/view.php
mod/url/locallib.php
mod/wiki/locallib.php
mod/workshop/allocation/manual/tests/behat/behat_workshopallocation_manual.php
mod/workshop/classes/portfolio_caller.php
mod/workshop/tests/behat/behat_mod_workshop.php
notes/index.php
question/classes/bank/search/category_condition.php
question/classes/bank/view.php
question/preview.php
question/type/calculated/questiontype.php
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-debug.js
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-min.js
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form.js
question/type/ddmarker/yui/src/form/js/form.js
question/type/essay/question.php
question/type/gapselect/renderer.php
question/type/match/renderer.php
question/type/multianswer/renderer.php
question/type/multianswer/tests/walkthrough_test.php
question/type/multichoice/renderer.php
question/type/numerical/renderer.php
question/type/questionbase.php
question/type/shortanswer/renderer.php
question/type/truefalse/renderer.php
question/yui/build/moodle-question-preview/moodle-question-preview-debug.js
question/yui/build/moodle-question-preview/moodle-question-preview-min.js
question/yui/build/moodle-question-preview/moodle-question-preview.js
question/yui/src/preview/js/preview.js
report/security/locallib.php
theme/boost/amd/build/form-display-errors.min.js
theme/boost/amd/build/loader.min.js
theme/boost/amd/src/form-display-errors.js
theme/boost/amd/src/loader.js
theme/boost/classes/output/core/admin_renderer.php
theme/boost/classes/output/core_renderer.php
theme/boost/config.php
theme/boost/lang/en/theme_boost.php
theme/boost/layout/columns1.php
theme/boost/lib.php
theme/boost/readme_moodle.txt
theme/boost/scss/bootstrap/_popover.scss
theme/boost/scss/moodle.scss
theme/boost/scss/moodle/admin.scss
theme/boost/scss/moodle/backup-restore.scss
theme/boost/scss/moodle/blocks.scss
theme/boost/scss/moodle/buttons.scss
theme/boost/scss/moodle/calendar.scss
theme/boost/scss/moodle/chat.scss
theme/boost/scss/moodle/core.scss
theme/boost/scss/moodle/course.scss
theme/boost/scss/moodle/expendable.scss
theme/boost/scss/moodle/filemanager.scss
theme/boost/scss/moodle/forms.scss
theme/boost/scss/moodle/grade.scss
theme/boost/scss/moodle/icons.scss
theme/boost/scss/moodle/message.scss
theme/boost/scss/moodle/modules.scss
theme/boost/scss/moodle/popover-region.scss
theme/boost/scss/moodle/question.scss
theme/boost/scss/moodle/responsive-tabs.scss [new file with mode: 0644]
theme/boost/scss/moodle/undo.scss
theme/boost/scss/moodle/user.scss
theme/boost/templates/columns1.mustache
theme/boost/templates/columns2.mustache
theme/boost/templates/core/block.mustache
theme/boost/templates/core/filemanager_fileselect.mustache
theme/boost/templates/core/filemanager_loginform.mustache
theme/boost/templates/core/navbar.mustache
theme/boost/templates/core/settings_link_page.mustache [new file with mode: 0644]
theme/boost/templates/core/settings_link_page_single.mustache [new file with mode: 0644]
theme/boost/templates/core/single_button.mustache
theme/boost/templates/core/url_select.mustache
theme/boost/templates/core_form/element-autocomplete-inline.mustache
theme/boost/templates/core_form/element-checkbox-inline.mustache
theme/boost/templates/core_form/element-select-inline.mustache
theme/boost/templates/core_form/element-select.mustache
theme/boost/templates/core_form/element-selectwithlink.mustache
theme/boost/templates/core_form/element-tags-inline.mustache
theme/boost/templates/core_form/element-tags.mustache
theme/boost/templates/embedded.mustache
theme/boost/templates/flat_navigation.mustache
theme/boost/templates/login.mustache
theme/boost/templates/maintenance.mustache
theme/boost/templates/mod_assign/grading_navigation.mustache
theme/boost/templates/secure.mustache
theme/boost/templates/tool_lp/progress_bar.mustache [new file with mode: 0644]
theme/boost/tests/behat/behat_theme_boost_behat_admin.php
theme/bootstrapbase/less/moodle/admin.less
theme/bootstrapbase/less/moodle/bs4-compat.less
theme/bootstrapbase/less/moodle/buttons.less
theme/bootstrapbase/less/moodle/expendable.less
theme/bootstrapbase/less/moodle/forms.less
theme/bootstrapbase/less/moodle/message.less
theme/bootstrapbase/less/moodle/modules.less
theme/bootstrapbase/less/moodle/popover_region.less
theme/bootstrapbase/less/moodle/undo.less
theme/bootstrapbase/style/moodle.css
theme/clean/style/custom.css
theme/more/style/custom.css
theme/upgrade.txt
user/edit_form.php
user/externallib.php
user/selector/lib.php
user/selector/module.js
user/tests/externallib_test.php
version.php
webservice/externallib.php
webservice/lib.php
webservice/tests/externallib_test.php

index 68293b9..fe5da7b 100644 (file)
@@ -24,7 +24,6 @@ lib/htmlpurifier/
 lib/jabber/
 lib/minify/matthiasmullie-minify/
 lib/minify/matthiasmullie-pathconverter/
-lib/flowplayer/
 lib/pear/Auth/RADIUS.php
 lib/pear/Crypt/CHAP.php
 lib/pear/HTML/Common.php
@@ -57,6 +56,8 @@ lib/amd/src/chartjs-lazy.js
 lib/maxmind/GeoIp2/
 lib/maxmind/MaxMind/
 lib/ltiprovider/
+media/player/videojs/amd/src/
+media/player/videojs/videojs/
 mod/assign/feedback/editpdf/fpdi/
 repository/s3/S3.php
 theme/boost/scss/bootstrap/
index 383c520..cafa933 100644 (file)
@@ -25,7 +25,6 @@ lib/htmlpurifier/
 lib/jabber/
 lib/minify/matthiasmullie-minify/
 lib/minify/matthiasmullie-pathconverter/
-lib/flowplayer/
 lib/pear/Auth/RADIUS.php
 lib/pear/Crypt/CHAP.php
 lib/pear/HTML/Common.php
@@ -58,6 +57,8 @@ lib/amd/src/chartjs-lazy.js
 lib/maxmind/GeoIp2/
 lib/maxmind/MaxMind/
 lib/ltiprovider/
+media/player/videojs/amd/src/
+media/player/videojs/videojs/
 mod/assign/feedback/editpdf/fpdi/
 repository/s3/S3.php
 theme/boost/scss/bootstrap/
index 7847b2d..cb83e0d 100644 (file)
@@ -120,7 +120,7 @@ foreach ($settingspage->children as $childpage) {
 }
 if ($savebutton) {
     $outputhtml .= html_writer::start_tag('div', array('class' => 'form-buttons'));
-    $outputhtml .= html_writer::empty_tag('input', array('class' => 'form-submit', 'type' => 'submit', 'value' => get_string('savechanges','admin')));
+    $outputhtml .= html_writer::empty_tag('input', array('class' => 'btn btn-primary form-submit', 'type' => 'submit', 'value' => get_string('savechanges','admin')));
     $outputhtml .= html_writer::end_tag('div');
 }
 
index 5775d1a..8c35fb6 100644 (file)
           <ON_CHECK message="unsupporteddbtablerowformat" />
         </FEEDBACK>
       </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="libcurlwarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
     </CUSTOM_CHECKS>
   </MOODLE>
   <MOODLE version="2.8" requires="2.2">
           <ON_CHECK message="unsupporteddbtablerowformat" />
         </FEEDBACK>
       </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="libcurlwarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
     </CUSTOM_CHECKS>
   </MOODLE>
   <MOODLE version="3.0" requires="2.2">
       <VENDOR name="oracle" version="10.2" />
     </DATABASE>
     <PHP version="5.4.4" level="required">
+      <RESTRICT function="restrict_php_version_71" message="unsupportedphpversion71" />
     </PHP>
     <PCREUNICODE level="optional">
       <FEEDBACK>
           <ON_CHECK message="unsupporteddbtablerowformat" />
         </FEEDBACK>
       </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="libcurlwarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
     </CUSTOM_CHECKS>
   </MOODLE>
   <MOODLE version="3.1" requires="2.7">
       <VENDOR name="oracle" version="10.2" />
     </DATABASE>
     <PHP version="5.4.4" level="required">
+      <RESTRICT function="restrict_php_version_71" message="unsupportedphpversion71" />
     </PHP>
     <PCREUNICODE level="optional">
       <FEEDBACK>
           <ON_CHECK message="unoconvwarning" />
         </FEEDBACK>
       </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="libcurlwarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
     </CUSTOM_CHECKS>
   </MOODLE>
   <MOODLE version="3.2" requires="2.7">
           <ON_CHECK message="tlswarning" />
         </FEEDBACK>
       </CUSTOM_CHECK>
+      <CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="libcurlwarning" />
+        </FEEDBACK>
+      </CUSTOM_CHECK>
     </CUSTOM_CHECKS>
   </MOODLE>
 </COMPATIBILITY_MATRIX>
index 6f87285..30ba5cb 100644 (file)
@@ -315,6 +315,11 @@ if (!$cache and $version > $CFG->version) {  // upgrade
         $testsite = 'behat';
     }
 
+    if (isset($CFG->themerev)) {
+        // Store the themerev to restore after purging caches.
+        $themerev = $CFG->themerev;
+    }
+
     // We purge all of MUC's caches here.
     // Caches are disabled for upgrade by CACHE_DISABLE_ALL so we must set the first arg to true.
     // This ensures a real config object is loaded and the stores will be purged.
@@ -324,6 +329,11 @@ if (!$cache and $version > $CFG->version) {  // upgrade
     // We then purge the regular caches.
     purge_all_caches();
 
+    if (isset($themerev)) {
+        // Restore the themerev
+        set_config('themerev', $themerev);
+    }
+
     $output = $PAGE->get_renderer('core', 'admin');
 
     if (upgrade_stale_php_files_present()) {
diff --git a/admin/media.php b/admin/media.php
new file mode 100644 (file)
index 0000000..d6886a0
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Enrol config manipulation script.
+ *
+ * @package    core
+ * @subpackage media
+ * @copyright  2016 Marina Glancy
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+define('NO_OUTPUT_BUFFERING', true);
+
+require_once('../config.php');
+require_once($CFG->libdir.'/adminlib.php');
+
+$action  = required_param('action', PARAM_ALPHANUMEXT);
+$media   = required_param('media', PARAM_PLUGIN);
+$confirm = optional_param('confirm', 0, PARAM_BOOL);
+
+$PAGE->set_url('/admin/media.php');
+$PAGE->set_context(context_system::instance());
+
+require_login();
+require_capability('moodle/site:config', context_system::instance());
+require_sesskey();
+
+$plugins = core_plugin_manager::instance()->get_plugins_of_type('media');
+$sortorder = array_values(\core\plugininfo\media::get_enabled_plugins());
+
+$return = new moodle_url('/admin/settings.php', array('section' => 'managemediaplayers'));
+
+if (!array_key_exists($media, $plugins)) {
+    redirect($return);
+}
+
+switch ($action) {
+    case 'disable':
+        $plugins[$media]->set_enabled(false);
+        break;
+
+    case 'enable':
+        $plugins[$media]->set_enabled(true);
+        break;
+
+    case 'up':
+        if (($pos = array_search($media, $sortorder)) > 0) {
+            $tmp = $sortorder[$pos - 1];
+            $sortorder[$pos - 1] = $sortorder[$pos];
+            $sortorder[$pos] = $tmp;
+            \core\plugininfo\media::set_enabled_plugins($sortorder);
+        }
+        break;
+
+    case 'down':
+        if ((($pos = array_search($media, $sortorder)) !== false) && ($pos < count($sortorder) - 1)) {
+            $tmp = $sortorder[$pos + 1];
+            $sortorder[$pos + 1] = $sortorder[$pos];
+            $sortorder[$pos] = $tmp;
+            \core\plugininfo\media::set_enabled_plugins($sortorder);
+        }
+        break;
+}
+
+redirect($return);
index 52cb560..6924e61 100644 (file)
@@ -41,7 +41,7 @@ if (!empty($disable) && confirm_sesskey()) {
     if (!$processor = $DB->get_record('message_processors', array('id'=>$disable))) {
         print_error('outputdoesnotexist', 'message');
     }
-    $DB->set_field('message_processors', 'enabled', '0', array('id'=>$processor->id));      // Disable output
+    \core_message\api::update_processor_status($processor, 0);     // Disable output.
     core_plugin_manager::reset_caches();
 }
 
@@ -49,7 +49,7 @@ if (!empty($enable) && confirm_sesskey()) {
     if (!$processor = $DB->get_record('message_processors', array('id'=>$enable))) {
         print_error('outputdoesnotexist', 'message');
     }
-    $DB->set_field('message_processors', 'enabled', '1', array('id'=>$processor->id));      // Enable output
+    \core_message\api::update_processor_status($processor, 1);      // Enable output.
     core_plugin_manager::reset_caches();
 }
 
index a9339b0..5769e6d 100644 (file)
@@ -60,7 +60,8 @@ class mnet_simple_host_form extends moodleform {
         }
         if ($host = $DB->get_record('mnet_host', array('wwwroot' => $wwwroot))) {
             global $CFG;
-            return array('wwwroot' => get_string('hostexists', 'mnet', $CFG->wwwroot . '/admin/mnet/peers.php?hostid=' . $host->id));
+            return array('wwwroot' => get_string('hostexists', 'mnet',
+                new moodle_url('/admin/mnet/peers.php', array('hostid' => $host->id))));
         }
         return array();
     }
index df1f6e2..559d2f4 100644 (file)
@@ -109,7 +109,7 @@ if (!empty($hostid)) {
     $mnet_peer->set_id($hostid);
     echo $OUTPUT->header();
     $currenttab = 'mnetdetails';
-    require_once($CFG->dirroot . '/admin/mnet/tabs.php');
+    require_once($CFG->dirroot . '/' . $CFG->admin . '/mnet/tabs.php');
 
     if ($hostid != $CFG->mnet_all_hosts_id) {
         $mnet_peer->currentkey = mnet_get_public_key($mnet_peer->wwwroot, $mnet_peer->application);
@@ -144,7 +144,7 @@ if (empty($noreviewform) && $id = optional_param('id', 0, PARAM_INT)) {
     // we're editing an existing one, so set up the tabs
     $currenttab = 'mnetdetails';
     $mnet_peer->set_id($id);
-    require_once($CFG->dirroot . '/admin/mnet/tabs.php');
+    require_once($CFG->dirroot . '/' . $CFG->admin . '/mnet/tabs.php');
 } else if (empty($noreviewform) && ($wwwroot = optional_param('wwwroot', '', PARAM_URL)) && ($applicationid = optional_param('applicationid', 0, PARAM_INT))) {
     $application = $DB->get_field('mnet_application', 'name', array('id'=>$applicationid));
     $mnet_peer->bootstrap($wwwroot, null, $application);
index 24ba79c..a27f162 100644 (file)
@@ -26,7 +26,7 @@
 
 require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
-require_once($CFG->dirroot . '/admin/mnet/profilefields_form.php');
+require_once($CFG->dirroot . '/' . $CFG->admin .'/mnet/profilefields_form.php');
 $mnet = get_mnet_environment();
 
 require_login();
index ea588cd..79e46e9 100644 (file)
@@ -27,7 +27,7 @@
 
 require(__DIR__.'/../../config.php');
 require_once($CFG->libdir.'/adminlib.php');
-require_once($CFG->dirroot . '/admin/mnet/services_form.php');
+require_once($CFG->dirroot . '/' . $CFG->admin . '/mnet/services_form.php');
 $mnet = get_mnet_environment();
 
 require_login();
@@ -82,7 +82,7 @@ if ($formdata = $mform->get_data()) {
 
 echo $OUTPUT->header();
 $currenttab = 'mnetservices';
-require_once($CFG->dirroot . '/admin/mnet/tabs.php');
+require_once($CFG->dirroot . '/' . $CFG->admin . '/mnet/tabs.php');
 echo $OUTPUT->box_start();
 $s = mnet_get_service_info($mnet_peer, false); // basic data only
 $mform->set_data($s);
index 57833b6..8245949 100644 (file)
@@ -133,9 +133,12 @@ echo $OUTPUT->header();
           </td>
       <td id="buttonscell">
         <p class="arrow_button">
-            <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
-            <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
-            <input name="main" id="main" type="submit" value="<?php echo get_string('mainadminset', 'core_role'); ?>" title="<?php print_string('mainadminset', 'core_role'); ?>" />
+            <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().'&nbsp;'.get_string('add'); ?>"
+                   title="<?php print_string('add'); ?>" class="btn btn-secondary"/><br />
+            <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$OUTPUT->rarrow(); ?>"
+                   title="<?php print_string('remove'); ?>" class="btn btn-secondary"/><br />
+            <input name="main" id="main" type="submit" value="<?php echo get_string('mainadminset', 'core_role'); ?>"
+                   title="<?php print_string('mainadminset', 'core_role'); ?>" class="btn btn-secondary"/>
         </p>
       </td>
       <td id="potentialcell">
index 383455e..916e6c2 100644 (file)
@@ -80,7 +80,8 @@ echo $OUTPUT->box($controller->get_intro_text());
 echo '<form action="' . $baseurl . '" method="post">';
 echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
 echo html_writer::table($table);
-echo '<div class="buttons"><input type="submit" name="submit" value="'.get_string('savechanges').'"/>';
+echo '<div class="buttons">';
+echo '<input type="submit" class="btn btn-primary" name="submit" value="' . get_string('savechanges') . '"/>';
 echo '</div></form>';
 
 echo $OUTPUT->footer();
index 3d723b8..f535866 100644 (file)
@@ -201,11 +201,13 @@ if ($roleid) {
       </td>
       <td id="buttonscell">
           <div id="addcontrols">
-              <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().'&nbsp;'.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
+              <input name="add" id="add" type="submit" value="<?php echo $OUTPUT->larrow().'&nbsp;'.get_string('add'); ?>"
+                     title="<?php print_string('add'); ?>" class="btn btn-secondary"/><br />
           </div>
 
           <div id="removecontrols">
-              <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
+              <input name="remove" id="remove" type="submit" value="<?php echo get_string('remove').'&nbsp;'.$OUTPUT->rarrow(); ?>"
+                     title="<?php print_string('remove'); ?>" class="btn btn-secondary"/>
           </div>
       </td>
       <td id="potentialcell">
index 6649aaf..0f40308 100644 (file)
@@ -172,7 +172,8 @@ echo $OUTPUT->heading('<label for="reportuser">' . $selectheading . '</label>',
 $userselector->display();
 
 // Submit button and the end of the form.
-echo '<p id="chooseusersubmit"><input type="submit" value="' . get_string('showthisuserspermissions', 'core_role') . '" /></p>';
+echo '<p id="chooseusersubmit"><input type="submit" value="' . get_string('showthisuserspermissions', 'core_role') . '" ' .
+     'class="btn btn-primary"/></p>';
 echo '</form>';
 echo $OUTPUT->box_end();
 
index eb46c76..bcf6a49 100644 (file)
@@ -471,15 +471,17 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
     }
 
     protected function get_name_field($id) {
-        return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->name) . '" />';
+        return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->name) . '"' .
+                ' class="form-control"/>';
     }
 
     protected function get_shortname_field($id) {
-        return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->shortname) . '" />';
+        return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->shortname) . '"' .
+                ' class="form-control"/>';
     }
 
     protected function get_description_field($id) {
-        return '<textarea class="form-textarea" id="'. s($id) .'" name="description" rows="10" cols="50">' .
+        return '<textarea class="form-textarea form-control" id="'. s($id) .'" name="description" rows="10" cols="50">' .
             htmlspecialchars($this->role->description) .
             '</textarea>';
     }
@@ -490,7 +492,8 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
         foreach (get_role_archetypes() as $type) {
             $options[$type] = get_string('archetype'.$type, 'role');
         }
-        return html_writer::select($options, 'archetype', $this->role->archetype, false);
+        return html_writer::select($options, 'archetype', $this->role->archetype, false,
+            array('class' => 'custom-select'));
     }
 
     protected function get_assignable_levels_control() {
@@ -563,7 +566,8 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
         if ($this->roleid == 0) {
             $options[-1] = get_string('thisnewrole', 'core_role');
         }
-        return html_writer::select($options, 'allow'.$type.'[]', $selected, false, array('multiple'=>'multiple', 'size'=>10));
+        return html_writer::select($options, 'allow'.$type.'[]', $selected, false, array('multiple' => 'multiple',
+            'size' => 10, 'class' => 'form-control'));
     }
 
     /**
@@ -575,11 +579,19 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
         return '';
     }
 
-    protected function print_field($name, $caption, $field) {
+    /**
+     * Print labels, fields and help icon on role administration page.
+     *
+     * @param string $name The field name.
+     * @param string $caption The field caption.
+     * @param string $field The field type.
+     * @param null|string $helpicon The help icon content.
+     */
+    protected function print_field($name, $caption, $field, $helpicon = null) {
         global $OUTPUT;
         // Attempt to generate HTML like formslib.
-        echo '<div class="fitem">';
-        echo '<div class="fitemtitle">';
+        echo '<div class="fitem row form-group">';
+        echo '<div class="fitemtitle col-md-3">';
         if ($name) {
             echo '<label for="' . $name . '">';
         }
@@ -587,13 +599,16 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
         if ($name) {
             echo "</label>\n";
         }
+        if ($helpicon) {
+            echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
+        }
         echo '</div>';
         if (isset($this->errors[$name])) {
             $extraclass = ' error';
         } else {
             $extraclass = '';
         }
-        echo '<div class="felement' . $extraclass . '">';
+        echo '<div class="felement col-md-9 form-inline' . $extraclass . '">';
         echo $field;
         if (isset($this->errors[$name])) {
             echo $OUTPUT->error_text($this->errors[$name]);
@@ -605,7 +620,8 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
     protected function print_show_hide_advanced_button() {
         echo '<p class="definenotice">' . get_string('highlightedcellsshowdefault', 'core_role') . ' </p>';
         echo '<div class="advancedbutton">';
-        echo '<input type="submit" name="toggleadvanced" value="' . get_string('hideadvanced', 'form') . '" />';
+        echo '<input type="submit" class="btn btn-secondary" name="toggleadvanced" value="' .
+            get_string('hideadvanced', 'form') . '" />';
         echo '</div>';
     }
 
@@ -613,11 +629,14 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
         global $OUTPUT;
         // Extra fields at the top of the page.
         echo '<div class="topfields clearfix">';
-        $this->print_field('shortname', get_string('roleshortname', 'core_role').'&nbsp;'.$OUTPUT->help_icon('roleshortname', 'core_role'), $this->get_shortname_field('shortname'));
-        $this->print_field('name', get_string('customrolename', 'core_role').'&nbsp;'.$OUTPUT->help_icon('customrolename', 'core_role'), $this->get_name_field('name'));
-        $this->print_field('edit-description', get_string('customroledescription', 'core_role').'&nbsp;'.$OUTPUT->help_icon('customroledescription', 'core_role'),
-            $this->get_description_field('description'));
-        $this->print_field('menuarchetype', get_string('archetype', 'core_role').'&nbsp;'.$OUTPUT->help_icon('archetype', 'core_role'), $this->get_archetype_field('archetype'));
+        $this->print_field('shortname', get_string('roleshortname', 'core_role'),
+            $this->get_shortname_field('shortname'), $OUTPUT->help_icon('roleshortname', 'core_role'));
+        $this->print_field('name', get_string('customrolename', 'core_role'), $this->get_name_field('name'),
+            $OUTPUT->help_icon('customrolename', 'core_role'));
+        $this->print_field('edit-description', get_string('customroledescription', 'core_role'),
+            $this->get_description_field('description'), $OUTPUT->help_icon('customroledescription', 'core_role'));
+        $this->print_field('menuarchetype', get_string('archetype', 'core_role'), $this->get_archetype_field('archetype'),
+            $OUTPUT->help_icon('archetype', 'core_role'));
         $this->print_field('', get_string('maybeassignedin', 'core_role'), $this->get_assignable_levels_control());
         $this->print_field('menuallowassign', get_string('allowassign', 'core_role'), $this->get_allow_role_control('assign'));
         $this->print_field('menuallowoverride', get_string('allowoverride', 'core_role'), $this->get_allow_role_control('override'));
index 0c3d692..3349377 100644 (file)
@@ -37,7 +37,8 @@ class core_role_define_role_table_basic extends core_role_define_role_table_adva
 
     protected function print_show_hide_advanced_button() {
         echo '<div class="advancedbutton">';
-        echo '<input type="submit" name="toggleadvanced" value="' . get_string('showadvanced', 'form') . '" />';
+        echo '<input type="submit" class="btn btn-secondary" name="toggleadvanced"
+            value="' . get_string('showadvanced', 'form') . '" />';
         echo '</div>';
     }
 
index 9f339d8..76260c7 100644 (file)
@@ -132,7 +132,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
 
         $risks = $this->get_risks($capability);
 
-        $contents = html_writer::tag('td', $risks, array('class' => 'risks'));
+        $contents = html_writer::tag('td', $risks, array('class' => 'risks text-nowrap'));
         $contents .= html_writer::tag('td', $neededroles, array('class' => 'allowedroles'));
         $contents .= html_writer::tag('td', $forbiddenroles, array('class' => 'forbiddenroles'));
         return $contents;
index 093c693..d670bae 100644 (file)
@@ -252,7 +252,7 @@ if ($action === 'view') {
     echo '<div class="mform">';
 } else {
     ?>
-<form id="rolesform" class="mform" action="<?php p($baseurl->out(false)); ?>" method="post"><div>
+<form id="rolesform" class="mform fcontainer" action="<?php p($baseurl->out(false)); ?>" method="post"><div>
 <input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
 <input type="hidden" name="return" value="<?php p($return); ?>" />
 <input type="hidden" name="resettype" value="none" />
index 9c331f1..243fd67 100644 (file)
@@ -45,17 +45,20 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
             this.table = Y.one('#'+this.tableid);
 
             // Create a div to hold the search UI.
-            this.div = Y.Node.create('<div class="capabilitysearchui"></div>').setStyles({
+            this.div = Y.Node.create('<div class="capabilitysearchui form-inline"></div>').setStyles({
                 width : this.table.get('offsetWidth'),
                 marginLeft : 'auto',
                 marginRight : 'auto'
             });
             // Create the capability search input.
-            this.input = Y.Node.create('<input type="text" id="'+this.table.get('id')+'capabilitysearch" value="'+Y.Escape.html(filtervalue)+'" />');
+            this.input = Y.Node.create('<input class="form-control m-x-1" type="text"' +
+                ' id="'+this.table.get('id')+'capabilitysearch" value="'+Y.Escape.html(filtervalue)+'" />');
             // Create a label for the search input.
-            this.label = Y.Node.create('<label for="'+this.input.get('id')+'">'+M.util.get_string('filter', 'moodle')+' </label>');
+            this.label = Y.Node.create('<label for="' + this.input.get('id') + '">' +
+                M.util.get_string('filter', 'moodle') + ' </label>');
             // Create a clear button to clear the input.
-            this.button = Y.Node.create('<input type="button" value="'+M.util.get_string('clear', 'moodle')+'" />').set('disabled', filtervalue=='');
+            this.button = Y.Node.create('<input type="button" class="btn btn-primary"' +
+                ' value="'+M.util.get_string('clear', 'moodle')+'" />').set('disabled', filtervalue=='');
 
             // Tie it all together
             this.div.append(this.label).append(this.input).append(this.button);
index 1583fab..878c820 100644 (file)
@@ -177,8 +177,10 @@ if (!empty($capabilities)) {
     }
 
     echo html_writer::start_tag('div', array('class'=>'submit_buttons'));
-    echo html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savechanges', 'value'=>get_string('savechanges')));
-    echo html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'cancel', 'value'=>get_string('cancel')));
+    $attrs = array('type'=>'submit', 'name'=>'savechanges', 'value'=>get_string('savechanges'), 'class'=>'btn btn-primary');
+    echo html_writer::empty_tag('input', $attrs);
+    $attrs = array('type'=>'submit', 'name'=>'cancel', 'value'=>get_string('cancel'), 'class' => 'btn btn-secondary');
+    echo html_writer::empty_tag('input', $attrs);
     echo html_writer::end_tag('div');
     echo html_writer::end_tag('div');
     echo html_writer::end_tag('form');
index 7ee3f70..5a20af8 100644 (file)
@@ -181,7 +181,7 @@ preferences,moodle|/user/preferences.php|preferences',
     $temp->add(new admin_setting_configselect('navsortmycoursessort', new lang_string('navsortmycoursessort', 'admin'), new lang_string('navsortmycoursessort_help', 'admin'), 'sortorder', $sortoptions));
     $temp->add(new admin_setting_configtext('navcourselimit',new lang_string('navcourselimit','admin'),new lang_string('confignavcourselimit', 'admin'),20,PARAM_INT));
     $temp->add(new admin_setting_configcheckbox('usesitenameforsitepages', new lang_string('usesitenameforsitepages', 'admin'), new lang_string('configusesitenameforsitepages', 'admin'), 0));
-    $temp->add(new admin_setting_configcheckbox('linkadmincategories', new lang_string('linkadmincategories', 'admin'), new lang_string('linkadmincategories_help', 'admin'), 0));
+    $temp->add(new admin_setting_configcheckbox('linkadmincategories', new lang_string('linkadmincategories', 'admin'), new lang_string('linkadmincategories_help', 'admin'), 1));
     $temp->add(new admin_setting_configcheckbox('linkcoursesections', new lang_string('linkcoursesections', 'admin'), new lang_string('linkcoursesections_help', 'admin'), 0));
     $temp->add(new admin_setting_configcheckbox('navshowfrontpagemods', new lang_string('navshowfrontpagemods', 'admin'), new lang_string('navshowfrontpagemods_help', 'admin'), 1));
     $temp->add(new admin_setting_configcheckbox('navadduserpostslinks', new lang_string('navadduserpostslinks', 'admin'), new lang_string('navadduserpostslinks_help', 'admin'), 1));
@@ -196,49 +196,6 @@ preferences,moodle|/user/preferences.php|preferences',
     $ADMIN->add('appearance', new admin_externalpage('resetemoticons', new lang_string('emoticonsreset', 'admin'),
         new moodle_url('/admin/resetemoticons.php'), 'moodle/site:config', true));
 
-
-    // The "media" subpage.
-    $temp = new admin_settingpage('mediasettings', get_string('mediasettings', 'core_media'));
-
-    $temp->add(new admin_setting_heading('mediaformats', get_string('mediaformats', 'core_media'),
-            format_text(get_string('mediaformats_desc', 'core_media'), FORMAT_MARKDOWN)));
-
-    // External services.
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_youtube',
-            get_string('siteyoutube', 'core_media'), get_string('siteyoutube_desc', 'core_media'), 1));
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_vimeo',
-            get_string('sitevimeo', 'core_media'), get_string('sitevimeo_desc', 'core_media'), 0));
-
-    // Options which require Flash.
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_mp3',
-            get_string('mp3audio', 'core_media'), get_string('mp3audio_desc', 'core_media'), 1));
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_flv',
-            get_string('flashvideo', 'core_media'), get_string('flashvideo_desc', 'core_media'), 1));
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_swf',
-            get_string('flashanimation', 'core_media'), get_string('flashanimation_desc', 'core_media'), 1));
-
-    // HTML 5 media.
-    // Audio now enabled by default so that it can provide a fallback for mp3 on devices without flash.
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_html5audio',
-            get_string('html5audio', 'core_media'), get_string('html5audio_desc', 'core_media'), 1));
-    // Video now enabled by default so it can provide mp4 support.
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_html5video',
-            get_string('html5video', 'core_media'), get_string('html5video_desc', 'core_media'), 1));
-
-    // Legacy players.
-    $temp->add(new admin_setting_heading('legacymediaformats',
-            get_string('legacyheading', 'core_media'), get_string('legacyheading_desc', 'core_media')));
-
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_qt',
-            get_string('legacyquicktime', 'core_media'), get_string('legacyquicktime_desc', 'core_media'), 1));
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_wmp',
-            get_string('legacywmp', 'core_media'), get_string('legacywmp_desc', 'core_media'), 1));
-    $temp->add(new admin_setting_configcheckbox('core_media_enable_rm',
-            get_string('legacyreal', 'core_media'), get_string('legacyreal_desc', 'core_media'), 1));
-
-    $ADMIN->add('appearance', $temp);
-
-
     // "documentation" settingpage
     $temp = new admin_settingpage('documentation', new lang_string('moodledocs'));
     $temp->add(new admin_setting_configtext('docroot', new lang_string('docroot', 'admin'), new lang_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
@@ -279,8 +236,11 @@ preferences,moodle|/user/preferences.php|preferences',
     $temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
     $ADMIN->add('appearance', $temp);
 
-    // link to tag management interface
-    $ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), $CFG->wwwroot.'/tag/manage.php', 'moodle/tag:manage'));
+    // Link to tag management interface.
+    $url = new moodle_url('/tag/manage.php');
+    $hidden = empty($CFG->usetags);
+    $page = new admin_externalpage('managetags', new lang_string('managetags', 'tag'), $url, 'moodle/tag:manage', $hidden);
+    $ADMIN->add('appearance', $page);
 
     $temp = new admin_settingpage('additionalhtml', new lang_string('additionalhtml', 'admin'));
     $temp->add(new admin_setting_heading('additionalhtml_heading', new lang_string('additionalhtml_heading', 'admin'), new lang_string('additionalhtml_desc', 'admin')));
index 2dbff19..bd759a7 100644 (file)
@@ -215,6 +215,28 @@ if ($hassiteconfig) {
         $plugin->load_settings($ADMIN, 'filtersettings', $hassiteconfig);
     }
 
+    // Media players.
+    $ADMIN->add('modules', new admin_category('mediaplayers', new lang_string('type_media_plural', 'plugin')));
+    $temp = new admin_settingpage('managemediaplayers', new lang_string('managemediaplayers', 'media'));
+    $temp->add(new admin_setting_heading('mediaformats', get_string('mediaformats', 'core_media'),
+        format_text(get_string('mediaformats_desc', 'core_media'), FORMAT_MARKDOWN)));
+    $temp->add(new admin_setting_managemediaplayers());
+    $temp->add(new admin_setting_heading('managemediaplayerscommonheading', new lang_string('commonsettings', 'admin'), ''));
+    $temp->add(new admin_setting_configtext('media_default_width',
+        new lang_string('defaultwidth', 'core_media'), new lang_string('defaultwidthdesc', 'core_media'),
+        400, PARAM_INT, 10));
+    $temp->add(new admin_setting_configtext('media_default_height',
+        new lang_string('defaultheight', 'core_media'), new lang_string('defaultheightdesc', 'core_media'),
+        300, PARAM_INT, 10));
+    $ADMIN->add('mediaplayers', $temp);
+
+    $plugins = core_plugin_manager::instance()->get_plugins_of_type('media');
+    core_collator::asort_objects_by_property($plugins, 'displayname');
+    foreach ($plugins as $plugin) {
+        /** @var \core\plugininfo\media $plugin */
+        $plugin->load_settings($ADMIN, 'mediaplayers', $hassiteconfig);
+    }
+
     // Data format settings.
     $ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
     $temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
index c892566..1d89d42 100644 (file)
@@ -118,8 +118,15 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
     $temp->add(new admin_setting_configcheckbox('cookiehttponly', new lang_string('cookiehttponly', 'admin'), new lang_string('configcookiehttponly', 'admin'), 0));
     $temp->add(new admin_setting_configcheckbox('allowframembedding', new lang_string('allowframembedding', 'admin'), new lang_string('allowframembedding_help', 'admin'), 0));
     $temp->add(new admin_setting_configcheckbox('loginpasswordautocomplete', new lang_string('loginpasswordautocomplete', 'admin'), new lang_string('loginpasswordautocomplete_help', 'admin'), 0));
-    $ADMIN->add('security', $temp);
 
+    // Settings elements used by the \core\files\curl_security_helper class.
+    $temp->add(new admin_setting_configmixedhostiplist('curlsecurityblockedhosts',
+               new lang_string('curlsecurityblockedhosts', 'admin'),
+               new lang_string('curlsecurityblockedhostssyntax', 'admin'), ""));
+    $temp->add(new admin_setting_configportlist('curlsecurityallowedport',
+               new lang_string('curlsecurityallowedport', 'admin'),
+               new lang_string('curlsecurityallowedportsyntax', 'admin'), ""));
+    $ADMIN->add('security', $temp);
 
     // "notifications" settingpage
     $temp = new admin_settingpage('notifications', new lang_string('notifications', 'admin'));
index 2775a5f..a228caf 100644 (file)
@@ -26,7 +26,6 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
     die(); // No access from web!
 }
 
-define('BEHAT_UTIL', true);
 define('CLI_SCRIPT', true);
 define('ABORT_AFTER_CONFIG', true);
 define('CACHE_DISABLE_ALL', true);
index 9edf445..b867c58 100644 (file)
@@ -60,9 +60,9 @@ Feature: Verify that all form fields values can be get and set
       | HTML format | Student page contents |
     And I press "Save"
     Then I should see "Student page contents" in the "region-main" "region"
-    And I follow "Edit"
+    And  I click on "Edit" "link" in the "Administration" "block"
     # Select (multi-select) - Checking "I set the field".
-    And I follow "Edit settings"
+    And I click on "Edit settings" "link" in the "Administration" "block"
     And I expand all fieldsets
     # Checkbox - Checking "I set the field".
     And I set the field "Display description on course page" to "1"
@@ -75,7 +75,7 @@ Feature: Verify that all form fields values can be get and set
     And I press "Save and return to course"
     And I should see "Test this one"
     And I follow "Test this one"
-    And I follow "Edit settings"
+    And I click on "Edit settings" "link" in the "Administration" "block"
     # Checkbox - Checking "the field matches value" and "the following fields match these values".
     And the following fields match these values:
       | Display description on course page | 1 |
@@ -91,7 +91,7 @@ Feature: Verify that all form fields values can be get and set
     # Select (simple) - Checking "I set the field".
     And I set the field "Group mode" to "Separate groups"
     And I press "Save and display"
-    And I follow "Edit settings"
+    And I click on "Edit settings" "link" in the "Administration" "block"
     And the following fields match these values:
       | Default format | NWiki |
       | Group mode | Separate groups |
@@ -158,7 +158,7 @@ Feature: Verify that all form fields values can be get and set
     And the "available[day]" "field" should be enabled
     And the field "deadline[enabled]" matches value "1"
     And I press "Save and display"
-    And I follow "Edit settings"
+    And I click on "Edit settings" "link" in the "Administration" "block"
     And the field "available[enabled]" matches value "1"
     And the "available[day]" "field" should be enabled
     And the field "deadline[enabled]" matches value "1"
index 1c54765..6981227 100644 (file)
@@ -31,9 +31,8 @@ Feature: Transform steps arguments
     And I press "Update profile"
     And I click on "Edit profile" "link" in the "region-main" "region"
     Then I should not see "NASTYSTRING"
-    # BEHAT Transformation regression - See MDL-56397
-    #And the field "Surname" matches value "$NASTYSTRING1"
-    #And the field "City/town" matches value "$NASTYSTRING3"
+    And the field "Surname" matches value "$NASTYSTRING1"
+    And the field "City/town" matches value "$NASTYSTRING3"
 
   Scenario: Use double quotes
     When I set the following fields to these values:
@@ -57,5 +56,4 @@ Feature: Transform steps arguments
     And I should see "My Firstname"
     And I should see "My Surname"
     And the field "First name" matches value "My Firstname $NASTYSTRING1"
-    # BEHAT Transformation regression - See MDL-56397
-    #And the field "Surname" matches value "My Surname $NASTYSTRING2"
+    And the field "Surname" matches value "My Surname $NASTYSTRING2"
index bf43258..3ea368c 100644 (file)
@@ -184,6 +184,8 @@ class controller {
 
         if ($updated) {
             $this->info[] = get_string('langupdatecomplete', 'tool_langimport');
+            // The strings have been changed so we need to purge their cache to ensure users see the changes.
+            get_string_manager()->reset_caches();
         } else {
             $this->info[] = get_string('nolangupdateneeded', 'tool_langimport');
         }
index f249b03..627c7b7 100644 (file)
Binary files a/admin/tool/lp/amd/build/menubar.min.js and b/admin/tool/lp/amd/build/menubar.min.js differ
index 0434b56..4673e3d 100644 (file)
@@ -258,7 +258,7 @@ define(['jquery'], function($) {
     Menubar.prototype.setOpenDirection = function() {
         var pos = this.menuRoot.offset();
         var isRTL = $(document.body).hasClass('dir-rtl');
-        var openLeft = false;
+        var openLeft = true;
         var heightmenuRoot = this.rootMenus.outerHeight();
         var widthmenuRoot = this.rootMenus.outerWidth();
         // Sometimes the menuMinWidth is not enough to figure out if menu exceeds the window width.
@@ -794,6 +794,7 @@ define(['jquery'], function($) {
         this.allItems.addClass('tool-lp-menu-item');
         this.rootMenus.addClass('tool-lp-root-menu');
         this.subMenus.addClass('tool-lp-sub-menu');
+        this.subMenuItems.addClass('dropdown-item');
     };
 
     return /** @alias module:tool_lp/menubar */ {
index a22ac9f..cd00a6f 100644 (file)
@@ -50,7 +50,8 @@ class cohort_summary_exporter extends \core_competency\external\exporter {
             ),
             'idnumber' => array(
                 'type' => PARAM_RAW,        // ID numbers are plain text.
-                'default' => ''
+                'default' => '',
+                'null' => NULL_ALLOWED
             ),
             'visible' => array(
                 'type' => PARAM_BOOL,
index 6107047..9505332 100644 (file)
@@ -91,7 +91,7 @@ class framework_autocomplete extends MoodleQuickForm_autocomplete {
         $ids = array();
 
         foreach ($values as $onevalue) {
-            if ((!$this->optionExists($onevalue)) &&
+            if (!empty($onevalue) && (!$this->optionExists($onevalue)) &&
                     ($onevalue !== '_qf__force_multiselect_submission')) {
                 array_push($ids, $onevalue);
             }
index 3864cbf..7a2181b 100644 (file)
@@ -74,6 +74,12 @@ class manage_competency_frameworks_page implements renderable, templatable {
                 'get'
             );
             $this->navigation[] = $addpage;
+            $competenciesrepository = new single_button(
+                new moodle_url('https://moodle.net/competencies'),
+                get_string('competencyframeworksrepository', 'tool_lp'),
+                'get'
+            );
+            $this->navigation[] = $competenciesrepository;
         }
 
         $this->competencyframeworks = api::list_frameworks('shortname', 'ASC', 0, 0, $this->pagecontext);
index 412419d..4719b6c 100644 (file)
@@ -61,6 +61,7 @@ $string['competencyframeworkcreated'] = 'Competency framework created.';
 $string['competencyframeworkname'] = 'Name';
 $string['competencyframeworkroot'] = 'No parent (top-level competency)';
 $string['competencyframeworks'] = 'Competency frameworks';
+$string['competencyframeworksrepository'] = 'Competency frameworks repository';
 $string['competencyframeworkupdated'] = 'Competency framework updated.';
 $string['competencyoutcome_complete'] = 'Mark as complete';
 $string['competencyoutcome_evidence'] = 'Attach an evidence';
index 7f1ba9c..aed8874 100644 (file)
@@ -142,7 +142,7 @@ function tool_lp_coursemodule_standard_elements($formwrapper, $mform) {
     $mform->addElement('header', 'competenciessection', get_string('competencies', 'core_competency'));
 
     MoodleQuickForm::registerElementType('course_competencies',
-                                         "$CFG->dirroot/admin/tool/lp/classes/course_competencies_form_element.php",
+                                         "$CFG->dirroot/$CFG->admin/tool/lp/classes/course_competencies_form_element.php",
                                          'tool_lp_course_competencies_form_element');
     $cmid = null;
     if ($cm = $formwrapper->get_coursemodule()) {
@@ -155,7 +155,7 @@ function tool_lp_coursemodule_standard_elements($formwrapper, $mform) {
     $mform->addElement('course_competencies', 'competencies', get_string('modcompetencies', 'tool_lp'), $options);
     $mform->addHelpButton('competencies', 'modcompetencies', 'tool_lp');
     MoodleQuickForm::registerElementType('course_competency_rule',
-                                         "$CFG->dirroot/admin/tool/lp/classes/course_competency_rule_form_element.php",
+                                         "$CFG->dirroot/$CFG->admin/tool/lp/classes/course_competency_rule_form_element.php",
                                          'tool_lp_course_competency_rule_form_element');
     // Reuse the same options.
     $mform->addElement('course_competency_rule', 'competency_rule', get_string('uponcoursemodulecompletion', 'tool_lp'), $options);
index e811b9a..73e7313 100644 (file)
 }
 
 .tool-lp-menu.tool-lp-menu-open-left .tool-lp-sub-menu {
-    margin-left: -120px;
+    left: auto;
+    right: 0;
 }
 
 /** This highlighting is copied from bootstrap - but can be overridden by a theme */
index 1f307a7..7ebb157 100644 (file)
@@ -15,6 +15,8 @@
     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 }}
 {{!
+    @template tool_lp/action_selector
+
     Select an action to execute.
 
     Classes required for JS:
     * choices - List of possible actions
     * confirm - Text for button confirms
     * cancel -  Text for button cancel
- }}
+
+    Example context (json):
+    {
+        "message": "Message",
+        "choices": [
+            { "value": "1", "text": "One" },
+            { "value": "2", "text": "Two" }
+        ],
+        "confirm": "Confirm",
+        "cancel": "Cancel"
+    }
+}}
 <div data-region="action-selector">
     <div data-region="action-selector-message">
        {{message}}<br>
     </div><br>
     <div data-region="action-selector-radio-buttons">
        {{#choices}}
-        <input id="action-selection-option-{{value}}" type="radio" name="choice" value="{{value}}"/><label for="action-selection-option-{{value}}">{{text}}</label><br>
+        <input id="action-selection-option-{{value}}" type="radio" class="m-r-1" name="choice" value="{{value}}"/><label for="action-selection-option-{{value}}">{{text}}</label><br>
        {{/choices}}
     </div><br>
     <div data-region="action_selector-buttons">
-       <input type="button" data-action="action-selector-confirm" value="{{confirm}}"/>
-       <input type="button" data-action="action-selector-cancel" value="{{cancel}}"/>
+       <input type="button" data-action="action-selector-confirm" class="btn btn-primary" value="{{confirm}}"/>
+       <input type="button" data-action="action-selector-cancel" class="btn btn-secondary" value="{{cancel}}"/>
     </div>
 </div>
index e2ac064..a93697a 100644 (file)
@@ -45,6 +45,7 @@
     * template
     * uniqid
 
+    // This template has no example context because it would trigger real updates to the DB.
     Example context (json):
     {
     }
index d6ae8e6..06b5e24 100644 (file)
@@ -15,6 +15,8 @@
     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 }}
 {{!
+    @template tool_lp/competencies_move_tree
+
     Manage competencies template.
 
     Classes required for JS:
     Context variables required for this template:
     * framework -
     * competencies - array of objects containing id, shortname, idnumber, sortorder, parentid, competencyframeworkid, path
+
+    Example context (json):
+    {
+        "framework": {
+            "shortname":"framework"
+        },
+        "competencies": [
+            { "name": "Competency", "id": 1 }
+        ]
+    }
 }}
 <div data-region="competencymovetree" >
 <label>{{#str}}selectcompetencymovetarget, tool_lp{{/str}}</label>
@@ -41,7 +53,8 @@
 </ul>
 </div>
 
-<div data-region="move-buttons">
-    <input type="button" data-action="move" value="{{#str}}move{{/str}}"/>
-    <input type="button" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
+<div data-region="move-buttons" class="pull-xs-right">
+    <input type="button" data-action="move" class="btn btn-primary" value="{{#str}}move{{/str}}"/>
+    <input type="button" data-action="cancel" class="btn btn-secondary" value="{{#str}}cancel{{/str}}"/>
 </div>
+<div class="clearfix"></div>
index 75c2282..73ded30 100644 (file)
@@ -1,3 +1,54 @@
+{{!
+    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/competencies_tree
+
+    Recursively build a competencies tree.
+
+    Classes required for JS:
+
+    Data attibutes required for JS:
+    * data-enhance=movetree
+
+    Context variables required for this template:
+    * id, shortname, idnumber, sortorder, parentid, competencyframeworkid, path, children
+
+    Example context (json):
+    {
+        "id": 1,
+        "shortname": "short",
+        "idnumber": "SHORT",
+        "sortorder": 1,
+        "parentid": 0,
+        "competencyframeworkid": 1,
+        "path": "/",
+        "haschildren": true,
+        "children": [{
+            "id": 2,
+            "shortname": "child",
+            "idnumber": "CHILD",
+            "sortorder": 1,
+            "parentid": 1,
+            "competencyframeworkid": 1,
+            "path": "/1/",
+            "children": []
+        }]
+    }
+}}
 <li data-id="{{id}}">
     {{#canmanage}}
     <span draggable="true">
index d138fe1..ed911f7 100644 (file)
@@ -1,4 +1,49 @@
-<ul data-enhance="tree">
+{{!
+    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/competencies_tree_root
+
+    Recursively build a competencies tree.
+
+    Classes required for JS:
+
+    Data attibutes required for JS:
+    * data-enhance=movetree
+
+    Context variables required for this template:
+    * id, shortname, idnumber, sortorder, parentid, competencyframeworkid, path, children
+
+    Example context (json):
+    {
+        "shortname": "short",
+        "haschildren": true,
+        "competencies": [{
+            "id": 2,
+            "shortname": "child",
+            "idnumber": "CHILD",
+            "sortorder": 1,
+            "parentid": 1,
+            "competencyframeworkid": 1,
+            "path": "/1/",
+            "children": []
+        }]
+    }
+}}
+<ul data-enhance="tree" class="competency-tree">
     <li><span>{{{shortname}}}</span>
         <ul>
             {{#competencies}}
index 6b47042..20060b7 100644 (file)
@@ -1,26 +1,59 @@
+{{!
+    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/competency_grader
+
+    Template for grading a competency.
+
+    Classes required for JS:
+      None
+
+    Data required for JS:
+    * ratings - list of value, name selected for valid ratings
+
+    Example context (json):
+    {
+        "ratings": [
+            {"name": "Bad", "value": 0, "selected": true},
+            {"name": "OK", "value": 1},
+            {"name": "Good", "value": 2}
+        ]
+    }
+}}
 <div class="competency-grader" data-region="competency-grader">
     <form>
         <div class="content">
             <div data-region="rating">
                 <label for="rating_{{uniqid}}">{{#str}}rating, tool_lp{{/str}}</label>
-                <select name="rating" id="rating_{{uniqid}}">
+                <select name="rating" id="rating_{{uniqid}}" class="custom-select">
                     {{#ratings}}
                         <option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
                     {{/ratings}}
                 </select>
             </div>
-            <div data-region="comment">
+            <div data-region="comment" class="m-t-1">
                 <label for="comment_{{uniqid}}">{{#str}}ratecomment, tool_lp{{/str}}</label>
-                <textarea name="comment" id="comment_{{uniqid}}"></textarea>
+                <textarea name="comment" id="comment_{{uniqid}}" class="form-control m-b-1"></textarea>
             </div>
         </div>
-        <div data-region="footer">
-            <div class="pull-right">
-                <input type="button" data-action="rate" value="{{#str}}rate, tool_lp{{/str}}" class="btn">
-            </div>
-            <div>
-                <button data-action="cancel" class="btn btn-link">{{#str}}cancel{{/str}}</button>
-            </div>
+        <div data-region="footer" class="pull-xs-right">
+            <input type="button" data-action="rate" value="{{#str}}rate, tool_lp{{/str}}" class="btn btn-primary">
+            <button data-action="cancel" class="btn btn-secondary">{{#str}}cancel{{/str}}</button>
         </div>
+        <div class="clearfix"></div>
     </form>
 </div>
index f756098..96afe15 100644 (file)
@@ -15,6 +15,8 @@
     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 }}
 {{!
+    @template tool_lp/competency_path
+
     Competency path template.
 
     Classes required for JS:
     * framework - The competency framework
       * id - competency id
       * name - competency idnumber
-      * first - true if node is in first position
-      * last - true if node is in last position
-      * position - the position of the node in the list
 
     * ancestors - array of nodes
       * id - competency id
       * name - competency idnumber
       * first - true if node is in first position
       * last - true if node is in last position
-      * position - the position of the node in the list
 
     * pluginbaseurl - base url of plugin tool_lp
+
+    Example context (json):
+    {
+        "framework": {
+            "id": "1",
+            "name": "Framework"
+        },
+        "ancestors": [
+            {
+                "id": "1",
+                "name": "C1"
+            },
+            {
+                "id": "1",
+                "name": "C2",
+                "last": true
+            }
+        ]
+    }
 }}
 <nav id="competency-path-{{uniqid}}">
     <small>
index 916522b..f9693d0 100644 (file)
@@ -1,20 +1,75 @@
+{{!
+    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/competency_picker
+
+    Show a competency tree and allow picking a competency.
+
+    Context variables required for this template:
+    * frameworks - array of competency framework
+      * id
+      * shortname
+      * idnumber
+      * selected
+
+    * framework - competency framework
+      * id
+      * name
+      * shortname
+      * idnumber
+
+    * competencies - array of nodes
+      * id - competency id
+      * name - competency idnumber
+      * children - array of children
+      * haschildren - boolean
+
+    Example context (json):
+    {
+        "frameworks": [
+            {
+                "id": "1",
+                "shortname": "Framework",
+                "idnumber": "F1"
+            }
+        ],
+        "competencies": [
+        ]
+    }
+}}
 <div data-region="competencylinktree">
 {{^singleFramework}}
 <h3>{{#str}}competencyframeworks, tool_lp{{/str}}</h3>
-<select data-action="chooseframework">
+<select data-action="chooseframework" class="custom-select">
 {{#frameworks}}
 <option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{{shortname}}} <em>{{idnumber}}</em></option>
 {{/frameworks}}
 </select>
 {{/singleFramework}}
-<h3>{{#str}}locatecompetency, tool_lp{{/str}}</h3>
+<h3 class="m-t-1">{{#str}}locatecompetency, tool_lp{{/str}}</h3>
 
-<form data-region="filtercompetencies" data-frameworkid="{{framework.id}}">
-    <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
-    <input type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
-    <button>{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
+<form data-region="filtercompetencies" class="form-inline" data-frameworkid="{{framework.id}}">
+    <div class="form-group">
+        <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
+        <input type="text" class="form-control" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
+        <button class="btn btn-secondary">{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
+    </div>
 </form>
-<ul data-enhance="linktree" style="display: none;">
+<ul data-enhance="linktree" style="display: none;" class="m-t-1 competency-tree">
     <li><span>{{{framework.shortname}}}</span>
         <ul>
             {{#competencies}}
@@ -23,8 +78,9 @@
         </ul>
     </li>
 </ul>
-<div data-region="link-buttons">
-    <input type="button" data-action="add" value="{{#str}}add{{/str}}"/>
-    <input type="button" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
+<div data-region="link-buttons" class="m-t-1 pull-xs-right">
+    <input type="button" class="btn btn-primary" data-action="add" value="{{#str}}add{{/str}}"/>
+    <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
 </div>
+<div class="clearfix"></div>
 </div>
index e255dfd..08b38ef 100644 (file)
@@ -1,12 +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/competency_picker_competencyform
+
+    Show a competency tree and allow picking a competency.
+
+    Context variables required for this template:
+    * framework - The competency framework
+      * id
+      * name
+      * shortname
+
+    * competencies - array of nodes
+      * id - competency id
+      * name - competency idnumber
+      * children - array of children
+      * haschildren - boolean
+
+    Example context (json):
+    {
+        "framework": {
+            "id": "1",
+            "name": "Framework"
+        },
+        "competencies": [
+        ]
+    }
+}}
 <div data-region="competencylinktree">
 <h3>{{#str}}locatecompetency, tool_lp{{/str}}</h3>
 
-<form data-region="filtercompetencies" data-frameworkid="{{framework.id}}">
-    <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
-    <input type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
-    <button>{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
+<form data-region="filtercompetencies" class="form-inline" data-frameworkid="{{framework.id}}">
+    <div class="form-group">
+        <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
+        <input type="text" class="form-control" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
+        <button class="btn btn-secondary">{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
+    </div>
 </form>
-<ul data-enhance="linktree" style="display: none;">
+<ul data-enhance="linktree" style="display: none;" class="m-t-1 competency-tree">
     <li data-id="0"><span>{{{framework.shortname}}}</span>
         <ul>
             {{#competencies}}
@@ -15,8 +60,9 @@
         </ul>
     </li>
 </ul>
-<div data-region="link-buttons">
-    <input type="button" data-action="add" value="{{#str}}select{{/str}}"/>
-    <input type="button" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
+<div data-region="link-buttons" class="m-t-1 pull-xs-right">
+    <input type="button" class="btn btn-primary" data-action="add" value="{{#str}}select{{/str}}"/>
+    <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
 </div>
+<div class="clearfix"></div>
 </div>
index bddebc9..7ee035d 100644 (file)
@@ -1,22 +1,80 @@
+{{!
+    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/competency_picker_user_plans
+
+    Show a competency tree and allow picking a competency.
+
+    Context variables required for this template:
+    * singlePlan - boolean
+
+    * plans - array of plans
+      * id
+      * selected
+      * name
+
+    * plan
+      * id
+      * name
+
+    * competencies - array of nodes
+      * id - competency id
+      * name - competency idnumber
+      * children - array of children
+      * haschildren - boolean
+
+    Example context (json):
+    {
+        "singlePlan": false,
+        "plans": [
+            {
+                "id": "1",
+                "name": "Plan"
+            }
+        ],
+        "plan": {
+            "id": "1",
+            "name": "Plan"
+        },
+        "competencies": []
+    }
+}}
+
 <div data-region="competencylinktree">
 {{^singlePlan}}
     <h3>{{#str}}learningplans, tool_lp{{/str}}</h3>
-    <select data-action="chooseplan">
+    <select data-action="chooseplan" class="custom-select">
     {{#plans}}
         <option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{{name}}}</option>
     {{/plans}}
     </select>
 {{/singlePlan}}
 
-<h3>{{#str}}locatecompetency, tool_lp{{/str}}</h3>
+<h3 class="m-t-1">{{#str}}locatecompetency, tool_lp{{/str}}</h3>
 
-<form data-region="filtercompetencies" data-planid="{{plan.id}}">
-    <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
-    <input type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
-    <button>{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
+<form data-region="filtercompetencies" data-planid="{{plan.id}}" class="form-inline">
+    <div class="form-group">
+        <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
+        <input type="text" class="form-control" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
+        <button class="btn btn-secondary">{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
+    </div>
 </form>
 
-<ul data-enhance="linktree" style="display: none;">
+<ul data-enhance="linktree" style="display: none;" class="m-t-1 competency-tree">
     <li><span>{{{plan.name}}}</span>
         <ul>
             {{#competencies}}
@@ -26,9 +84,9 @@
     </li>
 </ul>
 
-<div data-region="link-buttons">
-    <input type="button" data-action="add" value="{{#str}}add{{/str}}"/>
-    <input type="button" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
+<div data-region="link-buttons" class="m-t-1 pull-xs-right">
+    <input type="button" class="btn btn-primary" data-action="add" value="{{#str}}add{{/str}}"/>
+    <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
 </div>
-
+<div class="clearfix"></div>
 </div>
index d3eb766..d658ea3 100644 (file)
@@ -1,15 +1,48 @@
-<div class="pull-right well">
+{{!
+    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/competency_plan_navigation
+
+    Show an auto-complete for jumping to competencies in a plan.
+
+    Context variables required for this template:
+    * hascompetencies - boolean
+    * competencies - array of competencies
+      * id
+      * shortname
+      * idnumber
+      * selected
+    * userid
+    * competencyid
+    * planid
+
+    // No example context because the JS is connected to webservices
+}}
+<div class="pull-xs-right card card-block">
 {{#hascompetencies}}
 <span>
 <label for="competency-nav-{{uniqid}}" class="accesshide">{{#str}}jumptocompetency, tool_lp{{/str}}</label>
-<select id="competency-nav-{{uniqid}}">
+<select class="custom-select" id="competency-nav-{{uniqid}}">
 {{#competencies}}
 <option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{{shortname}}} {{idnumber}}</option>
 {{/competencies}}
 </select>
 </span>
 {{/hascompetencies}}
-</form>
 </div>
 {{#js}}
 require(['core/form-autocomplete', 'tool_lp/competency_plan_navigation'], function(autocomplete, nav) {
index 7c64ab6..b0e9db8 100644 (file)
@@ -1,3 +1,54 @@
+{{!
+    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/competency_rule_config
+
+    Configuration dialogue for competency rules.
+
+    Context variables required for this template:
+    * config - boolean
+    * outcomes - array
+      * code
+      * name
+      * selected
+    * rules - array
+      * type
+      * name
+      * selected
+
+    Example context (json):
+    {
+        "config": true,
+        "outcomes": [
+            {
+                "code": "C1",
+                "name": "Complete",
+                "selected": true
+            }
+        ],
+        "rules": [
+            {
+                "type": "Type",
+                "name": "Something happens",
+                "selected": true
+            }
+        ]
+    }
+}}
 <div data-region="competencyruleconfig">
     <div data-region="content">
 
         {{/config}}
 
         {{#config}}
-        <div data-region="rule-base">
-            <div data-region="rule-outcome">
+        <div data-region="rule-base" class="form">
+            <div data-region="rule-outcome" class="form-group">
                 <label>{{#str}}outcome, tool_lp{{/str}}</label>
-                <select name="outcome" ng-label="{{#str}}outcome, tool_lp{{/str}}">
+                <select name="outcome" class="custom-select" ng-label="{{#str}}outcome, tool_lp{{/str}}">
                     {{#outcomes}}
                     <option value="{{code}}" {{#selected}}selected{{/selected}}>{{name}}</option>
                     {{/outcomes}}
                 </select>
             </div>
-            <div data-region="rule-type">
+            <div data-region="rule-type" class="form-group">
                 <label>{{#str}}when, tool_lp{{/str}}</label>
-                <select name="rule" ng-label="{{#str}}when, tool_lp{{/str}}">
+                <select name="rule" class="custom-select" ng-label="{{#str}}when, tool_lp{{/str}}">
                     <option value="-1">{{#str}}choosedots{{/str}}</option>
                     {{#rules}}
                     <option value="{{type}}" {{#selected}}selected{{/selected}}>{{name}}</option>
         {{/config}}
     </div>
 
-    <div data-region="footer">
+    <div data-region="footer" class="pull-xs-right">
         {{#config}}
-        <input type="button" data-action="save" value="{{#str}}savechanges{{/str}}"/>
+        <input type="button" class="btn btn-primary" data-action="save" value="{{#str}}savechanges{{/str}}"/>
         {{/config}}
-        <input type="button" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
+        <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
     </div>
 </div>
index 907e731..07e4392 100644 (file)
@@ -1,3 +1,43 @@
+{{!
+    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/competency_rule_points
+
+    Configuration dialogue for competency points rule.
+
+    Context variables required for this template:
+    * children
+      * id
+      * shortname
+      * points
+    * requiredpoints
+
+    Example context (json):
+    {
+        "children": [
+            {
+                "id": "1",
+                "shortname": "Competency",
+                "points": 2
+            }
+        ],
+        "requiredpoints": 4
+    }
+}}
 <div class="competency-rule-points">
     <table class="table table-condensed">
         <thead>
@@ -13,7 +53,7 @@
                 <th scope="row">{{{shortname}}}</th>
                 <td>
                     <label class="accesshide" for="pointsforcompetency-{{id}}">{{#str}}pointsgivenfor, tool_lp, {{{competency.shortname}}}{{/str}}</label>
-                    <input id="pointsforcompetency-{{id}}" type="number" min="0" value="{{points}}" name="points" />
+                    <input id="pointsforcompetency-{{id}}" type="number" min="0" value="{{points}}" name="points" class="form-control"/>
                 </td>
                 <td>
                     <label class="accesshide" for="competency-{{id}}-isrequired">{{#str}}aisrequired, tool_lp, {{{competency.shortname}}}{{/str}}</label>
@@ -25,7 +65,7 @@
         <tfoot>
             <tr>
                 <th scope="row">{{#str}}totalrequiredtocomplete, tool_lp{{/str}}</th>
-                <td><input type="number" min="1" value="{{requiredpoints}}" name="requiredpoints" aria-label="{{#str}}totalrequiredtocomplete, tool_lp{{/str}}"></td>
+                <td><input type="number" min="1" value="{{requiredpoints}}" name="requiredpoints" aria-label="{{#str}}totalrequiredtocomplete, tool_lp{{/str}}" class="form-control"></td>
                 <td> </td>
             </tr>
         </tfoot>
index b1bca28..1ce22b1 100644 (file)
@@ -1,3 +1,53 @@
+{{!
+    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/competency_summary
+
+    Summary of a competency
+
+    Context variables required for this template:
+    * competency
+      * id
+      * shortname
+      * idnumber
+      * description
+    * framework
+      * shortname
+    * comppath array of ancestors
+    * showrelatedcompetencies boolean
+    * related
+    * showrule boolean
+    * rule
+      * outcome
+      * type
+
+    Example context (json):
+    {
+        "competency": {
+            "id": 1,
+            "shortname": "C1",
+            "idnumber": "PATH",
+            "description": "Can do something"
+        },
+        "framework": {
+            "shortname": "F1"
+        }
+    }
+}}
 <div class='competency-heading'>
     <h4 id="competency_link_{{competency.id}}">{{{competency.shortname}}}
         <small>{{competency.idnumber}}</small>
index 674eed6..eaa0f43 100644 (file)
 }}
 {{!
     Course competencies template.
+
+    For a full list of the context for this template see the course_competencies_page renderable.
 }}
 <div data-region="coursecompetenciespage">
     <div data-region="actions" class="clearfix">
-        <div class="pull-left">
+        <div class="pull-xs-left">
             {{#canmanagecoursecompetencies}}
-                <button disabled>{{#str}}addcoursecompetencies, tool_lp{{/str}}</button>
+                <button class="btn btn-secondary" disabled>{{#str}}addcoursecompetencies, tool_lp{{/str}}</button>
             {{/canmanagecoursecompetencies}}
         </div>
     </div>
     <tr class="drag-samenode" data-id="{{competency.id}}">
     <td>
         {{#canmanagecoursecompetencies}}
-        <span class="drag-handlecontainer pull-left"></span>
-        <div class="pull-right">
+        <span class="drag-handlecontainer pull-xs-left"></span>
+        <div class="pull-xs-right">
             <a href="#" data-action="delete-competency-link" data-id="{{competency.id}}">
                 {{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}
             </a>
         </div>
+        <div class="clearfix"></div>
         {{/canmanagecoursecompetencies}}
         {{#competency}}
             <a href="{{pluginbaseurl}}user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
@@ -71,7 +74,7 @@
             <p>{{{competency.description}}}</p>
         {{/competency}}
         {{#comppath}}
-            <span class="pull-left">{{#str}}path, tool_lp{{/str}}&nbsp;</span>{{> tool_lp/competency_path }}
+            <span class="pull-xs-left">{{#str}}path, tool_lp{{/str}}&nbsp;</span>{{> tool_lp/competency_path }}
         {{/comppath}}
         {{#usercompetencycourse}}
             {{#grade}}
@@ -82,7 +85,7 @@
         <div data-region="coursecompetency-ruleoutcome">
             <label>
                 {{#str}}uponcoursecompletion, tool_lp{{/str}}
-                <select data-field="ruleoutcome" data-id="{{coursecompetency.id}}">
+                <select data-field="ruleoutcome" data-id="{{coursecompetency.id}}" class="custom-select">
                   {{#ruleoutcomeoptions}}
                      <option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
                   {{/ruleoutcomeoptions}}
         {{/canmanagecoursecompetencies}}
         <div data-region="coursecompetencyactivities">
         <p>
-        <ul class="inline">
+        <ul class="inline list-inline">
         {{#coursemodules}}
-            <li><a href="{{url}}"><img src="{{iconurl}}"> {{name}} </a></li>
+            <li class="list-inline-item"><a href="{{url}}"><img src="{{iconurl}}"> {{name}} </a></li>
         {{/coursemodules}}
         {{^coursemodules}}
-            <li><span class="alert">{{#str}}noactivities, tool_lp{{/str}}</span></li>
+            <li class="list-inline-item"><span class="alert">{{#str}}noactivities, tool_lp{{/str}}</span></li>
         {{/coursemodules}}
         </ul>
         </p>
index bc1e361..6992f7d 100644 (file)
@@ -1,3 +1,40 @@
+{{!
+    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/course_competency_settings
+
+    Select an action to execute.
+
+    Classes required for JS:
+    * none
+
+    Data attibutes required for JS:
+    * none
+
+    Context variables required for this template:
+    * courseid
+    * pushratingstouserplans
+
+    Example context (json):
+    {
+        "pushratingstouserplans": false,
+        "courseid": -1
+    }
+}}
 <form data-region="coursecompetencysettings">
     <input type="hidden" name="courseid" value="{{courseid}}"/>
     <fieldset>
         </label>
 
     </fieldset>
-    <fieldset>
-        <center>
-        <input type="button" data-action="save" value="{{#str}}savechanges{{/str}}"/>
-        <input type="button" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
-        </center>
+    <fieldset class="pull-xs-right">
+        <input type="button" class="btn btn-primary" data-action="save" value="{{#str}}savechanges{{/str}}"/>
+        <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
     </fieldset>
+    <div class="clearfix"></div>
 </form>
index bb4a267..9891b57 100644 (file)
     Example context (json):
     {
         "competencycount": 4,
+        "canbegradedincourse": true,
+        "canmanagecoursecompetencies": true,
         "proficientcompetencycount": 3,
         "proficientcompetencypercentage": 75,
-        "proficientcompetencypercentageformatted": 75.0
+        "proficientcompetencypercentageformatted": 75.0,
+        "leastproficientcount": 1,
+        "leastproficient": [
+            { "id": 1, "shortname": "Comp 1", "idnumber": "C1" }
+        ]
     }
 
 }}
index 64f1bc6..128fd9c 100644 (file)
@@ -46,7 +46,7 @@
 }}
 <div class="well well-small evidence" data-region="evidence" data-id="{{id}}">
     {{#candelete}}
-        <div class="pull-right">
+        <div class="pull-xs-right">
             <a href="#" data-action="delete-evidence">{{#pix}}t/delete{{/pix}}</a>
         </div>
     {{/candelete}}
@@ -57,7 +57,7 @@
 {{/actionuser}}
 <strong><time datetime="{{userdate}}">{{userdate}}</time></strong>
 {{#grade}}
-    <p><span class="label">{{gradename}}</span></p>
+    <p><span class="tag tag-info">{{gradename}}</span></p>
 {{/grade}}
 <p>{{description}}</p>
 {{#note}}
index 7208304..2e65cdb 100644 (file)
@@ -1,3 +1,48 @@
+{{!
+    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/linked_courses_summary
+
+    Moodle template for the list of linked courses to a competency
+
+    Classes required for JS:
+    * none
+
+    Data attributes required for JS:
+    * none
+
+    Context variables required for this template:
+    * courses array
+      * viewurl
+      * fullname
+      * shortname
+
+    Example context (json):
+    { "courses":
+        [
+            {
+                "viewurl": "http://example.com",
+                "fullname": "Course 1",
+                "shortname": "C1"
+            }
+        ]
+    }
+}}
+
 <p>
 {{#str}}coursesusingthiscompetency, tool_lp{{/str}}
 </p>
index fce2b3d..bf43b5d 100644 (file)
     {{/canmanage}}
 </h2>
 <div>{{{framework.description}}}</div>
-<h3>{{#str}}competencies, core_competency{{/str}}</h3>
-<div class="row-fluid">
-<div class="span6">
-<p>
-<form data-region="filtercompetencies" data-frameworkid="{{framework.id}}">
-    <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
-    <input type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
-    <button>{{#pix}}a/search, , {{#str}}search{{/str}}{{/pix}}</button>
-</form>
-</p>
-<ul data-enhance="tree">
-    {{> tool_lp/loading }}
-</ul>
-</div>
-
-<div class="span6 well">
-<h4 data-region="selected-competency">{{#str}}selectedcompetency, tool_lp{{/str}}</h4>
-<p data-region="competencyinfo">
-{{#str}}nocompetencyselected, tool_lp{{/str}}
-</p>
-{{#canmanage}}
-<div data-region="competencyactions">
-<button class="btn" data-action="add">{{#pix}}t/add{{/pix}} <span data-region="term"></span></button>
-            <span data-region="competencyactionsmenu">
-            <ul title="{{#str}}edit{{/str}}" class="competencyactionsmenu">
-                <li>
-                    <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
-                    <ul class="dropdown-menu">
-                        <li>
-                            <a href="#" data-action="edit">
-                                {{#pix}}t/edit{{/pix}} {{#str}}edit{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="move">
-                                {{#pix}}t/move{{/pix}} {{#str}}movetonewparent, tool_lp{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="delete">
-                                {{#pix}}t/delete{{/pix}} {{#str}}delete{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="moveup">
-                                {{#pix}}t/up{{/pix}} {{#str}}moveup{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="movedown">
-                                {{#pix}}t/down{{/pix}} {{#str}}movedown{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="linkedcourses">
-                                {{#pix}}t/viewdetails{{/pix}} {{#str}}linkedcourses, tool_lp{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="relatedcompetencies">
-                                {{#pix}}t/add{{/pix}} {{#str}}addcrossreferencedcompetency, tool_lp{{/str}}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="#" data-action="competencyrules">
-                                {{#pix}}t/edit{{/pix}} {{#str}}competencyrule, tool_lp{{/str}}
-                            </a>
-                        </li>
-                    </ul>
-                </li>
+    <h3>{{#str}}competencies, core_competency{{/str}}</h3>
+    <div class="row-fluid">
+        <div class="span6 col-lg-6">
+            <p>
+                <form data-region="filtercompetencies" data-frameworkid="{{framework.id}}" class="form-inline">
+                    <div class="form-group">
+                        <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
+                        <input class="form-control" type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
+                        <button class="btn btn-secondary">{{#pix}}a/search, , {{#str}}search{{/str}}{{/pix}}</button>
+                    </div>
+                </form>
+            </p>
+            <ul data-enhance="tree" class="competency-tree">
+                {{> tool_lp/loading }}
             </ul>
-            </span>
-</div>
-</div>
-{{/canmanage}}
+        </div>
+
+        <div class="span6 card col-lg-6">
+            <div class="card-block">
+                <div class="card-title">
+                    <h4 data-region="selected-competency">{{#str}}selectedcompetency, tool_lp{{/str}}</h4>
+                        <span data-region="competencyactionsmenu" class="pull-xs-right">
+                            <ul title="{{#str}}edit{{/str}}" class="competencyactionsmenu">
+                                <li>
+                                    <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
+                                    <ul class="dropdown dropdown-menu">
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="edit">
+                                            {{#pix}}t/edit{{/pix}} {{#str}}edit{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="move">
+                                            {{#pix}}t/move{{/pix}} {{#str}}movetonewparent, tool_lp{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="delete">
+                                            {{#pix}}t/delete{{/pix}} {{#str}}delete{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="moveup">
+                                            {{#pix}}t/up{{/pix}} {{#str}}moveup{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="movedown">
+                                            {{#pix}}t/down{{/pix}} {{#str}}movedown{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="linkedcourses">
+                                            {{#pix}}t/viewdetails{{/pix}} {{#str}}linkedcourses, tool_lp{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="relatedcompetencies">
+                                            {{#pix}}t/add{{/pix}} {{#str}}addcrossreferencedcompetency, tool_lp{{/str}}
+                                        </a>
+                                    </li>
+                                    <li class="dropdown-item">
+                                        <a href="#" data-action="competencyrules">
+                                            {{#pix}}t/edit{{/pix}} {{#str}}competencyrule, tool_lp{{/str}}
+                                        </a>
+                                    </li>
+                                </ul>
+                            </li>
+                        </ul>
+                    </span>
+                </div>
+                <p data-region="competencyinfo">
+                    {{#str}}nocompetencyselected, tool_lp{{/str}}
+                </p>
+                {{#canmanage}}
+                <div data-region="competencyactions">
+                    <button class="btn btn-secondary" data-action="add">{{#pix}}t/add{{/pix}} <span data-region="term"></span></button>
+                </div>
+                {{/canmanage}}
+            </div>
+        </div>
+    </div>
 </div>
 
 {{#js}}
@@ -131,4 +138,3 @@ require(['tool_lp/tree', 'tool_lp/competencytree', 'tool_lp/competencyactions',
 });
 {{/js}}
 
-</div>
index a901f4a..2fcac12 100644 (file)
             <ul title="{{#str}}edit{{/str}}" class="competencyframeworkactions">
                 <li>
                     <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
-                    <ul class="dropdown-menu">
-                        <li>
+                    <ul class="dropdown dropdown-menu">
+                        <li class="dropdown-item">
                             <a href="{{pluginbaseurl}}/editcompetencyframework.php?id={{id}}&amp;pagecontextid={{pagecontextid}}">
                                 {{#pix}}t/edit{{/pix}} {{#str}}edit{{/str}}
                             </a>
                         </li>
-                        <li>
+                        <li class="dropdown-item">
                             <a data-action="duplicatecompetencyframework" href="#" data-frameworkid="{{id}}">
                                 {{#pix}}t/copy{{/pix}} {{#str}}duplicate{{/str}}
                             </a>
                         </li>
-                        <li>
+                        <li class="dropdown-item">
                             <a data-action="deletecompetencyframework" href="#" data-frameworkid="{{id}}">
                                 {{#pix}}t/delete{{/pix}} {{#str}}delete{{/str}}
                             </a>
index fbe00d6..4a267f6 100644 (file)
             <ul class="templateactions">
                 <li>
                     <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
-                    <ul class="dropdown-menu">
-                        <li>
+                    <ul class="dropdown dropdown-menu">
+                        <li class="dropdown-item">
                             <a href="{{pluginbaseurl}}/edittemplate.php?id={{id}}&amp;pagecontextid={{pagecontextid}}&amp;return=templates">
                                 {{#pix}}t/edit{{/pix}} {{#str}}edit{{/str}}
                             </a>
                         </li>
-                        <li>
+                        <li class="dropdown-item">
                             <a data-action="duplicatetemplate" data-templateid="{{id}}" href="#">
                                 {{#pix}}t/copy{{/pix}} {{#str}}duplicate{{/str}}
                             </a>
                         </li>
-                        <li>
+                        <li class="dropdown-item">
                             <a href="{{pluginbaseurl}}/template_plans.php?id={{id}}&amp;pagecontextid={{pagecontextid}}">
                                 {{#pix}}t/add{{/pix}} {{#str}}createlearningplans, tool_lp{{/str}}
                             </a>
                         </li>
-                        <li>
+                        <li class="dropdown-item">
                             <a href="{{pluginbaseurl}}/template_cohorts.php?id={{id}}&amp;pagecontextid={{pagecontextid}}">
                                 {{#pix}}t/add{{/pix}} {{#str}}addcohortstosync, tool_lp{{/str}}
                             </a>
                         </li>
-                        <li>
+                        <li class="dropdown-item">
                             <a data-action="deletetemplate" data-templateid="{{id}}" href="#">
                                 {{#pix}}t/delete{{/pix}} {{#str}}delete{{/str}}
                             </a>
index 40eced3..a606c48 100644 (file)
@@ -1,3 +1,33 @@
-<p class="alert alert-error">
+{{!
+    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/no_frameworks_warning
+
+    No frameworks warning template.
+
+    Classes required for JS:
+      None
+
+    Context variables required for this template:
+      None
+    Example context (json):
+    {
+    }
+}}
+<p class="alert alert-danger">
     {{#str}}nocompetencyframeworks, tool_lp{{/str}}
 </p>
index 20eb2bb..96f13f0 100644 (file)
     <div data-region="actions" class="clearfix">
         <div class="pull-left">
             <!-- Button to add competencies to the plan -->
-            <button class="btn" data-action="add">{{#pix}}t/add{{/pix}} {{#str}}addcompetency, tool_lp{{/str}}</button>
+            <button class="btn btn-secondary" data-action="add">{{#pix}}t/add{{/pix}} {{#str}}addcompetency, tool_lp{{/str}}</button>
         </div>
     </div>
     {{/plan.canbeedited}}
-    <div data-region="plan-summary">
+    <div data-region="plan-summary" class="m-t-1">
         {{{plan.description}}}
         <dl>
             <dt>{{#str}}status, tool_lp{{/str}}</dt>
     </div>
     {{#plan.commentarea}}
         {{#canpostorhascomments}}
-            <div data-region="comments">
+            <div data-region="comments" class="m-t-1">
                 {{>tool_lp/comment_area}}
             </div>
         {{/canpostorhascomments}}
     {{/plan.commentarea}}
-    <div data-region="plan-competencies">
+    <div data-region="plan-competencies" class="m-t-1">
         <h3>{{#str}}learningplancompetencies, tool_lp{{/str}}</h3>
         <table class="generaltable fullwidth managecompetencies">
             <thead>
                             <ul title="{{#str}}edit{{/str}}" class="user-competency-actions">
                                 <li>
                                     <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
-                                    <ul class="dropdown-menu">
+                                    <ul class="dropdown dropdown-menu">
                                         {{#usercompetency.isrequestreviewallowed}}
-                                            <li>
+                                            <li class="dropdown-item">
                                                 <a href="#" data-action="request-review">{{#pix}}t/edit, core{{/pix}} {{#str}}requestreview, tool_lp{{/str}}</a>
                                             </li>
                                         {{/usercompetency.isrequestreviewallowed}}
                                         {{#usercompetency.iscancelreviewrequestallowed}}
-                                            <li>
+                                            <li class="dropdown-item">
                                                 <a href="#" data-action="cancel-review-request">{{#pix}}t/edit, core{{/pix}} {{#str}}cancelreviewrequest, tool_lp{{/str}}</a>
                                             </li>
                                         {{/usercompetency.iscancelreviewrequestallowed}}
                                         {{#plan.canbeedited}}
-                                            <li>
+                                            <li class="dropdown-item">
                                                 <a href="#" data-action="delete-competency-link" data-id="{{competency.id}}">{{#pix}}t/delete, core{{/pix}} {{#str}}delete{{/str}}</a>
                                             </li>
                                         {{/plan.canbeedited}}
-                                        <li>
+                                        <li class="dropdown-item">
                                             <a href="#" data-action="find-courses-link" data-id="{{competency.id}}">{{#pix}}t/preview, core{{/pix}} {{#str}}findcourses, tool_lp{{/str}}</a>
                                         </li>
                                     </ul>
index 94226c9..8a3af99 100644 (file)
@@ -70,8 +70,8 @@
                 <ul title="{{#str}}edit{{/str}}" class="planactions">
                 <li>
                     <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
-                    <ul class="dropdown-menu">
-                    <li {{^canbeedited}} class="disabled" {{/canbeedited}}>
+                    <ul class="dropdown dropdown-menu">
+                    <li class="{{^canbeedited}} disabled {{/canbeedited}} dropdown-item">
                         <a href="{{#canbeedited}}
                                     {{pluginbaseurl}}/editplan.php?id={{id}}&amp;userid={{userid}}&amp;return=plans
                                  {{/canbeedited}}
                         </a>
                     </li>
                     {{#isreopenallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-reopen" href="#">
                             {{#pix}}t/edit{{/pix}} {{#str}}reopenplan, tool_lp{{/str}}
                         </a>
                     </li>
                     {{/isreopenallowed}}
                     {{#iscompleteallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-complete" href="#">
                             {{#pix}}t/edit{{/pix}} {{#str}}completeplan, tool_lp{{/str}}
                         </a>
                     </li>
                     {{/iscompleteallowed}}
                     {{#isrequestreviewallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-request-review" href="#">{{#pix}}t/edit{{/pix}} {{#str}}requestreview, tool_lp{{/str}}</a>
                     </li>
                     {{/isrequestreviewallowed}}
                     {{#iscancelreviewrequestallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-cancel-review-request" href="#">{{#pix}}t/edit{{/pix}} {{#str}}cancelreviewrequest, tool_lp{{/str}}</a>
                     </li>
                     {{/iscancelreviewrequestallowed}}
                     {{#isstartreviewallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-start-review" href="#">{{#pix}}t/edit{{/pix}} {{#str}}startreview, tool_lp{{/str}}</a>
                     </li>
                     {{/isstartreviewallowed}}
                     {{#isstopreviewallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-stop-review" href="#">{{#pix}}t/edit{{/pix}} {{#str}}stopreview, tool_lp{{/str}}</a>
                     </li>
                     {{/isstopreviewallowed}}
                     {{#isapproveallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-approve" href="#">{{#pix}}t/edit{{/pix}} {{#str}}planapprove, tool_lp{{/str}}</a>
                     </li>
                     {{/isapproveallowed}}
                     {{#isunapproveallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-unapprove" href="#">{{#pix}}t/edit{{/pix}} {{#str}}planunapprove, tool_lp{{/str}}</a>
                     </li>
                     {{/isunapproveallowed}}
                     {{#isunlinkallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-unlink" href="#">
                             {{#pix}}t/edit{{/pix}} {{#str}}unlinkplantemplate, tool_lp{{/str}}
                         </a>
                     </li>
                     {{/isunlinkallowed}}
-                    <li>
+                    <li class="dropdown-item">
                         <a data-action="plan-delete" href="#">
                             {{#pix}}t/delete{{/pix}} {{#str}}deletethisplan, tool_lp{{/str}}
                         </a>
 {{#js}}
 // Initialise the JS.
 require(['tool_lp/planactions'],
-        function(actionsMod) {
+        function(ActionsMod) {
 
-    var planActions = new actionsMod('plans');
+    var planActions = new ActionsMod('plans');
     planActions.enhanceMenubar('.planactions');
 });