cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
martin_kabat
Community Participant

How can we hide group "+ announcement" button from group announcement page from students?

Is there a way how to hide group "+ announcement" button from group announcement page from students?

 

 

0 Kudos
1 Reply
sendres
Community Participant

Hi @martin_kabat,

There certainly isn't any trivial way to do this. I think your only hope would be to write a theme with custom JavaScript that hides the +Announcement button. It might be workable depending on your exact needs.

The +Announcement buttons on the group home page and group announcements page are anchor tags with an id of "add-announcement".

<a href="/groups/123/announcements#new" title="Add Announcement" id="add-announcement" [etc.]>

<a id="add_announcement" href="/groups/123/discussion_topics/new?is_announcement=true" [etc.]>

So you'd want your script to hide (or remove from the DOM) any element with the add-announcement id. You probably also want your script to inspect the href to verify you're in the right group context. (You could be granular and allow announcements in certain group IDs and suppress them in others, for example.)

While you're at it, you'd probably want to hide the Announcements menu item as well, since there will be nothing to see there if nobody can post.