Duplicating course modules

Duplicating course modules

by Gustav W Delius -
Number of replies: 36

I frequently have to create several similar resources or activities in a course. Therefore I have always wanted a possibility to create a copy of a course module without having to re-type all the information. I have now finally gotten around to implementing this. If you click on the little 2 icon then a form similar to the module add form pops up with all the details filled in. Saving it gives a second copy.

I should say that this was not my original idea. First colleagues of mine had suggested it and now I also saw it again as a feature request in the bug tracker.

The 2 in the attached screenshot is not actually an icon, it is just a character. Clearly it would be nice if someone could design a proper icon for this.

Attachment duplicate.gif
Average of ratings: -
In reply to Gustav W Delius

Re: Duplicating course modules

by Ger Tielemans -
Fantastic!!! Can you do the same for a complete course section? wink
In reply to Gustav W Delius

Re: Duplicating course modules

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
No, sorry Gustav, this just complicates the interface too much.

This should be implemented through the move functionality ... ie, once you've got a copy in your clipboard, you have a choice of "move" or "copy".

In reply to Martin Dougiamas

Re: Duplicating course modules

by Gustav W Delius -

Martin,

Moodle is as great as it is because, thanks to you, it has the world's most user-friendly interface. So I will certainly tweak the interface until we have found the best solution. I nevertheless thought it was a good idea to commit a prototype already so that people can try out the functionality. That makes it easier to think about the interface.

You propose to make the Duplicate feature accessible via the up-down arrow icon that is currently used for the Move feature. I am not yet convinced that that is entirely intuitive. However I am not opposed to it because I am sure a teacher is going to figure this out quite quickly, especially if the tooltip is changed from "Move" to "Move or Duplicate".

After one clicks on the move icon the screen looks as shown in the attached screenshot. How should this be changed to make room for the Duplicate feature?

Attachment copy.gif
In reply to Gustav W Delius

Re: Duplicating course modules

by Przemyslaw Stencel -
How about this (see screenshot)?

PS
Great feature, Gustav!
Attachment moveorcopy.gif
Average of ratings: Useful (1)
In reply to Przemyslaw Stencel

Re: Duplicating course modules

by Gustav W Delius -

Przemyslaw, I really like you proposal. One more question:

Should the original activity that is to be moved or copied remain in its original place until one chooses a Move box? Or do you prefer the current way where the original activity is removed from the course section as soon as one initiates the process by clicking on the up-down arrow icon?

I tend to favour the first option of leaving the original activity intact until the user chooses where to move it. This is more in line with how moving and copying works in graphical file managers like Windows Explorer: If one right-clicks and drags a file the original file stays in place and only a copy moves around with the mouse. Only when one drops it one is asked whether one wants to move or copy.

In reply to Gustav W Delius

Re: Duplicating course modules

by Mary Kaplan -

Does this mean that this duplication is being worked on, or dreamed about? wink Seriously, if it is a dream, I have had the same dream. If it happens, I will be very excited!

--Mary

In reply to Przemyslaw Stencel

Re: Duplicating course modules

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
That looks pretty good.  Those two buttons would have to be made with CSS. Though how will all those double buttons look down a long page?

The "Moving this activity" text should probably say something else now ... but ... hmm, tricky ... dammit Gustav, maybe your original little duplicate button was less obtrusive.  tongueout

Is anyone having any lateral-thinking brainwaves?

Is copying something you guys need to do a lot?  What do you copy?  I can't ever recall needing to do it!
In reply to Martin Dougiamas

Re: Duplicating course modules

by Mary Kaplan -

Martin,

I have copied (copy-paste) activities from one course to the other, and this takes you back to the original course. For example, in a discussion for students in one course, where there was another global course, the linking action was useful.

Now we are developing courses that will have several blocks of duplicated activities and we are looking for a way to save time by "cloning", "duplicating" or whatever it takes to avoid re-doing blocks or activities entirely.

There are not too many courses where this would apply; math courses, for example, where one course is taught in two segments or one, depending on the level of the student--this can be solved by the cloning method, and then deleting the unnecessary elements, I think.

But there are some courses where there are only some elements in common, where this would be VERY useful. I can imagine several English courses, for example, where this would be very nice. Maybe it is just me...mixed

--Mary

In reply to Mary Kaplan

Re: Duplicating course modules

by Gustav W Delius -

Mary, the copying that I just implemented only copies within courses. The only copying in between courses that currently exists is via Eloy's backup/restore route. But a lot of people want to copy from course to course, so I am sure this will happen eventually.

In reply to Gustav W Delius

Re: Duplicating course modules

by Mary Kaplan -

Backup/restore will work if we plan ahead and know that we will need to copy parts of a course to another. But moodling can sometimes be messy (for example some members of a department may come on board later than others and would need to "borrow" previously created parts and not others).  Many of our moodle courses are being developed piecemeal, and when a course is already created and some parts would be applicable to another, the backup/restore will be cumbersome, and a copy between courses for single blocks or modules would really be useful.

