Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-58904

Moodle 3.3 restore (possibly) broken - events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.3
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide

      A) Using a 32_STABLE site (this is important), create a course having:

      0) Enrol couple of students and 1 teacher
      1) Create (as teacher)

      • Some activity events (aka, create some assignments and quizzes with start and end date).
      • Some course events.
      • Some groups (1 student each) and some group events.

      2) Verify that all the events above (activity course, group) are seen in the calendar.
      3) Backup the course (doesn't matter if it's done with or without users)
      4) Restore the backup to new course
      5) Verify that:

      • There aren't debugging messages about type or timesort not set.
      • The restore process ends ok.
      • All the events above have been restored without problem.

      B) Replay MDL-58822 testing instructions to verify that this does not affect new courses/events.

      Show
      A) Using a 32_STABLE site (this is important), create a course having: 0) Enrol couple of students and 1 teacher 1) Create (as teacher) Some activity events (aka, create some assignments and quizzes with start and end date). Some course events. Some groups (1 student each) and some group events. 2) Verify that all the events above (activity course, group) are seen in the calendar. 3) Backup the course (doesn't matter if it's done with or without users) 4) Restore the backup to new course 5) Verify that: There aren't debugging messages about type or timesort not set. The restore process ends ok. All the events above have been restored without problem. B) Replay MDL-58822 testing instructions to verify that this does not affect new courses/events.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      I'm seeing these warnings...

      Notice: Undefined property: stdClass::$type in /var/www/html/moodle33/backup/moodle2/restore_stepslib.php on line 2708

      Notice: Undefined property: stdClass::$timesort in /var/www/html/moodle33/backup/moodle2/restore_stepslib.php on line 2712

      and then...

      Debug info: Column 'type' cannot be null
      INSERT INTO mdl_event (name,description,format,courseid,groupid,userid,repeatid,modulename,type,eventtype,timestart,timeduration,timesort,visible,uuid,sequence,timemodified,priority,instance) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      [array (
      0 => 'Anaesthesia Calculation (Quiz opens)',
      1 => '<div class="no-overflow"><p>During your week on hospital anaesthesia you have 2 attempts to correctly complete a drug calculation using the quiz. It is probably a good idea to make your first attempt after completing the Breathing systems quiz on Monday morning.</p>
      <p>If you have not passed after 2 attempts you must inform one of the senior rotation staff so they can go through this with you. Failure to complete the calculation after 4 attempts will result in a Cause for Concern being issued.</p>
      <p> </p></div>',
      2 => '1',
      3 => 10387,
      4 => '0',
      5 => '89619',
      6 => 0,
      7 => 'quiz',
      8 => NULL,
      9 => 'open',
      10 => 1493452800,
      11 => '0',
      12 => NULL,
      13 => '1',
      14 => '',
      15 => '1',
      16 => 1493477683,
      17 => NULL,
      18 => 8895,
      )]
      Error code: dmlwriteexception

       

      I have tried a number of courses. It could, of course, be something in my local configuration but I'm not sure what. 

      Suspicion must fall on MDL-58822 as this was related and only closed a couple of days ago

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17