moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
58 stars 49 forks source link

Restrictions for Info banner #500

Open create-martin opened 7 months ago

create-martin commented 7 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I would love restrictions for info-banners, sames as with smart menus (by role, by cohort, by language, ???). We're having a client project, where I want to show the banner only to a specific cohort.

I actually tried to use filtercodes within message {ifincohort ...}, but unfortunately all users from other cohorts will see an empty info-banner...

abias commented 7 months ago

Hi @create-martin ,

many thanks for your proposal.

While your proposal as a whole will be reflected soon by my colleagues from the Boost Union team, I have this small hint:

I actually tried to use filtercodes within message {ifincohort ...}, but unfortunately all users from other cohorts will see an empty info-banner...

Are you aware that you can set the Bootstrap class for each infobanner? If you set the Bootstrap class to "No Bootstrap color" in combination with your filtercodes approach, the users who are not in a particular cohort should not see any empty info-banner, they should just have an empty div tag in the HTML DOM. As soon as this works for you as a workaround cohort restriction, you can addd yourself any Bootstrap alert styling you need with HTML within the {ifincohort ...} tags.

Cheers, Alex

wiebkemueller-hsh commented 5 months ago

Dear @create-martin

thank you again for the proposal and congratulations on the 500 ;-) Actually we're seeing a potential for streamlining the realisation of restrictions within the theme. As for now, restrictions are being used in smart menu and flavours. In order to avoid a rather "wild growth" of yet another manual construct we'd like to go a step back and think of framework/library that realizes the restrictions and can then, ideally, be applied to maybe even more use cases.

So for now this will have to be looked at by the theme architects but we'll keep this open for discussion.

I hope you will be able to get the workaround prposed by Alex working meanwhile!

Regards Wiebke

create-martin commented 5 months ago

Hi Wiebke,

as for the #500 – just doing my part 😊

Regarding thinking the restrictions more globally: that’s actually a great idea.

I’m sure, there are a couple of other use cases where that might make sense.

Just from the top of my head: With one client (operating in 6 countries) I’m using filtercodes ({ifincohort …}) to display a country-specific footer (theme_boost_union | footnote). I would image, that restrictions could be interesting for all static pages. Basically for the whole „Content“ subcategory of Union.

I could also image using restristions on some parts of the „Look“-section (like Logo). But that might open up a discussion about „multi-tenancy-functionalities“ which are like a USP of Moodle for Workplace, to my knowledge. So I would understand, if you don’t want to go there 😊

I might find some usecases where restrictions could be interesting here: theme_boost_union | hidenodesprimarynavigation However, that I would solve with just hiding them globally and adding them again for relevant (e.g.) cohorts via smartmenus.

Thanks for the update! Martin

[CREATE] Wir leben Lernen. [Facebook]https://www.facebook.com/CREATE.Digital.Learning [LinkedIn] https://www.linkedin.com/company/758246?trk=tyah&trkInfo=idx%3A1-1-1%2CtarId%3A1425468563071%2Ctas%3Acreate+mediadesign [CREATE] https://www.create.at/ [cBook] http://www.cbook.de/ create-mediadesign GmbH ATU 50420904 | HG Wien-FN 201256s Wien: A-1040 | Taubstummengasse 7/3 München: 81375 | Würmtalstraße 20 A DI(FH) Martin Berger Senior Technical Consultant | DSB [E-Mail:] @.**@.> [Tel.:] +43 1 78 66 318 22<tel:+431786631822> [Web:] create.athttps://create.at/ | cBook.dehttp://www.cbook.de

For a better 21st century.

Von: Wiebke Müller @.> Gesendet: Freitag, 19. Jänner 2024 14:02 An: moodle-an-hochschulen/moodle-theme_boost_union @.> Cc: Martin Berger @.>; Mention @.> Betreff: Re: [moodle-an-hochschulen/moodle-theme_boost_union] Restrictions for Info banner (Issue #500)

Dear @create-martinhttps://github.com/create-martin

thank you again for the proposal and congratulations on the 500 ;-) Actually we're seeing a potential for streamlining the realisation of restrictions within the theme. As for now, restrictions are being used in smart menu and flavours. In order to avoid a rather "wild growth" of yet another manual construct we'd like to go a step back and think of framework/library that realizes the restrictions and can then, ideally, be applied to maybe even more use cases.

So for now this will have to be looked at by the theme architects but we'll keep this open for discussion.

I hope you will be able to get the workaround prposed by Alex working meanwhile!

Regards Wiebke

— Reply to this email directly, view it on GitHubhttps://github.com/moodle-an-hochschulen/moodle-theme_boost_union/issues/500#issuecomment-1900391326, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIDDXEOELGSRKAO6ZEHQMTYPJVENAVCNFSM6AAAAABAWDMLASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQGM4TCMZSGY. You are receiving this because you were mentioned.Message ID: @.**@.>>

Diese E-Mail kann vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der beabsichtigte Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail und der darin enthaltenen Informationen sind nicht gestattet.

nuria2c commented 1 month ago

This could be a very good improvement. In Moodle, there are 2 basic roles (student and teacher) and the 90% of the info messages are diferent for these 2 roles.

We user info-banners only for general comunications (only 10% of the total) because theres is no possibility to define restrictions by cohort or role. We have diferent cohorts in our intance that give us more control about the profile of each user and with this funcionality we would send the 100% of messages by this way.

Add the restrictions options that are in the smart menus in the "info banner" and "Advertising tiles" options it would b be a very good improvement in the comunnitacion process to the users.