Sometimes these things don't even occur to us as useful for another application until long after the initial creation of a course.

These are dreams, though, so please take them as such.thoughtful

--Mary

In reply to Mary Kaplan

Re: Duplicating course modules

by Art Lader -
Backing up just parts of a course and restoring them into an existing course works pretty well. It is not a complicated or tedious process. I just copied all of the quizzes from a biology course into our test course in less than five minutes. (If it were a real course, though, I would still have to move some stuff around.)

But I think that only the system admin can do this, and that is a problem if teachers want to share.

Or am I mistaken? Can teachers also do a back-up and restore?

-- Art



In reply to Art Lader

Re: Duplicating course modules

by Art Lader -
Well, I just logged in as a regular teacher (well, not really "regular," I logged in as my wife, so "very special") and was able to copy some forums from one course to another using backup and restore.

I admit it would be very nice to have an export function or something like that, but right now a teacher could pretty easily back up only a part of a course and e-mail the zip file to another teacher who could then restore it into an existing course.

At least, I think that would work.

-- Art
In reply to Art Lader

Re: Duplicating course modules

by Ger Tielemans -

Would be more elegant if I press backup (renamed to export) and the homescreen with the sections changes in a long row of checkboxes, for example the new outline view...

  1. I can select each section with a checkbox on section level and then all the activities in that section go into the copy
  2. If I not select the whole section I can select several activities "under it"
  3. Like in the current backup you have a list of additional questions
  4. The restore (renamed to import) works the same way
In reply to Ger Tielemans

Re: Duplicating course modules

by Hans de Zwart -
These are some great idea's. Checkboxes are very sensible and quicker than dropdown lists.
I do agree with Ger that the names backup and restore could be replaced by import/export. Backup can than be reserved for the automated tasks.

