Blocks won't delete (1.8 upgrade from 1.6.3+)

Blocks won't delete (1.8 upgrade from 1.6.3+)

by A. T. Wyatt -
Number of replies: 6
WIMP (please don't tell me I should be using Linux; this is not an option!smile)
Mysql 4.1.20
php 5.1.2
Windows XP, IIS 6?
moodle 1.8 + (2007021503)

I upgraded a 1.6.3+ database to moodle 1.8 +.
No errors were reported in the upgrade.
As an instructor and as admin, I can add blocks to courses. Once they are added I can't delete them. They appear to be deleted, but once you turn editing off, they come right back. This happens in new courses and in pre-existing courses. The front page, however, works. You can delete blocks and they stay deleted. In regular courses, they come back.

I also tried this in a moodle 1.8 install with an empty database. There, I could delete the blocks and they stayed deleted! The mysterious return only happens with the upgraded database.

Prior to doing the install, I deleted all the tables created from non-standard blocks (used the moodle admin interface to do this--I was using quickmail, course menu, sidebar, and attendance. I deleted EVERYTHING that was non-standard prior to installing the new codebase and triggering the database upgrade).

I did not, however, go through every single course (169) to take out references to the now deleted blocks/modules.

Has anyone ever experienced this before? I have to think this is a database problem, but I can't imagine being able to ADD a block and yet not be able to delete it again!

Thanks for any ideas--
atw

Average of ratings: -
In reply to A. T. Wyatt

Re: Blocks won't delete (1.8 upgrade from 1.6.3+)

by A. T. Wyatt -
Answering myself. . .

I have decided that the 1.6.3+ database might have had some problems going in. I am going to just start with a clean database and restore the information. It will take longer, but I have a higher confidence factor that it will work!

atw
In reply to A. T. Wyatt

Re: Blocks won't delete (1.8 upgrade from 1.6.3+)

by A. T. Wyatt -
Answering myself again. . .
Now I have duplicate blocks!
I just restored a course into the moodle 1.8. It now has duplicates of the core blocks (activities, upcoming events, courses). The funny thing is that some of the blocks can be deleted, and some can’t. I am wondering if some the tables in our production moodle are locked? I don’t think all of them could be locked, but I have been having this block problem for a while and I saw someone else post on it earlier this week.
The course with the duplicate blocks was restored on the 1.8+ instance.
The original course archive came from the 1.6.3+ instance.

In general, courses restored that refer to uninstalled blocks just ignore those. This happened. Quickmail and course menu are not present in the 1.8 instance. But core blocks that were restored appear twice.

So I think it is something in the database. I will investigate the locking angle.

atw

In reply to A. T. Wyatt

Re: Blocks won't delete (1.8 upgrade from 1.6.3+)

by Zachary Lyons -

ATW,

I hope this helps you...

It looks to me like you are being confused by Sticky Blocks.

When you add a sticky block to your courses, you can't move them around or delete them from within the course.

If you could follow these instructions, let me know if it works:

  1. Go to a course and determine which blocks you want removed. The ones that have no delete button when editing is on are Sticky Blocks.
  2. Now go to Appearance --> Sticky Blocks --> Course Page (dropdown)
  3. Delete all the blocks in there.

When I first installed Moodle, I was like "Oooh, sticky blocks! I can use that to automatically add the basic blocks (administration, participants, course summary, etc.)! I promptly did so, and what do you know, but Moodle is smart enough to add all those blocks when you initially create a course (or, in your case, restore [or whatever you chose to do]). I ended up with duplicate blocks, same as you seem to have.

Average of ratings: Useful (1)
In reply to Zachary Lyons

Re: Blocks won't delete (1.8 upgrade from 1.6.3+)

by A. T. Wyatt -
You know, I set that when I was goofing around and had forgotten all about it!! Brilliant! You have made me very happy!

I think I will see if I can edit the php file to control default blocks instead of using stickies (my old method), since I always wind up restoring a lot of courses. I think my faculty might find it confusing when extra blocks wind up in their courses . . . Hope it is as easy as it used to be!

atw
In reply to A. T. Wyatt

Re: Blocks won't delete (1.8 upgrade from 1.6.3+)

by Shaun Kellogg -
Having the same problem deleting HTML blocks that I added so I could use Third Party Widgets within a course. The other blocks seem to be permanent as well, though I am able to hide them from view at least.