Issue Details (XML | Word | Printable)

Key: MDL-17457
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Petr Skoda
Reporter: Petr Skoda
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-17458

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

Created: 29/Nov/08 02:58 AM   Updated: 10/Mar/09 05:16 PM
Return to search
Component/s: Installation
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Dongsheng Cai, Martin Dougiamas, Penny Leach and Petr Skoda
Security Level: None
Resolved date: 16/Jan/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
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...

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 29/Nov/08 02:59 AM
Field Original Value New Value
Parent MDL-17458 [ 29661 ]
Issue Type Bug [ 1 ] Sub-task [ 5 ]
Penny Leach added a comment - 19/Dec/08 09:00 PM
please make sure there's post install hooks for local/ too

Petr Skoda added a comment - 11/Jan/09 02:04 AM - edited
the main install.php should install:
1/ main site course
2/ guest account
3/ mnet default site record
4/ logs setup

Petr Skoda committed 15 files to 'Moodle CVS' - 11/Jan/09 06:41 PM
MDL-17457 moved a lot of code into lib/db/install.php + other refactoring and cleanup
MODIFY admin/settings/top.php   Rev. 1.29    (+4 -4 lines)
MODIFY mnet/lib.php   Rev. 1.33    (+4 -7 lines)
MODIFY login/index.php   Rev. 1.141    (+1 -8 lines)
ADD lib/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY lib/completionlib.php   Rev. 1.12    (+1 -1 lines)
MODIFY lib/moodlelib.php   Rev. 1.1150    (+3 -4 lines)
MODIFY mnet/environment.php   Rev. 1.21    (+16 -48 lines)
MODIFY lib/blocklib.php   Rev. 1.153    (+15 -22 lines)
MODIFY admin/settings/courses.php   Rev. 1.33    (+97 -95 lines)
MODIFY mod/hotpot/lib.php   Rev. 1.107    (+1 -11 lines)
MODIFY lib/db/upgrade.php   Rev. 1.264    (+12 -10 lines)
MODIFY admin/settings/users.php   Rev. 1.45    (+2 -2 lines)
MODIFY admin/settings/server.php   Rev. 1.59    (+4 -4 lines)
MODIFY lib/adminlib.php   Rev. 1.303    (+25 -151 lines)
MODIFY version.php   Rev. 1.957    (+1 -1 lines)
Petr Skoda committed 4 files to 'Moodle CVS' - 13/Jan/09 04:36 AM
MDL-17457 removed all statements from main install.xml, some more improvements
MODIFY lib/db/install.xml   Rev. 1.187    (+0 -30 lines)
MODIFY lib/db/install.php   Rev. 1.3    (+39 -6 lines)
MODIFY lib/adminlib.php   Rev. 1.310    (+71 -15 lines)
MODIFY admin/index.php   Rev. 1.350    (+8 -10 lines)
Petr Skoda committed 38 files to 'Moodle CVS' - 13/Jan/09 06:13 AM
MDL-17457 migrated all modules to new db/install.php; added upgrade.txt file for devs converting contrib modules
ADD mod/quiz/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/forum/lib.php   Rev. 1.767    (+1 -9 lines)
ADD mod/scorm/db/install.php   Rev. 1.1    (+0 -0 lines)
ADD mod/upgrade.txt   Rev. 1.1    (+0 -0 lines)
ADD mod/wiki/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY lib/adminlib.php   Rev. 1.311    (+25 -52 lines)
MODIFY mod/data/db/install.xml   Rev. 1.12    (+0 -14 lines)
MODIFY mod/choice/db/install.xml   Rev. 1.3    (+0 -12 lines)
ADD mod/assignment/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/hotpot/db/upgrade.php   Rev. 1.6    (+8 -1 lines)
ADD mod/chat/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/label/db/install.xml   Rev. 1.5    (+0 -8 lines)
MODIFY mod/glossary/db/install.xml   Rev. 1.5    (+0 -20 lines)
MODIFY mod/forum/db/install.xml   Rev. 1.9    (+0 -18 lines)
ADD mod/label/db/install.php   Rev. 1.1    (+0 -0 lines)
ADD mod/lesson/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/hotpot/version.php   Rev. 1.51    (+2 -2 lines)
MODIFY mod/chat/db/install.xml   Rev. 1.6    (+0 -11 lines)
MODIFY mod/survey/db/install.xml   Rev. 1.4    (+0 -99 lines)
MODIFY mod/lesson/lib.php   Rev. 1.60    (+2 -10 lines)
MODIFY mod/assignment/lib.php   Rev. 1.375    (+1 -8 lines)
DEL mod/hotpot/Attic/defaults.php   Rev. 1.4    (+0 -0 lines)
ADD mod/resource/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/feedback/db/install.xml   Rev. 1.7    (+0 -11 lines)
MODIFY mod/lesson/db/install.xml   Rev. 1.8    (+0 -9 lines)
ADD mod/forum/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/scorm/db/install.xml   Rev. 1.13    (+0 -10 lines)
MODIFY mod/assignment/db/install.xml   Rev. 1.5    (+0 -11 lines)
ADD mod/data/db/install.php   Rev. 1.1    (+0 -0 lines)
ADD mod/glossary/db/install.php   Rev. 1.1    (+0 -0 lines)
ADD mod/survey/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/quiz/db/install.xml   Rev. 1.19    (+0 -25 lines)
ADD mod/choice/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/resource/db/install.xml   Rev. 1.5    (+0 -9 lines)
MODIFY mod/quiz/lib.php   Rev. 1.325    (+1 -8 lines)
ADD mod/feedback/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY mod/feedback/lib.php   Rev. 1.23    (+2 -9 lines)
ADD mod/hotpot/db/install.php   Rev. 1.1    (+0 -0 lines)
Petr Skoda committed 3 files to 'Moodle CVS' - 16/Jan/09 06:36 AM
MDL-17457 moved all STATEMENTS into install.php
MODIFY mod/quiz/report/statistics/db/install.xml   Rev. 1.8    (+0 -7 lines)
ADD mod/quiz/report/statistics/db/install.php   Rev. 1.1    (+0 -0 lines)
MODIFY lib/db/install.php   Rev. 1.4    (+1 -4 lines)
Petr Skoda added a comment - 16/Jan/09 07:24 AM
done

