45 Commits

Author SHA1 Message Date
Mark Johnson
958da5b67e MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).

By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.

For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.

Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.

The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
  and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
  groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
  groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
  each other, or cannot see the group at all.
2023-03-14 08:52:25 +00:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
ScottVerbeek
8bd9dca9a8 MDL-66673 groups: Stop notice when messaging system is disabled 2021-04-23 08:52:48 +10:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Paul Holden
ad7d46ed2e MDL-63387 course: use renamed role names, update Behat tests.
Specify that we want both role names (renamed course role plus
original).
2020-09-01 12:05:20 +01:00
Paul Holden
6e8ed1a8fb MDL-67245 group: observe viewfullnames capability. 2020-01-17 12:42:17 +00:00
Paul Holden
21253ed622 MDL-67245 group: display user identity fields for group members. 2020-01-17 12:41:10 +00:00
Jun Pataleta
e5e5b37749 MDL-63620 group: Option for group messaging when auto-creating groups 2019-01-14 13:29:42 +08:00
Mark Nelson
3ee812fab4 MDL-53072 group: minor changes to existing code
1) Tidied up conditional check and put additional variable on new line.
2) Prevented change of the default behaviour for 'groups_get_potential_members()'.
3) Added another behat test.
2016-02-26 11:42:14 +08:00
Niclas Tollstorff
7b96ffb044 MDL-53072 group: added 'only active' option when auto-creating groups 2016-02-26 11:42:14 +08: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
Sam Hemelryk
566889aaa8 MDL-42317 output: reviewed standard/base layouts and converted where a better option was available 2014-04-06 15:57:32 +12:00
Frederic Massart
f196f42c84 MDL-41693 group: Use standard layout for group related pages 2014-01-10 12:26:50 +01:00
Sam Hemelryk
e17dbeeb1a MDL-34398 groups: implemented caching of group information. 2013-01-17 09:24:58 +13:00
Ankit Agarwal
2d9c05b930 MDL-34471 libraries: Remove unused context calls 2012-08-02 15:37:41 +08: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
Adrian Greeve
4d8e241742 MDL-30997 - group - update of the api block documentation. 2012-02-21 11:17:27 +08:00
Petr Skoda
ca50186f73 MDL-29102 fix notice when auto-creating groups in existing grouping 2012-01-15 19:26:43 +01:00
Petr Skoda
ace9051cc1 MDL-24321 switching to stdClass in /g*/ 2010-09-21 08:16:49 +00:00
Rossiani Wijaya
bd08a24a8a add page heading 2010-05-27 09:33:46 +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
David Mudrak
16be897441 MDL-21652 html_table rendering refactored
* class html_component does not exist any more
* class html_table rendered via html_writer::table()
* html_table, html_table_row and html_table_cell have public $attributes property to set their CSS classes
* dropped rotateheaders feature, should be added again after more research of possible ways (<svg> is not nice IMHO)
* dropped possibility to define CSS classes for table heading, body and footer - can be easily done and better done using just table class and context
2010-03-20 22:15:54 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Petr Skoda
4454447d56 MDL-20700 whitespace terror returns 2009-12-16 22:14:17 +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
samhemelryk
b87573d7ae group MDL-19798 Updated print_header and build_navigation to OUTPUT and PAGE equivalents 2009-09-07 06:43:02 +00:00
nicolasconnault
768cefa084 MDL-19798 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno 2009-08-20 08:41:11 +00:00
nicolasconnault
a1c54f7ac1 MDL-19798 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:00:29 +00:00
nicolasconnault
653468d4d6 MDL-19798 Converted all print_footer() calls 2009-08-06 14:10:09 +00:00
nicolasconnault
9cb990ec3b MDL-19798 Migrated calls to print_heading 2009-08-06 08:15:26 +00:00
nicolasconnault
f8065dd287 MDL-19756 Migrated the following functions from weblib to outputlib:
1. button_to_popup_window
2. link_to_popup_window
3. print_single_button
4. print_spacer
5. print_file_picture (deprecated)
6. print_user_picture
7. print_png (deprecated)
8. helpbutton
9. doclink
10. print_paging_bar
11. notice_yesno
2009-07-27 10:33:00 +00:00
skodak
5e2f308b91 MDL-18293 exception and DML cleanup 2009-02-17 16:50:36 +00:00
skodak
294ce9870f MDL-15189 magic quotes finally removed 2008-06-09 16:53:30 +00:00
skodak
dfdaabd6a8 MDL-14679 towards /group conversion 2008-06-01 13:09:04 +00:00
dongsheng
b121a4eed9 "MDL-14129, fix print_error" 2008-05-14 06:15:56 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
skodak
0112ed8e0d MDL-12249 fixed distribution for small groups; merged from MOODLE_19_STABLE 2007-11-19 22:55:39 +00:00
skodak
9509119b0e MDL-12249 fixed small group ration, can be overriden from config.php now; merged from MOODLE_19_STABLE 2007-11-19 21:41:02 +00:00
skodak
f16fa0a34b MDL-12249 groups UI cleanup and improvements - see tracker for details; merged from MOODLE_19_STABLE 2007-11-19 20:31:57 +00:00
mattc-catalyst
e34f620386 groups/autogroup: Allocate members to groups more fairly
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-10-18 00:40:04 +00:00
mattc-catalyst
acf000b077 MDL-11419 - groups: interface enhancements + new features:
* Display the grouping a course module belongs to on the course page - for course managers only.
    * When adding users to groups, display the groups a user already belongs to.
    * Added an overview report that shows groupings, groups and members for a course.
    * Added a dialogue to automatically create groups and assign members based on either the number of desired groups or the number of desired users per group.
2007-09-24 21:55:15 +00:00