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

bad error checking in backup_module backuplib.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.9
    • Backup
    • None
    • MOODLE_19_STABLE

      thanks to Sam Marshall for details regarding this bug.

      backup_module in backuplib.php these lines:

      foreach ($preferences->mods[$module]->instances as
      $instance => $object) {
      if (!empty($object->backup))

      { $status = $onemodbackup($bf,$preferences,$instance); }

      }

      overwrite the $status flag and doesn't notify about anything failing - should change to something like this (untested!)
      foreach ($preferences->mods[$module]->instances as $instance => $object) {
      if (!empty($object->backup)) {
      $statusm = $onemodbackup($bf,$preferences,$instance);
      if (!$statusm)

      { notify('backup of:'.$module.'-'.$instance.' failed.'); $status = false; }

      }
      }

      --should also check to see if backup is silent and only notify when not silent, and should log an entry to backup_log

      Dan

            danmarsden Dan Marsden
            danmarsden Dan Marsden
            Nobody Nobody
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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