pawanwiziq / moodlenew-mod_wiziq

moodle latest
0 stars 0 forks source link

hard coded check against "student" role shortname #2

Open danmarsden opened 6 years ago

danmarsden commented 6 years ago

Many sites customise the roles and do not use the standard "student" role at all. You should be defining new capabilities in this plugin which are given by default to the student role, and then making a has_capability check against your custom capapbility.

pawanwiziq commented 6 years ago

Fixed

danmarsden commented 6 years ago

I still see a lot of commented out code referring to isstudent - I suspect you also need to be checking that students have a certain capability for some actions. Otherwise "guest" users may be able to do things they should not be able to?