Merge branch 'wip-MDL-38147-master' of git://github.com/marinaglancy/moodle
authorDamyon Wiese <damyon@moodle.com>
Wed, 27 Mar 2013 06:11:27 +0000 (14:11 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 27 Mar 2013 06:11:27 +0000 (14:11 +0800)
619 files changed:
admin/environment.xml
admin/settings/plugins.php
admin/settings/server.php
admin/tool/behat/cli/init.php
backup/util/ui/yui/backupselectall/backupselectall.js
blocks/rss_client/edit_form.php
cache/forms.php
cohort/lib.php
course/dnduploadlib.php
course/edit_form.php
course/format/renderer.php
course/lib.php
course/moodleform_mod.php
course/recent.php
course/renderer.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/database/lib.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]
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/tests/externallib_test.php [new file with mode: 0644]
group/group_form.php
group/lib.php
lang/en/admin.php
lang/en/block.php
lang/en/install.php
lang/en/moodle.php
lib/accesslib.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/blocklib.php
lib/datalib.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/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/phpunit/bootstrap.php
lib/phpunit/bootstraplib.php
lib/phpunit/classes/database_driver_testcase.php
lib/phpunit/classes/util.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/formslib_test.php
lib/thirdpartylibs.xml
lib/timezone.txt
lib/upgrade.txt
mod/choice/mod_form.php
mod/folder/lib.php
mod/forum/tests/externallib_test.php
mod/forum/tests/generator/lib.php
mod/forum/tests/generator_test.php
mod/imscp/mod_form.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/quiz/attemptlib.php
mod/quiz/db/upgrade.php
mod/quiz/renderer.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/responses/db/install.php [new file with mode: 0644]
mod/quiz/reviewquestion.php
mod/quiz/styles.css
mod/quiz/version.php
mod/scorm/locallib.php
mod/survey/lib.php
mod/url/mod_form.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/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
report/courseoverview/index.php
report/log/locallib.php
report/stats/locallib.php
report/stats/user.php
theme/base/style/core.css
theme/base/style/user.css
theme/canvas/style/core.css
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
user/edit.php
user/edit_form.php
user/editadvanced.php
user/editadvanced_form.php
user/editlib.php
user/filters/text.php
user/profile.php
user/profile/lib.php
user/view.php
version.php

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 61d2477..a11cbfa 100644 (file)
@@ -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')
+            )
         );
     }
 
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 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 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 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);
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 19441a5..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)) {
index b7e8994..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'),
index 28ab751..bfa6ca6 100644 (file)
@@ -187,7 +187,9 @@ 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);
index d9a7edc..6529716 100644 (file)
@@ -562,6 +562,39 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
         return $o;
     }
 
