-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improvement/59 Make board work with context freezing #61
Conversation
This should resolve #59 |
I have rebased my changes for this on onto the MOODLE_400_STABLE branch as well |
Co-authored-by: Bas Brands <bas@moodle.com>
classes/board.php
Outdated
|
||
$context = static::context_for_board($boardid); | ||
if (!has_capability('mod/board:post', $context)) { | ||
// the user is not allowed to post via capabilities. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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!
There was a problem hiding this 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!
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. |
Eagerly awaiting the split of post and view capabilities :-) |
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
Rebased the change |
2b6702e
into
brickfield:MOODLE_401_STABLE
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:

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