Petr Skoda made changes - 16/Jan/09 07:24 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Petr Skoda added a comment - 16/Jan/09 07:24 AM
oops, reopening, forgot local install.php

Petr Skoda made changes - 16/Jan/09 07:24 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Petr Skoda committed 1 file to 'Moodle CVS' - 16/Jan/09 10:57 PM
MDL-17457 implemented lical/install.php and some other minor refactoring
MODIFY lib/Attic/locallib.php   Rev. 1.25    (+36 -24 lines)
Petr Skoda added a comment - 16/Jan/09 10:58 PM
reclosing, implemented in locallib too

Petr Skoda made changes - 16/Jan/09 10:58 PM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Martin Dougiamas added a comment - 10/Mar/09 10:50 AM
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 ..


Dongsheng Cai committed 3 files to 'Moodle CVS' - 10/Mar/09 11:09 AM
"MESSAGING, INSTALLATION/MDL-17457, change installation hook to meet moodle 2.0"
ADD message/output/popup/db/install.php   Rev. 1.1    (+0 -0 lines)
ADD message/output/email/db/install.php   Rev. 1.1    (+0 -0 lines)
ADD message/output/jabber/db/install.php   Rev. 1.1    (+0 -0 lines)
Dongsheng Cai added a comment - 10/Mar/09 11:11 AM
Fixed message/out installation code for this issue

Petr Skoda added a comment - 10/Mar/09 05:16 PM
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?