+    /**
+     * Generate the html for the 'Jump to' menu on a single section page.
+     *
+     * @param stdClass $course The course entry from DB
+     * @param array $sections The course_sections entries from the DB
+     * @param $displaysection the current displayed section number.
+     *
+     * @return string HTML to output.
+     */
+    protected function section_nav_selection($course, $sections, $displaysection) {
+        global $CFG;
+        $o = '';
+        $sectionmenu = array();
+        $sectionmenu[course_get_url($course)->out(false)] = get_string('maincoursepage');
+        $modinfo = get_fast_modinfo($course);
+        $section = 1;
+        while ($section <= $course->numsections) {
+            $thissection = $modinfo->get_section_info($section);
+            $showsection = $thissection->uservisible or !$course->hiddensections;
+            if (($showsection) && ($section != $displaysection) && ($url = course_get_url($course, $section))) {
+                $sectionmenu[$url->out(false)] = get_section_name($course, $section);
+            }
+            $section++;
+        }
+
+        $select = new url_select($sectionmenu, '', array('' => get_string('jumpto')));
+        $select->class = 'jumpmenu';
+        $select->formid = 'sectionmenu';
+        $o .= $this->output->render($select);
+
+        return $o;
+    }
+
     /**
      * Output the html for a single section page .
      *
@@ -642,16 +675,16 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
         echo $this->end_section_list();
 
         // Display section bottom navigation.
-        $courselink = html_writer::link(course_get_url($course), get_string('returntomaincoursepage'));
         $sectionbottomnav = '';
         $sectionbottomnav .= html_writer::start_tag('div', array('class' => 'section-navigation mdl-bottom'));
         $sectionbottomnav .= html_writer::tag('span', $sectionnavlinks['previous'], array('class' => 'mdl-left'));
         $sectionbottomnav .= html_writer::tag('span', $sectionnavlinks['next'], array('class' => 'mdl-right'));
-        $sectionbottomnav .= html_writer::tag('div', $courselink, array('class' => 'mdl-align'));
+        $sectionbottomnav .= html_writer::tag('div', $this->section_nav_selection($course, $sections, $displaysection),
+            array('class' => 'mdl-align'));
         $sectionbottomnav .= html_writer::end_tag('div');
         echo $sectionbottomnav;
 
-        // close single-section div.
+        // Close single-section div.
         echo html_writer::end_tag('div');
     }
 
index be23171..f906949 100644 (file)
@@ -3646,3 +3646,55 @@ function update_module($moduleinfo) {
 
     return $moduleinfo;
 }
+
+/**
+ * Compare two objects to find out their correct order based on timestamp (to be used by usort).
+ * Sorts by descending order of time.
+ *
+ * @param stdClass $a First object
+ * @param stdClass $b Second object
+ * @return int 0,1,-1 representing the order
+ */
+function compare_activities_by_time_desc($a, $b) {
+    // Make sure the activities actually have a timestamp property.
+    if ((!property_exists($a, 'timestamp')) && (!property_exists($b, 'timestamp'))) {
+        return 0;
+    }
+    // We treat instances without timestamp as if they have a timestamp of 0.
+    if ((!property_exists($a, 'timestamp')) && (property_exists($b,'timestamp'))) {
+        return 1;
+    }
+    if ((property_exists($a, 'timestamp')) && (!property_exists($b, 'timestamp'))) {
+        return -1;
+    }
+    if ($a->timestamp == $b->timestamp) {
+        return 0;
+    }
+    return ($a->timestamp > $b->timestamp) ? -1 : 1;
+}
+
+/**
+ * Compare two objects to find out their correct order based on timestamp (to be used by usort).
+ * Sorts by ascending order of time.
+ *
+ * @param stdClass $a First object
+ * @param stdClass $b Second object
+ * @return int 0,1,-1 representing the order
+ */
+function compare_activities_by_time_asc($a, $b) {
+    // Make sure the activities actually have a timestamp property.
+    if ((!property_exists($a, 'timestamp')) && (!property_exists($b, 'timestamp'))) {
+      return 0;
+    }
+    // We treat instances without timestamp as if they have a timestamp of 0.
+    if ((!property_exists($a, 'timestamp')) && (property_exists($b, 'timestamp'))) {
+        return -1;
+    }
+    if ((property_exists($a, 'timestamp')) && (!property_exists($b, 'timestamp'))) {
+        return 1;
+    }
+    if ($a->timestamp == $b->timestamp) {
+        return 0;
+    }
+    return ($a->timestamp < $b->timestamp) ? -1 : 1;
+}
index 201f484..c837896 100644 (file)
@@ -457,6 +457,21 @@ abstract class moodleform_mod extends moodleform {
         //$this->standard_grading_coursemodule_elements();
 
         $mform->addElement('header', 'modstandardelshdr', get_string('modstandardels', 'form'));
+
+        $mform->addElement('modvisible', 'visible', get_string('visible'));
+        if (!empty($this->_cm)) {
+            $context = context_module::instance($this->_cm->id);
+            if (!has_capability('moodle/course:activityvisibility', $context)) {
+                $mform->hardFreeze('visible');
+            }
+        }
+
+        if ($this->_features->idnumber) {
+            $mform->addElement('text', 'cmidnumber', get_string('idnumbermod'));
+            $mform->setType('cmidnumber', PARAM_RAW);
+            $mform->addHelpButton('cmidnumber', 'idnumbermod');
+        }
+
         if ($this->_features->groups) {
             $options = array(NOGROUPS       => get_string('groupsnone'),
                              SEPARATEGROUPS => get_string('groupsseparate'),
@@ -476,26 +491,11 @@ abstract class moodleform_mod extends moodleform {
             }
             $mform->addElement('select', 'groupingid', get_string('grouping', 'group'), $options);
             $mform->addHelpButton('groupingid', 'grouping', 'group');
-            $mform->setAdvanced('groupingid');
         }
 
         if ($this->_features->groupmembersonly) {
             $mform->addElement('checkbox', 'groupmembersonly', get_string('groupmembersonly', 'group'));
             $mform->addHelpButton('groupmembersonly', 'groupmembersonly', 'group');
-            $mform->setAdvanced('groupmembersonly');
-        }
-
-        $mform->addElement('modvisible', 'visible', get_string('visible'));
-        if (!empty($this->_cm)) {
-            $context = context_module::instance($this->_cm->id);
-            if (!has_capability('moodle/course:activityvisibility', $context)) {
-                $mform->hardFreeze('visible');
-            }
-        }
-
-        if ($this->_features->idnumber) {
-            $mform->addElement('text', 'cmidnumber', get_string('idnumbermod'));
-            $mform->addHelpButton('cmidnumber', 'idnumbermod');
         }
 
         if (!empty($CFG->enableavailability)) {
index 8640419..192ccc2 100644 (file)
@@ -30,6 +30,7 @@ require_once('recent_form.php');
 $id = required_param('id', PARAM_INT);
 
 $PAGE->set_url('/course/recent.php', array('id'=>$id));
+$PAGE->set_pagelayout('report');
 
 if (!$course = $DB->get_record('course', array('id'=>$id))) {
     print_error("That's an invalid course id");
@@ -272,39 +273,3 @@ if (!empty($activities)) {
 
 echo $OUTPUT->footer();
 
-function compare_activities_by_time_desc($a, $b) {
-    // make sure the activities actually have a timestamp property
-    if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
-        return 0;
-    }
-    // We treat instances without timestamp as if they have a timestamp of 0.
-    if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
-        return 1;
-    }
-    if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
-        return -1;
-    }
-    if ($a->timestamp == $b->timestamp) {
-        return 0;
-    }
-    return ($a->timestamp > $b->timestamp) ? -1 : 1;
-}
-
-function compare_activities_by_time_asc($a, $b) {
-    // make sure the activities actually have a timestamp property
-    if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
-      return 0;
-    }
-    // We treat instances without timestamp as if they have a timestamp of 0.
-    if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
-        return -1;
-    }
-    if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
-        return 1;
-    }
-    if ($a->timestamp == $b->timestamp) {
-        return 0;
-    }
-    return ($a->timestamp < $b->timestamp) ? -1 : 1;
-}
-
index ab89e16..54b3244 100644 (file)
@@ -649,7 +649,8 @@ class core_course_renderer extends plugin_renderer_base {
                 $output .= html_writer::empty_tag('input', array(
                     'type' => 'image',
                     'src' => $this->output->pix_url('i/completion-'.$completionicon),
-                    'alt' => $imgalt, 'title' => $imgtitle));
+                    'alt' => $imgalt, 'title' => $imgtitle,
+                    'aria-live' => 'polite'));
                 $output .= html_writer::end_tag('div');
                 $output .= html_writer::end_tag('form');
             } else {
diff --git a/course/tests/behat/edit_settings.feature b/course/tests/behat/edit_settings.feature
new file mode 100644 (file)
index 0000000..465cc27
--- /dev/null
@@ -0,0 +1,36 @@
+@core_course
+Feature: Edit course settings
+  In order to set the course according to my teaching needs
+  As a moodle teacher
+  I need to edit the course settings
+
+  @javascript
+  Scenario: Edit course settings
+    Given the following "users" exists:
+      | username | firstname | lastname | email |
+      | teacher1 | Teacher | 1 | teacher1@asd.com |
+    And the following "courses" exists:
+      | fullname | shortname | summary | format |
+      | Course 1 | C1 | <p>Course summary</p> | topics |
+    And the following "course enrolments" exists:
+      | user | course | role |
+      | teacher1 | C1 | editingteacher |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    When I follow "Edit settings"
+    And I fill the moodle form with:
+      | Course full name | Edited course fullname |
+      | Course short name | Edited course shortname |
+      | Course summary | Edited course summary |
+    And I press "Save changes"
+    And I follow "Edited course fullname"
+    Then I should not see "Course 1"
+    And I should not see "C1"
+    And I should see "Edited course fullname"
+    And I should see "Edited course shortname"
+    And I follow "Edit settings"
+    And the "Course full name" field should match "Edited course fullname" value
+    And the "Course short name" field should match "Edited course shortname" value
+    And the "Course summary" field should match "Edited course summary" value
+    And I am on homepage
+    And I should see "Edited course fullname"
diff --git a/course/tests/behat/rename_roles.feature b/course/tests/behat/rename_roles.feature
new file mode 100644 (file)
index 0000000..7a1c8c7
--- /dev/null
@@ -0,0 +1,47 @@
+@core_course
+Feature: Rename roles within a course
+  In order to set course roles names according to their responsabilities
+  As a moodle teacher
+  I need to edit the course role names
+
+  @javascript
+  Scenario: Rename roles within a course
+    Given the following "users" exists:
+      | username | firstname | lastname | email |
+      | teacher1 | Teacher | 1 | teacher1@asd.com |
+      | teacher2 | Teacher | 2 | teacher2@asd.com |
+      | student1 | Student | 1 | student1@asd.com |
+    And the following "courses" exists:
+      | fullname | shortname | format |
+      | Course 1 | C1 | topics |
+    And the following "course enrolments" exists:
+      | user | course | role |
+      | teacher1 | C1 | editingteacher |
+      | teacher2 | C1 | teacher |
+      | student1 | C1 | student |
+    And I log in as "teacher1"
+    And I follow "Course 1"
+    When I follow "Edit settings"
+    And I fill the moodle form with:
+      | Your word for 'Non-editing teacher' | Tutor |
+      | Your word for 'Student' | Learner |
+    And I press "Save changes"
+    And I expand "Switch role to..." node
+    Then I should see "Tutor"
+    And I should see "Learner"
+    And I follow "Participants"
+    And the "roleid" select box should contain "Tutor"
+    And the "roleid" select box should contain "Learner"
+    And the "roleid" select box should not contain "Student"
+    And I follow "Edit settings"
+    And I fill the moodle form with:
+      | Your word for 'Non-editing teacher' | |
+      | Your word for 'Student' | |
+    And I press "Save changes"
+    And I expand "Switch role to..." node
+    And I should see "Teacher"
+    And I should see "Student"
+    And I should not see "Learner"
+    And I follow "Participants"
+    And the "roleid" select box should contain "Non-editing teacher"
+    And the "roleid" select box should contain "Student"
index f63d8b7..9d08906 100644 (file)
@@ -1024,4 +1024,92 @@ class courselib_testcase extends advanced_testcase {
         $pagetypelist = course_page_type_list($pagetype, null, null);
         $this->assertEquals($pagetypelist, $testpagetypelist1);
     }
+
+    public function test_compare_activities_by_time_desc() {
+
+        // Let's create some test data.
+        $activitiesivities = array();
+        $x = new stdClass();
+        $x->timestamp = null;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 1;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 3;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 0;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 5;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 5;
+        $activities[] = $x;
+
+        // Do the sorting.
+        usort($activities, 'compare_activities_by_time_desc');
+
+        // Let's check the result.
+        $last = 10;
+        foreach($activities as $activity) {
+            if (empty($activity->timestamp)) {
+                $activity->timestamp = 0;
+            }
+            $this->assertLessThanOrEqual($last, $activity->timestamp);
+        }
+    }
+
+    public function test_compare_activities_by_time_asc() {
+
+        // Let's create some test data.
+        $activities = array();
+        $x = new stdClass();
+        $x->timestamp = null;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 1;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 3;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 0;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 5;
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $activities[] = $x;
+
+        $x = new stdClass();
+        $x->timestamp = 5;
+        $activities[] = $x;
+
+        // Do the sorting.
+        usort($activities, 'compare_activities_by_time_asc');
+
+        // Let's check the result.
+        $last = 0;
+        foreach($activities as $activity) {
+            if (empty($activity->timestamp)) {
+                $activity->timestamp = 0;
+            }
+            $this->assertGreaterThanOrEqual($last, $activity->timestamp);
+        }
+    }
 }
