Moodle

Moving activities and resources (course modules) between distinct courses

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major 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.

  1. screenshot-1.jpg
    57 kB
    06/Oct/07 4:37 PM

Activity

Hide
Valery Fremaux added a comment -

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).

Show
Valery Fremaux added a comment - 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).
Hide
Valery Fremaux added a comment -

Additional lib file for filesystem operations

Show
Valery Fremaux added a comment - Additional lib file for filesystem operations
Hide
Valery Fremaux added a comment -

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.

Show
Valery Fremaux added a comment - 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.
Hide
Valery Fremaux added a comment -

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 !!)

Show
Valery Fremaux added a comment - 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 !!)
Hide
Mark Pearson added a comment -

Valery,
My faculty would also like to see an option to copy resources/activity objects within a course.
Mark

Show
Mark Pearson added a comment - Valery, My faculty would also like to see an option to copy resources/activity objects within a course. Mark
Hide
Valery Fremaux added a comment -

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.

Show
Valery Fremaux added a comment - 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.
Hide
Valery Fremaux added a comment -

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.

Show
Valery Fremaux added a comment - 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.
Hide
Mark Pearson added a comment -

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?

Show
Mark Pearson added a comment - 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?
Hide
Valery Fremaux added a comment -

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.

Show
Valery Fremaux added a comment - 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.
Hide
Valery Fremaux added a comment -

Could you tell me more about ? Thanks.

Show
Valery Fremaux added a comment - Could you tell me more about ? Thanks.
Hide
Valery Fremaux added a comment -

Code reviewed on 1.9 basis and pushed to CVS under CONTRIB/patches/move_activity_between_courses

Show
Valery Fremaux added a comment - Code reviewed on 1.9 basis and pushed to CVS under CONTRIB/patches/move_activity_between_courses
Hide
Dominique-Alain Jan added a comment -

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.

Show
Dominique-Alain Jan added a comment - 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.
Hide
Don Hinkelman added a comment -

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

Show
Don Hinkelman added a comment - 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
Hide
Valery Fremaux added a comment -

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.

Show
Valery Fremaux added a comment - 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.
Hide
Don Hinkelman added a comment -

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.

Show
Don Hinkelman added a comment - 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.
Hide
Eloy Lafuente (stronk7) added a comment -

NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

Show
Eloy Lafuente (stronk7) added a comment - NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

Dates

  • Created:
    Updated: