moodle.git
10 years agoMerge branch 'install_master' of git://github.com/amosbot/moodle
Dan Poltawski [Thu, 12 Apr 2012 04:59:33 +0000 (12:59 +0800)]
Merge branch 'install_master' of git://github.com/amosbot/moodle

10 years agoAutomatically generated installer lang files
AMOS bot [Thu, 12 Apr 2012 00:31:23 +0000 (00:31 +0000)]
Automatically generated installer lang files

10 years agoMDL-32323 tests: check both deletion with truncate and with delete
Eloy Lafuente (stronk7) [Wed, 11 Apr 2012 22:13:38 +0000 (00:13 +0200)]
MDL-32323 tests: check both deletion with truncate and with delete

10 years agoMDL-32323 improve SQL Server test reset performance
Petr Skoda [Wed, 11 Apr 2012 21:21:05 +0000 (23:21 +0200)]
MDL-32323 improve SQL Server test reset performance

10 years agoMDL-32323 do try to fetch all other grade objects with existing test fields
Petr Skoda [Wed, 11 Apr 2012 20:56:27 +0000 (22:56 +0200)]
MDL-32323 do try to fetch all other grade objects with existing test fields

10 years agoMDL-32323 do try to fetch grades with existing test fields
Petr Skoda [Wed, 11 Apr 2012 20:41:37 +0000 (22:41 +0200)]
MDL-32323 do try to fetch grades with existing test fields

10 years agoMDL-32323 fix issues breaking phpunit tests for sqlsrv driver
Petr Skoda [Wed, 11 Apr 2012 20:14:18 +0000 (22:14 +0200)]
MDL-32323 fix issues breaking phpunit tests for sqlsrv driver

10 years agoRevert "MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form...
Sam Hemelryk [Wed, 11 Apr 2012 05:18:58 +0000 (17:18 +1200)]
Revert "MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag"

This reverts commit f9f281b8fee75c2416d71bae7583fd026b9ccabb.

10 years agoMerge branch 'w15_MDL-32323_m23_phpunit3' of git://github.com/skodak/moodle
Dan Poltawski [Wed, 11 Apr 2012 01:32:58 +0000 (09:32 +0800)]
Merge branch 'w15_MDL-32323_m23_phpunit3' of git://github.com/skodak/moodle

10 years agoMerge branch 'MDL-32217' of git://github.com/ppichet/moodle
Dan Poltawski [Wed, 11 Apr 2012 01:27:29 +0000 (09:27 +0800)]
Merge branch 'MDL-32217' of git://github.com/ppichet/moodle

10 years agoMDL-22895 backup: minor fixes
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 23:47:53 +0000 (01:47 +0200)]
MDL-22895 backup: minor fixes

10 years agoMerge branch 'MDL-22895-master' of git://github.com/ankitagarwal/moodle
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 23:44:39 +0000 (01:44 +0200)]
Merge branch 'MDL-22895-master' of git://github.com/ankitagarwal/moodle

10 years agoMDL-30843 editor: Fixed up out of place if
Sam Hemelryk [Tue, 10 Apr 2012 21:22:14 +0000 (09:22 +1200)]
MDL-30843 editor: Fixed up out of place if

10 years agoMDL-32368 pgsql: bytea_output only available in 9.0 and upwards
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 19:32:56 +0000 (21:32 +0200)]
MDL-32368 pgsql: bytea_output only available in 9.0 and upwards

10 years agoMDL-32392 cleanup: adding @todo about unused is_min_version() method
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 19:26:00 +0000 (21:26 +0200)]
MDL-32392 cleanup: adding @todo about unused is_min_version() method

10 years agoMDL-32323 always verify that database PHPUnit extension is available
Petr Skoda [Tue, 10 Apr 2012 19:15:33 +0000 (21:15 +0200)]
MDL-32323 always verify that database PHPUnit extension is available

10 years agoMDL-32323 use new loadDataSet in mod_data and fix typos in last commit
Petr Skoda [Tue, 10 Apr 2012 19:07:56 +0000 (21:07 +0200)]
MDL-32323 use new loadDataSet in mod_data and fix typos in last commit

