diff --git a/view.php b/view.php index 88b8b39..ccb9551 100644 --- a/view.php +++ b/view.php @@ -98,7 +98,7 @@ echo $OUTPUT->render_from_template('mod_subcourse/subcourseinfo', [ 'haspercentage' => ($percentage !== null), 'hasstrgrade' => ($strgrade !== null), - 'percentage' => floor($percentage), + 'percentage' => floor((float)$percentage), 'strgrade' => $strgrade, ]);