152 Commits

Author SHA1 Message Date
Adrian Greeve
0bbefd81cd MDL-48228 database: Make utf8mb4 the default character set for mysql.
Thanks to Jetha Chan for providing the initial patch that this is
based on.
2017-03-01 09:03:12 +08:00
David Mudrák
00eeb686bf MDL-57896 admin: Prevent cfg.php from trying to change hard-set value
Credit goes to Andrew Nicols for spotting and suggesting this check.
2017-02-15 09:23:02 +01:00
David Mudrák
dfefcef2f1 MDL-57896 admin: Introduce the new admin/cli/cfg.php utility 2017-02-09 12:51:19 +01:00
Damyon Wiese
644fcbb629 MDL-55837 themes: base and canvas themes removed
Look for them in the plugins DB if you still need them.
2016-09-19 13:35:13 +08:00
Jun Pataleta
49ccaee5a9 MDL-55206 admin: Some code cleanup
* Removed unnecessary TODOs.
* Changed message prompt case to sentence case.
2016-07-15 14:44:35 +08:00
Jun Pataleta
36b88f2486 MDL-55206 admin: Remove div tags in password policy error message 2016-07-15 14:40:54 +08:00
David Monllao
c68010eaee MDL-55048 cli: Add example using new cool options
Also added short option for ignore password policy.
2016-07-11 15:17:57 +02:00
David Monllao
34127afdb6 Merge branch 'MDL-55084' of git://github.com/prg3/moodle 2016-07-11 15:06:38 +02:00
Paul Greidanus
c248c3f07f MDL-55084 admin: CLI driven password reset
This patch allows for changing a user's password via the command line.
This allows for scripted password changes easily.
2016-07-06 07:00:57 -06:00
Eloy Lafuente (stronk7)
ae96cf6246 MDL-53019 php: bump all harcoded versions to new 5.6.5 requirement
Moodle 3.2 and up will require PHP >= 5.6.5. Hopefully some day we'll
have this centralized with MDL-39007, just it's not done yet.

Thanks to Stephen Bourget for raising this!
2016-07-05 01:50:43 +02:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Jun Pataleta
54285c3ff5 MDL-53260 upgrade: Fix lang help text description. 2016-03-23 14:13:36 +08:00
Jun Pataleta
830f8bc780 MDL-53260 upgrade: Make lang option default to the site language 2016-03-21 15:08:59 +08:00
Nadav Kavalerchik
14aaa2d75b MDL-53260 upgrade: Option to display CLI upgrade messages in English 2016-03-21 11:59:50 +08:00
David Mudrák
6ef02f8479 MDL-51261 admin: Add option to define upgradekey via cli installer 2015-09-24 21:02:33 +02:00
David Mudrák
7d62bc2417 MDL-51403 install: Improve the language validation in the CLI installer
There are two essential improvements here. Firstly, by replacing the
file_exists() check with array_key_exists() we make sure that only
actual language code will be written into the config.php file (and not
the empty value in case of input that does not pass the PARAM_SAFEDIR
cleaning).

Additionally, we no longer display the full list of available languages
by default. The list can be displayed in the interactive mode by typing
the ? character instead of the language code. This makes the overall
interface cleaner, does not cause the header information (such as the
Moodle version) to scroll away and makes the nice cli logo more visible
(which was the main motivation for the whole patch anyway ;-).
2015-09-17 21:06:32 +02:00
Charles Fulton
096fd59653 MDL-46167 admin_cli: allow skipping of database installation 2015-07-04 19:15:50 +00:00
Tyler Bannister
7f7144fd50 MDL-47787 course: Added question delete to cm delete. 2015-06-25 16:35:22 -04:00
David Mudrák
394034ec6e MDL-50631 cli: Display the Moodle ASCII logo in the CLI installer header 2015-06-17 22:48:14 +02:00
John Okely
65903c7607 MDL-49842 install: Set front page summary to '' after cli install
This is to prevent front page summary from appearing as a 'new setting'
after the first upgrade of a site installed via cli.
2015-04-16 11:49:22 +08:00
Simey Lameze
0148cd852e MDL-49723 tool: deprecate guess_antolope_row_size method 2015-04-10 09:33:35 +08:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Andrew Nicols
da992717f4 MDL-28513 install: Add adminemail to the CLI installers 2015-01-21 09:42:51 +08:00
Dan Poltawski
df11019a82 MDL-46235/MDL-46971 mysql_compress_rows: fix typo 2014-10-14 16:36:47 +01:00
Damyon Wiese
a4fa3604e7 MDL-46235 Admin: Fix typos in mysql_compressed_rows.php cli script 2014-08-26 12:32:44 +08:00
Petr Skoda
a45d54b8cb MDL-46235 ddl: add support for large number of text fields in one database table 2014-08-25 12:40:57 +12:00
Petr Skoda
2e00d01db4 MDL-46099 session: fix use of references for session globals
This reverses the references used for global $USER and $SESSION,
the reason is that PHP does not allow references to references.
$USER is a reference to $GLOBALS['USER'] which means we cannot
put any references to it. Solution is to store the current user and session
objects in $GLOBALS['USER'] and $GLOBALS['SESSIOn'] are reference
them in $_SESSION.

