Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3950

Crot: lib.php does division by zero

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Plagiarism: Crot
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      Crot was not working on our website http://moodle.coep.org.in

      I checked the apache2 error log in /var/www/apache2/error.log and found the following line:
      [Mon Sep 24 09:32:03 2012] [error] [client 10.1.101.150] PHP Warning: Division by zero in /var/www/moodle/plagiarism/crot/lib.php on line 70, referer: http://moodle.coep.org.in/moodle/course/view.php?id=134

      The same line is repeated for many other courses also.

      The line of code in lib.php, in question, is this:
      $perc = round(($similarity->max / $numbertotal->cnt) * 100, 2);

        Attachments

          Activity

            People

            Assignee:
            sergey.butakov Sergey Butakov
            Reporter:
            abhijit13 Abhijit A M
            Participants:
            Component watchers:
            Sergey Butakov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: