Copying resources/lessons etc between courses

Copying resources/lessons etc between courses

by Audun Hauge -
Number of replies: 34
I'm working on a script (sideblock) that allows teachers to copy from one course to another. So far I can copy resources and lessons. A teacher can also rearrange sideblocks and activities (mods) by drag'n-drop. A list over available resources/lessons from other courses is drawn on the screen, can be drag'ndropped into your course.
If the course-layout is week-based, then the start-date of a lesson will be adjusted depending on which section (week) it is moved to (this should perhaps be an option - settable for each instance with new sideblock).  If teacher so chooses, will allow deletion of resources & other stuff (not quite sure about this, but I sometimes want to get rid of a whole lot of resources in one go ... ).

Attached a screenshot showing layout-editor (javascript)
Attachment layout.png
Average of ratings: -
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Teemu Sumi -
I have also thought that there should be a button which can delete all the resources of the course. There should be a warning of course wink


Teemu
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Leonhard Küllinger -

Fantastic,

thats what my friends in school asking for- to share (copy) ressources and settings between courses.

nice greetings from austria

power on moodle

In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Michael Penney -
Very cool Audun, we are working on a block for file sharing, between students and students and students and teachers (based on Teemu's portfolio code). Right now we gotten it working for students to send assignments from it, and the next step is to get it working so teachers can share files among classes.

Its in contrib as block_shared_files.

It sounds like this might be compatible with the block you are working on, as we'd like to get it working to share activities among classes as well.

In reply to Michael Penney

Re: Copying resources/lessons etc between courses

by N Hansen -
So Michael-Your plan is to develop something that would allow activities to be shared across more than one course? For example, would it allow a glossary to be shared by more than one course (without being a global glossary), or a resource to be accessible in more than one course at a time? If so, this would be really very nice.
In reply to N Hansen

Re: Copying resources/lessons etc between courses

by Audun Hauge -
How does this sound:
A modifier (Make a link) dropped onto an available resource, the resource changes color (to reflect that it will be a link, not a copy), drag the resource onto a section and a link to this resource is inserted (instead of making a copy). I haven't looked at the tables to check if this can be done without altering or adding fields, but 'twould be very nice ...
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Michael Penney -
The hard parts will likely have to do with grading, and perhaps other course specific activity.

For instance, if you link to a graded activity linked linked in multiple courses, it would have to have a way of knowing which courses to return which grades too. This would probably require either a new table for each mod, or a table in the sharing mod to manage this.

Similar problems if you wanted the activity to open/close at different times in different courses, if the activity was hidden in one course and not in another.

Of course, these things would be easier to work out with an import/export facilty, but then you lose the ability to update the activity in one course and have the updates propageted to other courses.

Hmm, maybe you could have an interface for this, something like "you have updated an acitivity that is linked in other courses, would you like to update the activity in these courses" with some check boxes for which instances to update.

For non-graded activities like Books, it may be alot easier (though you'd still have the management of hidden vs. shown).
In reply to Michael Penney

Re: Copying resources/lessons etc between courses

by Audun Hauge -
My first thought was to NOT link to any graded activity ... wide eyes
Perhaps for these types (graded) 'twould be best to have a flag that showed up in the course where the link is living when the original changes.
SCENARIO 1: (the linking teacher has control)
I've looked thru a lesson made by another teacher, like the stuff, decide to link, the teacher makes changes, I see a warning (flag) that the original has changed, I scan thru the original and find that the changes don't suit me at all, decline changes and break the link (I now have an unlinked copy).
SCENARIO 2: (creator has control)
as 1, but the contents of lessons change without my input, I may find a warning about the change, but I didn't see this before running the lesson ...

I think that for this type copying is better, but we could have a copy with change notification (flag any changes in original) so that you can decide to 'upgrade' your copy.
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by W Page -
Hi Audun!

I know I am a web neophyte but isn't what you folks talking about more like a WebDav type of functioning. That is, "
Web-based Distributed Authoring and Versioning",  just Moodle style?

If this is kinda what you all are talking around, I just want to say,
  • This type of feature is something many folks would welcome (I believe).
  • Sure would be nice to directly FTP to the area where the files are retained (If this could be done).

Looks like this is really on its way to happen. smile

WP1

In reply to N Hansen

Re: Copying resources/lessons etc between courses

by Michelle Ricketts -
Oh, yes! please!

I need to transfer a dozen resources and lessons each week, to 4 different courses. I know it sounds odd, but there is a method behind my madness.
I can hardly wait for your solution!
big grin
Thank you!
In reply to Michelle Ricketts

Re: Copying resources/lessons etc between courses

by Audun Hauge -
Links for resources seems to work OK without changing tables, but allowing others to 'link' to one of your resources gives them the same privileges as a teacher in your course for this resource. So if you let other teachers link to your resources, they can then edit your resource as if it were their own. Also trying to 'delete' the linked resource will kill the original. This is not too bad if you think it thru before sharing .... (ie make a copy, share the copy).
Resources that are links to uploaded files can't be copied yet (well they can be copied, but the link won't work), perhaps I should take a look at Teemu's portfolio ...

So far I think copying is the best way to go for lessons. Resources should have both options (copy/link). I haven't thought much about other activities/resources - any ideas?
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Michelle Ricketts -
As you mentioned, I have found that linking things between classes can occasionally lead to odd things. eg multiple enrollments, odd log reports etc. I currently use a "dummy course" to transfer only the items that I want.
 Perhaps the most functional way, that I can think of, to allow practical copy/share between classes, is to somehow "pick and choose" during the restore process.
Or possibly, to allow for exports of each individual lesson/activity/resource in a similar manner to how the quizzes are set up. I just have no idea of how practical any of this would be to implement.

In reply to Michelle Ricketts

Re: Copying resources/lessons etc between courses

by Audun Hauge -
Yes, pick and choose in backup/restore was what I wanted first, after moving a few resources and lessons between courses. The next thing I missed was an easier way to rearrange stuff in courses (the copy would mostly be a week or two off). This gizmo I'm working on will give me both smile
Linking will probably only be for resources, first version will only work for resources where you write text into moodle or link to external resource. I'll think about handling uploaded files later ...
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Michelle Ricketts -
I am really looking forward to using your handy work!
Thank you thank you for being so willing to share with all of us.
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

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
Audun, this is getting very interesting!

How are you copying resources between courses?  Are you also copying files etc?  Are you implementing functions in each module, or just hardcoding this behaviour centrally?

Can I have a demo or download of this to play with?  smile


In reply to Martin Dougiamas

Re: Copying resources/lessons etc between courses

by Michael Penney -
We have MyFiles working for linking and copying files between courses, though Michael A. is working on some security fixes Petr suggested before putting it in CVS.
In reply to Martin Dougiamas

Re: Copying resources/lessons etc between courses

by Audun Hauge -
So far copying resources is a bare-bones thing, I just copy the fields from the resource table and insert with new course-id.
(+ adjustments to course.modinfo et al )

Copying files seems to be solved by others (MyFiles etc) ...
(perhaps I may just  copy some code wink)

I've spent some time fixing copying of Lessons ( as I use these alot). This seems to be working well. A lesson dropped onto a week will have available-date adjusted, the end date is adjusted also (same timespan as original). This should be a settable option, but for now it just happens smile.

I'm fiddling a bit with layout and code for deleting mods, dropping a mod onto dustbin will mark it for deletion.  Found code to call for deleting, haven't activated it yet. The attached version WILL NOT DELETE anything, if the dustbin contains anything at all it will just write messages about what will be done soooon.

The javascript is a bit muddled for now, needs rewriting now that I know what I want to do and how to do it, but 'twill serve as a demo.
In reply to Martin Dougiamas

Re: Copying resources/lessons etc between courses

by Audun Hauge -
>Are you implementing functions in each module, or just hardcoding this behaviour centrally?

Forgot to answer .. erhm

I planned this thing as a sideblock so that anyone could pull it down and install with no hassle. Implementing functions for copying in each mod would be neat, but then this would no longer be a small zipfile ...
Perhaps module-maintainers could write generall purpose copying routines for each module. Standard API for 'give me a copy of this module with id=xx'. Return an object?
I haven't really thought about this aspect, just wanted to be able to copy resources and lessons.
In reply to Martin Dougiamas

Re: Copying resources/lessons etc between courses

by Audun Hauge -

Which modules (activities) should be copyable?

Glossary already has import/export (without using backup/restore)
quiz already has support for sharing questions
Workshop ... perhaps?
Excercise  ditto

lessons - yes
resources  - yes
files - already done?

In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Christian Glameyer -

Hi!

I hope my english is good enough for this:

first let me say, that this is an interesting thread! I found it when I was searching for possibilities to change the location of wikis and websites I created within a course.

Actually I use moodle for organizing my writing work. for example I use moodle as a taskplaner in the calendar-view. Or I organize my thinking about "planning courses" by using a WIKI etc.

Because of this usage of Moodle-Features and -courses my problem of reorganizing the existing bits of work (tasks, WIKIS, Websites etc) to another Course (like from the Course "Planning" to  the "Textwriting" Course) might be special. I hope you wouldn't find this too odd, since moodle is normally thoght of as a teaching or learning platform smile

So from my point of view, it would be great if all activities could be copyable/movable. It would increase the hidden power of moodle as a kind of virtual desktop on which one can organize work in a very useful way!!!

(Add a calculator or even something like Excel and this thing would be unstopable ;o)  )