index 8560eef..d3a9811 100644 (file)
@@ -516,7 +516,8 @@ YUI.add('moodle-course-toolboxes', function(Y) {
                 .setAttrs({
                     'name'  : 'title',
                     'value' : titletext,
-                    'autocomplete' : 'off'
+                    'autocomplete' : 'off',
+                    'aria-describedby' : 'id_editinstructions'
                 })
                 .addClass('titleeditor');
             var editform = Y.Node.create('<form />')
@@ -524,6 +525,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
                 .setAttribute('action', '#');
             var editinstructions = Y.Node.create('<span />')
                 .addClass('editinstructions')
+                .setAttrs({'id' : 'id_editinstructions'})
                 .set('innerHTML', M.util.get_string('edittitleinstructions', 'moodle'));
             var activityicon = element.one('img.activityicon').cloneNode();
 
index 5a88859..fc57b58 100644 (file)
@@ -407,7 +407,7 @@ class enrol_database_plugin extends enrol_plugin {
             $localnotempty = "";
             if ($localcoursefield !== 'id') {
                 $localnotempty =  "AND c.$localcoursefield <> :lcfe";
-                $params['lcfe'] = $DB->sql_empty();
+                $params['lcfe'] = '';
             }
             $sql = "SELECT c.id, c.visible, c.$localcoursefield AS mapping, c.shortname
                       FROM {course} c
index 80631b2..5c3e345 100644 (file)
@@ -411,7 +411,7 @@ function enrol_manual_migrate_plugin_enrolments($enrol) {
         }
 
         // First delete potential role duplicates.
-        $params = array('id'=>$e->id, 'component'=>'enrol_'.$enrol, 'empty'=>$DB->sql_empty());
+        $params = array('id'=>$e->id, 'component'=>'enrol_'.$enrol, 'empty'=>'');
         $sql = "SELECT ra.id
                   FROM {role_assignments} ra
                   JOIN {role_assignments} mra ON (mra.contextid = ra.contextid AND mra.userid = ra.userid AND mra.roleid = ra.roleid AND mra.component = :empty AND mra.itemid = 0)
@@ -425,7 +425,7 @@ function enrol_manual_migrate_plugin_enrolments($enrol) {
         $sql = "UPDATE {role_assignments}
                    SET itemid = 0, component = :empty
                  WHERE itemid = :id AND component = :component";
-        $params = array('empty'=>$DB->sql_empty(), 'id'=>$e->id, 'component'=>'enrol_'.$enrol);
+        $params = array('empty'=>'', 'id'=>$e->id, 'component'=>'enrol_'.$enrol);
         $DB->execute($sql, $params);
 
         // Delete potential enrol duplicates.
index 9212b33..77ffc6b 100644 (file)
@@ -151,11 +151,11 @@ class enrol_manual_lib_testcase extends advanced_testcase {
         $this->assertTrue($DB->record_exists('user_enrolments', array('enrolid'=>$maninstance1->id, 'userid'=>$user4->id, 'status'=>ENROL_USER_ACTIVE)));
         $this->assertEquals(4, $DB->count_records('user_enrolments', array('enrolid'=>$maninstance1->id)));
         $this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid'=>$xxxinstance1->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user1->id, 'roleid'=>$studentrole->id, 'contextid'=>$context1->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user1->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context1->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user2->id, 'roleid'=>$studentrole->id, 'contextid'=>$context1->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user3->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context1->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user4->id, 'roleid'=>$studentrole->id, 'contextid'=>$context1->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user1->id, 'roleid'=>$studentrole->id, 'contextid'=>$context1->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user1->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context1->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user2->id, 'roleid'=>$studentrole->id, 'contextid'=>$context1->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user3->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context1->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user4->id, 'roleid'=>$studentrole->id, 'contextid'=>$context1->id)));
         $this->assertEquals(5, $DB->count_records('role_assignments', array('contextid'=>$context1->id)));
 
 
@@ -173,7 +173,7 @@ class enrol_manual_lib_testcase extends advanced_testcase {
         $this->assertTrue($DB->record_exists('user_enrolments', array('enrolid'=>$maninstance3->id, 'userid'=>$user2->id, 'status'=>ENROL_USER_SUSPENDED)));
         $this->assertEquals(2, $DB->count_records('user_enrolments', array('enrolid'=>$maninstance3->id)));
         $this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid'=>$xxxinstance3->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user1->id, 'roleid'=>$studentrole->id, 'contextid'=>$context3->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user1->id, 'roleid'=>$studentrole->id, 'contextid'=>$context3->id)));
         $this->assertEquals(1, $DB->count_records('role_assignments', array('contextid'=>$context3->id)));
 
 
@@ -187,10 +187,10 @@ class enrol_manual_lib_testcase extends advanced_testcase {
         $this->assertEquals(3, $DB->count_records('user_enrolments', array('enrolid'=>$maninstance4->id)));
         $this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid'=>$xxxinstance4->id)));
         $this->assertEquals(0, $DB->count_records('user_enrolments', array('enrolid'=>$xxxinstance4b->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user1->id, 'roleid'=>$studentrole->id, 'contextid'=>$context4->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user1->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context4->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user2->id, 'roleid'=>$studentrole->id, 'contextid'=>$context4->id)));
-        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>$DB->sql_empty(), 'userid'=>$user4->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context4->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user1->id, 'roleid'=>$studentrole->id, 'contextid'=>$context4->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user1->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context4->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user2->id, 'roleid'=>$studentrole->id, 'contextid'=>$context4->id)));
+        $this->assertTrue($DB->record_exists('role_assignments', array('itemid'=>0, 'component'=>'', 'userid'=>$user4->id, 'roleid'=>$teacherrole->id, 'contextid'=>$context4->id)));
         $this->assertEquals(4, $DB->count_records('role_assignments', array('contextid'=>$context4->id)));
 
 
index fa3125c..3d16b0e 100644 (file)
@@ -569,7 +569,7 @@ function enrol_meta_sync($courseid = NULL, $verbose = false) {
         }
         $enabled[$k] = 'enrol_'.$v;
     }
-    $enabled[] = $DB->sql_empty(); // manual assignments are replicated too
+    $enabled[] = ''; // manual assignments are replicated too
 
     $onecourse = $courseid ? "AND e.courseid = :courseid" : "";
     list($enabled, $params) = $DB->get_in_or_equal($enabled, SQL_PARAMS_NAMED, 'e');
diff --git a/filter/glossary/yui/autolinker/autolinker.js b/filter/glossary/yui/autolinker/autolinker.js
deleted file mode 100644 (file)
index cb4129c..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-YUI.add('moodle-filter_glossary-autolinker', function(Y) {
-
-    var AUTOLINKERNAME = 'Glossary filter autolinker',
-        URL = 'url',
-        POPUPNAME = 'name',
-        POPUPOPTIONS = 'options',
-        TITLE = 'title',
-        WIDTH = 'width',
-        HEIGHT = 'height',
-        MENUBAR = 'menubar',
-        LOCATION = 'location',
-        SCROLLBARS = 'scrollbars',
-        RESIZEABLE = 'resizable',
-        TOOLBAR = 'toolbar',
-        STATUS = 'status',
-        DIRECTORIES = 'directories',
-        FULLSCREEN = 'fullscreen',
-        DEPENDENT = 'dependent';
-
-    var AUTOLINKER = function() {
-        AUTOLINKER.superclass.constructor.apply(this, arguments);
-    };
-    Y.extend(AUTOLINKER, Y.Base, {
-        overlay : null,
-        initializer : function(config) {
-            var popupname = this.get(POPUPNAME),
-                popupoptions = this.get(POPUPOPTIONS),
-                self = this;
-            Y.delegate('click', function(e){
-
-                e.preventDefault();
-
-                //display a progress indicator
-                var title = '';
-                var content = Y.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" /></div>');
-                var o = new Y.Overlay({
-                    headerContent :  title,
-                    bodyContent : content
-                });
-                self.overlay = o;
-                o.render(Y.one(document.body));
-
-                //Switch over to the ajax url and fetch the glossary item
-                var fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
-                var cfg = {
-                    method: 'get',
-                    context : self,
-                    on: {
-                        success: function(id, o, node) {
-                            this.display_callback(o.responseText);
-                        },
-                        failure: function(id, o, node) {
-                            var debuginfo = o.statusText;
-                            if (M.cfg.developerdebug) {
-                                o.statusText += ' (' + fullurl + ')';
-                            }
-                            this.display_callback('bodyContent',debuginfo);
-                        }
-                    }
-                };
-                Y.io(fullurl, cfg);
-
-            }, Y.one(document.body), 'a.glossary.autolink.concept');
-        },
-        display_callback : function(content) {
-            try {
-                var data = Y.JSON.parse(content);
-                if (data.success){
-                    this.overlay.hide(); //hide progress indicator
-
-                    for (key in data.entries) {
-                        definition = data.entries[key].definition + data.entries[key].attachments
-                        var alertpanel = new M.core.alert({title:data.entries[key].concept, message:definition, lightbox:false});
-                        Y.Node.one('#id_yuialertconfirm-' + alertpanel.COUNT).focus();
-                    }
-
-                    return true;
-                } else if (data.error) {
-                    new M.core.ajaxException(data);
-                }
-            }catch(e) {
-                new M.core.exception(e);
-            }
-            return false;
-        }
-    }, {
-        NAME : AUTOLINKERNAME,
-        ATTRS : {
-            url : {
-                validator : Y.Lang.isString,
-                value : M.cfg.wwwroot+'/mod/glossary/showentry.php'
-            },
-            name : {
-                validator : Y.Lang.isString,
-                value : 'glossaryconcept'
-            },
-            options : {
-                getter : function(val) {
-                    return {
-                        width : this.get(WIDTH),
-                        height : this.get(HEIGHT),
-                        menubar : this.get(MENUBAR),
-                        location : this.get(LOCATION),
-                        scrollbars : this.get(SCROLLBARS),
-                        resizable : this.get(RESIZEABLE),
-                        toolbar : this.get(TOOLBAR),
-                        status : this.get(STATUS),
-                        directories : this.get(DIRECTORIES),
-                        fullscreen : this.get(FULLSCREEN),
-                        dependent : this.get(DEPENDENT)
-                    }
-                },
-                readOnly : true
-            },
-            width : {value : 600},
-            height : {value : 450},
-            menubar : {value : false},
-            location : {value : false},
-            scrollbars : {value : true},
-            resizable : {value : true},
-            toolbar : {value : true},
-            status : {value : true},
-            directories : {value : false},
-            fullscreen : {value : false},
-            dependent : {value : true}
-        }
-    });
-
-    M.filter_glossary = M.filter_glossary || {};
-    M.filter_glossary.init_filter_autolinking = function(config) {
-        return new AUTOLINKER(config);
-    }
-
-}, '@VERSION@', {requires:['base','node','io-base','json-parse','event-delegate','overlay','moodle-core-notification']});
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-coverage.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-coverage.js
new file mode 100644 (file)
index 0000000..320c8c0
Binary files /dev/null and b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-coverage.js differ
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js
new file mode 100644 (file)
index 0000000..467c6a3
Binary files /dev/null and b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js differ
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js
new file mode 100644 (file)
index 0000000..303c17d
Binary files /dev/null and b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js differ
diff --git a/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js
new file mode 100644 (file)
index 0000000..467c6a3
Binary files /dev/null and b/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js differ
diff --git a/filter/glossary/yui/src/autolinker/build.json b/filter/glossary/yui/src/autolinker/build.json
new file mode 100644 (file)
index 0000000..e6e0e90
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "name": "moodle-filter_glossary-autolinker",
+  "builds": {
+    "moodle-filter_glossary-autolinker": {
+      "jsfiles": [
+        "autolinker.js"
+      ]
+    }
+  }
+}
diff --git a/filter/glossary/yui/src/autolinker/js/autolinker.js b/filter/glossary/yui/src/autolinker/js/autolinker.js
new file mode 100644 (file)
index 0000000..8d552cc
--- /dev/null
@@ -0,0 +1,129 @@
+var AUTOLINKERNAME = 'Glossary filter autolinker',
+    WIDTH = 'width',
+    HEIGHT = 'height',
+    MENUBAR = 'menubar',
+    LOCATION = 'location',
+    SCROLLBARS = 'scrollbars',
+    RESIZEABLE = 'resizable',
+    TOOLBAR = 'toolbar',
+    STATUS = 'status',
+    DIRECTORIES = 'directories',
+    FULLSCREEN = 'fullscreen',
+    DEPENDENT = 'dependent',
+    AUTOLINKER;
+
+AUTOLINKER = function() {
+    AUTOLINKER.superclass.constructor.apply(this, arguments);
+};
+Y.extend(AUTOLINKER, Y.Base, {
+    overlay : null,
+    initializer : function() {
+        var self = this;
+        Y.delegate('click', function(e){
+            e.preventDefault();
+
+            //display a progress indicator
+            var title = '',
+                content = Y.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" /></div>'),
+                o = new Y.Overlay({
+                    headerContent :  title,
+                    bodyContent : content
+                }),
+                fullurl,
+                cfg;
+            self.overlay = o;
+            o.render(Y.one(document.body));
+
+            //Switch over to the ajax url and fetch the glossary item
+            fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
+            cfg = {
+                method: 'get',
+                context : self,
+                on: {
+                    success: function(id, o) {
+                        this.display_callback(o.responseText);
+                    },
+                    failure: function(id, o) {
+                        var debuginfo = o.statusText;
+                        if (M.cfg.developerdebug) {
+                            o.statusText += ' (' + fullurl + ')';
+                        }
+                        this.display_callback('bodyContent',debuginfo);
+                    }
+                }
+            };
+            Y.io(fullurl, cfg);
+
+        }, Y.one(document.body), 'a.glossary.autolink.concept');
+    },
+    display_callback : function(content) {
+        var data,
+            key,
+            alertpanel;
+        try {
+            data = Y.JSON.parse(content);
+            if (data.success){
+                this.overlay.hide(); //hide progress indicator
+
+                for (key in data.entries) {
+                    definition = data.entries[key].definition + data.entries[key].attachments;
+                    alertpanel = new M.core.alert({title:data.entries[key].concept, message:definition, lightbox:false});
+                    Y.Node.one('#id_yuialertconfirm-' + alertpanel.COUNT).focus();
+                }
+
+                return true;
+            } else if (data.error) {
+                new M.core.ajaxException(data);
+            }
+        } catch(e) {
+            new M.core.exception(e);
+        }
+        return false;
+    }
+}, {
+    NAME : AUTOLINKERNAME,
+    ATTRS : {
+        url : {
+            validator : Y.Lang.isString,
+            value : M.cfg.wwwroot+'/mod/glossary/showentry.php'
+        },
+        name : {
+            validator : Y.Lang.isString,
+            value : 'glossaryconcept'
+        },
+        options : {
+            getter : function() {
+                return {
+                    width : this.get(WIDTH),
+                    height : this.get(HEIGHT),
+                    menubar : this.get(MENUBAR),
+                    location : this.get(LOCATION),
+                    scrollbars : this.get(SCROLLBARS),
+                    resizable : this.get(RESIZEABLE),
+                    toolbar : this.get(TOOLBAR),
+                    status : this.get(STATUS),
+                    directories : this.get(DIRECTORIES),
+                    fullscreen : this.get(FULLSCREEN),
+                    dependent : this.get(DEPENDENT)
+                };
+            },
+            readOnly : true
+        },
+        width : {value : 600},
+        height : {value : 450},
+        menubar : {value : false},
+        location : {value : false},
+        scrollbars : {value : true},
+        resizable : {value : true},
+        toolbar : {value : true},
+        status : {value : true},
+        directories : {value : false},
+        fullscreen : {value : false},
+        dependent : {value : true}
+    }
+});
+
+M.filter_glossary = M.filter_glossary || {};
+M.filter_glossary.init_filter_autolinking = function(config) {
+    return new AUTOLINKER(config);
+};
diff --git a/filter/glossary/yui/src/autolinker/meta/autolinker.json b/filter/glossary/yui/src/autolinker/meta/autolinker.json
new file mode 100644 (file)
index 0000000..f97fb16
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "moodle-filter_glossary-autolinker": {
+    "requires": [
+        "base",
+        "node",
+        "io-base",
+        "json-parse",
+        "event-delegate",
+        "overlay",
+        "moodle-core-notification"
+    ]
+  }
+}
diff --git a/grade/externallib.php b/grade/externallib.php
new file mode 100644 (file)
index 0000000..a39aceb
--- /dev/null
@@ -0,0 +1,293 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * External assign API
+ *
+ * @package    core_grade
+ * @since      Moodle 2.5
+ * @copyright  2013 Paul Charsley
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die;
+
+require_once("$CFG->libdir/externallib.php");
+require_once("$CFG->dirroot/grade/grading/lib.php");
+
+/**
+ * core grade functions
+ */
+class core_grade_external extends external_api {
+
+    /**
+     * Describes the parameters for get_definitions
+     * @return external_function_parameters
+     * @since Moodle 2.5
+     */
+    public static function get_definitions_parameters () {
+        return new external_function_parameters(
+            array(
+                'cmids' => new external_multiple_structure(
+                    new external_value(PARAM_INT, 'course module id'), '1 or more course module ids'),
+                'areaname' => new external_value(PARAM_AREA, 'area name'),
+                'activeonly' => new external_value(PARAM_BOOL, 'Only the active method', VALUE_DEFAULT, 0)
+            )
+        );
+    }
+
+    /**
+     * Returns the definitions for the requested course module ids
+     * @param array of ints $cmids
+     * @param string $areaname
+     * @param boolean $activeonly default is false, if true, only the active method is returned
+     * @return array of areas with definitions for each requested course module id
+     * @since Moodle 2.5
+     */
+    public static function get_definitions ($cmids, $areaname, $activeonly = false) {
+        global $DB, $CFG;
+        require_once("$CFG->dirroot/grade/grading/form/lib.php");
+        $params = self::validate_parameters(self::get_definitions_parameters(),
+                      array('cmids' => $cmids,
+                            'areaname' => $areaname,
+                            'activeonly' => $activeonly));
+        $warnings = array();
+        $areas = array();
+        foreach ($params['cmids'] as $cmid) {
+            $context = context_module::instance($cmid);
+            try {
+                self::validate_context($context);
+            } catch (Exception $e) {
+                $warnings[] = array(
+                    'item' => 'module',
+                    'itemid' => $cmid,
+                    'message' => 'No access rights in module context',
+                    'warningcode' => '1'
+                );
+                continue;
+            }
+            // Check if the user has managegradingforms capability.
+            $isgradingmethodmanager = false;
+            if (has_capability('moodle/grade:managegradingforms', $context)) {
+                $isgradingmethodmanager = true;
+            }
+            $module = get_coursemodule_from_id('', $cmid, 0, false, MUST_EXIST);
+            $componentname = "mod_".$module->modname;
+
+            // Get the grading manager.
+            $gradingmanager = get_grading_manager($context, $componentname, $params['areaname']);
+            // Get the controller for each grading method.
+            $methods = array();
+            if ($params['activeonly'] == true) {
+                $methods[] = $gradingmanager->get_active_method();
+            } else {
+                $methods = array_keys($gradingmanager->get_available_methods(false));
+            }
+
+            $area = array();
+            $area['cmid'] = $cmid;
+            $area['contextid'] = $context->id;
+            $area['component'] = $componentname;
+            $area['activemethod'] = $gradingmanager->get_active_method();
+            $area['definitions'] = array();
+
+            foreach ($methods as $method) {
+                $controller = $gradingmanager->get_controller($method);
+                $def = $controller->get_definition(true);
+                if ($def == false) {
+                    continue;
+                }
+                if ($isgradingmethodmanager == false) {
+                    $isviewable = true;
+                    if ($def->status != gradingform_controller::DEFINITION_STATUS_READY) {
+                        $warnings[] = array(
+                            'item' => 'module',
+                            'itemid' => $cmid,
+                            'message' => 'Capability moodle/grade:managegradingforms required to view draft definitions',
+                            'warningcode' => '1'
+                        );
+                        $isviewable = false;
+                    }
+                    if (!empty($def->options)) {
+                        $options = json_decode($def->options);
+                        if (isset($options->alwaysshowdefinition) &&
+                                $options->alwaysshowdefinition == 0) {
+                            $warnings[] = array(
+                                'item' => 'module',
+                                'itemid' => $cmid,
+                                'message' => 'Capability moodle/grade:managegradingforms required to preview definition',
+                                'warningcode' => '1'
+                            );
+                            $isviewable = false;
+                        }
+                    }
+                    if ($isviewable == false) {
+                        continue;
+                    }
+                }
+                $definition = array();
+                $definition['id'] = $def->id;
+                $definition['method'] = $method;
+                $definition['name'] = $def->name;
+                $definition['description'] = $def->description;
+                $definition['descriptionformat'] = $def->descriptionformat;
+                $definition['status'] = $def->status;
+                $definition['copiedfromid'] = $def->copiedfromid;
+                $definition['timecreated'] = $def->timecreated;
+                $definition['usercreated'] = $def->usercreated;
+                $definition['timemodified'] = $def->timemodified;
+                $definition['usermodified'] = $def->usermodified;
+                $definition['timecopied'] = $def->timecopied;
+                // Format the description text field.
+                $formattedtext = external_format_text($definition['description'],
+                                                      $definition['descriptionformat'],
+                                                      $context->id,
+                                                      $componentname,
+                                                      'description',
+                                                      $def->id);
+                $definition['description'] = $formattedtext[0];
+                $definition['descriptionformat'] = $formattedtext[1];
+
+                $details = $controller->get_external_definition_details();
+                $items = array();
+                foreach ($details as $key => $value) {
+                    $items[$key] = self::format_text($def->{$key}, $context->id, $componentname, $def->id);
+                }
+                $definition[$method] = $items;
+                $area['definitions'][] = $definition;
+            }
+            $areas[] = $area;
+        }
+        $result = array(
+            'areas' => $areas,
+            'warnings' => $warnings
+        );
+        return $result;
+    }
+
+    /**
+     * Recursively processes all elements in an array and runs external_format_text()on
+     * all elements which have a text field and associated format field with a key name
+     * that ends with the text 'format'. The modified array is returned.
+     * @param array $items the array to be processed
+     * @param int $contextid
+     * @param string $componentname
+     * @param int $itemid
+     * @see external_format_text in lib/externallib.php
+     * @return array the input array with all fields formatted
+     */
+    private static function format_text($items, $contextid, $componentname, $itemid) {
+        $formatkeys = array();
+        foreach ($items as $key => $value) {
+            if (!is_array($value) && substr_compare($key, 'format', -6, 6) === 0) {
+                $formatkeys[] = $key;
+            }
+        }
+        foreach ($formatkeys as $formatkey) {
+            $descriptionkey = substr($formatkey, 0, -6);
+            $formattedtext = external_format_text($items[$descriptionkey],
+                                                  $items[$formatkey],
+                                                  $contextid,
+                                                  $componentname,
+                                                  'description',
+                                                  $itemid);
+            $items[$descriptionkey] = $formattedtext[0];
+            $items[$formatkey] = $formattedtext[1];
+        }
+        foreach ($items as $key => $value) {
+            if (is_array($value)) {
+                $items[$key] = self::format_text($value, $contextid, $componentname, $itemid);
+            }
+        }
+        return $items;
+    }
+
+    /**
+     * Creates a grading area
+     * @return external_single_structure
+     * @since  Moodle 2.5
+     */
+    private static function grading_area() {
+        return new external_single_structure(
+            array (
+                'cmid'    => new external_value(PARAM_INT, 'course module id'),
+                'contextid'  => new external_value(PARAM_INT, 'context id'),
+                'component' => new external_value(PARAM_TEXT, 'component name'),
+                'activemethod' => new external_value(PARAM_TEXT, 'active method', VALUE_OPTIONAL),
+                'definitions'  => new external_multiple_structure(self::definition(), 'definitions')
+            )
+        );
+    }
+
+    /**
+     * creates a grading form definition
+     * @return external_single_structure
+     * @since  Moodle 2.5
+     */
+    private static function definition() {
+        global $CFG;
+        $definition = array();
+        $definition['id']                = new external_value(PARAM_INT, 'definition id');
+        $definition['method']            = new external_value(PARAM_TEXT, 'method');
+        $definition['name']              = new external_value(PARAM_TEXT, 'name');
+        $definition['description']       = new external_value(PARAM_RAW, 'description');
+        $definition['descriptionformat'] = new external_format_value('description');
+        $definition['status']            = new external_value(PARAM_INT, 'status');
+        $definition['copiedfromid']      = new external_value(PARAM_INT, 'copied from id', VALUE_OPTIONAL);
+        $definition['timecreated']       = new external_value(PARAM_INT, 'creation time');
+        $definition['usercreated']       = new external_value(PARAM_INT, 'user who created definition');
+        $definition['timemodified']      = new external_value(PARAM_INT, 'last modified time');
+        $definition['usermodified']      = new external_value(PARAM_INT, 'user who modified definition');
+        $definition['timecopied']        = new external_value(PARAM_INT, 'time copied', VALUE_OPTIONAL);
+        foreach (self::get_grading_methods() as $method) {
+            require_once($CFG->dirroot.'/grade/grading/form/'.$method.'/lib.php');
+            $details  = call_user_func('gradingform_'.$method.'_controller::get_external_definition_details');
+            if ($details != null) {
+                $items = array();
+                foreach ($details as $key => $value) {
+                    $details[$key]->required = VALUE_OPTIONAL;
+                    $items[$key] = $value;
+                }
+                $definition[$method] = new external_single_structure($items, 'items', VALUE_OPTIONAL);
+            }
+        }
+        return new external_single_structure($definition);
+    }
+
+    /**
+     * Describes the get_definitions return value
+     * @return external_single_structure
+     * @since Moodle 2.5
+     */
+    public static function get_definitions_returns() {
+        return new external_single_structure(
+            array(
+                'areas' => new external_multiple_structure(self::grading_area(), 'list of grading areas'),
+                'warnings' => new external_warnings()
+            )
+        );
+    }
+
+    /**
+     * @return array of available grading methods
+     * @since Moodle 2.5
+     */
+    private static function get_grading_methods() {
+        $methods = array_keys(grading_manager::available_methods(false));
+        return $methods;
+    }
+
+}
index 15ef0d7..b6b9ec2 100644 (file)
@@ -643,6 +643,40 @@ class gradingform_guide_controller extends gradingform_controller {
         }
         return $returnvalue;
     }
