MDL-36881 Handle poorly behaved modname_get_types functions better
authorSam Chaffee <sam@moodlerooms.com>
Thu, 29 Nov 2012 09:27:47 +0000 (09:27 +0000)
committerAndrew Robert Nicols <andrew.nicols@lancaster.ac.uk>
Mon, 28 Jan 2013 10:21:22 +0000 (10:21 +0000)
commit56c0878b4500f4d062c5b8e227814e2fe9ebd71c
tree4bae89ee9566403ec95ef958c39e6c2c4334f6a4
parentb3778a0dec34e49bf5def212e0cc18a39fd3f609
MDL-36881 Handle poorly behaved modname_get_types functions better

The modname_get_types function is not always well implemented by
third-party plugins and some return poor data. This in turn leads to
incorrect module definitions, and can lead to problems in both the
'Add an activity...' dropdowns and the Activity chooser.

This will also prevent display of plugins which legitimately can have
subtypes but where no subtypes were found. Since such plugins cannot be
used in this fashion in any case, this is also beneficial.

Signed-off-by: Andrew Robert Nicols <andrew.nicols@lancaster.ac.uk>
course/lib.php