Commit graph

7694 commits

Author SHA1 Message Date
tjhunt
adff97c505 lib/dml: new compatibility method sql_cast_2signed for when MySQL thinks that 1 * -1 = 18446744073709551615 2009-04-10 09:33:26 +00:00
tjhunt
3efb762e6b simpletestlib: improve failure message from CheckSpecifiedFieldsExpectation 2009-04-10 09:32:53 +00:00
tjhunt
7e3a668c07 get_string unit tests: Switch to inline fixture setup 2009-04-10 04:59:09 +00:00
skodak
25bc3cd369 MDL-13843 treat default course grouping as current grouping at course level (groupmode is used the same way at course level) 2009-04-09 08:17:12 +00:00
tjhunt
1d59689fc9 ddllib.php: add required library 2009-04-08 11:46:39 +00:00
tjhunt
c9ec505b9e weblib progress_bar: Add a comment and fix some coding style. 2009-04-08 11:46:19 +00:00
tjhunt
5c2fec8b74 get_string: MDL-18813 get_string was broken for strings that were '' 2009-04-08 11:45:53 +00:00
tjhunt
3fb002215f weblib: fix bug with disabled pop_form()s 2009-04-07 07:40:40 +00:00
tjhunt
465d96958f UnitTestCaseUsingDatabase: fix bug with install_one_table_from_xmldb_file
The bug prevented you creating the first table from an install.xml file
2009-04-07 05:19:20 +00:00
sam_marshall
4d10247fdb MDL-18768: Limited size of context and modinfo caches to avoid memory problems with code that loops through many courses, also changed forum role_assign to use recordset for all-courses loops 2009-04-06 09:48:39 +00:00
tjhunt
a4db2e7ca3 fomslib: MDL-18735 disabledif not working in IE if depended on element was a <select>.
This was a regression from MDL-18522. Sorry.
2009-04-06 02:56:37 +00:00
fmarier
316914bf6e MDL-17037 ran all GIF images through gifsicle and PNG through optipng 2009-04-05 23:33:00 +00:00
skodak
3a03653edf MDL-18772 fixed aut oupdating of grademax for SUM aggregation type 2009-04-05 20:17:04 +00:00
sam_marshall
2bf69a8588 MDL-18094: course/viewhiddenactivities didn't work (in some parts of the code) at module level 2009-04-03 13:11:05 +00:00
tjhunt
7fa95ef177 simpletestlib: Fix typo in error message 2009-04-03 08:38:30 +00:00
tjhunt
c464eda684 get_string: MDL-18669 - fixing a screw-up spotted by Dongsheng. Thanks. 2009-04-03 07:41:40 +00:00
fmarier
c65ab2be95 Password policy: MDL-17602 new "max consecutive identical characters" setting 2009-04-03 02:22:52 +00:00
sam_marshall
48f9c073ca MDL-18094: course/viewhiddenactivities didn't work (in some parts of the code) at module level 2009-04-02 16:32:12 +00:00
tjhunt
d8413bf3d2 lang editing: MDL-18776 fix regression from MDL-18669. 2009-04-02 09:37:29 +00:00
tjhunt
0c34c7eb50 translation: MDL-18766 reverting. I guess it was not yet ready for prime-time.
I'll commit the patch to contrib in case anyone wishes to experiment further.
2009-04-02 02:42:11 +00:00
stronk7
c66158102e MDL-18766 Towards improved translation 2009-04-01 09:04:21 +00:00
tjhunt
edc0c49332 file api: MDL-18754 improve the names of some functions.
The new names are documented on
http://docs.moodle.org/en/Development:Convert_Draftarea_Files
2009-04-01 04:34:58 +00:00
tjhunt
b4cf937102 translation: MDL-18766 Prototype automatic translation system for Moodle.
If Google can do something like http://translate.google.com/, surely we
can do something just as good in Moodle. Here is a first attempt. It is
a bit rough around the edges, and only a couple of target lananguages
have been implemented so far. (More and better attempts welcome!)

In order to ensure that this gets adequate testing, I have made sure that
it gets turn on by default. However, if you really don't like it, you can
turn it off under Administration > Development -> Experimental settings.
2009-04-01 00:39:17 +00:00
skodak
c94985efb1 MDL-18552 different TeX trouble fix 2009-03-31 10:03:10 +00:00
jerome
f7631e7397 web service MDL-12886 administration: implement settings for servers (add amf debug option) 2009-03-31 03:29:01 +00:00
tjhunt
214f5850d1 MDL-15484 Avoid JavaScript errors after a popup has been blocked.
Also clean up coding style of some nearby functions.
2009-03-31 03:24:21 +00:00
tjhunt
832e13f144 editor formslib element: symbolic constant EDITOR_UNLIMITED_FILES instead of hard-coded -1. 2009-03-30 10:01:39 +00:00
tjhunt
50da63ebd9 qtypes: MDL-18711 Allow qtype plugins to have custom CSS and JavaScript on the editing page. 2009-03-30 09:15:46 +00:00
tjhunt
b810a4d3c9 filters: MDL-17684 Look for the filter name in filter_myfilter.php first.
This makes filters more plugginable, becuase with this lang file name, get_string will look for the filter name in filter/myfilter/lang/en_utf8/filter_myfilter.php.

