Merge branch 'MDL-38519-m' of https://github.com/andrewnicols/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 27 Mar 2013 21:29:21 +0000 (22:29 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 27 Mar 2013 21:29:21 +0000 (22:29 +0100)
761 files changed:
admin/blocks.php
admin/environment.xml
admin/filters.php
admin/modules.php
admin/portfolio.php
admin/repository.php
admin/roles/lib.php
admin/settings/plugins.php
admin/settings/server.php
admin/settings/users.php
admin/tool/behat/cli/init.php
admin/tool/behat/tests/behat/manipulate_forms.feature
admin/tool/phpunit/cli/util.php
admin/tool/unsuproles/settings.php
admin/webservice/lib.php
auth/radius/auth.php
backup/util/ui/yui/backupselectall/backupselectall.js
blocks/course_list/block_course_list.php
blocks/rss_client/edit_form.php
blog/tests/behat/comment.feature [new file with mode: 0644]
cache/classes/factory.php
cache/classes/helper.php
cache/forms.php
cache/locallib.php
cohort/edit_form.php
cohort/lib.php
cohort/locallib.php
comment/lib.php
composer.json
course/category.php
course/completion_form.php
course/delete_category_form.php
course/dndupload.js
course/dnduploadlib.php
course/edit_form.php
course/editcategory.php
course/editcategory_form.php
course/editsection_form.php
course/externallib.php
course/format/renderer.php
course/lib.php
course/loginas.php
course/manage.php
course/modedit.php
course/modlib.php [new file with mode: 0644]
course/moodleform_mod.php
course/pending.php
course/recent.php
course/renderer.php
course/request_form.php
course/search.php
course/tests/behat/edit_settings.feature [new file with mode: 0644]
course/tests/behat/rename_roles.feature [new file with mode: 0644]
course/tests/courselib_test.php
course/yui/toolboxes/toolboxes.js
enrol/ajax.php
enrol/authorize/enrol_form.php
enrol/database/lib.php
enrol/database/settings.php
enrol/ldap/settings.php
enrol/manual/ajax.php
enrol/manual/locallib.php
enrol/manual/tests/lib_test.php
enrol/meta/locallib.php
filter/glossary/yui/autolinker/autolinker.js [deleted file]
filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-coverage.js [new file with mode: 0644]
filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js [new file with mode: 0644]
filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js [new file with mode: 0644]
filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js [new file with mode: 0644]
filter/glossary/yui/src/autolinker/build.json [new file with mode: 0644]
filter/glossary/yui/src/autolinker/js/autolinker.js [new file with mode: 0644]
filter/glossary/yui/src/autolinker/meta/autolinker.json [new file with mode: 0644]
filter/manage.php
grade/edit/settings/form.php
grade/externallib.php [new file with mode: 0644]
grade/grading/form/guide/lib.php
grade/grading/form/lib.php
grade/grading/form/rubric/lib.php
grade/report/grader/preferences_form.php
grade/tests/externallib_test.php [new file with mode: 0644]
group/group_form.php
group/lib.php
install/lang/fr/install.php
install/lang/no/install.php
lang/en/admin.php
lang/en/block.php
lang/en/cache.php
lang/en/error.php
lang/en/install.php
lang/en/moodle.php
lib/accesslib.php
lib/adminlib.php
lib/adodb/adodb-active-record.inc.php
lib/adodb/adodb-csvlib.inc.php
lib/adodb/adodb-datadict.inc.php
lib/adodb/adodb-error.inc.php
lib/adodb/adodb-errorhandler.inc.php
lib/adodb/adodb-errorpear.inc.php
lib/adodb/adodb-exceptions.inc.php
lib/adodb/adodb-iterator.inc.php
lib/adodb/adodb-lib.inc.php
lib/adodb/adodb-memcache.lib.inc.php
lib/adodb/adodb-pager.inc.php
lib/adodb/adodb-pear.inc.php
lib/adodb/adodb-perf.inc.php
lib/adodb/adodb-php4.inc.php
lib/adodb/adodb.inc.php
lib/adodb/drivers/adodb-access.inc.php
lib/adodb/drivers/adodb-ado.inc.php
lib/adodb/drivers/adodb-ado5.inc.php
lib/adodb/drivers/adodb-ado_access.inc.php
lib/adodb/drivers/adodb-ado_mssql.inc.php
lib/adodb/drivers/adodb-borland_ibase.inc.php
lib/adodb/drivers/adodb-csv.inc.php
lib/adodb/drivers/adodb-db2.inc.php
lib/adodb/drivers/adodb-db2oci.inc.php
lib/adodb/drivers/adodb-db2ora.inc.php
lib/adodb/drivers/adodb-fbsql.inc.php
lib/adodb/drivers/adodb-firebird.inc.php
lib/adodb/drivers/adodb-ibase.inc.php
lib/adodb/drivers/adodb-informix.inc.php
lib/adodb/drivers/adodb-informix72.inc.php
lib/adodb/drivers/adodb-ldap.inc.php
lib/adodb/drivers/adodb-mssql.inc.php
lib/adodb/drivers/adodb-mssqlnative.inc.php
lib/adodb/drivers/adodb-mssqlpo.inc.php
lib/adodb/drivers/adodb-mysql.inc.php
lib/adodb/drivers/adodb-mysqli.inc.php
lib/adodb/drivers/adodb-mysqlpo.inc.php
lib/adodb/drivers/adodb-mysqlt.inc.php
lib/adodb/drivers/adodb-netezza.inc.php
lib/adodb/drivers/adodb-oci8.inc.php
lib/adodb/drivers/adodb-oci805.inc.php
lib/adodb/drivers/adodb-oci8po.inc.php
lib/adodb/drivers/adodb-odbc.inc.php
lib/adodb/drivers/adodb-odbc_db2.inc.php
lib/adodb/drivers/adodb-odbc_mssql.inc.php
lib/adodb/drivers/adodb-odbc_oracle.inc.php
lib/adodb/drivers/adodb-odbtp.inc.php
lib/adodb/drivers/adodb-odbtp_unicode.inc.php
lib/adodb/drivers/adodb-oracle.inc.php
lib/adodb/drivers/adodb-pdo.inc.php
lib/adodb/drivers/adodb-pdo_mssql.inc.php
lib/adodb/drivers/adodb-pdo_mysql.inc.php
lib/adodb/drivers/adodb-pdo_oci.inc.php
lib/adodb/drivers/adodb-pdo_pgsql.inc.php
lib/adodb/drivers/adodb-pdo_sqlite.inc.php
lib/adodb/drivers/adodb-postgres.inc.php
lib/adodb/drivers/adodb-postgres64.inc.php
lib/adodb/drivers/adodb-postgres7.inc.php
lib/adodb/drivers/adodb-postgres8.inc.php
lib/adodb/drivers/adodb-postgres9.inc.php [new file with mode: 0644]
lib/adodb/drivers/adodb-proxy.inc.php
lib/adodb/drivers/adodb-sapdb.inc.php
lib/adodb/drivers/adodb-sqlanywhere.inc.php
lib/adodb/drivers/adodb-sqlite.inc.php
lib/adodb/drivers/adodb-sqlite3.inc.php
lib/adodb/drivers/adodb-sqlitepo.inc.php
lib/adodb/drivers/adodb-sybase.inc.php
lib/adodb/drivers/adodb-sybase_ase.inc.php
lib/adodb/drivers/adodb-vfp.inc.php
lib/adodb/lang/adodb-en.inc.php
lib/adodb/perf/perf-db2.inc.php
lib/adodb/perf/perf-informix.inc.php
lib/adodb/perf/perf-mssql.inc.php
lib/adodb/perf/perf-mssqlnative.inc.php
lib/adodb/perf/perf-mysql.inc.php
lib/adodb/perf/perf-oci8.inc.php
lib/adodb/perf/perf-postgres.inc.php
lib/adodb/readme_moodle.txt
lib/behat/form_field/behat_form_checkbox.php [new file with mode: 0644]
lib/behat/form_field/behat_form_date_selector.php [new file with mode: 0644]
lib/behat/form_field/behat_form_date_time_selector.php [new file with mode: 0644]
lib/blocklib.php
lib/conditionlib.php
lib/coursecatlib.php [new file with mode: 0644]
lib/datalib.php
lib/db/caches.php
lib/db/install.php
lib/db/services.php
lib/db/upgrade.php
lib/deprecatedlib.php
lib/dml/moodle_database.php
lib/dml/oci_native_moodle_database.php
lib/dml/oci_native_moodle_package.sql
lib/dml/tests/dml_test.php
lib/editor/tinymce/lib.php
lib/environmentlib.php
lib/filelib.php
lib/filestorage/tests/file_storage_test.php
lib/flowplayer/README.txt
lib/flowplayer/flowplayer-3.2.11.js [deleted file]
lib/flowplayer/flowplayer-3.2.11.min.js [deleted file]
lib/flowplayer/flowplayer-3.2.12.js [new file with mode: 0644]
lib/flowplayer/flowplayer-3.2.12.min.js [new file with mode: 0644]
lib/flowplayer/flowplayer-3.2.14.swf [deleted file]
lib/flowplayer/flowplayer-3.2.16.swf [new file with mode: 0644]
lib/flowplayer/flowplayer.controls-3.2.13.swf [deleted file]
lib/flowplayer/flowplayer.controls-3.2.15.swf [new file with mode: 0644]
lib/form/passwordunmask.php
lib/form/yui/passwordunmask/passwordunmask.js
lib/form/yui/shortforms/shortforms.js
lib/form/yui/showadvanced/showadvanced.js
lib/formslib.php
lib/gdlib.php
lib/htmlpurifier/CREDITS
lib/htmlpurifier/HTMLPurifier.php
lib/htmlpurifier/HTMLPurifier.safe-includes.php
lib/htmlpurifier/HTMLPurifier/AttrCollections.php
lib/htmlpurifier/HTMLPurifier/AttrDef.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/AlphaValue.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Background.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Border.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Color.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Composite.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Filter.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Font.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/FontFamily.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Ident.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Length.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/ListStyle.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Multiple.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Number.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/Percentage.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/TextDecoration.php
lib/htmlpurifier/HTMLPurifier/AttrDef/CSS/URI.php
lib/htmlpurifier/HTMLPurifier/AttrDef/Clone.php
lib/htmlpurifier/HTMLPurifier/AttrDef/Enum.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/Bool.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/Class.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/Color.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/FrameTarget.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/ID.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/Length.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/LinkTypes.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/MultiLength.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/Nmtokens.php
lib/htmlpurifier/HTMLPurifier/AttrDef/HTML/Pixels.php
lib/htmlpurifier/HTMLPurifier/AttrDef/Integer.php
lib/htmlpurifier/HTMLPurifier/AttrDef/Lang.php
lib/htmlpurifier/HTMLPurifier/AttrDef/Switch.php
lib/htmlpurifier/HTMLPurifier/AttrDef/Text.php
lib/htmlpurifier/HTMLPurifier/AttrDef/URI.php
lib/htmlpurifier/HTMLPurifier/AttrDef/URI/Email.php
lib/htmlpurifier/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php
lib/htmlpurifier/HTMLPurifier/AttrDef/URI/Host.php
lib/htmlpurifier/HTMLPurifier/AttrDef/URI/IPv4.php
lib/htmlpurifier/HTMLPurifier/AttrDef/URI/IPv6.php
lib/htmlpurifier/HTMLPurifier/AttrTransform.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Background.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/BdoDir.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/BgColor.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/BoolToCSS.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Border.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/EnumToCSS.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/ImgRequired.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/ImgSpace.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Input.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Lang.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Length.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Name.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/NameSync.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Nofollow.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/SafeEmbed.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/SafeObject.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/SafeParam.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/ScriptRequired.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/TargetBlank.php
lib/htmlpurifier/HTMLPurifier/AttrTransform/Textarea.php
lib/htmlpurifier/HTMLPurifier/AttrTypes.php
lib/htmlpurifier/HTMLPurifier/AttrValidator.php
lib/htmlpurifier/HTMLPurifier/Bootstrap.php
lib/htmlpurifier/HTMLPurifier/CSSDefinition.php
lib/htmlpurifier/HTMLPurifier/ChildDef.php
lib/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php
lib/htmlpurifier/HTMLPurifier/ChildDef/Custom.php
lib/htmlpurifier/HTMLPurifier/ChildDef/Empty.php
lib/htmlpurifier/HTMLPurifier/ChildDef/List.php
lib/htmlpurifier/HTMLPurifier/ChildDef/Optional.php
lib/htmlpurifier/HTMLPurifier/ChildDef/Required.php
lib/htmlpurifier/HTMLPurifier/ChildDef/StrictBlockquote.php
lib/htmlpurifier/HTMLPurifier/ChildDef/Table.php
lib/htmlpurifier/HTMLPurifier/Config.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Builder/Xml.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Exception.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Interchange.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Interchange/Directive.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Interchange/Id.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/InterchangeBuilder.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/Validator.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/ValidatorAtom.php
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema.ser
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt [new file with mode: 0644]
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.Language.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt [new file with mode: 0644]
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.Base.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.Host.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt
lib/htmlpurifier/HTMLPurifier/ConfigSchema/schema/info.ini
lib/htmlpurifier/HTMLPurifier/ContentSets.php
lib/htmlpurifier/HTMLPurifier/Context.php
lib/htmlpurifier/HTMLPurifier/Definition.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Decorator.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Decorator/Memory.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Decorator/Template.php.in
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Null.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer.php
lib/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer/README [changed mode: 0644->0755]
lib/htmlpurifier/HTMLPurifier/DefinitionCacheFactory.php
lib/htmlpurifier/HTMLPurifier/Doctype.php
lib/htmlpurifier/HTMLPurifier/DoctypeRegistry.php
lib/htmlpurifier/HTMLPurifier/ElementDef.php
lib/htmlpurifier/HTMLPurifier/Encoder.php
lib/htmlpurifier/HTMLPurifier/EntityLookup.php
lib/htmlpurifier/HTMLPurifier/EntityParser.php
lib/htmlpurifier/HTMLPurifier/ErrorCollector.php
lib/htmlpurifier/HTMLPurifier/ErrorStruct.php
lib/htmlpurifier/HTMLPurifier/Exception.php
lib/htmlpurifier/HTMLPurifier/Filter.php
lib/htmlpurifier/HTMLPurifier/Filter/ExtractStyleBlocks.php
lib/htmlpurifier/HTMLPurifier/Filter/YouTube.php
lib/htmlpurifier/HTMLPurifier/Generator.php
lib/htmlpurifier/HTMLPurifier/HTMLDefinition.php
lib/htmlpurifier/HTMLPurifier/HTMLModule.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/CommonAttributes.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Edit.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Forms.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Hypertext.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Iframe.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Image.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Legacy.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/List.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Name.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Nofollow.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Object.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Presentation.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Proprietary.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/SafeEmbed.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/SafeObject.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/SafeScripting.php [new file with mode: 0644]
lib/htmlpurifier/HTMLPurifier/HTMLModule/Scripting.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/StyleAttribute.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tables.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Target.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/TargetBlank.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Text.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Name.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Proprietary.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Transitional.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/XHTML.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php
lib/htmlpurifier/HTMLPurifier/HTMLModule/XMLCommonAttributes.php
lib/htmlpurifier/HTMLPurifier/HTMLModuleManager.php
lib/htmlpurifier/HTMLPurifier/IDAccumulator.php
lib/htmlpurifier/HTMLPurifier/Injector.php
lib/htmlpurifier/HTMLPurifier/Injector/AutoParagraph.php
lib/htmlpurifier/HTMLPurifier/Injector/DisplayLinkURI.php
lib/htmlpurifier/HTMLPurifier/Injector/Linkify.php
lib/htmlpurifier/HTMLPurifier/Injector/PurifierLinkify.php
lib/htmlpurifier/HTMLPurifier/Injector/RemoveEmpty.php
lib/htmlpurifier/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php
lib/htmlpurifier/HTMLPurifier/Injector/SafeObject.php
lib/htmlpurifier/HTMLPurifier/Language.php
lib/htmlpurifier/HTMLPurifier/Language/classes/en-x-test.php
lib/htmlpurifier/HTMLPurifier/Language/messages/en-x-test.php
lib/htmlpurifier/HTMLPurifier/Language/messages/en-x-testmini.php
lib/htmlpurifier/HTMLPurifier/Language/messages/en.php
lib/htmlpurifier/HTMLPurifier/LanguageFactory.php
lib/htmlpurifier/HTMLPurifier/Length.php
lib/htmlpurifier/HTMLPurifier/Lexer.php
lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php
lib/htmlpurifier/HTMLPurifier/Lexer/DirectLex.php
lib/htmlpurifier/HTMLPurifier/Lexer/PH5P.php
lib/htmlpurifier/HTMLPurifier/PercentEncoder.php
lib/htmlpurifier/HTMLPurifier/Printer.php
lib/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php
lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.css
lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.js
lib/htmlpurifier/HTMLPurifier/Printer/ConfigForm.php
lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php
lib/htmlpurifier/HTMLPurifier/PropertyList.php
lib/htmlpurifier/HTMLPurifier/PropertyListIterator.php
lib/htmlpurifier/HTMLPurifier/Strategy.php
lib/htmlpurifier/HTMLPurifier/Strategy/Composite.php
lib/htmlpurifier/HTMLPurifier/Strategy/Core.php
lib/htmlpurifier/HTMLPurifier/Strategy/FixNesting.php
lib/htmlpurifier/HTMLPurifier/Strategy/MakeWellFormed.php
lib/htmlpurifier/HTMLPurifier/Strategy/RemoveForeignElements.php
lib/htmlpurifier/HTMLPurifier/Strategy/ValidateAttributes.php
lib/htmlpurifier/HTMLPurifier/StringHash.php
lib/htmlpurifier/HTMLPurifier/StringHashParser.php
lib/htmlpurifier/HTMLPurifier/TagTransform.php
lib/htmlpurifier/HTMLPurifier/TagTransform/Font.php
lib/htmlpurifier/HTMLPurifier/TagTransform/Simple.php
lib/htmlpurifier/HTMLPurifier/Token.php
lib/htmlpurifier/HTMLPurifier/Token/Comment.php
lib/htmlpurifier/HTMLPurifier/Token/Empty.php
lib/htmlpurifier/HTMLPurifier/Token/End.php
lib/htmlpurifier/HTMLPurifier/Token/Start.php
lib/htmlpurifier/HTMLPurifier/Token/Tag.php
lib/htmlpurifier/HTMLPurifier/Token/Text.php
lib/htmlpurifier/HTMLPurifier/TokenFactory.php
lib/htmlpurifier/HTMLPurifier/URI.php
lib/htmlpurifier/HTMLPurifier/URIDefinition.php
lib/htmlpurifier/HTMLPurifier/URIFilter.php
lib/htmlpurifier/HTMLPurifier/URIFilter/DisableExternal.php
lib/htmlpurifier/HTMLPurifier/URIFilter/DisableExternalResources.php
lib/htmlpurifier/HTMLPurifier/URIFilter/DisableResources.php
lib/htmlpurifier/HTMLPurifier/URIFilter/HostBlacklist.php
lib/htmlpurifier/HTMLPurifier/URIFilter/MakeAbsolute.php
lib/htmlpurifier/HTMLPurifier/URIFilter/Munge.php
lib/htmlpurifier/HTMLPurifier/URIFilter/SafeIframe.php
lib/htmlpurifier/HTMLPurifier/URIParser.php
lib/htmlpurifier/HTMLPurifier/URIScheme.php
lib/htmlpurifier/HTMLPurifier/URIScheme/data.php
lib/htmlpurifier/HTMLPurifier/URIScheme/file.php
lib/htmlpurifier/HTMLPurifier/URIScheme/ftp.php
lib/htmlpurifier/HTMLPurifier/URIScheme/http.php
lib/htmlpurifier/HTMLPurifier/URIScheme/https.php
lib/htmlpurifier/HTMLPurifier/URIScheme/mailto.php
lib/htmlpurifier/HTMLPurifier/URIScheme/news.php
lib/htmlpurifier/HTMLPurifier/URIScheme/nntp.php
lib/htmlpurifier/HTMLPurifier/URISchemeRegistry.php
lib/htmlpurifier/HTMLPurifier/UnitConverter.php
lib/htmlpurifier/HTMLPurifier/VarParser.php
lib/htmlpurifier/HTMLPurifier/VarParser/Flexible.php
lib/htmlpurifier/HTMLPurifier/VarParser/Native.php
lib/htmlpurifier/HTMLPurifier/VarParserException.php
lib/htmlpurifier/readme_moodle.txt
lib/javascript-static.js
lib/jquery/MIT-LICENSE.txt [new file with mode: 0644]
lib/jquery/jquery-1.9.1.js [new file with mode: 0644]
lib/jquery/jquery-1.9.1.min.js [new file with mode: 0644]
lib/jquery/jquery-migrate-1.1.1.js [new file with mode: 0644]
lib/jquery/jquery-migrate-1.1.1.min.js [new file with mode: 0644]
lib/jquery/plugins.php [new file with mode: 0644]
lib/jquery/readme_moodle.txt [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/animated-overlay.gif [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_flat_75_ffffff_40x100.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_glass_65_ffffff_1x400.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_glass_75_dadada_1x400.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_glass_95_fef1ec_1x400.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-icons_222222_256x240.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-icons_2e83ff_256x240.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-icons_454545_256x240.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-icons_888888_256x240.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/jquery-ui.css [new file with mode: 0644]
lib/jquery/ui-1.10.2/css/base/jquery-ui.min.css [new file with mode: 0644]
lib/jquery/ui-1.10.2/jquery-ui.js [new file with mode: 0644]
lib/jquery/ui-1.10.2/jquery-ui.min.js [new file with mode: 0644]
lib/moodlelib.php
lib/outputcomponents.php
lib/outputlib.php
lib/outputrenderers.php
lib/outputrequirementslib.php
lib/pear/Auth/RADIUS.php
lib/pear/README_MOODLE.txt
lib/phpunit/bootstrap.php
lib/phpunit/bootstraplib.php
lib/phpunit/classes/database_driver_testcase.php
lib/phpunit/classes/util.php
lib/pluginlib.php
lib/questionlib.php
lib/tcpdf/CHANGELOG.TXT
lib/tcpdf/README.TXT
lib/tcpdf/barcodes.php
lib/tcpdf/composer.json
lib/tcpdf/config/tcpdf_config.php
lib/tcpdf/datamatrix.php
lib/tcpdf/fonts/README.TXT [deleted file]
lib/tcpdf/fonts/arialunicid0.php [deleted file]
lib/tcpdf/pdf417.php
lib/tcpdf/readme_moodle.txt
lib/tcpdf/tcpdf.php
lib/testing/generator/block_generator.php
lib/testing/generator/component_generator_base.php [new file with mode: 0644]
lib/testing/generator/data_generator.php
lib/testing/generator/lib.php
lib/testing/generator/module_generator.php
lib/testing/tests/generator_test.php
lib/tests/admintree_test.php [new file with mode: 0644]
lib/tests/behat/behat_forms.php
lib/tests/blocklib_test.php
lib/tests/coursecatlib_test.php [new file with mode: 0644]
lib/tests/formslib_test.php
lib/tests/pagelib_test.php
lib/tests/pluginlib_test.php
lib/thirdpartylibs.xml
lib/timezone.txt
lib/upgrade.txt
lib/upgradelib.php
lib/yui/blocks/blocks.js [deleted file]
lib/yui/build/moodle-core-blocks/moodle-core-blocks-coverage.js [new file with mode: 0644]
lib/yui/build/moodle-core-blocks/moodle-core-blocks-debug.js [new file with mode: 0644]
lib/yui/build/moodle-core-blocks/moodle-core-blocks-min.js [new file with mode: 0644]
lib/yui/build/moodle-core-blocks/moodle-core-blocks.js [new file with mode: 0644]
lib/yui/build/moodle-core-notification/moodle-core-notification-coverage.js [new file with mode: 0644]
lib/yui/build/moodle-core-notification/moodle-core-notification-debug.js [new file with mode: 0644]
lib/yui/build/moodle-core-notification/moodle-core-notification-min.js [new file with mode: 0644]
lib/yui/build/moodle-core-notification/moodle-core-notification.js [new file with mode: 0644]
lib/yui/build/moodle-core-tooltip/moodle-core-tooltip-coverage.js
lib/yui/build/moodle-core-tooltip/moodle-core-tooltip-debug.js
lib/yui/build/moodle-core-tooltip/moodle-core-tooltip.js
lib/yui/src/blocks/build.json [new file with mode: 0644]
lib/yui/src/blocks/js/blocks.js [new file with mode: 0644]
lib/yui/src/blocks/meta/blocks.json [new file with mode: 0644]
lib/yui/src/notification/build.json [new file with mode: 0644]
lib/yui/src/notification/js/notification.js [moved from lib/yui/notification/notification.js with 81% similarity]
lib/yui/src/notification/meta/notification.json [new file with mode: 0644]
local/readme.txt
login/change_password_form.php
login/forgot_password_form.php
login/signup_form.php
mdeploy.php
mdeploytest.php
mod/assign/feedback/file/batchuploadfilesform.php
mod/assign/feedback/file/uploadzipform.php
mod/assign/feedback/offline/uploadgradesform.php
mod/assign/lib.php
mod/choice/mod_form.php
mod/choice/tests/behat/add_choice.feature [new file with mode: 0644]
mod/choice/tests/behat/behat_mod_choice.php [new file with mode: 0644]
mod/choice/tests/behat/publish_results.feature [new file with mode: 0644]
mod/choice/tests/behat/publish_results_anonymously.feature [new file with mode: 0644]
mod/data/field/url/field.class.php
mod/data/field/url/lang/en/datafield_url.php
mod/data/field/url/mod.html
mod/feedback/edit_form.php
mod/folder/db/install.xml
mod/folder/db/upgrade.php
mod/folder/lang/en/folder.php
mod/folder/lib.php
mod/folder/mod_form.php
mod/folder/module.js
mod/folder/renderer.php
mod/folder/settings.php
mod/folder/version.php
mod/forum/lib.php
mod/forum/mod_form.php
mod/forum/post_form.php
mod/forum/tests/externallib_test.php
mod/forum/tests/generator/lib.php
mod/forum/tests/generator_test.php
mod/glossary/mod_form.php
mod/glossary/sql.php
mod/imscp/mod_form.php
mod/label/lang/en/label.php
mod/label/lib.php
mod/lesson/format.php
mod/lesson/lib.php
mod/lesson/locallib.php
mod/lesson/mod_form.php
mod/lesson/pagetypes/branchtable.php
mod/lesson/pagetypes/essay.php
mod/lesson/pagetypes/matching.php
mod/lesson/pagetypes/multichoice.php
mod/lesson/pagetypes/numerical.php
mod/lesson/pagetypes/shortanswer.php
mod/lesson/pagetypes/truefalse.php
mod/lesson/report.php
mod/lesson/view.php
mod/page/lang/en/page.php
mod/quiz/attemptlib.php
mod/quiz/db/upgrade.php
mod/quiz/renderer.php
mod/quiz/report/attemptsreport_options.php
mod/quiz/report/grading/db/install.php [new file with mode: 0644]
mod/quiz/report/overview/db/install.php [moved from mod/quiz/db/install.php with 60% similarity]
mod/quiz/report/overview/report.php
mod/quiz/report/responses/db/install.php [new file with mode: 0644]
mod/quiz/report/responses/report.php
mod/quiz/reviewquestion.php
mod/quiz/styles.css
mod/quiz/version.php
mod/scorm/lib.php
mod/scorm/locallib.php
mod/survey/lib.php
mod/url/mod_form.php
mod/workshop/locallib.php
plagiarism/lib.php
question/category_class.php
question/format/blackboard_six/format.php
question/format/blackboard_six/formatpool.php
question/format/blackboard_six/lang/en/qformat_blackboard_six.php
question/format/blackboard_six/tests/blackboardformatpool_test.php
question/format/blackboard_six/tests/blackboardsixformatqti_test.php
question/previewlib.php
question/tests/generator/lib.php [new file with mode: 0644]
question/tests/generator_test.php [new file with mode: 0644]
question/type/calculated/datasetdefinitions_form.php
question/type/calculated/datasetitems_form.php
question/type/calculated/questiontype.php
question/type/edit_question_form.php
question/type/multianswer/renderer.php
question/type/shortanswer/question.php
question/type/shortanswer/tests/question_test.php
report/courseoverview/index.php
report/log/locallib.php
report/stats/locallib.php
report/stats/user.php
repository/equella/lib.php
repository/repository_ajax.php
theme/base/style/core.css
theme/base/style/user.css
theme/canvas/style/core.css
theme/formal_white/lang/en/theme_formal_white.php
theme/jquery.php [new file with mode: 0644]
theme/magazine/style/core.css
theme/mymobile/config.php
theme/mymobile/javascript/jquery-1.7.1.min.js [deleted file]
theme/mymobile/jquery/custom.js [moved from theme/mymobile/javascript/custom.js with 100% similarity]
theme/mymobile/jquery/jquery.mobile-1.1.1.js [moved from theme/mymobile/javascript/jquery.mobile-1.1.1.js with 100% similarity]
theme/mymobile/jquery/plugins.php [new file with mode: 0644]
theme/mymobile/lib.php
theme/mymobile/renderers.php
theme/upgrade.txt
theme/yui_combo.php
user/edit.php
user/edit_form.php
user/editadvanced.php
user/editadvanced_form.php
user/editlib.php
user/filters/courserole.php
user/filters/text.php
user/portfolio.php
user/profile.php
user/profile/lib.php
user/selector/lib.php
user/selector/module.js
user/selector/search.php
user/view.php
version.php

index 5b5c3a1..f2017b9 100644 (file)
@@ -30,6 +30,9 @@
     $strprotect = get_string('blockprotect', 'admin');
     $strunprotect = get_string('blockunprotect', 'admin');
 
+    // Purge all caches related to blocks administration.
+    cache::make('core', 'plugininfo_block')->purge();
+
 /// If data submitted, then process and store.
 
     if (!empty($hide) && confirm_sesskey()) {
index 584a9b0..61af243 100644 (file)
     <PHP_EXTENSIONS>
       <PHP_EXTENSION name="iconv" level="required">
         <FEEDBACK>
-          <ON_CHECK message="iconvrequired" />
+          <ON_ERROR message="iconvrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="mbstring" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="curl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="curlrequired" />
+          <ON_ERROR message="curlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="openssl" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="simplexml" level="required">
         <FEEDBACK>
-          <ON_CHECK message="simplexmlrequired" />
+          <ON_ERROR message="simplexmlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="spl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="splrequired" />
+          <ON_ERROR message="splrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="pcre" level="required">
     <PHP_EXTENSIONS>
       <PHP_EXTENSION name="iconv" level="required">
         <FEEDBACK>
-          <ON_CHECK message="iconvrequired" />
+          <ON_ERROR message="iconvrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="mbstring" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="curl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="curlrequired" />
+          <ON_ERROR message="curlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="openssl" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="simplexml" level="required">
         <FEEDBACK>
-          <ON_CHECK message="simplexmlrequired" />
+          <ON_ERROR message="simplexmlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="spl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="splrequired" />
+          <ON_ERROR message="splrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="pcre" level="required">
     <PHP_EXTENSIONS>
       <PHP_EXTENSION name="iconv" level="required">
         <FEEDBACK>
-          <ON_CHECK message="iconvrequired" />
+          <ON_ERROR message="iconvrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="mbstring" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="curl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="curlrequired" />
+          <ON_ERROR message="curlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="openssl" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="simplexml" level="required">
         <FEEDBACK>
-          <ON_CHECK message="simplexmlrequired" />
+          <ON_ERROR message="simplexmlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="spl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="splrequired" />
+          <ON_ERROR message="splrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="pcre" level="required">
     <PHP_EXTENSIONS>
       <PHP_EXTENSION name="iconv" level="required">
         <FEEDBACK>
-          <ON_CHECK message="iconvrequired" />
+          <ON_ERROR message="iconvrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="mbstring" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="curl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="curlrequired" />
+          <ON_ERROR message="curlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="openssl" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="simplexml" level="required">
         <FEEDBACK>
-          <ON_CHECK message="simplexmlrequired" />
+          <ON_ERROR message="simplexmlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="spl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="splrequired" />
+          <ON_ERROR message="splrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="pcre" level="required">
     <PHP_EXTENSIONS>
       <PHP_EXTENSION name="iconv" level="required">
         <FEEDBACK>
-          <ON_CHECK message="iconvrequired" />
+          <ON_ERROR message="iconvrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="mbstring" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="curl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="curlrequired" />
+          <ON_ERROR message="curlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="openssl" level="optional">
       </PHP_EXTENSION>
       <PHP_EXTENSION name="simplexml" level="required">
         <FEEDBACK>
-          <ON_CHECK message="simplexmlrequired" />
+          <ON_ERROR message="simplexmlrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="spl" level="required">
         <FEEDBACK>
-          <ON_CHECK message="splrequired" />
+          <ON_ERROR message="splrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="pcre" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="dom" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="xml" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="intl" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="intlrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="json" level="required">
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="hash" level="required"/>
+    </PHP_EXTENSIONS>
+    <PHP_SETTINGS>
+      <PHP_SETTING name="memory_limit" value="40M" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="settingmemorylimit" />
+        </FEEDBACK>
+      </PHP_SETTING>
+      <PHP_SETTING name="safe_mode" value="0" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="settingsafemode" />
+        </FEEDBACK>
+      </PHP_SETTING>
+      <PHP_SETTING name="file_uploads" value="1" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="settingfileuploads" />
+        </FEEDBACK>
+      </PHP_SETTING>
+    </PHP_SETTINGS>
+  </MOODLE>
+  <MOODLE version="2.5" requires="2.2">
+    <UNICODE level="required">
+      <FEEDBACK>
+        <ON_ERROR message="unicoderequired" />
+      </FEEDBACK>
+    </UNICODE>
+    <DATABASE level="required">
+      <VENDOR name="mysql" version="5.1.33" />
+      <VENDOR name="postgres" version="8.3" />
+      <VENDOR name="mssql" version="9.0" />
+      <VENDOR name="odbc_mssql" version="9.0" />
+      <VENDOR name="mssql_n" version="9.0" />
+      <VENDOR name="oracle" version="10.2" />
+      <VENDOR name="sqlite" version="2.0" />
+    </DATABASE>
+    <PHP version="5.3.3" level="required">
+    </PHP>
+    <PCREUNICODE level="optional">
+      <FEEDBACK>
+        <ON_CHECK message="pcreunicodewarning" />
+      </FEEDBACK>
+    </PCREUNICODE>
+    <PHP_EXTENSIONS>
+      <PHP_EXTENSION name="iconv" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="iconvrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="mbstring" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="mbstringrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="curl" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="curlrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="openssl" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="opensslrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="tokenizer" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="tokenizerrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="xmlrpc" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="xmlrpcrecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="soap" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="soaprecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="ctype" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="ctyperequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="zip" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="ziprequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="gd" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="gdrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="simplexml" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="simplexmlrequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
+      <PHP_EXTENSION name="spl" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="splrequired" />
         </FEEDBACK>
       </PHP_EXTENSION>
       <PHP_EXTENSION name="pcre" level="required">
index 0dbb415..6c58504 100644 (file)
@@ -44,6 +44,9 @@
     $returnurl = "$CFG->wwwroot/$CFG->admin/filters.php";
     admin_externalpage_setup('managefilters');
 
+    // Purge all caches related to filter administration.
+    cache::make('core', 'plugininfo_filter')->purge();
+
     $filters = filter_get_global_states();
 
     // In case any new filters have been installed, but not put in the table yet.
index 3ad0a72..33d2fbb 100644 (file)
@@ -29,6 +29,9 @@
     $stractivitymodule = get_string("activitymodule");
     $strshowmodulecourse = get_string('showmodulecourse');
 
+    // Purge all caches related to activity modules administration.
+    cache::make('core', 'plugininfo_mod')->purge();
+
 /// If data submitted, then process and store.
 
     if (!empty($hide) and confirm_sesskey()) {
index 16aa661..1811f5f 100644 (file)
@@ -43,6 +43,9 @@ $configstr  = get_string('manageportfolios', 'portfolio');
 
 $return = true; // direct back to the main page
 
+// Purge all caches related to portfolio administration.
+cache::make('core', 'plugininfo_portfolio')->purge();
+
 /**
  * Helper function that generates a moodle_url object
  * relevant to the portfolio
index a4cdd22..26f1ba4 100644 (file)
@@ -61,6 +61,9 @@ if (!empty($action)) {
     require_sesskey();
 }
 
+// Purge all caches related to repositories administration.
+cache::make('core', 'plugininfo_repository')->purge();
+
 /**
  * Helper function that generates a moodle_url object
  * relevant to the repository
index 45dccf6..7473f86 100644 (file)
@@ -1089,8 +1089,6 @@ class override_permissions_table_advanced extends capability_table_with_risks {
  * Base class to avoid duplicating code.
  */
 abstract class role_assign_user_selector_base extends user_selector_base {
-    const MAX_USERS_PER_PAGE = 100;
-
     protected $roleid;
     protected $context;
 
@@ -1159,7 +1157,7 @@ class potential_assignees_below_course extends role_assign_user_selector_base {
         // Check to see if there are too many to show sensibly.
         if (!$this->is_validating()) {
             $potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
-            if ($potentialmemberscount > role_assign_user_selector_base::MAX_USERS_PER_PAGE) {
+            if ($potentialmemberscount > $this->maxusersperpage) {
                 return $this->too_many_results($search, $potentialmemberscount);
             }
         }
@@ -1187,9 +1185,6 @@ class potential_assignees_below_course extends role_assign_user_selector_base {
  * @copyright 2012 Petr Skoda {@link http://skodak.org}
  */
 class role_check_users_selector extends user_selector_base {
-    const MAX_ENROLLED_PER_PAGE = 100;
-    const MAX_POTENTIAL_PER_PAGE = 100;
-
     /** @var bool limit listing of users to enrolled only */
     var $onlyenrolled;
 
@@ -1270,7 +1265,7 @@ class role_check_users_selector extends user_selector_base {
 
         if ($sql1) {
             $enrolleduserscount = $DB->count_records_sql($countfields . $sql1, $params);
-            if (!$this->is_validating() and $enrolleduserscount > $this::MAX_ENROLLED_PER_PAGE) {
+            if (!$this->is_validating() and $enrolleduserscount > $this->maxusersperpage) {
                 $result[$groupname1] = array();
                 $toomany = $this->too_many_results($search, $enrolleduserscount);
                 $result[implode(' - ', array_keys($toomany))] = array();
@@ -1287,7 +1282,7 @@ class role_check_users_selector extends user_selector_base {
         }
         if ($sql2) {
             $otheruserscount = $DB->count_records_sql($countfields . $sql2, $params);
-            if (!$this->is_validating() and $otheruserscount > $this::MAX_POTENTIAL_PER_PAGE) {
+            if (!$this->is_validating() and $otheruserscount > $this->maxusersperpage) {
                 $result[$groupname2] = array();
                 $toomany = $this->too_many_results($search, $otheruserscount);
                 $result[implode(' - ', array_keys($toomany))] = array();
@@ -1340,7 +1335,7 @@ class potential_assignees_course_and_above extends role_assign_user_selector_bas
 
         if (!$this->is_validating()) {
             $potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
-            if ($potentialmemberscount > role_assign_user_selector_base::MAX_USERS_PER_PAGE) {
+            if ($potentialmemberscount > $this->maxusersperpage) {
                 return $this->too_many_results($search, $potentialmemberscount);
             }
         }
@@ -1765,7 +1760,7 @@ class admins_potential_selector extends user_selector_base {
         // Check to see if there are too many to show sensibly.
         if (!$this->is_validating()) {
             $potentialcount = $DB->count_records_sql($countfields . $sql, $params);
-            if ($potentialcount > 100) {
+            if ($potentialcount > $this->maxusersperpage) {
                 return $this->too_many_results($search, $potentialcount);
             }
         }
index f2d6f58..a11cbfa 100644 (file)
@@ -196,9 +196,9 @@ if ($hassiteconfig) {
         50, PARAM_INT, 3));
 
     $ADMIN->add('portfoliosettings', $temp);
-    $ADMIN->add('portfoliosettings', new admin_externalpage('portfolionew', new lang_string('addnewportfolio', 'portfolio'), $url, 'moodle/site:config', true), '', $url);
-    $ADMIN->add('portfoliosettings', new admin_externalpage('portfoliodelete', new lang_string('deleteportfolio', 'portfolio'), $url, 'moodle/site:config', true), '', $url);
-    $ADMIN->add('portfoliosettings', new admin_externalpage('portfoliocontroller', new lang_string('manageportfolios', 'portfolio'), $url, 'moodle/site:config', true), '', $url);
+    $ADMIN->add('portfoliosettings', new admin_externalpage('portfolionew', new lang_string('addnewportfolio', 'portfolio'), $url, 'moodle/site:config', true));
+    $ADMIN->add('portfoliosettings', new admin_externalpage('portfoliodelete', new lang_string('deleteportfolio', 'portfolio'), $url, 'moodle/site:config', true));
+    $ADMIN->add('portfoliosettings', new admin_externalpage('portfoliocontroller', new lang_string('manageportfolios', 'portfolio'), $url, 'moodle/site:config', true));
 
     foreach (portfolio_instances(false, false) as $portfolio) {
         require_once($CFG->dirroot . '/portfolio/' . $portfolio->get('plugin') . '/lib.php');
@@ -210,9 +210,7 @@ if ($hassiteconfig) {
                 $portfolio->get('name'),
                 $url . '?action=edit&pf=' . $portfolio->get('id'),
                 'moodle/site:config'
-            ),
-            $portfolio->get('name'),
-            $url . '?action=edit&pf=' . $portfolio->get('id')
+            )
         );
     }
 
@@ -234,20 +232,15 @@ if ($hassiteconfig) {
     $temp->add(new admin_setting_configcheckbox('legacyfilesinnewcourses', new lang_string('legacyfilesinnewcourses', 'admin'), new lang_string('legacyfilesinnewcourses_help', 'admin'), 0));
     $ADMIN->add('repositorysettings', $temp);
     $ADMIN->add('repositorysettings', new admin_externalpage('repositorynew',
-        new lang_string('addplugin', 'repository'), $url, 'moodle/site:config', true),
-        '', $url);
+        new lang_string('addplugin', 'repository'), $url, 'moodle/site:config', true));
     $ADMIN->add('repositorysettings', new admin_externalpage('repositorydelete',
-        new lang_string('deleterepository', 'repository'), $url, 'moodle/site:config', true),
-        '', $url);
+        new lang_string('deleterepository', 'repository'), $url, 'moodle/site:config', true));
     $ADMIN->add('repositorysettings', new admin_externalpage('repositorycontroller',
-        new lang_string('manage', 'repository'), $url, 'moodle/site:config', true),
-        '', $url);
+        new lang_string('manage', 'repository'), $url, 'moodle/site:config', true));
     $ADMIN->add('repositorysettings', new admin_externalpage('repositoryinstancenew',
-        new lang_string('createrepository', 'repository'), $url, 'moodle/site:config', true),
-        '', $url);
+        new lang_string('createrepository', 'repository'), $url, 'moodle/site:config', true));
     $ADMIN->add('repositorysettings', new admin_externalpage('repositoryinstanceedit',
-        new lang_string('editrepositoryinstance', 'repository'), $url, 'moodle/site:config', true),
-        '', $url);
+        new lang_string('editrepositoryinstance', 'repository'), $url, 'moodle/site:config', true));
     foreach ($allplugins['repository'] as $repositorytype) {
         $repositorytype->load_settings($ADMIN, 'repositorysettings', $hassiteconfig);
     }
index 3ba7201..4a12d2a 100644 (file)
@@ -7,9 +7,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
 
 // "systempaths" settingpage
 $temp = new admin_settingpage('systempaths', new lang_string('systempaths','admin'));
-$temp->add(new admin_setting_configselect('gdversion', new lang_string('gdversion','admin'), new lang_string('configgdversion', 'admin'), check_gd_version(), array('0' => new lang_string('gdnot'),
-                                                                                                                                                          '1' => new lang_string('gd1'),
-                                                                                                                                                          '2' => new lang_string('gd2'))));
+
 $temp->add(new admin_setting_configexecutable('pathtodu', new lang_string('pathtodu', 'admin'), new lang_string('configpathtodu', 'admin'), ''));
 $temp->add(new admin_setting_configexecutable('aspellpath', new lang_string('aspellpath', 'admin'), new lang_string('edhelpaspellpath'), ''));
 $temp->add(new admin_setting_configexecutable('pathtodot', new lang_string('pathtodot', 'admin'), new lang_string('pathtodot_help', 'admin'), ''));
index 0783599..0365ab5 100644 (file)
@@ -150,6 +150,7 @@ if ($hassiteconfig
                     'department'  => new lang_string('department'),
                     'institution' => new lang_string('institution'),
                 )));
+        $temp->add(new admin_setting_configtext('maxusersperpage', new lang_string('maxusersperpage','admin'), new lang_string('configmaxusersperpage','admin'), 100, PARAM_INT));
         $temp->add(new admin_setting_configcheckbox('enablegravatar', new lang_string('enablegravatar', 'admin'), new lang_string('enablegravatar_help', 'admin'), 0));
         $temp->add(new admin_setting_configtext('gravatardefaulturl', new lang_string('gravatardefaulturl', 'admin'), new lang_string('gravatardefaulturl_help', 'admin'), 'mm'));
     }
index 8162b0e..1916367 100644 (file)
@@ -71,7 +71,7 @@ if ($code == 0) {
         }
     }
 
-    passthru("php composer.phar install --dev", $code);
+    passthru("php composer.phar update --dev", $code);
     if ($code != 0) {
         exit($code);
     }
index 5878098..866798f 100644 (file)
@@ -26,9 +26,11 @@ Feature: Forms manipulation
       | Course 1 | C1 | 0 |
     And I log in as "admin"
     And I follow "Course 1"
-    And I follow "Edit settings"
+    And I turn editing mode on
+    And I add a "forum" to section "1"
     When I expand all fieldsets
-    Then I should see "Group mode"
-    And I should see "Your word for 'Course creator'"
+    Then I should see "Display word count"
+    And I should see "Group mode"
+    And I should see "Grouping"
     And I should not see "Show more..."
     And I should see "Show less..."
index 111be5d..b457025 100644 (file)
@@ -48,14 +48,16 @@ list($options, $unrecognized) = cli_get_params(
     )
 );
 
-if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
+if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php')) {
     // Composer packages present.
     require_once(__DIR__.'/../../../../vendor/autoload.php');
-}
+    require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php');
 
-// Verify PHPUnit libs can be loaded.
-if (!include_once('PHPUnit/Autoload.php')) {
-    phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
+} else {
+    // Verify PHPUnit PEAR libs can be loaded.
+    if (!include('PHPUnit/Autoload.php')) {
+        phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
+    }
 }
 
 if ($options['run']) {
index 5d30c44..e803291 100644 (file)
@@ -26,5 +26,5 @@
 defined('MOODLE_INTERNAL') || die;
 
 if ($hassiteconfig) {
-    $ADMIN->add('roles', new admin_externalpage('toolunsuproles', get_string('pluginname', 'tool_unsuproles'), "$CFG->wwwroot/$CFG->admin/tool/unsuproles/index.php"), array('moodle/site:config', 'moodle/role:assign'));
+    $ADMIN->add('roles', new admin_externalpage('toolunsuproles', get_string('pluginname', 'tool_unsuproles'), "$CFG->wwwroot/$CFG->admin/tool/unsuproles/index.php", array('moodle/site:config', 'moodle/role:assign')));
 }
index 161c03a..b135d0f 100644 (file)
@@ -29,8 +29,6 @@ require_once($CFG->dirroot . '/user/selector/lib.php');
  * either all the other Moodle users.
  */
 class service_user_selector extends user_selector_base {
-    const MAX_USERS_PER_PAGE = 100;
-
     protected $serviceid;
     protected $displayallowedusers; //set to true if the selector displays the
                                     //allowed users on this service
@@ -85,7 +83,7 @@ class service_user_selector extends user_selector_base {
 
         if (!$this->is_validating()) {
             $potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
-            if ($potentialmemberscount > service_user_selector::MAX_USERS_PER_PAGE) {
+            if ($potentialmemberscount > $this->maxusersperpage) {
                 return $this->too_many_results($search, $potentialmemberscount);
             }
         }
index 5795978..5897b01 100644 (file)
@@ -105,7 +105,7 @@ class auth_plugin_radius extends auth_plugin_base {
         }
 
         $result = $rauth->send();
-        if (PEAR::isError($result)) {
+        if ($rauth->isError($result)) {
             printf("Radius send failed: %s<br/>\n", $result->getMessage());
             exit;
         } else if ($result === true) {
index 9f05b7f..88aa33f 100644 (file)
@@ -40,7 +40,7 @@ M.core_backup.select_all_init = function(str) {
                 '</div>';
     };
 
-    var firstsection = Y.one('fieldset#coursesettings .fcontainer.clearfix .grouped_settings.section_level');
+    var firstsection = Y.one('fieldset#id_coursesettings .fcontainer.clearfix .grouped_settings.section_level');
     if (!firstsection) {
         // This is not a relevant page.
         return;
index 540c49a..a9aeb45 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 include_once($CFG->dirroot . '/course/lib.php');
+include_once($CFG->libdir . '/coursecatlib.php');
 
 class block_course_list extends block_list {
     function init() {
@@ -53,11 +54,11 @@ class block_course_list extends block_list {
             }
         }
 
-        $categories = get_categories("0");  // Parent = 0   ie top-level categories only
+        $categories = coursecat::get(0)->get_children();  // Parent = 0   ie top-level categories only
         if ($categories) {   //Check we have categories
             if (count($categories) > 1 || (count($categories) == 1 && $DB->count_records('course') > 200)) {     // Just print top level category links
                 foreach ($categories as $category) {
-                    $categoryname = format_string($category->name, true, array('context' => context_coursecat::instance($category->id)));
+                    $categoryname = $category->get_formatted_name();
                     $linkcss = $category->visible ? "" : " class=\"dimmed\" ";
                     $this->content->items[]="<a $linkcss href=\"$CFG->wwwroot/course/category.php?id=$category->id\">".$icon . $categoryname . "</a>";
                 }
index 922734a..e696c46 100644 (file)
@@ -54,7 +54,7 @@ class block_rss_client_edit_form extends block_edit_form {
                 FROM {block_rss_client}
                 WHERE userid = ? OR shared = 1
                 ORDER BY CASE WHEN preferredtitle = ? THEN ' . $DB->sql_compare_text('title', 64) . ' ELSE preferredtitle END ',
-                array($DB->sql_empty(), $USER->id, $DB->sql_empty()));
+                array('', $USER->id, ''));
         if ($rssfeeds) {
             $select = $mform->addElement('select', 'config_rssid', get_string('choosefeedlabel', 'block_rss_client'), $rssfeeds);
             $select->setMultiple(true);
diff --git a/blog/tests/behat/comment.feature b/blog/tests/behat/comment.feature
new file mode 100644 (file)
index 0000000..96fcc90
--- /dev/null
@@ -0,0 +1,78 @@
+@blog
+Feature: Comment on a blog entry
+  In order to respond to a blog post
+  As a moodle user
+  I need to be able to comment on a blog entry
+
+  Background:
+    Given the following "users" exists:
+      | username | firstname | lastname | email |
+      | testuser | Test | User | moodle@moodlemoodle.com |
+      | testuser2 | Test2 | User2 | moodle2@moodlemoodle.com |
+    And I log in as "testuser"
+    And I am on homepage
+    And I expand "My profile" node
+    And I expand "Blogs" node
+    And I follow "Add a new entry"
+    And I fill the moodle form with:
+      | Entry title | Blog post from user 1 |
+      | Blog entry body | User 1 blog post content |
+    And I press "Save changes"
+    And I log out
+
+  @javascript
+  Scenario: Commenting on my own blog entry
+    Given I am on homepage
+    And I log in as "testuser"
+    And I am on homepage
+    And I expand "My profile" node
+    And I expand "Blogs" node
+    And I follow "View all of my entries"
+    And I follow "Blog post from user 1"
+    And I should see "User 1 blog post content"
+    And I follow "Comments (0)"
+    When I fill in "content" with "$My own >nasty< \"string\"!"
+    And I follow "Save comment"
+    And I wait "4" seconds
+    Then I should see "$My own >nasty< \"string\"!"
+    And I fill in "content" with "Another $Nasty <string?>"
+    And I follow "Save comment"
+    And I wait "4" seconds
+    And I should see "Comments (2)" in the ".comment-link" "css_element"
+
+  @javascript
+  Scenario: Deleting my own comment
+    Given I am on homepage
+    And I log in as "testuser"
+    And I am on homepage
+    And I expand "My profile" node
+    And I expand "Blogs" node
+    And I follow "View all of my entries"
+    And I follow "Blog post from user 1"
+    And I should see "User 1 blog post content"
+    And I follow "Comments (0)"
+    And I fill in "content" with "$My own >nasty< \"string\"!"
+    And I follow "Save comment"
+    And I wait "4" seconds
+    When I click on ".comment-delete a" "css_element"
+    And I click on "Yes" "link"
+    And I wait "4" seconds
+    Then I should not see "$My own >nasty< \"string\"!"
+    And I follow "Blog post from user 1"
+    And I click on ".comment-link" "css_element"
+    And I should not see "$My own >nasty< \"string\"!"
+    And I should see "Comments (0)" in the ".comment-link" "css_element"
+
+  @javascript
+  Scenario: Commenting on someone's blog post
+    Given I am on homepage
+    And I log in as "testuser2"
+    And I am on homepage
+    And I expand "Site pages" node
+    And I follow "Site blogs"
+    And I follow "Blog post from user 1"
+    When I follow "Comments (0)"
+    And I fill in "content" with "$My own >nasty< \"string\"!"
+    And I follow "Save comment"
+    And I wait "4" seconds
+    Then I should see "$My own >nasty< \"string\"!"
\ No newline at end of file
index 43f075b..9eee85a 100644 (file)
@@ -103,7 +103,7 @@ class cache_factory {
      * An array of lock plugins.
      * @var array
      */
-    protected $lockplugins = null;
+    protected $lockplugins = array();
 
     /**
      * The current state of the cache API.
@@ -155,7 +155,7 @@ class cache_factory {
         $factory->stores = array();
         $factory->configs = array();
         $factory->definitions = array();
-        $factory->lockplugins = null; // MUST be null in order to force its regeneration.
+        $factory->lockplugins = array(); // MUST be null in order to force its regeneration.
         // Reset the state to uninitialised.
         $factory->state = self::STATE_UNINITIALISED;
     }
@@ -406,7 +406,7 @@ class cache_factory {
                         $definition = $instance->get_definition_by_id($id);
                         if (!$definition) {
                             throw new coding_exception('The requested cache definition does not exist.'. $id, $id);
-                        } else {
+                        } else if (!$this->is_disabled()) {
                             debugging('Cache definitions reparsed causing cache reset in order to locate definition.
                                 You should bump the version number to ensure definitions are reprocessed.', DEBUG_DEVELOPER);
                         }
@@ -442,6 +442,7 @@ class cache_factory {
      * @return cache_lock_interface
      */
     public function create_lock_instance(array $config) {
+        global $CFG;
         if (!array_key_exists('name', $config) || !array_key_exists('type', $config)) {
             throw new coding_exception('Invalid cache lock instance provided');
         }
@@ -450,8 +451,16 @@ class cache_factory {
         unset($config['name']);
         unset($config['type']);
 
-        if ($this->lockplugins === null) {
-            $this->lockplugins = get_plugin_list_with_class('cachelock', '', 'lib.php');
+        if (!isset($this->lockplugins[$type])) {
+            $pluginname = substr($type, 10);
+            $file = $CFG->dirroot."/cache/locks/{$pluginname}/lib.php";
+            if (file_exists($file) && is_readable($file)) {
+                require_once($file);
+            }
+            if (!class_exists($type)) {
+                throw new coding_exception('Invalid lock plugin requested.');
+            }
+            $this->lockplugins[$type] = $type;
         }
         if (!array_key_exists($type, $this->lockplugins)) {
             throw new coding_exception('Invalid cache lock type.');
index 20e2f6d..075dc41 100644 (file)
@@ -511,6 +511,7 @@ class cache_helper {
      * Update the site identifier stored by the cache API.
      *
      * @param string $siteidentifier
+     * @return string The new site identifier.
      */
     public static function update_site_identifier($siteidentifier) {
         global $CFG;
@@ -519,9 +520,10 @@ class cache_helper {
         $factory = cache_factory::instance();
         $factory->updating_started();
         $config = $factory->create_config_instance(true);
-        $config->update_site_identifier($siteidentifier);
+        $siteidentifier = $config->update_site_identifier($siteidentifier);
         $factory->updating_finished();
         cache_factory::reset();
+        return $siteidentifier;
     }
 
     /**
@@ -530,11 +532,30 @@ class cache_helper {
      * @return string
      */
     public static function get_site_identifier() {
-        if (is_null(self::$siteidentifier)) {
-            $factory = cache_factory::instance();
+        global $CFG;
+        if (!is_null(self::$siteidentifier)) {
+            return self::$siteidentifier;
+        }
+        // If site identifier hasn't been collected yet attempt to get it from the cache config.
+        $factory = cache_factory::instance();
+        // If the factory is initialising then we don't want to try to get it from the config or we risk
+        // causing the cache to enter an infinite initialisation loop.
+        if (!$factory->is_initialising()) {
             $config = $factory->create_config_instance();
             self::$siteidentifier = $config->get_site_identifier();
         }
+        if (is_null(self::$siteidentifier)) {
+            // If the site identifier is still null then config isn't aware of it yet.
+            // We'll see if the CFG is loaded, and if not we will just use unknown.
+            // It's very important here that we don't use get_config. We don't want an endless cache loop!
+            if (!empty($CFG->siteidentifier)) {
+                self::$siteidentifier = self::update_site_identifier($CFG->siteidentifier);
+            } else {
+                // It's not being recorded in MUC's config and the config data hasn't been loaded yet.
+                // Likely we are initialising.
+                return 'unknown';
+            }
+        }
         return self::$siteidentifier;
     }
 
index 542e7a0..9708a01 100644 (file)
@@ -49,7 +49,9 @@ class cachestore_addinstance_form extends moodleform {
         $locks = $this->_customdata['locks'];
 
         $form->addElement('hidden', 'plugin', $plugin);
+        $form->setType('plugin', PARAM_PLUGIN);
         $form->addElement('hidden', 'editing', !empty($this->_customdata['store']));
+        $form->setType('editing', PARAM_BOOL);
 
         if (!$store) {
             $form->addElement('text', 'name', get_string('storename', 'cache'));
@@ -59,6 +61,7 @@ class cachestore_addinstance_form extends moodleform {
         } else {
             $form->addElement('hidden', 'name', $store);
             $form->addElement('static', 'name-value', get_string('storename', 'cache'), $store);
+            $form->setType('name', PARAM_TEXT);
         }
 
         if (is_array($locks)) {
@@ -214,4 +217,4 @@ class cache_mode_mappings_form extends moodleform {
 
         $this->add_action_buttons();
     }
-}
\ No newline at end of file
+}
index 4d6d745..e2b498e 100644 (file)
@@ -529,10 +529,12 @@ class cache_config_writer extends cache_config {
      * Update the site identifier stored by the cache API.
      *
      * @param string $siteidentifier
+     * @return string The new site identifier.
      */
     public function update_site_identifier($siteidentifier) {
         $this->siteidentifier = md5((string)$siteidentifier);
         $this->config_save();
+        return $this->siteidentifier;
     }
 }
 
index c23c249..fb7409e 100644 (file)
@@ -85,9 +85,9 @@ class cohort_edit_form extends moodleform {
     }
 
     protected function get_category_options($currentcontextid) {
-        $displaylist = array();
-        $parentlist = array();
-        make_categories_list($displaylist, $parentlist, 'moodle/cohort:manage');
+        global $CFG;
+        require_once($CFG->libdir. '/coursecatlib.php');
+        $displaylist = coursecat::make_categories_list('moodle/cohort:manage');
         $options = array();
         $syscontext = context_system::instance();
         if (has_capability('moodle/cohort:manage', $syscontext)) {
index b71b00b..61d56c9 100644 (file)
@@ -40,7 +40,6 @@ function cohort_add_cohort($cohort) {
         $cohort->idnumber = NULL;
     }
     if (!isset($cohort->description)) {
-        // sql_empty() does not belong here, this crazy Oracle hack is implemented in insert_record()!
         $cohort->description = '';
     }
     if (!isset($cohort->descriptionformat)) {
@@ -102,7 +101,7 @@ function cohort_delete_cohort($cohort) {
  * Somehow deal with cohorts when deleting course category,
  * we can not just delete them because they might be used in enrol
  * plugins or referenced in external systems.
- * @param  stdClass $category
+ * @param  stdClass|coursecat $category
  * @return void
  */
 function cohort_delete_category($category) {
index 3cb1d3b..23fa8a6 100644 (file)
@@ -62,7 +62,7 @@ class cohort_candidate_selector extends user_selector_base {
 
         if (!$this->is_validating()) {
             $potentialmemberscount = $DB->count_records_sql($countfields . $sql, $params);
-            if ($potentialmemberscount > 100) {
+            if ($potentialmemberscount > $this->maxusersperpage) {
                 return $this->too_many_results($search, $potentialmemberscount);
             }
         }
index 9ca0a41..7b28158 100644 (file)
@@ -528,8 +528,9 @@ class comment {
             $c->timecreated = $u->ctimecreated;
             $c->strftimeformat = get_string('strftimerecent', 'langconfig');
             $url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
-            $c->profileurl = $url->out(false);
+            $c->profileurl = $url->out(true);
             $c->fullname = fullname($u);
+            $c->time = userdate($c->timecreated, $c->strftimeformat);
             $c->content = format_text($c->content, $c->format, $formatoptions);
             $c->avatar = $OUTPUT->user_picture($u, array('size'=>18));
 
@@ -808,7 +809,7 @@ class comment {
         $replacements[] = $cmt->avatar;
         $replacements[] = html_writer::link($cmt->profileurl, $cmt->fullname);
         $replacements[] = $cmt->content;
-        $replacements[] = userdate($cmt->timecreated, $cmt->strftimeformat);
+        $replacements[] = $cmt->time;
 
         // use html template to format a single comment.
         return str_replace($patterns, $replacements, $this->template);
index e5d73be..cb017d3 100644 (file)
@@ -8,6 +8,6 @@
     "require-dev": {
         "phpunit/phpunit": "3.7.*",
         "phpunit/dbUnit": "1.2.*",
-        "moodlehq/behat-extension": "1.0.3"
+        "moodlehq/behat-extension": "1.0.*"
     }
 }
index e32eba9..6ed1898 100644 (file)
@@ -26,6 +26,7 @@
 require_once("../config.php");
 require_once($CFG->dirroot.'/course/lib.php');
 require_once($CFG->libdir.'/textlib.class.php');
+require_once($CFG->libdir. '/coursecatlib.php');
 
 $id = required_param('id', PARAM_INT); // Category id
 $page = optional_param('page', 0, PARAM_INT); // which page to show
@@ -69,9 +70,7 @@ $PAGE->set_button(print_course_search('', true, 'navbar'));
 echo $OUTPUT->header();
 
 /// Print the category selector
-$displaylist = array();
-$notused = array();
-make_categories_list($displaylist, $notused);
+$displaylist = coursecat::make_categories_list();
 
 echo '<div class="categorypicker">';
 $select = new single_select(new moodle_url('/course/category.php'), 'id', $displaylist, $category->id, null, 'switchcategory');
index 1f68101..7dab70a 100644 (file)
@@ -51,7 +51,7 @@ class course_completion_form extends moodleform {
 
         // Check if there is existing criteria completions
         if ($completion->is_course_locked()) {
-            $mform->addElement('header', '', get_string('completionsettingslocked', 'completion'));
+            $mform->addElement('header', 'completionsettingslocked', get_string('completionsettingslocked', 'completion'));
             $mform->addElement('static', '', '', get_string('err_settingslocked', 'completion'));
             $mform->addElement('submit', 'settingsunlock', get_string('unlockcompletiondelete', 'completion'));
         }
@@ -97,9 +97,8 @@ class course_completion_form extends moodleform {
             }
 
             // Get category list
-            $list = array();
-            $parents = array();
-            make_categories_list($list, $parents);
+            require_once($CFG->libdir. '/coursecatlib.php');
+            $list = coursecat::make_categories_list();
 
             // Get course list for select box
             $selectbox = array();
index e7af4b1..f76655e 100644 (file)
@@ -6,69 +6,25 @@ if (!defined('MOODLE_INTERNAL')) {
 
 require_once($CFG->libdir.'/formslib.php');
 require_once($CFG->libdir.'/questionlib.php');
+require_once($CFG->libdir. '/coursecatlib.php');
 
 class delete_category_form extends moodleform {
 
     var $_category;
 
     function definition() {
-        global $CFG, $DB;
-
-        $mform    =& $this->_form;
-        $category = $this->_customdata;
-        $categorycontext = context_coursecat::instance($category->id);
-        $this->_category = $category;
-
-    /// Check permissions, to see if it OK to give the option to delete
-    /// the contents, rather than move elsewhere.
-    /// Are there any subcategories of this one, can they be deleted?
-        $candeletecontent = true;
-        $tocheck = get_child_categories($category->id);
-        $containscategories = !empty($tocheck);
-        $categoryids = array($category->id);
-        while (!empty($tocheck)) {
-            $checkcat = array_pop($tocheck);
-            $childcategoryids[] = $checkcat->id;
-            $tocheck = $tocheck + get_child_categories($checkcat->id);
-            $chcontext = context_coursecat::instance($checkcat->id);
-            if ($candeletecontent && !has_capability('moodle/category:manage', $chcontext)) {
-                $candeletecontent = false;
-            }
-        }
-
-    /// Are there any courses in here, can they be deleted?
-        list($test, $params) = $DB->get_in_or_equal($categoryids);
-        $containedcourses = $DB->get_records_sql(
-                "SELECT id,1 FROM {course} c WHERE c.category $test", $params);
-        $containscourses = false;
-        if ($containedcourses) {
-            $containscourses = true;
-            foreach ($containedcourses as $courseid => $notused) {
-                if ($candeletecontent && !can_delete_course($courseid)) {
-                    $candeletecontent = false;
-                    break;
-                }
-            }
-        }
+        $mform = & $this->_form;
+        $this->_category = $this->_customdata;
+        $categorycontext = context_coursecat::instance($this->_category->id);
 
-    /// Are there any questions in the question bank here?
-        $containsquestions = question_context_has_any_questions($categorycontext);
+        // Check permissions, to see if it OK to give the option to delete
+        // the contents, rather than move elsewhere.
+        $candeletecontent = $this->_category->can_delete_full();
 
-    /// Get the list of categories we might be able to move to.
-        $testcaps = array();
-        if ($containscourses) {
-            $testcaps[] = 'moodle/course:create';
-        }
-        if ($containscategories || $containsquestions) {
-            $testcaps[] = 'moodle/category:manage';
-        }
-        $displaylist = array();
-        $notused = array();
-        if (!empty($testcaps)) {
-            make_categories_list($displaylist, $notused, $testcaps, $category->id);
-        }
+        // Get the list of categories we might be able to move to.
+        $displaylist = $this->_category->move_content_targets_list();
 
-    /// Now build the options.
+        // Now build the options.
         $options = array();
         if ($displaylist) {
             $options[0] = get_string('movecontentstoanothercategory');
@@ -76,60 +32,57 @@ class delete_category_form extends moodleform {
         if ($candeletecontent) {
             $options[1] = get_string('deleteallcannotundo');
         }
+        if (empty($options)) {
+            print_error('youcannotdeletecategory', 'error', 'index.php', $this->_category->get_formatted_name());
+        }
 
-    /// Now build the form.
-        $mform->addElement('header','general', get_string('categorycurrentcontents', '', format_string($category->name, true, array('context' => $categorycontext))));
+        // Now build the form.
+        $mform->addElement('header','general', get_string('categorycurrentcontents', '', $this->_category->get_formatted_name()));
 
-        if ($containscourses || $containscategories || $containsquestions) {
-            if (empty($options)) {
-                print_error('youcannotdeletecategory', 'error', 'index.php', format_string($category->name, true, array('context' => $categorycontext)));
-            }
+        // Describe the contents of this category.
+        $contents = '';
+        if ($this->_category->has_children()) {
+            $contents .= '<li>' . get_string('subcategories') . '</li>';
+        }
+        if ($this->_category->has_courses()) {
+            $contents .= '<li>' . get_string('courses') . '</li>';
+        }
+        if (question_context_has_any_questions($categorycontext)) {
+            $contents .= '<li>' . get_string('questionsinthequestionbank') . '</li>';
+        }
+        if (!empty($contents)) {
+            $mform->addElement('static', 'emptymessage', get_string('thiscategorycontains'), html_writer::tag('ul', $contents));
+        } else {
+            $mform->addElement('static', 'emptymessage', '', get_string('deletecategoryempty'));
+        }
 
-        /// Describe the contents of this category.
-            $contents = '<ul>';
-            if ($containscategories) {
-                $contents .= '<li>' . get_string('subcategories') . '</li>';
-            }
-            if ($containscourses) {
-                $contents .= '<li>' . get_string('courses') . '</li>';
-            }
-            if ($containsquestions) {
-                $contents .= '<li>' . get_string('questionsinthequestionbank') . '</li>';
-            }
-            $contents .= '</ul>';
-            $mform->addElement('static', 'emptymessage', get_string('thiscategorycontains'), $contents);
-
-        /// Give the options for what to do.
-            $mform->addElement('select', 'fulldelete', get_string('whattodo'), $options);
-            if (count($options) == 1) {
-                $optionkeys = array_keys($options);
-                $option = reset($optionkeys);
-                $mform->hardFreeze('fulldelete');
-                $mform->setConstant('fulldelete', $option);
-            }
+        // Give the options for what to do.
+        $mform->addElement('select', 'fulldelete', get_string('whattodo'), $options);
+        if (count($options) == 1) {
+            $optionkeys = array_keys($options);
+            $option = reset($optionkeys);
+            $mform->hardFreeze('fulldelete');
+            $mform->setConstant('fulldelete', $option);
+        }
 
-            if ($displaylist) {
-                $mform->addElement('select', 'newparent', get_string('movecategorycontentto'), $displaylist);
-                if (in_array($category->parent, $displaylist)) {
-                    $mform->setDefault('newparent', $category->parent);
-                }
-                $mform->disabledIf('newparent', 'fulldelete', 'eq', '1');
+        if ($displaylist) {
+            $mform->addElement('select', 'newparent', get_string('movecategorycontentto'), $displaylist);
+            if (in_array($this->_category->parent, $displaylist)) {
+                $mform->setDefault('newparent', $this->_category->parent);
             }
-        } else {
-            $mform->addElement('hidden', 'fulldelete', 1);
-            $mform->setType('fulldelete', PARAM_INT);
-            $mform->addElement('static', 'emptymessage', '', get_string('deletecategoryempty'));
+            $mform->disabledIf('newparent', 'fulldelete', 'eq', '1');
         }
 
         $mform->addElement('hidden', 'deletecat');
         $mform->setType('deletecat', PARAM_ALPHANUM);
         $mform->addElement('hidden', 'sure');
         $mform->setType('sure', PARAM_ALPHANUM);
-        $mform->setDefault('sure', md5(serialize($category)));
+        $mform->setDefault('sure', md5(serialize($this->_category)));
 
 //--------------------------------------------------------------------------------
         $this->add_action_buttons(true, get_string('delete'));
 
+        $this->set_data(array('deletecat' => $this->_category->id));
     }
 
 /// perform some extra moodle validation
index 35ded97..b1dbc63 100644 (file)
@@ -239,7 +239,7 @@ M.course_dndupload = {
      * Look through the event data, checking it against the registered data types
      * (in order of priority) and return details of the first matching data type
      * @param e the event details
-     * @return mixed false if not found or an object {
+     * @return object|false - false if not found or an object {
      *           realtype: the type as given by the browser
      *           addmessage: the message to show to the user during dragging
      *           namemessage: the message for requesting a name for the resource from the user
@@ -284,6 +284,7 @@ M.course_dndupload = {
                         realtype: dttypes[j],
                         addmessage: types[i].addmessage,
                         namemessage: types[i].namemessage,
+                        handlermessage: types[i].handlermessage,
                         type: types[i].identifier,
                         handlers: types[i].handlers
                     };
@@ -417,7 +418,7 @@ M.course_dndupload = {
         var modsel = section.one(this.modslistselector);
         if (!modsel) {
             // Create the above 'ul' if it doesn't exist
-            var modsel = document.createElement('ul');
+            modsel = document.createElement('ul');
             modsel.className = 'section img-text';
             var contentel = section.get('children').pop();
             var brel = contentel.get('children').pop();
@@ -489,6 +490,7 @@ M.course_dndupload = {
      */
     hide_preview_element: function() {
         this.Y.all('li.dndupload-preview').addClass('dndupload-hidden');
+        this.Y.all('.dndupload-over').removeClass('dndupload-over');
     },
 
     /**
@@ -500,7 +502,11 @@ M.course_dndupload = {
     show_preview_element: function(section, type) {
         this.hide_preview_element();
         var preview = section.one('li.dndupload-preview').removeClass('dndupload-hidden');
-        preview.one('span').setContent(type.addmessage);
+        section.addClass('dndupload-over');
+
+        // Horrible work-around to allow the 'Add X here' text to be a drop target in Firefox.
+        var node = preview.one('span').getDOMNode();
+        node.firstChild.nodeValue = type.addmessage;
     },
 
     /**
@@ -616,44 +622,16 @@ M.course_dndupload = {
 
         var Y = this.Y;
         var self = this;
-        var panel = new Y.Panel({
+        var panel = new M.core.dialogue({
             bodyContent: content,
-            width: 350,
-            zIndex: 5,
-            centered: true,
+            width: '350px',
             modal: true,
             visible: true,
             render: true,
-            buttons: [{
-                value: M.util.get_string('upload', 'moodle'),
-                action: function(e) {
-                    e.preventDefault();
-                    // Find out which module was selected
-                    var module = false;
-                    var div = Y.one('#dndupload_handlers'+uploadid);
-                    div.all('input').each(function(input) {
-                        if (input.get('checked')) {
-                            module = input.get('value');
-                        }
-                    });
-                    if (!module) {
-                        return;
-                    }
-                    panel.hide();
-                    // Remember this selection for next time
-                    self.lastselected[extension] = module;
-                    // Do the upload
-                    self.upload_file(file, section, sectionnumber, module);
-                },
-                section: Y.WidgetStdMod.FOOTER
-            },{
-                value: M.util.get_string('cancel', 'moodle'),
-                action: function(e) {
-                    e.preventDefault();
-                    panel.hide();
-                },
-                section: Y.WidgetStdMod.FOOTER
-            }]
+            align: {
+                node: null,
+                points: [Y.WidgetPositionAlign.CC, Y.WidgetPositionAlign.CC]
+            }
         });
         // When the panel is hidden - destroy it and then check for other pending uploads
         panel.after("visibleChange", function(e) {
@@ -662,6 +640,39 @@ M.course_dndupload = {
                 self.check_upload_queue();
             }
         });
+
+        // Add the submit/cancel buttons to the bottom of the dialog.
+        panel.addButton({
+            label: M.util.get_string('upload', 'moodle'),
+            action: function(e) {
+                e.preventDefault();
+                // Find out which module was selected
+                var module = false;
+                var div = Y.one('#dndupload_handlers'+uploadid);
+                div.all('input').each(function(input) {
+                    if (input.get('checked')) {
+                        module = input.get('value');
+                    }
+                });
+                if (!module) {
+                    return;
+                }
+                panel.hide();
+                // Remember this selection for next time
+                self.lastselected[extension] = module;
+                // Do the upload
+                self.upload_file(file, section, sectionnumber, module);
+            },
+            section: Y.WidgetStdMod.FOOTER
+        });
+        panel.addButton({
+            label: M.util.get_string('cancel', 'moodle'),
+            action: function(e) {
+                e.preventDefault();
+                panel.hide();
+            },
+            section: Y.WidgetStdMod.FOOTER
+        });
     },
 
     /**
@@ -822,6 +833,7 @@ M.course_dndupload = {
         var nameid = 'dndupload_handler_name'+uploadid;
         var content = '';
         if (type.handlers.length > 1) {
+            content += '<p>'+type.handlermessage+'</p>';
             content += '<div id="dndupload_handlers'+uploadid+'">';
             var sel = type.handlers[0].module;
             for (var i=0; i<type.handlers.length; i++) {
@@ -840,56 +852,18 @@ M.course_dndupload = {
 
         var Y = this.Y;
         var self = this;
-        var panel = new Y.Panel({
+        var panel = new M.core.dialogue({
             bodyContent: content,
-            width: 350,
-            zIndex: 5,
-            centered: true,
+            width: '350px',
             modal: true,
             visible: true,
             render: true,
-            buttons: [{
-                value: M.util.get_string('upload', 'moodle'),
-                action: function(e) {
-                    e.preventDefault();
-                    var name = Y.one('#dndupload_handler_name'+uploadid).get('value');
-                    name = name.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // Trim
-                    var module = false;
-                    var noname = false;
-                    if (type.handlers.length > 1) {
-                        // Find out which module was selected
-                        var div = Y.one('#dndupload_handlers'+uploadid);
-                        div.all('input').each(function(input) {
-                            if (input.get('checked')) {
-                                var idx = input.get('value');
-                                module = type.handlers[idx].module;
-                                noname = type.handlers[idx].noname;
-                            }
-                        });
-                        if (!module) {
-                            return;
-                        }
-                    } else {
-                        module = type.handlers[0].module;
-                        noname = type.handlers[0].noname;
-                    }
-                    if (name == '' && !noname) {
-                        return;
-                    }
-                    panel.hide();
-                    // Do the upload
-                    self.upload_item(name, type.type, contents, section, sectionnumber, module);
-                },
-                section: Y.WidgetStdMod.FOOTER
-            },{
-                value: M.util.get_string('cancel', 'moodle'),
-                action: function(e) {
-                    e.preventDefault();
-                    panel.hide();
-                },
-                section: Y.WidgetStdMod.FOOTER
-            }]
+            align: {
+                node: null,
+                points: [Y.WidgetPositionAlign.CC, Y.WidgetPositionAlign.CC]
+            }
         });
+
         // When the panel is hidden - destroy it and then check for other pending uploads
         panel.after("visibleChange", function(e) {
             if (!panel.get('visible')) {
@@ -897,19 +871,86 @@ M.course_dndupload = {
                 self.check_upload_queue();
             }
         });
-        // Focus on the 'name' box
-        Y.one('#'+nameid).focus();
+
+        var namefield = Y.one('#'+nameid);
+        var submit = function(e) {
+            e.preventDefault();
+            var name = Y.Lang.trim(namefield.get('value'));
+            var module = false;
+            var noname = false;
+            if (type.handlers.length > 1) {
+                // Find out which module was selected
+                var div = Y.one('#dndupload_handlers'+uploadid);
+                div.all('input').each(function(input) {
+                    if (input.get('checked')) {
+                        var idx = input.get('value');
+                        module = type.handlers[idx].module;
+                        noname = type.handlers[idx].noname;
+                    }
+                });
+                if (!module) {
+                    return;
+                }
+            } else {
+                module = type.handlers[0].module;
+                noname = type.handlers[0].noname;
+            }
+            if (name == '' && !noname) {
+                return;
+            }
+            if (noname) {
+                name = '';
+            }
+            panel.hide();
+            // Do the upload
+            self.upload_item(name, type.type, contents, section, sectionnumber, module);
+        };
+
+        // Add the submit/cancel buttons to the bottom of the dialog.
+        panel.addButton({
+            label: M.util.get_string('upload', 'moodle'),
+            action: submit,
+            section: Y.WidgetStdMod.FOOTER,
+            name: 'submit'
+        });
+        panel.addButton({
+            label: M.util.get_string('cancel', 'moodle'),
+            action: function(e) {
+                e.preventDefault();
+                panel.hide();
+            },
+            section: Y.WidgetStdMod.FOOTER
+        });
+        var submitbutton = panel.getButton('submit').button;
+        namefield.on('key', submit, 'enter'); // Submit the form if 'enter' pressed
+        namefield.after('keyup', function() {
+            if (Y.Lang.trim(namefield.get('value')) == '') {
+                submitbutton.disable();
+            } else {
+                submitbutton.enable();
+            }
+        });
+
+        // Enable / disable the 'name' box, depending on the handler selected.
         for (i=0; i<type.handlers.length; i++) {
             if (type.handlers[i].noname) {
                 Y.one('#dndupload_handler'+uploadid+type.handlers[i].module).on('click', function (e) {
-                    Y.one('#'+nameid).set('disabled', 'disabled');
+                    namefield.set('disabled', 'disabled');
+                    submitbutton.enable();
                 });
             } else {
                 Y.one('#dndupload_handler'+uploadid+type.handlers[i].module).on('click', function (e) {
-                    Y.one('#'+nameid).removeAttribute('disabled');
+                    namefield.removeAttribute('disabled');
+                    namefield.focus();
+                    if (Y.Lang.trim(namefield.get('value')) == '') {
+                        submitbutton.disable();
+                    }
                 });
             }
         }
+
+        // Focus on the 'name' box
+        Y.one('#'+nameid).focus();
     },
 
     /**
index b540001..41076c9 100644 (file)
@@ -51,7 +51,7 @@ function dndupload_add_to_course($course, $modnames) {
     // Add the javascript to the page.
     $jsmodule = array(
         'name' => 'coursedndupload',
-        'fullpath' => new moodle_url('/course/dndupload.js'),
+        'fullpath' => '/course/dndupload.js',
         'strings' => array(
             array('addfilehere', 'moodle'),
             array('dndworkingfiletextlink', 'moodle'),
@@ -67,7 +67,7 @@ function dndupload_add_to_course($course, $modnames) {
             array('upload', 'moodle'),
             array('cancel', 'moodle')
         ),
-        'requires' => array('node', 'event', 'panel', 'json', 'anim')
+        'requires' => array('node', 'event', 'json', 'anim')
     );
     $vars = array(
         array('courseid' => $course->id,
@@ -112,12 +112,12 @@ class dndupload_handler {
         // Add some default types to handle.
         // Note: 'Files' type is hard-coded into the Javascript as this needs to be ...
         // ... treated a little differently.
-        $this->add_type('url', array('url', 'text/uri-list', 'text/x-moz-url'), get_string('addlinkhere', 'moodle'),
-                        get_string('nameforlink', 'moodle'), 10);
-        $this->add_type('text/html', array('text/html'), get_string('addpagehere', 'moodle'),
-                        get_string('nameforpage', 'moodle'), 20);
-        $this->add_type('text', array('text', 'text/plain'), get_string('addpagehere', 'moodle'),
-                        get_string('nameforpage', 'moodle'), 30);
+        $this->register_type('url', array('url', 'text/uri-list', 'text/x-moz-url'), get_string('addlinkhere', 'moodle'),
+                        get_string('nameforlink', 'moodle'), get_string('whatforlink', 'moodle'), 10);
+        $this->register_type('text/html', array('text/html'), get_string('addpagehere', 'moodle'),
+                        get_string('nameforpage', 'moodle'), get_string('whatforpage', 'moodle'), 20);
+        $this->register_type('text', array('text', 'text/plain'), get_string('addpagehere', 'moodle'),
+                        get_string('nameforpage', 'moodle'), get_string('whatforpage', 'moodle'), 30);
 
         // Loop through all modules to find handlers.
         $mods = get_plugin_list_with_function('mod', 'dndupload_register');
@@ -135,7 +135,7 @@ class dndupload_handler {
             }
             if (isset($resp['files'])) {
                 foreach ($resp['files'] as $file) {
-                    $this->add_file_handler($file['extension'], $modname, $file['message']);
+                    $this->register_file_handler($file['extension'], $modname, $file['message']);
                 }
             }
             if (isset($resp['addtypes'])) {
@@ -145,19 +145,38 @@ class dndupload_handler {
                     } else {
                         $priority = 100;
                     }
-                    $this->add_type($type['identifier'], $type['datatransfertypes'],
-                                    $type['addmessage'], $type['namemessage'], $priority);
+                    if (!isset($type['handlermessage'])) {
+                        $type['handlermessage'] = '';
+                    }
+                    $this->register_type($type['identifier'], $type['datatransfertypes'],
+                                    $type['addmessage'], $type['namemessage'], $type['handlermessage'], $priority);
                 }
             }
             if (isset($resp['types'])) {
                 foreach ($resp['types'] as $type) {
                     $noname = !empty($type['noname']);
-                    $this->add_type_handler($type['identifier'], $modname, $type['message'], $noname);
+                    $this->register_type_handler($type['identifier'], $modname, $type['message'], $noname);
                 }
             }
         }
     }
 
+    /**
+     * No external code should be directly adding new types - they should be added via a 'addtypes' array, returned
+     * by MODNAME_dndupload_register.
+     *
+     * @deprecated deprecated since Moodle 2.5
+     * @param string $identifier
+     * @param array $datatransfertypes
+     * @param string $addmessage
+     * @param string $namemessage
+     * @param int $priority
+     */
+    public function add_type($identifier, $datatransfertypes, $addmessage, $namemessage, $priority=100) {
+        debugging('add_type() is deprecated. Plugins should be using the MODNAME_dndupload_register callback.');
+        $this->register_type($identifier, $datatransfertypes, $addmessage, $namemessage, '', $priority);
+    }
+
     /**
      * Used to add a new mime type that can be drag and dropped onto a
      * course displayed in a browser window
@@ -169,10 +188,11 @@ class dndupload_handler {
      *                           dragged onto the page
      * @param string $namemessage The message to pop up when asking for the name to give the
      *                            course module instance when it is created
+     * @param string $handlermessage The message to pop up when asking which module should handle this type
      * @param int $priority Controls the order in which types are checked by the browser (mainly
      *                      needed to check for 'text' last as that is usually given as fallback)
      */
-    public function add_type($identifier, $datatransfertypes, $addmessage, $namemessage, $priority=100) {
+    protected function register_type($identifier, $datatransfertypes, $addmessage, $namemessage, $handlermessage, $priority=100) {
         if ($this->is_known_type($identifier)) {
             throw new coding_exception("Type $identifier is already registered");
         }
@@ -182,6 +202,7 @@ class dndupload_handler {
         $add->datatransfertypes = $datatransfertypes;
         $add->addmessage = $addmessage;
         $add->namemessage = $namemessage;
+        $add->handlermessage = $handlermessage;
         $add->priority = $priority;
         $add->handlers = array();
 
@@ -189,9 +210,10 @@ class dndupload_handler {
     }
 
     /**
-     * Used to declare that a particular module will handle a particular type
-     * of dropped data
+     * No external code should be directly adding new type handlers - they should be added via a 'addtypes' array, returned
+     * by MODNAME_dndupload_register.
      *
+     * @deprecated deprecated since Moodle 2.5
      * @param string $type The name of the type (as declared in add_type)
      * @param string $module The name of the module to handle this type
      * @param string $message The message to show the user if more than one handler is registered
@@ -200,6 +222,22 @@ class dndupload_handler {
      * @throws coding_exception
      */
     public function add_type_handler($type, $module, $message, $noname) {
+        debugging('add_type_handler() is deprecated. Plugins should be using the MODNAME_dndupload_register callback.');
+        $this->register_type_handler($type, $module, $message, $noname);
+    }
+
+    /**
+     * Used to declare that a particular module will handle a particular type
+     * of dropped data
+     *
+     * @param string $type The name of the type (as declared in register_type)
+     * @param string $module The name of the module to handle this type
+     * @param string $message The message to show the user if more than one handler is registered
+     *                        for a type and the user needs to make a choice between them
+     * @param bool $noname If true, the 'name' dialog should be disabled in the pop-up.
+     * @throws coding_exception
+     */
+    protected function register_type_handler($type, $module, $message, $noname) {
         if (!$this->is_known_type($type)) {
             throw new coding_exception("Trying to add handler for unknown type $type");
         }
@@ -213,6 +251,21 @@ class dndupload_handler {
         $this->types[$type]->handlers[] = $add;
     }
 
+    /**
+     * No external code should be directly adding new file handlers - they should be added via a 'files' array, returned
+     * by MODNAME_dndupload_register.
+     *
+     * @deprecated deprecated since Moodle 2.5
+     * @param string $extension The file extension to handle ('*' for all types)
+     * @param string $module The name of the module to handle this type
+     * @param string $message The message to show the user if more than one handler is registered
+     *                        for a type and the user needs to make a choice between them
+     */
+    public function add_file_handler($extension, $module, $message) {
+        debugging('add_file_handler() is deprecated. Plugins should be using the MODNAME_dndupload_register callback.');
+        $this->register_file_handler($extension, $module, $message);
+    }
+
     /**
      * Used to declare that a particular module will handle a particular type
      * of dropped file
@@ -222,7 +275,7 @@ class dndupload_handler {
      * @param string $message The message to show the user if more than one handler is registered
      *                        for a type and the user needs to make a choice between them
      */
-    public function add_file_handler($extension, $module, $message) {
+    protected function register_file_handler($extension, $module, $message) {
         $extension = strtolower($extension);
 
         $add = new stdClass;
index 8f7e875..bfa6ca6 100644 (file)
@@ -4,6 +4,7 @@ defined('MOODLE_INTERNAL') || die;
 
 require_once($CFG->libdir.'/formslib.php');
 require_once($CFG->libdir.'/completionlib.php');
+require_once($CFG->libdir. '/coursecatlib.php');
 
 class course_edit_form extends moodleform {
     protected $course;
@@ -48,9 +49,7 @@ class course_edit_form extends moodleform {
         // verify permissions to change course category or keep current
         if (empty($course->id)) {
             if (has_capability('moodle/course:create', $categorycontext)) {
-                $displaylist = array();
-                $parentlist = array();
-                make_categories_list($displaylist, $parentlist, 'moodle/course:create');
+                $displaylist = coursecat::make_categories_list('moodle/course:create');
                 $mform->addElement('select', 'category', get_string('category'), $displaylist);
                 $mform->addHelpButton('category', 'category');
                 $mform->setDefault('category', $category->id);
@@ -61,12 +60,10 @@ class course_edit_form extends moodleform {
             }
         } else {
             if (has_capability('moodle/course:changecategory', $coursecontext)) {
-                $displaylist = array();
-                $parentlist = array();
-                make_categories_list($displaylist, $parentlist, 'moodle/course:create');
+                $displaylist = coursecat::make_categories_list('moodle/course:create');
                 if (!isset($displaylist[$course->category])) {
                     //always keep current
-                    $displaylist[$course->category] = format_string($DB->get_field('course_categories', 'name', array('id'=>$course->category)));
+                    $displaylist[$course->category] = coursecat::get($course->category)->get_formatted_name();
                 }
                 $mform->addElement('select', 'category', get_string('category'), $displaylist);
                 $mform->addHelpButton('category', 'category');
@@ -190,13 +187,15 @@ class course_edit_form extends moodleform {
         }
 
 //--------------------------------------------------------------------------------
+        // Just a placeholder..
         $mform->addElement('hidden', 'addcourseformatoptionshere');
+        $mform->setType('addcourseformatoptionshere', PARAM_BOOL);
 
 //--------------------------------------------------------------------------------
         enrol_course_edit_form($mform, $course, $context);
 
 //--------------------------------------------------------------------------------
-        $mform->addElement('header','', get_string('groups', 'group'));
+        $mform->addElement('header','groups', get_string('groups', 'group'));
 
         $choices = array();
         $choices[NOGROUPS] = get_string('groupsnone', 'group');
@@ -219,7 +218,7 @@ class course_edit_form extends moodleform {
         $mform->addElement('select', 'defaultgroupingid', get_string('defaultgrouping', 'group'), $options);
 
 //--------------------------------------------------------------------------------
-        $mform->addElement('header','', get_string('availability'));
+        $mform->addElement('header','availability', get_string('availability'));
 
         $choices = array();
         $choices['0'] = get_string('courseavailablenot');
@@ -237,7 +236,7 @@ class course_edit_form extends moodleform {
         }
 
 //--------------------------------------------------------------------------------
-        $mform->addElement('header','', get_string('language'));
+        $mform->addElement('header','language', get_string('language'));
 
         $languages=array();
         $languages[''] = get_string('forceno');
@@ -247,7 +246,7 @@ class course_edit_form extends moodleform {
 
 //--------------------------------------------------------------------------------
         if (completion_info::is_enabled_for_site()) {
-            $mform->addElement('header','', get_string('progress','completion'));
+            $mform->addElement('header','progress', get_string('progress','completion'));
             $mform->addElement('select', 'enablecompletion', get_string('completion','completion'),
                 array(0=>get_string('completiondisabled','completion'), 1=>get_string('completionenabled','completion')));
             $mform->setDefault('enablecompletion', $courseconfig->enablecompletion);
@@ -276,9 +275,6 @@ class course_edit_form extends moodleform {
             foreach ($roles as $role) {
                 $mform->addElement('text', 'role_'.$role->id, get_string('yourwordforx', '', $role->localname));
                 $mform->setType('role_'.$role->id, PARAM_TEXT);
-                if (!in_array($role->id, $assignableroles)) {
-                    $mform->setAdvanced('role_'.$role->id);
-                }
             }
         }
 
@@ -314,7 +310,7 @@ class course_edit_form extends moodleform {
         $formatvalue = $mform->getElementValue('format');
         if (is_array($formatvalue) && !empty($formatvalue)) {
             $courseformat = course_get_format((object)array('format' => $formatvalue[0]));
-            $newel = $mform->createElement('header', '', get_string('courseformatoptions', 'moodle',
+            $newel = $mform->createElement('header', 'courseformatoptions', get_string('courseformatoptions', 'moodle',
                     $courseformat->get_format_name()));
             $mform->insertElementBefore($newel, 'addcourseformatoptionshere');
 
index b7184b7..355aca1 100644 (file)
@@ -27,8 +27,9 @@
  */
 
 require_once('../config.php');
-require_once('lib.php');
-require_once('editcategory_form.php');
+require_once($CFG->dirroot.'/course/lib.php');
+require_once($CFG->dirroot.'/course/editcategory_form.php');
+require_once($CFG->libdir.'/coursecatlib.php');
 
 require_login();
 
@@ -92,42 +93,16 @@ if ($mform->is_cancelled()) {
         redirect($CFG->wwwroot .'/course/manage.php');
     }
 } else if ($data = $mform->get_data()) {
-    $newcategory = new stdClass();
-    $newcategory->name = $data->name;
-    $newcategory->idnumber = $data->idnumber;
-    $newcategory->description_editor = $data->description_editor;
-    $newcategory->parent = $data->parent; // if $data->parent = 0, the new category will be a top-level category
-
-    if (isset($data->theme) && !empty($CFG->allowcategorythemes)) {
-        $newcategory->theme = $data->theme;
-    }
-
-    $logaction = 'update';
     if ($id) {
-        // Update an existing category.
-        $newcategory->id = $category->id;
-        if ($newcategory->parent != $category->parent) {
-            // check category manage capability if parent changed
-            require_capability('moodle/category:manage', get_category_or_system_context((int)$newcategory->parent));
-            $parent_cat = $DB->get_record('course_categories', array('id' => $newcategory->parent));
-            move_category($newcategory, $parent_cat);
+        $newcategory = coursecat::get($id);
+        if ($data->parent != $category->parent && !$newcategory->can_change_parent($data->parent)) {
+            print_error('cannotmovecategory');
         }
+        $newcategory->update($data, $editoroptions);
     } else {
-        // Create a new category.
-        $newcategory->description = $data->description_editor['text'];
-
-        // Don't overwrite the $newcategory object as it'll be processed by file_postupdate_standard_editor in a moment
-        $category = create_course_category($newcategory);
-        $newcategory->id = $category->id;
-        $categorycontext = $category->context;
-        $logaction = 'add';
+        $newcategory = coursecat::create($data, $editoroptions);
     }
 
-    $newcategory = file_postupdate_standard_editor($newcategory, 'description', $editoroptions, $categorycontext, 'coursecat', 'description', 0);
-    $DB->update_record('course_categories', $newcategory);
-    add_to_log(SITEID, "category", $logaction, "editcategory.php?id=$newcategory->id", $newcategory->id);
-    fix_course_sortorder();
-
     redirect('manage.php?id='.$newcategory->id);
 }
 
index 3e3cfe3..40ac48c 100644 (file)
@@ -4,6 +4,7 @@ if (!defined('MOODLE_INTERNAL')) {
 }
 
 require_once ($CFG->dirroot.'/course/moodleform_mod.php');
+require_once ($CFG->libdir.'/coursecatlib.php');
 class editcategory_form extends moodleform {
 
     // form definition
@@ -18,17 +19,16 @@ class editcategory_form extends moodleform {
         if (has_capability('moodle/category:manage', get_system_context()) || $category->parent == 0) {
             $options[0] = get_string('top');
         }
-        $parents = array();
         if ($category->id) {
             // Editing an existing category.
-            make_categories_list($options, $parents, 'moodle/category:manage', $category->id);
+            $options += coursecat::make_categories_list('moodle/category:manage', $category->id);
             if (empty($options[$category->parent])) {
                 $options[$category->parent] = $DB->get_field('course_categories', 'name', array('id'=>$category->parent));
             }
             $strsubmit = get_string('savechanges');
         } else {
             // Making a new category
-            make_categories_list($options, $parents, 'moodle/category:manage');
+            $options += coursecat::make_categories_list('moodle/category:manage');
             $strsubmit = get_string('createcategory');
         }
 
index 202138c..e892045 100644 (file)
@@ -54,9 +54,10 @@ class editsection_form extends moodleform {
 
         $mform  = $this->_form;
         $course = $this->_customdata['course'];
+        $context = context_course::instance($course->id);
 
         if (!empty($CFG->enableavailability)) {
-            $mform->addElement('header', '', get_string('availabilityconditions', 'condition'));
+            $mform->addElement('header', 'availabilityconditions', get_string('availabilityconditions', 'condition'));
             // String used by conditions more than once
             $strcondnone = get_string('none', 'condition');
             // Grouping conditions - only if grouping is enabled at site level
@@ -65,7 +66,6 @@ class editsection_form extends moodleform {
                 $options[0] = get_string('none');
                 if ($groupings = $DB->get_records('groupings', array('courseid' => $course->id))) {
                     foreach ($groupings as $grouping) {
-                        $context = context_course::instance($course->id);
                         $options[$grouping->id] = format_string(
                                 $grouping->name, true, array('context' => $context));
                     }
@@ -122,7 +122,7 @@ class editsection_form extends moodleform {
 
             // Conditions based on user fields
             $operators = condition_info::get_condition_user_field_operators();
-            $useroptions = condition_info::get_condition_user_fields();
+            $useroptions = condition_info::get_condition_user_fields(array('context' => $context));
             asort($useroptions);
 
             $useroptions = array(0 => $strcondnone) + $useroptions;
index 3063966..362f928 100644 (file)
@@ -1650,7 +1650,7 @@ class core_course_external extends external_api {
      */
     public static function create_categories($categories) {
         global $CFG, $DB;
-        require_once($CFG->dirroot . "/course/lib.php");
+        require_once($CFG->libdir . "/coursecatlib.php");
 
         $params = self::validate_parameters(self::create_categories_parameters(),
                         array('categories' => $categories));
@@ -1670,38 +1670,10 @@ class core_course_external extends external_api {
             self::validate_context($context);
             require_capability('moodle/category:manage', $context);
 
-            // Check name.
-            if (textlib::strlen($category['name'])>255) {
-                throw new moodle_exception('categorytoolong');
-            }
-
-            $newcategory = new stdClass();
-            $newcategory->name = $category['name'];
-            $newcategory->parent = $category['parent'];
-            // Format the description.
-            if (!empty($category['description'])) {
-                $newcategory->description = $category['description'];
-            }
-            $newcategory->descriptionformat = external_validate_format($category['descriptionformat']);
-            if (isset($category['theme']) and !empty($CFG->allowcategorythemes)) {
-                $newcategory->theme = $category['theme'];
-            }
-            // Check id number.
-            if (!empty($category['idnumber'])) { // Same as in course/editcategory_form.php .
-                if (textlib::strlen($category['idnumber'])>100) {
-                    throw new moodle_exception('idnumbertoolong');
-                }
-                if ($existing = $DB->get_record('course_categories', array('idnumber' => $category['idnumber']))) {
-                    if ($existing->id) {
-                        throw new moodle_exception('idnumbertaken');
-                    }
-                }
-                $newcategory->idnumber = $category['idnumber'];
-            }
+            // this will validate format and throw an exception if there are errors
+            external_validate_format($category['descriptionformat']);
 
-            $newcategory = create_course_category($newcategory);
-            // Populate special fields.
-            fix_course_sortorder();
+            $newcategory = coursecat::create($category);
 
             $createdcategories[] = array('id' => $newcategory->id, 'name' => $newcategory->name);
         }
@@ -1764,7 +1736,7 @@ class core_course_external extends external_api {
      */
     public static function update_categories($categories) {
         global $CFG, $DB;
-        require_once($CFG->dirroot . "/course/lib.php");
+        require_once($CFG->libdir . "/coursecatlib.php");
 
         // Validate parameters.
         $params = self::validate_parameters(self::update_categories_parameters(), array('categories' => $categories));
@@ -1772,49 +1744,16 @@ class core_course_external extends external_api {
         $transaction = $DB->start_delegated_transaction();
 
         foreach ($params['categories'] as $cat) {
-            if (!$category = $DB->get_record('course_categories', array('id' => $cat['id']))) {
-                throw new moodle_exception('unknowcategory');
-            }
+            $category = coursecat::get($cat['id']);
 
             $categorycontext = context_coursecat::instance($cat['id']);
             self::validate_context($categorycontext);
             require_capability('moodle/category:manage', $categorycontext);
 
-            if (!empty($cat['name'])) {
-                if (textlib::strlen($cat['name'])>255) {
-                     throw new moodle_exception('categorytoolong');
-                }
-                $category->name = $cat['name'];
-            }
-            if (!empty($cat['idnumber'])) {
-                if (textlib::strlen($cat['idnumber'])>100) {
-                    throw new moodle_exception('idnumbertoolong');
-                }
-                $category->idnumber = $cat['idnumber'];
-            }
-            if (!empty($cat['description'])) {
-                $category->description = $cat['description'];
-                $category->descriptionformat = external_validate_format($cat['descriptionformat']);
-            }
-            if (!empty($cat['theme'])) {
-                $category->theme = $cat['theme'];
-            }
-            if (!empty($cat['parent']) && ($category->parent != $cat['parent'])) {
-                // First check if parent exists.
-                if (!$parent_cat = $DB->get_record('course_categories', array('id' => $cat['parent']))) {
-                    throw new moodle_exception('unknowcategory');
-                }
-                // Then check if we have capability.
-                self::validate_context(get_category_or_system_context((int)$cat['parent']));
-                require_capability('moodle/category:manage', get_category_or_system_context((int)$cat['parent']));
-                // Finally move the category.
-                move_category($category, $parent_cat);
-                $category->parent = $cat['parent'];
-                // Get updated path by move_category().
-                $category->path = $DB->get_field('course_categories', 'path',
-                        array('id' => $category->id));
-            }
-            $DB->update_record('course_categories', $category);
+            // this will throw an exception if descriptionformat is not valid
+            external_validate_format($cat['descriptionformat']);
+
+            $category->update($cat);
         }
 
         $transaction->allow_commit();
@@ -1864,6 +1803,7 @@ class core_course_external extends external_api {
     public static function delete_categories($categories) {
         global $CFG, $DB;
         require_once($CFG->dirroot . "/course/lib.php");
+        require_once($CFG->libdir . "/coursecatlib.php");
 
         // Validate parameters.
         $params = self::validate_parameters(self::delete_categories_parameters(), array('categories' => $categories));
@@ -1871,9 +1811,7 @@ class core_course_external extends external_api {
         $transaction = $DB->start_delegated_transaction();
 
         foreach ($params['categories'] as $category) {
-            if (!$deletecat = $DB->get_record('course_categories', array('id' => $category['id']))) {
-                throw new moodle_exception('unknowcategory');
-            }
+            $deletecat = coursecat::get($category['id'], MUST_EXIST);
             $context = context_coursecat::instance($deletecat->id);
             require_capability('moodle/category:manage', $context);
             self::validate_context($context);
@@ -1881,29 +1819,32 @@ class core_course_external extends external_api {
 
             if ($category['recursive']) {
                 // If recursive was specified, then we recursively delete the category's contents.
-                category_delete_full($deletecat, false);
+                if ($deletecat->can_delete_full()) {
+                    $deletecat->delete_full(false);
+                } else {
+                    throw new moodle_exception('youcannotdeletecategory', '', '', $deletecat->get_formatted_name());
+                }
             } else {
                 // In this situation, we don't delete the category's contents, we either move it to newparent or parent.
                 // If the parent is the root, moving is not supported (because a course must always be inside a category).
                 // We must move to an existing category.
                 if (!empty($category['newparent'])) {
-                    if (!$DB->record_exists('course_categories', array('id' => $category['newparent']))) {
-                        throw new moodle_exception('unknowcategory');
-                    }
-                    $newparent = $category['newparent'];
+                    $newparentcat = coursecat::get($category['newparent']);
                 } else {
-                    $newparent = $deletecat->parent;
+                    $newparentcat = coursecat::get($deletecat->parent);
                 }
 
                 // This operation is not allowed. We must move contents to an existing category.
-                if ($newparent == 0) {
+                if (!$newparentcat->id) {
                     throw new&nbs