Forum OpenACS Development: moving and copying objects

Collapse
Posted by Luis de la Fuente on
Hello all,

As you can read at

https://openacs.org/forums/message-view?message%5fid=294928

One new feature of dotLRN is the:

"Possibility to change the term of a class allowing the move of an entire class from one semester to another."

I want to work on the capability of moving and copying several objects from one class or community to another. That means the possibility of copying forums, faqs, events... not only the whole class.

On the other hand, what happens with all the comments, events, etc. when a entire class is copied. Are they there in the new instance? are they removed? Which is the best option?

Collapse
Posted by Malte Sussdorff on
One thing to note: "Move" really means just that. The term associated with the class is exchanged.

In your case what you need to do is create a new instance of the class and copy the existing information to the new class.

Now, we have two possible ways to go about it:

1) Really create new package instances for each of the functionalities and copy the data over manually.

2) Mount the existing packages of the "old" class in the "new" class. This will allow the reuse of e.g. the file-storage both in the "new" and "old" class. Sadly, this means that any change done in the "new" class would reflect also on the "old" class. Not to mention that I'm not even sure this trick will work on .LRN or if .LRN has more mechanisms in place to prevent multiple mounting of a package instance.

Collapse
Posted by Luis de la Fuente on

1) Really create new package instances for each of the functionalities and copy the data over manually.

I would like to develop the functionalities to do this task in an easy way. Unfortunately, this way means the duplication of contents in the database.

2) Mount the existing packages of the "old" class in the "new" class. This will allow the reuse of e.g. the file-storage both in the "new" and "old" class. Sadly, this means that any change done in the "new" class would reflect also on the "old" class. Not to mention that I'm not even sure this trick will work on .LRN or if .LRN has more mechanisms in place to prevent multiple mounting of a package instance.

As you say, i don't think that .LNR is capable to manage this (two references of the same object of the database). Anyway, the actual issue of copying object is to get it without comments or something else. Just think that comments can be done by members which are not included in the "second" class, so you don't need this comments.

Obviously, all the objects has different behaviour, so each of them has to be studied alone.
Collapse
Posted by Luis de la Fuente on
For which version should be developed this changes?

Most users has 5.1, so i have started with this. However, 5.2 has appeared recently and HEAD is the "testing" branch.

What do you think?