Moodle Community Sites
  1. Moodle Community Sites
  2. MDLSITE-1779

http://moodle.org/stats graph stops at December 2011

    Details

    • Rank:
      40144

      Description

      Just noticed that the first graph on http://moodle.org/stats stops at December 2011

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          Added some watchers here who should know various bits about the stats system.

          Show
          Martin Dougiamas added a comment - Added some watchers here who should know various bits about the stats system.
          Hide
          Sam Hemelryk added a comment -

          Hi guys,

          At a glance I notice that other graphs are displaying 2012 months.
          I also note that its missing the new registrations for December.

          When writing that stats graph stuff I remember hitting a URL data limit and I suspect that is what is happening here.
          The amount of information is likely to great for the URL.
          If thats the case the solution would lie in reducing the information we want to display.
          Off the top of my head three solutions:

          1. Look for some way to further compact the data. Google used to support a basic means of compression, perhaps they have expanded upon that to include something that would be useful. Not a guaranteed solution here.
          2. Limit the number of months being displayed, perhaps just the last 5 years or something. A sure solution but I seem to remember people liked being able to see complete history.
          3. Remove the stacked new registrations for the month and just show total registrations. That would greatly reduce the problem and perhaps no one would mind.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi guys, At a glance I notice that other graphs are displaying 2012 months. I also note that its missing the new registrations for December. When writing that stats graph stuff I remember hitting a URL data limit and I suspect that is what is happening here. The amount of information is likely to great for the URL. If thats the case the solution would lie in reducing the information we want to display. Off the top of my head three solutions: Look for some way to further compact the data. Google used to support a basic means of compression, perhaps they have expanded upon that to include something that would be useful. Not a guaranteed solution here. Limit the number of months being displayed, perhaps just the last 5 years or something. A sure solution but I seem to remember people liked being able to see complete history. Remove the stacked new registrations for the month and just show total registrations. That would greatly reduce the problem and perhaps no one would mind. Cheers Sam
          Hide
          Jérôme Mouneyrac added a comment - - edited

          Few notes till I receive access to a test server:

          I installed the plugin on my local machine.
          I found the following issues:

          • no registry.override data field in install.xml
          • no registry.timeunreachable data field in install.xml
          • cannot load registry table in XMLDB editor because of few ENUM erros
          • the google API we are using has just recently been deprecated (20th April 2012): https://developers.google.com/chart/image/ (but will be deleted only the 20th April 2015, so we have time to replace it)

          From reading the code and from what Sam mentioned, the culprit should be in google_charts_bar_graph::generate_url. In the meanwhile I'll try to simulate multiple data on my local machine.

          Show
          Jérôme Mouneyrac added a comment - - edited Few notes till I receive access to a test server: I installed the plugin on my local machine. I found the following issues: no registry.override data field in install.xml no registry.timeunreachable data field in install.xml cannot load registry table in XMLDB editor because of few ENUM erros the google API we are using has just recently been deprecated (20th April 2012): https://developers.google.com/chart/image/ (but will be deleted only the 20th April 2015, so we have time to replace it) From reading the code and from what Sam mentioned, the culprit should be in google_charts_bar_graph::generate_url. In the meanwhile I'll try to simulate multiple data on my local machine.
          Hide
          Jérôme Mouneyrac added a comment -

          I'll try 3. I agree that no one would mind. 'new registrations' top section are too small to understand the differences or to take a decision from them. Hopefully it will save enough space till the deprecated API is removed and then we will need to rewrite the code anyway.

          Show
          Jérôme Mouneyrac added a comment - I'll try 3. I agree that no one would mind. 'new registrations' top section are too small to understand the differences or to take a decision from them. Hopefully it will save enough space till the deprecated API is removed and then we will need to rewrite the code anyway.
          Hide
          Jordan Tomkinson added a comment -

          A solution would be to convert from GET to POST, see https://developers.google.com/chart/image/docs/post_requests
          they have examples on how to do this in PHP further down the post.
          this extends the 2k restriction to 16k

          Show
          Jordan Tomkinson added a comment - A solution would be to convert from GET to POST, see https://developers.google.com/chart/image/docs/post_requests they have examples on how to do this in PHP further down the post. this extends the 2k restriction to 16k
          Hide
          Jérôme Mouneyrac added a comment -

          Can I have access to the test server?

          Show
          Jérôme Mouneyrac added a comment - Can I have access to the test server?
          Hide
          Martin Dougiamas added a comment -

          Yep, no problem to remove the stacked new registrations. Looks like it will be an easy fix then. Thanks!

          Show
          Martin Dougiamas added a comment - Yep, no problem to remove the stacked new registrations. Looks like it will be an easy fix then. Thanks!
          Hide
          Jérôme Mouneyrac added a comment -

          I did a fix to send the params by POST like Dan and Jordan suggested. I didn't fork the private rep, so I created jerome-wip branch on github so you can see it: https://github.com/moodlehq/moodle-local_moodleorg/commit/78b8d10b62928dc5e46999d1f1f52cf77ec58769

          Need to be tested on moodleorg.moodle.local by people having access

          Show
          Jérôme Mouneyrac added a comment - I did a fix to send the params by POST like Dan and Jordan suggested. I didn't fork the private rep, so I created jerome-wip branch on github so you can see it: https://github.com/moodlehq/moodle-local_moodleorg/commit/78b8d10b62928dc5e46999d1f1f52cf77ec58769 Need to be tested on moodleorg.moodle.local by people having access
          Hide
          Jérôme Mouneyrac added a comment -

          I should be able to test on my local machine as Dan gave me an example of the url:

          http://chart.apis.google.com/chart?cht=bvs&chtt=Total+known+sites&chts=333333,16&chs=800x375&chxt=x,y,x&chxr=1,0,72000,7200&chco=ffcb44,f68e00&chdlp=t&chdl=Total+registrations|New+registrations&chbh=a&chxl=0:|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|2:|2003||||||||2004||||||||||||2005||||||||||||2006||||||||||||2007||||||||||||2008||||||||||||2009||||||||||||2010||||||||||||2011||||||||||&chd=t:-0.03,-0.03,0.05,0.09,0.13,0.23,0.32,0.38,0.45,0.51,0.53,0.76,0.97,1.19,1.38,1.51,1.57,1.8,2.02,2.11,2.21,2.4,2.44,2.7,2.88,2.49,3.04,3.68,3.76,4.23,4.85,5.7,5.93,6.53,7.03,7.96,8.45,9.07,9.81,10.09,10.65,11.8,13.1,14.49,14.75,15.32,16.08,18.17,19.24,20.81,22.13,23.32,24.45,26.18,28.03,29.96,30.53,31.99,33.7,35.52,37.38,39.16,40.76,42.74,44.04,46.22,49.06,51.45,52.7,53.93,55.97,58.91,60.68,62.56,61.48,62.91,64.66,66.44,70.45,70.57,72.11,72.42,73.69,76.76,78.35,79.36,82.03,84.52,83.77,84.65,86.49,90.39,91.15,90.67,90.71,92.26,92.74,93.08,93.66,92.28,92.83,94.92|0.03,0.07,0.05,0.07,0.09,0.08,0.07,0.08,0.09,0.12,0.21,0.2,0.19,0.17,0.15,0.17,0.27,0.21,0.19,0.21,0.25,0.24,0.34,0.28,0.27,0.83,0.78,0.59,0.89,0.97,0.95,0.73,0.94,0.96,1.09,0.9,1,1.03,0.95,1.29,1.61,1.58,1.39,0.99,1.41,1.85,2.37,1.9,2.06,1.85,1.82,1.94,2.24,2.19,2,1.53,2.12,2.27,2.32,2.3,2.2,2.13,2.26,2.13,2.62,2.69,2.2,1.7,1.94,2.45,2.61,2.04,2.14,2.3,2.57,2.73,2.75,3.71,3.42,2.54,2.85,3.33,3.84,3.15,3.23,3.34,3.06,3.38,3.74,3.83,4.01,2.71,2.71,2.72,3.21,2.57,2.71,2.41,2.24,2.91,2.82,0.46
          
          Show
          Jérôme Mouneyrac added a comment - I should be able to test on my local machine as Dan gave me an example of the url: http: //chart.apis.google.com/chart?cht=bvs&chtt=Total+known+sites&chts=333333,16&chs=800x375&chxt=x,y,x&chxr=1,0,72000,7200&chco=ffcb44,f68e00&chdlp=t&chdl=Total+registrations|New+registrations&chbh=a&chxl=0:|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|N|D|J|F|M|A|M|J|J|A|S|O|2:|2003||||||||2004||||||||||||2005||||||||||||2006||||||||||||2007||||||||||||2008||||||||||||2009||||||||||||2010||||||||||||2011||||||||||&chd=t:-0.03,-0.03,0.05,0.09,0.13,0.23,0.32,0.38,0.45,0.51,0.53,0.76,0.97,1.19,1.38,1.51,1.57,1.8,2.02,2.11,2.21,2.4,2.44,2.7,2.88,2.49,3.04,3.68,3.76,4.23,4.85,5.7,5.93,6.53,7.03,7.96,8.45,9.07,9.81,10.09,10.65,11.8,13.1,14.49,14.75,15.32,16.08,18.17,19.24,20.81,22.13,23.32,24.45,26.18,28.03,29.96,30.53,31.99,33.7,35.52,37.38,39.16,40.76,42.74,44.04,46.22,49.06,51.45,52.7,53.93,55.97,58.91,60.68,62.56,61.48,62.91,64.66,66.44,70.45,70.57,72.11,72.42,73.69,76.76,78.35,79.36,82.03,84.52,83.77,84.65,86.49,90.39,91.15,90.67,90.71,92.26,92.74,93.08,93.66,92.28,92.83,94.92|0.03,0.07,0.05,0.07,0.09,0.08,0.07,0.08,0.09,0.12,0.21,0.2,0.19,0.17,0.15,0.17,0.27,0.21,0.19,0.21,0.25,0.24,0.34,0.28,0.27,0.83,0.78,0.59,0.89,0.97,0.95,0.73,0.94,0.96,1.09,0.9,1,1.03,0.95,1.29,1.61,1.58,1.39,0.99,1.41,1.85,2.37,1.9,2.06,1.85,1.82,1.94,2.24,2.19,2,1.53,2.12,2.27,2.32,2.3,2.2,2.13,2.26,2.13,2.62,2.69,2.2,1.7,1.94,2.45,2.61,2.04,2.14,2.3,2.57,2.73,2.75,3.71,3.42,2.54,2.85,3.33,3.84,3.15,3.23,3.34,3.06,3.38,3.74,3.83,4.01,2.71,2.71,2.72,3.21,2.57,2.71,2.41,2.24,2.91,2.82,0.46
          Hide
          Jérôme Mouneyrac added a comment -

          Ok I confirm the "fix" work with this url that return only info to 2011... Let me know if it fixes the issue.

          Show
          Jérôme Mouneyrac added a comment - Ok I confirm the "fix" work with this url that return only info to 2011... Let me know if it fixes the issue.
          Hide
          Martin Dougiamas added a comment -

          Jordan, I think this should fix the issue.

          Jerome can you patch it in the main repo, and then Jordan can you pull it?

          Show
          Martin Dougiamas added a comment - Jordan, I think this should fix the issue. Jerome can you patch it in the main repo, and then Jordan can you pull it?
          Hide
          Jordan Tomkinson added a comment -

          waiting for push

          Show
          Jordan Tomkinson added a comment - waiting for push
          Hide
          Jérôme Mouneyrac added a comment -

          done

          Show
          Jérôme Mouneyrac added a comment - done
          Hide
          Jordan Tomkinson added a comment -

          pulled to production site

          Show
          Jordan Tomkinson added a comment - pulled to production site
          Hide
          Martin Dougiamas added a comment -

          something looks seriously wrong ... http://moodle.org/stats

          Show
          Martin Dougiamas added a comment - something looks seriously wrong ... http://moodle.org/stats
          Hide
          Martin Dougiamas added a comment -

          The original problem here is solved, thanks, but I'll open a new bug about the messed up data in the database at the moment.

          Show
          Martin Dougiamas added a comment - The original problem here is solved, thanks, but I'll open a new bug about the messed up data in the database at the moment.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development