Skip to content
Browse files

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

  • Loading branch information...
1 parent b6ced2f commit 1efa93020249e0453783c862ae5e9fdecdbdeeaf @ankitagarwal ankitagarwal committed Oct 30, 2013
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();

0 comments on commit 1efa930

Please sign in to comment.
Something went wrong with that request. Please try again.