MDL-61163 mod_wiki: correct capability check in modinfo
commit3a93df8b9a673d1f6eac0730874f6dafeccc15e7
authorMarina Glancy <marina@moodle.com>
Mon, 8 Jan 2018 05:29:42 +0000 (8 13:29 +0800)
committerMarina Glancy <marina@moodle.com>
Thu, 29 Mar 2018 03:11:45 +0000 (29 11:11 +0800)
treeb3dea4c5b9686539abf591e2d5be610ff4313dae
parenta15c7459360f220a34c138f808340e3848c85b7c
MDL-61163 mod_wiki: correct capability check in modinfo

Wiki defines capability mod/wiki:viewpage instead of standard mod/wiki:view . This means that people
who do not have capability to view wiki still see it in the modules list.

Also corrected unittest that was testing situation when student has capability to create pages
but does not have capability to view pages. Such student should not see wiki module at all.
mod/wiki/lib.php
mod/wiki/tests/externallib_test.php