MDL-44071 Webservices:fix course sort after course deletion

Signed-off-by: zbdd <zdurber@gmail.com>