MDL-27459 Completion: When ratings off, disallow grade completion

For activities that use ratings, there is no grade unless ratings
are enabled. The completion system still lets you select 'complete
when user gets a grade', which leads to later errors.

This change simply disables the 'completion on grade' field if
ratings are enabled for the activity, but not turned on in the form.
MDL-42635 lesson: change from error to user friendly message
Merge branch 'MDL-27459-m25' of git://github.com/sammarshallou/moodle into MOODLE_25_STABLE