Merge branch 'MDL-30350-master-1' of git://git.luns.net.uk/moodle
authorAparup Banerjee <aparup@moodle.com>
Thu, 8 Dec 2011 06:19:46 +0000 (14:19 +0800)
committerAparup Banerjee <aparup@moodle.com>
Thu, 8 Dec 2011 06:19:46 +0000 (14:19 +0800)
865 files changed:
admin/blocks.php
admin/cli/install.php
admin/cli/purge_caches.php [new file with mode: 0644]
admin/lib.php
admin/settings/appearance.php
admin/settings/users.php
admin/tool/bloglevelupgrade/version.php
admin/tool/capability/version.php
admin/tool/customlang/version.php
admin/tool/dbtransfer/version.php
admin/tool/generator/version.php
admin/tool/health/version.php
admin/tool/innodb/version.php
admin/tool/langimport/index.php
admin/tool/langimport/lang/en/tool_langimport.php
admin/tool/langimport/version.php
admin/tool/multilangupgrade/version.php
admin/tool/profiling/version.php
admin/tool/qeupgradehelper/version.php
admin/tool/replace/version.php
admin/tool/spamcleaner/version.php
admin/tool/timezoneimport/version.php
admin/tool/unittest/other/pdflibtestpage.php
admin/tool/unittest/version.php
admin/tool/unsuproles/version.php
admin/tool/upgrade.txt [new file with mode: 0644]
admin/tool/uploaduser/version.php
admin/tool/xmldb/lang/en/tool_xmldb.php
admin/tool/xmldb/version.php
admin/webservice/forms.php
auth/cas/version.php
auth/db/version.php
auth/email/version.php [new file with mode: 0644]
auth/fc/version.php
auth/imap/version.php
auth/ldap/version.php
auth/manual/version.php
auth/mnet/jump.php
auth/mnet/version.php
auth/nntp/version.php
auth/nologin/version.php [new file with mode: 0644]
auth/none/version.php [new file with mode: 0644]
auth/pam/version.php
auth/pop3/version.php
auth/radius/version.php
auth/shibboleth/version.php
auth/webservice/version.php [new file with mode: 0644]
backup/cc/entity.resource.class.php
backup/cc/entity11.resource.class.php
backup/cc/schemas/domainProfile_1/common/dataTypes.xsd
backup/cc/schemas/domainProfile_1/dataTypes_localised.xsd
backup/cc/schemas/domainProfile_2/common/dataTypes.xsd
backup/cc/schemas/domainProfile_2/dataTypes_localised.xsd
backup/cc/schemas/domainProfile_4/ims_qtiasiv1p2_localised.xsd
backup/cc/schemas/domainProfile_4/xml.xsd
backup/cc/schemas/xml.xsd
backup/cc/schemas11/xml.xsd
backup/moodle2/backup_stepslib.php
backup/moodle2/restore_course_task.class.php
backup/moodle2/restore_root_task.class.php
backup/moodle2/restore_stepslib.php
backup/restore.php
backup/util/dbops/restore_dbops.class.php
backup/util/ui/renderer.php
backup/util/ui/restore_ui.class.php
backup/util/ui/yui/confirmcancel/confirmcancel.js
blocks/activity_modules/version.php
blocks/admin_bookmarks/version.php
blocks/blog_menu/version.php
blocks/blog_recent/version.php
blocks/blog_tags/version.php
blocks/calendar_month/version.php
blocks/calendar_upcoming/version.php
blocks/comments/block_comments.php
blocks/comments/version.php
blocks/community/renderer.php
blocks/community/version.php
blocks/completionstatus/version.php
blocks/course_list/version.php
blocks/course_overview/version.php
blocks/course_summary/version.php
blocks/edit_form.php
blocks/feedback/version.php
blocks/glossary_random/version.php
blocks/html/version.php
blocks/login/version.php
blocks/mentees/version.php
blocks/messages/version.php
blocks/mnet_hosts/version.php
blocks/myprofile/version.php
blocks/navigation/version.php
blocks/news_items/version.php
blocks/online_users/version.php
blocks/participants/version.php
blocks/private_files/version.php
blocks/quiz_results/version.php
blocks/recent_activity/version.php
blocks/rss_client/version.php
blocks/search_forums/version.php
blocks/section_links/block_section_links.php
blocks/section_links/version.php
blocks/selfcompletion/version.php
blocks/settings/version.php
blocks/site_main_menu/version.php
blocks/social_activities/version.php
blocks/tag_flickr/version.php
blocks/tag_youtube/version.php
blocks/tags/version.php
blog/lib.php
calendar/preferences_form.php
comment/comment.js
course/externallib.php
course/format/scorm/version.php [new file with mode: 0644]
course/format/social/version.php [new file with mode: 0644]
course/format/topics/version.php [new file with mode: 0644]
course/format/weeks/version.php [new file with mode: 0644]
enrol/authorize/version.php
enrol/category/version.php
enrol/cohort/version.php
enrol/database/lib.php
enrol/database/version.php
enrol/externallib.php
enrol/flatfile/version.php
enrol/guest/db/upgrade.php [new file with mode: 0644]
enrol/guest/lib.php
enrol/guest/version.php
enrol/imsenterprise/lib.php
enrol/imsenterprise/version.php
enrol/ldap/version.php
enrol/manual/version.php
enrol/meta/version.php
enrol/mnet/version.php
enrol/paypal/version.php
enrol/self/edit_form.php
enrol/self/lang/en/enrol_self.php
enrol/self/version.php
error/index.php
filter/activitynames/version.php [new file with mode: 0644]
filter/algebra/version.php [new file with mode: 0644]
filter/censor/version.php [new file with mode: 0644]
filter/emailprotect/version.php [new file with mode: 0644]
filter/emoticon/version.php
filter/mediaplugin/filter.php
filter/mediaplugin/simpletest/testfiltermediaplugin.php
filter/mediaplugin/version.php
filter/multilang/version.php [new file with mode: 0644]
filter/tex/version.php
filter/tidy/version.php [new file with mode: 0644]
filter/upgrade.txt [new file with mode: 0644]
filter/urltolink/version.php
grade/edit/tree/grade.php
grade/edit/tree/lib.php
grade/export/ods/version.php
grade/export/txt/version.php
grade/export/xls/version.php
grade/export/xml/version.php
grade/grading/form/rubric/edit.php
grade/grading/form/rubric/edit_form.php
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/styles.css
grade/grading/simpletest/testlib.php
grade/import/csv/version.php
grade/import/xml/version.php
grade/report/grader/styles.css
grade/report/grader/version.php
grade/report/outcomes/version.php
grade/report/overview/version.php
grade/report/user/index.php
grade/report/user/lib.php
grade/report/user/version.php
group/lib.php
index.php
install.php
install/lang/af/admin.php
install/lang/af/langconfig.php
install/lang/am/install.php
install/lang/am/langconfig.php
install/lang/am/moodle.php
install/lang/ar/admin.php
install/lang/ar/error.php
install/lang/ar/install.php
install/lang/ar/langconfig.php
install/lang/ar/moodle.php
install/lang/ast/admin.php
install/lang/ast/error.php
install/lang/ast/install.php
install/lang/ast/langconfig.php
install/lang/ast/moodle.php
install/lang/az/admin.php
install/lang/az/error.php
install/lang/az/install.php
install/lang/az/langconfig.php
install/lang/be/langconfig.php
install/lang/be/moodle.php
install/lang/bg/admin.php
install/lang/bg/error.php
install/lang/bg/install.php
install/lang/bg/langconfig.php
install/lang/bg/moodle.php
install/lang/bn/admin.php
install/lang/bn/install.php
install/lang/bn/langconfig.php
install/lang/bn/moodle.php
install/lang/bs/install.php
install/lang/bs/langconfig.php
install/lang/ca/admin.php
install/lang/ca/error.php
install/lang/ca/install.php
install/lang/ca/langconfig.php
install/lang/ca/moodle.php
install/lang/ckb/langconfig.php [new file with mode: 0644]
install/lang/cs/admin.php
install/lang/cs/error.php
install/lang/cs/install.php
install/lang/cs/langconfig.php
install/lang/cs/moodle.php
install/lang/cy/admin.php
install/lang/cy/error.php
install/lang/cy/install.php
install/lang/cy/langconfig.php
install/lang/cy/moodle.php
install/lang/da/admin.php
install/lang/da/error.php
install/lang/da/install.php
install/lang/da/langconfig.php
install/lang/da/moodle.php
install/lang/de/admin.php
install/lang/de/error.php
install/lang/de/install.php
install/lang/de/langconfig.php
install/lang/de/moodle.php
install/lang/de_du/error.php
install/lang/de_du/install.php
install/lang/de_du/langconfig.php
install/lang/de_kids/langconfig.php
install/lang/dv/admin.php
install/lang/dv/error.php
install/lang/dv/install.php
install/lang/dv/langconfig.php
install/lang/dv/moodle.php
install/lang/el/admin.php
install/lang/el/error.php
install/lang/el/install.php
install/lang/el/langconfig.php
install/lang/el/moodle.php
install/lang/en/admin.php
install/lang/en/error.php
install/lang/en/install.php
install/lang/en/langconfig.php
install/lang/en/moodle.php
install/lang/en_us/install.php
install/lang/en_us/langconfig.php
install/lang/es/admin.php
install/lang/es/error.php
install/lang/es/install.php
install/lang/es/langconfig.php
install/lang/es/moodle.php
install/lang/es_ar/langconfig.php
install/lang/es_es/langconfig.php
install/lang/es_mx/langconfig.php
install/lang/et/admin.php
install/lang/et/error.php
install/lang/et/install.php
install/lang/et/langconfig.php
install/lang/et/moodle.php
install/lang/eu/admin.php
install/lang/eu/error.php
install/lang/eu/install.php
install/lang/eu/langconfig.php
install/lang/eu/moodle.php
install/lang/fa/admin.php
install/lang/fa/install.php
install/lang/fa/langconfig.php
install/lang/fa/moodle.php
install/lang/fi/admin.php
install/lang/fi/error.php
install/lang/fi/install.php
install/lang/fi/langconfig.php
install/lang/fi/moodle.php
install/lang/fil/langconfig.php
install/lang/fil/moodle.php
install/lang/fj/langconfig.php
install/lang/fr/admin.php
install/lang/fr/error.php
install/lang/fr/install.php
install/lang/fr/langconfig.php
install/lang/fr/moodle.php
install/lang/fr_ca/install.php
install/lang/fr_ca/langconfig.php
install/lang/fr_ca/moodle.php
install/lang/ga/langconfig.php
install/lang/gd/langconfig.php
install/lang/gl/admin.php
install/lang/gl/error.php
install/lang/gl/install.php
install/lang/gl/langconfig.php
install/lang/gl/moodle.php
install/lang/gu/error.php
install/lang/gu/langconfig.php
install/lang/gu/moodle.php
install/lang/he/admin.php
install/lang/he/error.php
install/lang/he/install.php
install/lang/he/langconfig.php
install/lang/he/moodle.php
install/lang/hi/langconfig.php
install/lang/hi/moodle.php
install/lang/hr/admin.php
install/lang/hr/error.php
install/lang/hr/install.php
install/lang/hr/langconfig.php
install/lang/hr/moodle.php
install/lang/hu/admin.php
install/lang/hu/error.php
install/lang/hu/install.php
install/lang/hu/langconfig.php
install/lang/hu/moodle.php
install/lang/hy/admin.php
install/lang/hy/error.php
install/lang/hy/install.php
install/lang/hy/langconfig.php
install/lang/hy/moodle.php
install/lang/id/langconfig.php
install/lang/id/moodle.php
install/lang/is/admin.php
install/lang/is/error.php
install/lang/is/install.php
install/lang/is/langconfig.php
install/lang/is/moodle.php
install/lang/it/admin.php
install/lang/it/error.php
install/lang/it/install.php
install/lang/it/langconfig.php
install/lang/it/moodle.php
install/lang/ja/admin.php
install/lang/ja/error.php
install/lang/ja/install.php
install/lang/ja/langconfig.php
install/lang/ja/moodle.php
install/lang/ka/admin.php
install/lang/ka/install.php
install/lang/ka/langconfig.php
install/lang/kk/install.php
install/lang/kk/langconfig.php
install/lang/kk/moodle.php
install/lang/km/admin.php
install/lang/km/error.php
install/lang/km/install.php
install/lang/km/langconfig.php
install/lang/km/moodle.php
install/lang/kn/langconfig.php
install/lang/ko/admin.php
install/lang/ko/error.php
install/lang/ko/install.php
install/lang/ko/langconfig.php
install/lang/ko/moodle.php
install/lang/la/langconfig.php
install/lang/la/moodle.php
install/lang/lo/admin.php
install/lang/lo/install.php
install/lang/lo/langconfig.php
install/lang/lo/moodle.php
install/lang/lt/langconfig.php
install/lang/lt/moodle.php
install/lang/lv/admin.php
install/lang/lv/error.php
install/lang/lv/install.php
install/lang/lv/langconfig.php
install/lang/lv/moodle.php
install/lang/mi_tn/langconfig.php
install/lang/mi_tn/moodle.php
install/lang/mi_wwow/admin.php
install/lang/mi_wwow/error.php
install/lang/mi_wwow/install.php
install/lang/mi_wwow/langconfig.php
install/lang/mi_wwow/moodle.php
install/lang/mk/admin.php
install/lang/mk/error.php
install/lang/mk/install.php
install/lang/mk/langconfig.php
install/lang/mk/moodle.php
install/lang/ml/langconfig.php
install/lang/ml/moodle.php
install/lang/mn/admin.php
install/lang/mn/error.php
install/lang/mn/install.php
install/lang/mn/langconfig.php
install/lang/mn/moodle.php
install/lang/mr/admin.php
install/lang/mr/error.php
install/lang/mr/install.php
install/lang/mr/langconfig.php
install/lang/mr/moodle.php
install/lang/ms/langconfig.php
install/lang/ne/langconfig.php [new file with mode: 0644]
install/lang/nl/admin.php
install/lang/nl/error.php
install/lang/nl/install.php
install/lang/nl/langconfig.php
install/lang/nl/moodle.php
install/lang/nn/langconfig.php
install/lang/nn/moodle.php
install/lang/no/admin.php
install/lang/no/error.php
install/lang/no/install.php
install/lang/no/langconfig.php
install/lang/no/moodle.php
install/lang/no_gr/langconfig.php
install/lang/no_gr/moodle.php
install/lang/oc_es/langconfig.php
install/lang/pl/admin.php
install/lang/pl/error.php
install/lang/pl/install.php
install/lang/pl/langconfig.php
install/lang/pl/moodle.php
install/lang/pt/admin.php
install/lang/pt/error.php
install/lang/pt/install.php
install/lang/pt/langconfig.php
install/lang/pt/moodle.php
install/lang/pt_br/admin.php
install/lang/pt_br/error.php
install/lang/pt_br/install.php
install/lang/pt_br/langconfig.php
install/lang/pt_br/moodle.php
install/lang/ro/admin.php
install/lang/ro/error.php
install/lang/ro/install.php
install/lang/ro/langconfig.php
install/lang/ro/moodle.php
install/lang/ru/admin.php
install/lang/ru/error.php
install/lang/ru/install.php
install/lang/ru/langconfig.php
install/lang/ru/moodle.php
install/lang/si/admin.php
install/lang/si/error.php
install/lang/si/install.php
install/lang/si/langconfig.php
install/lang/si/moodle.php
install/lang/sk/admin.php
install/lang/sk/error.php
install/lang/sk/install.php
install/lang/sk/langconfig.php
install/lang/sk/moodle.php
install/lang/sl/admin.php
install/lang/sl/error.php
install/lang/sl/install.php
install/lang/sl/langconfig.php
install/lang/sl/moodle.php
install/lang/sm/install.php
install/lang/sm/langconfig.php
install/lang/sm/moodle.php
install/lang/so/admin.php
install/lang/so/install.php
install/lang/so/langconfig.php
install/lang/so/moodle.php
install/lang/sq/langconfig.php
install/lang/sq/moodle.php
install/lang/sr/langconfig.php
install/lang/sr_cr/admin.php
install/lang/sr_cr/error.php
install/lang/sr_cr/install.php
install/lang/sr_cr/langconfig.php
install/lang/sr_cr/moodle.php
install/lang/sr_cr_bo/langconfig.php
install/lang/sr_lt/admin.php
install/lang/sr_lt/error.php
install/lang/sr_lt/install.php
install/lang/sr_lt/langconfig.php
install/lang/sr_lt/moodle.php
install/lang/sv/admin.php
install/lang/sv/error.php
install/lang/sv/install.php
install/lang/sv/langconfig.php
install/lang/sv/moodle.php
install/lang/sv_fi/langconfig.php [new file with mode: 0644]
install/lang/sw/admin.php [new file with mode: 0644]
install/lang/ta/admin.php
install/lang/ta/error.php
install/lang/ta/install.php
install/lang/ta/langconfig.php
install/lang/ta/moodle.php
install/lang/ta_lk/admin.php
install/lang/ta_lk/error.php
install/lang/ta_lk/install.php
install/lang/ta_lk/langconfig.php
install/lang/ta_lk/moodle.php
install/lang/te/admin.php
install/lang/te/langconfig.php
install/lang/te/moodle.php
install/lang/th/admin.php
install/lang/th/install.php
install/lang/th/langconfig.php
install/lang/th/moodle.php
install/lang/ti/langconfig.php
install/lang/ti/moodle.php
install/lang/tl/admin.php
install/lang/tl/error.php
install/lang/tl/install.php
install/lang/tl/langconfig.php
install/lang/tl/moodle.php
install/lang/to/install.php
install/lang/to/langconfig.php
install/lang/to/moodle.php
install/lang/tr/admin.php
install/lang/tr/error.php
install/lang/tr/install.php
install/lang/tr/langconfig.php
install/lang/tr/moodle.php
install/lang/uk/langconfig.php
install/lang/uk/moodle.php
install/lang/ur/install.php
install/lang/ur/langconfig.php
install/lang/ur/moodle.php
install/lang/uz/install.php
install/lang/uz/langconfig.php
install/lang/uz/moodle.php
install/lang/vi/admin.php
install/lang/vi/install.php
install/lang/vi/langconfig.php
install/lang/vi/moodle.php
install/lang/wo/langconfig.php
install/lang/zh_cn/admin.php
install/lang/zh_cn/error.php
install/lang/zh_cn/install.php
install/lang/zh_cn/langconfig.php
install/lang/zh_cn/moodle.php
install/lang/zh_tw/admin.php
install/lang/zh_tw/error.php
install/lang/zh_tw/install.php
install/lang/zh_tw/langconfig.php
install/lang/zh_tw/moodle.php
install/lang/zu/error.php
install/lang/zu/install.php
install/lang/zu/langconfig.php
install/stringnames.txt
lang/en/admin.php
lang/en/backup.php
lang/en/blog.php
lang/en/error.php
lang/en/install.php
lang/en/moodle.php
lang/en/webservice.php
lib/accesslib.php
lib/adminlib.php
lib/bennu/iCalendar_components.php
lib/bennu/iCalendar_parameters.php
lib/bennu/iCalendar_properties.php
lib/blocklib.php
lib/datalib.php
lib/db/install.xml
lib/db/services.php
lib/db/upgrade.php
lib/db/upgradelib.php
lib/ddl/simpletest/testddl.php
lib/dml/moodle_database.php
lib/dml/mysqli_native_moodle_database.php
lib/dml/simpletest/testdml.php
lib/dml/sqlsrv_native_moodle_database.php
lib/dmllib.php
lib/editor/textarea/version.php
lib/editor/tinymce/lib.php
lib/editor/tinymce/settings.php
lib/editor/tinymce/version.php
lib/filelib.php
lib/filestorage/file_storage.php
lib/filterlib.php
lib/form/form.js
lib/formslib.php
lib/gradelib.php
lib/installlib.php
lib/messagelib.php
lib/moodlelib.php
lib/navigationlib.php
lib/outputcomponents.php
lib/outputrenderers.php
lib/outputrequirementslib.php
lib/plagiarismlib.php
lib/questionlib.php
lib/resourcelib.php
lib/rsslib.php
lib/setup.php
lib/setuplib.php
lib/simpletest/testcompletionlib.php
lib/upgrade.txt
lib/upgradelib.php
lib/weblib.php
login/token.php
message/edit.php
message/lib.php
message/output/email/message_output_email.php
message/output/email/version.php
message/output/jabber/version.php
message/output/popup/version.php
message/upgrade.txt [new file with mode: 0644]
mnet/service/enrol/version.php
mod/assignment/lib.php
mod/assignment/styles.css
mod/assignment/type/offline/lang/en/assignment_offline.php [new file with mode: 0644]
mod/assignment/type/offline/version.php [new file with mode: 0644]
mod/assignment/type/online/lang/en/assignment_online.php [new file with mode: 0644]
mod/assignment/type/online/version.php
mod/assignment/type/upload/lang/en/assignment_upload.php [new file with mode: 0644]
mod/assignment/type/upload/version.php [new file with mode: 0644]
mod/assignment/type/uploadsingle/lang/en/assignment_uploadsingle.php [new file with mode: 0644]
mod/assignment/type/uploadsingle/version.php [new file with mode: 0644]
mod/assignment/version.php
mod/chat/report.php
mod/chat/version.php
mod/choice/mod_form.php
mod/choice/version.php
mod/data/field/checkbox/lang/en/datafield_checkbox.php [new file with mode: 0644]
mod/data/field/checkbox/version.php [new file with mode: 0644]
mod/data/field/date/lang/en/datafield_date.php [new file with mode: 0644]
mod/data/field/date/version.php [new file with mode: 0644]
mod/data/field/file/lang/en/datafield_file.php [new file with mode: 0644]
mod/data/field/file/version.php [new file with mode: 0644]
mod/data/field/latlong/lang/en/datafield_latlong.php [new file with mode: 0644]
mod/data/field/latlong/version.php [new file with mode: 0644]
mod/data/field/menu/lang/en/datafield_menu.php [new file with mode: 0644]
mod/data/field/menu/version.php [new file with mode: 0644]
mod/data/field/multimenu/lang/en/datafield_multimenu.php [new file with mode: 0644]
mod/data/field/multimenu/version.php [new file with mode: 0644]
mod/data/field/number/lang/en/datafield_number.php [new file with mode: 0644]
mod/data/field/number/version.php [new file with mode: 0644]
mod/data/field/picture/field.class.php
mod/data/field/picture/lang/en/datafield_picture.php [new file with mode: 0644]
mod/data/field/picture/version.php [new file with mode: 0644]
mod/data/field/radiobutton/lang/en/datafield_radiobutton.php [new file with mode: 0644]
mod/data/field/radiobutton/version.php [new file with mode: 0644]
mod/data/field/text/lang/en/datafield_text.php [new file with mode: 0644]
mod/data/field/text/version.php [new file with mode: 0644]
mod/data/field/textarea/lang/en/datafield_textarea.php [new file with mode: 0644]
mod/data/field/textarea/version.php [new file with mode: 0644]
mod/data/field/url/lang/en/datafield_url.php [new file with mode: 0644]
mod/data/field/url/version.php [new file with mode: 0644]
mod/data/preset/imagegallery/lang/en/datapreset_imagegallery.php
mod/data/preset/imagegallery/version.php [new file with mode: 0644]
mod/data/version.php
mod/feedback/version.php
mod/folder/lib.php
mod/folder/version.php
mod/forum/db/access.php
mod/forum/discuss.php
mod/forum/index.php
mod/forum/lang/en/forum.php
mod/forum/lib.php
mod/forum/post.php
mod/forum/version.php
mod/forum/view.php
mod/glossary/editcategories.php
mod/glossary/lib.php
mod/glossary/rsslib.php
mod/glossary/version.php
mod/imscp/version.php
mod/label/version.php
mod/lesson/continue.php
mod/lesson/lang/en/lesson.php
mod/lesson/mod_form.php
mod/lesson/pagetypes/shortanswer.php
mod/lesson/version.php
mod/lti/OAuthBody.php
mod/lti/ajax.php
mod/lti/backup/moodle1/lib.php
mod/lti/backup/moodle2/backup_lti_stepslib.php
mod/lti/db/access.php
mod/lti/db/install.xml
mod/lti/db/log.php [new file with mode: 0644]
mod/lti/db/upgrade.php
mod/lti/edit_form.php
mod/lti/grade.php
mod/lti/index.php
mod/lti/instructor_edit_tool_type.php
mod/lti/lang/en/lti.php
mod/lti/launch.php
mod/lti/lib.php
mod/lti/localadminlib.php
mod/lti/locallib.php
mod/lti/mod_form.js
mod/lti/mod_form.php
mod/lti/request_tool.php
mod/lti/return.php
mod/lti/service.php
mod/lti/servicelib.php
mod/lti/settings.php
mod/lti/simpletest/testlocallib.php
mod/lti/styles.css
mod/lti/submissions.js
mod/lti/typessettings.php
mod/lti/version.php
mod/lti/view.php
mod/page/lib.php
mod/page/version.php
mod/quiz/attemptlib.php
mod/quiz/editlib.php
mod/quiz/grade.php
mod/quiz/locallib.php
mod/quiz/module.js
mod/quiz/report/attemptsreport.php
mod/quiz/report/grading/version.php
mod/quiz/report/overview/version.php
mod/quiz/report/responses/version.php
mod/quiz/report/statistics/version.php
mod/quiz/startattempt.php
mod/quiz/styles.css
mod/quiz/summary.php
mod/quiz/version.php
mod/resource/lib.php
mod/resource/version.php
mod/scorm/datamodels/aicclib.php
mod/scorm/datamodels/scorm_12.js.php
mod/scorm/lib.php
mod/scorm/report/basic/report.php
mod/scorm/report/interactions/report.php
mod/scorm/version.php
mod/survey/report.php
mod/survey/version.php
mod/url/lib.php
mod/url/locallib.php
mod/url/version.php
mod/wiki/edit_form.php
mod/wiki/pagelib.php
mod/wiki/styles.css
mod/wiki/version.php
mod/workshop/allocation/manual/version.php [new file with mode: 0644]
mod/workshop/allocation/random/version.php [new file with mode: 0644]
mod/workshop/eval/best/version.php
mod/workshop/exassessment.php
mod/workshop/excompare.php
mod/workshop/exsubmission.php
mod/workshop/form/accumulative/version.php
mod/workshop/form/comments/version.php
mod/workshop/form/numerrors/version.php
mod/workshop/form/rubric/version.php
mod/workshop/lang/en/workshop.php
mod/workshop/locallib.php
mod/workshop/renderer.php
mod/workshop/simpletest/testlocallib.php
mod/workshop/version.php
plagiarism/lib.php
pluginfile.php
portfolio/boxnet/lib.php
portfolio/boxnet/version.php
portfolio/download/version.php
portfolio/flickr/version.php
portfolio/googledocs/version.php
portfolio/mahara/version.php
portfolio/picasa/version.php
question/behaviour/adaptive/behaviour.php
question/behaviour/behaviourbase.php
question/behaviour/deferredfeedback/behaviour.php
question/behaviour/immediatefeedback/behaviour.php
question/behaviour/informationitem/behaviour.php
question/behaviour/interactive/behaviour.php
question/behaviour/interactivecountback/behaviour.php
question/behaviour/missing/behaviour.php
question/behaviour/upgrade.txt
question/editlib.php
question/engine/datalib.php
question/format.php
question/format/xml/format.php
question/renderer.php [new file with mode: 0644]
question/type/calculated/datasetitems_form.php
question/type/calculated/edit_calculated_form.php
question/type/calculated/questiontype.php
question/type/calculatedmulti/edit_calculatedmulti_form.php
question/type/calculatedsimple/edit_calculatedsimple_form.php
question/type/edit_question_form.php
question/type/multianswer/edit_multianswer_form.php
question/type/numerical/edit_numerical_form.php
question/type/numerical/questiontype.php
question/type/questiontypebase.php
question/type/shortanswer/edit_shortanswer_form.php
question/type/shortanswer/questiontype.php
question/type/truefalse/edit_truefalse_form.php
report/backups/index.php
report/configlog/index.php
report/courseoverview/index.php
report/log/index.php
report/loglive/index.php
report/questioninstances/index.php
report/security/index.php
report/stats/index.php
report/upgrade.txt
repository/alfresco/version.php
repository/boxnet/version.php
repository/coursefiles/version.php
repository/dropbox/lib.php
repository/dropbox/locallib.php
repository/dropbox/version.php
repository/filesystem/version.php
repository/flickr/version.php
repository/flickr_public/version.php
repository/googledocs/version.php
repository/lib.php
repository/local/version.php
repository/merlot/version.php
repository/picasa/version.php
repository/recent/version.php
repository/s3/version.php
repository/upload/version.php
repository/url/version.php
repository/user/version.php
repository/webdav/version.php
repository/wikimedia/version.php
repository/youtube/version.php
tag/coursetags_edit.php
tag/coursetagslib.php
tag/locallib.php
theme/afterburner/config.php
theme/afterburner/lang/en/theme_afterburner.php
theme/afterburner/layout/default.php
theme/afterburner/lib.php [new file with mode: 0644]
theme/afterburner/pix/images/logo.jpg [new file with mode: 0644]
theme/afterburner/settings.php [new file with mode: 0644]
theme/afterburner/style/afterburner_styles.css
theme/anomaly/config.php
theme/anomaly/javascript/navigation.js [deleted file]
theme/anomaly/layout/general.php
theme/anomaly/layout/report.php
theme/anomaly/style/base.css
theme/anomaly/style/browser.css
theme/anomaly/style/dock.css [new file with mode: 0644]
theme/anomaly/style/general.css
theme/base/style/blocks.css
theme/base/style/core.css
theme/base/style/user.css
theme/canvas/style/text.css
theme/image.php
theme/javascript.php
theme/mymobile/lang/en/theme_mymobile.php
theme/mymobile/renderers.php
theme/sky_high/lang/en/theme_sky_high.php
theme/standard/style/core.css
theme/standard/style/css3.css
theme/standard/style/grade.css
theme/styles.php
user/lib.php
user/message.html
user/messageselect.php
user/profile.php
user/profile/field/checkbox/field.class.php
user/profile/field/checkbox/version.php [new file with mode: 0644]
user/profile/field/datetime/version.php [new file with mode: 0644]
user/profile/field/menu/version.php [new file with mode: 0644]
user/profile/field/text/version.php [new file with mode: 0644]
user/profile/field/textarea/version.php [new file with mode: 0644]
user/view.php
version.php
webservice/amf/version.php
webservice/externallib.php
webservice/lib.php
webservice/pluginfile.php [new file with mode: 0644]
webservice/renderer.php
webservice/rest/locallib.php
webservice/rest/version.php
webservice/simpletest/testwebservice.php
webservice/soap/version.php
webservice/upload.php
webservice/xmlrpc/version.php

