350 Commits

Author SHA1 Message Date
Marina Glancy
2a68ee0eb1 MDL-42016 files: Properly synchronise internal references 2013-10-06 18:05:05 +11:00
Petr Škoda
38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +02:00
Eloy Lafuente (stronk7)
00a6df6b02 Merge branch 'w40_MDL-41999_m26_userpw' of https://github.com/skodak/moodle 2013-10-01 15:59:06 +02:00
Mark Nielsen
50ae8814e4 MDL-40248 mod: Allow xxx_get_types() to use default display
* Added new constant: MOD_SUBTYPE_NO_CHILDREN
* When MOD_SUBTYPE_NO_CHILDREN is returned from xxx_get_types()
  then default display is used for activity chooser.
* Updated mod/upgrade.txt
* Removed dead code from navigationlib.php instead of updating
  it for new behavior of xxx_get_types
* Updated lib/upgrade.txt
2013-09-30 16:49:37 +10:00
Petr Škoda
5fed843324 MDL-41999 warn developers to not use $USER->password directly 2013-09-27 10:51:38 +02:00
Petr Škoda
723a6e5679 MDL-41437 inform developers that version column was removed from module and block tables 2013-09-25 10:52:23 +02:00
Eloy Lafuente (stronk7)
161f995849 Merge branch 'w39_MDL-41437_m26_mia' of https://github.com/skodak/moodle
Conflicts:
	admin/auth.php
	lib/db/upgrade.php
	version.php
2013-09-24 20:18:03 +02:00
Petr Škoda
bde002b81a MDL-41437 rework plugin_manager caching and version info in blocks and modules
This patch includes:

* version column removed from modules table, now using standard config, this allows decimal version for modules
* version column removed from block table, now using standard config, this allows decimal version for blocks
* module version.php can safely use $plugins instead of module
* new plugin_manager bulk caching, this should help with MUC performance when logged in as admin
* all missing plugins are now in plugin overview (previously only blocks and modules)
* simplified code and improved coding style
* reworked plugin_manager unit tests - now using real plugins instead of mocks
* unit tests now fail if any plugin does not contain proper version.php file
* allow uninstall of deleted filters
2013-09-22 21:25:26 +02: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
Ankit Agarwal
63deb5c379 MDL-39959 events: Replace add_to_log() calls with events for course module actions (create, delete and update) 2013-09-16 15:29:56 +08:00
Sam Hemelryk
da8cd86f17 Merge branch 'MDL-38194-master' of git://github.com/sammarshallou/moodle
Conflicts:
	lib/upgrade.txt
2013-09-16 13:56:05 +12:00
sam marshall
137885b7e9 MDL-38194 Files: Allow download of large backup files
The PHP readfile function does not work for files more than 2GB.
This commit provides a wrapper that can be used so that files less
than 2GB are sent with readfile, and files larger than 2GB are
sent manually.

The change applies to all uses of pluginfile.php, although in
reality, backup files are probably the only ones likely to be more
than two gigabytes.
2013-09-13 14:59:57 +01:00
Rajesh Taneja
3bcf6b3cdd MDL-31560 Messages: Added support for noreply and support users
This is used by messaging system for sending/receiving message
to/from noreply or support user. message_send api will now use
core_user class to get noreply or support user and then
send/receive message depending on user state.
2013-09-13 16:13:26 +08:00
Marina Glancy
64501eeec9 MDL-41436 Remove DB fields course.modinfo and sectioncache 2013-09-10 14:11:52 +10:00
Marina Glancy
44ddd2a115 MDL-41219 course: Make properties of course_modinfo read-only
added phpdocs and unittests
2013-09-10 14:11:37 +10:00
Marina Glancy
d872881f2a MDL-41192 course: Properties of cm_info are read-only and calculated on request
Also added phpdocs
2013-09-10 14:11:31 +10:00
sam marshall
71ab7e512b MDL-41151 Files: Zip packer should have way to indicate progress 2013-09-05 16:41:57 +01:00
Eloy Lafuente (stronk7)
f875599462 Merge branch 'w36_MDL-41267_m26_toolsubplugins' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-09-04 01:08:37 +02:00
David Monllao
db5f2d3360 MDL-40566 behat: Adding info about the deprecated attr. 2013-09-03 10:29:28 +08:00
Petr Škoda
ac2b2713ba MDL-41267 add support for subplugins in admin tools 2013-08-31 11:40:44 +02:00
Damyon Wiese
cbd91e23e9 Merge branch 'wip-MDL-40931-m26' of git://github.com/samhemelryk/moodle
Conflicts:
	version.php
2013-08-27 15:29:49 +08:00
Marina Glancy
d55f05ef43 MDL-41181 function moveto_module does not modify properties of object
instead it returns the new value for module visibility
2013-08-27 15:36:40 +10:00
Frederic Massart
861b0510e5 MDL-39959: Replace Legacy events - Groups
This combines the following changes:

* Event for group member added
* Event for group member removed
* Event for group created
* Event for grouping created
* Event for group updated
* Event for grouping updated
* Event for group deleted
* Event for grouping deleted
* Adding tests for deleting functions
* Bulk remove of members uses low-level API

    The reason for this is that a bulk event has no value from a logging
    perspective as it is not granular. So now, the API is a bit slower,
    but the information the events contain makes sense, beside this is
    not (and should not be) used very often.

    The reason why the events_trigger_legacy() is kept is because we
    cannot create a new event for this, as we don't encourage developers
    to created bulk events, for the reasons mentioned above.

    I removed the call that gets the user record from the function
    groups_remove_member() as it was not required and only appeared
    to check if the user existed. It appears to be safe not to do
    this check as nothing would fail down the line.

