Implementing Dan Marsden's great idea for additional hooks when block
instances are deleted (bug 3446). Going a step further and adding hooks
for when block instances are created.
I 've come across a problem where:
1. You have an "old" (say 1.3.5?) Moodle installation.
2. You are logged in as admin.
3. You suddenly switch to using a 1.5+ codebase with
the SAME database, WITHOUT LOGGING OUT FIRST.
In this situation, I was presented with a deadlock. I could not do
anything because "my session had expired", and I could not even
log OUT to clear my session. In fact it was just reloading the
"session expired page" all the time.
If it weren't for debug = On which causes a notice in these
circumstances, it would be fracking difficult to understand what
was going on.
With this small addition, you can at least visit your login page
and log in anew, so problem fixed.
I believe this was talked about in the forums lately? Not sure.
(Also merging Martin's theme standard -> standardwhite change)
While researching bug 3478:
Consolidated handling of the incoming courseid parameter, as it was easy
to make an error the way this was written before.
In general, this script looks like it needs to be streamlined.
Fix for bug 2925:
When editing is turned on, the Main Menu should always display and give
the option of adding resources/activities in section 0 of the site.
Bad optimization code caused the drop downs to not be shown if there
was no section 0 (i.e., the site never had a news forum or an activity
in the Main Menu block).
FINALLY! :)
PS: Version bump, so that we know if people have the latest version of
the block. I 'm going to bump versions from now on when bugs are fixed.