Moodle

replace statements in install.xml and post install hooks with install.php in db directories for all plugins

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Installation
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Current install is not nice, it must be fully separated from UI in admin/index.php, we have to remove tons of ifs used for cli and unittests, there many other long standing problems too...

Activity

Hide
Penny Leach added a comment -

please make sure there's post install hooks for local/ too

Show
Penny Leach added a comment - please make sure there's post install hooks for local/ too
Hide
Petr Škoda (skodak) added a comment - - edited

the main install.php should install:
1/ main site course
2/ guest account
3/ mnet default site record
4/ logs setup

Show
Petr Škoda (skodak) added a comment - - edited the main install.php should install: 1/ main site course 2/ guest account 3/ mnet default site record 4/ logs setup
Hide
Petr Škoda (skodak) added a comment -

done

Show
Petr Škoda (skodak) added a comment - done
Hide
Petr Škoda (skodak) added a comment -

oops, reopening, forgot local install.php

Show
Petr Škoda (skodak) added a comment - oops, reopening, forgot local install.php
Hide
Petr Škoda (skodak) added a comment -

reclosing, implemented in locallib too

Show
Petr Škoda (skodak) added a comment - reclosing, implemented in locallib too
Hide
Martin Dougiamas added a comment -

This one caught me out a bit, because we'd earlier added support in 1.9 and 2.0 for an $pluginname_install() function in lib.php of all plugins.

I note this hook is now deleted from 2.0 code, so this may bite anyone currently using this hook for 3rd party modules in 1.9. We should mention this in the release notes at least.

I do prefer the install.php method, though I don't know why the function name starts with xmldb_ since it's not related to xmldb at all ..

Show
Martin Dougiamas added a comment - This one caught me out a bit, because we'd earlier added support in 1.9 and 2.0 for an $pluginname_install() function in lib.php of all plugins. I note this hook is now deleted from 2.0 code, so this may bite anyone currently using this hook for 3rd party modules in 1.9. We should mention this in the release notes at least. I do prefer the install.php method, though I don't know why the function name starts with xmldb_ since it's not related to xmldb at all ..
Hide
Dongsheng Cai added a comment -

Fixed message/out installation code for this issue

Show
Dongsheng Cai added a comment - Fixed message/out installation code for this issue
Hide
Petr Škoda (skodak) added a comment -

There is a new readme file in mod/ blocks/ etc that explains what should be done in order to update plugin code for 2.0,
I used that name because upgrade.php uses something similar, any better name for that function?

Show
Petr Škoda (skodak) added a comment - There is a new readme file in mod/ blocks/ etc that explains what should be done in order to update plugin code for 2.0, I used that name because upgrade.php uses something similar, any better name for that function?

People

Dates

  • Created:
    Updated:
    Resolved: