69 Commits

Author SHA1 Message Date
Marina Glancy
9c1561ef83 MDL-17929 groups: function to sync groups with enrolments 2015-04-22 14:36:38 +08:00
Frederic Massart
d996c620a9 MDL-46416 group: Allow group pictures to be deleted 2014-11-25 11:58:13 +08:00
Frederic Massart
21449d01b7 MDL-46416 group: Use a revision number for group pictures 2014-11-25 11:58:13 +08:00
Tony Butler
f84b9e65e4 MDL-46792 core_group: Check that $data->name is set before trimming
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-08-15 09:43:36 +01:00
Gregory Faller
e4ebf7ef0f MDL-46524: Auto-create groups from existing group or grouping membership 2014-08-06 10:50:14 +09:30
Syxton
55c9a15041 MDL-45991 groups: Auto-create ignore grouped users
MDL-45991 groups: Auto-create groups with ungrouped users only

When using auto-create groups, sometimes it is needed to only create
groups with users that are not already inside a course group.  This
patch creates a checkbox that will ignore users that are in already
existing groups.  It alters the groups_get_potential_members function so
that the eligible users are retrieved entirely though sql.
2014-07-10 15:44:21 -04:00
Marina Glancy
24c32bdf2f MDL-44403 events: added public method to get eventdata 2014-03-04 15:16:15 +08:00
Adrian Greeve
60f55a2f72 MDL-42238 - Groups: Alternate name sql update to groups_get_potential_members(). 2013-10-10 14:05:53 +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
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Mark Nelson
4e829d48d1 MDL-40468 libraries: removed usages of get_related_contexts_string() in core
Also tidied up the functions by removing unused parameters.
2013-07-19 15:17:50 +08:00
Petr Škoda
b0d1d941c9 MDL-40220 use new core_component::get_component_directory() 2013-07-16 22:42:37 +02:00
Petr Škoda
689096bc26 MDL-38654 do not test $CFG->gdversion
GD PHP extension is now required. Add-ons need to remove $CFG->gdversion tests. The worst case regression is that add-on will think GD is not available.
2013-03-22 16:57:55 +01:00
Dan Poltawski
f6623fe130 Merge branch 'MDL-27164-master' of git://github.com/micaherne/moodle 2013-01-22 12:51:51 +08:00
Sam Hemelryk
e17dbeeb1a MDL-34398 groups: implemented caching of group information. 2013-01-17 09:24:58 +13:00
Adrian Greeve
51e8d287f9 MDL-30797 - backup groups: Added a parameter to the groups_assign_grouping function.
$timeadded has now been included so that the backup / restore functions can now use
this API rather than duplicating the code.
2013-01-14 10:24:37 +08:00
Michael Aherne
d6af3d847f MDL-27164 groups Do not show multiple instances of the same role as multiple 2013-01-11 11:12:33 +00:00
Eloy Lafuente (stronk7)
c740703c18 Merge branch 'w40_MDL-31437_m24_cohortsync' of git://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2012-10-02 22:00:12 +02:00
Eloy Lafuente (stronk7)
8614cd72f0 Merge branch 'MDL-34657' of git://github.com/timhunt/moodle 2012-10-01 23:22:39 +02:00
Petr Škoda
7881024ec4 MDL-31437 add group sync option to enrol_cohort
This patch includes following changes and new features:
* Group sync in enrol_cohort plugin.
* Option for editing of role in existing cohort sync instance.
* Group memberships are now restored after enrolments.
* New enrol method for restore of protected group membership.
* New component callback 'restore_group_member' for restore of general plugin group membership.
* New component callback 'restore_role_assignment' for restore of general plugin role assignments.
* Implemented group membership protection in enrolment UI.
* Other minor fixes and cleanup.

Notes:
* The YUI base enrolment page is not reimplemented yet - see MDL-35618.
2012-09-28 21:00:00 +02:00
Tim Hunt
9695ff811b MDL-34657 user sorting: consistent sorting everywhere.
This commit coverts everything in the codebase to use the new
users_order_by_sql function when sorting lists of users. More details in
the bug.

