Commit graph

598 commits

Author SHA1 Message Date
Sam Hemelryk
1d1d807ea6 MDL-29941 csslib: Made optimisation an experimental option 2012-01-20 11:02:05 +08:00
Sam Hemelryk
0e641c7437 MDL-29941 csslib: A CSS optimiser has been added to process our mountain of CSS 2012-01-20 11:02:05 +08:00
Eloy Lafuente (stronk7)
7fb7e9835a MDL-31006 revert partially @ get_config()
The change from null to stdClass() in get_config() was leading to:

1) unit tests not passing.
2) non-equivalent evaluation in conditions (null evals false,
   stdClassi() evals true)
2012-01-18 02:09:46 +01:00
Petr Skoda
927010240f MDL-31006 some more PHP54 notices
PHP54 compatibility - PhpStorm IDE is the best tool for this kind of work!!
2012-01-18 01:17:25 +01:00
Eloy Lafuente (stronk7)
4374d03158 Merge branch 'w03_MDL-31142_m23_slowiconv' of git://github.com/skodak/moodle 2012-01-17 01:36:03 +01:00
Petr Skoda
ca281c51bb MDL-31142 fix textlib::substr() performance, invalid length in iconv_substr; use mbstring by default 2012-01-16 09:16:14 +01:00
Dan Poltawski
48ddc9bfd6 MDL-29091 weblib - Introduce out_as_local_url() method to moodle_url
This can be used for passing around PARAM_LOCALURL's where necessary
stripping the wwwroot
2012-01-13 10:16:52 +00:00
Tim Hunt
d07f7be890 MDL-31101 format_string: Don't mangle < and > in strings like x < 1. 2012-01-10 14:52:19 +00:00
Eloy Lafuente (stronk7)
bb2308a33a Merge branch 'wip-MDL-26155-m23' of git://github.com/samhemelryk/moodle
Conflicts:
	admin/settings/security.php
2012-01-03 17:26:31 +01:00
Sam Hemelryk
e6d40f8ac2 MDL-26155 string: Implemented moodle_string class 2012-01-03 09:04:58 +13:00
Tim Hunt
820b41e34f MDL-30168 formslib: untangle automatic id generation.
Previously, we had overridden the _generateId method in almost all
subclasses; and then we mostly, but not always; ignored the value that
was generated there, and instead generated new (nicer) values in
MoodleQuickForm_Renderer::renderElement. Of course, that is not really a
logical place to (re)generate ids.

I have fixed the code so that the _generateId method now uses the 'nice
id' algorithm from renderElement. This should make the whole code flow
more logical.

This make all our overriding of _generateId unnecessary.

We do need a special _generateId for radio buttons, because you often
have different radio buttons with the same name but different values.

This change should only change the ids on radio, checkbox and
advcheckbox elements. Previously, those were essentially random, so I
don't think anyone could have been relying on the particular values.

This commit also has new unit tests, first to test the basic _generateId
algorithm, and then to create and render an example form (including some
tricky things like repeat_elements) and chech the acutal ids in the
generated HTML.
2011-12-23 11:51:45 +00:00
Eloy Lafuente (stronk7)
cb21d040f4 MDL-20245 grade: added tests for set_user_preference() and the 1333 limit
Added to tests to check that both the "limit" case of using 1333
chars is allowed and 1334 causes coding exception to happen
2011-12-21 16:28:22 +01:00
Eloy Lafuente (stronk7)
311b953168 Merge branch 'w51_MDL-30761_m23_slowmysql' of git://github.com/skodak/moodle 2011-12-20 22:17:21 +01:00
Petr Skoda
8a238aee75 MDL-30761 fix simpletest regression caused by rubrics 2011-12-16 14:22:20 +01:00
Justin Filip
9d6fd25a05 MDL-30741 Adding a new test to check for incorrect parsing of complicate HTML with a PRE tag. 2011-12-15 11:11:35 -05:00
sam marshall
0c9cb1bc19 MDL-30266 completionlib fix unit test breakage (regression) 2011-11-15 14:05:20 +00:00
sam marshall
a1c947bde2 MDL-26647 (2) New lib function get_extra_user_fields and related
get_extra_user_fields to get a list of extra user fields for display (that are permitted for current user in given context). get_extra_user_fields_sql returns the same thing as a SELECT list.

