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

mod_form: revert hidden field string change #644

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

jrchamp
Copy link
Collaborator

@jrchamp jrchamp commented Feb 28, 2025

$gradefieldname is a string, so while the code looked like an array index, it's actually a string concatenation which matches examples from Moodle core.

Reference: https://github.com/moodle/moodle/blob/688478cfa443945dbdc30fee45984585cc23eb0a/mod/forum/mod_form.php#L285

Thanks @bobopinna for mentioning this on 96998ad

Fixes #643

`$gradefieldname` is a string, so while the code looked like an array index, it's actually a string concatenation which matches examples from Moodle core.

Reference: https://github.com/moodle/moodle/blob/688478cfa443945dbdc30fee45984585cc23eb0a/mod/forum/mod_form.php#L285
@jrchamp jrchamp added the bug Fixes problems or reduces technical debt label Feb 28, 2025
@jrchamp jrchamp requested a review from a team February 28, 2025 16:26
@jrchamp jrchamp self-assigned this Feb 28, 2025
@cybernotic
Copy link

Tested branch with fix and this resolves the issue.

@smbader smbader merged commit fa9be30 into main Mar 6, 2025
14 checks passed
@smbader smbader deleted the fix/gradefieldname-revert branch March 6, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes problems or reduces technical debt
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

mod forum error after commit - mod_form: Hide grading method when activity is not graded
3 participants