* Bulk unassign of groupings uses low-level API

    As the previous commit, we keep the legacy event for now as it would
    be wrong to create a new event to replace it.

    Also, the code has been changed to call the low-level API to unassign
    groups from groupins, even though at the moment there are no
    events for that function.

* Bulk deletion of groups uses low-level API

    Again, we keep the legacy event because replacing it would force
    us to create a new event that does not make sense. See MDL-41312.

* Bulk deleting of groupings uses low-level API
* Asserting legacy event name in unit tests
* Minor SQL query and code improvements
2013-08-26 15:03:17 +08:00
Sam Hemelryk
c3d2fbf9cd MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-26 13:59:19 +12:00
Damyon Wiese
9ead041cdb Revert "MDL-40931 useragent: separated user agent functionality into a lib"
This reverts commit af62237d0e6e27df868d50848f7098f57c103f86.
This reverts commit 87a4194fdcd322d4aee5a6207b55a8da0864da94.
This reverts commit b2c66eb60c01805f26cc791966f05be52af7b406.

Conflicts:

	version.php
2013-08-22 13:31:25 +08:00
Damyon Wiese
89959d9ad1 Merge branch 'wip-MDL-40931-m26' of git://github.com/samhemelryk/moodle 2013-08-20 16:45:33 +08: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
Sam Hemelryk
af62237d0e MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-16 09:02:01 +12:00
Dan Poltawski
aae18d2af4 MDL-31836 upgrade.txt: add a note about encrypt change 2013-08-13 14:57:25 +08:00
Sam Hemelryk
90fb4f39fd Merge branch 'MDL-41100-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-08-13 09:37:02 +12:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Petr Škoda
598a82c950 MDL-41019 improve language caching
Includes:
* no more hacky reloads, everything is written only once and kept until cache reset
* lang menu list is now cached in MUC
* both string and lang menu caches are compatible with local caches on cluster nodes
* config-dist.php cleanup
2013-08-11 09:52:34 +02:00
Frederic Massart
d0cac8b51b MDL-41100 libraries: Deprecating get_plugin_list_with_file 2013-08-09 11:59:48 +08:00
Sam Hemelryk
17440b2198 Merge branch 'w32_MDL-40815_m26_deprevent' of https://github.com/skodak/moodle
Conflicts:
	lib/deprecatedlib.php
2013-08-06 15:38:18 +12:00
Petr Škoda
6b32d6bc93 MDL-40995 simplify minify integration and fix all known issues 2013-08-03 17:16:17 +02:00
Petr Škoda
f0f0e1fe73 MDL-40815 deprecate events_trigger() 2013-08-02 16:48:19 +02:00
Sam Hemelryk
73b4c1da84 Merge branch 'MDL-40678-m' of git://github.com/andrewnicols/moodle 2013-07-30 08:55:35 +12:00
Petr Škoda
656250de83 MDL-11270 use NVARCHAR(MAX) and VARBINARY(MAX) in SQL Server 2013-07-26 09:28:50 +02:00
Dan Poltawski
7a3f9421cb Merge branch 'w30_MDL-40545_m26_localcachedir' of https://github.com/skodak/moodle 2013-07-22 15:47:48 +08:00
Andrew Nicols
7868699535 MDL-40678 JavaScript: Split out moodle-core-notification into submodules 2013-07-20 20:21:31 +01:00
Petr Škoda
85b3806114 MDL-40545 add $CFG->localcachedir intended for local caching on cluster nodes 2013-07-20 14:10:25 +02:00
Mark Nelson
02ca2cada5 MDL-40649 libraries: deprecated get_recent_enrolments() 2013-07-19 18:17:31 +08:00
Mark Nelson
b645284403 MDL-40468 libraries: deprecated get_related_contexts_string() 2013-07-19 15:17:49 +08:00
Eloy Lafuente (stronk7)
fb1788c598 Merge branch 'MDL-40424-master' of git://github.com/FMCorz/moodle
Conflicts:
	admin/oacleanup.php
2013-07-17 01:21:51 +02:00
Eloy Lafuente (stronk7)
0b3af0798c Merge branch 'w29_MDL-40220_m26_core_component' of https://github.com/skodak/moodle 2013-07-17 01:07:21 +02:00
Petr Škoda
cc8fecb5ed MDL-40220 improve lib/upgrade.txt info for the new core_component class and deprecated functions 2013-07-16 22:43:31 +02:00
Frederic Massart
2e4c0c9181 MDL-40424 libraries: Deprecate context_instance_preload_sql() 2013-07-12 17:41:49 +08:00
Dan Poltawski
ac11252375 MDL-40604 upgrade.txt: change style to be more readable
As suggested by Tim Hunt.
2013-07-12 16:19:11 +08:00
Dan Poltawski
05226d7607 MDL-40604 deprecatedlib: Sort out old ~2.0 deprecations
Make sure things are throwing debugging notices and are documented.
2013-07-12 16:02:49 +08:00
Frederic Massart
b123a543a6 MDL-40463 libraries: Deprecate get_courseid_from_context() 2013-07-11 15:54:36 +08:00