This patch makes the session code behave the same way in CLI,
phpunit and normal web requests - this allows use to finally
unit test most aspects of the session code in Moodle.
2014-07-01 08:38:00 +12:00
Petr Skoda
4f4fb38cb5 MDL-45985 cli: add new cli tool for validation of database structure 2014-06-17 16:54:31 +12:00
Sam Hemelryk
3f5827459e MDL-39617 backup: language improvements to cli/backup.php 2014-02-04 09:04:01 +13:00
Ruslan Kabalin
d00951b585 MDL-39617 Add cli backup script for a single course backing up.
Useful for backing up a single course. Accepts parameters:

--courseid=INTEGER        Course ID for backup
--courseshortname=STRING  Course shortname for backup.
--destination=STRING      Path where to store backup file. If not set, the backup
                          will stored within the same course backup area.
2014-01-28 13:40:03 +00:00
Petr Škoda
dbe0203ba8 MDL-42931 fix hardcoded PHP version tests for 2.7 2013-12-13 14:04:24 +08:00
Petr Škoda
e87214bda7 MDL-42078 multiple uninstall improvements and cleanup
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
2013-10-07 13:10:36 +02:00
Petr Škoda
1a4621d8e5 MDL-31501 fake requried globals in both installers 2013-09-23 21:46:05 +02:00
Sam Hemelryk
98d696b6d5 MDL-31501 session: fixed missing autoloader during install 2013-09-23 15:38:45 +12:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Marina Glancy
cfda8732b7 MDL-37028 fixed statement to clear course cache 2013-09-11 14:57:59 +10:00
Damyon Wiese
749ce98e63 MDL-37028 Integrity check for course modules and sections
This commit reinstates:
commit 0bac49dc1983824e4861086ed1ab9e13af99d76d
Author: Marina Glancy <marina@moodle.com>
Date:   Tue Sep 3 17:14:13 2013 +1000

    MDL-37028 Integrity check for course modules and sections

    If section mentioned in 'orphaned' module does not exist module is added to the first available section. Also corrected whitespaces

commit 1f0a9ce48b3e6f8c5dc6628aa692323909925032
Author: Marina Glancy <marina@moodle.com>
Date:   Mon Aug 12 14:06:48 2013 +1000

    MDL-37028 Integrity check for course modules and sections

    created function, unittest, build-in quick integrity check on each call to rebuild_course_cache()
    also added CLI script
2013-09-11 10:47:49 +08:00
Damyon Wiese
eceecb72f3 Revert "MDL-37028 Integrity check for course modules and sections"
This is failing unit tests.

This reverts commit 0bac49dc1983824e4861086ed1ab9e13af99d76d.
This reverts commit 1f0a9ce48b3e6f8c5dc6628aa692323909925032.
2013-09-10 14:34:07 +08:00
Marina Glancy
1f0a9ce48b MDL-37028 Integrity check for course modules and sections
created function, unittest, build-in quick integrity check on each call to rebuild_course_cache()
also added CLI script
2013-08-30 16:41:13 +10:00
Dan Poltawski
6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Petr Škoda
99a9d8d937 MDL-41019 refactor string managers to new core_ classes 2013-08-08 09:10:25 +02:00
Petr Škoda
7f0ffc544a MDL-41020 fix installer notices 2013-08-04 10:18:10 +02:00
Petr Škoda
17601a7e12 MDL-39985 add explicit MariaDB support 2013-07-24 10:45:20 +08:00
Petr Škoda
85b3806114 MDL-40545 add $CFG->localcachedir intended for local caching on cluster nodes 2013-07-20 14:10:25 +02:00
Petr Škoda
d7245e3400 MDL-40475 add alternative component cache location and other improvements
Improvements include:
* Alternative location might be useful when server administrator wants to maintain
  a local copy of component cache instead of using shared $CFG->cachedir.
* Component caching is now enabled in behat tests which should improve performance.
* Standardised ignoring of component caching.
* Fixed debug mode in ABORT_AFTER_CONFIG scripts.
* General documentation improvements.
2013-07-12 13:05:41 +02:00
Petr Škoda
c05a50992e MDL-40415 add explicit OPcache support 2013-07-04 19:32:26 +02:00
Petr Škoda
d534708fd3 MDL-40299 textlib conversion to core_text and core_collator 2013-06-27 22:18:57 +02:00
Petr Škoda
1abf2f6acc MDL-39854 fix installer regression caused by new core_component 2013-06-18 10:31:26 +02:00
Dan Poltawski
3d164e1ef4 Revert "MDL-39474 Library: Make a fast way to check developer debug mode"
There were multiple problems discovered.

This reverts commit 5c92e7a740fbce4184cf204a11ebbb6b918a376b.

Conflicts:
	admin/cli/install.php
2013-06-18 15:07:22 +08:00