get_user_field_name returns the display name of a user field (basically just get_string($field) except phone1=>phone)
2011-11-04 13:57:10 +00:00
Petr Skoda
73b309e6a3 MDL-28627 remove buggy and obsolete KSES cleaning 2011-10-22 09:25:06 +02:00
Eloy Lafuente (stronk7)
2c6da73106 MDL-29602 unittest - fixing other tests to work with new accesslib 2011-10-19 01:37:30 +02:00
Petr Skoda
e922fe23b6 MDL-29602 accesslib improvements
Refactoring and improvements of the accesslib.php library including prevention of access for not-logged-in users when forcelogin enabled, improved context caching, OOP refactoring of contexts, fixed context loading, deduplication of role definitions in user sessions, installation improvements, decoupling of enrolment checking from capability loading, added detection of deleted and non-existent users in has_capability(), new function accesslib test, auth and enrol upgrade notes.

More details are available in tracker subtasks.
2011-10-16 14:05:18 +02:00
Eloy Lafuente (stronk7)
a7f99cf02e MDL-29677 unit tests - missing global was causing tons of incorrect debugging info 2011-10-07 01:24:18 +02:00
Eloy Lafuente (stronk7)
e135797586 Merge branch 'w38_MDL-29401_m22_frankenstyle' of git://github.com/skodak/moodle 2011-09-27 00:00:20 +02:00
Petr Skoda
a5bb3a70aa MDL-29401 few more tests for Eloy 2011-09-26 23:26:09 +02:00
Eloy Lafuente (stronk7)
c430009676 Merge branch 'MDL-29462' of git://github.com/timhunt/moodle 2011-09-26 22:40:32 +02: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
Eloy Lafuente (stronk7)
40a8974915 MDL-29478 unittest - we aren't a report anymore but one admin/tool 2011-09-23 00:11:50 +02:00
Tim Hunt
1f347cb71d MDL-29462 html_to_text('0') gives '', not '0'. 2011-09-21 16:38:58 +01:00
Petr Skoda
b412f9c4c9 MDL-29029 move all the simpletest bits into new tool unittest
AMOS BEGIN
 MOV [pluginname,report_unittest],[pluginname,tool_unittest]
 MOV [unittest:view,report_unittest],[unittest:execute,tool_unittest]
 MOV [dbtest,core_admin],[dbtest,tool_unittest]
 MOV [addconfigprefix,core_simpletest],[addconfigprefix,tool_unittest]
 MOV [all,core_simpletest],[all,tool_unittest]
 MOV [codecoverageanalysis,core_simpletest],[codecoverageanalysis,tool_unittest]
 MOV [codecoveragecompletereport,core_simpletest],[codecoveragecompletereport,tool_unittest]
 MOV [codecoveragedisabled,core_simpletest],[codecoveragedisabled,tool_unittest]
 MOV [codecoveragelatestdetails,core_simpletest],[codecoveragelatestdetails,tool_unittest]
 MOV [codecoveragelatestreport,core_simpletest],[codecoveragelatestreport,tool_unittest]
 MOV [confignonwritable,core_simpletest],[confignonwritable,tool_unittest]
 MOV [coveredlines,core_simpletest],[coveredlines,tool_unittest]
 MOV [coveredpercentage,core_simpletest],[coveredpercentage,tool_unittest]
 MOV [deletingnoninsertedrecord,core_simpletest],[deletingnoninsertedrecord,tool_unittest]
 MOV [deletingnoninsertedrecords,core_simpletest],[deletingnoninsertedrecords,tool_unittest]
 MOV [droptesttables,core_simpletest],[droptesttables,tool_unittest]
 MOV [exception,core_simpletest],[exception,tool_unittest]
 MOV [executablelines,core_simpletest],[executablelines,tool_unittest]
 MOV [fail,core_simpletest],[fail,tool_unittest]
 MOV [ignorefile,core_simpletest],[ignorefile,tool_unittest]
 MOV [ignorethisfile,core_simpletest],[ignorethisfile,tool_unittest]
 MOV [installtesttables,core_simpletest],[installtesttables,tool_unittest]
 MOV [moodleunittests,core_simpletest],[moodleunittests,tool_unittest]
 MOV [notice,core_simpletest],[notice,tool_unittest]
 MOV [onlytest,core_simpletest],[onlytest,tool_unittest]
 MOV [pass,core_simpletest],[pass,tool_unittest]
 MOV [pathdoesnotexist,core_simpletest],[pathdoesnotexist,tool_unittest]
 MOV [prefix,core_simpletest],[prefix,tool_unittest]
 MOV [prefixnotset,core_simpletest],[prefixnotset,tool_unittest]
 MOV [reinstalltesttables,core_simpletest],[reinstalltesttables,tool_unittest]
 MOV [retest,core_simpletest],[retest,tool_unittest]
 MOV [retestonlythisfile,core_simpletest],[retestonlythisfile,tool_unittest]
 MOV [runall,core_simpletest],[runall,tool_unittest]
 MOV [runat,core_simpletest],[runat,tool_unittest]
 MOV [runonlyfile,core_simpletest],[runonlyfile,tool_unittest]
 MOV [runonlyfolder,core_simpletest],[runonlyfolder,tool_unittest]
 MOV [runtests,core_simpletest],[runtests,tool_unittest]
 MOV [rununittests,core_simpletest],[rununittests,tool_unittest]
 MOV [showpasses,core_simpletest],[showpasses,tool_unittest]
 MOV [showsearch,core_simpletest],[showsearch,tool_unittest]
 MOV [skip,core_simpletest],[skip,tool_unittest]
 MOV [stacktrace,core_simpletest],[stacktrace,tool_unittest]
 MOV [summary,core_simpletest],[summary,tool_unittest]
 MOV [tablesnotsetup,core_simpletest],[tablesnotsetup,tool_unittest]
 MOV [testdboperations,core_simpletest],[testdboperations,tool_unittest]
 MOV [testtablescsvfileunwritable,core_simpletest],[testtablescsvfileunwritable,tool_unittest]
 MOV [testtablesneedupgrade,core_simpletest],[testtablesneedupgrade,tool_unittest]
 MOV [testtablesok,core_simpletest],[testtablesok,tool_unittest]
 MOV [thorough,core_simpletest],[thorough,tool_unittest]
 MOV [timetakes,core_simpletest],[timetakes,tool_unittest]
 MOV [totallines,core_simpletest],[totallines,tool_unittest]
 MOV [uncaughtexception,core_simpletest],[uncaughtexception,tool_unittest]
 MOV [uncoveredlines,core_simpletest],[uncoveredlines,tool_unittest]
 MOV [unittestprefixsetting,core_simpletest],[unittestprefixsetting,tool_unittest]
 MOV [unittests,core_simpletest],[unittests,tool_unittest]
 MOV [updatingnoninsertedrecord,core_simpletest],[updatingnoninsertedrecord,tool_unittest]
 MOV [version,core_simpletest],[version,tool_unittest]
