Issue Details (XML | Word | Printable)

Key: MDL-8848
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Eloy Lafuente (stronk7)
Reporter: Charles Kelly
Votes: 32
Watchers: 27
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-13847

Summaries don't get imported from the source course to the destination course.

Created: 11/Mar/07 08:51 PM   Updated: 01/Sep/09 11:00 PM
Return to search
Component/s: Course
Affects Version/s: 1.7.4, 1.8.4, 1.9
Fix Version/s: 1.8.9, 1.9.5

File Attachments: 1. Text File mdl-8848.patch (1 kB)

Image Attachments:

1. summaries_dont_get_imported.jpg
(130 kB)
Issue Links:
Dependency
 

Participants: Alan Trick, Caroline Moore, Charles Kelly, Clark Shah-Nelson, Dan Poltawski, Eloy Lafuente (stronk7), Helen Foster, Jeff Therrien, Kenneth Newquist, Martín Langhoff, Michael Woods, Pablo Vannini, Paul Ortman, Ralf Hilgenstock, Robert Puffer, Stuart Morrison and Teresa Gibbison
Security Level: None
Resolved date: 05/Feb/09
Affected Branches: MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
When importing a course to a new course, the "Summary" part of each week does not get imported into the new course.

I've include an image with a screenshot of the "source" course on the left and the "destination" course on the right.

== Note to others who find this to be a problem ==
The work around for this is to not use the "summary" but include the "summary" part as a label at the top of each lesson.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Ralf Hilgenstock added a comment - 09/Jun/07 07:29 PM
Having the same problem in all versions 1.7.2, 1.8., 1.9

Priority shouldn't be minor!!!


Ralf Hilgenstock added a comment - 10/Jun/07 03:53 PM
This is the error report with activated debug mode in 1.9:

Notice: Undefined index: assignment in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: chat in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: choice in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: data in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: glossary in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: journal in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: lesson in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: quiz in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: resource in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: scorm in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: survey in /mydomain.de/moodle/backup/restorelib.php on line 5901

Notice: Undefined index: workshop in /mydomain.de/moodle/backup/restorelib.php on line 5901

  • Verwende vorhandenen Kurs
    o Von: Testkurs 101 (test101)
    o Bis: Kursnametest (tee)

Notice: Undefined property: deleting in /mydomain.de/moodle/backup/restorelib.php on line 5963
o Füge Daten zu bestehenden hinzu

Notice: Undefined property: deleting in /mydomain.de/moodle/backup/restorelib.php on line 5971

  • Abschnitte prüfen

Notice: Undefined property: metacourse in /mydomain.de/moodle/backup/restorelib.php on line 6121

Notice: Undefined index: quiz in /mydomain.de/moodle/backup/restorelib.php on line 6143

Notice: Undefined property: user_files in /mydomain.de/moodle/backup/restorelib.php on line 6163

  • Kursdateien kopieren

Notice: Undefined property: messages in /mydomain.de/moodle/backup/restorelib.php on line 6217

  • Bewertungsskalen erstellen
  • Gruppen einrichten .
    .
  • Gruppierungen erstellen
  • Termine erstellen
  • Kursaktivitäten erstellen

Notice: Undefined property: course_startdateoffset in /mydomain.de/moodle/mod/forum/restorelib.php on line 48
o Forum "News forum"

Notice: Undefined property: course_startdateoffset in /mydomain.de/moodle/mod/forum/restorelib.php on line 48
o Forum "f"
o Überschrift/Text "Lable 1-2."

Notice: Undefined property: course_startdateoffset in /mydomain.de/moodle/mod/wiki/restorelib.php on line 38
o Wiki "gt"

  • Bewertungen erstellen
    Notice: Use of undefined constant outcomecount - assumed 'outcomecount' in /mydomain.de/moodle/backup/restorelib.php on line 1185

Notice: Undefined property: logs in /mydomain.de/moodle/backup/restorelib.php on line 6386

  • Instanzen prüfen
  • Termine aktualisieren
  • Dekodiere interne Links
    o Von Foren
    o Von Überschriften/Texte
    o Von Wikis
    o Von Fragen
  • Rollendefinitionen erstellen
  • Rollenzuweisungen und -änderungen auf Kursebene erstellen
  • Rollenzuweisungen und -änderungen auf Modulebene erstellen
  • Rollenzuweisungen und -änderungen auf Nutzerebene erstellen
  • Kurs prüfen
  • Temporäre Dateien löschen
  • Closing the Restorelog.html file.

Eloy Lafuente (stronk7) added a comment - 10/Jun/07 04:58 PM
Uhm... since the beginning the behaviour for section on restore has been:

1) If we are restoring to a NEW course (not existing yet), then restore the section information (summary...).

2) If we are restoring to an EXISTING course:
— 2a) If the section exists in destination course then restore activities to existing section but leaving section information unmodified.
— 2b) If the section doesn't exist in destination course then restore activities to section 0 (the first-special one)

