diff --git a/course/lib.php b/course/lib.php index 2f3ef230a0d..2c5f7794700 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1982,7 +1982,7 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) { } // Indent. - if ($hasmanageactivities) { + if ($hasmanageactivities && $indent >= 0) { $indentlimits = new stdClass(); $indentlimits->min = 0; $indentlimits->max = 16;