Skip to content

Adding config settings for default visibility behavior#48

Merged
bluetom merged 17 commits into
mainfrom
manually-adjusting-default-behavior
Jun 3, 2026
Merged

Adding config settings for default visibility behavior#48
bluetom merged 17 commits into
mainfrom
manually-adjusting-default-behavior

Conversation

@lenaherf

@lenaherf lenaherf commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Note: Please fill out all relevant sections and remove irrelevant ones.

🔀 Purpose of this PR:

  • Fixes a bug
  • Updates for a new Moodle version
  • Adds a new feature of functionality
  • Improves or enhances existing features
  • Refactoring: restructures code for better performance or maintainability
  • Testing: add missing or improve existing tests
  • Miscellaneous: code cleaning (without functional changes), documentation, configuration, ...

📝 Description:

Please describe the purpose of this PR in a few sentences.

This PR adds configuration settings for the groups block. Before the changes, the default behavior was that the students could not immediately see the groups after creation and the teacher had to first enable the visibility of them. The new settings allow a teacher to change the default setting of not making groups visible at first to students. By changing the settings, the students will be able to directly see the groups after creation.

The following changes were made to the code:

  • Adding the config settings for the group block
  • Introducing an observer for the \core\event\group_created event to be able to directly add the groups to the block_groups_hide table
  • Refactoring "create_allgroups_output" to make it easier to read and follow (single responsibility functions)
  • Adding cucumber tests to check the new behavior of the settings

📋 Checklist

Please confirm the following (check all that apply):

  • I have phpunit and/or behat tests that cover my changes or additions.
  • Code passes the code checker without errors and warnings.
  • Code passes the moodle-ci/cd pipeline on all supported Moodle versions or the ones the plugin supports.
  • Code does not have var_dump() or var_export or any other debugging statements (or commented out code) that
    should not appear on the productive branch.
  • Code only uses language strings instead of hard-coded strings.
  • If there are changes in the database: I updated/created the necessary upgrade steps in db/upgrade.php and
    updated the version.php.
  • If there are changes in javascript: I build new .min files with the grunt amd command.
  • If it is a Moodle update PR: I read the release notes, updated the version.php and the CHANGES.md.
    I ran all tests thoroughly checking for errors. I checked if bootstrap had any changes/deprecations that require
    changes in the plugins UI.

🔍 Related Issues

  • Related to #24

🧾📸🌐 Additional Information (like screenshots, documentation, links, etc.)

Any other relevant information.


@lenaherf
lenaherf marked this pull request as ready for review June 3, 2026 08:46
@bluetom
bluetom merged commit c8bfbfb into main Jun 3, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants