course settings: MDL-17501 check for moodle/course:visibility in the course settings...
authortjhunt <tjhunt>
Mon, 8 Dec 2008 02:31:05 +0000 (02:31 +0000)
committertjhunt <tjhunt>
Mon, 8 Dec 2008 02:31:05 +0000 (02:31 +0000)
commit9136a60c4693ed046cf1c231d5af8ec8a92a9c76
tree5d166cf5570e3deb252412fe0b8271078295b5d5
parentca63c5fb14b3d8795878cfb5f0f106dcc8c7ced8
course settings: MDL-17501 check for moodle/course:visibility in the course settings form.

1. If a user does not have that capability, don't let them change whether the course is visible.
2. Give teachers that capability by default.
3. To avoid regressions, on upgrade, give moodle/course:visibility to any role that has moodle/course:update.
course/edit_form.php
lib/db/access.php
lib/db/upgrade.php
version.php