Commit Graph

282 Commits

Author SHA1 Message Date
Rajesh Taneja
ddf05b5e9d MDL-41415 Events: get_string should not use new 2013-08-27 11:36:26 +08:00
Rajesh Taneja
41566267c5 MDL-41415 Events: get_legacy_logdata is protected 2013-08-27 11:36:11 +08:00
Frederic Massart
861b0510e5 MDL-39959: Replace Legacy events - Groups
This combines the following changes:

* Event for group member added
* Event for group member removed
* Event for group created
* Event for grouping created
* Event for group updated
* Event for grouping updated
* Event for group deleted
* Event for grouping deleted
* Adding tests for deleting functions
* Bulk remove of members uses low-level API

    The reason for this is that a bulk event has no value from a logging
    perspective as it is not granular. So now, the API is a bit slower,
    but the information the events contain makes sense, beside this is
    not (and should not be) used very often.

    The reason why the events_trigger_legacy() is kept is because we
    cannot create a new event for this, as we don't encourage developers
    to created bulk events, for the reasons mentioned above.

    I removed the call that gets the user record from the function
    groups_remove_member() as it was not required and only appeared
    to check if the user existed. It appears to be safe not to do
    this check as nothing would fail down the line.

* Bulk unassign of groupings uses low-level API

    As the previous commit, we keep the legacy event for now as it would
    be wrong to create a new event to replace it.

    Also, the code has been changed to call the low-level API to unassign
    groups from groupins, even though at the moment there are no
    events for that function.

* Bulk deletion of groups uses low-level API

    Again, we keep the legacy event because replacing it would force
    us to create a new event that does not make sense. See MDL-41312.

* Bulk deleting of groupings uses low-level API
* Asserting legacy event name in unit tests
* Minor SQL query and code improvements
2013-08-26 15:03:17 +08:00
Frederic Massart
38d6fbfa87 MDL-41040 event: Level property uses defined event constants 2013-08-21 10:04:02 +08:00
Marina Glancy
e542bc26d9 Merge branch 'wip-mdl-40042' of git://github.com/rajeshtaneja/moodle 2013-08-21 10:02:41 +10:00
Damyon Wiese
5a10d2a7ae Merge branch 'wip-mdl-40043' of git://github.com/rajeshtaneja/moodle
Conflicts:
	course/tests/courselib_test.php
	lang/en/moodle.php
