[Building Sakai] Public announcements from Admin Workspace not possible?

Niebel, William (wdn5e) wdn5e at eservices.virginia.edu
Thu Oct 28 09:22:44 PDT 2010


At UVa, we're running Sakai 2.6.x.  I got MOTD public-access announcements working by editing 2 files:
announcement/announcement-tool/tool/src/webapp/vm/announcement/chef_announcements-revise.vm
announcement/announcement-tool/tool/src/java/org/sakaiproject/announcement/tool/AnnouncementAction.java

I got MOTD RSS working by editing one additional file:
kernel/kernel-util/src/main/java/org/sakaiproject/util/BaseDbDoubleStorage.java
Besides being in the kernel, this last edit is special-case code I'd prefer to avoid.

Details:

chef_announcements-revise.vm is conditional, working differently when announcements are for the MOTD case, and in that case hardcodes to SITE access (with html input type=hidden).  Experimenting, I changed that .vm file and then had to change the order of statements in AnnouncementAction.java to prevent an exception thrown there.  (This reordering doesn't change processing results in any case, just avoided an exception caused by the chef_announcements-revise.vm change.)

After doing these 2 edits, I can now create public MOTD announcements for display in Sakai proper.

But the RSS feed doesn't show these public MOTD announcements.  This is because the RSS code is looking for MOTD announcements under "/announcement/channel/!admin/main", but the public MOTD announcements I added are instead stored under "/announcement/channel/!site/motd".  (This isn't purposeful from my own changes, but I can see that this is the case from looking at the db table.)  I added a special-case fixup for this in the RSS code and I got the RSS feed to work -- that is, I substituted "/announcement/channel/!site/motd" for "/announcement/channel/!admin/main" before the db call.

I tried to guess a different RSS URL which would work without the need for special-casing in the RSS code -- but didn't succeed.  And it's not obvious to me how to fix this up instead in AnnouncementAction.java.

Does anyone have suggestions on doing this less special-case?

Bill Niebel
wdn5e at virginia.edu<mailto:wdn5e at virginia.edu>





More information about the sakai-dev mailing list