85 Commits

Author SHA1 Message Date
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
Brian Barnes
9eb24f0818 MDL-48389 forms: added page title to help text 2014-12-09 15:21:06 +13:00
Andrew Robert Nicols
56d465b2d3 MDL 38508 JavaScript: Split out AJAX and non-AJAX help
We need to keep these two separate as scripts which define AJAX_SCRIPT
before loading config.php will use a different default renderer and will
return appropriate exceptions which can be parsed by M.core.exception and
M.core.ajaxException correctly.

This also addresses an issue whereby a missing heading could break the
tooltip.
2013-04-08 21:01:20 +01:00
Andrew Robert Nicols
238b8bc9b6 MDL-35819 AJAX Rewrite Moodle popup help to be more friendly and more efficient 2013-02-10 11:50:56 +00:00
Dan Poltawski
7528ebd23a MDL-35823 - fix trailing whitespace 2013-02-04 11:23:44 +08:00
Jason Fowler
4df8223cbe MDL-35823 - Accessibility - Converted the help popup header from H1 to H2 to improve the over all DOM 2013-02-01 11:01:00 +08:00
Ankit Agarwal
bf0f06b1be MDL-34471 libraries: Replace all uses of get_context_instance() with respective context_XXXX::instance() method 2012-08-02 15:37:38 +08:00
Petr Skoda
aff24313be MDL-29401 introduce new frankenstyle PARAM types
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
2011-09-25 09:59:55 +02:00
Sam Hemelryk
367a75fae4 themes lib MDL-24895 Multiple fixes to better handle overflow.
Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.
2010-11-05 02:53:47 +00:00
Petr Skoda
a226a972f7 MDL-24321 switching to stdClass in /admin/ and / 2010-09-21 08:44:02 +00:00
David Mudrak
e4c3c7ead2 MDL-23274 The lang parameter was ignored due to typo 2010-07-28 10:57:48 +00:00
David Mudrak
ed8eb15aa5 MDL-22052 Improved help strings caching - dirty on-disk cache detection 2010-06-28 14:37:15 +00:00
David Mudrak
4be9b12824 MDL-21695 Help strings use Markdown format from now on 2010-05-03 16:49:07 +00:00
David Mudrak
ff95caa8e9 MDL-21695 Display the help title in the popup, more docs on new addHelpButton() 2010-04-30 09:57:32 +00:00
Martin Dougiamas
5435c9dcc4 help strings MDL-21695 changed _hlp to _help and fixed help.php to format those strings properly 2010-04-23 07:46:35 +00:00
Petr Skoda
259c165d7a MDL-21695 new help api 2010-04-13 21:51:49 +00:00
Petr Skoda
53a78cef28 MDL-21695 help files replaced by standard strings - basic infrastructure in place, no strings converted yet 2010-04-10 09:10:08 +00:00
Petr Skoda
3a915b0667 MDL-21693 Dropping _utf8 suffix from language codes and folder names; enabling new string managers - please note the transition is not yet fully complete because we need to wait for git to recognize the renames in cvs 2010-04-10 07:24:56 +00:00
Petr Skoda
ef330d9533 MDL-22015 AMOS - making room for new string manager 2010-04-01 18:50:28 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Petr Skoda
78946b9bdb MDL-20204 first batch of major theme changes, some regressions are still there, expect more changes and improvements soon; see tracker for details and list of subtasks 2009-12-16 18:00:58 +00:00
Petr Skoda
49ab5e1950 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 15:32:33 +00:00
samhemelryk
474f6bfed9 core MDL-19799 Added set_url calls and replaced deprecated functions 2009-10-15 03:43:28 +00:00
samhemelryk
70f25518ad core MDL-19799 Updated print_header and build_navigation to OUTPUT and PAGE equivalents 2009-09-07 07:20:14 +00:00
nicolasconnault
aa9a686740 MDL-19799 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:20:12 +00:00
skodak
aa54ed7b02 MDL-20065 new implementation of File module, modules sub-types are being migrated to separate modules; remaining issues to be listed as sub-tasks in tracker 2009-08-13 20:45:50 +00:00
nicolasconnault
7e0d66753e MDL-19799 Converted all print_footer() calls 2009-08-06 14:21:34 +00:00
nicolasconnault
5231a15c0f MDL-19799 Migrated calls to close_window_button() 2009-08-06 02:52:39 +00:00
nicolasconnault
f8065dd287 MDL-19756 Migrated the following functions from weblib to outputlib:
1. button_to_popup_window
2. link_to_popup_window
3. print_single_button
4. print_spacer
5. print_file_picture (deprecated)
6. print_user_picture
7. print_png (deprecated)
8. helpbutton
9. doclink
10. print_paging_bar
11. notice_yesno
2009-07-27 10:33:00 +00:00
tjhunt
151165e3d1 Fix some fallout from the pagelib changes. 2009-06-12 12:08:25 +00:00
tjhunt
e79079deae help.php: related to MDL-13816. Clean up the URLs used for help files by removing unused parameters. 2009-03-30 06:11:32 +00:00
tjhunt
bb45fe62c4 get_string: Refactoring, performance improvements, bug fixes and unit tests
MDL-18669 get_string refactored to elimiate duplicate code and make it easier to understand.
MDL-17763 parent language not processed correctly when getting a plugin string.
MDL-16181 more intelligent caching to avoid repeated file_exists checks.
MDL-12434 move values to array keys to improve lookup times.