To do this, there is a new function filter_get_name in filterlib that contains the logic.

Also, a new function filter_get_all_installed to replace the logic for getting all filters that was duplicated in three places.

filter_get_name no longer does such a nice fall-back if the name is missing, to encourage people to supply the right string. The fallback now looks like '[[filtername]] (filter/tidy)'.
2009-03-30 08:33:13 +00:00
tjhunt
240be1d71c DB unit tests: improve the class so it is easier to use. 2009-03-30 07:05:29 +00:00
tjhunt
e7b818807c get_string: MDL-13816 allow third-partly modules to register sub-plugin types that have their own lang files.
I suppose to be really useful we should deal with database, capabiltities, etc. too in due course. Still, this is a start.
2009-03-30 06:13:35 +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
tjhunt
edbc93a7e4 Remove failing unit tests. (We are going to remove enum support from the database layer anyway.) 2009-03-30 01:57:47 +00:00
skodak
fe772c2aa7 MDL-18472 fixed missing argument in deprecated function, thanks Gordon Bateson 2009-03-26 20:53:03 +00:00
dongsheng
a774767903 "MDL-17966, fixed installation blocker, merged from 1.9" 2009-03-26 13:32:28 +00:00
dongsheng
b2bf016e1b "ADMINLIB/MDL-17966, overwrite write_setting to update settings instead execute sql execute in get_settings, this will not hurt performance, merged from 1.9" 2009-03-26 08:56:08 +00:00
dongsheng
145c285b43 "ADMINLIB/MDL-17966, update after writing settings, fix dml calls" 2009-03-26 02:39:35 +00:00
dongsheng
dbeb0aa7f2 "ADMINLIB/MDL-17966, update after writing settings, merged from 1.9" 2009-03-26 02:34:42 +00:00
dongsheng
ff601bf011 "ADMINLIB/MDL-17966, update after writing settings, merged from 1.9" 2009-03-26 02:25:46 +00:00
dongsheng
7022dd3930 "MEMORY/MDL-18540,remove hard-coded php memory limit, added system setting for it, create a function reduce_memory_limit to reduce memroy limit and respect php.ini setting in the meanwhile, merged from 1.9" 2009-03-26 02:09:28 +00:00
tjhunt
574c37507f random essay questions: MDL-8648 fix merge problem. 2009-03-26 01:54:40 +00:00
poltawski
9b831e01d2 lib/moodlelib.php MDL-18406 - use more robust require path
thanks to Daniel Neis
merged from MOODLE_19_STABLE
2009-03-25 09:38:41 +00:00
poltawski
eac4623d29 lib/email_to_user MDL-10384 Recipeint names broken
When emailcharset is not utf8 the charset conversion was breaking
recipient/replyto names

thanks to Tatsuya Shirai
merged from MOODLE_19_STABLE
2009-03-25 09:18:19 +00:00
tjhunt
c468795ce9 switch roles: MDL-18132 New Role allow switches page finished.
I also set up a reasonable set of default allows, including setting up some sensible allow_overrides, whatever the rant in MDL-15841 says.
2009-03-25 04:20:57 +00:00
skodak
cb5f2411d7 MDL-17966 reverting previous commit, solution proposed in tracker 2009-03-24 11:01:45 +00:00
mudrd8mz
3a77043c00 MDL-18644 Add a note about the bug found and upstream bug link 2009-03-23 10:53:10 +00:00
mudrd8mz
081a9b0dad MDL-18644 Bugs found by syntax checker, merged from MOODLE_19_STABLE 2009-03-23 09:53:02 +00:00
nicolasconnault
9fb1634910 MDL-18402 Merged from MOODLE_19_STABLE 2009-03-23 08:35:06 +00:00
tjhunt
82701e2443 switch roles: MDL-18132 separate database table role_allow_switch instead of re-using role_allow_assign.
This is part 1 that does the back-end:

1. New table role_allow_switch.
2. Upgrade that copies all the allows from role_allow_assign, and then drops the old CFG->allowuserswitchrolestheycantassign.
3. Old function get_assignable_roles_for_switchrole renamed to get_switchable_roles and changed to use the new table. Fixes MDL-18604 in HEAD.
4. Switch callers to use the new function name.
5. Unit tests for this new function.
6. To make those unit tests work, new switch_global_user_id and revert_global_user_id methods in UnitTestCaseUsingDatabase for toggling $USER->id.

I still need to do the editing interface under Administration ► Users ► Permissions ► Define roles. That will be done as a second commit.
2009-03-23 08:15:21 +00:00