MDL-41219 course: Make properties of course_modinfo read-only

added phpdocs and unittests