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

DB error on creating graph of some course stats

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7.2
    • Fix Version/s: 2.6.6, 2.7.3
    • Component/s: Reports
    • Labels:
    • Testing Instructions:
      Hide
      • enable and generate statistics (you need to play with your system date to do it on dev machines) - make sure you have individual users statistics for the course (just logging in and viewing the course is enough)
      • Go to the course reports > Statistics
      • On top of the screen a weird dropdown appears, select "Detailed view"
      • Try playing with different views, selecting individual students, etc. Graph should be displayed on every page that has data. If you see graph header but no image - it is a fail
      Show
      enable and generate statistics (you need to play with your system date to do it on dev machines) - make sure you have individual users statistics for the course (just logging in and viewing the course is enough) Go to the course reports > Statistics On top of the screen a weird dropdown appears, select "Detailed view" Try playing with different views, selecting individual students, etc. Graph should be displayed on every page that has data. If you see graph header but no image - it is a fail
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE

      Description

      Instead of the graph on this URI:
      /report/stats/graph.php?mode=2&course=30&time=44&report=8&userid=0

      I get this error:
      Error reading from database

      Debug info: Unknown column 'statsreads' in 'field list'
      SELECT id,roleid,timeend,statsreads+statswrites as line1 FROM mdl_stats_monthly WHERE courseid = 30 AND stattype = 'activity' AND timeend >= 1349049600 ORDER BY timeend DESC
      [array (
      )]
      Error code: dmlreadexception
      Stack trace:
      line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 1014 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 84 of /report/stats/graph.php: call to mysqli_native_moodle_database->get_records_sql()

      In other courses the graphs are ok.

        Attachments

        1. stats1.png
          96 kB
          Marina Glancy
        2. stats2.png
          148 kB
          Marina Glancy
        3. stats3.png
          90 kB
          Marina Glancy

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              complicator Pavel Krejci
              Peer reviewer:
              Simey Lameze
              Integrator:
              Sam Hemelryk
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14