[Building Sakai] Samigo transfer and copy entities
Nguni Phakela
nguni52 at gmail.com
Thu Dec 4 01:06:06 PST 2014
Apologies, the code is incomplete... the transferCopyEntities method has
the following code to transfer info from one site to the other:
for (Iterator i = EntityManager.getEntityProducers().iterator(); i
.hasNext(); ) {
EntityProducer ep = (EntityProducer) i.next();
if (ep instanceof EntityTransferrer) {
try {
EntityTransferrer et = (EntityTransferrer) ep;
if (ArrayUtil.contains(et.myToolIds(), toolId)) {
et.transferCopyEntities(fromContext, toContext,
new Vector());
}
} catch (Throwable t) {
M_log.warn(this + ".transferCopyEntities: Error
encountered while asking EntityTransfer to transferCopyEntities from: "
+ fromContext + " to: " + toContext, t);
}
}
}
Cheers,
--
Nguni Phakela
Cell: 061-131-2053
skype: nguni52
twitter: @nguni52
On Thu, Dec 4, 2014 at 11:01 AM, Nguni Phakela <nguni52 at gmail.com> wrote:
> Hi,
>
> I would like to copy data from one site to the other, and when I do, the T*ests
> & Quizzes* questions are moved to the new site, and everything else is
> copied, except the images and the links to the images do not point to the
> new site. They keep the links to the old site, and thus are not
> accessible/visible in the new site.
>
>
> SiteImportFunctions sif = new SiteImportFunctions(contentHostingService);
> sif.transferCopyEntities(siteTool, toolIdTitlesArr,
> rolloverCourse.getOldSiteId(),
> rolloverCourse.getNewSiteId());
>
> Any help will be appreciated.
>
> Kind Regards,
>
>
> --
> Nguni Phakela
> Cell: 061-131-2053
> skype: nguni52
> twitter: @nguni52
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20141204/8b2a908b/attachment.html
More information about the sakai-dev
mailing list