So, it should work ok if you haven't the destination course created (situation 1). But, if you are using the import feature, instead of the restore one, I guess that then, the course exists, so situation 2 will be applied.

I think we followed such approach to avoid overwriting information when restoring to EXISTING courses (2). Although, perhaps, it could be a bit more clever and, when restoring/importing to existing courses we could restore the summary information if it's EMPTY at destination.

Just typing as I think....hope this helps...ciao


Martín Langhoff added a comment - 14/Jun/07 10:59 AM
We have gone through this with Matt Clarkson (CC'd) and it works correctly for us. As Eloy points out, terhaps it is related to restoring to an empty course vs letting the restore process create the new course.

Ralf Hilgenstock added a comment - 14/Jun/07 02:35 PM
As Eloy explained the behaviour seems to be correct, but the expected behaviour of an import process is an other one.

Let me explain the situations we often found.
Course creator or external system opens a new course and adds students in this course after a while.
Teacher is going to the new course and adds existing content or complete courses in the new course using the import or restore process.
Eloys case 1) doesn't work in this situation.
2) My problem are the standard headline labels (Summaries) in each section, that are in each new course in each section.

The process informations doesn't inform the teacher that some elements are not imported.

The initial labels in the sections exists in each course as an empty area.

My ideas for further developments:
a) The import and restore check if the section labels are empty and add the content then.
b) If the section labels are not empty the user is requested to overwrite or to skip it.
c) Coloured Information text in the import/restore report.


Jeff Therrien added a comment - 25/Aug/07 07:25 AM
This issue still affects 1.9beta, as of August 24/07.

Clark Shah-Nelson added a comment - 21/Nov/07 12:39 AM
Please keep this ticket to the IMPORT function only - not restore.
This issue should be fixed - importing a course should import everything - including each module's summary.

Dan Poltawski added a comment - 03/Jan/08 04:27 AM - edited
Something like this would allow the section summary to be updated when not set. Though its sub-optimal perf wise and also needs more sanity checking

Ralf Hilgenstock added a comment - 03/Jan/08 05:46 AM
Hi Dan, sorry, but I'm not a developer. As far as I understand the code, it checks if there is a standard label entry.If there is no label it adds a content. I didn't see what happens if there is content.

Can you add a function in case of a section exists that a new label is created.


Pablo Vannini added a comment - 01/Mar/08 02:31 AM
Having the same problem in 1.8.4

Priority shouldn't be minor!!!


Eloy Lafuente (stronk7) added a comment - 01/Mar/08 03:28 AM
Well, just trying to re-organize a bit the thoughts about this report:

1) Trivial but very important. We are talking about section summaries. Not labels nor anything else.

2) This is current behaviour:

a) If we are restoring to a NEW course (not existing yet), section summaries ARE restored.
b) If we are restoring to an EXISTING course, DELETING previous data, section summaries ARE restored.
c) If we are restoring to an EXISTING course, KEEPING previous data, section summaries ARE NOT restored.
d) If we are importing to an EXISTING course, section summaries ARE NOT restored.

3) Given the previous behaviour, can all we agree what (a,b,c,d) to change, and how (always, based on setting, when empty...) ?

Ciao


Alan Trick added a comment - 01/Mar/08 07:02 AM
I don't know if this would be the best solution, but what about (for c and d) you append the old summaries to the new ones?

Ralf Hilgenstock added a comment - 01/Mar/08 09:26 PM
Teacher mostly think that ignoring section summaries in case c) and d) are bugs. It will be more transparent if they are asked to add, replace or to ignore the section summaries from the imported course content while restoring/importing.

Idea from a non developer:
a) Check the restored/imported content if it contains anything in the section summaries.
b) Check the existing course if there are contents in the matching section summaries only if there is a postitive result in a)
c) ask teacher if he wants to add imported/restored section summaries to a new label, to overwrite (replace) existing section summaries or it in the existing section summaries

I really don't know if it is possible..


Kenneth Newquist added a comment - 16/Jul/08 04:48 AM
Just tested the patch under Moodle 1.9.2 (Build: 20080711) and it solved the "import summaries" problem nicely. I see it's scheduled to be rolled into Moodle 1.9.3; is there any other tweaking/testing that's needed to get it there?

Kenneth Newquist added a comment - 16/Jul/08 11:34 PM
This patch also changes these two scenarios so what

c) If we are restoring to an EXISTING course, KEEPING previous data, section summaries ARE NOT restored.
d) If we are importing to an EXISTING course, section summaries ARE NOT restored.


After the patch, restoring a course will bring in the topic summaries if those summaries are blank in both of these scenarios. This is the behavior we would expect and (in our case) want.


Clark Shah-Nelson added a comment - 09/Oct/08 10:41 PM
I'd like to add something further which I just added in another similar ticket:

other options that are needed in import function:

BLOCKS - it would be great to have these imported as well, or at least an option to if desired
SETTINGS - such as # of topics/weeks, forced theme, availability, etc.
ROLL DATES - set a new start date and have the dates on assignments/quizzes/forums/activities roll forward into the new term.
USERS - allow importing teacher to select roles to import from previous course, too. So when there are several teachers in 1 course, they can import them all as well.

