Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3856

Errors in geolocation check haulting cron

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.2, 2.3
    • Component/s: Block: Online user map
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE

      Description

      I found that in Moodle 2.3, with strict PHP, there were some errors that prevented the cron process from completing and finding the locations of users.

      I was able to fix this by modifying the code as follows...

      /block/online_users_map/lib.php, lines 73-77

      if (isset($xml->geoname->lat)){
          $boumc = new stdClass();
          $boumc->userid = $user->id;
          $boumc->lat = floatval($xml->geoname->lat);
          $boumc->lng = floatval($xml->geoname->lng);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexlittle Alex Little
              Reporter:
              salvetore Michael de Raadt
              Participants:
              Component watchers:
              Alex Little
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/11