Here's a general question with a very specific context, related to a custom-developed block. First the question:
Why might a correctly-installed block not appear in the Add a Block dropdown in edit mode?
Now the context:
I've created a block - call it Hamster Herding - for local use. I've developed and tested it on localhost using Moodle 2.6 and XAMPP, then deployed it on a live test system. It used to work fine on local and remote hosts. We then decided that it needed to be renamed. I went through all the renaming procedures (files, variables, caches, etc), then put the block in moodle/blocks/hamster_herding and installed it via Admin >> Notifications. The block appeared to install ok, and when I then went into Site Admin >> Plugins >> Blocks >> Manage Blocks I could see it listed there. However, it didn't appear in the Add a Block dropdown so of course I couldn't add it to a course. Neither do any error messages appear.
Amongst many other measures, I've:
- de- and re-installed the block
- flushed Moodle caches
- flushed browser caches from the beginning of time
- set developer errors to super-picky
- installed the block on another machine altogether
- changed the block version number
- read TFM and TFFAQ
I think it's almost certainly related to the use of caches in the block, which are needed because of the institutional context in which it'll be deployed. I have just used basic cacheing code as specified in the Cache API, and when renaming the block made sure to rename the block caches.
I'm sure that it'll be one tiny tweak somewhere that's needed, but I just can't find the cause of the problem as I'm getting no feedback from Moodle at all, so a pointer or two would be appreciated.
Still fumbling in the undergrowth...
Fred