+
+    /**
+     * @return array An array containing 2 key/value pairs which hold the external_multiple_structure
+     * for the 'guide_criteria' and the 'guide_comment'.
+     * @see gradingform_controller::get_external_definition_details()
+     * @since Moodle 2.5
+     */
+    public static function get_external_definition_details() {
+        $guide_criteria = new external_multiple_structure(
+                              new external_single_structure(
+                                  array(
+                                      'id'   => new external_value(PARAM_INT, 'criterion id'),
+                                      'sortorder' => new external_value(PARAM_INT, 'sortorder'),
+                                      'description' => new external_value(PARAM_RAW, 'description', VALUE_OPTIONAL),
+                                      'descriptionformat' => new external_format_value('description', VALUE_OPTIONAL),
+                                      'shortname' => new external_value(PARAM_TEXT, 'description'),
+                                      'descriptionmarkers' => new external_value(PARAM_RAW, 'markers description', VALUE_OPTIONAL),
+                                      'descriptionmarkersformat' => new external_format_value('descriptionmarkers', VALUE_OPTIONAL),
+                                      'maxscore' => new external_value(PARAM_FLOAT, 'maximum score')
+                                      )
+                                  )
+        );
+        $guide_comment = new external_multiple_structure(
+                              new external_single_structure(
+                                  array(
+                                      'id'   => new external_value(PARAM_INT, 'criterion id'),
+                                      'sortorder' => new external_value(PARAM_INT, 'sortorder'),
+                                      'description' => new external_value(PARAM_RAW, 'description', VALUE_OPTIONAL),
+                                      'descriptionformat' => new external_format_value('description', VALUE_OPTIONAL)
+                                   )
+                              ), 'comments', VALUE_OPTIONAL
+        );
+        return array('guide_criteria' => $guide_criteria, 'guide_comment' => $guide_comment);
+    }
 }
 
 /**
index c096870..6c8c8ac 100644 (file)
@@ -642,6 +642,22 @@ abstract class gradingform_controller {
         }
         return $this->graderange;
     }
+
+    /**
+     * Overridden by sub classes that wish to make definition details available to web services.
+     * When not overridden, only definition data common to all grading methods is made available.
+     * When overriding, the return value should be an array containing one or more key/value pairs.
+     * These key/value pairs should match the definition returned by the get_definition() function.
+     * For examples, look at:
+     *    $gradingform_rubric_controller->get_external_definition_details()
+     *    $gradingform_guide_controller->get_external_definition_details()
+     * @return array An array of one or more key/value pairs containing the external_multiple_structure/s
+     * corresponding to the definition returned by $controller->get_definition()
+     * @since Moodle 2.5
+     */
+    public static function get_external_definition_details() {
+        return null;
+    }
 }
 
 /**
index 22ce4c9..7f08a4e 100644 (file)
@@ -654,6 +654,36 @@ class gradingform_rubric_controller extends gradingform_controller {
         }
         return $returnvalue;
     }
+
+    /**
+     * @return array An array containing a single key/value pair with the 'rubric_criteria' external_multiple_structure.
+     * @see gradingform_controller::get_external_definition_details()
+     * @since Moodle 2.5
+     */
+    public static function get_external_definition_details() {
+        $rubric_criteria = new external_multiple_structure(
+            new external_single_structure(
+                array(
+                   'id'   => new external_value(PARAM_INT, 'criterion id'),
+                   'sortorder' => new external_value(PARAM_INT, 'sortorder'),
+                   'description' => new external_value(PARAM_RAW, 'description', VALUE_OPTIONAL),
+                   'descriptionformat' => new external_format_value('description', VALUE_OPTIONAL),
+                   'levels' => new external_multiple_structure(
+                                   new external_single_structure(
+                                       array(
+                                        'id' => new external_value(PARAM_INT, 'level id'),
+                                        'score' => new external_value(PARAM_FLOAT, 'score'),
+                                        'definition' => new external_value(PARAM_RAW, 'definition', VALUE_OPTIONAL),
+                                        'definitionformat' => new external_format_value('definition', VALUE_OPTIONAL)
+                                       )
+                                  ), 'levels', VALUE_OPTIONAL
+                              )
+                   )
+              ), 'definition details', VALUE_OPTIONAL
+        );
+        return array('rubric_criteria' => $rubric_criteria);
+    }
+
 }
 
 /**
diff --git a/grade/tests/externallib_test.php b/grade/tests/externallib_test.php
new file mode 100644 (file)
index 0000000..a1cbfc5
--- /dev/null
@@ -0,0 +1,184 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+defined('MOODLE_INTERNAL') || die();
+
+global $CFG;
+
+require_once($CFG->dirroot . '/webservice/tests/helpers.php');
+
+/**
+ * External core grade functions unit tests
+ *
+ * @package core_grade
+ * @category external
+ * @copyright 2013 Paul Charsley
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class core_grade_external_testcase extends externallib_advanced_testcase {
+
+    /**
+     * Tests set up
+     */
+    protected function setUp() {
+        global $CFG;
+        require_once($CFG->dirroot . '/grade/externallib.php');
+    }
+
+    /**
+     * Test get_definitions
+     */
+    public function test_get_definitions () {
+        global $DB, $CFG, $USER;
+
+        $this->resetAfterTest(true);
+        // Create a course and assignment.
+        $coursedata['idnumber'] = 'idnumbercourse';
+        $coursedata['fullname'] = 'Lightwork Course';
+        $coursedata['summary'] = 'Lightwork Course description';
+        $coursedata['summaryformat'] = FORMAT_MOODLE;
+        $course = self::getDataGenerator()->create_course($coursedata);
+
+        $assigndata['course'] = $course->id;
+        $assigndata['name'] = 'lightwork assignment';
+
+        $cm = self::getDataGenerator()->create_module('assign', $assigndata);
+
+        // Create manual enrolment record.
+        $manual_enrol_data['enrol'] = 'manual';
+        $manual_enrol_data['status'] = 0;
+        $manual_enrol_data['courseid'] = $course->id;
+        $enrolid = $DB->insert_record('enrol', $manual_enrol_data);
+
+        // Create a teacher and give them capabilities.
+        $coursecontext = context_course::instance($course->id);
+        $roleid = $this->assignUserCapability('moodle/course:viewparticipants', $coursecontext->id, 3);
+        $modulecontext = context_module::instance($cm->id);
+        $this->assignUserCapability('mod/assign:grade', $modulecontext->id, $roleid);
+
+        // Create the teacher's enrolment record.
+        $user_enrolment_data['status'] = 0;
+        $user_enrolment_data['enrolid'] = $enrolid;
+        $user_enrolment_data['userid'] = $USER->id;
+        $DB->insert_record('user_enrolments', $user_enrolment_data);
+
+        // Create a grading area.
+        $gradingarea = array(
+            'contextid' => $modulecontext->id,
+            'component' => 'mod_assign',
+            'areaname' => 'submissions',
+            'activemethod' => 'rubric'
+        );
+        $areaid = $DB->insert_record('grading_areas', $gradingarea);
+
+        // Create a rubric grading definition.
+        $rubricdefinition = array (
+            'areaid' => $areaid,
+            'method' => 'rubric',
+            'name' => 'test',
+            'status' => 20,
+            'copiedfromid' => 1,
+            'timecreated' => 1,
+            'usercreated' => $USER->id,
+            'timemodified' => 1,
+            'usermodified' => $USER->id,
+            'timecopied' => 0
+        );
+        $definitionid = $DB->insert_record('grading_definitions', $rubricdefinition);
+
+        // Create a criterion with levels.
+        $rubriccriteria1 = array (
+            'definitionid' => $definitionid,
+            'sortorder' => 1,
+            'description' => 'Demonstrate an understanding of disease control',
+            'descriptionformat' => 0
+        );
+        $criterionid1 = $DB->insert_record('gradingform_rubric_criteria', $rubriccriteria1);
+        $rubriclevel1 = array (
+            'criterionid' => $criterionid1,
+            'score' => 5,
+            'definition' => 'pass',
+            'definitionformat' => 0
+        );
+        $DB->insert_record('gradingform_rubric_levels', $rubriclevel1);
+        $rubriclevel2 = array (
+            'criterionid' => $criterionid1,
+            'score' => 10,
+            'definition' => 'excellent',
+            'definitionformat' => 0
+        );
+        $DB->insert_record('gradingform_rubric_levels', $rubriclevel2);
+
+        // Create a second criterion with levels.
+        $rubriccriteria2 = array (
+            'definitionid' => $definitionid,
+            'sortorder' => 2,
+            'description' => 'Demonstrate an understanding of brucellosis',
+            'descriptionformat' => 0
+        );
+        $criterionid2 = $DB->insert_record('gradingform_rubric_criteria', $rubriccriteria2);
+        $rubriclevel1 = array (
+            'criterionid' => $criterionid2,
+            'score' => 5,
+            'definition' => 'pass',
+            'definitionformat' => 0
+        );
+        $DB->insert_record('gradingform_rubric_levels', $rubriclevel1);
+        $rubriclevel2 = array (
+            'criterionid' => $criterionid2,
+            'score' => 10,
+            'definition' => 'excellent',
+            'definitionformat' => 0
+        );
+        $DB->insert_record('gradingform_rubric_levels', $rubriclevel2);
+
+        // Call the external function.
+        $cmids = array ($cm->id);
+        $areaname = 'submissions';
+        $result = core_grade_external::get_definitions($cmids, $areaname);
+
+        $this->assertEquals(1, count($result['areas']));
+        $this->assertEquals(1, count($result['areas'][0]['definitions']));
+        $definition = $result['areas'][0]['definitions'][0];
+
+        $this->assertEquals($rubricdefinition['method'], $definition['method']);
+        $this->assertEquals($USER->id, $definition['usercreated']);
+
+        require_once("$CFG->dirroot/grade/grading/lib.php");
+        require_once($CFG->dirroot.'/grade/grading/form/'.$rubricdefinition['method'].'/lib.php');
+
+        $gradingmanager = get_grading_manager($areaid);
+
+        $this->assertEquals(1, count($definition[$rubricdefinition['method']]));
+
+        $rubricdetails = $definition[$rubricdefinition['method']];
+        $details = call_user_func('gradingform_'.$rubricdefinition['method'].'_controller::get_external_definition_details');
+
+        $this->assertEquals(2, count($rubricdetails[key($details)]));
+
+        $found = false;
+        foreach ($rubricdetails[key($details)] as $criterion) {
+            if ($criterion['id'] == $criterionid1) {
+                $this->assertEquals($rubriccriteria1['description'], $criterion['description']);
+                $this->assertEquals(2, count($criterion['levels']));
+                $found = true;
+                break;
+            }
+        }
+        $this->assertTrue($found);
+    }
+
+}
index 98f2c9d..46f0137 100644 (file)
@@ -67,13 +67,11 @@ class group_form extends moodleform {
         $mform->addHelpButton('enrolmentkey', 'enrolmentkey', 'group');
         $mform->setType('enrolmentkey', PARAM_RAW);
 
-        if (!empty($CFG->gdversion)) {
-            $options = array(get_string('no'), get_string('yes'));
-            $mform->addElement('select', 'hidepicture', get_string('hidepicture'), $options);
+        $options = array(get_string('no'), get_string('yes'));
+        $mform->addElement('select', 'hidepicture', get_string('hidepicture'), $options);
 
-            $mform->addElement('filepicker', 'imagefile', get_string('newpicture', 'group'));
-            $mform->addHelpButton('imagefile', 'newpicture', 'group');
-        }
+        $mform->addElement('filepicker', 'imagefile', get_string('newpicture', 'group'));
+        $mform->addHelpButton('imagefile', 'newpicture', 'group');
 
         $mform->addElement('hidden','id');
         $mform->setType('id', PARAM_INT);
index bd0da5c..b8d13b0 100644 (file)
@@ -324,20 +324,18 @@ function groups_update_group_icon($group, $data, $editform) {
     $context = context_course::instance($group->courseid, MUST_EXIST);
 
     //TODO: it would make sense to allow picture deleting too (skodak)
-    if (!empty($CFG->gdversion)) {
-        if ($iconfile = $editform->save_temp_file('imagefile')) {
-            if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
-                $DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
-                $group->picture = 1;
-            } else {
-                $fs->delete_area_files($context->id, 'group', 'icon', $group->id);
-                $DB->set_field('groups', 'picture', 0, array('id'=>$group->id));
-                $group->picture = 0;
-            }
-            @unlink($iconfile);
-            // Invalidate the group data as we've updated the group record.
-            cache_helper::invalidate_by_definition('core', 'groupdata', array(), array($group->courseid));
+    if ($iconfile = $editform->save_temp_file('imagefile')) {
+        if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
+            $DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
+            $group->picture = 1;
+        } else {
+            $fs->delete_area_files($context->id, 'group', 'icon', $group->id);
+            $DB->set_field('groups', 'picture', 0, array('id'=>$group->id));
+            $group->picture = 0;
         }
+        @unlink($iconfile);
+        // Invalidate the group data as we've updated the group record.
+        cache_helper::invalidate_by_definition('core', 'groupdata', array(), array($group->courseid));
     }
 }
 
index 9bfba65..4d1bdc4 100644 (file)
@@ -224,7 +224,6 @@ $string['configforceloginforprofiles'] = 'This setting forces people to login as
 $string['configfrontpage'] = 'The items selected above will be displayed on the site\'s front page.';
 $string['configfrontpageloggedin'] = 'The items selected above will be displayed on the site\'s front page when a user is logged in.';
 $string['configfullnamedisplay'] = 'This defines how names are shown when they are displayed in full. For most mono-lingual sites the most efficient setting is "First name + Surname", but you may choose to hide surnames altogether, or to leave it up to the current language pack to decide (some languages have different conventions).';
-$string['configgdversion'] = 'Indicate the version of GD that is installed.  The version shown by default is the one that has been auto-detected.  Don\'t change this unless you really know what you\'re doing.';
 $string['configgeoipfile'] = 'Location of GeoIP City binary data file. This file is not part of Moodle distribution and must be obtained separately from <a href="http://www.maxmind.com/">MaxMind</a>. You can either buy a commercial version or use the free version.<br />Simply download <a href="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz" >http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz</a> and extract it into "{$a}" directory on your server.';
 $string['configgetremoteaddrconf'] = 'If your server is behind a reverse proxy, you can use this setting to specify which HTTP headers can be trusted to contain the remote IP address. The headers are read in order, using the first one that is available.';
 $string['configgradebookroles'] = 'This setting allows you to control who appears on the gradebook.  Users need to have at least one of these roles in a course to be shown in the gradebook for that course.';
@@ -546,7 +545,7 @@ $string['frontpageroles'] = 'Front page roles';
 $string['frontpagesettings'] = 'Front page settings';
 $string['fullnamedisplay'] = 'Full name format';
 $string['gdrecommended'] = 'GD extension is used for conversion of images, some features such as user profile images will not be available if missing.';
-$string['gdversion'] = 'GD version';
+$string['gdrequired'] = 'The GD extension is now required by Moodle for image conversion.';
 $string['generalsettings'] = 'General settings';
 $string['geoipfile'] = 'GeoIP city data file';
 $string['getremoteaddrconf'] = 'Logged IP address source';
index eefb901..066fb30 100644 (file)
@@ -47,7 +47,8 @@ $string['hideblock'] = 'Hide {$a} block';
 $string['hidedockpanel'] = 'Hide the dock panel';
 $string['hidepanel'] = 'Hide panel';
 $string['moveblock'] = 'Move {$a} block';
-$string['moveblockhere'] = 'Move block here';
+$string['moveblockafter'] = 'Move block to after {$a} block';
+$string['moveblockbefore'] = 'Move block to before {$a} block';
 $string['movingthisblockcancel'] = 'Moving this block ({$a})';
 $string['onthispage'] = 'On this page';
 $string['pagetypes'] = 'Page types';
index aceb61f..e936e0d 100644 (file)
@@ -226,18 +226,6 @@ $string['fileuploadshelp'] = '<p>File uploading seems to be disabled on your ser
 <p>To enable file uploading you (or your system administrator) will need to 
    edit the main php.ini file on your system and change the setting for 
    <b>file_uploads</b> to \'1\'.</p>';
-$string['gdversion'] = 'GD version';
-$string['gdversionerror'] = 'The GD library should be present to process and create images';
-$string['gdversionhelp'] = '<p>Your server does not seem to have GD installed.</p>
-
-<p>GD is a library that is required by PHP to allow Moodle to process images 
-   (such as the user profile icons) and to create new images (such as 
-   the log graphs).  Moodle will still work without GD - these features 
-   will just not be available to you.</p>
-
-<p>To add GD to PHP under Unix, compile PHP using the --with-gd parameter.</p>
-
-<p>Under Windows you can usually edit php.ini and uncomment the line referencing php_gd2.dll.</p>';
 $string['globalsquotes'] = 'Insecure handling of globals';
 $string['globalsquoteserror'] = 'Fix your PHP settings: disable register_globals and/or enable magic_quotes_gpc';
 $string['globalsquoteshelp'] = '<p>Combination of disabled magic quotes GPC and enabled register globals both at the same time is not recommended.</p>
index fe13216..a2248ed 100644 (file)
@@ -731,10 +731,6 @@ $string['fullnameuser'] = 'User full name';
 $string['fullprofile'] = 'Full profile';
 $string['fullsitename'] = 'Full site name';
 $string['functiondisabled'] = 'That functionality is currently disabled';
-$string['gdneed'] = 'GD must be installed to see this graph';
-$string['gdnot'] = 'GD is not installed';
-$string['gd1'] = 'GD 1.x is installed';
-$string['gd2'] = 'GD 2.x is installed';
 $string['general'] = 'General';
 $string['geolocation'] = 'latitude - longitude';
 $string['gettheselogs'] = 'Get these logs';
@@ -973,6 +969,7 @@ $string['lookback'] = 'Look back';
 $string['mailadmins'] = 'Inform admins';
 $string['mailstudents'] = 'Inform students';
 $string['mailteachers'] = 'Inform teachers';
+$string['maincoursepage'] = 'Main course page';
 $string['makeafolder'] = 'Create folder';
 $string['makeeditable'] = 'If you make \'{$a}\' editable by the web server process (eg apache) then you could edit this file directly from this page';
 $string['makethismyhome'] = 'Make this my default home page';
@@ -1419,7 +1416,6 @@ $string['restoreusersprecheck'] = 'Checking user data';
 $string['restoreusersprecheckerror'] = 'Some problems were detected when checking user data';
 $string['restricted'] = 'Restricted';
 $string['returningtosite'] = 'Returning to this web site?';
-$string['returntomaincoursepage'] = 'Return to main course page';
 $string['returntooriginaluser'] = 'Return to {$a}';
 $string['revert'] = 'Revert';
 $string['role'] = 'Role';
index 4b7432d..7d17974 100644 (file)
@@ -1634,8 +1634,6 @@ function role_assign($roleid, $userid, $contextid, $component = '', $itemid = 0,
     }
 
     // Check for existing entry
-    // TODO: Revisit this sql_empty() use once Oracle bindings are improved. MDL-29765
-    $component = ($component === '') ? $DB->sql_empty() : $component;
     $ras = $DB->get_records('role_assignments', array('roleid'=>$roleid, 'contextid'=>$context->id, 'userid'=>$userid, 'component'=>$component, 'itemid'=>$itemid), 'id');
 
     if ($ras) {
@@ -1748,10 +1746,6 @@ function role_unassign_all(array $params, $subcontexts = false, $includemanual =
         }
     }
 
-    // TODO: Revisit this sql_empty() use once Oracle bindings are improved. MDL-29765
-    if (isset($params['component'])) {
-        $params['component'] = ($params['component'] === '') ? $DB->sql_empty() : $params['component'];
-    }
     $ras = $DB->get_records('role_assignments', $params);
     foreach($ras as $ra) {
         $DB->delete_records('role_assignments', array('id'=>$ra->id));
index 9ea8175..ad5d0b9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 
-@version V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+@version V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Latest version is available at http://adodb.sourceforge.net
  
   Released under both BSD license and Lesser GPL library license. 
index 4165715..26618ab 100644 (file)
@@ -8,7 +8,7 @@ $ADODB_INCLUDED_CSV = 1;
 
 /* 
 
-  V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 45dab49..3820d7d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 9de38b9..67c16d6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
  * Whenever there is any discrepancy between the two licenses, 
  * the BSD license will take precedence. 
@@ -41,6 +41,9 @@ if (!defined("DB_ERROR_SYNTAX")) {
        define("DB_ERROR_EXTENSION_NOT_FOUND",-25);
        define("DB_ERROR_NOSUCHDB",           -25);
        define("DB_ERROR_ACCESS_VIOLATION",   -26);
+       define("DB_ERROR_DEADLOCK",           -27);
+       define("DB_ERROR_STATEMENT_TIMEOUT",  -28);
+       define("DB_ERROR_SERIALIZATION_FAILURE", -29);
 }
 
 function adodb_errormsg($value)
@@ -91,16 +94,19 @@ function adodb_error($provider,$dbType,$errno)
 function adodb_error_pg($errormsg)
 {
        if (is_numeric($errormsg)) return (integer) $errormsg;
+       // Postgres has no lock-wait timeout.  The best we could do would be to set a statement timeout.
     static $error_regexps = array(
             '/(Table does not exist\.|Relation [\"\'].*[\"\'] does not exist|sequence does not exist|class ".+" not found)$/i' => DB_ERROR_NOSUCHTABLE,
-            '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/i'      => DB_ERROR_ALREADY_EXISTS,
-            '/divide by zero$/i'                     => DB_ERROR_DIVZERO,
+            '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key.*violates unique constraint/i'     => DB_ERROR_ALREADY_EXISTS,
+            '/database ".+" does not exist$/i'       => DB_ERROR_NOSUCHDB,
+            '/(divide|division) by zero$/i'          => DB_ERROR_DIVZERO,
             '/pg_atoi: error in .*: can\'t parse /i' => DB_ERROR_INVALID_NUMBER,
             '/ttribute [\"\'].*[\"\'] not found|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/i' => DB_ERROR_NOSUCHFIELD,
-            '/parser: parse error at or near \"/i'   => DB_ERROR_SYNTAX,
+            '/(parser: parse|syntax) error at or near \"/i'   => DB_ERROR_SYNTAX,
             '/referential integrity violation/i'     => DB_ERROR_CONSTRAINT,
-                       '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key.*violates unique constraint/i'     
-                                => DB_ERROR_ALREADY_EXISTS
+            '/deadlock detected$/i'                  => DB_ERROR_DEADLOCK,
+            '/canceling statement due to statement timeout$/i' => DB_ERROR_STATEMENT_TIMEOUT,
+            '/could not serialize access due to/i'   => DB_ERROR_SERIALIZATION_FAILURE
         );
        reset($error_regexps);
     while (list($regexp,$code) = each($error_regexps)) {
index 948c7c4..7099f03 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @version V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license.
  * Whenever there is any discrepancy between the two licenses,
  * the BSD license will take precedence.
index aec991f..8340a84 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index b00ae54..98bf160 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @version V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license.
  * Whenever there is any discrepancy between the two licenses,
  * the BSD license will take precedence.
index d774ea7..38957ad 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-  V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 28969f0..e2b3502 100644 (file)
@@ -6,7 +6,7 @@ global $ADODB_INCLUDED_LIB;
 $ADODB_INCLUDED_LIB = 1;
 
 /* 
-  @version V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  @version V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 77a6fae..23b18fc 100644 (file)
@@ -11,7 +11,7 @@ if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php');
 
 /* 
 
-  V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index ab2026b..317d573 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-       V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+       V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
          Released under both BSD license and Lesser GPL library license. 
          Whenever there is any discrepancy between the two licenses, 
          the BSD license will take precedence. 
index 9b26d0c..59bbce5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
  * Whenever there is any discrepancy between the two licenses, 
  * the BSD license will take precedence. 
index 8d0e40a..e1930f7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 897ba75..283c517 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-  V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index af89cf5..d0c2695 100644 (file)
@@ -14,7 +14,7 @@
 /**
        \mainpage
        
-        @version V5.17 17 May 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+        @version V5.18 3 Sep 2012   (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
 
        Released under both BSD license and Lesser GPL library license. You can choose which license
        you prefer.
                /**
                 * ADODB version as a string.
                 */
-               $ADODB_vers = 'V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
+               $ADODB_vers = 'V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
        
                /**
                 * Determines whether recordset->RecordCount() is used. 
                // create temp directories
                function createdir($hash, $debug)
                {
+               global $ADODB_CACHE_PERMS;
+               
                        $dir = $this->getdirname($hash);
                        if ($this->notSafeMode && !file_exists($dir)) {
                                $oldu = umask(0);
-                               if (!@mkdir($dir,0771)) if(!is_dir($dir) && $debug) ADOConnection::outp("Cannot create $dir");
+                               if (!@mkdir($dir, empty($ADODB_CACHE_PERMS) ? 0771 : $ADODB_CACHE_PERMS)) if(!is_dir($dir) && $debug) ADOConnection::outp("Cannot create $dir");
                                umask($oldu);
                        }
                
@@ -2848,6 +2850,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                function FieldCount(){ return 0;}
                function Init() {}
                function getIterator() {return new ADODB_Iterator_empty($this);}
+               function GetAssoc() {return array();}
        }
        
        //==============================================================================================        
@@ -3158,7 +3161,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                        $false = false;
                        return $false;
                }
-               $numIndex = isset($this->fields[0]);
+               $numIndex = isset($this->fields[0]) && isset($this->fields[1]);
                $results = array();
                
                if (!$first2cols && ($cols > 2 || $force_array)) {
@@ -3510,7 +3513,8 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                                $record[$k] = $this->fields[$v];
                        } else if (isset($this->fields[$k])) {
                                $record[$k] = $this->fields[$k];
-                       }
+                       } else
+                               $record[$k] = $this->fields[$v];
                }
                return $record;
        }
index c9efb1f..1787650 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 867eb77..15b8677 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 7aeb0c5..7aa9d97 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 6a8ebdf..d1632eb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
 Released under both BSD license and Lesser GPL library license. 
 Whenever there is any discrepancy between the two licenses, 
 the BSD license will take precedence. See License.txt. 
index 96108fc..682f254 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index ea9a521..6fb598b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 8f221e0..bf8655c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index f072d5a..bd863d9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-  V5.17 17 May 2012  (c) 2000-2012 (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012  (c) 2000-2012 (jlim#natsoft.com). All rights reserved.
 
   This is a version of the ADODB driver for DB2.  It uses the 'ibm_db2' PECL extension
   for PHP (http://pecl.php.net/package/ibm_db2), which in turn requires DB2 V8.2.2 or
index cf8d0b3..12a4883 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 8f699a1..b84d8b8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index ef08310..f5af4d1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+ @version V5.18 3 Sep 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
  Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 2104159..f09ed14 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index f05a98d..f47b33e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.  
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.  
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 18ed5ff..e53e306 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
-* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+* @version V5.18 3 Sep 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
 * Released under both BSD license and Lesser GPL library license.
 * Whenever there is any discrepancy between the two licenses,
 * the BSD license will take precedence.
index 0346dcf..606ee58 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim. All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim. All rights reserved.
   Released under both BSD license and Lesser GPL library license.
   Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence.
index 79884c9..c29c6e7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
    Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index c32cf3d..04ceb5a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 084c1dc..b9cd4a9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
@@ -403,6 +403,8 @@ class ADODB_mssqlnative extends ADOConnection {
        
        function Prepare($sql)
        {
+               return $sql; // prepare does not work properly with bind parameters as bind parameters are managed by sqlsrv_prepare!
+               
                $stmt = sqlsrv_prepare( $this->_connectionID, $sql);
                if (!$stmt)  return $sql;
                return array($sql,$stmt);
@@ -462,7 +464,8 @@ class ADODB_mssqlnative extends ADOConnection {
                if (is_array($inputarr)) {
             $rez = sqlsrv_query($this->_connectionID,$sql,$inputarr);
                } else if (is_array($sql)) {
-            $rez = sqlsrv_query($this->_connectionID,$sql[1],$inputarr);
+                       // $inputarr is prepared in sqlsrv_prepare();
+            $rez = sqlsrv_execute($this->_connectionID,$sql[1]);
                } else {
                        $rez = sqlsrv_query($this->_connectionID,$sql);
                }
index 60bc9c7..6c7eb81 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
-* @version V5.17 17 May 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+* @version V5.18 3 Sep 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
 * Released under both BSD license and Lesser GPL library license.
 * Whenever there is any discrepancy between the two licenses,
 * the BSD license will take precedence.
index 47fa00f..3e1f148 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -53,7 +53,7 @@ class ADODB_mysql extends ADOConnection {
     if (!function_exists('mysql_set_charset'))
        return false;
 
-    if ($this->charSet !== $charset_name) {
+       if ($this->charSet !== $charset_name) {
       $ok = @mysql_set_charset($charset_name,$this->_connectionID);
       if ($ok) {
                $this->charSet = $charset_name;
@@ -608,6 +608,8 @@ class ADODB_mysql extends ADOConnection {
        function _close()
        {
                @mysql_close($this->_connectionID);
+               
+               $this->charSet = '';
                $this->_connectionID = false;
        }
 
@@ -722,10 +724,10 @@ class ADORecordSet_mysql extends ADORecordSet{
                        //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
                        if ($o) $o->binary = (strpos($f,'binary')!== false);
                }
-               else if ($fieldOffset == -1) {  /*      The $fieldOffset argument is not provided thus its -1   */
+               else  { /*      The $fieldOffset argument is not provided thus its -1   */
                        $o = @mysql_fetch_field($this->_queryID);
-                       if ($o) $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com)
-               //$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
+                       //if ($o) $o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com)
+                       $o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
                }
                        
                return $o;
index bb556a1..6d3537c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -28,7 +28,7 @@ if (! defined("_ADODB_MYSQLI_LAYER")) {
 
 class ADODB_mysqli extends ADOConnection {
        var $databaseType = 'mysqli';
-       var $dataProvider = 'native';
+       var $dataProvider = 'mysql';
        var $hasInsertID = true;
        var $hasAffectedRows = true;    
        var $metaTablesSQL = "SELECT TABLE_NAME, CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=SCHEMA()";       
@@ -843,7 +843,7 @@ class ADODB_mysqli extends ADOConnection {
 
     if ($this->charSet !== $charset_name) {
       $if = @$this->_connectionID->set_charset($charset_name);
-      if ($if == "0" & $this->GetCharSet() == $charset_name) {
+      if ($if === true & $this->GetCharSet() == $charset_name) {
         return true;
       } else return false;
     } else return true;
index ad008a1..4715a1f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 923147a..824e32c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.17 17 May 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
+V5.18 3 Sep 2012  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.