diff --git a/course/user.php b/course/user.php
index 85e2d54eacd..f44549f3ddd 100644
--- a/course/user.php
+++ b/course/user.php
@@ -204,9 +204,19 @@
echo "
";
+
+ ob_start();
+
echo "";
$user_complete($course, $user, $mod, $instance);
echo "
";
+
+ ob_end_clean();
+ $output = ob_get_contents();
+
+ if (str_replace(' ', '', $output) != '') {
+ echo $output;
+ }
}
break;
}
@@ -215,7 +225,6 @@
if ($mode == "outline") {
echo "";
- print_simple_box_end();
}
echo ''; // content
echo ''; // section