Hello all.
I am using version 1.6.5 of Moodle. I have a created a Lesson in a Course. I want to move that Lesson to a different Course. I haven't been able to find any guidance on how to do this in the Forums nor in Documentation. Any suggestions very welcome. Thanks.
Suppose Lesson 01 was created in Course 01 (short name CF101).
I'll suppose you only want to move a Lesson from Course 1 to Course 2, not the logs of the students who have taken that lesson.
At the bottom of the list, set all choices to No/None. If your Lesson contains links to Course 01 media (images, audio, etc.) you should select Course Files: Yes, otherwise those media files won't "follow" to Course 02.
Click Continue. On the next screen you'll see:
Backup Details:
Include Lessons without user data
lesson 01
Include No Users
Click continue
Next screen: Backup completed successfully
Click continue
next screen, in Files >> backupdata you'll see your backup file, named something like: backup-cf101-20070815-1654.zip
click on its link to save it somewhere on your local hard drive
Now go to Course 02
in the admin block, click on the Restore link
upload file backup-cf101-20070815-1654.zip
click on the restore button to the right of the backup-cf101-20070815-1654.zip file
next screen:
Later in this process you will have a choice of adding this backup to an existing course or creating a completely new course.
Do you want to continue? -> YES
next screen shows the details of the backup files, click Continue
next screen: Course restore: backup-cf101-20070815-1654.zip
Restore to: select Existing course adding data to it + Continue
Next screen: select Course 02 from the courses list
next screen: click Restore this course now button
Restore completed successfully
Click continue
Et voila! Lesson 01 has been copied to Course 02.
If now you want to delete Lesson 01 from Course 01, just go back to Course 01 and delete it.
In the Admin block, click on the Import link.
Screen: Import activities from another course / Courses in the same category
select Course 01 and click Uset this course button
next screen: Import course data: Course Fullname 101 (CF101)
As explained above, uncheck all check boxes except for Lesson / Lesson 01.
Select Course files Yes if you need some of them (see above)
Continue
Next screen: click Continue
Exported data from 'from' course successfully.
Continue to import into your 'to' course.
Et voila! (much faster method).
Joseph
I'll suppose you only want to move a Lesson from Course 1 to Course 2, not the logs of the students who have taken that lesson.
BACKUP/RESTORE Method
Go to Course 1, in Administration block, click on the Backup link. On the Course backup page, uncheck all Include boxes in the list except for Lesson / Lesson 01.At the bottom of the list, set all choices to No/None. If your Lesson contains links to Course 01 media (images, audio, etc.) you should select Course Files: Yes, otherwise those media files won't "follow" to Course 02.
Click Continue. On the next screen you'll see:
Backup Details:
Include Lessons without user data
lesson 01
Include No Users
Click continue
Next screen: Backup completed successfully
Click continue
next screen, in Files >> backupdata you'll see your backup file, named something like: backup-cf101-20070815-1654.zip
click on its link to save it somewhere on your local hard drive
Now go to Course 02
in the admin block, click on the Restore link
upload file backup-cf101-20070815-1654.zip
click on the restore button to the right of the backup-cf101-20070815-1654.zip file
next screen:
Later in this process you will have a choice of adding this backup to an existing course or creating a completely new course.
Do you want to continue? -> YES
next screen shows the details of the backup files, click Continue
next screen: Course restore: backup-cf101-20070815-1654.zip
Restore to: select Existing course adding data to it + Continue
Next screen: select Course 02 from the courses list
next screen: click Restore this course now button
Restore completed successfully
Click continue
Et voila! Lesson 01 has been copied to Course 02.
If now you want to delete Lesson 01 from Course 01, just go back to Course 01 and delete it.
Import Method
Go to Course 02In the Admin block, click on the Import link.
Screen: Import activities from another course / Courses in the same category
select Course 01 and click Uset this course button
next screen: Import course data: Course Fullname 101 (CF101)
As explained above, uncheck all check boxes except for Lesson / Lesson 01.
Select Course files Yes if you need some of them (see above)
Continue
Next screen: click Continue
Exported data from 'from' course successfully.
Continue to import into your 'to' course.
Et voila! (much faster method).
Joseph
Joseph,
Great. Thanks for such a clear and quick reply. Along with many others, I am sure, I would like to let you know that your posts to questions like this are really appreciated and above all, very helpful to amateurs like me.
Albert.
Great. Thanks for such a clear and quick reply. Along with many others, I am sure, I would like to let you know that your posts to questions like this are really appreciated and above all, very helpful to amateurs like me.
Albert.
Lesson import is broken. I just tested it on the demo site (1.8.2+). It terminates with the dreaded pink box "An error has occurred and the restore could not be completed!" immediately after the "Cleaning temp data" step. I don't see an issue in the tracker. I checked Lesson because I have noted other activities that don't import. Created MDL-10867.
Hi John,
Just tested Lesson import on my local Moodle test sites, both with version 1.8.2 (2007021520) and 1.9 DEV (2007081500). The lesson imported OK on both versions. This is strange, since the version number of the moodle demo site is the same as mine (2007021520).
Have you tried on your own Moodle site with 1.8.2? Maybe the moodle demo site is not really reliable?
Joseph
Just tested Lesson import on my local Moodle test sites, both with version 1.8.2 (2007021520) and 1.9 DEV (2007081500). The lesson imported OK on both versions. This is strange, since the version number of the moodle demo site is the same as mine (2007021520).
Have you tried on your own Moodle site with 1.8.2? Maybe the moodle demo site is not really reliable?
Joseph
Maybe the moodle demo site is not really reliable?
Yes, that is exactly what I am thinking. See MDLSITE-234 and this discussion.
The front page of the demo site claims it is the latest stable release, but it differs from the latest stable release in undocumented ways. There ought to be a warning. According to alexa.com, 4% of all moodle.org traffic goes to the demo site, and I assume that others go there for the same reasons I do: to test in a repeatable environment and to try out new features (not just to check out themes
I have relied extensively on the demo site because it provides an extremely rich environment in which an experiment can be repeated. I was able to test Lesson import without having to first create a Lesson, and if I find a bug, I can document what I did so that anyone can repeat it and not have to worry about the specifics of my Lesson or my test environment. For example:
In this specific instance, I may have hit an upload limit on the import (and gotten the unhelpful error message), but in other cases, I have seen significant differences in behavior from the reference implementation -- like a missing Authenticated user role -- which cannot be explained by concurrent users (Authenticated user cannot be deleted).
Yes, that is exactly what I am thinking. See MDLSITE-234 and this discussion.
The front page of the demo site claims it is the latest stable release, but it differs from the latest stable release in undocumented ways. There ought to be a warning. According to alexa.com, 4% of all moodle.org traffic goes to the demo site, and I assume that others go there for the same reasons I do: to test in a repeatable environment and to try out new features (not just to check out themes
I have relied extensively on the demo site because it provides an extremely rich environment in which an experiment can be repeated. I was able to test Lesson import without having to first create a Lesson, and if I find a bug, I can document what I did so that anyone can repeat it and not have to worry about the specifics of my Lesson or my test environment. For example:
Tested today on demo.moodle.org for repeatability.
Create a new course Foo.
In Foo, Administration -> Import
Specify the Features course
Select Lessons (there is only one Lesson)
Import proceeds to the step where the Lesson is being imported into the target course...
...
...
# Creating user level role assignments and overrides
# Checking course
# Cleaning temp data
and then gives a pink box "An error has occurred and the restore could not be completed!"
No Lesson was created in the target course
Create a new course Foo.
In Foo, Administration -> Import
Specify the Features course
Select Lessons (there is only one Lesson)
Import proceeds to the step where the Lesson is being imported into the target course...
...
...
# Creating user level role assignments and overrides
# Checking course
# Cleaning temp data
and then gives a pink box "An error has occurred and the restore could not be completed!"
No Lesson was created in the target course
In this specific instance, I may have hit an upload limit on the import (and gotten the unhelpful error message), but in other cases, I have seen significant differences in behavior from the reference implementation -- like a missing Authenticated user role -- which cannot be explained by concurrent users (Authenticated user cannot be deleted).
Hi John,
I take your point that demo.moodle.org should reflect the latest stable version and it can be useful for testing in a repeatable environment.
However, since it is open to any- and every-one, especially as admin, you can never be sure of the environment you are working in. Someone logged in as admin may well have switched on or off some parameters in the administration panel, so you can never be sure of anything, contrary to working on your own locally based test site, such as the ones I am running on my machine for testing purposes.
As regards the Lesson import, I have just done the following:
logged in as admin
create a new course CF102
from CF102 import lesson : How to use the Lesson Module from CF 101
Set import Course files to No
Just at the end of the import process I see this:
* Cleaning temp data
An error has occurred and the restore could not be completed!
I go to Course CF102 and ... the imported lesson is there, in spite of the error warning (see attached screen shot).
So I do not draw the conclusion that Lesson import does not work in Moodle 1.8.2. QED.
All the best,
Joseph
I take your point that demo.moodle.org should reflect the latest stable version and it can be useful for testing in a repeatable environment.
However, since it is open to any- and every-one, especially as admin, you can never be sure of the environment you are working in. Someone logged in as admin may well have switched on or off some parameters in the administration panel, so you can never be sure of anything, contrary to working on your own locally based test site, such as the ones I am running on my machine for testing purposes.
As regards the Lesson import, I have just done the following:
logged in as admin
create a new course CF102
from CF102 import lesson : How to use the Lesson Module from CF 101
Set import Course files to No
Just at the end of the import process I see this:
* Cleaning temp data
An error has occurred and the restore could not be completed!
I go to Course CF102 and ... the imported lesson is there, in spite of the error warning (see attached screen shot).
So I do not draw the conclusion that Lesson import does not work in Moodle 1.8.2. QED.
All the best,
Joseph

Hi Joseph,
I assume that my Lesson import failed on the demo site because of the upload limit, and I added a mea culpa to MDL-10867. Attempting to import a single Lesson with no user data resulted in an astounding 5.2MB backup file, which exceeded the 2MB upload limit on the demo site.
One could wish for two things: (1) a more informative diagnostic than "an error has occurred!" (at least remove that awful exclamation point) (2) more efficient/selective backups (e.g., don't drag along all the site files -- see this discussion).
Regarding your statement
I plan to continue to use the demo site for testing, simply because it is so convenient to do so. However I promise to double-check negative results on my own test site before posting to the tracker!
I assume that my Lesson import failed on the demo site because of the upload limit, and I added a mea culpa to MDL-10867. Attempting to import a single Lesson with no user data resulted in an astounding 5.2MB backup file, which exceeded the 2MB upload limit on the demo site.
One could wish for two things: (1) a more informative diagnostic than "an error has occurred!" (at least remove that awful exclamation point) (2) more efficient/selective backups (e.g., don't drag along all the site files -- see this discussion).
Regarding your statement
Someone logged in as admin may well have switched on or off some parameters in the administration panel, so you can never be sure of anything, contrary to working on your own locally based test site, such as the ones I am running on my machine for testing purposes.
I think this danger is greatly exaggerated. I have been using the demo site this way ever since I started with Moodle, and I can tell you with complete confidence that it has never happened to me. If there is a collision, it's always quite obvious, except perhaps when it comes to roles. There are certain precautions I take when working with roles so that I don't affect others and others don't affect me (e.g., duplicate a role and reset it to defaults before overriding). I plan to continue to use the demo site for testing, simply because it is so convenient to do so. However I promise to double-check negative results on my own test site before posting to the tracker!
Hello -
I'm having a problem with both of these approaches. The end result is that I have successfully imported the lesson into my course, but it doesn't appear anywhere except in the page where all of lessons are listed. How can I make it a visible course in one of the course topics?
Any suggestions? Am I missing something simple?
Thanks,
Simon
Sorry - figured it out. When you import a lesson, moodle tries to restore it to the same Topic # from which it came, and in my case the the equivalent topic # did not exist. When I expanded the number of topics in the target course, the imported lesson appeared there and I was able to move it to the desired topic.
Phew.
s.