marxjohnson / moodle-block_quickcourselist

Moodle block providing a quick method of searching course pages
http://moodle.org/mod/data/view.php?d=13&rid=2334
6 stars 7 forks source link

Prevent quickcourselist block from being added when user isn't allowed to use it #3

Closed abias closed 10 years ago

abias commented 12 years ago

Hi,

sorry for double-posting, but I don't know if you are subscribed to Moodle Tracker.

Please have a look at http://tracker.moodle.org/browse/CONTRIB-3567

Thanks in advance Alex

marxjohnson commented 10 years ago

The applicable_formats method isn't the best place to do this, we've now got the quickcourselist:addinstance and quickcourselist:myaddinstance capabilities which allow us to control which users can add the block. I've tweaked the default permissions so that only those allowed to use the block should be able to add it to their pages, they can be given to additional users per site as required.

abias commented 10 years ago

Well, quickcourselist:addinstance and quickcourselist:myaddinstance is a better solution, of course. But these capabilities have not been there when I posted this ticket 2 years ago.

Thanks for having a look at this finally.

Alex