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

Report: division by zero

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.4.7, 2.5.3, 2.6
    • SCORM
    • MOODLE_26_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • MDL-42604-master
    • Hide
      1. Create a new scorm activity.
      2. Goto reports tab as admin and click on graph.
      3. Make sure the graph is displayed properly.
      4. Make sure there are no "division by zero" warnings in your apache error logs.
      5. Attempt the scorm from a few different student accounts
      6. Go back to graph report as admin/teacher and make sure it is displayed correctly.
      Show
      Create a new scorm activity. Goto reports tab as admin and click on graph. Make sure the graph is displayed properly. Make sure there are no "division by zero" warnings in your apache error logs. Attempt the scorm from a few different student accounts Go back to graph report as admin/teacher and make sure it is displayed correctly.

    Description

      While working on MDL-41979, when I clicked on the Reports tab as an Administrator after attending a SCO having provided status, time and score, no data is returned and I've found the 3 warnings below, in the web server error log:

      [Tue Oct 29 23:07:52 2013] [error] [client 192.168.0.202] PHP Warning:  Division by zero in /path/to/moodle-master/lib/graphlib.php on line 1021, referer: http://hostname/moodle-master/mod/scorm/report.php?id=88&mode=graphs
      [Tue Oct 29 23:07:52 2013] [error] [client 192.168.0.202] PHP Warning:  Division by zero in /path/to/moodle-master/lib/graphlib.php on line 1023, referer: http://hostname/moodle-master/mod/scorm/report.php?id=88&mode=graphs
      [Tue Oct 29 23:07:52 2013] [error] [client 192.168.0.202] PHP Warning:  Division by zero in /path/to/moodle-master/lib/graphlib.php on line 707, referer: http://hostname/moodle-master/mod/scorm/report.php?id=88&mode=graphs
      

      The same applies when clicking on the Graph report subtab: the image is missing and the warning are equal except for the missing of referer info.

      Attachments

        Activity

          People

            ankit_frenz Ankit Agarwal
            matteo Matteo Scaramuccia
            Matteo Scaramuccia Matteo Scaramuccia
            Marina Glancy Marina Glancy
            Petr Skoda Petr Skoda
            Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Nov/13