[Building Sakai] updating links to other tools when copying Lessons from site to site

Charles Hedrick hedrick at rutgers.edu
Wed Jun 20 12:14:42 PDT 2012


The most common request at the conference was to make sure when you copy content from one site to another, links to other tools are always fixed up. I've just checked in code do that. However there are some limitations. The way it works depends upon whether the copy mechanism uses updateEntityReferences. "Duplicate site" and some other things do. But importing an archive file does not.

My code now sets a site property when importing a Lesson into a site. The update link code clears the property. If updateEntityReferences is not called by the kernel, the first time you display any Lesson from the site, my code will call it.

Samigo has extra complexities:

1) site archive doesn't save Samigo tests, so an archive restore won't restore them. If you have fixed this in your code, things ought to work.

2) Even in site duplicate, which does copy Samigo, it copies only "core assessments" not published assessments. Lessons must, of course, point to published assessments. What I do is leave behind a fixup pointing to the core assessment. As soon as the user publishes the assessment, Lessons will notice it and fix up the reference to point to the newly published assessment.

3) Until the assessment is published, the Lessons link will be grayed out.

4) If an assessment is published, Lessons links to it, and the core assessment is deleted, this process won't work, since the new site won't have anything for that assessment at all. This is not a problem I can fix.

The result is normally usable, but odd cases can certainly occur where there are reference that don't work. A clear note is placed on the page explaining.



More information about the sakai-dev mailing list