- topic summaries aren't copied
- course files aren't copied (though references to them are)
- exercise module kills it
There have been some improvements on MOODLE_15_STABLE (just look at the release notes!). Limitations of backup/restore still apply (such as limitations wrt quiz attempts). OTOH, I haven't seen the problems you mention -- could you give us more detail on those?
For example, does performing a manual backup/restore do things better/different than using 'import course data'? Should have the exact same results, as it uses the same code...
However, it seems section titles and course structure import is still not supported in import course data.
It seems to me there should be an option to 'duplicate previous course'.
Here is the scenario: say your institution uses LDAP or other method of automatically setting up course shells. So you taught My Course 101 in the fall semester, and you had it set up how you liked it.
So your course shell gets automatically setup for My Course 101 for the spring semester, and of course it is empty as the 'template' course was.
Cool, you'll use 'import course data' to bring in 'My Course 101' from the previous semester. But that loses all your section titles and your course organization (if you had more/less sections than the template course)8-(.
So instead, you have to go into your fall course, backup the fall course, download it, upload to your spring course, and do a 'restore to current course, deleting it first', to get a duplicate of your fall course in your spring course. This is a real problem with large courses.
It seems to me the best solution would be for an option in import course data, for teachers to duplicate a course they are a teacher of, over the course they are in (with a warning of course).
A second, more awkward solution would be for teachers to be allowed to use the admin feature of copying one course over another course (Restore to existing course, deleting it first), if they are a teacher of both courses.
> 'duplicate previous course'.
Meh, I think we should fix the bug instead
With two reports, it sounds like we do have a bug in there... unless you two are conspiring! The thought!
We need to fix this now, do you all have a planned approach? Two choices seem to be:
1) Add a check box for summaries which allows teachers to import the entire course.
2) Fix backup/restore so that teachers can backup (replace completely) into any of the courses they own (why in the world can't they?).
How does NZVLE handle semester transitions without this?
It would be hugely helpful for the import course data feature to work well.
The idea would be an addition to our "Course Wizard", which lets facult show/hide their courses and cross-list courses (make meta-courses) from one screen. The course recycle wizard would give a list of previous courses on one side, and let them copy a previous course into an existing (empty) course shell.
In the background it would run the backup and restore code, without user data, and replace completly the empty course shell with the previous course.
That is the plan, anyway.
But we don't want too spend time on this if NZVLE is going to fix import course data in the core (currently I would call it broken as it only imports some course data, and leaves at least our faculty quite confused when it is through, since they end up with content seemingly randomly distributed in their course shell rather than a copy of the previous course strurture, block layout, etc).
It seems to me a simple fix for icd would be to include a check box for "Completely replace current course with imported course" or some such. This would be be a little more complex, but I would rather use something that is a standard feature than develop our own tool that we'll have to support.
Jeff is going to start looking at 1.6 to see if this is addressed and/or what it will take to fix it, but it would be great if you could let us know where you all are planning to go with the feature.
I'm taking a look into resolving the issue of sections and blocks not being imported via import course data. Upon reviewing 1.6 it appears that there is a potential security issue as the datadir is exposed via a get URL
To fix the mentioned 'bug' I was thinking of adjusting the script to add the following drop down options (like in a normal restore) to do the following
- restore to existing course, deleting it first (include sections and blocks)
- restore to existing course, adding data to it (current behavior)
I am happy to take patches for this, feel free to email me directly if I don't reply in the forums!
The manual backup/restore is better. The exercises are still skipped but the Topic Summaries and Course files are OK. Additionally, the backup/restore grabs the right number of topics (with 'import course data' if you have fewer topics in the receiving shell items get dumped in topic 0) and the blocks transfer (no block transfer in 'import course data').
Something slightly different is going on in each action, at least on my box.
Using the new course import structure in 1.6, I was able to fix the problems with the course import. Thanks to whomever implemented the new format.
The attached fix will allow the instructor of a course to import all course data into/over the existing course. Just untar the attached file into $CFG->dirroot/course/import it will be called course.
Also you will need to define the string 'importcourse' in /lang/en_utf8/moodle.php or whichever lang for your installation
This is also listed as bug 5509
Could someone review and consider it for 1.6?
1. No effort is presently made to import section summaries. I have a patch for 1.5.4/1.6 that catenates the from and to course topic summaries, that works especially well when the 'to' course is empty, but at least prevents the loss of the summary text. Perhaps this behaviour should be configurable? It would be problematic if repeated imports were done, ie, summary text would then be duplicated.
I could have copied a 'from' summary only if the 'to' summary were empty... what's the right choice? Maybe this is why it wasn't done originally ?
2. As to blocks being lost in the import, this is an explicit choice in that restore_create_blocks() isn't invoked when restoreto == 1 (ie, import). Is this truly desirable, and again, if rectified, should it be configurable?
I liked Jeff's addition of sections/topics to the 'to' course when needed to match the section count of the 'from' course, and so I include a patch to import in both 1.5.4 and 1.6.
Is the version you looked at the same as the attached version here? There were a few different versions floating around.
Also, this doesn't address an option to "backup everything and stop nagging me" that Martin and I had discussed.
This version should be a bit more organic than some of my earlier ideas.