MDL-41384 upgrade: make sure to re-read $SITE from DB when course table is altered
MDL-41384 course: do not show debugging message if  contains format options

before showing debugging message make sure that field exists in database and not only in the object