Least hacky way to show a message only to anonymous users?

13 views
Skip to first unread message

Tobias Grasse

unread,
Aug 26, 2014, 6:01:29 AM8/26/14
to open...@googlegroups.com
Hi all,

I need to show a message box with a link to the login page when people visit my start page: http://campus.onlineradiomaster.de

At the moment, this is done with the description box of the course root node. However, I can’t seem to hide this box if a user is already logged in – I couldn’t find any class names or IDs in the page source that indicate if one is anonymous or logged in. I would prefer not to mess around in the Java source code which generates the page (I don’t know Java and want to keep my system maintainable) – is there another way to achieve this?

Thanks in advance & kind regards,
Tobias Grasse


------------------------------------
Tobias Grasse
MOOC Transnational Radio Stories
Project Development


a project of the masters programme ONLINE RADIO
vernetzt studieren. produzieren. senden.

Florian Gnägi

unread,
Aug 26, 2014, 10:11:18 AM8/26/14
to open...@googlegroups.com
Hi Tobias

The most simple solution is to use two course elements at the top: one for guests and one for authenticated users. 

- Add a course element “single page” below your root element "MOOC Start Info”
- Add an expert visibility rule "isGuest(0)=1” to make this page only visible to guest users

- Add a second course element “single page” below your guest start page
- Add an expert visibility rule "isGuest(0)=0” to make this page only visible to authenticated users

- On the root element "MOOC Start Info” select the display option to automatically activate the first visible course element

Using that approach you can style the guest and non-guest page as you want, I would recommend using two different HTML pages instead of the description box, you might want to add other information to the page for guest users as well . 

Cheers
Florian


--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--------------------------------------------------------------------
professional services for the e-learning system OpenOLAT and OLATpro
 hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
--------------------------------------------------------------------















Tobias Grasse

unread,
Aug 26, 2014, 1:36:05 PM8/26/14
to open...@googlegroups.com
Works perfectly, thank you very much! Didn't think of the expert rules.
Reply all
Reply to author
Forward
0 new messages