10 years agoMerge branch 'w15_MDL-32368_m23_bytea' of git://github.com/skodak/moodle
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 18:59:34 +0000 (20:59 +0200)]
Merge branch 'w15_MDL-32368_m23_bytea' of git://github.com/skodak/moodle

10 years agoMDL-32323 implement data set loader support in advanced_testcase
Petr Skoda [Tue, 10 Apr 2012 18:58:27 +0000 (20:58 +0200)]
MDL-32323 implement data set loader support in advanced_testcase

10 years agoMDL-32365 mssql and sqlsrv: introspect metainfo to look for identities
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 18:24:05 +0000 (20:24 +0200)]
MDL-32365 mssql and sqlsrv: introspect metainfo to look for identities

10 years agoMDL-32365 oracle: ensure table has 'before each row' trigger to
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 17:49:34 +0000 (19:49 +0200)]
MDL-32365 oracle: ensure table has 'before each row' trigger to
determine if the 'id' column is sequence based or no

10 years agoMDL-32323 all our base test case classes should be abstract
Petr Skoda [Tue, 10 Apr 2012 17:03:24 +0000 (19:03 +0200)]
MDL-32323 all our base test case classes should be abstract

10 years agoMerge branch 'w15_MDL-32365_m23_id' of git://github.com/skodak/moodle
Eloy Lafuente (stronk7) [Tue, 10 Apr 2012 16:55:33 +0000 (18:55 +0200)]
Merge branch 'w15_MDL-32365_m23_id' of git://github.com/skodak/moodle

10 years agoMDL-32323 make base test case classes abstract to prevent empty testcase warnings...
Petr Skoda [Tue, 10 Apr 2012 16:51:34 +0000 (18:51 +0200)]
MDL-32323 make base test case classes abstract to prevent empty testcase warnings, fix property access

10 years agoMDL-32323 allow specification of test class in webrunner and add some explanation...
Petr Skoda [Tue, 10 Apr 2012 12:38:50 +0000 (14:38 +0200)]
MDL-32323 allow specification of test class in webrunner and add some explanation of parameters

10 years agoMDL-32323 add php version of all-in-one phpunit init script
Petr Skoda [Tue, 10 Apr 2012 12:22:21 +0000 (14:22 +0200)]
MDL-32323 add php version of all-in-one phpunit init script

10 years agoMDL-32323 prevent modification of our heavily modified runBare() methods
Petr Skoda [Tue, 10 Apr 2012 11:58:47 +0000 (13:58 +0200)]
MDL-32323 prevent modification of our heavily modified runBare() methods

This should help with compatibility of future PHPUnit and it also allows us to improve test reset without breaking existing moodle test cases.

10 years agoMDL-32323 improve inline docs
Petr Skoda [Tue, 10 Apr 2012 11:50:04 +0000 (13:50 +0200)]
MDL-32323 improve inline docs

10 years agoMDL_32323 improve test readme
Petr Skoda [Tue, 10 Apr 2012 11:03:02 +0000 (13:03 +0200)]
MDL_32323 improve test readme

10 years agoMDL-32323 allow mocking of global $DB
Petr Skoda [Tue, 10 Apr 2012 10:13:28 +0000 (12:13 +0200)]
MDL-32323 allow mocking of global $DB

10 years agoMDL-32323 automate transaction handling in test reset
Petr Skoda [Mon, 9 Apr 2012 20:55:12 +0000 (22:55 +0200)]
MDL-32323 automate transaction handling in test reset

10 years agoMDL-32323 simplify phpunit integration readme
Petr Skoda [Mon, 9 Apr 2012 12:36:05 +0000 (14:36 +0200)]
MDL-32323 simplify phpunit integration readme

10 years agoMDL-32323 convert mod_data search test
Petr Skoda [Mon, 9 Apr 2012 12:23:13 +0000 (14:23 +0200)]
MDL-32323 convert mod_data search test

10 years agoMDL-32323 reset state after failed test
Petr Skoda [Mon, 9 Apr 2012 11:51:50 +0000 (13:51 +0200)]
MDL-32323 reset state after failed test

10 years agoMDL-32323 fix generator file name typos
Petr Skoda [Mon, 9 Apr 2012 11:36:04 +0000 (13:36 +0200)]
MDL-32323 fix generator file name typos

