Forum OpenACS Development: Exporting Objects

Posted by Nima Mazloumi on

does someone know the zexp files from zope? Zope allows to export Object instances like a forum or a class or what ever to local disc. The great thing about it is that you can use it either for backup purposes or even for delivering sample content that can be imported on any other running plattform instance that has the appropriate packages installed.

If I understood Ernie he is mapping SCORM content to the content repository by importing a zip file which could be the first step to that feature. Has someone thought of this idea before? Is it already available as a package?


2: Re: Exporting Objects (response to 1)
Posted by Mohan Pakkurti on
That would be a very nice feature to have. I have also had request for a feature where one can upload a zip file to say file-storage, and have it unzipped with the correct folder hierarchy etc.

How could this be implemented? any technical ideas?


3: Re: Exporting Objects (response to 1)
Posted by Matthew Geddert on
i think exporting needs to be written by the application - exporting objects generically won't do it all since all objects seem to have different attributes that are important to them and that is package dependent.

Overall though, this isn't hard to do, csv import and exports are pretty easy to set up... (you could take a look at hte CSV import of users in dotlrn, and the csv export of survey answers in the survey package) you just need to want to do write it, and at least for me a regular database dump and restore (or possibly dump and then a cut of the table i want to import to a new db), is much easier then writing this importing exporting feature to do that through a web interface... i only really do this to test something on a development server anyways...

4: Re: Exporting Objects (response to 1)
Posted by Matthew Geddert on
uploading to file storage is very different from uploading content from forums or similar... i agree that it would be useful, and probably not too hard to set up. You would need to unzip it into temp space and then list the files and import each individually into the zipped folder heirarchy... you could take a look at how apm deals with files on the file system - it would have much of the file lookup code in place. And then an import is just saying, when you see a folder, make one in file storage... etc.
5: Re: Exporting Objects (response to 1)
Posted by Don Baccus on
Check out the "archive the contents of this folder" link in file storage, it downloads a zip'd archive of the contents.  Import into file storage isn't supported, though.

For .LRN as has been pointed out Ernie's working on exporting and importing in SCORM, which is an XML-based standard for interchange in that world.

For my own birdnotes site I wrote a bulk upload manager that was later adopted for the old ACS 3.x-based version of SloanSpace.  We've mumbled about the fact that it would be very nice to have it for SloanSpaceV2 (.LRN), too, but thus far there's been no funding for it and I've been far too busy with other things to do it on my own time.  I'd like to, though.  It gave full control over bulk uploading of data, creating a log of rejected lines, allowing one to roll back uploads (useful if they fail for some reason), etc.  You just implement a set of procs for a given file format for whatever dataset you're working with, and plug them into the bulk upload manager.  In OpenACS 4.x one would do so via a service contract.  This was designed for importing data from other sources (bird data made available by national organizations, etc.) not for interchange between ACS instances.

Interchanging data between ACS instances would be relatively difficult ... packages tend to work together, interweaving (say) forums content with attachments with, of course, the users and parties tables and notifications and ...

I don't see that custom file formats would be better than Oracle or Postgres's built-in ability to make consistent backups.

6: Re: Exporting Objects (response to 1)
Posted by Jade Rubick on
Perhaps the most helpful thing to do here would be for someone to come up with some good documentation of how to write out the content of a package and read it back in, perhaps using CSV files. Then it would be fairly easy for anyone to add this feature to their package.

It's not high up on my todo list, though, so I guess this will have to wait for someone with the motivation to do it.

7: Re: Exporting Objects (response to 1)
Posted by Caroline Meeks on
Here are a couple of other places to look at sample code for upload of zipped files:

Jeff Davis' Photo Album supports uploading a zip file of images.

The 3x version of Wimpy Point also supported uploading a zipped file of images, usually generated by power point. I don't know if this feature is in the new Wimpy Point yet.

8: Re: Exporting Objects (response to 1)
Posted by Jade Rubick on
Could Jeff Davis' improvements be brought into the standard photo-album code?
9: Re: Exporting Objects (response to 1)
Posted by Carl Robert Blesius on
After a very short .LRN pilot it is clear that we need to have a way for file-storage users to easily upload content and have working relative links within the content. Zip/Upload/Unzip is would be good, a WebDAV interface to file-storage would be great (one thing at a time though - a zip/unzip based solution would alleviate our mutual pruritus for now). We have asked Polyxena to figure out a way to make relative links work (in addition to the work on Curriculum stage I) and Ola started an interesting thread on virtual urls in the content repository. Are these well placed baby steps towards a CMS solution?
10: Re: Exporting Objects (response to 1)
Posted by Jun Yamog on
Hi Carl,

We currently have a CMS solution in the form of CR, which is mostly backend.  What I am trying to do is, bring a client code to be more general for every body.  The code just helps in 2 main aspects.  Hopefully expose the CR functions to more developers as CR for some reason is not being used by them.  Make it easy to add different UI for each particular project or client.