Which block? I can see two that don’t appear to be in the drop down list. Blocks can be set to appear in different contexts - have you tried adding those blocks in a different context, eg. a course page? Have you checked Site Admin > Plugins > Blocks > Manage Blocks? Do they appear in that list?
Did you create these extra blocks from scratch or copy an existing block and change things? Have you got debugging on?
Yeah I looked at it before. It only has a very small subset of blocks (not even all those listed when you look at the site admin/plugins/plugin overview)
It does not even list the plugin which I created last year and have successfully deployed on the site.
At present I have only tried adding the blocks to the front page as this is what I had done for my previous block.
But the point is valid so I have activated: All:Show all reasonable and Display debug messages...
I did notice this.
Notice: Undefined variable: courseId in /home/fhacadem/public_html/blocks/fhacademhtml/block_fhacademhtml.php on line 189
It is a leftover variable from my first plugin which I never cleaned up.... I have seen it before
As to any new messages.
Looks like the images crushed the text and …. well here it is again....
I have to say in advance I am a Moodle/PHP novice. I created 1x Block Plugin last year and I was working on a new one over the last days.
Both are based from the
Tutorials as a baseline...……….
But I have encountered a strange behaviour. With my first foray into Moodle Block development after installing, verifying, and adding to the database. It would immediately appear in the Edit Block/Add List (of course once added to the course I could only see the Add Block if I was looking directly at plugins as the course did not allow duplication of blocks).
I have created a new block based upon some functionality of the old. The install plugin worked and was verified and successfully added to the database. But it does not appear in the ADD BLOCK interface.
I am attaching 2x screenshots of the blocks in questions and here is the text snippets from the code where I had created the titles.
Can anyone help me discover why it is not on the ADD BLOCK interface?
Many thanks in advance
============ old block
$string['pluginname'] = 'FHAcademy HTML block';
$string['fhacademhtml'] = 'Forgotten Heralds Academy';
$string['fhacademhtml:addinstance'] = 'Add a new FHAcademy HTML block';
$string['fhacademhtml:myaddinstance'] = 'Add a new FHAcademy HTML block to the My Moodle page';
============ new block
$string['pluginname'] = 'FHAcademy HTML PROMOTION block';
$string['fhacademhtml_promot'] = 'FHAcademy PROMOTION';
$string['fhacademhtml_promot:addinstance'] = 'Add a new FHAcademy HTML PROMOTION block';
$string['fhacademhtml_promot:myaddinstance'] = 'Add a new FHAcademy HTML PROMOTION block to the My Moodle page';
It might have to do something with something that has transpired in between when I created this first block and where we are now.
A few months back we ported the site over to a new hosting provider. We had a couple of small issues with config.php and setting up CRON jobs but that was fairly quickly resolved.
But I decided to refresh my steps and take a step back. I downloaded from github
The baseline where I started my first plugin.
Last year the first test I did back then was to install and add this example block. It worked fine.
I just downloaded it again. I just installed it and tried to add the block. I have the same behavior.
It does not appear in the Add Block / List
It appears in the Site Admin > Plugins > Blocks > Manage Blocks
Just like my plugin from last year and the newly created one
Is there soemthing that could have gone wrong in the porting of the site that no longer allows blocks to be added?