Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.2
-
Fix Version/s: STABLE backlog
-
Component/s: Course
-
Labels:
-
Environment:Win XP Pro, Apache 2.0.59, Mysql 5.0.3, Php 5.2.3
-
Database:MySQL
-
Affected Branches:MOODLE_18_STABLE
Description
This patch (it is the first I try to make) alters the /course package, adding the possibility to move any course module from a course to another, relocating it in the target course. The course module is moved after checking the module is moveable.
Module moveability is actually proposed as a course/lib.php additional function, that should proxy the implementation of how a module will tell the course it may be moveable or not.
Course module is moved along with its attached resources, pursuant they are stored within the moodledata/<courseid>/moddata/<coursemoduleid>/ directory. Original resources are cleaned out. All metadata
are correctly fixed, so are section assignements. The instance itself IS NOT renumbered so it remains unchanged.
A callback to an aditional module API is optional (called if exists in the module's lib). This callback will allow a module to perform additional custom data relocating. In case the callback is used, it overrides standard move of physical resources. The module programmer should procede himself to the physical resources relocation. Using a black callback code can disable the attempt to relocate physical files.
I tried moveability between two "topic" formated courses, but moveability relies on sections, so it should work between both course formats.
Moveability relies on two additional capabilities :
moodle/course:exportmodule : the capability the user has to export out a course module
moodle/course:importmodule : the capability the user has to import in a course module
The user MUST have both capabilities (export on source course, import on target course) to be allowed to perform the move.
STILL TO TODO : check inocuity of the move for complex modules. I tried with resources and forums, but some particular modules may be not so easy to move. Moveability check will disable this feature if there is no known moving strategy available.
Check what's the consequence over grades and logs.
FROM A END USER POINT OF VUE :
Moving a single resource is very interesting when a teacher (mainly the editing teacher needs to move resources) arranges a set of courses and reorganizes teaching materials. There is till now no easy way to do this unless destroying the resource and recreating it elsewhere (copy/cut content). This discourages using Moodle as the "major" authoring environment (so I use it !!), having all ressource (in work, in progress and published) as relocatable objects in courses.
Many people asked on forum the way to perform that kind of relocation. This patch may be an answer to that requirements.
Attachments
-
$i18n.getText("admin.common.words.hide")
- patch_moveactivity_moodle_0.4.zip
- 11/Oct/07 6:26 AM
- 40 kB
- Valery Fremaux
-
- dev_moveactivity_moodle/.../ajaxsectionloader.php 0.5 kB
- dev_moveactivity_moodle/.../lib.php.diff 11 kB
- dev_moveactivity_moodle/.../lib.php.sample 112 kB
- dev_moveactivity_moodle/.../mod.php.diff 3 kB
- dev_moveactivity_moodle/.../mod.php.sample 32 kB
- dev_moveactivity_moodle/.../mod_change_course.html 6 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.8 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.9 kB
- dev_moveactivity_moodle/.../filesystemlib.php 12 kB
$i18n.getText("admin.common.words.show")- patch_moveactivity_moodle_0.4.zip
- 11/Oct/07 6:26 AM
- 40 kB
- Valery Fremaux
-
$i18n.getText("admin.common.words.hide")
- patch_moveactivity_moodle.zip
- 06/Oct/07 5:47 PM
- 11 kB
- Valery Fremaux
-
- dev_moveactivity_moodle/.../ajaxsectionloader.php 0.5 kB
- dev_moveactivity_moodle/.../lib.php.diff 11 kB
- dev_moveactivity_moodle/.../mod.php.diff 3 kB
- dev_moveactivity_moodle/.../mod_change_course.html 5 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.8 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.9 kB
- dev_moveactivity_moodle/.../filesystemlib.php 12 kB
$i18n.getText("admin.common.words.show")- patch_moveactivity_moodle.zip
- 06/Oct/07 5:47 PM
- 11 kB
- Valery Fremaux
-
$i18n.getText("admin.common.words.hide")
- patch_moveactivity_moodle.zip
- 06/Oct/07 4:09 PM
- 11 kB
- Valery Fremaux
-
- dev_moveactivity_moodle/.../ajaxsectionloader.php 0.5 kB
- dev_moveactivity_moodle/.../lib.php.diff 10 kB
- dev_moveactivity_moodle/.../mod.php.diff 4 kB
- dev_moveactivity_moodle/.../mod_change_course.html 5 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.8 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.9 kB
- dev_moveactivity_moodle/.../filesystemlib.php 12 kB
$i18n.getText("admin.common.words.show")- patch_moveactivity_moodle.zip
- 06/Oct/07 4:09 PM
- 11 kB
- Valery Fremaux
-
$i18n.getText("admin.common.words.hide")
- patch_moveactivity_moodle.zip
- 06/Oct/07 6:31 AM
- 37 kB
- Valery Fremaux
-
- dev_moveactivity_moodle/.../ajaxsectionloader.php 0.5 kB
- dev_moveactivity_moodle/course/lib.php 112 kB
- dev_moveactivity_moodle/course/mod.php 32 kB
- dev_moveactivity_moodle/.../mod_change_course.html 5 kB
- dev_moveactivity_moodle/.../lib.php.diff 10 kB
- dev_moveactivity_moodle/.../mod.php.diff 4 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.8 kB
- dev_moveactivity_moodle/.../coursexfers.php 0.9 kB
$i18n.getText("admin.common.words.show")- patch_moveactivity_moodle.zip
- 06/Oct/07 6:31 AM
- 37 kB
- Valery Fremaux
-
- screenshot-1.jpg
- 57 kB
- 06/Oct/07 4:37 PM
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Third patch fixes last minute bugs in file tree management.
Glossaries are correctly handled by the relocation operation
Fixed : operation logs transfer as convenient in both source and dest courses.
Fourth version : fixes filesystemlib.php bug when creating pathes for physical resources.
changes strategy for finding target courses
fixes bugs when editing teacher
fixes a display bug when teacher that masks the "move module" link.
Hope it's the last one (never say never !!)
Valery,
My faculty would also like to see an option to copy resources/activity objects within a course.
Mark
hi Mark
This is another story !! I just managed to move the course_module record from a course to another, that was quite easy. I think it could be possible to copy an activity within the course, as the new instance sould share same operative environment (such as groups, which is a main issue when moving from a course to another).
What is the exact scope of copying an activity within the course, most of the activities need little configuration and are not very long to setup, although a new instance do not inherits data indeed. Is that what you expect that data should be cloned ?
I foresee a possibility to backup/import a single module. Everything is ready in the module API for such an operation (entry point in the module backup/restore API exist at sufficiant high level to perform it). I even envisaged that possibility before programming the patch, which should even have been a more general way to move a module. I will have a look to that solution, if it seems being popular.
Thanks for applying.
Mark,
note that I just figured me out that the course "import" feature allows yet to copy an activity of another course. You're right saying it doesn't allow copying an activity from the same course.
Valery,
>What is the exact scope of copying an activity within the course,
Many faculty have similar activities that they want students to do every week. Thus they might have a reading assignment to be completed every Monday for the 15 week semester. This means that they have to create 15 assignments copies that are 90% alike. Add in other activities that take place every Wednesday and Friday and you have a recipe for error prone frustration in setting up the course. There used to be a (rather clunky but nevertheless effective) workaround –
http://www.earlham.edu/~markp/moodle_dox/#%5B%5BDuplicate%20Activity%5D%5D – but this is now broken :
http://ec281.lly.earlham.edu/tw/miss/#%5B%5BDuplicate%20Activity%20non-functional%5D%5D
Why not have an icon added to each activity in the Outline when in editing mode that merely 'clones' or duplicates the activity?
There is of course a "hard" way of doing it, procedure is not so mysterious for many activities that cope with the general Moodle activity model. Activity cloning is just a bit more sophisticated. I'll think of it and will stack it on my yet long todo list.... Will keep you informed.
Code reviewed on 1.9 basis and pushed to CVS under CONTRIB/patches/move_activity_between_courses
Valery,
For some courses we use the weekly format and because we give "more or less" the same course to half a class every week, we have to duplicate most of the activities and labels.
Also we have some teachers who teach the same material in two or three different classes. A way to duplicate ressources or part of a course would be a great improvment for them.
The Sharing Cart (released for 1.9 this week) provides similar functionality for moving activities and resources across courses. See discussion here: http://moodle.org/mod/forum/discuss.php?d=87044 The Project format provides section level backup and import. The Sharing Cart is a block that follows a teacher wherever she/he is in a site. The Sharing Cart can pick up any individual activity or resource, place it in a personal library or "cart", and insert the activity into any other location in other courses. I believe Issue 11288 is similar to this. See
http://tracker.moodle.org/browse/MDL-11288
Hi Don
This is a very good news. I'm sure this concept of having a "doggy bag" following the user is a great alternative. I guess it will use Ajax drag'n'drop, will it ?
We have a need with my friends at Catalyst for the Sharing Cart being available for students either, but of course without the possibility of creating copies of anything, just for keeping a link to valuable stuff. Should this be possible ? ... and if it is, relatively soon ? (I know i'm asking a lot...).
I will post in the mentionned dicussion also.
Thanks for commenting. We might release that improvment request.
Wonderful! I see this issue has been fixed. Is there a link or an explanation about what was fixed? Was the Sharing Cart block interface adopted or another strategy? This will affect whether we need to continue developing the Sharing Cart for Moodle 2.0. See MDL-19721.
NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.
I don't know by now how to describe additional "core" capabilities. I mentioned the two additional capabilities needed for moving resource, Using the patch make move operational for admins, without the capabilities being added to database.
the patch was made using internal WinCVS 1.3 Diff.
the zip provides an additional HTML form for setting relocation parameters, and a small "ajax" elementary Web Service.
Note that Ajax should be enabled to be able to relocate by choosing the target section. With Ajax disabled, you only will able to relocate the course module at the beginning (first entry in section 0) or the end of the course (last entry in last section).