Removing resources from Activity block

Removing resources from Activity block

by Ivica Matotek -
Number of replies: 4
Picture of Testers
Hi!

I'm trying to remove resources link from Activity module, but this causes to remove all materials from the course. Does anybody knows can this can be achieved or not. Or does somebody knows how to create block with all the other elements (quizzes, glossary, forums, ..) except resources because we would like for student to access materials only from main windows, not from resources link.

Ivica
Average of ratings: -
In reply to Ivica Matotek

Re: Removing resources from Activity block

by Sharon Goodson -
I'm not sure if this will help since you mention losing all your course material, but as far as disabling internal links, you can either turn off the filters from the site admin block or you can highlight any text naming the resources (in the html editor) and select the 'prevent automatic linking' in the html editor tool bar (the link icon with the red 'x' over it).

It sounds like you have a lot of this, so turning off the filters would probably work better.
In reply to Sharon Goodson

Re: Removing resources from Activity block

by Ivica Matotek -
Picture of Testers
Hi!

I would like to remove Resources link from Activities block (on picture). activities.jpg

But when I hide it in Modules – Activities – Manage activities there are no more pages in main window. Is there any way to have module Activities without Resources?

Ivica
In reply to Ivica Matotek

Re: Removing resources from Activity block

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Ivica - I must admit that I do not see the advantage to disabling it. As long as students are able to get to the needed resources all the better I would think. That said, you could probably customize the block so that it excluded resources and thus did not show the link. If you are interested in that it should not be overly difficult so just let me know and I would see if I have time for a quick patch. Peace - Anthony

p.s. - check out the file /blocks/activity_modules/blocks_activity_modules.php around line 42 you should something like:

if ($modname != 'label') {

try changing that to:

if ($modname != 'label' or $modname!='resource') {

and see if that accomplishes what you are hoping for. That said, here are a couple of generic disclaimers. Please note when changing code you should always have a reliable backup and test it on a test server first. I have not tested the change but a quick look at the code suggested to me that it might be along the lines of helping you toward a solution.
Average of ratings: Useful (1)
In reply to Anthony Borrow

Re: Removing resources from Activity block

by Tiffany Morgan -
Thanks for the idea of the html block. I'm going to give that a shot.

I too would like to hide the resources link in the activity block, but keep the other links visible. The reason is we have created a "homepage" on the course page with links in topic 0 that go to the webpage resources. These webpage resources are set to display within the course page frame (object tag).

When you have the resources link showing in the activity block it goes to the resources page where all the resources are visible, but there is not a way to change these links to appear within the course page using the object tag (or if there is I haven't found it and would LOVE to hear how to do it.)

Just through I would give you one take on the rationale for this request...