Duplicating Resources in 1.6

Duplicating Resources in 1.6

by Art Lader -
Number of replies: 33
Any chance we will once again have the ability to duplicate resources in 1.6?

I really would like to see this. It seems I am not the only one: http://moodle.org/mod/forum/discuss.php?d=26252

We had this in 1.4, didn't we?

-- Art
Average of ratings: -
In reply to Art Lader

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Art - I would be happy to jump in and add my 10 cents worth (drawing on the binary humor from another post). I did develop and use with 1.5.3+ a duplicate function that I have since added to the lib folder and have each module call that allows for an individual resource to be copied from one to the other. This is convenient but it can be time consuming as well. When I try to take a weeks worth of material and go through and copy each object and then make sure they are in the right order it is not as easy as it ought to be. I think what would be good, and the direction that I think MD was encouraging, was to improve the backup/restore interface. If you could choose to backup say the whole site, a whole week, all quizzes and then create an xml file that would be restorable to another course that would be awesome! I think that would help in sharing resources across sites as well - there could be an xml repository or various resources. I do consider the limitation to be a serious drawback and one that I hope is overcome in some form or fashion. Thanks for keeping the discussion alive or resurrecting it for version 1.6.
Average of ratings: Very cool (1)
In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Ger Tielemans -
Yes, a button on the section card in edit mode to export that section and all it's content! (and a cabinet to store all these section cards in a catalog would make it complete.) 
In reply to Art Lader

Re: Duplicating Resources in 1.6

by Josep M. Fontana -
Hi Art,

I don't know that this was ever a standard Moodle feature in 1.4. The one you point to in the URL you include was developed by one of the students of Joan Codina in our university. Since it is not part of the standard Moodle distribution, it probably disappeared when you upgraded to version 1.5. This is the sad fate of functionalities that don't become standard. With some effort on your part, you can download it again and install it on whatever version of Moodle you have now. It should work.

We have the duplication function installed in our Moodle 1.5.3 and frankly I don't know how anyone else can live without it smile. It doesn't copy only resources but also activities. It saves you so much time when putting a course together it's not even funny.

Just an example. I normally use the topic format for my courses, but I like to create blocks for the different weeks using special colors and format (something like Week 3). I just create a label for Week 1 and then I copy it 9 times to other 9 blocks. Then I just have to edit each label and change the numbers. This looks like something very silly, but it saves you a lot of time.

OK, but maybe this is not the best example. Let me think of a better one. Say, for instance, you have different forums for each week with similar names (f.e. Week 5: Discussion about ...). You just have to create a forum with the title (and the settings!!) you want and copy it as many times as you want. You don't have to create a new forum every time and go through all the settings, which can be very tedious if you have to create many of them. You just create one and copy it to different blocks. The settings are retained and you just have to modify the title (if you indeed have to do that). As simple as that. The fact that the activity is copied with all its settings is really key to saving time.

Really, I don't understand why this has not been incorporated into the official Moodle distribution. But then again, there are so many things I don't understand smile.

Josep M.
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Art Lader -
Well, I think it is something that people have not really asked for.  There are so many things going on at moodle.org that it is easy for a little thing like this to be forgotten, I suppose.

But I really would love to see this in 1.6!

-- Art
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Michael Penney -
Hi Josep, one reason it can't be incorporated into Moodle standard is that it is not complete: it doesn't fully copy activities like quiz, which have more than one table.

IIRC, Martin pointed this out a different thread discussing this issue. We've been using it here, and many folks like it, but Joan et al. or someone would need to finish feature so it copies all activities.

I believe that NZVLE is working on a solution for this, look for Penny Leach's comments on it, which lets you copie activities via backup and restore. One thing that would help is that when folks have development resources available, for them to spend some time discussing how they might accomplish a feature in the forums before starting it, which increases the chance that the code will be implementable into core.
In reply to Michael Penney

Re: Duplicating Resources in 1.6

by Josep M. Fontana -
Mmm. I was not aware of that. I usually don't have many quizzes in my courses and so I haven't really felt the need to copy them. But, yes, if this feature is to be complete, it should allow one to copy everything.

Could you point me to the thread where Penny Leach mentions this? I haven't been able to find her posting in the thread that Art mentioned and nothing came up in a search I did.

If NZVLE is working on this it is good news because I think it is really an important feature to have. You don't realize how useful it is until you start using it though.

Josep M.
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Ger Tielemans -
One of the problems is that there is no central place to summarise thiskind of developments and the sad way it sometimes can end. Maybe a new chapter for the documentation called: Chapter OrphanHouse?
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Penny Leach -
I was working on making backup/restore granular - that is, allowing users to select what to backup/restore down to the instance level, rather than just 'all forums' or whatever.

