fix display of conditions after 'applydefauls'; add prepare_field_gradecategory; fix setting of checkboxes with '[' and ']' in name