Newbie with Block Problems

Newbie with Block Problems

by Geoffrey Eggins -
Number of replies: 9
I have been trying to install some new blocks to my moodle but so far haven't had any success. I have tried to get a few different non-standard moodle blocks to show up in the drop-down list of blocks when in editing mode.

In the moodle documentation it says

"You may add non-standard blocks simply by using a file manager to copy the new block as a directory into the moodle/blocks directory and Moodle will install it next time you visit the admin page. Moodle uses the name of the directory as the name of the block. The same applies for blocks which you delete and wish to reinstall later."

I have put the right directories in the blocks directory, but I just cant get the blocks to show up in that list. Do you need to manually add some extra rows to the blocks table in the moodle database to get it working or something like that ?

Any help would be most appreciated.
Geoff
Average of ratings: -
In reply to Geoffrey Eggins

Re: Newbie with Block Problems

by Jan Dierckx -

and Moodle will install it next time you visit the admin page

have you visited the admin page?

In reply to Jan Dierckx

Re: Newbie with Block Problems

by Geoffrey Eggins -
yes i have
In reply to Geoffrey Eggins

Re: Newbie with Block Problems

by Jan Dierckx -

Ok...

  • Which block(s) did you install?

  • Can you post a screenshot (or listing) of the blocks directory? Most of the time blocks don't install because they somheow end up in the wrong place.

  • You don't need to add anything manually to the database, but if you have access to the database, you can check if the blocks have been added to mdl_blocks

In reply to Jan Dierckx

Re: Newbie with Block Problems

by Geoffrey Eggins -
Sorry is has taken so long to get back to you.. Teaching swollow up my time...

I have tried installing a number of blocks. One was a simple "time" block.

Attached is a screenshot of the "blocks" directory within my moodle install

I have had a look at the "mdl_blocks" table in my moodle database and the new blocks aren't coming up in there.

Thanks
Attachment blocksdirectory.JPG
In reply to Geoffrey Eggins

Re: Newbie with Block Problems

by Ger Tielemans -

Most of the time one "Bad block" is blocking the loading of the others:

  1. take out the blocks which are not mentioned in your mdl_blocks_table
  2. place one back
  3. visit the admin page ( ../admin/index.php )
  4. does that one show up?
    1. yes? put next one back
    2. no? got'm!! ..now just find the bug smile

(Another reason for not showing up: check how the content string in the block is built up: a block with an empty string does also not show up, but in your case it is not registrating as a block.)

In reply to Ger Tielemans

Re: Newbie with Block Problems

by Geoffrey Eggins -
Thanks for your help guys. I really appreciate it.

Turns out that  I just thought that when you were logged in as admin, and clicked "turn editing on" that I was on the admin page.

But the admin page is actually /admin/index.php ...
When I went there, the table was updated and the block works.

I told you I was a newb. Sorry to waste your time.. thanks heaps for your help ..

Do you know if there is a link to this "admin" page (../admin/index.php) anywhere from the main page of moodle?

Thanks again
In reply to Geoffrey Eggins

Re: Newbie with Block Problems

by Jan Dierckx -

thanks for the extra information.

The time block comes with it's own language string and readme. Did you copy the whole time directory straight into the blocks directory? Can you post a screenshot / tell me what exactly is inside blocks/time/ ?

In reply to Jan Dierckx

Re: Newbie with Block Problems

by Geoffrey Eggins -
Problem solved, (see above) .. thanks for your help Jan.
In reply to Geoffrey Eggins

Re: Newbie with Block Problems (solved)

by Jan Dierckx -
Ok, maybe we should Ger's note ( visit the admin page at ../admin/index.php ) to the documentation.
Where did you find this documentation? I've looked at the non-standard blocks page, but it is not there.