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

Better validation for detailed mode graph in the stats report

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.5, 2.7.2
    • 2.6.6, 2.7.3
    • Reports
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • 47914-28
    • Hide
      1. Enable and generate stats over a period of a month (just mess with you system clock, log in and browse courses + news forums as students)
      2. Copy and paste this into your browser report/stats/index.php?mode=2&course=1&userid=0&report=8&time=8
      3. Check that you don't get report data generated and that there is no broken images on this page.
      4. Copy and paste the image url into your browser report/stats/index.php?mode=2&course=1&userid=0&report=8&time=8
      5. Check that you get an invalid user error and not a database error.
      Show
      Enable and generate stats over a period of a month (just mess with you system clock, log in and browse courses + news forums as students) Copy and paste this into your browser report/stats/index.php?mode=2&course=1&userid=0&report=8&time=8 Check that you don't get report data generated and that there is no broken images on this page. Copy and paste the image url into your browser report/stats/index.php?mode=2&course=1&userid=0&report=8&time=8 Check that you get an invalid user error and not a database error.

    Description

      There is a bug with the stats report that can only be arrived at now by modifying the URL for the graph.

      Debug info: ERROR: column "statsreads" does not exist
      LINE 1: SELECT id,roleid,timeend,statsreads+statswrites as line1 FRO...
      ^
      SELECT id,roleid,timeend,statsreads+statswrites as line1 FROM mdl_stats_daily WHERE stattype = 'activity' AND timeend >= 1409572800 ORDER BY timeend DESC
      [array (
      )]
      Error code: dmlreadexception
      Stack trace:

      line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 764 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 84 of /report/stats/graph.php: call to pgsql_native_moodle_database->get_records_sql()

      To reproduce:

      1. Enable and generate stats over a period of a month (just mess with you system clock, log in and browse courses + news forums as students)
      2. Copy and paste this into your browser report/stats/index.php?mode=2&course=1&userid=0&report=8&time=8
      3. Notice that you get a report generated for the current user and that there is a broken image there.
      4. Copy and paste the image url into your browser report/stats/index.php?mode=2&course=1&userid=0&report=8&time=8
      5. Notice that you get a fatal database error.

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              samhemelryk Sam Hemelryk
              Marina Glancy Marina Glancy
              Michael de Raadt Michael de Raadt
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Nov/14