MDL-37207 modchoosertoggle: added checks that user can update course