Perhaps that's what you're thinking of?

Anyway, that feature is in HEAD, it'll be in 1.6
In reply to Penny Leach

Re: Duplicating Resources in 1.6

by Josep M. Fontana -
Hi Penny,

No, making backup/restore more granular will be a GREAT addition but that's not what I meant. What I meant was to add a functionality that allows you to copy resources and activities within your course. You can see how this works (albeit imperfectly since as Michael Penney says, it doesn't work for quizzes) if you go to http://parles.upf.es/TEST/login/index.php and login as teacher:teacher.

Turn editing on and you will see the icon gf next to the resources and activities. You click this icon and you'll be able to copy the resource or activity into any of the available topic/week blocks on the main course page.

The patch is available for download on the main page http://parles.upf.es/TEST/

Josep M.
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Similar to the duplicate functionality that I added on my site except that I added the ability to duplicate a resource or activity to another course. The shell of quizzes, questionnaires, etc are copied which saves time as you have noted. I would like to have time to go in and work on the code to make this work better for those more complicated modules and perhaps even suggest that developers of modules include code to handle to complete duplication of an instance of that module. If folks are interested in playing with/developing the duplicate.zip file that I created for 1.5.3+ I would be happy to post it in this forum as well. Peace.
In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Art Lader -
If folks are interested in playing with/developing the duplicate.zip file that I created for 1.5.3+ I would be happy to post it in this forum as well. Peace.

I am not a programmer, Anthony, but I am willing to bet that many people would love to see it!

-- Art
In reply to Art Lader

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

I consider myself more of a hacker than a programmer but I am happy to share what I have done and use - especially if it can be used to spur some ideas and get cleaned up. Please read the install.txt file for instructions on how to install and use. I do not consider the code production worthy even though I use it on my production server. It has limitations but I have been pleased to have this functionality. I would encourage anyone wishing to use/develop the code to please use on a test machine first. The various lib files are somewhat dated so a diff between what is provided and current lib files may be helpful. I will see when I can get a more updated version ready. Peace - Anthony

In reply to Art Lader

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
OK, I have take the files from Moodle 1.6 Beta and modified them creating this new duplicate_16beta.zip file. I have not had much chance to do any significant testing but the code changes seem to be functional should others want to continue to play with this in 1.6  The demo site at http://www.jesuitcp.org/moodle/demo is still using Moodle 1.5.3+. Peace - Anthony
In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Josep M. Fontana -
Anthony,

Do you have a test site where would could have a look at how your duplicate functionality works?

Josep M.
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I will need to create a demo site where this can be accomplished. I would use my productino site; however, we have teachers that have published quiz banks and I do not want to expose those. I will work on this later today and should have something available tomorrow. Peace.
In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

OK, I have created the demo site at http://www.jesuitcp.org/moodle/demo

You can login using username: teacher and password: teacher

That account is set to be teacher of 2 courses Demo 1 and Demo 2. You can practice creating various resources and moving the objects between them. I would appreciate any feedback and of course if any one wants to fine tune the code that would be more than welcome since this really is just a hack job of Gustav's 1.4 code.

In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Josep M. Fontana -
Hi Anthony,

Thanks for creating a demo site. I got in and I tested the feature you implemented. I like the fact that you are able to copy resources between courses very much but I think this in a way is a complement to the other feature we were talking about. It seems useful to copy activities between courses but a bit of an overkill to copy an activity or lable to different parts of the same course. There are two things that make it feel kind of "slow". First, the fact that every time you create a copy, you are "forced" to get in the configuration mode for that activity. Second that once the copy is created it gets copied right underneath of the original so that if you want to create the copy somewhere else, you still have to move it.

It would be nice if we could combine the functionality of your feature with the ease of use of the feature developed by Joan Vendrell. That would be awsome.

Josep M.
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I agree that it can be a little slow and it was really used to move content to the same place between different courses. The reason I use the configuration mode is that it allows you to make minor modifications - such as duplicating a basic assigment but changing the due dates, etc. Also, it uses Moodle's default methods for creating those activities. In other words, it does not require much code. Basically I say, take this module and create a new one. If the user chooses a different course then I use the new course id and Moodle creates the module as it would as if you were doing it. So for a few lines in code I was able to get a fair amount of functionality and flexibility - but at the cost of it being slow. While slow, I think that duplicating and moving are two separate tasks. I would like to see a duplicate functionality that basically combines the two by saying - let me get all of this modules information and then insert that to wherever the user wants (including another course). I'm afraid that would take more programming prowess than I can muster at the moment but it is a good idea.
In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Josep M. Fontana -
I share your view. That's what I would like to see as well. My programming prowess is far below yours, though smile.

