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

Cron fails when course completion is enabled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.7, 2.2.4
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      Test Pre-requisites:

      • Completion must be ticked in Advanced Settings.
      • Create and enable completion for two courses
      • First course, on completion settings page enable "self completion"
      • Add the self completion block to course, run cron
      • Enrol a user in the course, as that user complete the course using the block
      • Second course, on Completion settings page, use the following settings:
      • "All" overall aggregation method
      • Add the first course as a prerequisite to this course
      • Enable the "date" criteria and set it to a date one month in the paste
      • Enable the "duration" criteria and set to 1 day after enrolment
      • Enable the "grade" criteria and set a grade of 50%
      • Enrol the user from the first course in the second
      • Edit their enrolment and change the start date to a week in the past
      • Via the gradebook, give them a grade of 100% in the course

      Test steps:

      • Run cron, no errors should occur
      Show
      Test Pre-requisites: Completion must be ticked in Advanced Settings. Create and enable completion for two courses First course, on completion settings page enable "self completion" Add the self completion block to course, run cron Enrol a user in the course, as that user complete the course using the block Second course, on Completion settings page, use the following settings: "All" overall aggregation method Add the first course as a prerequisite to this course Enable the "date" criteria and set it to a date one month in the paste Enable the "duration" criteria and set to 1 day after enrolment Enable the "grade" criteria and set a grade of 50% Enrol the user from the first course in the second Edit their enrolment and change the start date to a week in the past Via the gradebook, give them a grade of 100% in the course Test steps: Run cron, no errors should occur
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:

      Description

      /admin/cron.php fails when completion tracking is enabled. The following error is reported:

      Running completion_criteria_date->cron()
      Running completion_criteria_activity->cron()
      !!! Coding error detected, it must be fixed by a programmer: data_object params should be in the form of an array, not an object !!!
      !!
      Error code: codingerror !!
      !! Stack trace: * line 89 of /lib/completion/data_object.php: coding_exception thrown

      • line 238 of /lib/completion/completion_criteria_activity.php: call to data_object->__construct()
      • line 220 of /lib/completion/cron.php: call to completion_criteria_activity->cron()
      • line 40 of /lib/completion/cron.php: call to completion_cron_criteria()
      • line 323 of /lib/cronlib.php: call to completion_cron()
      • line 88 of /admin/cron.php: call to cron_run()
        !!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12