Remove/Disable resource type

Remove/Disable resource type

by Peteris Rudzajs -
Number of replies: 3
Hi!
Are there any ways how to remove or disable some of the resource types? For example, I want to remove menu item "Compose a text page" in course page on "Add resource".
Can I solve it somehow using user interface or maybe do some modifications to php code?

Peter
Average of ratings: -
In reply to Peteris Rudzajs

Re: Remove/Disable resource type

by A. T. Wyatt -
Greetings, Peteris!

I think this is a very good question, and I cannot find an easy answer! I located this old thread (2006). http://moodle.org/mod/forum/discuss.php?d=47565

To hide the text page resource from the dropdown menu, Samuli Karavaara suggests:

In course/lib.php, function print_section_add_menus() I changed
 foreach ($resourceraw as $type => $name) {
 $resources["resource&type=$type"] = $name;
 }
to
 foreach ($resourceraw as $type => $name) {
 if ($type != "text") {
 $resources["resource&type=$type"] = $name;
 }
 }



Average of ratings:Useful (1)
In reply to A. T. Wyatt

Re: Remove/Disable resource type

by A. T. Wyatt -
Additional information:

This has been filed in the issue tracker as well as a proposed fix. See and vote for:
http://tracker.moodle.org/browse/MDL-18868

atw
Average of ratings:Useful (1)