39 Commits

Author SHA1 Message Date
Adrian Greeve
75cab92b19 MDL-45218 events: Unit tests and fixtures for new static methods in base event class. 2014-04-23 12:14:33 +08:00
Adrian Greeve
7c084af93d MDL-45216 events: Unit tests for core/event/manager.
This includes unit tests for the new method get_all_observers
and updates to other methods that have been updated.
2014-04-23 11:51:08 +08:00
Petr Škoda
bc29320285 MDL-44661 implement event->anonymous property 2014-03-20 17:33:35 +08:00
Petr Škoda
9ede00db18 MDL-44500 detect context-courseid inconsistencies in new events 2014-03-14 12:08:12 +08:00
Damyon Wiese
ca0361084b Merge branch 'w10_MDL-41266_m27_logging' of https://github.com/skodak/moodle 2014-03-04 13:32:43 +08:00
Marina Glancy
5e70ea26bb MDL-44321 events: debug on errors in add_record_snapshot()
also clone object returned by get_record_snapshot() to prevent accidental changing of $COURSE or other important objects
2014-02-28 16:37:31 +08:00
Petr Škoda
bdaf91fd13 MDL-43931 add logging unit tests 2014-02-28 14:52:27 +08:00
Petr Škoda
770eac9805 MDL-41269 disable all logging during phpunit testing 2014-02-28 14:52:26 +08:00
Petr Škoda
7eaca5a810 MDL-37658 add new logging API with basic implemenation 2014-02-28 14:52:24 +08:00
Rajesh Taneja
623a32e50d MDL-43736 Events: Updated unit test to test context not used in event 2014-01-29 11:39:50 +08:00
Petr Škoda
3345e24f4b MDL-43661 change event property level to edulevel
Level is a reserved word in sql, sorry.
2014-01-21 15:54:56 +08:00
Adrian Greeve
5bb7158d77 MDL-43175 events: Base event unit tests for JSON encoding / decoding comparison. 2013-12-09 09:21:37 +08:00
Frederic Massart
31e571cdf0 MDL-42021 events: Debug message when objecttable set without an objectid 2013-09-27 14:29:21 +08:00
Dan Poltawski
111c649600 MDL-41565 events: fix unit test 2013-09-11 10:25:31 +08:00
Frederic Massart
38d6fbfa87 MDL-41040 event: Level property uses defined event constants 2013-08-21 10:04:02 +08:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Sam Hemelryk
471dd4ff67 Merge branch 'MDL-40963-master' of git://github.com/ankitagarwal/moodle 2013-08-06 13:59:23 +12:00
Sam Hemelryk
1eebbc2854 Merge branch 'w32_MDL-40943_m26_observers' of https://github.com/skodak/moodle 2013-08-06 08:49:28 +12:00
Frederic Massart
513d879381 MDL-41029 core: Fix wrong guessing of course id in event base 2013-08-05 15:41:16 +08:00
Petr Škoda
2d1884d987 MDL-40943 use observer priority only inside group of observers
This makes the '*' observers to be executed always first. This change allows us to implement parent event class catching if we ever decide we need it without breaking BC. This change includes some more unit test fixes.
2013-08-04 13:48:03 +02:00
Ankit Agarwal
1ccc126806 MDL-40963 events: get_name() should use get_called_class() instead of __CLASS__ 2013-08-01 15:30:08 +08:00
Petr Škoda
96deb95070 MDL-39915 cleanup core_event_testcase 2013-07-27 18:06:55 +02:00
Petr Škoda
ef1987dcdd MDL-39846 use new special value -1 in $CFG->loglifetime to prevent legacy logging 2013-07-19 08:43:31 +02:00
Petr Škoda
660f049f09 MDL-39846 rename object property to target
Credit goes to Fred, this should be easier to understand.
2013-07-19 08:43:31 +02:00
Petr Škoda
f8a39659aa MDL-39846 remove contextlevel validation
Do this in new validate_data() instead, thanks Fred.
2013-07-19 08:43:30 +02:00
Petr Škoda
097011c450 MDL-39846 simplify context parameter when creating new evetns 2013-07-19 08:43:30 +02:00
Petr Škoda
fddd1018f6 MDL-39846 improve validation and enable hardcoding of system context 2013-07-19 08:43:30 +02:00
Petr Škoda
4ad6d5c589 MDL-39846 prevent use of snapshots in restored events 2013-07-19 08:43:30 +02:00
Petr Škoda
300dbc66f2 MDL-39846 prevent adding of snapshots after event trigger 2013-07-19 08:43:30 +02:00
Petr Škoda
ed17808d99 MDL-39846 add event property iterator 2013-07-19 08:43:29 +02:00
Petr Škoda
27af3e625c MDL-39846 require context when creating events
No more guessing or falling back to system context.
2013-07-19 08:43:29 +02:00
Petr Škoda
62401e8fd5 MDL-39846 implement event sink for unit testing 2013-07-19 08:43:29 +02:00
Petr Škoda
a85258cac8 MDL-39846 introduce new objecttable property 2013-07-19 08:43:29 +02:00
Petr Škoda
5fef139cd9 MDL-39846 rename cached record to snapshot 2013-07-19 08:43:28 +02:00
Petr Škoda
c4297815eb MDL-39846 rename 'extra' event property to 'other' 2013-07-19 08:43:28 +02:00
Petr Škoda
605a8c336f MDL-39846 add more magic and improve tests 2013-07-19 08:43:28 +02:00
Petr Škoda
2262656430 MDL-39846 protect event dispatching process 2013-07-19 08:43:28 +02:00
Petr Škoda
4b734e74ae MDL-39846 more fixing and cleanup of new events
* fix typos (thanks Rajesh)
* move log related data out from event API specification
* change callable key in definition to callback
* use event data in observers instead of cached records if possible
* event level is now a number 1…100
* improved event safety checks
* add event name and description method
* new can_view() method
* improve unit tests to test all callable types
* improved performance
2013-07-19 08:43:27 +02:00
Petr Škoda
d8a1f4263a MDL-39846 implement new event dispatching and base event class 2013-07-19 08:43:27 +02:00