The main part of the refactoring is to create a singleton string_manager class to encapsulate the cached data and the processing, while breaking the code up into more smaller methods.

Other performance improvements include:
* Cache results of plugin name -> locations to search array.
* Cache parent lang lookup.
* Skip eval if the string does not contain $ \ or %.
* Remove the unnecessary sprintf from the eval.

There is a performance testing script in lib/simpletest/getstringperformancetester.php. For now this script has the old get_string implementation copied and pasted to the end, and renamed to old_get_string to allow for comparitive timings.

There are now some unit tests for get_string in lib/simpletest/teststringmanager.php. I think I have managed to cover most of the tricky cases.
2009-03-30 02:21:27 +00:00
mudrd8mz
9dc1fb4dde MDL-14743 offer a link to the English help file. Merged from 1.9 stable 2009-03-02 14:14:19 +00:00
tjhunt
8bc590f5df qtypes help: MDL-5106 Create questiontype help file dynamically 2009-02-26 07:07:40 +00:00
tjhunt
740939ec61 MDL-16654 Move javascript used by the emoticons help file from javascript.php to javascript-static.js. Fix it so that it actually works. 2008-09-25 10:07:11 +00:00
jerome
d81f018f3a MDL-11461 all ressource types are now displayed in the ressource help popup, merged from 1.9 2008-06-17 02:00:54 +00:00
skodak
f33e1ed4ae MDL-14679 ok, here is the big patch with new dmllib and ddlib API, some code is already converted, XML db editor works; see tracker for details of regressions and TODOs 2008-05-15 21:40:00 +00:00
dongsheng
b8b3d87c2c "MDL13233, fix unclosed li elements, and remove extra <html> tags, see tracker" 2008-05-01 02:46:09 +00:00
dongsheng
01260c78fa "MDL-13233, make emoticons documentation should be dynamic" 2008-04-30 03:49:12 +00:00
sam_marshall
facc7b387f MDL-14286: Help popup now includes title of help page in window <title> 2008-04-10 11:50:52 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
nicolasconnault
072901a9eb MDL-13789 Fixed the index file issue (with a hack) and also documented extra credits properly. 2008-03-21 15:05:51 +00:00
mudrd8mz
45f5cfd4bf MDL-12291 help.php is now able to skip _local langpacks. Merged from MOODLE_19_STABLE 2008-01-19 22:00:39 +00:00
tjhunt
dba21d4a19 Use the locale to sort the list of activites everywhere. This matches a change a made in one place before christmas. If you don't do this, the PHP sorts by ASCII order, so mixed case names, or special characters, get sorted wrongly. Merged from MOODLE_19_STABLE. 2008-01-07 16:46:35 +00:00
nicolasconnault
3b84c6bd05 MDL-8853 Applied Ann's patch 2007-11-06 13:39:42 +00:00
nfreear
73418a3ce3 Big fix for MDL-9890 "Help should be well-formed, XHTML Strict and semantic". 2007-05-23 12:03:22 +00:00
tjhunt
6cad9e6069 MDL-8772 - Use the same list of places to search in get_string and help.php. Merged from MOODLE_18_STABLE. 2007-03-14 20:15:20 +00:00
mudrd8mz
2f40b60145 _local language packs take precedence with both forced language and non-forced language settings.
Fixes reopened MDL-8089.
2007-02-10 21:54:19 +00:00
dwoolhead
20cc8f6066 MDL-7442 Changed search order for help files to be more consistent with language files (backwards compatible) 2007-01-12 12:29:42 +00:00
mudrd8mz
f35a69cfca Help files stored in _local language packs take precedence. Implements MDL-8089. 2007-01-08 09:04:08 +00:00