Note that this does not change places where users are displayed in a
sortable table, and the sort order comes from the table.
2012-09-27 12:41:42 +01:00
Mark Nelson
5a45b936bf MDL-35637 group: Fix form submission error that occurs when GD version is not set. 2012-09-27 12:00:02 +08:00
sam marshall
1d1917aeaa MDL-31973 Groups: groups_members table should have 'component', 'itemid' fields 2012-08-24 15:30:13 +01:00
Ankit Agarwal
bf0f06b1be MDL-34471 libraries: Replace all uses of get_context_instance() with respective context_XXXX::instance() method 2012-08-02 15:37:38 +08:00
Petr Skoda
c52551dc3c MDL-8249 localise standard role names and descriptions if empty 2012-07-06 08:22:34 +02:00
Andrew Robert Nicols
74b714df7e MDL-32005 Add idnumber field to groups and groupings 2012-05-15 09:38:51 +01:00
Adrian Greeve
4d8e241742 MDL-30997 - group - update of the api block documentation. 2012-02-21 11:17:27 +08:00
Petr Skoda
16ef46e7b6 MDL-29450 improve and cleanup course content removal
New keep roles/enrolments and groups/groupings options, notification CSS fixed, standardised notification texts, added missing delete of module blocks, fixed file deleting and some other minor issues.
2011-11-23 18:37:36 +01:00
Petr Skoda
1c7a2f84db MDL-24787 fixing group UI to work for users without roles too 2010-10-26 13:38:05 +00:00
Petr Skoda
d490ca8161 MDL-24690 fixed incorrect cohort condition when auto-creating groups 2010-10-18 08:26:57 +00:00
Petr Skoda
ace9051cc1 MDL-24321 switching to stdClass in /g*/ 2010-09-21 08:16:49 +00:00
Petr Skoda
d08787af90 MDL-23202 gdlib api cleanup 2010-07-11 13:12:53 +00:00
Petr Skoda
e88dd87685 MDL-23202 group icons now stored in file storage pool 2010-07-11 13:07:24 +00:00
Petr Skoda
64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00
Petr Skoda
df997f841f MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
    MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
    MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
    MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
    MOV [enrolenddate,core],[enrolenddate,enrol_self]
    CPY [welcometocourse,core],[welcometocourse,enrol_self]
    CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
    MOV [notenrollable,core],[notenrollable,core_enrol]
    MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
    MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
    MOV [coursemanager,core_admin],[coursecontact,core_admin]
    MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
    MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
    MOV [enrolme,core],[enrolme,core_enrol]
    MOV [unenrol,core],[unenrol,core_enrol]
    MOV [unenrolme,core],[unenrolme,core_enrol]
    MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
    MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
    MOV [enrolments,core],[enrolments,core_enrol]
    MOV [enrolperiod,core],[enrolperiod,core_enrol]
    MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
Petr Skoda
64fa9aa723 fixed comment typo 2010-05-21 19:25:13 +00:00
Petr Skoda
92343cd2eb MDL-21781 added support for autocreation of groups from cohorts 2010-04-23 09:15:55 +00:00
Petr Skoda
4f0c2d0009 MDL-21655 big scary enrolment and roles improvements - see tacker for list of changes, includes other minor fixes too 2010-03-31 07:41:31 +00:00
Petr Skoda
4454447d56 MDL-20700 whitespace terror returns 2009-12-16 22:14:17 +00:00
David Mudrak
70e0f41e41 Fixed a typo in function name 2009-12-07 10:15:07 +00:00
Sam Hemelryk
8bdc9cacad files MDL-20601 Conversion of many of the uses of print_textarea, and the mforms htmleditor to the new editor
Please forgive me if I have missed converting any output statements. If you do find an output statement that is not formatting correctly please refere to the table I added to this bug in regards to how it should be formatted.
2009-11-04 06:14:06 +00:00
Petr Skoda
6f5e085205 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 16:48:45 +00:00
Petr Skoda
4ca6cfbfd4 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 12:00:47 +00:00
skodak
b18e25d541 MDL-12886 fixed regression, wrongtable name,sorry 2009-09-16 10:08:37 +00:00
skodak
b7e8cfb6ec MDL-12886 fixed regression, missing include 2009-09-16 10:06:05 +00:00
skodak
9a0df45a01 MDL-12886 new design of external service functions, groups api improved and known problems fixed - still work in progress with lots of todos - sorry 2009-09-14 23:52:08 +00:00
nicolasconnault
a1c54f7ac1 MDL-19798 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:00:29 +00:00
jerome
0d4723ee62 web service MDL-12886 check that a user is a course participant before to add it to a group 2009-03-13 06:51:30 +00:00
jerome
9c000a991f web service MDL-12886 if the groupid doesn't exist, groups_remove_member and groups_add_member return now exception (not a boolean as before) 2009-03-09 04:49:50 +00:00