Small Code Refactor in Portal

I did a bit of a refactor and removed some duplicate code that was getting ugly to maintain in
SkinnableCharonPortal.java
WorksiteHandler.java
It was the code that sets up the order of the top tabs. Some folks like Charles Sturt are interested in customizing this code and it is really sad to maintain it two places particularly when customizing it across a few releases.
It is a simple refactor – stuff that was natively in the context is now in a map called siteTabs like in this diff:
-#if ( $pageNavToolsCount > 1 || ! $pageMaxIfSingle )
+#if ( $sitePages.pageNavToolsCount > 1 || ! $sitePages.pageMaxIfSingle )
If this goes awry – you will see the string “$siteTabs” in your output. I have tested every place I could think of – but it is always possible to have made a mistake.

Continue reading

NIFTY Feature – Single Tool Maximized

I just added a feature
http://bugs.sakaiproject.org/jira/browse/SAK-9799
This detects when there is only one tool present in the tool list and then only shows that tool. Like this:
http://bugs.sakaiproject.org/jira/secure/attachment/13879/singletoolmaximized.jpg
This requirement was inspired when I went to Cambridge and watched a seminar where the faculty member did his *whole class* in the wiki. I thought that it was a brilliant and clever approach.
This allows users to even redirect their whole site to another LMS bu using the web tool as the only visible tool and pointing to a URL to something like the /portal/worksite URL.
Other approaches might be melete-only, resources-only, discussion-only, LAMS-only. You could even use the iframe tool and do your whole site using DAV :) The web content tool effectively allows a complete redirect of the site to some other place!
I hope folks find this useful.

Continue reading

Karaoke Tonight – Melbourne, AU – All welcome

So the Karaoke plan for tonight is as follows:
http://www.kbox.com.au/contact.htm
The above URL has a map
I will try to be there by 9:30 or 10PM. I have no idea how many people will end up there – but what the heck – you have to get the party started some way or another.
By the way the free bus/shuttle apparently stops at 6PM – so it is either a cab ride or a walk.
TEL: 9663 9663
ADDRESS: 52 LaTrobe Street (b/w Russell and Exhibition Street), Melbourne

Bathurst, NSW, AU Update

I am at Charles Sturt University these past few days and having a cool new experience – for the first time I am facing all of the “local customization” issues that they have and trying to find clever solutions that meet their needs. It is great fun and we are coming up with clever ways to make subtle local changes to do some pretty cool stuff.
For me this is a neat learning experience. Next week is Educause in Melbourne where I give an invited talk on Pushing the boundaries of Innovation using Community Source and a Teaching with Sakai Workshop and a Programming in Sakai Workshop.
Busy days.

Sent to the WURFL List

Hello all, I am using WURFL in the Sakai collaboration system (www.sakaiproject.org).
Like several others – I found the need to “touch up” the Java APIs so I grabbed a copy of the code, put it in our SVN.
https://source.sakaiproject.org/svn//portal/trunk/portal-impl/impl/src/java/net/
I added an acknowledgement to Sakai’s acknowledgements:
https://source.sakaiproject.org/svn//reference/trunk/library/src/webapp/content/gateway/acknowledgments.html
The main thing I needed to fix was that the Loos match was too loose :) I ultimately needed to decide whether or not I *had* a mobile device from the user agent. So I made some new code that effectively takes the UA sets it to lower case, removes spaces and numbers and then demands an exact match to the UA in WURFL (with the text reduction aplied to the UA)
This handles a lot of situations where the version numbers increment but nothing else changes in a UA.
I also was bummed that I could not get the actual UA form a device id that I got from a Loose lookup.
I also did what others did and got rid of the System.out.printlns.
I am happy for others to use these mods or contribute them.
Again – thanks for the work on WURFL.
Charles Severance
www.dr-chuck.com

WURFL (Wireless Universal Resource File) added to PDA support in Sakai

Coming back form the airport – I was playing with my Treo and realized that if I *knew* I was talking to a narrow device, I could do things like place the “Log In” text more nicely.
There was a discussion on the dev list a whle back about a thing called WURFL(Wireless Universal Resource File) that gave yo all kinds of properties about mobile phones. So at 6AM on a bus, I decided to “look into” what it would take. Now about 20 hours later I have it ready to go :) It was trickier than I thought.
The biggest issue was the existing Java APIs around WURFL did a really bad job of matching user agents – particularly when a Treo 600 user agent changes on upgrades with minor versions change on the browser compatibility.
So, I pulled the source into Sakai, fixed it, added an acknowledgement, and made it work for the PDA portal. All to save a line on my Treo 600 display :)
I put in my stock dev notes that have little or no meaning.

Continue reading