Moodle

restore: implement all the rest of activities restore

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Backup
  • Labels:
    None
  • Difficulty:
    Moderate
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

We should implement all these:

assignment: done
chat: done (Dan)
choice: done
data: done (Eloy) not using subplugin support. Also see MDL-22558
feedback: done (Dan)
folder: done (Dan)
forum: done
glossary:done
hotpot: requires work on module - halted
imscp: done
label: done (Dan)
lesson: done (Dan)
page: done (Dan)
quiz: done
resource (file): done (Dan)
scorm: done (Dan). Note: missing logs restore?
survey: done (Dan)
url: done (Dan)
wiki: done (Dan)
workshop: done (see MDL-19936 for details)

Legend:

implemented
reserved / in progress
todo
cannot be done yet - requires backup stuff
cannot be done yet - requires bug fixing
once implemented, has been tested and old stuff (but restore of logs) have been deleted.
restore of logs implemented

Issue Links

Activity

Hide
Dan Marsden added a comment -

Hi Eloy - I'm available to get stuck into some of this - as soon as the first activity/example restore is available

Show
Dan Marsden added a comment - Hi Eloy - I'm available to get stuck into some of this - as soon as the first activity/example restore is available
Hide
Eloy Lafuente (stronk7) added a comment -

forum done and added new legend:

once implemented, has been tested and old stuff (but restore of logs) have been deleted.

Plz, don't delete old stuff, I'll be doing that while reviewing the activities.

Show
Eloy Lafuente (stronk7) added a comment - forum done and added new legend: once implemented, has been tested and old stuff (but restore of logs) have been deleted. Plz, don't delete old stuff, I'll be doing that while reviewing the activities.
Hide
Martin Dougiamas added a comment -

What's the story on subplugins here?

Show
Martin Dougiamas added a comment - What's the story on subplugins here?
Hide
Eloy Lafuente (stronk7) added a comment -

The same than the one in backup (MDL-22245). Someone decided that activities were going to continue having subplugins (assignments, database, workshop) when we were, some time ago, aiming to eliminate them (like happened with resources, splitting them into proper modules).

So, instead of leaving each module (developer) to decide how to implement subplugins support in backup & restore... now they are core-supported, with one "correct way to declare and handle them".

Under 1.9.x each subplugin had its own implementation, calling to different (own) stuff. In 2.0, it's mandatory to follow the "official" way, so only correct subplugins (declared in db/subplugins.php) will be allowed and they will be handled in a core-defined way.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - The same than the one in backup (MDL-22245). Someone decided that activities were going to continue having subplugins (assignments, database, workshop) when we were, some time ago, aiming to eliminate them (like happened with resources, splitting them into proper modules). So, instead of leaving each module (developer) to decide how to implement subplugins support in backup & restore... now they are core-supported, with one "correct way to declare and handle them". Under 1.9.x each subplugin had its own implementation, calling to different (own) stuff. In 2.0, it's mandatory to follow the "official" way, so only correct subplugins (declared in db/subplugins.php) will be allowed and they will be handled in a core-defined way. Ciao
Hide
Eloy Lafuente (stronk7) added a comment - - edited

Oki, at this point, these are missing:

  • data activity: there are some problems in the module (file related mainly) being the cause for its backup being halted. Anyway, once everything is in place, it's a matter of a 4-5 hours to implement and test both backup & restore.
  • hotpot activity: as far as it has been moved to contrib (lack of 2.0 compliant code), cannot be done.
  • quizz activity: this is the worst one. And needs deep analysis. Main problem is that current way to select candidate question categories can lead to lost categories (causing quizzes to be inconsistent) under some circumstances. Also, the backup format will have to change in a noticeable way from 1.9.x one. I think it's a matter of, at least 2 weeks of work to understand/implement the whole thing.

Also note that some parts of the activities aren't yet being restored, mainly:

  • activity grades: I've it 90% done. Not sure if I'll be able to commit it today. Note this isn't the whole gradebook (categories and calculated grade items, it's another subtask, but the individual activity grade items).
  • activity logs: require one central API to handle all them in an efficient way. For now I've left old 1.9 code as reference. I've some ideas, will continue thinking on them.
  • activity completion/availability: all the information is in backup, but it needs some more time to see how it's spread (course_modules table, each activity...) in order to implement it properly. I think this isn't really complex, but surely will be performed at the end of the process (once all activities/grades have been restored).
