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

restore_dbops; don't use get_backup_ids_records, where a query change to include info will do.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6
    • 2.5
    • Backup, Performance
    • MOODLE_25_STABLE
    • MOODLE_26_STABLE
    • MDL-40618_restore_get_questions
    • Hide

      1. Backup and restore a course with (blocks, users, quiz, module_availability settings, files, users and renamed roles)
      2. Enable/disable 'zlib' extension (depending on your default setting)
      3. Repeats step one.

      4. Run phpunit with zlib enabled.
      5. Run phpunit with zlib disabled.

      Check both courses are restored correctly and phpunit passes.

      Show
      1. Backup and restore a course with (blocks, users, quiz, module_availability settings, files, users and renamed roles) 2. Enable/disable 'zlib' extension (depending on your default setting) 3. Repeats step one. 4. Run phpunit with zlib enabled. 5. Run phpunit with zlib disabled. Check both courses are restored correctly and phpunit passes.

      $qs = $DB->get_records_sql("SELECT itemid
                                            FROM {backup_ids_temp}
                                           WHERE backupid = ?
                                             AND itemname = 'question'
                                             AND parentitemid = ?", array($restoreid, $qcatid));
              foreach ($qs as $q) {
                  $temprec = self::get_backup_ids_record($restoreid, 'question', $q->itemid);
                  $results[$q->itemid] = $temprec->info;
              }
              return $results;
      

      Should be rewritten to immediately return the required data from backup_ids_temp rather than re-querying get_backup_ids_record.

            mr-russ Russell Smith
            mr-russ Russell Smith
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.