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

Broken longtimenosee option - PHP notice errors during cron

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7, 1.8
    • Component/s: Administration
    • Labels:
      None
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      Here is a dump of the errors:

      Running clean-up tasks...
      PHP Notice: Undefined property: stdClass::$userid in
      /oci/openlearn-wwwrootacct/admin/cron.php on line 147

      Notice: Undefined property: stdClass::$userid in
      /oci/openlearn-wwwrootacct/admin/cron.php on line 147 PHP Notice: Undefined
      property: stdClass::$userid in /oci/openlearn-wwwrootacct/admin/cron.php on
      line 148

      Notice: Undefined property: stdClass::$userid in
      /oci/openlearn-wwwrootacct/admin/cron.php on line 148

      I think this is because the get_users_longtimenosee() function returns an array with id,courseid pairs, not userid,courseid pairs. If the two references to $assign->userid on these lines are changed to $assign->id it should work.

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              jenny-gray Jenny Gray
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                7/Nov/06