After all, it's your decision ... and I can not imagine the work that must be done to solve the problems you discussed earlier. But, as others said before, thank you for sharing! It would be a great innovation if only some of the functions would work!

In reply to Christian Glameyer

Re: Copying resources/lessons etc between courses

by Audun Hauge -
Neat use of moodle !big grin

All activities are movable within a course. So far only lessons and resources show up for copying. Will probably add the rest. I think I'll display the other activities all scrunched up as shown in screenshot for the trash-can (there are three activities dumped into trash).
Copying assignments, exercise, workshop etc will be simplified to only taking a copy of the main table for these mods (basicly settings and intro-text).

New feature:  Date adjusting.
Moving a mod to a new week and then clicing with the calendar on the mod will set the date for this mod. The date will be given by the week you moved the mod to and the day,houre,minute displayed by the calendar (can be changed by clicking).
Click again to disable date-change.
Only mods that have been clicked on with calendar will have their dates changed. Calendar will not be displayed if course->format != "weeks".

Attachment layout2.png
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Darren Smith -
This is amazing. Very easy to use cool

Would it be possible in the furture to move weeks / topics about?

Also, does anybody know what could would I have to put in the admin block to have it automatically available for every course?

Thanks
In reply to Darren Smith

Re: Copying resources/lessons etc between courses

