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

fix: update list to only show session id if user has capabilities to upload #163

Merged
merged 1 commit into from
May 23, 2024

Conversation

keevan
Copy link
Contributor

@keevan keevan commented May 23, 2024

Resolves #161

@@ -33,7 +33,14 @@ class mod_facetoface_renderer extends plugin_renderer_base {
/**
* Builds session list table given an array of sessions
*/
public function print_session_list_table($customfields, $sessions, $viewattendees, $editsessions, $signuplinks = true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it probably wasn't there before, but would be nice to add phpdoc for these params, so for e.g. we know what $uploadbookings is for

Also if $uploadbookings is coming from a capability check, could it maybe be called $canuploadbookings to be clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes to the docs, (note that phpdoc checks are disabled because there's a lot of issues in this plugin for that), and I think if we do the $candothing instead of $dothing approach (which I prefer btw), we should apply it consistently throughout, which I'd like to be handled in a separate issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see the var is already called $uploadbookings before in the code. I guess its alright then.

@matthewhilton matthewhilton merged commit b0bf8c1 into MOODLE_403_STABLE May 23, 2024
11 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.

Session id/number should only be visible to those who use it
2 participants