This would truly make the import function self-sustaining for faculty and cut down on the amount of work it takes to prepare courses from term to term for those like us that have new courses created by the SIS each term.


Stuart Morrison added a comment - 12/Oct/08 08:55 AM
I have noticed this issue on Moodle 1.9.2 (Build: 20080716)
When I import a course to an existing (empty) course (created based on a template using a database enrolment system) the summaries are not imported.

Paul Ortman added a comment - 31/Dec/08 10:28 AM
I too would just like to advocate for including this into 1.9.4. The patch continues to apply against 1.9.3+ (Build: 20081224), albeit with quite a bit of fuzz. I believe this solves the problem of the original bug adequately (about the only small thing the patch could do additionally would be provide logging that stated that a summary was skipped and what was skipped).

I agree that Clark Shah-Nelson's comment that there could be significant feature enhancement of this, but I think that really belongs in a different bug.

Again, thanks for this patch, it's working very well in our production system and greatly enhances the functionality of the "Import" button.


Teresa Gibbison added a comment - 22/Jan/09 05:50 AM
We have also implemented this patch and it works very well, thanks for providing it. I think it would be greatly enhanced with a checkbox displayed on the import screen so that users could choose which summaries they want to import (to any empty section summary or (if possible) add to any non-empty summary)
Teresa

Clark Shah-Nelson added a comment - 04/Feb/09 01:20 AM
Hello - just wondering about the fix version: it was set to 1.9.3, then changed to 1.9.4, then removed altogether. So does this just remain a patch or will it be added to a core version?
I really want to get this into our production server hosted on Moodlerooms.
thanks!
clark

Eloy Lafuente (stronk7) added a comment - 05/Feb/09 02:31 AM
Resolving this as fixed. Patch applied to 18_STABLE, 19_STABLE and HEAD (will be available in next weekly).

Current behaviour is:

a) If we are restoring to a NEW course (not existing yet), section summaries ARE restored.
b) If we are restoring to an EXISTING course, DELETING previous data, section summaries ARE restored.
c) If we are restoring to an EXISTING course, KEEPING previous data, section summaries ARE RESTORED IF target section summary is empty.
d) If we are importing to an EXISTING course, section summaries ARE RESTORED IF target section summary is empty.

So section summaries are ALWAYS restored UNLESS there are some content in them.

No new setting nor more options. Just new behaviour.

Credit goes to Dan Poltawski for the patch (I forgot to credit you in the commit, Dan, sorry).

Ciao


Michael Woods added a comment - 31/Aug/09 09:38 AM
I realise this issue is closed, but I was wondering about one thing...

When doing an import, I like that the section summary is imported if target is blank, however I think I was expecting it to only import if content was also being imported for that section. The new behaviour will import ALL the section summaries where blank, even when (for example) I'm only importing a single assignment for section 3.

Anyone else have the same thoughts?


Caroline Moore added a comment - 31/Aug/09 10:22 PM
Michael, I agree with your assessment, but I'd take it a step further: the behavior I'd expect is to have checkboxes on the "items to back up" page for each of the section labels, so one could choose to copy over any of the labels or none of the labels. This would be a great improvement to the backup/restore and import processes.

Robert Puffer added a comment - 31/Aug/09 10:33 PM
You guys got me thinking (bad thing around start-of-term)... I'd love to see import by section information so you could actually pick your sections full of items to have imported and have the "by module" off to the side.

Caroline Moore added a comment - 31/Aug/09 11:02 PM
Bob, I strongly agree. Actually, it would be ideal if the "choose items to back up" page was organized by week/topic section, instead of by type of item. (Or, in a really ideal world, if you could choose your view - but that would just be icing on the cake.)

Clark Shah-Nelson added a comment - 31/Aug/09 11:26 PM
Hi all, glad to see this important issue getting some votes and comments. (Do I see CLAMP-IT.org representing, here?)

I concur with the thought line happening with Michael, Caroline, and Bob - that one should have check boxes for summaries in addition to the regular resources and activities. I'd like to up the ante further, (and reiterate a previous comment) by adding a list of blocks (many instructors have customized HTML blocks, etc.) to import by checkbox, as well as course settings, which could include all/none or specific settings by checkbox (forced theme, language, etc...)

In this way, the import function could truly function to assist faculty with moving any or all content from one course to another without the need to download/upload files, such as 'backup and restore' require. This greatly simplifies the process for faculty, but by making sure there are checkboxes for everything in a course, including blocks and settings, would be full featured.


Helen Foster added a comment - 01/Sep/09 11:00 PM
Thanks everyone for your comments.

You've most likely noticed that backup improvements are included in our roadmap for Moodle 2.0 http://docs.moodle.org/en/Roadmap

To ensure your feature requests are taken into account, please post in the backup and restore forum http://moodle.org/mod/forum/view.php?id=746 and/or add a note to http://docs.moodle.org/en/Development_talk:Backup_2.0 or create an issue in the tracker.