10 years agoMDL-32323 convert question tests
Petr Skoda [Sun, 8 Apr 2012 22:24:57 +0000 (00:24 +0200)]
MDL-32323 convert question tests

1/ type/match/tests/walkthrough_test.php - tests are failing randomly, looks like some weird randomisation is going on there - see TODOs

2/ type/multianswer/tests/upgradelibnewqe_test.php contains invalid expected value - see TODO

10 years agoMDL-32323 add list of common first and last names + long text
Petr Skoda [Sun, 8 Apr 2012 20:13:25 +0000 (22:13 +0200)]
MDL-32323 add list of common first and last names + long text

Random users now get proper first and last names, course and category descriptions contains longer text. The names can be also used as source of random complex utf-8 strings.

10 years agoMDL-32323 require at least PHPUnit 3.6.0
Petr Skoda [Sun, 8 Apr 2012 15:20:24 +0000 (17:20 +0200)]
MDL-32323 require at least PHPUnit 3.6.0

10 years agoMDL-32323 add basic mod_data data generator
Petr Skoda [Sun, 8 Apr 2012 10:23:50 +0000 (12:23 +0200)]
MDL-32323 add basic mod_data data generator

10 years agoMDL-32323 do not pollution config-dist.php with settings that only DML driver devs use
Petr Skoda [Sun, 8 Apr 2012 10:23:15 +0000 (12:23 +0200)]
MDL-32323 do not pollution config-dist.php with settings that only DML driver devs use

10 years agoMDL-32323 improve transaction handling in PHPUnit test cases
Petr Skoda [Sun, 8 Apr 2012 10:02:01 +0000 (12:02 +0200)]
MDL-32323 improve transaction handling in PHPUnit test cases

10 years agoMDL-32323 add grade tests
Petr Skoda [Sun, 8 Apr 2012 09:30:44 +0000 (11:30 +0200)]
MDL-32323 add grade tests

10 years agoMDL-32323 add basic mod_assignment data generator
Petr Skoda [Sun, 8 Apr 2012 09:30:13 +0000 (11:30 +0200)]
MDL-32323 add basic mod_assignment data generator

10 years agoMDL-32323 add basic mod_forum data generator
Petr Skoda [Sun, 8 Apr 2012 09:29:50 +0000 (11:29 +0200)]
MDL-32323 add basic mod_forum data generator

10 years agoMDL-32323 fix PHPUnit diag regression
Petr Skoda [Sat, 7 Apr 2012 22:23:37 +0000 (00:23 +0200)]
MDL-32323 fix PHPUnit diag regression

10 years agoMDL-32323 improve PHPUnit related diagnotic messages
Petr Skoda [Sat, 7 Apr 2012 21:56:45 +0000 (23:56 +0200)]
MDL-32323 improve PHPUnit related diagnotic messages

10 years agoMDL-32323 improve mysql test reset performance
Petr Skoda [Sat, 7 Apr 2012 21:28:29 +0000 (23:28 +0200)]
MDL-32323 improve mysql test reset performance

10 years agoMDL-32323 add windows test database init script
Petr Skoda [Sat, 7 Apr 2012 19:44:34 +0000 (21:44 +0200)]
MDL-32323 add windows test database init script

10 years agoMDL-32323 make test locking win compatible
Petr Skoda [Sat, 7 Apr 2012 18:16:56 +0000 (20:16 +0200)]
MDL-32323 make test locking win compatible

10 years agoMDL-32323 always create test dirs using standard functions and close handles before...
Petr Skoda [Sat, 7 Apr 2012 17:56:24 +0000 (19:56 +0200)]
MDL-32323 always create test dirs using standard functions and close handles before delete

10 years agoMDL-32323 do not write to system /tmp/ in tests
Petr Skoda [Sat, 7 Apr 2012 17:50:50 +0000 (19:50 +0200)]
MDL-32323 do not write to system /tmp/ in tests

10 years agoMDL-32323 undo path mangling, we have to trust admins
Petr Skoda [Sat, 7 Apr 2012 17:31:43 +0000 (19:31 +0200)]
MDL-32323 undo path mangling, we have to trust admins