by Sigurdur Jonsson -

Hi there,

I'm very interested in adding this feature to my Moodle installation. Where can I download it? Is it in the CVS?

regards,

S.Fjalar

In reply to Sigurdur Jonsson

Re: Copying resources/lessons etc between courses

by Darren Smith -
If you scroll up to one of the previous posts you will see an attachment called layout.zip

I can also answer my own question and by putting something like ...

$this->content->items[]='<a href="'.$CFG->wwwroot.'/blocks/layout/layout.php?id='.$this->course->id.'">Edit Layout</a>';

... in block_admin.php you just get a link in the admin menu rather than having to add the block to every course
In reply to Christian Glameyer

Add a calculator-> reference block

by Michael Penney -
(Add a calculator or even something like Excel and this thing would be unstopable ;o)  )

Hi Christian, just to let you know, the reference block in CVS/contrib has a very nice calculator.
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by 'Alim Beveridge -
Hi,

I'm really excited about what you are doing; I've been hoping for something like this for a while now since I need to copy activities from one course to another all the time. In addition to resources I would say the following activities (modules) should be copyable:

- fora 
just the original forum (with its title, introduction text and settings) without any discussion (that way you avoid problems with authors being member of the destination course or not, etc.)
- assignments
again just the original assignment, without any user submissions
- quizzes
Yeah you can share questions, but if a quizz has n questions and you want to copy it, you have to create a new quizz and add those n questions in the right order to it. As n grows that gets to be a lot of work, even more so if you want to copy the quizz to several courses.
Again, just an "empty" copy of the quizz is made, without any completed quizzes.
- labels
- glossaries
I don't know what would happen if a glossary contains contributions of a user who isn't a member of the destination course. What happens when you export and import?