AMOS END
2011-09-17 19:43:00 +02:00
Eloy Lafuente (stronk7)
ce9d0673d0 Merge branch 'MDL-29236-master' of git://github.com/sammarshallou/moodle 2011-09-12 20:37:24 +02:00
Tom Lanyon
7aa06e6ded MDL-28701 Change all uses of $CFG->dataroot/temp to $CFG->tempdir 2011-09-10 10:35:39 +02:00
sam marshall
371fbe1cc1 MDL-29236 Labels (and other content from modules) on course page should use module filter settings
E.g. if you disable smileys for a label, this ought to work (it doesn't previously, as everything is filtered using the course context).
2011-09-07 17:57:12 +01:00
Sam Hemelryk
d609d96261 MDL-28599 textlib Separated collator to collatorlib with static methods, and added support for locale aware sorting of objects 2011-09-06 15:39:00 +12:00
Eloy Lafuente (stronk7)
4f7c38660a Merge branch 'w33_MDL-29027_m22_textlib' of git://github.com/skodak/moodle 2011-08-24 18:49:05 +02:00
Petr Skoda
17ddbd050a MDL-29027 yet more tests 2011-08-24 18:47:05 +02:00
Petr Skoda
b25a17142c MDL-29027 support for mail charsets 2011-08-24 18:37:13 +02:00
Petr Skoda
2e0ecae45e MDL-29027 fallback to typo and more tests
Hopefully we now get the same results on all systems.
2011-08-24 17:14:47 +02:00
Petr Skoda
5a7e4c1158 MDL-29027 improve textlib api and add missing unittests 2011-08-20 17:00:53 +02:00
Petr Skoda
923aff64fa MDL-26796 add unit tests for parameter cleanup 2011-08-18 08:40:32 +02:00
James Brisland
a8b2690bff MDL-28620 - Removed admin/generator.php include as it causes issues if this script is included from any other script that is running in the command line 2011-08-05 16:09:30 +01:00
Marina Glancy
7b5702b681 MDL-19907 rewrote validation for required fields in forms, including support for editor field. Added parameter to use strict (no spaces) required fields validation 2011-07-29 13:51:26 +08:00
Petr Skoda
6857b0db47 Merge branch 'wip-MDL-28137-master' of git://github.com/samhemelryk/moodle 2011-07-18 15:22:29 +02:00
Petr Skoda
78fcdb5fdb MDL-28345 make sure input parameters do not contain invalid utf-8 chars 2011-07-15 15:00:49 +02:00
Sam Hemelryk
f50243edef MDL-28137 unit tests: Fixed up problem with block manager tests when running unit tests after turning editing on 2011-07-13 13:44:45 +08:00
Eloy Lafuente (stronk7)
4b02f9d2e9 Merge branch 'MDL-28168-custommenu' of git://github.com/mudrd8mz/moodle 2011-07-08 00:41:19 +02:00
David Mudrak
4564d58f9e MDL-28168 Multi-language support for custom_menu reimplemented
This is a reimplementation of the multi-language support for the
custom_menu class. The menu items now accept the forth optional
parameter with the explicit list of languages the item is valid for. If
no languages are listed, the item is valid for any language. The caller
of the custom_menu constructor must provide the user's current language
or null if the multi-language should not be supported (all items are
valid for any language then, regardless the definition).

See the attached unit tests for the examples of usage.
2011-07-07 11:30:04 +02:00
Aparup Banerjee
728ebac7f2 MDL-28135 general Updating all hardcoded "docs.moodle.org/en/Development:" type doc links to "docs.moodle.org/dev/" 2011-07-05 14:27:31 +08:00
Jamie Pratt
1e257a3a54 NOBUG if we are going to reuse the functions used within the evalmath code then
the calling api should not be weird with reversed parameters etc.
2011-06-30 17:50:05 +01:00
Jamie Pratt
9085134ed7 MDL-27659 "have evalmath accept numbers expressed with scientific
notation"
2011-06-30 17:49:49 +01:00
Jamie Pratt
4733133533 NOBUG fixed some coding style deviations in unit test code. Mostly
white space changes and added scope declarations to unit test
functions.
2011-06-30 17:49:31 +01:00
Eloy Lafuente (stronk7)
586fecb80b Merge branch 'MDL-27149' of git://github.com/timhunt/moodle 2011-06-30 00:20:43 +02:00