10 years agoMDL-32323 do lot try to acquire lock before dataroot init
Petr Skoda [Sat, 7 Apr 2012 17:27:49 +0000 (19:27 +0200)]
MDL-32323 do lot try to acquire lock before dataroot init

10 years agoMDL-32323 make sure DDL libs are loaded before starting function db tests
Petr Skoda [Sat, 7 Apr 2012 17:23:18 +0000 (19:23 +0200)]
MDL-32323 make sure DDL libs are loaded before starting function db tests

10 years agoMDL-32323 fix PHPUNIT_UTIL constant usage
Petr Skoda [Sat, 7 Apr 2012 16:12:25 +0000 (18:12 +0200)]
MDL-32323 fix PHPUNIT_UTIL constant usage

10 years agoMDL-32323 fix installer warning
Petr Skoda [Sat, 7 Apr 2012 15:16:08 +0000 (17:16 +0200)]
MDL-32323 fix installer warning

10 years agoMDL-32323 reset event handlers in phpunit test reset
Petr Skoda [Sat, 7 Apr 2012 12:56:28 +0000 (14:56 +0200)]
MDL-32323 reset event handlers in phpunit test reset

10 years agoMDL-32323 test detection of changes and improve coding style
Petr Skoda [Sat, 7 Apr 2012 12:49:44 +0000 (14:49 +0200)]
MDL-32323 test detection of changes and improve coding style

10 years agoMDL-32323 use auto_increment instead of primary_key for sequence detection and improv...
Petr Skoda [Sat, 7 Apr 2012 12:17:31 +0000 (14:17 +0200)]
MDL-32323 use auto_increment instead of primary_key for sequence detection and improve coding style

10 years agoMDL-32323 improve self-diagnostic messages
Petr Skoda [Sat, 7 Apr 2012 12:00:44 +0000 (14:00 +0200)]
MDL-32323 improve self-diagnostic messages

10 years agoMDL-32323 rework db reset once more, now with tests
Petr Skoda [Sat, 7 Apr 2012 10:09:41 +0000 (12:09 +0200)]
MDL-32323 rework db reset once more, now with tests

10 years agoMDL-32323 add fast transaction based database reset for PostgreSQL
Petr Skoda [Sat, 7 Apr 2012 00:05:14 +0000 (02:05 +0200)]
MDL-32323 add fast transaction based database reset for PostgreSQL

10 years agoMDL-32323 test database first, if DML/DDL fails everything else will too
Petr Skoda [Fri, 6 Apr 2012 23:17:46 +0000 (01:17 +0200)]
MDL-32323 test database first, if DML/DDL fails everything else will too

10 years agoMDL-32323 rework buggy database reset optimisation and fix blog tests
Petr Skoda [Fri, 6 Apr 2012 22:34:44 +0000 (00:34 +0200)]
MDL-32323 rework buggy database reset optimisation and fix blog tests

10 years agoMDL-32323 cache structure of all tables and reset sequences only in table where id...
Petr Skoda [Fri, 6 Apr 2012 20:24:42 +0000 (22:24 +0200)]
MDL-32323 cache structure of all tables and reset sequences only in table where id is primary key

10 years agoMDL-32323 fix recently borked detection of DB changes and improve coding style
Petr Skoda [Fri, 6 Apr 2012 19:36:25 +0000 (21:36 +0200)]
MDL-32323 fix recently borked detection of DB changes and improve coding style

10 years agoMDL-32323 fix concurrent run collision caused by setup reset
Petr Skoda [Fri, 6 Apr 2012 18:36:18 +0000 (20:36 +0200)]
MDL-32323 fix concurrent run collision caused by setup reset

10 years agoMDL-32323 prevent concurrent execution of unit tests
Petr Skoda [Fri, 6 Apr 2012 12:20:29 +0000 (14:20 +0200)]
MDL-32323 prevent concurrent execution of unit tests

10 years agoMDL-32323 allow execution of tests through util.php and add option to include alterna...
Petr Skoda [Fri, 6 Apr 2012 11:39:31 +0000 (13:39 +0200)]
MDL-32323 allow execution of tests through util.php and add option to include alternative phpunit files (for testing only!)

