Skip to content

Conversation

@TamaroWalter
Copy link
Contributor

@TamaroWalter TamaroWalter commented Nov 6, 2025

🔀 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:

This is an fix for #164. The error is that when opening the user statistics an SQL syntax error occurred on some systems.

What was the error?
In the SQL statement is an extra parenthesis, that on some moodle/mysql-version get not parsed correctly.

What is the solution?
As the parenthesis were unnecessary, they could just be removed from the SQL-statement


📋 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.

🔍 Related Issues

@TamaroWalter TamaroWalter self-assigned this Nov 6, 2025
@TamaroWalter TamaroWalter linked an issue Nov 6, 2025 that may be closed by this pull request
@TamaroWalter TamaroWalter merged commit cf861b6 into main Nov 6, 2025
52 checks passed
@TamaroWalter TamaroWalter deleted the fix/userstats_sql branch November 6, 2025 09:34
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.

Bug - "View user statistics" produces an error

2 participants