My dream come true would be to be able to copy an entire section with its title and all its activities from one course to another! How possible is that?

Cheers,
'Alim

In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Andrew Fisher -
I've just started playing with Moodle a couple of weeks ago, so forgive me if any comments I make sound naive - please point me in the right direction if I say something stupid smile

I've created a couple of topic-based courses, and in each I've made a 'Grammar Reference' topic (I teach English to speakers of other languages in London). I uploaded some files, but cannot see a way of offering the same information (static PDF files) to multiple courses except by uploading twice.

Am I missing something simple? Or is this (an aspect of) what this thread is about?

BTW, I'll be introducing the delights of Moodle to my class tomorrow - should be fun!

Andy
In reply to Andrew Fisher

Re: Copying resources/lessons etc between courses

by David Le Blanc -
If you have pdf documents, etc., that you want to share across multiple courses, rather than uploading these into your individual course files folder, you can upload them into the site files folder. The site files folder appears under the Administation menu on your Main page, after you have logged in. You can then just copy and refer to the URL of these uploaded documents using the link tool from inside of individual courses.
sitefiles.jpg
In reply to David Le Blanc

Re: Copying resources/lessons etc between courses

by Jeff Wood -

David's method will work, only if you are the admin sad (Be careful NOT to change the original files as ALL your links will require changing.

If other teachers want to do this... yikes lots of work for the admin.

I believe the DMS (document management system) will address your issues.  If memory serves - you will be able to (as a teacher) allow sharing of your files between courses.

Another option (if the courses are very similar) is to do a backup of your course and then restore.  This will allow you to copy "ALL" course information (excluding student data - if so desired) and then applied to another course.

Hope this helps.

Jeff

In reply to Andrew Fisher

Re: Copying resources/lessons etc between courses

by Darren Smith -
As you have probably gathered already it's not easily possible and yes, that is the nature of this thread.

If you are a little techy / comfortable with servers and files then scroll up to find layout.zip and install that as a block.

If not, perhaps you could create a zip file for the student to extract?

I'm not fully sure what a grammar reference topic consists of but have you looked at the glossary feature which, I believe, can be shared between courses.
In reply to Andrew Fisher

Re: Copying resources/lessons etc between courses

by Mark Stevens -
If you are teaching two sections of the same course, another possibility would be to make groups in your class.
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Étienne Rozé -
I try for the first time this great feature "Import course data" this morgning and I think I find a bug.
I copy all things from a course to an other empty one. After, in this new one there is a problem with groups : groups had been created with students inside but there is nobody in the participants list ! really strange !

In reply to Étienne Rozé

Re: Copying resources/lessons etc between courses

by Audun Hauge -
I'm not quite sure if you mean that you used the layout editor block to copy modules from one course to another, but if so:
What version of moodle are you using?

The layout editor only copies the main table for modules, except for lesson. No users or userdata are copied.

The task you seem to want to do (copying an entire course with users + userdata) is best done with backup-restore.

My script (layout editor) is intended for when you only want a few specific items from a course.
In reply to Audun Hauge

Re: Copying resources/lessons etc between courses

by Étienne Rozé -
I use Moodle 1.5 UNSTABLE DEVELOPMENT (2005020100) ( the latest build)

I try again to do the same thing : 
    - first create a new course. I do nothing in.
    - Import course data from a course with groups
    - change nothing in the questions ( choose yes for all modules)
    - Importation successfull

And I have the same problem with groups which are create.... triste

I did that just for test. For copying course, in production, I use the backup-restore system.
In reply to Étienne Rozé

Re: Copying resources/lessons etc between courses

by Penny Leach -
I think what you are talking about is something I just committed to 1.5 not the feature that this thread references, maybe.

In which case, actually I think groups shouldn't be imported (as you can never select to import users, or user files or user data) but I guess you're not shown that maybe. I'm about to go off to MoodleMoot but I'll have a look when I get back. Can you file a bug report please?

Penny