Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/59 Make board work with context freezing #61

Merged

Conversation

NeillM
Copy link
Contributor

@NeillM NeillM commented Apr 17, 2023

As part of this I split the ability to post and rate into a new capability that is separate from the view capability.

I added the new capability into the checks for users being able to edit various features

A also made it so that comments also required the ability for users to make a comment in the first place.

An example of the admin user viewing a board in frozen context with these changes applied:
image

and the admin user viewing a comment in a frozen board:
image

@NeillM
Copy link
Contributor Author

NeillM commented Apr 17, 2023

This should resolve #59

@mikechurchward mikechurchward changed the base branch from main to MOODLE_400_STABLE May 8, 2023 18:08
@NeillM
Copy link
Contributor Author

NeillM commented May 26, 2023

I have rebased my changes for this on onto the MOODLE_400_STABLE branch as well

andreasschenkel pushed a commit to andreasschenkel/moodle-mod_board that referenced this pull request Oct 5, 2023
Co-authored-by: Bas Brands <bas@moodle.com>

$context = static::context_for_board($boardid);
if (!has_capability('mod/board:post', $context)) {
// the user is not allowed to post via capabilities.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for this request, but CI checks are god, and they prefer comments starting with capital letters. TIA!

version.php Outdated
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die;

$plugin->component = 'mod_board'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2022040105; // The current module version Use 2022.04.01 as base for 4.00.
$plugin->version = 2022040106; // The current module version Use 2022.04.01 as base for 4.00.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version on main branch is now 2022040111, also release is '1.401.02 (Build 2022040111)';

Hoping to include this in the next release shortly, with some other PRs. TIA!

Copy link
Contributor

@learningtechnologyservices learningtechnologyservices left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Neill, many thanks for submitting this PR for improving Board! We'd like to include this in the next release, if we can get these couple of edits done by yourself please? TIA! Karen

P.S. We're just maintaining one active branch, MOODLE_401_STABLE, thanks!

@NeillM
Copy link
Contributor Author

NeillM commented Mar 7, 2024

I have rebased the changes (there was a merge conflict that was not part of the version file in the first commit)

I fixed the capitalisation on the comment as part of the rebase.

@NeillM NeillM changed the base branch from MOODLE_400_STABLE to MOODLE_401_STABLE March 7, 2024 14:57
@danowar2k
Copy link

Eagerly awaiting the split of post and view capabilities :-)

NeillM added 2 commits March 15, 2024 08:02
This is so that when a context is frozen users will still be able to see the contents of the board, but not be able to edit anything.
This is to stop users being able to delete comments in a frozen context
@NeillM
Copy link
Contributor Author

NeillM commented Mar 15, 2024

Rebased the change

@learningtechnologyservices learningtechnologyservices merged commit 2b6702e into brickfield:MOODLE_401_STABLE Mar 15, 2024
3 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.

3 participants