Removing browse tabs [by Swapan Bhuiyan]

Removing browse tabs [by Swapan Bhuiyan]

Bởi Joseph Rézeau -
Số lượng các câu trả lời: 3
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers Hình của Translators

On Friday, 30 September 2011, 05:17 PM, Swapan Bhuiyan asked:

I would like to know how I can remove any of the browse by tabs in glossary.

(using Moodle 1.9)

Please be more specific and tell us which "browse by tabs" you would like to remove (and... why?)

Also, are you prepared to hack your core moodle files in order to achieve this? Remember that hacking your core moodle files can cause lots of problems when upgrading your moodle site.

Joseph

PS.- You asked 2 different questions in your original post, which is not a good idea on forums. I have posted 2 separate discussions and deleted your original post.

Trung bình điểm đánh giá: -
Để phản hồi tới Joseph Rézeau

Re: Removing browse tabs [by Swapan Bhuiyan]

Bởi Swapan Bhuiyan -

Well, thank you for seperating the questions. I thought they were related so I asked in the same post.

My objective is to remove 'browse by authors.' This is for an online class where people don't know each other. The instructor wants the students to add items in glossary and have other students rate it. We want the glossary posting to be sort of as anonymous as we can get, so that students can rate it without knowing who posted it. So basically rate not for the person who is posting, but for the content of the posting. (I hope that makes sense).

As for hacking the core moodle files, I will speak to my institution, however, I doubt the answer will be yes. However, I would like to know how it can be done.

Thank you!

Để phản hồi tới Swapan Bhuiyan

Re: Removing browse tabs [by Swapan Bhuiyan]

Bởi Jonathan Rabson -

This is something I was wondering about too (using Moodle 2.3).  It seems irrelevant for students to be able to browse by author if there is only one author, and "browse by category" is irrelevant if categories aren't used.

To avoid hacking core files, I'm wondering if creating a plugin is the best way to do this.  It appears that filters only alter user-readable text (?), in which case they wouldn't do, unless one could get them to alter HTML, which would let one make the irrelevant tabs disappear.  If not, I'm thinking that a "local" plugin might be the best way.

Another way would be to put JavaScript in the theme that would search for the tabs from their title tags (since they don't have IDs) and set their CSS properties to invisible, but that would be a really ugly way to do it.  Or another "ugly hack" way to go about it would be to put one's own filter function around $OUTPUT->main_content() in the layout; you could replace any particular string of HTML you didn't like that way.

Anyhow, if anyone has found a good way to deal with this issue, please let us know your experience, as I'm sure there are lots of people who would want to make those tabs go away if they aren't relevant for a given glossary.

Để phản hồi tới Jonathan Rabson

Re: Removing browse tabs [by Swapan Bhuiyan]

Bởi Jonathan Rabson -

Ah, I finally figured it.  If you don't want any of the tabs at all (e.g., because browsing by alphabet is the only relevant one), then you can put the following into your theme CSS.  That takes the tabs out. cười

.glossarydisplay .tabtree {display:none;}