Josep M.
In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by D.I. von Briesen -
It seems it would be really easy to combine the copy/move, so that once you click the copy icon, it shows up in "move mode" where you pick where you want to move- the ONLY visible difference between that and the current "move mode" is that the original would still be sitting there. Does the code work such that you could make a call to the "move" code functionality just after calling the copy functionality? I do not feel that copying things within a course is overkill, and need it every day, actually! Copying sections from course to course or within courses would rock as well.

Problem is, my server is cool, but my school setup for now is limited to core moodle unless we make a big stink, and I'm about stinked out for now...

d.i.
In reply to Anthony Borrow

Re: Duplicating Resources in 1.6

by Richard Treves -
BIG Thanks for that, the patch is installed and you've just cut my weekly 'wire it up' work by half smile 

Rich
In reply to Richard Treves

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

You are most welcome. I am glad that it has been a time saver. Let me know if you have any questions, problems, or suggestions. Peace.

In reply to Josep M. Fontana

Re: Duplicating Resources in 1.6

by Michael Penney -
I think once Penny's functionality is standard, it will be fairly straighforward to link to the functions from an icon, so you could have a 'copy' icon that runs the B+R without users process for that instance of the module.

At least I hope sosmile.
In reply to Michael Penney

Re: Duplicating Resources in 1.6

by Art Lader -
All I can say is thank you and that you guys are simply amazing.

-- Art
In reply to Michael Penney

Re: Duplicating Resources in 1.6

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I have been playing with 1.6 and I will probably abandon my duplicate patch since I believe a similar result (and more stable) can be achieved using the import function since it allows individual activities to be selected. It creates a copy of the categories and questions in the course making each course independent. The downside is that if a mistake is made in a question it would have to be corrected in each course. Nevertheless, I like the idea of being able to accomplish what I am looking for without having to have custom code. Conceptually one just needs to change their thinking from duplicating (pushing) an activity from one course to another to pulling it from the course.
Average of ratings: Very cool (1)
In reply to Art Lader

Re: Duplicating Resources in 1.6

by D.I. von Briesen -

Art- AMEN AMEN AMEN AMEN....

did I say AMEN?

I would KILL (OK, not kill, but give MONEY) to have this made standard. Even without activities, or quizzes. Those things need so much customization it's not clear to me that copying them saves a lot of trouble. What gets me is the stupid labels! I have them all set to have no sizing, but each type is a different color... and I have 10 or so I want across every week of every course. What a pain! See attachment. I got so desperate I created a one week course with these lables and just kept bringing in the resources (times 16 weeks) to get my course template set up... but then all the moving and such.... woooh...

So I can see that there are a lot of "gotchas" but boy gimmee a gimmee and warn me 'bout gotchas before i go hungry (ok, need to get some sleep...).

Now that I think about it, a weekly and or coursely template system would be really cool. I've taken to always including certain things in week one:

  • course contract (10 things you agree to to take this course)
  • links to instructor page, syllabus, other external relevancies
  • Introduce yourself forum
  • hopes an expectations forum
  • moodle tour
  • moodle tour quiz (ok, maybe it's not in yet, but I'm meaning ot add it!)
  • and a few other things.

So the geek in me says to put this on a static page and link to it from all my courses, but then I still need the graded activities.

sigh...

For reference, here's an ideal week ("ideal" being subjective, and very much based on all my courses being very much works in progress- this is the latest work...).

d.i.

In reply to D.I. von Briesen

Re: Duplicating Resources in 1.6

by Art Lader -
Wow, you really do need this, d.i.

But I think that help is on the way!

-- Art
In reply to D.I. von Briesen

Re: Duplicating Resources in 1.6

by Mark Schumann -
Just out of interest, you have "4 unread posts" and "5 unread posts" after the bottom 2 forums in your image.  How did you manage that, or are you running 1.6?
In reply to Mark Schumann

Re: Duplicating Resources in 1.6

by D.I. von Briesen -
1.5.3... they are forums, with tracking on... isn't that normal?

I for one would love ot know how to get messages emailed after 1/2 an hour...

d.i.
In reply to D.I. von Briesen

Re: Duplicating Resources in 1.6

by Mark Schumann -
When I turn tracking on I don't get these fields displayed
In reply to Mark Schumann

Re: Duplicating Resources in 1.6

by Mark Schumann -
Nevermind, upon further investigation it appears this is a default value within my profile.