Sakai Site Archive allows exporting and importing Sakai sites to preserve disk space or maintain performance. The author modified Site Archive to support content exchange between different Sakai systems. Key lessons included assuming entities exist in the target system and handling linking between content. While intended for archiving existing sites, Site Archive can work for content exchange with some changes.
Exploring the Future Potential of AI-Enabled Smartphone Processors
Using Sakai Site Archive for Good not Evil
1. Using Sakai Site Archive
for Good not Evil
Cris J. Holdorph
Unicon, Inc.
holdorph@unicon.net
June 10-15, 2012
Growing Community:
Growing Possibilities
2. Agenda
● Introduction
● What is Site Archive
● Modifying Site Archive
● Lessons Learned
2012 Jasig Sakai Conference
4. Unicon
● In Business Since 1993
● Focus on Open Source Software and
Education
● Support and Services for uPortal, CAS,
Sakai, Grouper and soon SSP
● Cooperative Support Program
2012 Jasig Sakai Conference
5. International MyLabs Project
● Pearson International
● Localized Sakai
● Publisher Content
● Authoring Sakai / Customer Sakai
○ Two different Sakai systems
2012 Jasig Sakai Conference
7. Problem Definition
● Create and Export content in one Sakai
system
● Import Content into a different Sakai
system
2012 Jasig Sakai Conference
8. Possible Solutions
● IMS Common Cartridge
● Sakai Site Archive
● Invent our own
2012 Jasig Sakai Conference
9. IMS Common Cartridge
● Industry Recognized Specification
● Lesson Builder only supported IMS CC
import
● Some Sakai data would have no simple
way to be represented in IMS CC
2012 Jasig Sakai Conference
10. Sakai Site Archive
● Part of Sakai since release 2.0
● Created for archiving existing Sakai sites
to preserve disk space and/or maintain
performance
● Allows for bringing sites back if needed
● Simplified backup and restore for Sites
2012 Jasig Sakai Conference
11. Invent Our Own
● No existing code we need to figure out
● Build everything (increased effort)
● Less likely to get support from Community
2012 Jasig Sakai Conference
12. Decision
● Leverage existing code and use Sakai Site
Archive
● Contribute changes to Site Archive back to
community
● Benefit from community maintenance of
Site Archive code
2012 Jasig Sakai Conference
14. Learning to Use Site Archive - Tool
2012 Jasig Sakai Conference
15. Learning to Use Site Archive - Tool
● Export - Enter Sakai Site ID
● Import
○ File: Enter top level directory name for
the archive directory
■ site-id-archive
○ To Site: Enter Target Sakai Site ID
■ If Target Site ID doesn't exist Sakai
will create a new Site with that ID
2012 Jasig Sakai Conference
16. Learning to Use Site Archive -
Properties
mergeFilterSakaiServices@org.sakaiproject.archive.api.ArchiveService=true
mergeFilteredSakaiServices@org.sakaiproject.archive.api.ArchiveService=
AnnouncementService,AssignmentService,sakai:content,
LessonBuilderEntityProducer,DiscussionForumService,NewsService,
PollListManager,sakai:site,WebService,WikiObjectService,
ContentHostingService,AssessmentEntityProducer,BasicLTISecurityService
storagePath@org.sakaiproject.archive.api.ArchiveService=
${sakai.home}/archive/
2012 Jasig Sakai Conference
17. Learning to Use Site Archive - Code
package org.sakaiproject.entity.api;
public interface EntityProducer {
public boolean willArchiveMerge();
public String archive(String siteId, .);
public String merge(String siteId, ...);
...
}
2012 Jasig Sakai Conference
18. Learning to Use Site Archive - Code (2)
sakai/common/archive-
impl/impl2/src/java/org/sakaiproject/archive/impl/SiteArchi
ver.java
...
// create the directory for the archive
File dir = new File(m_storagePath + siteId + "-
archive/");
dir.mkdirs();
...
for (Iterator iServices = services.iterator();
iServices.hasNext();)
...
if (!service.willArchiveMerge()) {
...
String msg = service.archive(siteId, doc,
stack, storagePath, attachments);
2012 Jasig Sakai Conference
19. Learning to Use Site Archive - Code (3)
sakai/basiclti-
impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServ
iceImpl.java
public String archive(String siteId, Document doc, Stack stack,
String archivePath, List attachments) {
...
for (SitePage sitePage : site.getPages()) {
for (ToolConfiguration toolConf : sitePage.getTools()) {
if (toolConf.getTool().getId().equals(TOOL_REGISTRATION))
{
BasicLTIArchiveBean basicLTIArchiveBean =
new
BasicLTIArchiveBean();
...
Node newNode = basicLTIArchiveBean.toNode(doc);
basicLtiList.appendChild(newNode);
2012 Jasig Sakai Conference
20. Supported Tools
Tools we have tested as supporting Site
Archive in Sakai 2.9.x
○ Lesson Builder
○ Tests and Quizes (partial)
○ Assignments (partial)
○ Announcements*
○ Resources
○ Forums, Podcasts, Polls, Web Content,
Wiki, News (RSS)
* Restores current dates 2012 Jasig Sakai Conference
21. Newly Supported Tools
● These Tools have been patech to support
Site Archive in Sakai 2.9.x
○ Basic LTI
○ Tests and Quizes (full)
○ Assignements (full)
* Restores current dates 2012 Jasig Sakai Conference
22. New Site Archive Features
● Preserve Tool Order set by Site maintainer
● Preserve Tool Names et by Site maintainer
● Preserve Skin set by Site maintainer
● Custom merge order
○ Let Lesson Builder merge last
2012 Jasig Sakai Conference
24. Assuming Entities Exist
● Site Archive designed to dehyrdate and
rehydrate sites from/to the same Sakai
system
● Rehydrating (importing) into a different
Sakai system will give mixed results
○ Missing entities
○ Different GUIDs
2012 Jasig Sakai Conference
25. Linking
● Lesson Builder Linking
○ Charles Hendrick rocks
● Generic HTML (e.g., rich text editor)
Linking
○ FIND HTML COMM DISCUSSION
2012 Jasig Sakai Conference
26. Tests and Quizes (Samigo)
● Question Pools
○ Not included in Archive
○ Not specific to Site
○ Owned by creator, useable in any site
they can maintain
2012 Jasig Sakai Conference
28. Conclusion
● Sakai Site Archive is Good
● Linking to Sakai Entities is Bad
● Directly Linking to Sakai URLs in Rich Text
Editors is Evil
● Sakai Site Archive was intended to archive
existing sites, not as a content exchange
framework
● However.... Sakai Site Archive can work
for content exchange (with some tweaks)
2012 Jasig Sakai Conference