Commit Graph

47 Commits

Author SHA1 Message Date
Shane Elliott 685ed22b13 MDL-40684 Fix conditional field name for custom user fields 2013-08-05 15:51:30 +12:00
Eloy Lafuente (stronk7) bc6835b1d1 MDL-37516 Translate fieldnames on output only.
This reverts a change performed by the previous commit where user
fieldnames were being translated (and cached) when fetched,
causing the information to remain static later, not responding
to language switches (and perhaps leading to other problems if those
structures are used lated for DB / $USER comparisons.

With the commit, the translation happens on output, so no
potential interferences will happen and, also, the information
changes dynamically on lang switching.
2013-07-02 21:03:10 +02:00
sam marshall 122d59390f MDL-37516 Conditional activities: user field condition display fixes 2013-07-02 21:03:04 +02:00
Damyon Wiese 93c5c3b02c MDL-38289: Custom profile fields - added unit test
Added a unit test to cover the case when you are fetching a custom
profile field but you are not logged in.
2013-05-09 10:29:21 +08:00
Frederic Massart ac9d18dfa4 MDL-38289 condition: Do not fetch profile fields when not logged in 2013-05-07 10:19:27 +08:00
sam marshall 50701d1e89 MDL-38035 Conditional availability: Support multilang custom user fields 2013-03-20 15:58:59 +00:00
sam marshall 0e79c3ee74 MDL-38035 Activity settings: Support multilang names for custom user fields 2013-03-12 15:39:38 +00:00
sam marshall 1a44518a64 MDL-37792 Conditions: Interests condition offered but not implemented 2013-02-25 13:25:17 +00:00
Dan Poltawski 7a6f073415 Revert "MDL-36704: wrap pending conditions in span tags"
This reverts commit 5e9fd83df8.
2012-12-20 08:45:15 +08:00
Jay Knight cf04387947 MDL-36704: wrap pending conditions in span tags 2012-12-18 15:09:55 +08:00
sam marshall 9789d825c2 MDL-37078: Restore - section restore fails with multiple availability conditions 2012-12-12 12:15:41 +00:00
Eloy Lafuente (stronk7) 2b64e24ebe MDL-35089 conditionals: detected one place missing sectioncache
Thanks to MDL-34936 and unit tests this was discovered like 2 new
places calling to get_fast_modinfo() without the sectioncache
column contents. Potential performance problem, leading to
reseting and recalculation of caches all the time.
2012-08-28 01:38:09 +02:00
Aparup Banerjee f36b0ba502 Merge branch 'wip-MDL-34285-m24' of git://github.com/samhemelryk/moodle 2012-07-23 17:22:14 +08:00
Dan Poltawski 147dc9dafd Merge branch 'wip-MDL-34286-m24' of git://github.com/samhemelryk/moodle 2012-07-23 15:00:26 +08:00
Petr Škoda c8b3346cfd MDL-33180 delete the last traces of SimpleTest - ciao and thanks 2012-07-21 10:11:50 +02:00
Sam Hemelryk 2ede466e5f MDL-34286 conditionlib: Fixed up loading of user profile data for custom field conditions 2012-07-19 20:10:04 +12:00
Sam Hemelryk 1c8d09338e MDL-34285 condition: Fixed up missing operator 2012-07-19 19:29:47 +12:00
Sam Hemelryk 21a4e24cab MDL-34285 condition: Added is not empty option for user profile conditions and moved strings.
As part of this change I added a new condition for user fields: is not equal.
I also copied the strings being used from the filters lang file to the condition
lang file and changed the uses in code.

AMOS BEGIN
  CPY [contains,filters],[contains,condition]
  CPY [doesnotcontain,filters],[doesnotcontain,condition]
  CPY [isequalto,filters],[isequalto,condition]
  CPY [startswith,filters],[startswith,condition]
  CPY [endswith,filters],[endswith,condition]
  CPY [isempty,filters],[isempty,condition]
AMOS END
2012-07-19 19:27:00 +12:00
Sam Hemelryk 141d3c86d3 MDL-29538 condition: Tidied up user field condition code post merge 2012-07-09 11:45:44 +12:00
Mark Nelson e01fbcf765 MDL-29538 core_condition: Integrated with the latest code, can now place user field conditions on sections as well 2012-06-26 15:18:53 +08:00
Sam Hemelryk 33e657c7e7 MDL-29538 core_condition: Pre-integration merge cleanup
* Fixed up database installation and upgrade code
* Reverted some whitespace optimisations to minimise conflicts
* Optimised commits made by Mark to reduce complexity and add tracker issue numbers
2012-06-26 15:18:53 +08:00
Mark Nelson 33f30decce MDL-29538 core_condition: clear the userid from the user field cache when wiping the session 2012-06-26 15:18:53 +08:00
Mark Nelson 129e4a73ec MDL-29538 core_condition: cached result in usercondition array now stores all attributes 2012-06-26 15:18:53 +08:00
Mark Nelson a8f84c287c MDL-29538 core_condition: code cleanup 2012-06-26 15:18:52 +08:00
Mark Nelson e7b4bd3ef5 MDL-29538 core_condition: constants are no longer set using language strings 2012-06-26 15:18:52 +08:00
Mark Nelson cb4492c200 MDL-29538 core_condition: changed the logic in the code so that it works with the new database structure as well as tidying up parts of the code 2012-06-26 15:18:52 +08:00
Mark Nelson 92fb7dd3a5 MDL-29538 core_condition: made changes to the DB structure - nb. had to rename the table due to length limit 2012-06-26 15:18:51 +08:00
Mark Nelson 76af15bb4c MDL-29538 core_condition: initial commit to add support for making things conditional on user profile fields 2012-06-26 15:18:51 +08:00
sam marshall 540f89d7d4 MDL-33212 Course page: Eye icon should override other conditions 2012-05-28 16:17:39 +01:00
Eloy Lafuente (stronk7) 94dc3c7d1e MDL-24419 (5): Coding style cleanup 2012-05-17 00:51:50 +02:00
sam marshall ce4dfd2703 MDL-24419 (4): Add conditional availability support to sections; section cache
Credit: original version done by Kirill Astashov of NetSpot (netspot.com.au),
finished and tweaked by sam.

This change adds conditional availability support for sections analagous to
that already available for activities. (Backend, UI, backup/restore.)

In order that this feature does not reduce performance, section cacheing has
also been added using a new course 'sectioncache' field analagous to modinfo.

The new feature integrates with activity availability so that activities
inside sections which are not available are automatically not available
themselves (meaning it works to restrict access).
2012-05-14 11:19:25 +01:00
Eloy Lafuente (stronk7) 47ee3c5569 MDL-30976 whitespace fixes 2012-03-07 02:19:59 +01:00
Ankit Kumar Agarwal 9ccadad391 MDL-30976 Docs Documenting Conditional APIs 2012-03-02 10:22:46 +08:00
sam marshall 6282381d05 MDL-27242 Conditional availability dates should support time as well as day
Change also adds minor feature to date-time selector so you can specify the time it uses as default when the value is 0 (disabled).

Credit: This feature was developed collaboratively by Charles Fulton, Neill Magill, and me.
2011-10-13 10:23:23 +01:00
Charles Fulton fdef13e692 MDL-26507: improper use of assignment operater causes grade checks to fail 2011-02-21 12:54:37 +00:00
Petr Skoda 516c5eca68 MDL-24698 hopefully fixed all completion_info problems 2010-11-17 06:23:56 +00:00
Sam Marshall 72d021a927 Unit tests MDL-24976 Fixed conditionlib unit test (also added thing to ensure that debug warning in conditionlib is shown in unit test if applicable) 2010-11-02 15:04:21 +00:00
Petr Skoda 78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Sam Marshall bfeaa89501 MDL-20852: Condition system - problems if you delete a module that another one had a condition on 2009-11-16 15:14:47 +00:00
Petr Skoda 117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
samhemelryk 3564771d6b lib MDL-19236 added phpdocs and copyrights 2009-05-22 08:41:00 +00:00
sam_marshall b8104e996f MDL-19202 fixed stupid bug in conditionlib, moved a static to a global 2009-05-15 13:31:41 +00:00
sam_marshall e7c6bf0eab MDL-18297: Changed date conditions so that the text and behaviour is more natural. 2009-04-17 16:06:29 +00:00
sam_marshall 373fb9ddbe conditionlib whitespace / coding style fixes 2009-04-17 14:32:50 +00:00
sam_marshall 7556422816 MDL-18272, MDL-18271: Conditional availability - grade condition to use percentages not raw grades; use wording rather than >= symbol in form because (apparently) teachers are functionally innumerate. ;) 2009-02-18 17:50:13 +00:00
sam_marshall a343b13f59 MDL-17915: Conditional activities do not update when you change manual activity completion using an AJAX tickbox- 2009-01-15 17:09:02 +00:00
sam_marshall 82bd6a5ea9 MDL-15499: Conditional availability of activities 2008-12-17 16:37:35 +00:00