Commit Graph

34 Commits

Author SHA1 Message Date
6a601097a0 MDL-44070 Conditional availability enhancements (5): deprecate old lib
The old conditionlib.php, which is replaced by the new availability
API, has been deprecated.

* Code which uses the key functions (is_available,
  get_full_information) should still work. These now show
  deprecated warnings and then pass through to equivalents in the
  new API.
* I have created new unit tests for these functions.
* The old language file has been removed (reused strings already
  moved with AMOS).
* Most other functions throw exceptions because it was impossible
  (due to fundamental API differences) or difficult to reimplement.
* I don't really expect that non-core code (outside unit tests) will
  have used any of the other functions.
2014-04-07 20:11:45 +01:00
d3db4b037c MDL-44070 Conditional availability enhancements (2): subsystem, API
This commit defines the new /availability root folder, with
/availability/classes, /availability/tests, and
/availability/condition where the condition plugins will live.
Condition plugin prefix is availability_, e.g. availability_date.

Rationale for this organisation:

1. I was originally going to put this in /lib/availability but
   it has been pointed out that putting even more junk in lib
   is probably bad.
2. 'availability' and 'condition' are the two names used in code
   to refer to this system ($CFG->enableavailability).
3. The prefix has to be short enough to allow database tables
   (although in practice I assume that condition plugins will not
   normally contain database tables).

The new API includes a Boolean tree structure that controls the
availability of an item.

AMOS BEGIN
 CPY [availabilityconditions,core_condition],[restrictaccess,core_availability]
 CPY [enableavailability,core_condition],[enableavailability,core_availability]
 CPY [configenableavailability,core_condition],[enableavailability_desc,core_availability]
AMOS END
2014-04-07 20:11:33 +01:00
a55eaf0351 MDL-43293 Events: Added comments event in modules supporting comments 2013-12-23 09:22:14 +08:00
6ef8d163c1 MDL-43137 fix open_basedir regression in classloader 2013-12-06 09:29:28 +08:00
a41d1ca0ce MDL-41953 allow plugin names to end with multiple digits 2013-10-11 00:04:39 +02:00
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
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
81881cb9d6 MDL-41787 make sure maturity constants are defined before they are used in core_component class 2013-09-20 17:22:20 +02:00
cde5c4a58e Merge branch 'MDL-41632-master' of git://github.com/FMCorz/moodle 2013-09-11 09:12:32 +12:00
1320c3177b Merge branch 'MDL-18375_master' of git://github.com/markn86/moodle 2013-09-09 10:41:12 +08:00
0b7a2b7bec Merge branch 'MDL-41460-master' of https://github.com/FMCorz/moodle 2013-09-09 08:58:44 +12:00
5975d573ab MDL-41632 core_component: All version hash did not consider plugin type 2013-09-06 12:03:51 +08:00
2f00e1b245 MDL-18375 calendar: huge refactor of the initial patch
1) Moved the calendar types location to a sub-folder in the calendar directory.
2) Removed/moved language strings.
3) Removed calendar types that should be downloaded as plugins.
4) Removed a Non-English language pack for the Gregorian calendar type that
should be downloaded separately.
5) Removed custom files responsible for checking for updates and uninstalling
calendar types, which should be done by core.
6) Removed JS from the calendar_month block as there is no non-JS alternative
provided and the JS written does not make use of the YUI library to ensure
multiple browser support.
7) Removed code from the base class responsible for creating timestamps that
are saved in the DB.
8) Added PHPDocs.

Note: In the original patch we are editing core functions responsible for saving
time in the database in the calendar base class. This is very dangerous, we do
not want to touch these functions as it could cause a complete fubar of the
database. There are places we are forcing the use of the gregorian calendar as
we are passing dates generated by the PHP date function, where as sometimes
we pass dates from usergetdate (which was being overwritten to return the
date specific to the calendar). We can not expect third party modules to
change the calendar type depending on the format they pass to these functions.
2013-09-05 18:30:05 +08:00
3274c5db89 MDL-41460 core_component: Validate cache against version.php 2013-09-05 14:45:09 +08:00
ac2b2713ba MDL-41267 add support for subplugins in admin tools 2013-08-31 11:40:44 +02:00
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
90fb4f39fd Merge branch 'MDL-41100-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-08-13 09:37:02 +12:00
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
d26ec8a598 MDL-41100 libraries: Moved get_plugin_list_with_file to core_component 2013-08-09 11:56:48 +08:00
c5701ce7d4 MDL-41086 rework detection of necessary upgrades 2013-08-08 21:11:40 +02:00
9ba6076cff MDL-23493 add support for theme fonts 2013-07-20 12:47:08 +02:00
6ec1f2f2eb Merge branch 'wip-MDL-40167-m26' of git://github.com/samhemelryk/moodle 2013-07-16 13:25:54 +08:00
84192d7836 MDL-40167 dock: converted the dock JS to a YUI shifted module.
The patch converts the dock into a YUI shifter module and at
the same time improves several aspects of its operation.
The features of this patch include:
* Dock Module conversion.
* A loader that ensures we don't include the dock JS or its
  requirements unless actually required.
* We no longer include the dock JS for themes that don't
  enable it.
* Blocks no longer add registration events to the page
  instead a dockable attribute is added to the html and the
  loader looks for that.
* The dock module is properly documented and running YUIDoc
  gives good quality documentation.
* We no longer need the dock module registration or
  subcomponent.
* All events that can be delegated are now delegated.
* Removed unused variables and code left over after fixes.
* Support for docking blocks renderered using the new blocks
  render method. Better support for custom block regions.
2013-07-15 09:46:03 +12:00
abb043c3a1 MDL-40435 require MOODLE_INTERNAL in core_component
We need to include db/subplugins.php when building core_component cache,
there are some MOODLE_INTERNALs there…
2013-07-13 19:25:17 +02:00
766e04f38a MDL-40435 detect permission setting problems in core_component 2013-07-13 16:08:50 +02:00
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
c05a50992e MDL-40415 add explicit OPcache support 2013-07-04 19:32:26 +02:00
f48f4827d1 Merge branch 'w27_MDL-40299_m26_textlib' of https://github.com/skodak/moodle 2013-07-02 15:23:38 +08:00
3601c5f09c MDL-26943 implement subplugin support for local plugins 2013-06-30 09:18:35 +02:00
d534708fd3 MDL-40299 textlib conversion to core_text and core_collator 2013-06-27 22:18:57 +02:00
1652aa9cdd MDL-39854 fix borked core_component cache 2013-06-19 09:42:05 +02:00
1d4ae19d62 MDL-39854 disable component cachin in BEHAT_TEST 2013-06-19 11:28:32 +08:00
04a4b97f99 MDL-39854 disable component caching in BEHAT_UTIL 2013-06-18 12:02:07 +02:00
9e19a0f08b MDL-39854 reimplement Frankenstyle support and enable classloader
Better performance, more reliable, completely self contained,
more validation and full backwards compatibility.

This will also allow us to implement ignoring of plugins.
2013-06-18 09:10:07 +02:00