index 8f4fdc9..ca9633d 100644 (file)
             exit;
 
         } else {
-            // Inform block it's about to be deleted
-            if (file_exists("$CFG->dirroot/blocks/$block->name/block_$block->name.php")) {
-                $blockobject = block_instance($block->name);
-                if ($blockobject) {
-                    $blockobject->before_delete();  //only if we can create instance, block might have been already removed
-                }
-            }
-
-            // First delete instances and then block
-            $instances = $DB->get_records('block_instances', array('blockname' => $block->name));
-            if(!empty($instances)) {
-                foreach($instances as $instance) {
-                    blocks_delete_instance($instance);
-                }
-            }
-
-            // Delete block
-            $DB->delete_records('block', array('id'=>$block->id));
-
-            drop_plugin_tables($block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false); // old obsoleted table names
-            drop_plugin_tables('block_'.$block->name, "$CFG->dirroot/blocks/$block->name/db/install.xml", false);
-
-            // Delete the capabilities that were defined by this block
-            capabilities_cleanup('block/'.$block->name);
-
-            // Remove event handlers and dequeue pending events
-            events_uninstall('block/'.$block->name);
+            uninstall_plugin('block', $block->name);
 
             $a->block = $strblockname;
             $a->directory = $CFG->dirroot.'/blocks/'.$block->name;
index 68ed892..04d1ee8 100644 (file)
@@ -133,9 +133,6 @@ $CFG->dirroot              = dirname(dirname(dirname(__FILE__)));
 $CFG->libdir               = "$CFG->dirroot/lib";
 $CFG->wwwroot              = "http://localhost";
 $CFG->httpswwwroot         = $CFG->wwwroot;
-$CFG->dataroot             = str_replace('\\', '/', dirname(dirname(dirname(dirname(__FILE__)))).'/moodledata');
-$CFG->tempdir              = $CFG->dataroot.'/temp';
-$CFG->cachedir             = $CFG->dataroot.'/temp';
 $CFG->docroot              = 'http://docs.moodle.org';
 $CFG->running_installer    = true;
 $CFG->early_install_lang   = true;
@@ -186,7 +183,7 @@ list($options, $unrecognized) = cli_get_params(
         'chmod'             => '2777',
         'lang'              => $CFG->lang,
         'wwwroot'           => '',
-        'dataroot'          => $CFG->dataroot,
+        'dataroot'          => str_replace('\\', '/', dirname(dirname(dirname(dirname(__FILE__)))).'/moodledata'),
         'dbtype'            => $defaultdb,
         'dbhost'            => 'localhost',
         'dbname'            => 'moodle',
@@ -270,7 +267,7 @@ if ($interactive) {
 $chmod = octdec(clean_param($options['chmod'], PARAM_INT));
 if ($interactive) {
     cli_separator();
-    cli_heading('Data directories permission'); // todo localize
+    cli_heading(get_string('datarootpermission', 'install'));
     $prompt = get_string('clitypevaluedefault', 'admin', decoct($chmod));
     $error = '';
     do {
@@ -330,9 +327,12 @@ $CFG->httpswwwroot  = $CFG->wwwroot;
 
 
 //We need dataroot before lang download
-if (!empty($options['dataroot'])) {
-    $CFG->dataroot = $options['dataroot'];
+$dataroot = clean_param($options['dataroot'], PARAM_PATH);
+if ($dataroot !== $options['dataroot']) {
+    $a = (object)array('option' => 'dataroot', 'value' => $options['dataroot']);
+    cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
 }
+$CFG->dataroot = $dataroot;
 if ($interactive) {
     cli_separator();
     $i=0;
@@ -380,6 +380,8 @@ if ($interactive) {
         cli_error(get_string('pathserrcreatedataroot', 'install', $a));
     }
 }
+$CFG->tempdir  = $CFG->dataroot.'/temp';
+$CFG->cachedir = $CFG->dataroot.'/cache';
 
 // download required lang packs
 if ($CFG->lang !== 'en') {
diff --git a/admin/cli/purge_caches.php b/admin/cli/purge_caches.php
new file mode 100644 (file)
index 0000000..f008da2
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * @package    core
+ * @subpackage cli
+ * @copyright  2011 David Mudrak <david@moodle.com>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+define('CLI_SCRIPT', true);
+
+require(dirname(dirname(dirname(__FILE__))).'/config.php');
+require_once($CFG->libdir.'/clilib.php');
+
+list($options, $unrecognized) = cli_get_params(array('help' => false), array('h' => 'help'));
+
+if ($unrecognized) {
+    $unrecognized = implode("\n  ", $unrecognized);
+    cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
+}
+
+if ($options['help']) {
+    $help =
+"Invalidates all Moodle internal caches
+
+Options:
+-h, --help            Print out this help
+
+Example:
+\$sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
+";
+
+    echo $help;
+    exit(0);
+}
+
+purge_all_caches();
+
+exit(0);
\ No newline at end of file
index 7b43319..ac69873 100644 (file)
@@ -35,5 +35,16 @@ function admin_page_type_list($pagetype, $parentcontext, $currentcontext) {
         'admin-*' => get_string('page-admin-x', 'pagetype'),
         $pagetype => get_string('page-admin-current', 'pagetype')
     );
+    // Add the missing * (any page) option for them. MDL-30340
+    // TODO: These pages are really 'pagetype-varying' - MDL-30564 -
+    // and some day we should stop behaving that way, so proper pagetypes
+    // can be specified for it (like course-category-* or so).
+    // Luckly... the option we are introducing '*' is independent
+    // of that varying behavior, so will work.
+    if ($pagetype == 'admin-course-category') {
+        $array += array(
+            '*' => get_string('page-x', 'pagetype')
+        );
+    }
     return $array;
-}
\ No newline at end of file
+}
index 7da5786..ce02d9d 100644 (file)
@@ -56,8 +56,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
             6 => get_string('saturday', 'calendar')
         )));
     $temp->add(new admin_setting_special_calendar_weekend());
-    $temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT));
-    $temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT));
+    $options = array();
+    for ($i=1; $i<=99; $i++) {
+        $options[$i] = $i;
+    }
+    $temp->add(new admin_setting_configselect('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,$options));
+    $options = array();
+    for ($i=1; $i<=20; $i++) {
+        $options[$i] = $i;
+    }
+    $temp->add(new admin_setting_configselect('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,$options));
     $temp->add(new admin_setting_configcheckbox('enablecalendarexport', get_string('enablecalendarexport', 'admin'), get_string('configenablecalendarexport','admin'), 1));
     $temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60)));
     $ADMIN->add('appearance', $temp);
index 02d49b0..256da17 100644 (file)
@@ -89,6 +89,9 @@ if ($hassiteconfig
                 $defaultuserid = 0;
             }
 
+            $restorersnewrole = $creatornewroles;
+            $restorersnewrole[0] = get_string('none');
+
             $temp->add(new admin_setting_configselect('notloggedinroleid', get_string('notloggedinroleid', 'admin'),
                           get_string('confignotloggedinroleid', 'admin'), $defaultguestid, ($guestroles + $otherroles)));
             $temp->add(new admin_setting_configselect('guestroleid', get_string('guestroleid', 'admin'),
@@ -97,12 +100,15 @@ if ($hassiteconfig
                           get_string('configdefaultuserroleid', 'admin'), $defaultuserid, ($userroles + $otherroles)));
             $temp->add(new admin_setting_configselect('creatornewroleid', get_string('creatornewroleid', 'admin'),
                           get_string('creatornewroleid_help', 'admin'), $defaultteacherid, $creatornewroles));
+            $temp->add(new admin_setting_configselect('restorernewroleid', get_string('restorernewroleid', 'admin'),
+                          get_string('restorernewroleid_help', 'admin'), $defaultteacherid, $restorersnewrole));
 
             // release memory
             unset($otherroles);
             unset($guestroles);
             unset($userroles);
             unset($creatornewroles);
+            unset($restorersnewrole);
         }
 
         $temp->add(new admin_setting_configcheckbox('autologinguests', get_string('autologinguests', 'admin'), get_string('configautologinguests', 'admin'), 0));
index 6fa3a63..57ec905 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 272fee0..897bb63 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 6f09c9e..02fe82f 100644 (file)
@@ -15,6 +15,8 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
+ * Version information
+ *
  * @package    tool
  * @subpackage customlang
  * @copyright  2010 David Mudrak <david@moodle.com>
index 946413e..c5f5671 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 9b40d57..7eb7fac 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 6e7c9b3..5026112 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 001ce70..aa79d7b 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 964c64c..80d8829 100644 (file)
@@ -35,17 +35,29 @@ require_once($CFG->libdir.'/componentlib.class.php');
 
 admin_externalpage_setup('toollangimport');
 
-if (!empty($CFG->skiplangupgrade)) {
-    echo $OUTPUT->header();
-    echo $OUTPUT->box(get_string('langimportdisabled', 'tool_langimport'));
-    echo $OUTPUT->footer();
-    die;
+if (empty($CFG->langotherroot)) {
+    throw new moodle_exception('missingcfglangotherroot', 'tool_langimport');
 }
 
 $mode          = optional_param('mode', 0, PARAM_INT);              // action
 $pack          = optional_param_array('pack', array(), PARAM_SAFEDIR);    // pack to install
 $uninstalllang = optional_param('uninstalllang', '', PARAM_LANG);   // installed pack to uninstall
 $confirm       = optional_param('confirm', 0, PARAM_BOOL);          // uninstallation confirmation
+$purgecaches   = optional_param('purgecaches', false, PARAM_BOOL);  // explicit caches reset
+
+if ($purgecaches) {
+    require_sesskey();
+    get_string_manager()->reset_caches();
+    redirect($PAGE->url);
+}
+
+if (!empty($CFG->skiplangupgrade)) {
+    echo $OUTPUT->header();
+    echo $OUTPUT->box(get_string('langimportdisabled', 'tool_langimport'));
+    echo $OUTPUT->single_button(new moodle_url($PAGE->url, array('purgecaches' => 1)), get_string('purgestringcaches', 'tool_langimport'));
+    echo $OUTPUT->footer();
+    die;
+}
 
 define('INSTALLATION_OF_SELECTED_LANG', 2);
 define('DELETION_OF_SELECTED_LANG', 4);
index e2fbf51..a5ead16 100644 (file)
 $string['install'] = 'Install selected language pack';
 $string['installedlangs'] = 'Installed language packs';
 $string['langimport'] = 'Language import utility';
-$string['langimportdisabled'] = 'Language import feature has been disabled. You have to update your language packs manually at the file-system level.';
+$string['langimportdisabled'] = 'Language import feature has been disabled. You have to update your language packs manually at the file-system level. Do not forget to purge string caches after you do so.';
 $string['langpackinstalled'] = 'Language pack {$a} was successfully installed';
 $string['langpackremoved'] = 'Language pack was uninstalled';
 $string['langpackupdateskipped'] = 'Update of {$a} language pack skipped';
 $string['langpackuptodate'] = 'Language pack {$a} is up-to-date';
 $string['langupdatecomplete'] = 'Language pack update completed';
+$string['missingcfglangotherroot'] = 'Missing configuration value $CFG->langotherroot';
 $string['missinglangparent'] = 'Missing parent language <em>{$a->parent}</em> of <em>{$a->lang}</em>.';
 $string['nolangupdateneeded'] = 'All your language packs are up to date, no update is needed';
 $string['pluginname'] = 'Language packs';
+$string['purgestringcaches'] = 'Purge string caches';
 $string['remotelangnotavailable'] = 'Because Moodle can not connect to download.moodle.org, we are unable to do language pack installation automatically. Please download the appropriate zip file(s) from http://download.moodle.org, copy them to your {$a} directory and unzip them manually.';
 $string['uninstall'] = 'Uninstall selected language pack';
 $string['uninstallconfirm'] = 'You are about to completely uninstall language pack {$a}, are you sure?';
index 050cb47..9cc514c 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 82025c0..06476f7 100644 (file)
@@ -22,7 +22,8 @@
  * @copyright  2011 Petr Skoda {@link http://skodak.org}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-defined('MOODLE_INTERNAL') || die;
+
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 898a5e7..6602ba6 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 3cd9d24..5613285 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500;
 $plugin->requires  = 2011092100;
index 8466ee2..581cbb5 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 65541bf..7b211f5 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500;
 $plugin->requires  = 2011092100;
index 6c3dca1..70dcb39 100644 (file)
@@ -23,7 +23,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-defined('MOODLE_INTERNAL') || die;
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500;
 $plugin->requires  = 2011092100;
index 644a86e..5266bfe 100644 (file)
@@ -19,8 +19,7 @@
  *
  * @package    tool
  * @subpackage unittest
- * @copyright 2009 David Mudrak <david.mudrak@gmail.com>
- * @author     N.D.Freear@open.ac.uk, T.J.Hunt@open.ac.uk
+ * @copyright  2009 David Mudrak <david.mudrak@gmail.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
index b83afd7..c530746 100644 (file)
@@ -23,6 +23,8 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+defined('MOODLE_INTERNAL') || die();
+
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
 $plugin->component = 'tool_unittest'; // Full name of the plugin (used for diagnostics)
index 5daab2e..9924f96 100644 (file)
@@ -22,7 +22,8 @@
  * @copyright  2010 Petr Skoda {@link http://skodak.org}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-defined('MOODLE_INTERNAL') || die;
+
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
diff --git a/admin/tool/upgrade.txt b/admin/tool/upgrade.txt
new file mode 100644 (file)
index 0000000..3af7d3a
--- /dev/null
@@ -0,0 +1,21 @@
+This files describes API changes in /admin/tool/* - plugins,
+information provided here is intended especially for developers.
+
+
+=== 2.2 ===
+
+API changes:
+* new admin tool plugin type introduced
+
+
+How to migrate existing admin reports:
+# move all files to new /admin/tool/yourplugin/ location
+# update all links to admin tools /$CFG->admin/report/ to /$CFG->admin/tool/
+# add language pack with at least 'pluginname' string
+# update all language strings (use 'tool_yourplugin' instead of 'report_yourplugin') - use AMOS hints in commit message
+# update all capability names
+# create db/install.php migration script - delete old settings and capabilities (see converted plugins for examples)
+# grep the plugin codebase and look for any remaining 'coursereport' occurrences
+# update CSS selectors
+
+See http://docs.moodle.org/dev/Admin_tools for more details and explanation.
index 648a3d5..a360229 100644 (file)
@@ -22,7 +22,8 @@
  * @copyright  2011 Petr Skoda {@link http://skodak.org}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-defined('MOODLE_INTERNAL') || die;
+
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 1c2a350..b24a219 100644 (file)
@@ -71,6 +71,7 @@ $string['down'] = 'Down';
 $string['duplicate'] = 'Duplicate';
 $string['duplicatefieldname'] = 'Another field with that name exists';
 $string['duplicatekeyname'] = 'Another key with that name exists';
+$string['duplicatetablename'] = 'Another table with that name exists';
 $string['edit'] = 'Edit';
 $string['edit_field'] = 'Edit field';
 $string['edit_field_save'] = 'Save field';
@@ -113,6 +114,7 @@ $string['incorrectfieldname'] = 'Incorrect name';
 $string['index'] = 'Index';
 $string['indexes'] = 'Indexes';
 $string['integerincorrectlength'] = 'Incorrect length for integer field';
+$string['incorrecttablename'] = 'Incorrect table name';
 $string['key'] = 'Key';
 $string['keys'] = 'Keys';
 $string['listreservedwords'] = 'List of Reserved Words<br />(used to keep <a href="http://docs.moodle.org/en/XMLDB_reserved_words" target="_blank">XMLDB_reserved_words</a> updated)';
@@ -156,6 +158,7 @@ $string['selectonecommand'] = 'Please select one action from the list to view PH
 $string['selectonefieldkeyindex'] = 'Please select one field/key/index from the list to view the PHP code';
 $string['selecttable'] = 'Select table:';
 $string['table'] = 'Table';
+$string['tablenameempty'] = 'The table name cannot be empty';
 $string['tables'] = 'Tables';
 $string['textincorrectlength'] = 'Incorrect length for text field';
 $string['unload'] = 'Unload';
index b2ef627..aceab73 100644 (file)
@@ -22,7 +22,8 @@
  * @copyright  2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-defined('MOODLE_INTERNAL') || die;
+
+defined('MOODLE_INTERNAL') || die();
 
 $plugin->version   = 2011092500; // The current plugin version (Date: YYYYMMDDXX)
 $plugin->requires  = 2011092100; // Requires this Moodle version
index 377d8cf..7520228 100644 (file)
@@ -68,6 +68,11 @@ class external_service_form extends moodleform {
                 get_string('restrictedusers', 'webservice'));
         $mform->addHelpButton('restrictedusers', 'restrictedusers', 'webservice');
 
+        //can users download files
+        $mform->addElement('advcheckbox', 'downloadfiles', get_string('downloadfiles', 'webservice'));
+        $mform->setAdvanced('downloadfiles');
+        $mform->addHelpButton('downloadfiles', 'downloadfiles', 'webservice');
+
         /// needed to select automatically the 'No required capability" option
         $currentcapabilityexist = false;
         if (empty($service->requiredcapability)) {
index b1f2111..2c8cd6b 100644 (file)
@@ -1,3 +1,32 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2010072600;
+/**
+ * Version details
+ *
+ * @package    auth
+ * @subpackage cas
+ * @author     Martin Dougiamas
+ * @author     Jerome GUTIERREZ
+ * @author     Iñaky Arenaza
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_cas';        // Full name of the plugin (used for diagnostics)
index a744fca..7d39683 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version details
+ *
+ * @package    auth
+ * @subpackage db
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_db';         // Full name of the plugin (used for diagnostics)
diff --git a/auth/email/version.php b/auth/email/version.php
new file mode 100644 (file)
index 0000000..1335dcc
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version details
+ *
+ * @package    auth
+ * @subpackage email
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die;
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_email';      // Full name of the plugin (used for diagnostics)
index a744fca..8c302b3 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version details
+ *
+ * @package    auth
+ * @subpackage fc
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_fc';         // Full name of the plugin (used for diagnostics)
index a744fca..89b930b 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version details
+ *
+ * @package    auth
+ * @subpackage imap
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_imap';       // Full name of the plugin (used for diagnostics)
index b1f2111..c10448d 100644 (file)
@@ -1,3 +1,31 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2010072600;
+/**
+ * Version details
+ *
+ * @package    auth
+ * @subpackage ldap
+ * @author     Martin Dougiamas
+ * @author     Iñaky Arenaza
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_ldap';       // Full name of the plugin (used for diagnostics)
index a8edb8e..dcb7859 100644 (file)
@@ -25,5 +25,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version   = 2011022700;
-$plugin->component = 'auth_manual';
\ No newline at end of file
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_manual';     // Full name of the plugin (used for diagnostics)
index d55346c..d44d058 100644 (file)
@@ -37,6 +37,13 @@ if (!is_enabled_auth('mnet')) {
 
 // If hostid hasn't been specified, try getting it using wwwroot
 if (!$hostid) {
+    $hostwwwroot = trim($hostwwwroot);
+    $hostwwwroot = rtrim($hostwwwroot, '/');
+
+    // ensure the wwwroot starts with a http or https prefix
+    if (strtolower(substr($hostwwwroot, 0, 4)) != 'http') {
+        $hostwwwroot = 'http://'.$hostwwwroot;
+    }
     $hostid = $DB->get_field('mnet_host', 'id', array('wwwroot' => $hostwwwroot));
 }
 
index 8b2a4f6..bf4c08d 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2010071300;
+/**
+ * Manual authentication plugin version information
+ *
+ * @package    auth
+ * @subpackage mnet
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_mnet';       // Full name of the plugin (used for diagnostics)
index a744fca..8b0ed7b 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage nntp
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_nntp';       // Full name of the plugin (used for diagnostics)
diff --git a/auth/nologin/version.php b/auth/nologin/version.php
new file mode 100644 (file)
index 0000000..d2d3e99
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage nologin
+ * @copyright  2011 Petr Skoda (http://skodak.org)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_nologin';    // Full name of the plugin (used for diagnostics)
diff --git a/auth/none/version.php b/auth/none/version.php
new file mode 100644 (file)
index 0000000..14cb934
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage none
+ * @copyright  2011 Petr Skoda (http://skodak.org)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_none';       // Full name of the plugin (used for diagnostics)
index a744fca..aba1eb9 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage pam
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_pam';       // Full name of the plugin (used for diagnostics)
index a744fca..2fa0c7b 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage pop3
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_pop3';       // Full name of the plugin (used for diagnostics)
index a744fca..864e402 100644 (file)
@@ -1,3 +1,30 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage radius
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_radius';     // Full name of the plugin (used for diagnostics)
index a744fca..0afff2b 100644 (file)
@@ -1,3 +1,31 @@
 <?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2009112400;
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage shibboleth
+ * @author     Martin Dougiamas
+ * @author     Lukas Haemmerle
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_shibboleth'; // Full name of the plugin (used for diagnostics)
diff --git a/auth/webservice/version.php b/auth/webservice/version.php
new file mode 100644 (file)
index 0000000..8171640
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Version information
+ *
+ * @package    auth
+ * @subpackage webservice
+ * @copyright  2011 Petr Skoda (http://skodak.org)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'auth_webservice'; // Full name of the plugin (used for diagnostics)
index b610011..b2f7b87 100644 (file)
@@ -43,6 +43,9 @@ class cc_resource extends entities {
     }
 
     private function create_node_course_modules_mod_resource ($sheet_mod_resource, $instance) {
+        global $CFG;
+
+        require_once($CFG->libdir.'/validateurlsyntax.php');
 
         $link = '';
         $mod_alltext = '';
@@ -77,9 +80,19 @@ class cc_resource extends entities {
 
                 if (!empty($resource)) {
                     $xpath = cc2moodle::newx_path($resource, cc2moodle::getresourcens());
-                    $resource = $xpath->query('/wl:webLink/wl:url/@href');
+                    $resource = $xpath->query('//url/@href');
                     if ($resource->length > 0) {
-                        $link = $resource->item(0)->nodeValue;
+                        $rawlink = $resource->item(0)->nodeValue;
+                        if (!validateUrlSyntax($rawlink, 's+')) {
+                            $changed = rawurldecode($rawlink);
+                            if (validateUrlSyntax($changed, 's+')) {
+                                $link = $changed;
+                            } else {
+                                $link = 'http://invalidurldetected/';
+                            }
+                        } else {
+                            $link = $rawlink;
+                        }
                     }
                 }
             }
@@ -98,7 +111,7 @@ class cc_resource extends entities {
         $mod_options   = 'objectframe';
         $mod_reference = $link;
         //detected if we are dealing with html file
-        if (!empty($link) && ($instance['common_cartriedge_type'] == cc112moodle::CC_TYPE_WEBCONTENT)) {
+        if (!empty($link) && ($instance['common_cartriedge_type'] == cc2moodle::CC_TYPE_WEBCONTENT)) {
             $ext = strtolower(pathinfo($link, PATHINFO_EXTENSION));
             if (in_array($ext, array('html', 'htm', 'xhtml'))) {
                 $mod_type = 'html';
index adadce0..bc5bb5a 100644 (file)
@@ -43,6 +43,9 @@ class cc11_resource extends entities11 {
     }
 
     private function create_node_course_modules_mod_resource ($sheet_mod_resource, $instance) {
+        global $CFG;
+
+        require_once($CFG->libdir.'/validateurlsyntax.php');
 
         $link = '';
         $mod_alltext = '';
@@ -87,7 +90,17 @@ class cc11_resource extends entities11 {
                     $xpath = cc112moodle::newx_path($resource, cc112moodle::$resourcens);
                     $resource = $xpath->query('/wl:webLink/wl:url/@href');
                     if ($resource->length > 0) {
-                        $link = $resource->item(0)->nodeValue;
+                        $rawlink = $resource->item(0)->nodeValue;
+                        if (!validateUrlSyntax($rawlink, 's+')) {
+                            $changed = rawurldecode($rawlink);
+                            if (validateUrlSyntax($changed, 's+')) {
+                                $link = $changed;
+                            } else {
+                                $link = 'http://invalidurldetected/';
+                            }
+                        } else {
+                            $link = $rawlink;
+                        }
                     }
                 }
             }
index 25921a4..4e0136b 100644 (file)
@@ -34,7 +34,7 @@
        <!-- LanguageId -->
        <xs:complexType name="LanguageId">
                <xs:simpleContent>
-                       <xs:extension base="xs:language">
+                       <xs:extension base="xs:token">
                                <xs:attributeGroup ref="ex:customAttributes"/>
                        </xs:extension>
                </xs:simpleContent>
@@ -66,7 +66,7 @@
        <xs:complexType name="LangString">
                <xs:simpleContent>
                        <xs:extension base="CharacterString">
-                               <xs:attribute name="language" type="xs:language"/>
+                               <xs:attribute name="language" type="xs:token"/>
                                <xs:attributeGroup ref="ex:customAttributes"/>
                        </xs:extension>
                </xs:simpleContent>
index 75ce21e..cfe6d48 100644 (file)
@@ -43,7 +43,7 @@
        <!-- LanguageId -->
        <xs:complexType name="LanguageId">
                <xs:simpleContent>
-                       <xs:extension base="xs:language">
+                       <xs:extension base="xs:token">
                                <xs:attributeGroup ref="ex:customAttributes" />
                        </xs:extension>
                </xs:simpleContent>
@@ -78,7 +78,7 @@
        <xs:complexType name="LangString">
                <xs:simpleContent>
                        <xs:extension base="CharacterString">
-                               <xs:attribute name="language" type="xs:language" />
+                               <xs:attribute name="language" type="xs:token" />
                                <xs:attributeGroup ref="ex:customAttributes" />
                        </xs:extension>
                </xs:simpleContent>
index 801ac7b..a92da0c 100644 (file)
@@ -34,7 +34,7 @@
        <!-- LanguageId -->
        <xs:complexType name="LanguageId">
                <xs:simpleContent>
-                       <xs:extension base="xs:language">
+                       <xs:extension base="xs:token">
                                <xs:attributeGroup ref="ex:customAttributes"/>
                        </xs:extension>
                </xs:simpleContent>
index c70734a..07fd062 100644 (file)
@@ -43,7 +43,7 @@
        <!-- LanguageId -->
        <xs:complexType name="LanguageId">
                <xs:simpleContent>
-                       <xs:extension base="xs:language">
+                       <xs:extension base="xs:token">
                                <xs:attributeGroup ref="ex:customAttributes" />
                        </xs:extension>
                </xs:simpleContent>
@@ -75,7 +75,7 @@
        <xs:complexType name="LangString">
                <xs:simpleContent>
                        <xs:extension base="CharacterString">
-                               <xs:attribute name="language" type="xs:language" />
+                               <xs:attribute name="language" type="xs:token" />
                                <xs:attributeGroup ref="ex:customAttributes" />
                        </xs:extension>
                </xs:simpleContent>
index 671d84e..202e817 100644 (file)
                                <xs:element ref="mat_extension" minOccurs="0" maxOccurs="0" />
                        </xs:choice>
                </xs:sequence>
-               <xs:attribute name="attribute3" type="xs:language" />
+               <xs:attribute name="attribute3" type="xs:token" />
        </xs:complexType>
        <!-- ********* -->
        <!-- ** and ** -->
                                <xs:attribute name="charset" type="xs:string" default="ascii-us" />
                                <xs:attribute name="uri" type="xs:string" />
                                <xs:attribute ref="xml:space" default="default" />
-                               <xs:attribute name="attribute11" type="xs:language" />
+                               <xs:attribute name="attribute11" type="xs:token" />
                                <xs:attribute name="entityref" type="xs:ENTITY" use="prohibited" />
                                <xs:attribute name="width" type="xs:string" />
                                <xs:attribute name="height" type="xs:string" />
                        <xs:element name="altmaterial" type="altmaterialType" minOccurs="0" maxOccurs="unbounded" />
                </xs:sequence>
                <xs:attribute name="label" type="string256" />
-               <xs:attribute name="attribute5" type="xs:language" />
+               <xs:attribute name="attribute5" type="xs:token" />
        </xs:complexType>
        <!-- ****************** -->
        <!-- ** material_ref ** -->
                                <xs:attribute name="charset" type="xs:string" default="ascii-us" />
                                <xs:attribute name="uri" type="xs:string" />
                                <xs:attribute ref="xml:space" default="default" />
-                               <xs:attribute name="attribute11" type="xs:language" />
+                               <xs:attribute name="attribute11" type="xs:token" />
                                <xs:attribute name="entityref" type="xs:ENTITY" use="prohibited" />
                                <xs:attribute name="width" type="xs:string" />
                                <xs:attribute name="height" type="xs:string" />
                        </xs:choice>
                </xs:sequence>
                <xs:attribute name="label" type="xs:string" />
-               <xs:attribute name="attribute5" type="xs:language" />
+               <xs:attribute name="attribute5" type="xs:token" />
                <xs:attribute name="y0" type="xs:string" />
                <xs:attribute name="x0" type="xs:string" />
                <xs:attribute name="width" type="xs:string" />
                </xs:sequence>
                <xs:attribute name="ident" type="xs:string" use="required" />
                <xs:attribute name="title" type="xs:string" />
-               <xs:attribute name="attribute7" type="xs:language" />
+               <xs:attribute name="attribute7" type="xs:token" />
        </xs:complexType>
        <!-- ******************** -->
        <!-- ** sectioncontrol ** -->
index 8e0c9d4..b96eef5 100644 (file)
          the empty string.</xs:documentation>
   </xs:annotation>
   <xs:simpleType>
-   <xs:union memberTypes="xs:language">
+   <xs:union memberTypes="xs:token">
     <xs:simpleType>    
      <xs:restriction base="xs:string">
       <xs:enumeration value="" />
index d8d39e7..ff94e18 100644 (file)
@@ -75,7 +75,7 @@
    </xs:documentation>
   </xs:annotation>
   <xs:simpleType>
-   <xs:union memberTypes="xs:language">
+   <xs:union memberTypes="xs:token">
     <xs:simpleType>    
      <xs:restriction base="xs:string">
       <xs:enumeration value=""/>
index 8e0c9d4..b96eef5 100644 (file)
          the empty string.</xs:documentation>
   </xs:annotation>
   <xs:simpleType>
-   <xs:union memberTypes="xs:language">
+   <xs:union memberTypes="xs:token">
     <xs:simpleType>    
      <xs:restriction base="xs:string">
       <xs:enumeration value="" />
index 9c2ef17..8454934 100644 (file)
@@ -1114,14 +1114,12 @@ class backup_users_structure_step extends backup_structure_step {
         $user->set_source_sql('SELECT u.*, c.id AS contextid, m.wwwroot AS mnethosturl
                                  FROM {user} u
                                  JOIN {backup_ids_temp} bi ON bi.itemid = u.id
-                                 JOIN {context} c ON c.instanceid = u.id
+                            LEFT JOIN {context} c ON c.instanceid = u.id AND c.contextlevel = ' . CONTEXT_USER . '
                             LEFT JOIN {mnet_host} m ON m.id = u.mnethostid
                                 WHERE bi.backupid = ?
-                                  AND bi.itemname = ?
-                                  AND c.contextlevel = ?', array(
+                                  AND bi.itemname = ?', array(
                                       backup_helper::is_sqlparam($this->get_backupid()),
-                                      backup_helper::is_sqlparam('userfinal'),
-                                      backup_helper::is_sqlparam(CONTEXT_USER)));
+                                      backup_helper::is_sqlparam('userfinal')));
 
         // All the rest on information is only added if we arent
         // in an anonymized backup
@@ -1772,12 +1770,15 @@ class backup_annotate_all_user_files extends backup_execution_step {
             'backupid' => $this->get_backupid(), 'itemname' => 'userfinal'));
         foreach ($rs as $record) {
             $userid = $record->itemid;
-            $userctxid = get_context_instance(CONTEXT_USER, $userid)->id;
+            $userctx = get_context_instance(CONTEXT_USER, $userid);
+            if (!$userctx) {
+                continue; // User has not context, sure it's a deleted user, so cannot have files
+            }
             // Proceed with every user filearea
             foreach ($fileareas as $filearea) {
                 // We don't need to specify itemid ($userid - 5th param) as far as by
                 // context we can get all the associated files. See MDL-22092
-                backup_structure_dbops::annotate_files($this->get_backupid(), $userctxid, 'user', $filearea, null);
+                backup_structure_dbops::annotate_files($this->get_backupid(), $userctx->id, 'user', $filearea, null);
             }
         }
         $rs->close();
index fb441f8..1ab98bf 100644 (file)
@@ -133,6 +133,26 @@ class restore_course_task extends restore_task {
         $startdate->set_ui(new backup_setting_ui_dateselector($startdate, get_string('setting_course_startdate', 'backup')));
         $this->add_setting($startdate);
 
+        $keep_enrols = new restore_course_generic_setting('keep_roles_and_enrolments', base_setting::IS_BOOLEAN, false);
+        $keep_enrols->set_ui(new backup_setting_ui_select($keep_enrols, $keep_enrols->get_name(), array(1=>get_string('yes'), 0=>get_string('no'))));
+        $keep_enrols->get_ui()->set_label(get_string('setting_keep_roles_and_enrolments', 'backup'));
+        if ($this->get_target() != backup::TARGET_CURRENT_DELETING and $this->get_target() != backup::TARGET_EXISTING_DELETING) {
+            $keep_enrols->set_value(false);
+            $keep_enrols->set_status(backup_setting::LOCKED_BY_CONFIG);
+            $keep_enrols->set_visibility(backup_setting::HIDDEN);
+        }
+        $this->add_setting($keep_enrols);
+
+        $keep_groups = new restore_course_generic_setting('keep_groups_and_groupings', base_setting::IS_BOOLEAN, false);
+        $keep_groups->set_ui(new backup_setting_ui_select($keep_groups, $keep_groups->get_name(), array(1=>get_string('yes'), 0=>get_string('no'))));
+        $keep_groups->get_ui()->set_label(get_string('setting_keep_groups_and_groupings', 'backup'));
+        if ($this->get_target() != backup::TARGET_CURRENT_DELETING and $this->get_target() != backup::TARGET_EXISTING_DELETING) {
+            $keep_groups->set_value(false);
+            $keep_groups->set_status(backup_setting::LOCKED_BY_CONFIG);
+            $keep_groups->set_visibility(backup_setting::HIDDEN);
+        }
+        $this->add_setting($keep_groups);
+
         // Define overwrite_conf to decide if course configuration will be restored over existing one
         $overwrite = new restore_course_overwrite_conf_setting('overwrite_conf', base_setting::IS_BOOLEAN, false);
         $overwrite->set_ui(new backup_setting_ui_select($overwrite, $overwrite->get_name(), array(1=>get_string('yes'), 0=>get_string('no'))));
index 04b7f4b..a5163e9 100644 (file)
@@ -37,6 +37,10 @@ class restore_root_task extends restore_task {
         // Conditionally create the temp table (can exist from prechecks) and delete old stuff
         $this->add_step(new restore_create_and_clean_temp_stuff('create_and_clean_temp_stuff'));
 
+        // Now make sure the user that is running the restore can actually access the course
+        // before executing any other step (potentially performing permission checks)
+        $this->add_step(new restore_fix_restorer_access_step('fix_restorer_access'));
+
         // If we haven't preloaded information, load all the included inforef records to temp_ids table
         $this->add_step(new restore_load_included_inforef_records('load_inforef_records'));
 
index 3044c7f..f83b7c3 100644 (file)
@@ -802,7 +802,14 @@ class restore_groups_structure_step extends restore_structure_step {
 
         $data->groupingid = $this->get_new_parentid('grouping'); // Use new parentid
         $data->groupid    = $this->get_mappingid('group', $data->groupid); // Get from mappings
-        $DB->insert_record('groupings_groups', $data);  // No need to set this mapping (no child info nor files)
+
+        $params = array();
+        $params['groupingid'] = $data->groupingid;
+        $params['groupid']    = $data->groupid;
+
+        if (!$DB->record_exists('groupings_groups', $params)) {
+            $DB->insert_record('groupings_groups', $data);  // No need to set this mapping (no child info nor files)
+        }
     }
 
     protected function after_execute() {
@@ -1102,7 +1109,6 @@ class restore_course_structure_step extends restore_structure_step {
         global $CFG, $DB;
 
         $data = (object)$data;
-        $oldid = $data->id; // We'll need this later
 
         $fullname  = $this->get_setting_value('course_fullname');
         $shortname = $this->get_setting_value('course_shortname');
@@ -1115,7 +1121,13 @@ class restore_course_structure_step extends restore_structure_step {
         $data->id = $this->get_courseid();
         $data->fullname = $fullname;
         $data->shortname= $shortname;
-        $data->idnumber = '';
+
+        $context = get_context_instance_by_id($this->task->get_contextid());
+        if (has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid())) {
+            $data->idnumber = '';
+        } else {
+            unset($data->idnumber);
+        }
 
         // Only restrict modules if original course was and target site too for new courses
         $data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
@@ -1422,6 +1434,57 @@ class restore_enrolments_structure_step extends restore_structure_step {
 }
 
 
+/**
+ * Make sure the user restoring the course can actually access it.
+ */
+class restore_fix_restorer_access_step extends restore_execution_step {
+    protected function define_execution() {
+        global $CFG, $DB;
+
+        if (!$userid = $this->task->get_userid()) {
+            return;
+        }
+
+        if (empty($CFG->restorernewroleid)) {
+            // Bad luck, no fallback role for restorers specified
+            return;
+        }
+
+        $courseid = $this->get_courseid();
+        $context = context_course::instance($courseid);
+
+        if (is_enrolled($context, $userid, 'moodle/course:update', true) or is_viewing($context, $userid, 'moodle/course:update')) {
+            // Current user may access the course (admin, category manager or restored teacher enrolment usually)
+            return;
+        }
+
+        // Try to add role only - we do not need enrolment if user has moodle/course:view or is already enrolled
+        role_assign($CFG->restorernewroleid, $userid, $context);
+
+        if (is_enrolled($context, $userid, 'moodle/course:update', true) or is_viewing($context, $userid, 'moodle/course:update')) {
+            // Extra role is enough, yay!
+            return;
+        }
+
+        // The last chance is to create manual enrol if it does not exist and and try to enrol the current user,
+        // hopefully admin selected suitable $CFG->restorernewroleid ...
+        if (!enrol_is_enabled('manual')) {
+            return;
+        }
+        if (!$enrol = enrol_get_plugin('manual')) {
+            return;
+        }
+        if (!$DB->record_exists('enrol', array('enrol'=>'manual', 'courseid'=>$courseid))) {
+            $course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
+            $fields = array('status'=>ENROL_INSTANCE_ENABLED, 'enrolperiod'=>$enrol->get_config('enrolperiod', 0), 'roleid'=>$enrol->get_config('roleid', 0));
+            $enrol->add_instance($course, $fields);
+        }
+
+        enrol_try_internal_enrol($courseid, $userid);
+    }
+}
+
+
 /**
  * This structure steps restores the filters and their configs
  */
@@ -1981,7 +2044,7 @@ class restore_activity_grading_structure_step extends restore_structure_step {
         $newitemid = $this->get_mappingid(restore_gradingform_plugin::itemid_mapping($areaname), $data->itemid);
 
         $oldid = $data->id;
-        $data->formid = $newformid;
+        $data->definitionid = $newformid;
         $data->raterid = $this->get_mappingid('user', $data->raterid);
         $data->itemid = $newitemid;
 
@@ -2362,8 +2425,6 @@ class restore_module_structure_step extends restore_structure_step {
  *  - Activity includes completion info (file_exists)
  */
 class restore_userscompletion_structure_step extends restore_structure_step {
-    private $done = array();
-
     /**
      * To conditionally decide if this step must be executed
      * Note the "settings" conditions are evaluated in the
@@ -2407,15 +2468,14 @@ class restore_userscompletion_structure_step extends restore_structure_step {
         $data->userid = $this->get_mappingid('user', $data->userid);
         $data->timemodified = $this->apply_date_offset($data->timemodified);
 
+        // Find the existing record
+        $existing = $DB->get_record('course_modules_completion', array(
+                'coursemoduleid' => $data->coursemoduleid,
+                'userid' => $data->userid), 'id, timemodified');
         // Check we didn't already insert one for this cmid and userid
         // (there aren't supposed to be duplicates in that field, but
         // it was possible until MDL-28021 was fixed).
-        $key = $data->coursemoduleid . ',' . $data->userid;
-        if (array_key_exists($key, $this->done)) {
-            // Find the existing record
-            $existing = $DB->get_record('course_modules_completion', array(
-                    'coursemoduleid' => $data->coursemoduleid,
-                    'userid' => $data->userid), 'id, timemodified');
+        if ($existing) {
             // Update it to these new values, but only if the time is newer
             if ($existing->timemodified < $data->timemodified) {
                 $data->id = $existing->id;
@@ -2424,17 +2484,8 @@ class restore_userscompletion_structure_step extends restore_structure_step {
         } else {
             // Normal entry where it doesn't exist already
             $DB->insert_record('course_modules_completion', $data);
-            // Remember this entry
-            $this->done[$key] = true;
         }
     }
-
-    protected function after_execute() {
-        // This gets called once per activity (according to my testing).
-        // Clearing the array isn't strictly required, but avoids using
-        // unnecessary memory.
-        $this->done = array();
-    }
 }
 
 /**
index 04ed41a..2ac6b78 100644 (file)
@@ -46,7 +46,7 @@ if (!$restore->is_independent()) {
             $restore->execute();
         } catch(Exception $e) {
             $restore->cleanup();
-            throw new moodle_exception((string)$e);
+            throw $e;
         }
     } else {
         $restore->save_controller();
index f036470..58342b2 100644 (file)
@@ -824,54 +824,58 @@ abstract class restore_dbops {
             $newuserid = $DB->insert_record('user', $user);
             self::set_backup_ids_record($restoreid, 'user', $recuser->itemid, $newuserid);
             // Let's create the user context and annotate it (we need it for sure at least for files)
-            $newuserctxid = get_context_instance(CONTEXT_USER, $newuserid)->id;
-            self::set_backup_ids_record($restoreid, 'context', $recuser->parentitemid, $newuserctxid);
-
-            // Process custom fields
-            if (isset($user->custom_fields)) { // if present in backup
-                foreach($user->custom_fields['custom_field'] as $udata) {
-                    $udata = (object)$udata;
-                    // If the profile field has data and the profile shortname-datatype is defined in server
-                    if ($udata->field_data) {
-                        if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) {
-                        /// Insert the user_custom_profile_field
-                            $rec = new stdClass();
-                            $rec->userid  = $newuserid;
-                            $rec->fieldid = $field->id;
-                            $rec->data    = $udata->field_data;
-                            $DB->insert_record('user_info_data', $rec);
+            // but for deleted users that don't have a context anymore (MDL-30192). We are done for them
+            // and nothing else (custom fields, prefs, tags, files...) will be created.
+            if (empty($user->deleted)) {
+                $newuserctxid = $user->deleted ? 0 : get_context_instance(CONTEXT_USER, $newuserid)->id;
+                self::set_backup_ids_record($restoreid, 'context', $recuser->parentitemid, $newuserctxid);
+
+                // Process custom fields
+                if (isset($user->custom_fields)) { // if present in backup
+                    foreach($user->custom_fields['custom_field'] as $udata) {
+                        $udata = (object)$udata;
+                        // If the profile field has data and the profile shortname-datatype is defined in server
+                        if ($udata->field_data) {
+                            if ($field = $DB->get_record('user_info_field', array('shortname'=>$udata->field_name, 'datatype'=>$udata->field_type))) {
+                            /// Insert the user_custom_profile_field
+                                $rec = new stdClass();
+                                $rec->userid  = $newuserid;
+                                $rec->fieldid = $field->id;
+                                $rec->data    = $udata->field_data;
+                                $DB->insert_record('user_info_data', $rec);
+                            }
                         }
                     }
                 }
-            }
 
-            // Process tags
-            if (!empty($CFG->usetags) && 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;
+                // Process tags
+                if (!empty($CFG->usetags) && 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;
+                    }
+                    tag_set('user', $newuserid, $tags);
                 }
-                tag_set('user', $newuserid, $tags);
-            }
 
-            // Process preferences
-            if (isset($user->preferences)) { // if present in backup
-                foreach($user->preferences['preference'] as $preference) {
-                    $preference = (object)$preference;
-                    // Prepare the record and insert it
-                    $preference->userid = $newuserid;
-                    $status = $DB->insert_record('user_preferences', $preference);
+                // Process preferences
+                if (isset($user->preferences)) { // if present in backup
+                    foreach($user->preferences['preference'] as $preference) {
+                        $preference = (object)$preference;
+                        // Prepare the record and insert it
+                        $preference->userid = $newuserid;
+                        $status = $DB->insert_record('user_preferences', $preference);
+                    }
                 }
-            }
 
-            // Create user files in pool (profile, icon, private) by context
-            restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'icon', $recuser->parentitemid, $userid);
-            restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'profile', $recuser->parentitemid, $userid);
-            if ($userfiles) { // private files only if enabled in settings
-                restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'private', $recuser->parentitemid, $userid);
-            }
+                // Create user files in pool (profile, icon, private) by context
+                restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'icon', $recuser->parentitemid, $userid);
+                restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'profile', $recuser->parentitemid, $userid);
+                if ($userfiles) { // private files only if enabled in settings
+                    restore_dbops::send_files_to_pool($basepath, $restoreid, 'user', 'private', $recuser->parentitemid, $userid);
+                }
 
+            }
         }
         $rs->close();
     }
@@ -1197,7 +1201,7 @@ abstract class restore_dbops {
         // With problems of type error, throw exception, shouldn't happen if prechecks were originally
         // executed, so be radical here.
         if (array_key_exists('errors', $problems)) {
-            throw new restore_dbops_exception('restore_problems_processing_questions', null, implode(', ', $problems));
+            throw new restore_dbops_exception('restore_problems_processing_questions', null, implode(', ', $problems['errors']));
         }
     }
 
@@ -1354,10 +1358,11 @@ abstract class restore_dbops {
     /**
      * Deletes all of the content associated with the given course (courseid)
      * @param int $courseid
+     * @param array $options
      * @return bool True for success
      */
-    public static function delete_course_content($courseid) {
-        return remove_course_contents($courseid, false);
+    public static function delete_course_content($courseid, array $options = null) {
+        return remove_course_contents($courseid, false, $options);
     }
 }
 
index 4ca5414..0845440 100644 (file)
@@ -232,15 +232,9 @@ class core_backup_renderer extends plugin_renderer_base {
             $html .= $this->output->heading(get_string('restoretonewcourse', 'backup'), 2, array('class'=>'header'));
             $html .= $this->backup_detail_input(get_string('restoretonewcourse', 'backup'), 'radio', 'target', backup::TARGET_NEW_COURSE, array('checked'=>'checked'));
             $html .= $this->backup_detail_pair(get_string('selectacategory', 'backup'), $this->render($categories));
-            $html .= $this->backup_detail_pair('', html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('continue'), 'class'=>'newcoursecontinue')));
+            $html .= $this->backup_detail_pair('', html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('continue'))));
             $html .= html_writer::end_tag('div');
             $html .= html_writer::end_tag('form');
-            $config = new stdClass;
-            $config->title = get_string('confirmnewcoursecontinue', 'backup');
-            $config->question = get_string('confirmnewcoursecontinuequestion', 'backup');
-            $config->yesLabel = get_string('continue');
-            $config->noLabel = get_string('cancel');
-            $PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.watch_newcoursecontinue_buttons', array($config));
         }
 
         if ($wholecourse && !empty($currentcourse)) {
index b932508..c497de7 100644 (file)
@@ -139,7 +139,10 @@ class restore_ui extends base_ui {
             throw new restore_ui_exception('restoreuifinalisedbeforeexecute');
         }
         if ($this->controller->get_target() == backup::TARGET_CURRENT_DELETING || $this->controller->get_target() == backup::TARGET_EXISTING_DELETING) {
-            restore_dbops::delete_course_content($this->controller->get_courseid());
+            $options = array();
+            $options['keep_roles_and_enrolments'] = $this->get_setting_value('keep_roles_and_enrolments');
+            $options['keep_groups_and_groupings'] = $this->get_setting_value('keep_groups_and_groupings');
+            restore_dbops::delete_course_content($this->controller->get_courseid(), $options);
         }
         $this->controller->execute_plan();
         $this->progress = self::PROGRESS_EXECUTED;
index 05395e4..267b853 100644 (file)
@@ -27,24 +27,4 @@ M.core_backup.watch_cancel_buttons = function(config) {
     });
 }
 
-M.core_backup.watch_newcoursecontinue_buttons = function(config) {
-    Y.all('.newcoursecontinue').each(function(){
-        this._confirmationListener = this._confirmationListener || this.on('click', function(e){
-            // Prevent the default event (sumbit) from firing
-            e.preventDefault();
-            // Create the confirm box
-            var confirm = new M.core.confirm(config);
-            // If the user clicks yes
-            confirm.on('complete-yes', function(e){
-                // Detach the listener for the confirm box so it doesn't fire again.
-                this._confirmationListener.detach();
-                // Simulate the original cancel button click
-                this.simulate('click');
-            }, this);
-            // Show the confirm box
-            confirm.show();
-        }, this);
-    });
-}
-
 }, '@VERSION@', {'requires':['base','node','node-event-simulate','moodle-enrol-notification']});
\ No newline at end of file
index c9abcfe..edf4979 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 // This file is part of Moodle - http://moodle.org/
 //
 // Moodle is free software: you can redistribute it and/or modify
 // You should have received a copy of the GNU General Public License
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
-$plugin->version = 2007101509;
+/**
+ * Version details
+ *
+ * @package    block
+ * @subpackage activity_modules
+ * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$plugin->version   = 2011112900;        // The current plugin version (Date: YYYYMMDDXX)
+$plugin->requires  = 2011112900;        // Requires this Moodle version
+$plugin->component = 'block_activity_modules'; // Full name of the plugin (used for diagnostics)