Show
Eloy Lafuente (stronk7) added a comment - - edited Oki, at this point, these are missing:
  • data activity: there are some problems in the module (file related mainly) being the cause for its backup being halted. Anyway, once everything is in place, it's a matter of a 4-5 hours to implement and test both backup & restore.
  • hotpot activity: as far as it has been moved to contrib (lack of 2.0 compliant code), cannot be done.
  • quizz activity: this is the worst one. And needs deep analysis. Main problem is that current way to select candidate question categories can lead to lost categories (causing quizzes to be inconsistent) under some circumstances. Also, the backup format will have to change in a noticeable way from 1.9.x one. I think it's a matter of, at least 2 weeks of work to understand/implement the whole thing.
Also note that some parts of the activities aren't yet being restored, mainly:
  • activity grades: I've it 90% done. Not sure if I'll be able to commit it today. Note this isn't the whole gradebook (categories and calculated grade items, it's another subtask, but the individual activity grade items).
  • activity logs: require one central API to handle all them in an efficient way. For now I've left old 1.9 code as reference. I've some ideas, will continue thinking on them.
  • activity completion/availability: all the information is in backup, but it needs some more time to see how it's spread (course_modules table, each activity...) in order to implement it properly. I think this isn't really complex, but surely will be performed at the end of the process (once all activities/grades have been restored).
Hide
Eloy Lafuente (stronk7) added a comment -

activity grades restore 100% implemented and landed to CVS. It was longer than expected due to problem found when deleting grade_items, finally seems to be one completion-related bug: MDL-23701

So only activity logs and activity completion/availability are missing. Ciao

Show
Eloy Lafuente (stronk7) added a comment - activity grades restore 100% implemented and landed to CVS. It was longer than expected due to problem found when deleting grade_items, finally seems to be one completion-related bug: MDL-23701 So only activity logs and activity completion/availability are missing. Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Activity completion/availability implemented.

Only activity logs are pending... and coming soon, ciao

Show
Eloy Lafuente (stronk7) added a comment - Activity completion/availability implemented. Only activity logs are pending... and coming soon, ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Just committed the data module backup & restore a few minutes ago. It isn't using subplugins support as far as, for now, no field is using custom DB structures.
Also, very important, note that it's handling only the current existing file areas (data->intro and content->content). If new file areas arrive due to MDL-22558, they will have to be added to backup & restore.

Ciao

PS: I'm 95% on quizzes now (with all their categories/question labyrinth).

Show
Eloy Lafuente (stronk7) added a comment - Just committed the data module backup & restore a few minutes ago. It isn't using subplugins support as far as, for now, no field is using custom DB structures. Also, very important, note that it's handling only the current existing file areas (data->intro and content->content). If new file areas arrive due to MDL-22558, they will have to be added to backup & restore. Ciao PS: I'm 95% on quizzes now (with all their categories/question labyrinth).
Hide
Eloy Lafuente (stronk7) added a comment -

Las one, quiz, added.

Only activity logs restore is missing, working on it.

Show
Eloy Lafuente (stronk7) added a comment - Las one, quiz, added. Only activity logs restore is missing, working on it.
Hide
Eloy Lafuente (stronk7) added a comment -

All the actvities logs backup & restore implemented, by checking agains all uses in code base. Seem to be working ok.

Anyway... we should retake the logs thing in the future to normalize and make them more useful, right now it's total anarchy on each activity.

Ciao

Note: Workshop is still pending (wik) but I wanted all the rest to land NOW (before working in other blocker I've assigned).

Show
Eloy Lafuente (stronk7) added a comment - All the actvities logs backup & restore implemented, by checking agains all uses in code base. Seem to be working ok. Anyway... we should retake the logs thing in the future to normalize and make them more useful, right now it's total anarchy on each activity. Ciao Note: Workshop is still pending (wik) but I wanted all the rest to land NOW (before working in other blocker I've assigned).
Hide
Eloy Lafuente (stronk7) added a comment -

And workshop also landed to CVS. 100% finished, yay! Ciao

Show
Eloy Lafuente (stronk7) added a comment - And workshop also landed to CVS. 100% finished, yay! Ciao

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: