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

restore creates invalid course completion records

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • master_MDL-32102
    • Hide

      Enable Course completion inside a course
      Make sure some users are set to have a complete course (manual completion options work well)
      run cron a few times to make sure completion status is set correctly.
      Backup the course.
      Restore the course by using the "merge" into existing course option.
      Run cron - fatal error is shown.

      NOTE TO QA/tester: I had issues using the merge course under Postgres - threw some index errors related to grades - I did my testing on mysql which restored the course fine. (probably another bug there somewhere that needs further investigation.)

      Show
      Enable Course completion inside a course Make sure some users are set to have a complete course (manual completion options work well) run cron a few times to make sure completion status is set correctly. Backup the course. Restore the course by using the "merge" into existing course option. Run cron - fatal error is shown. NOTE TO QA/tester: I had issues using the merge course under Postgres - threw some index errors related to grades - I did my testing on mysql which restored the course fine. (probably another bug there somewhere that needs further investigation.)

      If you merge a course that has existing course completion records you can end up with multiple course completion records in the db which throws this error in cron:

      !!! Found more than one record in fetch() ! !!!
      !! Stack trace: * line 429 of /lib/setuplib.php: moodle_exception thrown

      line 130 of /lib/completion/data_object.php: call to print_error()
      line 83 of /lib/completion/completion_aggregation.php: call to data_object::fetch_helper()
      line 65 of /lib/completion/data_object.php: call to completion_aggregation::fetch()
      line 374 of /lib/completionlib.php: call to data_object->__construct()
      line 308 of /lib/completion/cron.php: call to completion_info->get_aggregation_method()
      line 45 of /lib/completion/cron.php: call to completion_cron_completions()
      line 173 of /lib/cronlib.php: call to completion_cron()
      line 85 of /admin/cron.php: call to cron_run()

            danmarsden Dan Marsden
            danmarsden Dan Marsden
            Andrew Lyons Andrew Lyons
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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