Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-42604 scorm: Fix division by zero warnings in error logs

  • Loading branch information...
commit 1efa93020249e0453783c862ae5e9fdecdbdeeaf 1 parent b6ced2f
@ankitagarwal ankitagarwal authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/scorm/report/graphs/graph.php
View
4 mod/scorm/report/graphs/graph.php
@@ -168,7 +168,7 @@
$gridlines /= 2;
}
}
-
-$line->parameter['y_axis_gridlines'] = $gridlines + 1;
+$gridlines = max(2, ($gridlines + 1)); // We need a minimum of two lines.
+$line->parameter['y_axis_gridlines'] = $gridlines;
$line->draw();
Please sign in to comment.
Something went wrong with that request. Please try again.