2013-08-20 14:40:42 +08:00
Rajesh Taneja
71298fea03 MDL-40043 Events API: Added user_loggedinas event to replace add_to_log 2013-08-20 14:07:35 +08:00
Rajesh Taneja
ed29bf0f66 MDL-40043 Events API: Added course_section_updated event to replace add_to_log 2013-08-20 14:07:35 +08:00
Dan Poltawski
91a888df34 Merge branch 'MDL-39957_master' of https://github.com/markn86/moodle 2013-08-20 12:38:08 +08:00
Damyon Wiese
b277230aad Merge branch 'MDL-39956-master' of git://github.com/FMCorz/moodle 2013-08-20 12:21:04 +08:00
Dan Poltawski
6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
Rajesh Taneja
135dde74ed MDL-40042 Completion: added course_completion_updated event to remove related add_to_log 2013-08-16 09:34:23 +08:00
Mark Nelson
2bf2f3599e MDL-39957 course: altered the handling of legacy log data for the course_updated event 2013-08-15 18:14:08 +08:00
Mark Nelson
a4003c733a MDL-39957 course: replaced the course_restored legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson
f326c5b4f4 MDL-39957 course: replaced the course_category_deleted legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson
db53f7fe28 MDL-39957 course: replaced the course_content_deleted legacy event 2013-08-15 18:14:08 +08:00
Mark Nelson
c347241ac8 MDL-39957 course: replaced the course_deleted legacy event 2013-08-15 18:14:07 +08:00
Mark Nelson
53a8e678bf MDL-39957 course: replaced the course_updated legacy event 2013-08-15 18:14:07 +08:00
Mark Nelson
3c2fab942b MDL-39957 course: replaced the course_created legacy event 2013-08-15 18:14:07 +08:00
Dan Poltawski
260ea3d9a1 Merge branch 'MDL-39954-master' of git://github.com/FMCorz/moodle 2013-08-14 15:38:37 +08:00
Frederic Massart
dde244c046 MDL-39954 event: Fixed namespace issue with \coding_exception 2013-08-14 14:53:08 +08:00
Frederic Massart
25a66af722 MDL-39956 cohort: Event clean up and made ready for integration
* Added more PHP Documentation
* Localised strings for get_name()
* get_legacy_eventname() is now static
* get_legacy_eventdata() is now protected
* Testing legacy event data
* Added missing defined('MOODLE_INTERNAL') checks
* Added missing call to add_record_snapshot()
2013-08-13 17:41:03 +08:00
Dan Poltawski
04aee04a25 MDL-39956 cohort: Convert to new events
* \core\event\cohort_created
* \core\event\cohort_updated
* \core\event\cohort_deleted
* \core\event\cohort_member_added
* \core\event\cohort_member_removed
2013-08-13 17:30:58 +08:00
Dan Poltawski
f9b5915bc0 Merge branch 'MDL-39954-master' of git://github.com/FMCorz/moodle 2013-08-13 13:23:31 +08:00
Sam Hemelryk
969de2a200 Merge branch 'wip-mdl-39955' of git://github.com/rajeshtaneja/moodle 2013-08-13 14:13:13 +12:00
Rajesh Taneja
06f8ea7bf4 MDL-39955 completion: Added course_completed event 2013-08-13 09:43:38 +08:00
Sam Hemelryk
61f2c458d5 Merge branch 'MDL-40711-master' of git://github.com/ankitagarwal/moodle 2013-08-13 09:12:24 +12:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Frederic Massart
e185f72d58 MDL-39954 core: Abstract event assessable_submitted & assessable_uploaded 2013-08-12 16:26:41 +08:00
Rajesh Taneja
35e4eb42c0 MDL-40044 Roles: Updated role_assigned and role_unassigned event to remove add_to_log 2013-08-09 18:02:02 +08:00
Rajesh Taneja
1613ffa55f MDL-40044 Roles: Added role_allow_*_updated events to replace add_to_log on role allow page
Added events:
1. role_allow_assign_updated
2. role_allow_override_updated
3. role_allow_switch_updated
2013-08-09 17:59:54 +08:00
Rajesh Taneja
82ddcad0a3 MDL-40044 Roles: Added role_capabilites_updated event and replaced related add_to_log 2013-08-09 17:59:54 +08:00
Rajesh Taneja
a7524e354b MDL-40044 Roles: Added role_deleted event and replaced related add_to_log 2013-08-09 17:59:54 +08:00
Rajesh Taneja
137d94f335 MDL-39955 completion: Added course_module_completion_updated event
Conflicts:

	lib/tests/completionlib_advanced_test.php
2013-08-09 17:04:34 +08:00
Ankit Agarwal
d1554f599c MDL-40711 events: Resolve conflicts with MDL-41000 and add phpdocs 2013-08-07 11:01:05 +08:00
Ankit Agarwal
6c66b7f3b3 MDL-40711 blogs: Replace blog_entry_deleted with events2 2013-08-07 10:27:01 +08:00
Marina Glancy
18a4335366 Merge branch 'MDL-40935-master' of git://github.com/ankitagarwal/moodle 2013-08-06 22:33:55 +10:00
Marina Glancy
2cf88d54fb MDL-40682 MDL-41000 event name and description return strings
event description is non-localised string
2013-08-06 22:25:21 +10:00
Marina Glancy
4b96f2ae62 Merge branch 'MDL-40682-master' of git://github.com/ankitagarwal/moodle 2013-08-06 21:05:47 +10:00
Ankit Agarwal
c1ff221eee MDL-40682 events: Add phpdocs for class and init method 2013-08-06 15:13:05 +08:00
Ankit Agarwal
2244600337 MDL-40935 events: get_legacy_eventname() should be public and static 2013-08-06 14:25:37 +08:00
Sam Hemelryk
d2132f02e2 Merge branch 'wip-mdl-41000' of git://github.com/rajeshtaneja/moodle 2013-08-06 17:45:16 +12:00
Sam Hemelryk
17440b2198 Merge branch 'w32_MDL-40815_m26_deprevent' of https://github.com/skodak/moodle
Conflicts:
	lib/deprecatedlib.php
2013-08-06 15:38:18 +12:00
Sam Hemelryk
e145762b17 Merge branch 'MDL-40934-master' of git://github.com/FMCorz/moodle
Conflicts:
	auth/tests/auth_test.php
2013-08-06 14:37:43 +12: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
Petr Škoda
f0f0e1fe73 MDL-40815 deprecate events_trigger() 2013-08-02 16:48:19 +02:00
Rajesh Taneja
91665753df MDL-41000 Events: Fixed return values for get_name() and get_description() in existing events
Changes done for following events:
- \core_auth\event\user_loggedin
- \core\event\role_assigned
- \core\event\role_unassigned
2013-08-02 14:45:52 +08:00