Anyone for a vote?
(just joking Ger, what is your car's colour?)
In reply to Ger Tielemans

Re: Duplicating course modules

by Gustav W Delius -
This is a really nice suggestion. Can you put this as a feature request into the bug tracker so it doesn't get lost?
In reply to Gustav W Delius

Re: Copying course modules

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks everyone for the feedback on why you want copying - it really helps to see what you're doing there.

Gustav, I think the same interface for copying an activity within a course should work between courses.  Once you have an item in your "clipboard", going to another course could easily show the same copy or move options. 

There will be some problems with activities that contain or reference files from the first course (eg an "uploaded file" resource will need to have the file copied, unless the DMS arrives first in which case it will have it's ACL modified)

A solution for this would be after duplicating the course_module entry and the module entry (which I assume you're doing), looking for a module function called something like module_copy_instance() which will take care of the messy details.

I'm moving this thread to the Development forum, since it's going beyond the original announcement.
In reply to Martin Dougiamas

Re: Copying course modules

by Ger Tielemans -

I need to merge two courses into one.

Before I start to do that with backup and restore, is there for the admin a backdoor to change in a quick way in the database the "course-root" of a section and all its moduls, or are to many database-fields involved?

In reply to Mary Kaplan

Re: Duplicating course modules

by Timothy Takemoto -

I agree that copying between courses would be helpful. Especially in the situation where one is administrating a lot of courses and one wants to make an addition to many of them.
This is however possible using the backup function (and the "add to an existing course" option) but it is a bit time consuming and fraught if the weeks in the course do not match (if, say one of the teachers had taken a week or more off).

Also, within the same course, for activities like a forum entitled "What did you think about this week's class" or or a chatroom entitled "Chat about this week's text, " (Okay there only need be one chat room but if sutdents are used to looking on the current week then it may help to duplicate)  or a label entitled "This week's homework," or a link entitled "Contact me if you have any problems(linked to ones email address)." It might even be helpful to have to option to add an activity to all the weeks of a course, with a "Does this activity repeat" drop down menu.

Tim

In reply to Martin Dougiamas

Re: Duplicating course modules

by Gustav W Delius -

I need to do a lot of copying. Note that I am not talking of verbatim copying. When one hits the copy button one gets a chance to modify the copy.

Say for example I have set up a forum to discuss a particular issue. I have chosen all the settings appropriate to my class. I then want to set up another forum to discuss a different issue. It is quicker to copy and modify than to start from scratch. The same with my weekly assignments. They are all called Problem sheet and they are all marked according to the same scheme, all due in at the same time of day, ...

In reply to Gustav W Delius

Re: Duplicating course modules

by Hans de Zwart -
Same thing for journals. I ask students two questions every week. The first question is always the same. The second one changes every week. All other settings (scale, availability in weeks) stay the same.
In reply to Martin Dougiamas

Re: Duplicating course modules

by Greg Fishbone -
I'm finding myself doing a lot of copy and paste in order to maintain a consistent formatting in the resources I use as course readings.  If I put together an HTML page on "What Does Copyright Protect," I like to use it as a starting point for an HTML page on "What Doesn't Copyright Protect."

Changing Move to Move/Duplicate would make this step that much easier.  Or maybe a new resource type, HTML template, that would allow teachers to make their own templates of graphics, tables, and subheadings.
In reply to Martin Dougiamas

Re: Duplicating course modules

by Przemyslaw Stencel -

I sometimes need to copy a quiz to make it available again for students who missed the deadline. Extending the deadline in the original quiz isn't an option, because I want the grades of those 'offenders' to be clearly separated from the grades of those who took the quiz in time.

And - honestly - copying a quiz is a pain. If I have to copy an assignment or a forum, it means some copy-and-paste work in two tabs (or windows), but it's manageable. With a quiz, it's just dead.

wink

In reply to Martin Dougiamas

Re: Duplicating course modules

by Brian Koontz -
Is copying something you guys need to do a lot?  What do you copy?  I can't ever recall needing to do it!


I have spent several hours the past few days setting up two identical sections of a course taught by two different instructors. I didn't have everything finished, so I just copied the entire course from one section to another. Now I'm working on a topic block, and have discovered it would be very useful if I could simply copy the block to the other section. I'm hesitant to do a backup/restore (but I'll probably do it anyway)...a cross-course copy feature would be a tremendous asset to Moodle! (Actually, a more scalable way to design this would be to implement "sections" under Moodle course, which would be identical clones of one another, with the ability to copy/paste between sections and to add unique content to each.)

--Brian
In reply to Martin Dougiamas

Re: Duplicating course modules

by Richard Williamson -

I use copying a lot:

  • When there is overlap between course content (eg. A level ICT and A level Coputing in the UK)
  • When the same topic is being covered by 2 teachers in different ways - usually for differentiation between teaching groups. Maybe groups would be better here...
  • When copying courses for next year

I would find this feature very useful.

Keep up the good work guys! smile

In reply to Martin Dougiamas

Re: Duplicating course modules

by David Lamotte -

I find that I need to copy all the time.  One common example is a 'repeating' assignment where I require the students to upload a weekly report (ie an assignment).

Personally, I find the current 'move' interface pretty confusing as I often get lost finding my way back to where I moved from so that I can go up or down a week.

As we strive to put more and more functions on the screen, people are rightly concerned with it becoming more cluttered.  One approach that I find easy to use is the popup menu that Typo 3 uses.  Here the edit functions for each entry may be accessed by clicking on the image that represents that object and a standard pop up edit screen appears.  An example from the user docs can be found at:

http://typo3.org/typo3temp/tx_oodocs_e1475e17d6.png

Thanks

David

In reply to Martin Dougiamas

Re: Duplicating course modules

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

I have implemented a quick and dirty way of duplicating modules between courses - it obviously needs refinement and further development but I think it is a simple way of using existing code to implement copying modules both within and between courses that is consistent with the current interface and user intuitive. I realize that this particular thread is dated but I have implemented it with v1.5.2 which can be demo'd at http://arborrow.net/moodle/

I am attaching the duplicate.zip file which has the code for the modified files should one of the developers (like Gustav) wish to look at it and improve upon it. I hope this is helpful.

Peace - Anthony
In reply to Anthony Borrow

Re: Duplicating course modules

by Ger Tielemans -
For me your are the Moodler-of-the-month
Attachment 50px-Trophy.jpg
In reply to Ger Tielemans

Re: Duplicating course modules

by Dan Jeffries -
Has anyone tested this out? Does it work?

I really REALLY hope it does!

DJ
In reply to Anthony Borrow

Re: Duplicating course modules

by James Robertson -

As usual, I'm confused.  Copying activities is something I frequently need.  I don't see a Gustav version -- is this based on it?  Has anything else been developed for copying activities within (and between) a course?  What works best so far?

Thanks,

Jim.

In reply to James Robertson

Re: Duplicating course modules

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I have it implemented on my school's site; however, it is not perfect. One limitation is that I have to import glossaries and questions for quizzes. It is functional but not pretty. It really needs a real programmer/developer to give it a good look over. I am sorry that the arborrow.net/moodle site is not working - I was using freewebsitehost.net; however, the site seems to be not working. Feel free to play with the duplicate.zip file on a test system and let me know if you have any questions.

Peace - Anthony
In reply to Gustav W Delius

Re: Duplicating course modules

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

Thanks for all of your work on the duplicate functionality. I took your earlier efforts and played with them. I think you are definitely on the right track. On thing that I did was to first have the module begin the duplication; however, at the top of the screen I have a drop down box of a list of the courses that the user (teacher) teaches. That way I can copy a single module from one course to another. My implementation is far from perfect and needs the careful eye of a real, experienced PHP programmer; however, I have found it functional for use at my site (www.jesuitcp.org/moodle) which is running on a WIMP environment. I have setup a demo site which uses a free hosting company at http://www.arborrow.net/moodle should you (or anyone else) wish to look at the code and play with what I have done. I am most appreciative of your efforts on this (IMO) much needed feature. Please let me know if you have any questions and what you think of the icon that I created to imply duplication.

Peace - Anthony