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

Stupid SQL in stats

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      Presumably when it says

      $DB->get_field_sql('SELECT timeend FROM

      {stats_user_daily} ORDER BY timeend');

      It means

      $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_daily}

      ');

      The attached patch fixes this. I guess the fix needs to be backported to 1.9 though.

      Also, I don't think "Sorry, there is no available data to display" should be a print_error. It should be a nicer message than that. I have not fixed that.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: