Merge branch 'MDL-52261_master_file_not_found' of git://github.com/BenKelada/moodle
authorDavid Monllao <davidm@moodle.com>
Mon, 1 Feb 2016 05:55:57 +0000 (13:55 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 1 Feb 2016 05:55:57 +0000 (13:55 +0800)
849 files changed:
.travis.yml
Gruntfile.js
admin/environment.xml
admin/index.php
admin/renderer.php
admin/roles/classes/define_role_table_advanced.php
admin/settings/courses.php
admin/tool/langimport/index.php
admin/tool/log/classes/log/manager.php
admin/tool/uploadcourse/classes/course.php
admin/tool/uploadcourse/tests/course_test.php
admin/tool/uploaduser/index.php
admin/tool/uploaduser/tests/behat/upload_users.feature [moved from admin/tests/behat/upload_users.feature with 58% similarity]
admin/webservice/testclient.php
auth/cas/auth.php
auth/db/tests/db_test.php
auth/email/auth.php
auth/fc/auth.php
auth/fc/fcFPP.php
auth/imap/auth.php
auth/ldap/auth.php
auth/manual/auth.php
auth/mnet/auth.php
auth/nntp/auth.php
auth/nologin/auth.php
auth/none/auth.php
auth/pam/auth.php
auth/pop3/auth.php
auth/radius/auth.php
auth/shibboleth/auth.php
auth/webservice/auth.php
backup/cc/cc_lib/gral_lib/cssparser.php
backup/moodle2/restore_stepslib.php
backup/util/dbops/restore_dbops.class.php
backup/util/helper/restore_logs_processor.class.php
backup/util/helper/restore_structure_parser_processor.class.php
backup/util/plan/backup_structure_step.class.php
backup/util/plan/restore_structure_step.class.php
backup/util/settings/tests/settings_test.php
badges/tests/badgeslib_test.php
blocks/activity_results/tests/behat/highscoreswithscales.feature [new file with mode: 0644]
blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature [new file with mode: 0644]
blocks/activity_results/tests/behat/highscoreswithseperategroups.feature
blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature
blocks/activity_results/tests/behat/lowscoreswithscales.feature [new file with mode: 0644]
blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature [new file with mode: 0644]
blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature
blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature
blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature [new file with mode: 0644]
blocks/blog_menu/tests/behat/block_blog_menu.feature [new file with mode: 0644]
blocks/blog_menu/tests/behat/block_blog_menu_course.feature [new file with mode: 0644]
blocks/blog_menu/tests/behat/block_blog_menu_frontpage.feature [new file with mode: 0644]
blocks/blog_tags/block_blog_tags.php
blocks/edit_form.php
blocks/moodleblock.class.php
blocks/navigation/amd/build/ajax_response_renderer.min.js [new file with mode: 0644]
blocks/navigation/amd/build/nav_loader.min.js [new file with mode: 0644]
blocks/navigation/amd/build/navblock.min.js [new file with mode: 0644]
blocks/navigation/amd/build/site_admin_loader.min.js [new file with mode: 0644]
blocks/navigation/amd/src/ajax_response_renderer.js [new file with mode: 0644]
blocks/navigation/amd/src/nav_loader.js [new file with mode: 0644]
blocks/navigation/amd/src/navblock.js [moved from webservice/amf/lang/en/webservice_amf.php with 70% similarity]
blocks/navigation/amd/src/site_admin_loader.js [new file with mode: 0644]
blocks/navigation/block_navigation.php
blocks/navigation/renderer.php
blocks/navigation/styles.css
blocks/navigation/yui/build/moodle-block_navigation-navigation/moodle-block_navigation-navigation-debug.js [deleted file]
blocks/navigation/yui/build/moodle-block_navigation-navigation/moodle-block_navigation-navigation-min.js [deleted file]
blocks/navigation/yui/build/moodle-block_navigation-navigation/moodle-block_navigation-navigation.js [deleted file]
blocks/navigation/yui/src/navigation/build.json [deleted file]
blocks/navigation/yui/src/navigation/js/navigation.js [deleted file]
blocks/navigation/yui/src/navigation/meta/navigation.json [deleted file]
blocks/news_items/block_news_items.php
blocks/rss_client/block_rss_client.php
blocks/rss_client/classes/output/block.php [new file with mode: 0644]
blocks/rss_client/classes/output/channel_image.php [new file with mode: 0644]
blocks/rss_client/classes/output/feed.php [new file with mode: 0644]
blocks/rss_client/classes/output/footer.php [new file with mode: 0644]
blocks/rss_client/classes/output/item.php [new file with mode: 0644]
blocks/rss_client/classes/output/renderer.php [new file with mode: 0644]
blocks/rss_client/editfeed.php
blocks/rss_client/templates/block.mustache [new file with mode: 0644]
blocks/rss_client/templates/channel_image.mustache [new file with mode: 0644]
blocks/rss_client/templates/feed.mustache [new file with mode: 0644]
blocks/rss_client/templates/footer.mustache [new file with mode: 0644]
blocks/rss_client/templates/item.mustache [new file with mode: 0644]
blocks/rss_client/tests/cron_test.php
blocks/settings/amd/build/settingsblock.min.js [new file with mode: 0644]
blocks/settings/amd/src/settingsblock.js [new file with mode: 0644]
blocks/settings/block_settings.php
blocks/settings/renderer.php
blocks/settings/styles.css
blocks/tag_flickr/block_tag_flickr.php
blocks/tag_flickr/edit_form.php
blocks/tag_youtube/block_tag_youtube.php
blocks/tags/backup/moodle2/restore_tags_block_task.class.php [new file with mode: 0644]
blocks/tags/block_tags.php
blocks/tags/edit_form.php
blocks/tags/lang/en/block_tags.php
blocks/tags/tests/behat/tagcloud.feature
blocks/tests/behat/configure_block_throughout_site.feature
blocks/upgrade.txt
blog/edit.php
blog/edit_form.php
blog/external_blog_edit.php
blog/external_blog_edit_form.php
blog/external_blogs.php
blog/index.php
blog/lib.php
blog/locallib.php
blog/renderer.php
blog/rsslib.php
blog/tests/lib_test.php [moved from blog/tests/bloglib_test.php with 71% similarity]
calendar/lib.php
calendar/preferences_form.php
calendar/tests/behat/calendar_lookahead.feature [new file with mode: 0644]
cohort/externallib.php
cohort/upgrade.txt
completion/criteria/completion_criteria_grade.php
completion/tests/behat/behat_completion.php
completion/tests/behat/teacher_manual_completion.feature
composer.json
composer.lock
course/classes/management_renderer.php
course/edit.php
course/edit_form.php
course/format/renderer.php
course/format/social/tests/behat/social_adjust_discussion_count.feature
course/lib.php
course/mod.php
course/modedit.php
course/moodleform_mod.php
course/renderer.php
course/tags.php
course/tags_form.php
course/tests/behat/behat_course.php
course/tests/courselib_test.php
course/tests/externallib_test.php
enrol/database/lib.php
enrol/externallib.php
enrol/guest/classes/enrol_guest_edit_form.php
enrol/guest/classes/external.php [new file with mode: 0644]
enrol/guest/db/services.php [moved from webservice/amf/db/access.php with 63% similarity]
enrol/guest/lib.php
enrol/guest/tests/external_test.php [new file with mode: 0644]
enrol/guest/version.php
enrol/ldap/tests/ldap_test.php
enrol/manual/yui/quickenrolment/quickenrolment.js
enrol/paypal/ipn.php
enrol/self/edit_form.php
enrol/self/externallib.php
enrol/self/lib.php
enrol/self/tests/externallib_test.php
enrol/tests/behat/manage_enrolments_from_participants.feature [new file with mode: 0644]
enrol/tests/externallib_test.php
filter/local_settings_form.php
filter/tex/latex.php
grade/export/lib.php
grade/grading/form/guide/amd/build/comment_chooser.min.js [new file with mode: 0644]
grade/grading/form/guide/amd/src/comment_chooser.js [new file with mode: 0644]
grade/grading/form/guide/edit_form.php
grade/grading/form/guide/guideeditor.php
grade/grading/form/guide/js/guideeditor.js
grade/grading/form/guide/lang/en/gradingform_guide.php
grade/grading/form/guide/lib.php
grade/grading/form/guide/renderer.php
grade/grading/form/guide/templates/comment_chooser.mustache [new file with mode: 0644]
grade/grading/form/guide/tests/behat/behat_gradingform_guide.php [new file with mode: 0644]
grade/grading/form/guide/tests/behat/edit_guide.feature [new file with mode: 0644]
grade/grading/form/rubric/edit_form.php
grade/grading/form/rubric/js/rubric.js
grade/grading/form/rubric/js/rubriceditor.js
grade/grading/form/rubric/lang/en/gradingform_rubric.php
grade/grading/form/rubric/lib.php
grade/grading/form/rubric/renderer.php
grade/grading/form/rubric/rubriceditor.php
grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php
grade/grading/form/rubric/tests/behat/edit_rubric.feature
grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature
grade/lib.php
grade/report/grader/lib.php
grade/report/grader/tests/behat/switch_views.feature [new file with mode: 0644]
grade/report/history/index.php
grade/report/history/tests/behat/basic_functionality.feature
grade/report/singleview/index.php
grade/report/user/tests/lib_test.php [new file with mode: 0644]
grade/tests/behat/grade_hidden_items.feature [new file with mode: 0644]
group/lib.php
install/lang/cs/install.php
install/lang/es/moodle.php
install/lang/he/admin.php
install/lang/he/error.php
install/lang/he/install.php
install/lang/hi/admin.php
install/lang/hr/admin.php
install/lang/hr/error.php
install/lang/hr/install.php
install/lang/lt/moodle.php
install/lang/nl/moodle.php
install/lang/or/langconfig.php [new file with mode: 0644]
install/lang/pt/admin.php
install/lang/pt/moodle.php
install/lang/pt_br/moodle.php
install/lang/ro/install.php
install/lang/ro/moodle.php
install/lang/th/moodle.php
install/lang/zh_cn/error.php
install/lang/zh_tw/install.php
lang/en/admin.php
lang/en/backup.php
lang/en/cache.php
lang/en/deprecated.txt
lang/en/moodle.php
lang/en/question.php
lang/en/tag.php
lang/en/webservice.php
lib/adminlib.php
lib/adodb/adodb-active-record.inc.php
lib/adodb/adodb-active-recordx.inc.php
lib/adodb/adodb-csvlib.inc.php
lib/adodb/adodb-datadict.inc.php
lib/adodb/adodb-error.inc.php
lib/adodb/adodb-errorhandler.inc.php
lib/adodb/adodb-errorpear.inc.php
lib/adodb/adodb-exceptions.inc.php
lib/adodb/adodb-iterator.inc.php
lib/adodb/adodb-lib.inc.php
lib/adodb/adodb-memcache.lib.inc.php
lib/adodb/adodb-pager.inc.php
lib/adodb/adodb-pear.inc.php
lib/adodb/adodb-perf.inc.php
lib/adodb/adodb-php4.inc.php
lib/adodb/adodb-time.inc.php
lib/adodb/adodb-xmlschema.inc.php
lib/adodb/adodb-xmlschema03.inc.php
lib/adodb/adodb.inc.php
lib/adodb/datadict/datadict-access.inc.php
lib/adodb/datadict/datadict-db2.inc.php
lib/adodb/datadict/datadict-firebird.inc.php
lib/adodb/datadict/datadict-generic.inc.php
lib/adodb/datadict/datadict-ibase.inc.php
lib/adodb/datadict/datadict-informix.inc.php
lib/adodb/datadict/datadict-mssql.inc.php
lib/adodb/datadict/datadict-mssqlnative.inc.php
lib/adodb/datadict/datadict-mysql.inc.php
lib/adodb/datadict/datadict-oci8.inc.php
lib/adodb/datadict/datadict-postgres.inc.php
lib/adodb/datadict/datadict-sapdb.inc.php
lib/adodb/datadict/datadict-sqlite.inc.php
lib/adodb/datadict/datadict-sybase.inc.php
lib/adodb/drivers/adodb-access.inc.php
lib/adodb/drivers/adodb-ado.inc.php
lib/adodb/drivers/adodb-ado5.inc.php
lib/adodb/drivers/adodb-ado_access.inc.php
lib/adodb/drivers/adodb-ado_mssql.inc.php
lib/adodb/drivers/adodb-ads.inc.php
lib/adodb/drivers/adodb-borland_ibase.inc.php
lib/adodb/drivers/adodb-csv.inc.php
lib/adodb/drivers/adodb-db2.inc.php
lib/adodb/drivers/adodb-db2oci.inc.php
lib/adodb/drivers/adodb-db2ora.inc.php
lib/adodb/drivers/adodb-fbsql.inc.php
lib/adodb/drivers/adodb-firebird.inc.php
lib/adodb/drivers/adodb-ibase.inc.php
lib/adodb/drivers/adodb-informix.inc.php
lib/adodb/drivers/adodb-informix72.inc.php
lib/adodb/drivers/adodb-ldap.inc.php
lib/adodb/drivers/adodb-mssql.inc.php
lib/adodb/drivers/adodb-mssql_n.inc.php
lib/adodb/drivers/adodb-mssqlnative.inc.php
lib/adodb/drivers/adodb-mssqlpo.inc.php
lib/adodb/drivers/adodb-mysql.inc.php
lib/adodb/drivers/adodb-mysqli.inc.php
lib/adodb/drivers/adodb-mysqlpo.inc.php
lib/adodb/drivers/adodb-mysqlt.inc.php
lib/adodb/drivers/adodb-netezza.inc.php
lib/adodb/drivers/adodb-oci8.inc.php
lib/adodb/drivers/adodb-oci805.inc.php
lib/adodb/drivers/adodb-oci8po.inc.php
lib/adodb/drivers/adodb-oci8quercus.inc.php
lib/adodb/drivers/adodb-odbc.inc.php
lib/adodb/drivers/adodb-odbc_db2.inc.php
lib/adodb/drivers/adodb-odbc_mssql.inc.php
lib/adodb/drivers/adodb-odbc_oracle.inc.php
lib/adodb/drivers/adodb-odbtp.inc.php
lib/adodb/drivers/adodb-odbtp_unicode.inc.php
lib/adodb/drivers/adodb-oracle.inc.php
lib/adodb/drivers/adodb-pdo.inc.php
lib/adodb/drivers/adodb-pdo_mssql.inc.php
lib/adodb/drivers/adodb-pdo_mysql.inc.php
lib/adodb/drivers/adodb-pdo_oci.inc.php
lib/adodb/drivers/adodb-pdo_pgsql.inc.php
lib/adodb/drivers/adodb-pdo_sqlite.inc.php
lib/adodb/drivers/adodb-pdo_sqlsrv.inc.php [new file with mode: 0644]
lib/adodb/drivers/adodb-postgres.inc.php
lib/adodb/drivers/adodb-postgres64.inc.php
lib/adodb/drivers/adodb-postgres7.inc.php
lib/adodb/drivers/adodb-postgres8.inc.php
lib/adodb/drivers/adodb-postgres9.inc.php
lib/adodb/drivers/adodb-proxy.inc.php
lib/adodb/drivers/adodb-sapdb.inc.php
lib/adodb/drivers/adodb-sqlanywhere.inc.php
lib/adodb/drivers/adodb-sqlite.inc.php
lib/adodb/drivers/adodb-sqlite3.inc.php
lib/adodb/drivers/adodb-sqlitepo.inc.php
lib/adodb/drivers/adodb-sybase.inc.php
lib/adodb/drivers/adodb-sybase_ase.inc.php
lib/adodb/drivers/adodb-text.inc.php [new file with mode: 0644]
lib/adodb/drivers/adodb-vfp.inc.php
lib/adodb/license.txt
lib/adodb/perf/perf-db2.inc.php
lib/adodb/perf/perf-informix.inc.php
lib/adodb/perf/perf-mssql.inc.php
lib/adodb/perf/perf-mssqlnative.inc.php
lib/adodb/perf/perf-mysql.inc.php
lib/adodb/perf/perf-oci8.inc.php
lib/adodb/perf/perf-postgres.inc.php
lib/adodb/pivottable.inc.php
lib/adodb/readme_moodle.txt
lib/adodb/rsfilter.inc.php
lib/adodb/toexport.inc.php
lib/adodb/tohtml.inc.php
lib/amd/build/form-autocomplete.min.js
lib/amd/build/str.min.js
lib/amd/build/tag.min.js
lib/amd/build/templates.min.js
lib/amd/build/tree.min.js [new file with mode: 0644]
lib/amd/src/form-autocomplete.js
lib/amd/src/str.js
lib/amd/src/tag.js
lib/amd/src/templates.js
lib/amd/src/tree.js [new file with mode: 0644]
lib/behat/classes/behat_selectors.php
lib/behat/lib.php
lib/bennu/readme_moodle.txt
lib/blocklib.php
lib/classes/event/tag_added.php
lib/classes/event/tag_collection_created.php [new file with mode: 0644]
lib/classes/event/tag_collection_deleted.php [new file with mode: 0644]
lib/classes/event/tag_collection_updated.php [new file with mode: 0644]
lib/classes/event/tag_created.php
lib/classes/event/tag_removed.php
lib/classes/log/sql_internal_reader.php [deleted file]
lib/classes/log/sql_select_reader.php [deleted file]
lib/classes/plugin_manager.php
lib/classes/plugininfo/cachestore.php
lib/classes/shutdown_manager.php
lib/classes/string_manager_standard.php
lib/classes/task/delete_incomplete_users_task.php
lib/classes/task/tag_cron_task.php
lib/completionlib.php
lib/componentlib.class.php
lib/coursecatlib.php
lib/db/caches.php
lib/db/install.xml
lib/db/services.php
lib/db/tag.php [new file with mode: 0644]
lib/db/tasks.php
lib/db/upgrade.php
lib/ddl/mysql_sql_generator.php
lib/deprecatedlib.php
lib/dml/moodle_database.php
lib/dml/moodle_transaction.php
lib/dml/tests/dml_test.php
lib/editor/atto/plugins/rtl/yui/build/moodle-atto_rtl-button/moodle-atto_rtl-button-debug.js
lib/editor/atto/plugins/rtl/yui/build/moodle-atto_rtl-button/moodle-atto_rtl-button-min.js
lib/editor/atto/plugins/rtl/yui/build/moodle-atto_rtl-button/moodle-atto_rtl-button.js
lib/editor/atto/plugins/rtl/yui/src/button/js/button.js
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/selection.js
lib/editor/tinymce/plugins/spellchecker/classes/SpellChecker.php
lib/editor/tinymce/plugins/spellchecker/classes/utils/JSON.php
lib/editor/tinymce/plugins/spellchecker/classes/utils/Logger.php
lib/editor/tinymce/plugins/spellchecker/readme_moodle.txt
lib/environmentlib.php
lib/evalmath/evalmath.class.php
lib/evalmath/readme_moodle.txt
lib/eventslib.php
lib/filestorage/tests/file_storage_test.php
lib/form/advcheckbox.php
lib/form/autocomplete.php
lib/form/button.php
lib/form/cancel.php
lib/form/checkbox.php
lib/form/dateselector.php
lib/form/datetimeselector.php
lib/form/duration.php
lib/form/editor.php
lib/form/filemanager.php
lib/form/filepicker.php
lib/form/grading.php
lib/form/group.php
lib/form/header.php
lib/form/hidden.php
lib/form/htmleditor.php
lib/form/listing.php
lib/form/modgrade.php
lib/form/modvisible.php
lib/form/password.php
lib/form/passwordunmask.php
lib/form/questioncategory.php
lib/form/radio.php
lib/form/recaptcha.php
lib/form/searchableselector.php
lib/form/select.php
lib/form/selectgroups.php
lib/form/selectwithlink.php
lib/form/selectyesno.php
lib/form/static.php
lib/form/submit.php
lib/form/submitlink.php
lib/form/tags.php
lib/form/text.php
lib/form/textarea.php
lib/form/url.php
lib/form/warning.php
lib/formslib.php
lib/grade/grade_category.php
lib/grade/grade_grade.php
lib/grade/tests/grade_category_test.php
lib/graphlib.php
lib/horde/framework/Horde/Imap/Client/Socket.php
lib/horde/readme_moodle.txt
lib/installlib.php
lib/jabber/XMPP/XMLStream.php
lib/jabber/readme_moodle.txt
lib/lexer.php
lib/mathslib.php
lib/medialib.php
lib/modinfolib.php
lib/moodlelib.php
lib/myprofilelib.php
lib/navigationlib.php
lib/outputcomponents.php
lib/outputlib.php
lib/outputrenderers.php
lib/pagelib.php
lib/pear/Crypt/CHAP.php
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/DHTMLRulesTableless.php
lib/pear/HTML/QuickForm/Renderer.php
lib/pear/HTML/QuickForm/Renderer/Array.php
lib/pear/HTML/QuickForm/Renderer/Default.php
lib/pear/HTML/QuickForm/Renderer/Object.php
lib/pear/HTML/QuickForm/Renderer/Tableless.php
lib/pear/HTML/QuickForm/advcheckbox.php
lib/pear/HTML/QuickForm/autocomplete.php
lib/pear/HTML/QuickForm/button.php
lib/pear/HTML/QuickForm/checkbox.php
lib/pear/HTML/QuickForm/date.php
lib/pear/HTML/QuickForm/element.php
lib/pear/HTML/QuickForm/file.php
lib/pear/HTML/QuickForm/group.php
lib/pear/HTML/QuickForm/header.php
lib/pear/HTML/QuickForm/hidden.php
lib/pear/HTML/QuickForm/hiddenselect.php
lib/pear/HTML/QuickForm/hierselect.php
lib/pear/HTML/QuickForm/html.php
lib/pear/HTML/QuickForm/image.php
lib/pear/HTML/QuickForm/input.php
lib/pear/HTML/QuickForm/link.php
lib/pear/HTML/QuickForm/password.php
lib/pear/HTML/QuickForm/radio.php
lib/pear/HTML/QuickForm/reset.php
lib/pear/HTML/QuickForm/select.php
lib/pear/HTML/QuickForm/static.php
lib/pear/HTML/QuickForm/submit.php
lib/pear/HTML/QuickForm/text.php
lib/pear/HTML/QuickForm/textarea.php
lib/pear/HTML/QuickForm/xbutton.php
lib/pear/PEAR.php
lib/pear/README_MOODLE.txt
lib/phpexcel/PHPExcel/Shared/PCLZip/pclzip.lib.php
lib/phpexcel/PHPExcel/Worksheet/AutoFilter/Column.php
lib/phpexcel/readme_moodle.txt
lib/phpunit/classes/advanced_testcase.php
lib/phpunit/classes/basic_testcase.php
lib/phpunit/classes/database_driver_testcase.php
lib/phpunit/classes/util.php
lib/phpunit/tests/advanced_test.php
lib/phpunit/tests/util_test.php [new file with mode: 0644]
lib/plagiarismlib.php
lib/questionlib.php
lib/rsslib.php
lib/searchlib.php
lib/setup.php
lib/setuplib.php
lib/tablelib.php
lib/testing/classes/tests_finder.php
lib/testing/classes/util.php
lib/testing/generator/data_generator.php
lib/testing/tests/generator_test.php
lib/tests/behat/behat_hooks.php
lib/tests/behat/behat_navigation.php
lib/tests/behat/largeforms.feature [new file with mode: 0644]
lib/tests/completionlib_test.php
lib/tests/event_test.php
lib/tests/eventslib_test.php
lib/tests/fixtures/max_input_vars.php [new file with mode: 0644]
lib/tests/fixtures/upload_users_profile.csv [new file with mode: 0644]
lib/tests/moodlelib_test.php
lib/tests/myprofilelib_test.php [new file with mode: 0644]
lib/tests/questionlib_test.php
lib/tests/rsslib_test.php
lib/tests/setuplib_test.php
lib/thirdpartylibs.xml
lib/upgrade.txt
lib/upgradelib.php
lib/weblib.php
lib/wiki_to_markdown.php
local/upgrade.txt
login/signup_form.php
login/token.php
message/externallib.php
message/lib.php
message/output/airnotifier/classes/manager.php
message/tests/behat/display_history.feature
message/tests/behat/message_participants.feature
message/tests/externallib_test.php
message/upgrade.txt
mnet/environment.php
mnet/peer.php
mnet/xmlrpc/client.php
mnet/xmlrpc/xmlparser.php
mod/assign/feedback/editpdf/fpdi/ASL20.txt [deleted file]
mod/assign/feedback/editpdf/fpdi/LICENSE [new file with mode: 0644]
mod/assign/feedback/editpdf/fpdi/filters/FilterASCII85.php
mod/assign/feedback/editpdf/fpdi/filters/FilterASCII85_FPDI.php [deleted file]
mod/assign/feedback/editpdf/fpdi/filters/FilterASCIIHexDecode.php
mod/assign/feedback/editpdf/fpdi/filters/FilterLZW.php
mod/assign/feedback/editpdf/fpdi/filters/FilterLZW_FPDI.php [deleted file]
mod/assign/feedback/editpdf/fpdi/fpdf_tpl.php
mod/assign/feedback/editpdf/fpdi/fpdi.php
mod/assign/feedback/editpdf/fpdi/fpdi_bridge.php
mod/assign/feedback/editpdf/fpdi/fpdi_pdf_parser.php
mod/assign/feedback/editpdf/fpdi/pdf_context.php
mod/assign/feedback/editpdf/fpdi/pdf_parser.php
mod/assign/feedback/editpdf/fpdi/readme_moodle.txt
mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature
mod/assign/feedback/editpdf/thirdpartylibs.xml
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/gradingtable.php
mod/assign/lang/en/assign.php
mod/assign/locallib.php
mod/assign/tests/behat/reopen_locked_submission.feature [new file with mode: 0644]
mod/assign/tests/locallib_test.php
mod/chat/lib.php
mod/chat/locallib.php
mod/chat/tests/behat/chat_course_reset.feature [new file with mode: 0644]
mod/choice/lang/en/choice.php
mod/data/export_form.php
mod/data/field/date/field.class.php
mod/data/field/textarea/field.class.php
mod/data/js.php
mod/forum/backup/moodle2/backup_forum_stepslib.php
mod/forum/classes/event/discussion_pinned.php [new file with mode: 0644]
mod/forum/classes/event/discussion_unpinned.php [new file with mode: 0644]
mod/forum/classes/output/forum_post.php
mod/forum/classes/post_form.php
mod/forum/db/access.php
mod/forum/db/install.xml
mod/forum/db/log.php
mod/forum/db/services.php
mod/forum/db/upgrade.php
mod/forum/discuss.php
mod/forum/externallib.php
mod/forum/lang/en/deprecated.txt
mod/forum/lang/en/forum.php
mod/forum/lib.php
mod/forum/markposts.php
mod/forum/pix/i/pinned.png [new file with mode: 0644]
mod/forum/pix/i/pinned.svg [new file with mode: 0644]
mod/forum/post.php
mod/forum/search.php
mod/forum/styles.css
mod/forum/templates/forum_post_emaildigestbasic_htmlemail.mustache
mod/forum/tests/behat/discussion_navigation.feature
mod/forum/tests/behat/move_discussion.feature
mod/forum/tests/behat/posts_ordering_blog.feature
mod/forum/tests/behat/posts_ordering_general.feature
mod/forum/tests/externallib_test.php
mod/forum/tests/generator/lib.php
mod/forum/tests/generator_test.php
mod/forum/tests/lib_test.php
mod/forum/version.php
mod/forum/view.php
mod/glossary/classes/entry_query_builder.php [new file with mode: 0644]
mod/glossary/classes/external.php [new file with mode: 0644]
mod/glossary/db/services.php [new file with mode: 0644]
mod/glossary/lib.php
mod/glossary/print.php
mod/glossary/showentry.php
mod/glossary/showentry_ajax.php
mod/glossary/sql.php
mod/glossary/tests/external_test.php [new file with mode: 0644]
mod/glossary/tests/lib_test.php [new file with mode: 0644]
mod/glossary/version.php
mod/glossary/view.php
mod/lesson/lang/en/lesson.php
mod/lesson/lib.php
mod/lesson/mod_form.php
mod/lesson/reformat.php [deleted file]
mod/lesson/tests/behat/completion_condition_time_spent.feature
mod/lesson/tests/behat/date_availability.feature
mod/lesson/tests/behat/lesson_complete_report.feature [new file with mode: 0644]
mod/lesson/tests/behat/lesson_outline_report.feature [new file with mode: 0644]
mod/lesson/tests/behat/lesson_student_resume.feature
mod/lesson/upgrade.txt
mod/lesson/view.php
mod/lti/locallib.php
mod/lti/tests/locallib_test.php
mod/quiz/accessmanager.php
mod/quiz/accessmanager_form.php
mod/quiz/accessrule/timelimit/lang/en/quizaccess_timelimit.php
mod/quiz/accessrule/timelimit/rule.php
mod/quiz/amd/build/preflightcheck.min.js [new file with mode: 0644]
mod/quiz/amd/src/preflightcheck.js [new file with mode: 0644]
mod/quiz/attemptlib.php
mod/quiz/backup/moodle2/restore_quiz_activity_task.class.php
mod/quiz/classes/structure.php
mod/quiz/comment.php
mod/quiz/index.php
mod/quiz/lang/en/quiz.php
mod/quiz/locallib.php
mod/quiz/module.js
mod/quiz/processattempt.php
mod/quiz/renderer.php
mod/quiz/review.php
mod/quiz/reviewquestion.php
mod/quiz/startattempt.php
mod/quiz/styles.css
mod/quiz/tests/behat/add_quiz.feature
mod/quiz/tests/behat/attempt_basic.feature
mod/quiz/tests/behat/attempt_begin.feature [new file with mode: 0644]
mod/quiz/tests/behat/attempt_redo_questions.feature
mod/quiz/tests/behat/attempt_require_previous.feature
mod/quiz/tests/behat/completion_condition_attempts_used.feature
mod/quiz/tests/behat/completion_condition_passing_grade.feature
mod/quiz/tests/behat/quiz_reset.feature
mod/quiz/upgrade.txt
mod/quiz/view.php
mod/scorm/classes/external.php
mod/scorm/datamodels/scorm_12.php
mod/scorm/datamodels/scorm_13.php
mod/scorm/db/services.php
mod/scorm/lib.php
mod/scorm/loadSCO.php
mod/scorm/locallib.php
mod/scorm/module.js
mod/scorm/report/interactions/classes/report.php
mod/scorm/report/interactions/lang/en/scormreport_interactions.php
mod/scorm/report/interactions/responsessettings_form.php
mod/scorm/report/interactions/version.php
mod/scorm/report/userreport.php
mod/scorm/report/userreportinteractions.php
mod/scorm/report/userreporttracks.php
mod/scorm/tests/externallib_test.php
mod/scorm/tests/lib_test.php
mod/scorm/tests/packages/complexscorm.zip [new file with mode: 0644]
mod/scorm/upgrade.txt
mod/scorm/version.php
mod/wiki/backup/moodle2/backup_wiki_stepslib.php
mod/wiki/backup/moodle2/restore_wiki_stepslib.php
mod/wiki/classes/external.php [new file with mode: 0644]
mod/wiki/db/services.php [new file with mode: 0644]
mod/wiki/db/tag.php [moved from webservice/amf/version.php with 64% similarity]
mod/wiki/diff/diff_nwiki.php
mod/wiki/diff/difflib.php
mod/wiki/edit_form.php
mod/wiki/editors/wikieditor.php
mod/wiki/editors/wikifiletable.php
mod/wiki/lang/en/wiki.php
mod/wiki/lib.php
mod/wiki/locallib.php
mod/wiki/pagelib.php
mod/wiki/parser/markups/wikimarkup.php
mod/wiki/prettyview.php
mod/wiki/styles.css
mod/wiki/tests/behat/edit_tags.feature
mod/wiki/tests/externallib_test.php [new file with mode: 0644]
mod/wiki/tests/lib_test.php [new file with mode: 0644]
mod/wiki/tests/wikiparser_test.php
mod/wiki/version.php
mod/wiki/view.php
mod/workshop/classes/event/submission_deleted.php [new file with mode: 0644]
mod/workshop/db/access.php
mod/workshop/form/rubric/styles.css
mod/workshop/lang/en/workshop.php
mod/workshop/styles.css
mod/workshop/submission.php
mod/workshop/tests/behat/delete_submission.feature [new file with mode: 0644]
mod/workshop/version.php
notes/lib.php
notes/tests/lib_test.php [new file with mode: 0644]
npm-shrinkwrap.json [new file with mode: 0644]
package.json
plagiarism/lib.php
plagiarism/upgrade.txt [new file with mode: 0644]
question/category_class.php
question/engine/renderer.php
question/format.php
question/format/xml/format.php
question/format/xml/tests/xmlformat_test.php
question/question.php
question/tests/behat/behat_question.php
question/type/calculated/db/upgradelib.php
question/type/calculated/question.php
question/type/calculated/questiontype.php
question/type/calculated/tests/variablesubstituter_test.php
question/type/calculatedmulti/db/upgradelib.php
question/type/calculatedmulti/question.php
question/type/ddimageortext/questionbase.php
question/type/ddimageortext/tests/behat/preview.feature
question/type/ddimageortext/yui/build/moodle-qtype_ddimageortext-dd/moodle-qtype_ddimageortext-dd-debug.js
question/type/ddimageortext/yui/build/moodle-qtype_ddimageortext-dd/moodle-qtype_ddimageortext-dd-min.js
question/type/ddimageortext/yui/build/moodle-qtype_ddimageortext-dd/moodle-qtype_ddimageortext-dd.js
question/type/ddimageortext/yui/src/ddimageortext/js/ddimageortext.js
question/type/ddmarker/tests/behat/preview.feature
question/type/ddwtos/tests/behat/preview.feature
question/type/ddwtos/yui/build/moodle-qtype_ddwtos-dd/moodle-qtype_ddwtos-dd-debug.js
question/type/ddwtos/yui/build/moodle-qtype_ddwtos-dd/moodle-qtype_ddwtos-dd-min.js
question/type/ddwtos/yui/build/moodle-qtype_ddwtos-dd/moodle-qtype_ddwtos-dd.js
question/type/ddwtos/yui/src/ddwtos/js/ddwtos.js
question/type/description/question.php
question/type/edit_question_form.php
question/type/essay/question.php
question/type/gapselect/questionbase.php
question/type/match/question.php
question/type/missingtype/question.php
question/type/missingtype/questiontype.php
question/type/multianswer/db/upgrade.php
question/type/multianswer/edit_multianswer_form.php
question/type/multianswer/question.php
question/type/multianswer/questiontype.php
question/type/multichoice/question.php
question/type/numerical/question.php
question/type/randomsamatch/questiontype.php
question/type/shortanswer/question.php
question/type/truefalse/question.php
report/log/classes/table_log.php
report/log/tests/lib_test.php
report/outline/tests/lib_test.php
report/stats/tests/lib_test.php
report/usersessions/tests/lib_test.php [new file with mode: 0644]
repository/s3/lib.php
repository/tests/repositorylib_test.php
tag/classes/area.php [new file with mode: 0644]
tag/classes/areas_table.php [new file with mode: 0644]
tag/classes/collection.php [new file with mode: 0644]
tag/classes/collection_form.php [new file with mode: 0644]
tag/classes/collections_table.php [new file with mode: 0644]
tag/classes/external.php
tag/classes/manage_table.php
tag/classes/output/tag.php
tag/classes/output/tagcloud.php [new file with mode: 0644]
tag/classes/output/tagfeed.php [new file with mode: 0644]
tag/classes/output/tagindex.php [new file with mode: 0644]
tag/classes/output/taglist.php [new file with mode: 0644]
tag/classes/renderer.php [new file with mode: 0644]
tag/classes/tag.php [new file with mode: 0644]
tag/edit.php
tag/edit_form.php
tag/index.php
tag/lib.php
tag/locallib.php
tag/manage.php
tag/search.php
tag/templates/index.mustache [new file with mode: 0644]
tag/templates/tagcloud.mustache [new file with mode: 0644]
tag/templates/tagfeed.mustache [new file with mode: 0644]
tag/templates/taglist.mustache [new file with mode: 0644]
tag/tests/behat/collections.feature [new file with mode: 0644]
tag/tests/behat/delete_tag.feature
tag/tests/behat/edit_tag.feature
tag/tests/behat/flag_tags.feature
tag/tests/behat/official_tags.feature
tag/tests/behat/tagindex.feature [new file with mode: 0644]
tag/tests/events_test.php
tag/tests/external_test.php
tag/tests/taglib_test.php
tag/upgrade.txt
tag/user.php
theme/base/style/core.css
theme/bootstrapbase/README.txt
theme/bootstrapbase/less/README
theme/bootstrapbase/less/moodle/calendar.less
theme/bootstrapbase/less/moodle/core.less
theme/bootstrapbase/less/moodle/debug.less
theme/bootstrapbase/readme_moodle.txt
theme/bootstrapbase/style/editor.css
theme/bootstrapbase/style/moodle.css
theme/canvas/style/core.css
theme/clean/lang/en/theme_clean.php
theme/more/lang/en/theme_more.php
user/edit.php
user/edit_form.php
user/editadvanced.php
user/editadvanced_form.php
user/editlib.php
user/externallib.php
user/filters/cohort.php
user/filters/courserole.php
user/filters/date.php
user/filters/globalrole.php
user/filters/lib.php
user/filters/profilefield.php
user/filters/select.php
user/filters/simpleselect.php
user/filters/text.php
user/filters/yesno.php
user/index.php
user/lib.php
user/message.html
user/messageselect.php
user/profile.php
user/profile/field/checkbox/field.class.php
user/profile/field/menu/field.class.php
user/profile/lib.php
user/renderer.php
user/tests/behat/name_fields.feature [new file with mode: 0644]
user/tests/behat/set_default_homepage.feature
user/tests/externallib_test.php
user/view.php
version.php
webservice/amf/introspector.php [deleted file]
webservice/amf/locallib.php [deleted file]
webservice/amf/server.php [deleted file]
webservice/amf/simpleserver.php [deleted file]
webservice/amf/testclient/AMFTester.mxml [deleted file]
webservice/amf/testclient/AMFTester.swf [deleted file]
webservice/amf/testclient/customValidators/JSONValidator.as [deleted file]
webservice/amf/testclient/flashcompilationinstructions.txt [deleted file]
webservice/amf/testclient/index.php [deleted file]
webservice/externallib.php
webservice/lib.php
webservice/tests/externallib_test.php
webservice/upgrade.txt
webservice/xmlrpc/lib.php
webservice/xmlrpc/locallib.php
webservice/xmlrpc/tests/fixtures/array_response.xml [new file with mode: 0644]
webservice/xmlrpc/tests/fixtures/fault_response.xml [new file with mode: 0644]
webservice/xmlrpc/tests/fixtures/value_response.xml [new file with mode: 0644]
webservice/xmlrpc/tests/lib_test.php [new file with mode: 0644]

index c462b85..afae285 100644 (file)
@@ -12,21 +12,12 @@ notifications:
 language: php
 
 php:
-    # Moodle supports versions 5.4, 5.5, and 5.6 of PHP.
-    # Order by fastest to slowest.
-    # We currently only run the highest and lowest versions to reduce the load on travis-ci.org.
-    - 5.6
+    # We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
+    - 7.0
+    # - 5.6
     # - 5.5
     - 5.4
 
-    # We hope to offer PHP 7 support in the near future.
-    - nightly
-
-services:
-    # Ensure that memcached and mongodb are running for testing of those MUC stores.
-    - memcached
-    - mongodb
-
 env:
     # Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
     # start first so that the total run time is not too high.
@@ -50,34 +41,26 @@ matrix:
     # It will not stop the jobs from running.
     fast_finish: true
 
-    # Always allow failure on nightly.
-    # It's a nightly build and failures can happen.
-    allow_failures:
-        - php: nightly
-
     exclude:
-        # PHP 7 is not yet supported for actual runs.
-        # Exclude it by default - we include it for CITEST only later.
-        - php: nightly
-
         # MySQL - it's just too slow.
-        # Exclude it on all versions except for 5.6.
+        # Exclude it on all versions except for 7.0
+        # - env: DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
+        #   php: 5.6
+        #
         # - env: DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
         #   php: 5.5
 
         - env: DB=mysqli   PHPUNIT=true    INSTALL=false   CITEST=false
           php: 5.4
 
-    include:
-        # Attempt to run the CITEST set on PHP 7.
-        - php: nightly
-          env: DB=none     PHPUNIT=false   INSTALL=false   CITEST=true
-
 cache:
     directories:
       - $HOME/.composer/cache
 
 install:
+    # Disable xdebug. We aren't generating code coverage, and it has a huge impact upon test performance.
+    - rm /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
+
     # Set the encrypted GITHUB_TOKEN if it's available to raise the API limit.
     - if [ -n "$GITHUB_APITOKEN" ]; then composer config github-oauth.github.com $GITHUB_APITOKEN; fi
 
@@ -86,10 +69,6 @@ install:
     # Typically it should be able to use the Composer cache if any other job has already completed before we started here.
     - travis_retry composer install --prefer-dist --no-interaction
 
-    - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
-    - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
-    - echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
-
 before_script:
     - >
       if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
@@ -144,9 +123,6 @@ before_script:
           sed -i \
             -e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
             -e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
-            -e "/require_once/i define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', '127.0.0.1:11211');" \
-            -e "/require_once/i define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211');" \
-            -e "/require_once/i define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');" \
             config.php ;
 
           # Initialise PHPUnit for Moodle.
index a3b699e..3dd3ef0 100644 (file)
@@ -26,13 +26,14 @@ module.exports = function(grunt) {
     var path = require('path'),
         fs = require('fs'),
         tasks = {},
-        cwd = process.env.PWD || process.cwd();
+        cwd = process.env.PWD || process.cwd(),
+        inAMD = path.basename(cwd) == 'amd';
 
     // Project configuration.
     grunt.initConfig({
         jshint: {
             options: {jshintrc: '.jshintrc'},
-            files: ['**/amd/src/*.js']
+            files: [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js']
         },
         uglify: {
             dynamic_mappings: {
@@ -50,6 +51,17 @@ module.exports = function(grunt) {
                     }
                 )
             }
+        },
+        less: {
+            bootstrapbase: {
+                files: {
+                    "theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
+                    "theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
+                },
+                options: {
+                    compress: true
+                }
+           }
         }
     });
 
@@ -103,6 +115,10 @@ module.exports = function(grunt) {
                 args.push('--lint-stderr');
             }
 
+            if (grunt.option('no-color')) {
+                args.push('--color=false');
+            }
+
             var execShifter = function() {
 
                 shifter = exec("node", args, {
@@ -207,14 +223,12 @@ module.exports = function(grunt) {
         if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
             grunt.task.run('shifter');
         // Are we in an AMD directory?
-        } else if (path.basename(cwd) == 'amd') {
-            grunt.task.run('jshint');
-            grunt.task.run('uglify');
+        } else if (inAMD) {
+            grunt.task.run('amd');
         } else {
             // Run them all!.
-            grunt.task.run('shifter');
-            grunt.task.run('jshint');
-            grunt.task.run('uglify');
+            grunt.task.run('css');
+            grunt.task.run('js');
         }
     };
 
@@ -222,9 +236,15 @@ module.exports = function(grunt) {
     // Register NPM tasks.
     grunt.loadNpmTasks('grunt-contrib-uglify');
     grunt.loadNpmTasks('grunt-contrib-jshint');
+    grunt.loadNpmTasks('grunt-contrib-less');
 
-    // Register the shifter task.
+    // Register JS tasks.
     grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
+    grunt.registerTask('amd', ['jshint', 'uglify']);
+    grunt.registerTask('js', ['amd', 'shifter']);
+
+    // Register CSS taks.
+    grunt.registerTask('css', ['less:bootstrapbase']);
 
     // Register the startup task.
     grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
index 6847483..4bf5798 100644 (file)
       <VENDOR name="oracle" version="10.2" />
     </DATABASE>
     <PHP version="5.4.4" level="required">
-      <RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
     </PHP>
     <PCREUNICODE level="optional">
       <FEEDBACK>
index b8de2e6..1000f93 100644 (file)
@@ -843,6 +843,8 @@ $buggyiconvnomb = (!function_exists('mb_convert_encoding') and @iconv('UTF-8', '
 $registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOODLEORGHUBURL, 'confirmed' => 1));
 // Check if there are any cache warnings.
 $cachewarnings = cache_helper::warnings();
+// Check if there are events 1 API handlers.
+$eventshandlers = $DB->get_records_sql('SELECT DISTINCT component FROM {events_handlers}');
 
 admin_externalpage_setup('adminnotifications');
 
@@ -850,4 +852,4 @@ $output = $PAGE->get_renderer('core', 'admin');
 
 echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
                                        $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
-                                       $registered, $cachewarnings);
+                                       $registered, $cachewarnings, $eventshandlers);
index 12d9dc3..7c0dfe2 100644 (file)
@@ -275,12 +275,13 @@ class core_admin_renderer extends plugin_renderer_base {
      * @param array|null $availableupdates array of \core\update\info objects or null
      * @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
      * @param string[] $cachewarnings An array containing warnings from the Cache API.
+     * @param array $eventshandlers Events 1 API handlers.
      *
      * @return string HTML to output.
      */
     public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
             $cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
-            $buggyiconvnomb, $registered, array $cachewarnings = array()) {
+            $buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0) {
         global $CFG;
         $output = '';
 
@@ -294,6 +295,7 @@ class core_admin_renderer extends plugin_renderer_base {
         $output .= $this->db_problems($dbproblems);
         $output .= $this->maintenance_mode_warning($maintenancemode);
         $output .= $this->cache_warnings($cachewarnings);
+        $output .= $this->events_handlers($eventshandlers);
         $output .= $this->registration_warning($registered);
 
         //////////////////////////////////////////////////////////////////////////////////////////////////
@@ -594,6 +596,23 @@ class core_admin_renderer extends plugin_renderer_base {
         return join("\n", array_map(array($this, 'warning'), $cachewarnings));
     }
 
+    /**
+     * Renders events 1 API handlers warning.
+     *
+     * @param array $eventshandlers
+     * @return string
+     */
+    public function events_handlers($eventshandlers) {
+        if ($eventshandlers) {
+            $components = '';
+            foreach ($eventshandlers as $eventhandler) {
+                $components .= $eventhandler->component . ', ';
+            }
+            $components = rtrim($components, ', ');
+            return $this->warning(get_string('eventshandlersinuse', 'admin', $components));
+        }
+    }
+
     /**
      * Render an appropriate message if the site in in maintenance mode.
      * @param bool $maintenancemode
index 06f565d..d18c144 100644 (file)
@@ -422,6 +422,12 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
         } else {
             // Updating role.
             $DB->update_record('role', $this->role);
+
+            // This will ensure the course contacts cache is purged so name changes get updated in
+            // the UI. It would be better to do this only when we know that fields affected are
+            // updated. But thats getting into the weeds of the coursecat cache and role edits
+            // should not be that frequent, so here is the ugly brutal approach.
+            coursecat::role_assignment_changed($this->role->id, context_system::instance());
         }
 
         // Assignable contexts.
index bd88630..21ecab7 100644 (file)
@@ -205,6 +205,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
     // Create a page for general import configuration and defaults.
     $temp = new admin_settingpage('importgeneralsettings', new lang_string('importgeneralsettings', 'backup'), 'moodle/backup:backupcourse');
     $temp->add(new admin_setting_configtext('backup/import_general_maxresults', new lang_string('importgeneralmaxresults', 'backup'), new lang_string('importgeneralmaxresults_desc', 'backup'), 10));
+    $temp->add(new admin_setting_configcheckbox('backup/import_general_duplicate_admin_allowed',
+            new lang_string('importgeneralduplicateadminallowed', 'backup'),
+            new lang_string('importgeneralduplicateadminallowed_desc', 'backup'), 0));
     $ADMIN->add('backups', $temp);
 
     // Create a page for automated backups configuration and defaults.
index c1ee2fb..6017717 100644 (file)
@@ -188,7 +188,7 @@ echo html_writer::end_tag('td');
 $options = array();
 foreach ($availablelangs as $alang) {
     if (!empty($alang[0]) and trim($alang[0]) !== 'en' and !$controller->is_installed_lang($alang[0], $alang[1])) {
-        $options[$alang[0]] = $alang[2].' ('.$alang[0].')';
+        $options[$alang[0]] = $alang[2].' &lrm;('.$alang[0].')&lrm;';
     }
 }
 if (!empty($options)) {
index 4077347..2b1d491 100644 (file)
@@ -106,38 +106,6 @@ class manager implements \core\log\manager {
             if (empty($interface) || ($reader instanceof $interface)) {
                 $return[$plugin] = $reader;
             }
-            // TODO MDL-49291 These conditions should be removed as part of the 2nd stage deprecation.
-            if ($reader instanceof \core\log\sql_internal_reader) {
-                debugging('\core\log\sql_internal_reader has been deprecated in favour of \core\log\sql_internal_table_reader.' .
-                    ' Update ' . get_class($reader) . ' to use the new interface.', DEBUG_DEVELOPER);
-            } else if ($reader instanceof \core\log\sql_select_reader) {
-                debugging('\core\log\sql_select_reader has been deprecated in favour of \core\log\sql_reader. Update ' .
-                    get_class($reader) . ' to use the new interface.', DEBUG_DEVELOPER);
-            }
-        }
-
-        // TODO MDL-49291 This section below (until the final return) should be removed as part of the 2nd stage deprecation.
-        $isselectreader = (ltrim($interface, '\\') === 'core\log\sql_select_reader');
-        $isinternalreader = (ltrim($interface, '\\') === 'core\log\sql_internal_reader');
-        if ($isselectreader || $isinternalreader) {
-
-            if ($isselectreader) {
-                $alternative = '\core\log\sql_reader';
-            } else {
-                $alternative = '\core\log\sql_internal_table_reader';
-            }
-
-            if (count($return) === 0) {
-                // If there are no classes implementing the provided interface and the provided interface is one of
-                // the deprecated ones, we return the non-deprecated alternatives. It should be safe as the new interface
-                // is adding a new method but not changing the existing ones.
-                debugging($interface . ' has been deprecated in favour of ' . $alternative . '. Returning ' . $alternative .
-                    ' instances instead. Please call get_readers() using the new interface.', DEBUG_DEVELOPER);
-                $return = $this->get_readers($alternative);
-            } else {
-                debugging($interface . ' has been deprecated in favour of ' . $alternative .
-                    '. Please call get_readers() using the new interface.', DEBUG_DEVELOPER);
-            }
         }
 
         return $return;
index ff22833..4486cde 100644 (file)
@@ -659,6 +659,10 @@ class tool_uploadcourse_course {
         $this->data = $coursedata;
         $this->enrolmentdata = tool_uploadcourse_helper::get_enrolment_data($this->rawdata);
 
+        if (isset($this->rawdata['tags']) && strval($this->rawdata['tags']) !== '') {
+            $this->data['tags'] = preg_split('/\s*,\s*/', trim($this->rawdata['tags']), -1, PREG_SPLIT_NO_EMPTY);
+        }
+
         // Restore data.
         // TODO Speed up things by not really extracting the backup just yet, but checking that
         // the backup file or shortname passed are valid. Extraction should happen in proceed().
index a173e72..20bbaa3 100644 (file)
@@ -261,6 +261,7 @@ class tool_uploadcourse_course_testcase extends advanced_testcase {
             'groupmode' => '2',
             'groupmodeforce' => '1',
             'enablecompletion' => '1',
+            'tags' => 'Cat, Dog',
 
             'role_teacher' => 'Knight',
             'role_manager' => 'Jedi',
@@ -297,6 +298,7 @@ class tool_uploadcourse_course_testcase extends advanced_testcase {
         $this->assertEquals($data['groupmode'], $course->groupmode);
         $this->assertEquals($data['groupmodeforce'], $course->groupmodeforce);
         $this->assertEquals($data['enablecompletion'], $course->enablecompletion);
+        $this->assertEquals($data['tags'], join(', ', core_tag_tag::get_item_tags_array('core', 'course', $course->id)));
 
         // Roles.
         $roleids = array();
index ad36657..2b3f43e 100644 (file)
@@ -96,6 +96,7 @@ $STD_FIELDS = array('id', 'username', 'email',
         'suspended',   // 1 means suspend user account, 0 means activate user account, nothing means keep as is for existing users
         'deleted',     // 1 means delete user
         'mnethostid',  // Can not be used for adding, updating or deleting of users - only for enrolments, groups, cohorts and suspending.
+        'interests',
     );
 // Include all name fields.
 $STD_FIELDS = array_merge($STD_FIELDS, get_all_user_name_fields());
@@ -232,8 +233,8 @@ if ($formdata = $mform2->is_cancelled()) {
                 if (isset($USER->$key) and is_array($USER->$key)) {
                     // this must be some hacky field that is abusing arrays to store content and format
                     $user->$key = array();
-                    $user->$key['text']   = $value;
-                    $user->$key['format'] = FORMAT_MOODLE;
+                    $user->{$key['text']}   = $value;
+                    $user->{$key['format']} = FORMAT_MOODLE;
                 } else {
                     $user->$key = trim($value);
                 }
@@ -836,6 +837,10 @@ if ($formdata = $mform2->is_cancelled()) {
             }
         }
 
+        // Update user interests.
+        if (isset($user->interests) && strval($user->interests) !== '') {
+            useredit_update_interests($user, preg_split('/\s*,\s*/', $user->interests, -1, PREG_SPLIT_NO_EMPTY));
+        }
 
         // add to cohort first, it might trigger enrolments indirectly - do NOT create cohorts here!
         foreach ($filecolumns as $column) {
@@ -1,4 +1,4 @@
-@core @core_admin @_file_upload
+@tool @tool_uploaduser @_file_upload
 Feature: Upload users
   In order to add users to the system
   As an admin
@@ -39,3 +39,25 @@ Feature: Upload users
     And I follow "Groups"
     And I set the field "groups" to "Section 1 (1)"
     And the "members" select box should contain "Tom Jones"
+
+  @javascript
+  Scenario: Upload users with custom profile fields
+    # Create user profile field.
+    Given I log in as "admin"
+    And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
+    And I set the field "datatype" to "Text area"
+    And I set the following fields to these values:
+      | Short name | superfield  |
+      | Name       | Super field |
+    And I click on "Save changes" "button"
+    # Upload users.
+    When I navigate to "Upload users" node in "Site administration > Users > Accounts"
+    And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
+    And I press "Upload users"
+    And I press "Upload users"
+    # Check that users were created and the superfield is filled.
+    And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
+    And I follow "Tom Jones"
+    And I should see "Super field"
+    And I should see "The big guy"
+    And I log out
index 25e4070..d14dbb9 100644 (file)
@@ -95,10 +95,6 @@ if (!$function or !$protocol) {
     $descparams = new stdClass();
     $descparams->atag = $atag;
     $descparams->mode = get_string('debugnormal', 'admin');
-    $amfclienturl = new moodle_url('/webservice/amf/testclient/index.php');
-    $amfclientatag =html_writer::tag('a', get_string('amftestclient', 'webservice'),
-            array('href' => $amfclienturl));
-    $descparams->amfatag = $amfclientatag;
     echo get_string('testclientdescription', 'webservice', $descparams);
     echo $OUTPUT->box_end();
 
index afa87dd..4439bcb 100644 (file)
@@ -39,13 +39,23 @@ class auth_plugin_cas extends auth_plugin_ldap {
     /**
      * Constructor.
      */
-    function auth_plugin_cas() {
+    public function __construct() {
         $this->authtype = 'cas';
         $this->roleauth = 'auth_cas';
         $this->errorlogtag = '[AUTH CAS] ';
         $this->init_plugin($this->authtype);
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_cas() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     function prevent_local_passwords() {
         return true;
     }
index 7979bd8..03c186d 100644 (file)
@@ -381,4 +381,22 @@ class auth_db_testcase extends advanced_testcase {
 
         $this->cleanup_auth_database();
     }
+
+    /**
+     * Testing the function _colonscope() from ADOdb.
+     */
+    public function test_adodb_colonscope() {
+        global $CFG;
+        require_once($CFG->libdir.'/adodb/adodb.inc.php');
+        require_once($CFG->libdir.'/adodb/drivers/adodb-odbc.inc.php');
+        require_once($CFG->libdir.'/adodb/drivers/adodb-db2ora.inc.php');
+
+        $this->resetAfterTest(false);
+
+        $sql = "select * from table WHERE column=:1 AND anothercolumn > :0";
+        $arr = array('b', 1);
+        list($sqlout, $arrout) = _colonscope($sql,$arr);
+        $this->assertEquals("select * from table WHERE column=? AND anothercolumn > ?", $sqlout);
+        $this->assertEquals(array(1, 'b'), $arrout);
+    }
 }
index 0a0827d..ffa0e91 100644 (file)
@@ -34,11 +34,21 @@ class auth_plugin_email extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_email() {
+    public function __construct() {
         $this->authtype = 'email';
         $this->config = get_config('auth/email');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_email() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index 75c8bd0..b987992 100644 (file)
@@ -37,11 +37,21 @@ class auth_plugin_fc extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_fc() {
+    public function __construct() {
         $this->authtype = 'fc';
         $this->config = get_config('auth/fc');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_fc() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index c082202..2adc309 100644 (file)
@@ -30,7 +30,7 @@ class fcFPP
     var $_debug = FALSE;    // set to true to see some debug info
 
     // class constructor
-    function fcFPP($host="localhost", $port="3333")
+    public function __construct($host="localhost", $port="3333")
     {
     $this->_hostname = $host;
     $this->_port = $port;
@@ -38,6 +38,12 @@ class fcFPP
     $this->_pwd = "";
     }
 
+    function fcFPP($host="localhost", $port="3333")
+    {
+           debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+           self::__construct($host, $port);
+    }
+
     // open a connection to the FirstClass server
     function open()
     {
index b0d7f9f..3e3e2da 100644 (file)
@@ -35,11 +35,21 @@ class auth_plugin_imap extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_imap() {
+    public function __construct() {
         $this->authtype = 'imap';
         $this->config = get_config('auth/imap');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_imap() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index 96d9bba..9d3a4ad 100644 (file)
@@ -143,13 +143,23 @@ class auth_plugin_ldap extends auth_plugin_base {
     /**
      * Constructor with initialisation.
      */
-    function auth_plugin_ldap() {
+    public function __construct() {
         $this->authtype = 'ldap';
         $this->roleauth = 'auth_ldap';
         $this->errorlogtag = '[AUTH LDAP] ';
         $this->init_plugin($this->authtype);
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_ldap() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index 938aae8..c6df146 100644 (file)
@@ -46,13 +46,23 @@ class auth_plugin_manual extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_manual() {
+    public function __construct() {
         $this->authtype = 'manual';
         $config = get_config(self::COMPONENT_NAME);
         $legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
         $this->config = (object)array_merge((array)$legacyconfig, (array)$config);
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_manual() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist. (Non-mnet accounts only!)
index f061539..8bd7768 100644 (file)
@@ -35,12 +35,22 @@ class auth_plugin_mnet extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_mnet() {
+    public function __construct() {
         $this->authtype = 'mnet';
         $this->config = get_config('auth_mnet');
         $this->mnet = get_mnet_environment();
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_mnet() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * This function is normally used to determine if the username and password
      * are correct for local logins. Always returns false, as local users do not
index c2ad283..9e8b24c 100644 (file)
@@ -35,11 +35,21 @@ class auth_plugin_nntp extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_nntp() {
+    public function __construct() {
         $this->authtype = 'nntp';
         $this->config = get_config('auth/nntp');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_nntp() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index c3ed391..9a1ec28 100644 (file)
@@ -35,10 +35,20 @@ class auth_plugin_nologin extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_nologin() {
+    public function __construct() {
         $this->authtype = 'nologin';
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_nologin() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Do not allow any login.
      *
index fcfce4c..c002930 100644 (file)
@@ -34,11 +34,21 @@ class auth_plugin_none extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_none() {
+    public function __construct() {
         $this->authtype = 'none';
         $this->config = get_config('auth/none');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_none() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work or don't exist and false
      * if the user exists and the password is wrong.
index fd76a09..b1e2053 100644 (file)
@@ -53,12 +53,22 @@ class auth_plugin_pam extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_pam() {
+    public function __construct() {
         $this->authtype = 'pam';
         $this->config = get_config('auth/pam');
         $this->errormessage = '';
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_pam() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index 5e25aa9..4bfaa0b 100644 (file)
@@ -35,11 +35,21 @@ class auth_plugin_pop3 extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_pop3() {
+    public function __construct() {
         $this->authtype = 'pop3';
         $this->config = get_config('auth/pop3');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_pop3() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index a74369e..24ae5d3 100644 (file)
@@ -38,11 +38,21 @@ class auth_plugin_radius extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_radius() {
+    public function __construct() {
         $this->authtype = 'radius';
         $this->config = get_config('auth/radius');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_radius() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index a4cebd8..be7c25b 100644 (file)
@@ -38,11 +38,21 @@ class auth_plugin_shibboleth extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_shibboleth() {
+    public function __construct() {
         $this->authtype = 'shibboleth';
         $this->config = get_config('auth/shibboleth');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_shibboleth() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index 1fc5694..f027f1c 100644 (file)
@@ -35,11 +35,21 @@ class auth_plugin_webservice extends auth_plugin_base {
     /**
      * Constructor.
      */
-    function auth_plugin_webservice() {
+    public function __construct() {
         $this->authtype = 'webservice';
         $this->config = get_config('auth/webservice');
     }
 
+    /**
+     * Old syntax of class constructor. Deprecated in PHP7.
+     *
+     * @deprecated since Moodle 3.1
+     */
+    public function auth_plugin_webservice() {
+        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+        self::__construct();
+    }
+
     /**
      * Returns true if the username and password work and false if they are
      * wrong or don't exist.
index 3d5653f..fc2e304 100644 (file)
@@ -18,13 +18,23 @@ class cssparser {
   private $css;
   private $html;
 
-  function cssparser($html = true) {
+  public function __construct($html = true) {
     // Register "destructor"
     core_shutdown_manager::register_function(array(&$this, "finalize"));
     $this->html = ($html != false);
     $this->Clear();
   }
 
+  /**
+   * Old syntax of class constructor. Deprecated in PHP7.
+   *
+   * @deprecated since Moodle 3.1
+   */
+  public function cssparser($html = true) {
+      debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+      self::__construct($html);
+  }
+
   function finalize() {
     unset($this->css);
   }
@@ -258,4 +268,4 @@ class cssparser {
     }
     return $result;
   }
-}
\ No newline at end of file
+}
index a41292d..caf5f07 100644 (file)
@@ -1778,22 +1778,8 @@ class restore_course_structure_step extends restore_structure_step {
 
         $data = (object)$data;
 
-        if (!empty($CFG->usetags)) { // if enabled in server
-            // TODO: This is highly inneficient. Each time we add one tag
-            // we fetch all the existing because tag_set() deletes them
-            // so everything must be reinserted on each call
-            $tags = array();
-            $existingtags = tag_get_tags('course', $this->get_courseid());
-            // Re-add all the existitng tags
-            foreach ($existingtags as $existingtag) {
-                $tags[] = $existingtag->rawname;
-            }
-            // Add the one being restored
-            $tags[] = $data->rawname;
-            // Send all the tags back to the course
-            tag_set('course', $this->get_courseid(), $tags, 'core',
-                context_course::instance($this->get_courseid())->id);
-        }
+        core_tag_tag::add_item_tag('core', 'course', $this->get_courseid(),
+                context_course::instance($this->get_courseid()), $data->rawname);
     }
 
     public function process_allowed_module($data) {
@@ -4078,25 +4064,17 @@ class restore_create_categories_and_questions extends restore_structure_step {
             return;
         }
 
-        if (!empty($CFG->usetags)) { // if enabled in server
-            // TODO: This is highly inefficient. Each time we add one tag
-            // we fetch all the existing because tag_set() deletes them
-            // so everything must be reinserted on each call
-            $tags = array();
-            $existingtags = tag_get_tags('question', $newquestion);
-            // Re-add all the existitng tags
-            foreach ($existingtags as $existingtag) {
-                $tags[] = $existingtag->rawname;
-            }
-            // Add the one being restored
-            $tags[] = $data->rawname;
+        if (core_tag_tag::is_enabled('core_question', 'question')) {
+            $tagname = $data->rawname;
             // Get the category, so we can then later get the context.
             $categoryid = $this->get_new_parentid('question_category');
             if (empty($this->cachedcategory) || $this->cachedcategory->id != $categoryid) {
                 $this->cachedcategory = $DB->get_record('question_categories', array('id' => $categoryid));
             }
-            // Send all the tags back to the question
-            tag_set('question', $newquestion, $tags, 'core_question', $this->cachedcategory->contextid);
+            // Add the tag to the question.
+            core_tag_tag::add_item_tag('core_question', 'question', $newquestion,
+                    context::instance_by_id($this->cachedcategory->contextid),
+                    $tagname);
         }
     }
 
index 880e75d..120ea6c 100644 (file)
@@ -1209,16 +1209,14 @@ abstract class restore_dbops {
                 }
 
                 // Process tags
-                if (!empty($CFG->usetags) && isset($user->tags)) { // if enabled in server and present in backup
+                if (core_tag_tag::is_enabled('core', 'user') && isset($user->tags)) { // If enabled in server and present in backup.
                     $tags = array();
                     foreach($user->tags['tag'] as $usertag) {
                         $usertag = (object)$usertag;
                         $tags[] = $usertag->rawname;
                     }
-                    if (empty($newuserctxid)) {
-                        $newuserctxid = null; // Tag apis expect a null contextid not 0.
-                    }
-                    tag_set('user', $newuserid, $tags, 'core', $newuserctxid);
+                    core_tag_tag::set_item_tags('core', 'user', $newuserid,
+                            context_user::instance($newuserid), $tags);
                 }
 
                 // Process preferences
@@ -1287,7 +1285,11 @@ abstract class restore_dbops {
     *      1F - None of the above, return true => User needs to be created
     *
     *  if restoring from another site backup (cannot match by id here, replace it by email/firstaccess combination):
-    *      2A - Normal check: If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
+    *      2A - Normal check:
+    *           2A1 - If match by username and mnethost and (email or non-zero firstaccess) => ok, return target user
+    *           2A2 - Exceptional handling (MDL-21912): Match "admin" username. Then, if import_general_duplicate_admin_allowed is
+    *                 enabled, attempt to map the admin user to the user 'admin_[oldsiteid]' if it exists. If not,
+    *                 the user 'admin_[oldsiteid]' will be created in precheck_included users
     *      2B - Handle users deleted in DB and "alive" in backup file:
     *           2B1 - If match by mnethost and user is deleted in DB and not empty email = md5(username) and
     *                 (username LIKE 'backup_email.%' or non-zero firstaccess) => ok, return target user
@@ -1305,7 +1307,7 @@ abstract class restore_dbops {
     * Note: for DB deleted users md5(username) is stored *sometimes* in the email field,
     *       hence we are looking there for usernames if not empty. See delete_user()
     */
-    protected static function precheck_user($user, $samesite) {
+    protected static function precheck_user($user, $samesite, $siteid = null) {
         global $CFG, $DB;
 
         // Handle checks from same site backups
@@ -1376,7 +1378,7 @@ abstract class restore_dbops {
         // Handle checks from different site backups
         } else {
 
-            // 2A - If match by username and mnethost and
+            // 2A1 - If match by username and mnethost and
             //     (email or non-zero firstaccess) => ok, return target user
             if ($rec = $DB->get_record_sql("SELECT *
                                               FROM {user} u
@@ -1393,6 +1395,14 @@ abstract class restore_dbops {
                 return $rec; // Matching user found, return it
             }
 
+            // 2A2 - If we're allowing conflicting admins, attempt to map user to admin_[oldsiteid].
+            if (get_config('backup', 'import_general_duplicate_admin_allowed') && $user->username === 'admin' && $siteid
+                    && $user->mnethostid == $CFG->mnet_localhost_id) {
+                if ($rec = $DB->get_record('user', array('username' => 'admin_' . $siteid))) {
+                    return $rec;
+                }
+            }
+
             // 2B - Handle users deleted in DB and "alive" in backup file
             // Note: for DB deleted users email is stored in username field, hence we
             //       are looking there for emails. See delete_user()
@@ -1500,6 +1510,9 @@ abstract class restore_dbops {
         // Calculate the context we are going to use for capability checking
         $context = context_course::instance($courseid);
 
+        // When conflicting users are detected we may need original site info.
+        $restoreinfo = restore_controller_dbops::load_controller($restoreid)->get_info();
+
         // Calculate if we have perms to create users, by checking:
         // to 'moodle/restore:createuser' and 'moodle/restore:userinfo'
         // and also observe $CFG->disableusercreationonrestore
@@ -1535,14 +1548,28 @@ abstract class restore_dbops {
             }
 
             // Now, precheck that user and, based on returned results, annotate action/problem
-            $usercheck = self::precheck_user($user, $samesite);
+            $usercheck = self::precheck_user($user, $samesite, $restoreinfo->original_site_identifier_hash);
 
             if (is_object($usercheck)) { // No problem, we have found one user in DB to be mapped to
                 // Annotate it, for later process. Set newitemid to mapping user->id
                 self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, $usercheck->id);
 
             } else if ($usercheck === false) { // Found conflict, report it as problem
-                 $problems[] = get_string('restoreuserconflict', '', $user->username);
+                if (!get_config('backup', 'import_general_duplicate_admin_allowed')) {
+                    $problems[] = get_string('restoreuserconflict', '', $user->username);
+                } else if ($user->username == 'admin') {
+                    if (!$cancreateuser) {
+                        $problems[] = get_string('restorecannotcreateuser', '', $user->username);
+                    }
+                    if ($user->mnethostid != $CFG->mnet_localhost_id) {
+                        $problems[] = get_string('restoremnethostidmismatch', '', $user->username);
+                    }
+                    if (!$problems) {
+                        // Duplicate admin allowed, append original site idenfitier to username.
+                        $user->username .= '_' . $restoreinfo->original_site_identifier_hash;
+                        self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, 0, null, (array)$user);
+                    }
+                }
 
             } else if ($usercheck === true) { // User needs to be created, check if we are able
                 if ($cancreateuser) { // Can create user, set newitemid to 0 so will be created later
index 585d9b4..bc2c2b6 100644 (file)
@@ -89,11 +89,12 @@ class restore_logs_processor {
             }
             // Arrived here log is empty, no rule was able to perform the conversion, log the problem
             if (empty($newlog)) {
-                self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored', backup::LOG_DEBUG);
+                self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored. ' .
+                    json_encode($log), backup::LOG_DEBUG);
             }
 
         } else { // Action not found log the problem
-            self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored', backup::LOG_DEBUG);
+            self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored. '.json_encode($log), backup::LOG_DEBUG);
             $newlog = false;
 
         }
index 0cfdfe7..500fa0c 100644 (file)
@@ -62,7 +62,7 @@ class restore_structure_parser_processor extends grouped_parser_processor {
         }
         // Decode file.php calls
         $search = array ("$@FILEPHP@$");
-        $replace = array(get_file_url($this->courseid));
+        $replace = array(moodle_url::make_legacyfile_url($this->courseid, null));
         $result = str_replace($search, $replace, $cdata);
         // Now $@SLASH@$ and $@FORCEDOWNLOAD@$ MDL-18799
         $search = array('$@SLASH@$', '$@FORCEDOWNLOAD@$');
index 5d8cb55..e18ada4 100644 (file)
@@ -183,6 +183,10 @@ abstract class backup_structure_step extends backup_step {
      * @return void
      */
     protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
+        global $CFG;
+        // This global declaration is required, because where we do require_once($backupfile);
+        // That file may in turn try to do require_once($CFG->dirroot ...).
+        // That worked in the past, we should keep it working.
 
         // Verify if this is a BC call for an activity backup. See NOTE above for this special case.
         if ($plugintype === null and $pluginname === null) {
index de7b002..b59ac82 100644 (file)
@@ -313,6 +313,10 @@ abstract class restore_structure_step extends restore_step {
      * @return void
      */
     protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
+        global $CFG;
+        // This global declaration is required, because where we do require_once($backupfile);
+        // That file may in turn try to do require_once($CFG->dirroot ...).
+        // That worked in the past, we should keep it working.
 
         // Verify if this is a BC call for an activity restore. See NOTE above for this special case.
         if ($plugintype === null and $pluginname === null) {
index 201d29e..45bc4ec 100644 (file)
@@ -126,6 +126,9 @@ class backp_settings_testcase extends basic_testcase {
         } catch (exception $e) {
             $this->assertTrue($e instanceof base_setting_exception);
             $this->assertEquals($e->errorcode, 'incorrect_object_passed');
+        } catch (TypeError $e) {
+            // On PHP7+ we get a TypeError raised, lets check we've the right error.
+            $this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
         }
         restore_error_handler();
 
@@ -140,6 +143,9 @@ class backp_settings_testcase extends basic_testcase {
         } catch (exception $e) {
             $this->assertTrue($e instanceof base_setting_exception);
             $this->assertEquals($e->errorcode, 'incorrect_object_passed');
+        } catch (TypeError $e) {
+            // On PHP7+ we get a TypeError raised, lets check we've the right error.
+            $this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
         }
         restore_error_handler();
 
@@ -302,6 +308,9 @@ class backp_settings_testcase extends basic_testcase {
         } catch (exception $e) {
             $this->assertTrue($e instanceof backup_setting_exception);
             $this->assertEquals($e->errorcode, 'incorrect_object_passed');
+        } catch (TypeError $e) {
+            // On PHP7+ we get a TypeError raised, lets check we've the right error.
+            $this->assertRegexp('/must be an instance of base_setting/', $e->getMessage());
         }
         restore_error_handler();
 
index 2de1122..a8d4382 100644 (file)
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
 
 global $CFG;
 require_once($CFG->libdir . '/badgeslib.php');
+require_once($CFG->dirroot . '/badges/lib.php');
 
 class core_badges_badgeslib_testcase extends advanced_testcase {
     protected $badgeid;
@@ -472,4 +473,69 @@ class core_badges_badgeslib_testcase extends advanced_testcase {
         $this->assertStringMatchesFormat($testassertion->class, json_encode($assertion->get_badge_class()));
         $this->assertStringMatchesFormat($testassertion->issuer, json_encode($assertion->get_issuer()));
     }
+
+    /**
+     * Tests the core_badges_myprofile_navigation() function.
+     */
+    public function test_core_badges_myprofile_navigation() {
+        // Set up the test.
+        $tree = new \core_user\output\myprofile\tree();
+        $this->setAdminUser();
+        $badge = new badge($this->badgeid);
+        $badge->issue($this->user->id, true);
+        $iscurrentuser = true;
+        $course = null;
+
+        // Enable badges.
+        set_config('enablebadges', true);
+
+        // Check the node tree is correct.
+        core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
+        $reflector = new ReflectionObject($tree);
+        $nodes = $reflector->getProperty('nodes');
+        $nodes->setAccessible(true);
+        $this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
+    }
+
+    /**
+     * Tests the core_badges_myprofile_navigation() function with badges disabled..
+     */
+    public function test_core_badges_myprofile_navigation_badges_disabled() {
+        // Set up the test.
+        $tree = new \core_user\output\myprofile\tree();
+        $this->setAdminUser();
+        $badge = new badge($this->badgeid);
+        $badge->issue($this->user->id, true);
+        $iscurrentuser = false;
+        $course = null;
+
+        // Disable badges.
+        set_config('enablebadges', false);
+
+        // Check the node tree is correct.
+        core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $course);
+        $reflector = new ReflectionObject($tree);
+        $nodes = $reflector->getProperty('nodes');
+        $nodes->setAccessible(true);
+        $this->assertArrayNotHasKey('localbadges', $nodes->getValue($tree));
+    }
+
+    /**
+     * Tests the core_badges_myprofile_navigation() function with a course badge.
+     */
+    public function test_core_badges_myprofile_navigation_with_course_badge() {
+        // Set up the test.
+        $tree = new \core_user\output\myprofile\tree();
+        $this->setAdminUser();
+        $badge = new badge($this->coursebadge);
+        $badge->issue($this->user->id, true);
+        $iscurrentuser = false;
+
+        // Check the node tree is correct.
+        core_badges_myprofile_navigation($tree, $this->user, $iscurrentuser, $this->course);
+        $reflector = new ReflectionObject($tree);
+        $nodes = $reflector->getProperty('nodes');
+        $nodes->setAccessible(true);
+        $this->assertArrayHasKey('localbadges', $nodes->getValue($tree));
+    }
 }
diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature
new file mode 100644 (file)
index 0000000..1263382
--- /dev/null
@@ -0,0 +1,111 @@
+@block @block_activity_results
+Feature: The activity results block displays student scores as scales
+  In order to be display student scores as scales
+  As a user
+  I need to see the activity results block
+
+  Background:
+    Given the following "users" exist:
+      | username | firstname | lastname | email | idnumber |
+      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
+      | student1 | Student | 1 | student1@example.com | S1 |
+      | student2 | Student | 2 | student2@example.com | S2 |
+      | student3 | Student | 3 | student3@example.com | S3 |
+      | student4 | Student | 4 | student4@example.com | S4 |
+      | student5 | Student | 5 | student5@example.com | S5 |
+    And the following "courses" exist:
+      | fullname | shortname | category |
+      | Course 1 | C1 | 0 |
+    And the following "course enrolments" exist:
+      | user | course | role |
+      | teacher1 | C1 | editingteacher |
+      | student1 | C1 | student |
+      | student2 | C1 | student |
+      | student3 | C1 | student |
+      | student4 | C1 | student |
+      | student5 | C1 | student |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    And I navigate to "Grades" node in "Course administration"
+    And I navigate to "Scales" node in "Grade administration"
+    And I press "Add a new scale"
+    And I set the following fields to these values:
+      | Name | My Scale |
+      | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
+    And I press "Save changes"
+    And I follow "Course 1"
+    And I turn editing mode on
+    And I add a "Assignment" to section "1" and I fill the form with:
+      | Assignment name | Test assignment |
+      | Description | Offline text |
+      | assignsubmission_file_enabled | 0 |
+      | id_modgrade_type | Scale |
+      | id_modgrade_scale | My Scale |
+    And I follow "Course 1"
+    And I navigate to "Grades" node in "Course administration"
+    And I turn editing mode on
+    And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
+    And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
+    And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
+    And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
+    And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
+    And I press "Save changes"
+    And I follow "Course 1"
+
+  Scenario: Configure the block on the course page to show 1 high score
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 1 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Display full names |
+      | id_config_decimalpoints | 0 |
+    And I press "Save changes"
+    Then I should see "Student 1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+
+  Scenario: Try to configure the block on the course page to show multiple high scores using full names
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 3 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Display full names |
+    And I press "Save changes"
+    Then I should see "Student 1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "Student 2" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should see "Student 3" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
+
+  Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 3 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Display only ID numbers |
+    And I press "Save changes"
+    Then I should see "User S1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "User S2" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should see "User S3" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
+
+  Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 3 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Anonymous results |
+    And I press "Save changes"
+    Then I should see "User" in the "Activity results" "block"
+    And I should not see "Student 1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should not see "Student 2" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should not see "Student 3" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature
new file mode 100644 (file)
index 0000000..7856da5
--- /dev/null
@@ -0,0 +1,153 @@
+@block @block_activity_results
+Feature: The activity results block displays student scores as scales
+  In order to be display student scores as scales
+  As a user
+  I need to see the activity results block
+
+  Background:
+    Given the following "users" exist:
+      | username | firstname | lastname | email | idnumber |
+      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
+      | student1 | Student | 1 | student1@example.com | S1 |
+      | student2 | Student | 2 | student2@example.com | S2 |
+      | student3 | Student | 3 | student3@example.com | S3 |
+      | student4 | Student | 4 | student4@example.com | S4 |
+      | student5 | Student | 5 | student5@example.com | S5 |
+      | student6 | Student | 6 | student6@example.com | S6 |
+    And the following "courses" exist:
+      | fullname | shortname | category |
+      | Course 1 | C1 | 0 |
+    And the following "groups" exist:
+      | name | course | idnumber |
+      | Group 1 | C1 | G1 |
+      | Group 2 | C1 | G2 |
+      | Group 3 | C1 | G3 |
+      | Group 4 | C1 | G4 |
+      | Group 5 | C1 | G5 |
+    And the following "course enrolments" exist:
+      | user | course | role |
+      | teacher1 | C1 | editingteacher |
+      | student1 | C1 | student |
+      | student2 | C1 | student |
+      | student3 | C1 | student |
+      | student4 | C1 | student |
+      | student5 | C1 | student |
+      | student6 | C1 | student |
+    And the following "group members" exist:
+      | user     | group   |
+      | student1 | G1 |
+      | student2 | G1 |
+      | student3 | G2 |
+      | student4 | G2 |
+      | student5 | G3 |
+      | student6 | G3 |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    And I navigate to "Grades" node in "Course administration"
+    And I navigate to "Scales" node in "Grade administration"
+    And I press "Add a new scale"
+    And I set the following fields to these values:
+      | Name | My Scale |
+      | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
+    And I press "Save changes"
+    And I follow "Course 1"
+    And I turn editing mode on
+    And I add a "Assignment" to section "1" and I fill the form with:
+      | Assignment name | Test assignment |
+      | Description | Offline text |
+      | assignsubmission_file_enabled | 0 |
+      | id_modgrade_type | Scale |
+      | id_modgrade_scale | My Scale |
+      | Group mode | Separate groups |
+    And I follow "Course 1"
+    And I navigate to "Grades" node in "Course administration"
+    And I turn editing mode on
+    And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
+    And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
+    And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment"
+    And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment"
+    And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment"
+    And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
+    And I press "Save changes"
+    And I follow "Course 1"
+
+  Scenario: Try to configure the block on the course page to show 1 high score
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 1 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Display full names |
+      | id_config_usegroups | Yes |
+    And I press "Save changes"
+    Then I should see "Group 1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I log out
+    And I log in as "student1"
+    And I follow "Course 1"
+    And I should see "Student 1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+
+  Scenario: Try to configure the block on the course page to show multiple high scores using full names
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 3 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Display full names |
+      | id_config_usegroups | Yes |
+    And I press "Save changes"
+    Then I should see "Group 1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "Group 2" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should see "Group 3" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
+    And I log out
+    And I log in as "student3"
+    And I follow "Course 1"
+    And I should see "Student 3" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should see "Student 4" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
+
+  Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 3 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Display only ID numbers |
+      | id_config_usegroups | Yes |
+    And I press "Save changes"
+    Then I should see "Group" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
+    And I log out
+    And I log in as "student1"
+    And I follow "Course 1"
+    And I should see "User S1" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "User S2" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+
+  Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
+    Given I add the "Activity results" block
+    When I configure the "Activity results" block
+    And I set the following fields to these values:
+      | id_config_showbest | 3 |
+      | id_config_showworst | 0 |
+      | id_config_nameformat | Anonymous results |
+      | id_config_usegroups | Yes |
+    And I press "Save changes"
+    Then I should see "Group" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
+    And I should see "Good" in the "Activity results" "block"
+    And I log out
+    And I log in as "student1"
+    And I follow "Course 1"
+    And I should see "User" in the "Activity results" "block"
+    And I should see "Excellent!" in the "Activity results" "block"
+    And I should see "Very good" in the "Activity results" "block"
index 3939bd6..27807f8 100644 (file)
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
       | student4 | C1 | student |
       | student5 | C1 | student |
       | student6 | C1 | student |
-
-  @javascript
-  Scenario: Configure the block on the course page to show 1 high score
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
+    And the following "group members" exist:
+      | user     | group   |
+      | student1 | G1 |
+      | student2 | G1 |
+      | student3 | G2 |
+      | student4 | G2 |
+      | student5 | G3 |
+      | student6 | G3 |
+    And I log in as "teacher1"
     And I follow "Course 1"
     And I turn editing mode on
     And I add a "Assignment" to section "1" and I fill the form with:
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
     And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
     And I press "Save changes"
     And I follow "Course 1"
-    And I add the "Activity results" block
+
+  Scenario: Configure the block on the course page to show 1 high score
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 1 |
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
     Then I should see "Group 1" in the "Activity results" "block"
     And I should see "95%" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show 1 high score as a fraction
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 1 |
@@ -124,37 +93,8 @@ Feature: The activity results block displays student scores
     And I should see "Student 1" in the "Activity results" "block"
     And I should see "100.00/100.00" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 1 |
@@ -171,37 +111,8 @@ Feature: The activity results block displays student scores
     And I should see "Student 1" in the "Activity results" "block"
     And I should see "100.00" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show multiple high scores as percentages
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 3 |
@@ -225,37 +136,8 @@ Feature: The activity results block displays student scores
     And I should see "Student 2" in the "Activity results" "block"
     And I should see "90%" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show multiple high scores as fractions
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 3 |
@@ -278,37 +160,8 @@ Feature: The activity results block displays student scores
     And I should see "Student 4" in the "Activity results" "block"
     And I should see "80.00/100.00" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 3 |
@@ -331,37 +184,8 @@ Feature: The activity results block displays student scores
     And I should see "Student 2" in the "Activity results" "block"
     And I should see "90.00" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 3 |
@@ -382,37 +206,8 @@ Feature: The activity results block displays student scores
     And I should see "User S2" in the "Activity results" "block"
     And I should see "90.00%" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Separate groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment"
-    And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
-    And I press "Save changes"
-    And I follow "Course 1"
-    And I add the "Activity results" block
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 3 |
index 845e8ab..f5fd1bd 100644 (file)
@@ -33,19 +33,15 @@ Feature: The activity results block displays student scores
       | student4 | C1 | student |
       | student5 | C1 | student |
       | student6 | C1 | student |
-
-  @javascript
-  Scenario: Configure the block on the course page to show 1 high score
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
+    And the following "group members" exist:
+      | user     | group   |
+      | student1 | G1 |
+      | student2 | G1 |
+      | student3 | G2 |
+      | student4 | G2 |
+      | student5 | G3 |
+      | student6 | G3 |
+    And I log in as "teacher1"
     And I follow "Course 1"
     And I turn editing mode on
     And I add a "Assignment" to section "1" and I fill the form with:
@@ -64,7 +60,9 @@ Feature: The activity results block displays student scores
     And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
     And I press "Save changes"
     And I follow "Course 1"
-    And I add the "Activity results" block
+
+  Scenario: Configure the block on the course page to show 1 high score
+    Given I add the "Activity results" block
     When I configure the "Activity results" block
     And I set the following fields to these values:
       | id_config_showbest | 1 |
@@ -77,37 +75,8 @@ Feature: The activity results block displays student scores
     Then I should see "Group 1" in the "Activity results" "block"
     And I should see "95%" in the "Activity results" "block"
 
-  @javascript
   Scenario: Try to configure the block on the course page to show 1 high score as a fraction
-    Given I log in as "teacher1"
-    And I follow "Course 1"
-    And I expand "Users" node
-    And I follow "Groups"
-    And I add "Student 1 (student1@example.com)" user to "Group 1" group members
-    And I add "Student 2 (student2@example.com)" user to "Group 1" group members
-    And I add "Student 3 (student3@example.com)" user to "Group 2" group members
-    And I add "Student 4 (student4@example.com)" user to "Group 2" group members
-    And I add "Student 5 (student5@example.com)" user to "Group 3" group members
-    And I add "Student 6 (student6@example.com)" user to "Group 3" group members
-    And I follow "Course 1"
-    And I turn editing mode on
-    And I add a "Assignment" to section "1" and I fill the form with:
-      | Assignment name | Test assignment |
-      | Description | Offline text |
-      | assignsubmission_file_enabled | 0 |
-      | Group mode | Visible groups |
-    And I follow "Course 1"
-    And I navigate to "Grades" node in "Course administration"
-    And I turn editing mode on
-    And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
-    And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment"
-    And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment&qu