10 years agoMDL-32323 more magic to allow init.sh symlinks
Petr Skoda [Fri, 6 Apr 2012 10:25:36 +0000 (12:25 +0200)]
MDL-32323 more magic to allow init.sh symlinks

from http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in

10 years agoMDL-32323 improve phpunit data generators
Petr Skoda [Fri, 6 Apr 2012 10:16:18 +0000 (12:16 +0200)]
MDL-32323 improve phpunit data generators

10 years agoMDL-32323 fix skipped config rebuild in init script
Petr Skoda [Thu, 5 Apr 2012 20:09:02 +0000 (22:09 +0200)]
MDL-32323 fix skipped config rebuild in init script

10 years agoMDL-32323 minor phpunit related improvements and cleanup
Petr Skoda [Thu, 5 Apr 2012 17:03:31 +0000 (19:03 +0200)]
MDL-32323 minor phpunit related improvements and cleanup

10 years agoMDL-32323 experimental web UI for execution of PHPUnit tests
Petr Skoda [Wed, 4 Apr 2012 23:25:06 +0000 (01:25 +0200)]
MDL-32323 experimental web UI for execution of PHPUnit tests

It is not localised intentionally because only developers should use it…

10 years agoMDL-32323 all-in-one PHPUnit init script
Petr Skoda [Wed, 4 Apr 2012 19:06:01 +0000 (21:06 +0200)]
MDL-32323 all-in-one PHPUnit init script

10 years agoMDL-32323 add schema for phpunit.xml configuration file
Petr Skoda [Wed, 4 Apr 2012 18:26:58 +0000 (20:26 +0200)]
MDL-32323 add schema for phpunit.xml configuration file

Credit goes to https://github.com/gooh/phpunit-schema, thanks Gordon Oheim!

10 years agoMDL-32368 fix pg to always use old bytea encoding
Petr Skoda [Sat, 7 Apr 2012 17:16:52 +0000 (19:16 +0200)]
MDL-32368 fix pg to always use old bytea encoding

10 years agoMDL-32365 fix hardcoded auto-increment on id columns
Petr Skoda [Sat, 7 Apr 2012 14:00:54 +0000 (16:00 +0200)]
MDL-32365 fix hardcoded auto-increment on id columns

10 years agoMDL-32365 fix invalid checking for returned id when custom sequence used
Petr Skoda [Sat, 7 Apr 2012 10:10:51 +0000 (12:10 +0200)]
MDL-32365 fix invalid checking for returned id when custom sequence used

10 years agoMerge branch 'MDL-32300' of git://github.com/timhunt/moodle
Dan Poltawski [Tue, 10 Apr 2012 09:42:28 +0000 (17:42 +0800)]
Merge branch 'MDL-32300' of git://github.com/timhunt/moodle

10 years agoMDL-32124 mod_feedback: Cleanup post-integration of unused var
Sam Hemelryk [Tue, 10 Apr 2012 05:21:37 +0000 (17:21 +1200)]
MDL-32124 mod_feedback: Cleanup post-integration of unused var

10 years agoMerge branch 'MDL-32124_master_wip' of git://github.com/grabs/moodle
Sam Hemelryk [Tue, 10 Apr 2012 05:21:00 +0000 (17:21 +1200)]
Merge branch 'MDL-32124_master_wip' of git://github.com/grabs/moodle

10 years agoMerge branch 'wip-MDL-27427-master' of git://github.com/phalacee/moodle
Dan Poltawski [Tue, 10 Apr 2012 04:04:06 +0000 (12:04 +0800)]
Merge branch 'wip-MDL-27427-master' of git://github.com/phalacee/moodle

10 years agoMerge branch 'MDL-32347' of git://github.com/timhunt/moodle
Dan Poltawski [Tue, 10 Apr 2012 03:34:12 +0000 (11:34 +0800)]
Merge branch 'MDL-32347' of git://github.com/timhunt/moodle

10 years agoMDL-32299 quiz mod_form: fix help string typo
Dan Poltawski [Tue, 10 Apr 2012 03:29:57 +0000 (11:29 +0800)]
MDL-32299 quiz mod_form: fix help string typo

