Fixing PHP warning
Fixing PHP warnings
Fixing delete course see #6183