Can't get reset blocks

Can't get reset blocks

by Peter Easton -
Number of replies: 2
I've tried to use the reset.php script butit won't work.
I have two servers a dev and a prod. it works on the dev but only returns a white screen .

any ideas.

Pete
Average of ratings: -
In reply to Peter Easton

Re: Can't get reset blocks

by ian lake -

Peter

I don't know if you found a solution, but this is what worked for me on the xampp version of 1.8.2, I will try this on my production server - 'fools rush in.....' and all that! And that's another thing, I've been using Moodle for a little over a year and still have HUGE gaps in my knowledge and I have no idea about coding, programming, languages etc. So no guarantees or suggestions that this is the right answer!

Going into '\moodle\course\format\topics\config.php' in each of the course formats I was able to define exactly which blocks I wanted to see on the course pages.

I then copied the resetblocks.php script into the moodle folder (the one that contains 'config.php & config-dist.php) copying it anywhere else does not work; I know, I tried it.

Run the script - in Moodle 1.8.2 the blocks on the front page are reset to their default, but the course pages are reset to the options set in the config.php file.

ian 

In reply to ian lake

Re: Can't get reset blocks

by Noshir Homawala -
The table mdl_block_instance holds information for the blocks displayed for a course where pageid=courseid. If you look at the table you'll probably get a better understanding of how it works than if I explain it but to reset blocks for a course just remove the entries for that course from the ml_block_instance table.

Using
DELETE FROM `mdl_block_instance` WHERE `pageid` = n;
worked fine for both a single courseid No or a range of courseids.

I've got the default blocks set using site wide sticky blocks (using moodle 1.82+) so once i removed the entried in mdl_blocks_instance my preferred blocks were present (without any duplicates etc).