10 years agoMerge branch 'MDL-32299' of git://github.com/timhunt/moodle
Dan Poltawski [Tue, 10 Apr 2012 03:25:09 +0000 (11:25 +0800)]
Merge branch 'MDL-32299' of git://github.com/timhunt/moodle

10 years agoMerge branch 'wip-mdl-30051' of git://github.com/rajeshtaneja/moodle
Dan Poltawski [Tue, 10 Apr 2012 03:05:59 +0000 (11:05 +0800)]
Merge branch 'wip-mdl-30051' of git://github.com/rajeshtaneja/moodle

10 years agoMerge branch 'MDL-32318' of git://github.com/timhunt/moodle
Dan Poltawski [Tue, 10 Apr 2012 02:26:49 +0000 (10:26 +0800)]
Merge branch 'MDL-32318' of git://github.com/timhunt/moodle

10 years agoMDL-32300 quiz reports: proper frankenstyle prefixes on class names.
Tim Hunt [Thu, 17 Nov 2011 18:34:07 +0000 (18:34 +0000)]
MDL-32300 quiz reports: proper frankenstyle prefixes on class names.

10 years agoMerge branch 'MDL-25801' of git://github.com/timhunt/moodle
Dan Poltawski [Tue, 10 Apr 2012 01:11:38 +0000 (09:11 +0800)]
Merge branch 'MDL-25801' of git://github.com/timhunt/moodle

10 years agoMerge branch 'MDL-32349-master' of git://github.com/sammarshallou/moodle
Sam Hemelryk [Tue, 10 Apr 2012 00:38:40 +0000 (12:38 +1200)]
Merge branch 'MDL-32349-master' of git://github.com/sammarshallou/moodle

10 years agoMDL-30843 admin: Fixed up label for attribute
Sam Hemelryk [Tue, 10 Apr 2012 00:35:26 +0000 (12:35 +1200)]
MDL-30843 admin: Fixed up label for attribute

10 years agoMerge branch 'MDL-30843_b' of git://github.com/rwijaya/moodle
Sam Hemelryk [Tue, 10 Apr 2012 00:34:37 +0000 (12:34 +1200)]
Merge branch 'MDL-30843_b' of git://github.com/rwijaya/moodle

10 years agoMerge branch 'wip-mdl-32270' of git://github.com/rajeshtaneja/moodle
Sam Hemelryk [Mon, 9 Apr 2012 22:53:34 +0000 (10:53 +1200)]
Merge branch 'wip-mdl-32270' of git://github.com/rajeshtaneja/moodle

10 years agoMerge branch 'w15_MDL-32263_m23_enroladmin' of git://github.com/skodak/moodle
Sam Hemelryk [Mon, 9 Apr 2012 22:48:34 +0000 (10:48 +1200)]
Merge branch 'w15_MDL-32263_m23_enroladmin' of git://github.com/skodak/moodle

10 years agoMerge branch 'w15_MDL-32293_m23_timeout' of git://github.com/skodak/moodle
Sam Hemelryk [Mon, 9 Apr 2012 22:43:08 +0000 (10:43 +1200)]
Merge branch 'w15_MDL-32293_m23_timeout' of git://github.com/skodak/moodle

10 years agoMerge branch 'w15_MDL-32308_m23_sharing' of git://github.com/skodak/moodle
Sam Hemelryk [Mon, 9 Apr 2012 22:37:45 +0000 (10:37 +1200)]
Merge branch 'w15_MDL-32308_m23_sharing' of git://github.com/skodak/moodle

10 years agoMDL-32263 remove broken admin test in enrol_check_plugins()
Petr Skoda [Mon, 9 Apr 2012 17:59:19 +0000 (19:59 +0200)]
MDL-32263 remove broken admin test in enrol_check_plugins()

10 years agoMDL-32308 Fix error when testing id of guest user
Hugh Davenport [Mon, 9 Apr 2012 17:03:45 +0000 (19:03 +0200)]
MDL-32308 Fix error when testing id of guest user

10 years agoMDL-32293 move the upgrade_set_timeout() function to lib/upgradelib.php
Petr Skoda [Mon, 9 Apr 2012 16:14:27 +0000 (18:14 +0200)]
MDL-32293 move the upgrade_set_timeout() function to lib/upgradelib.php

Credit goes to Eloy Lafuente.