Skip to content

Conversation

@TamaroWalter
Copy link
Member

@TamaroWalter TamaroWalter commented Dec 20, 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 PR fixes #251.

Part of the completion conditions for activity completions are conditions regarding a users grade. Teacher can depend the completion on a passing grade.

What was the problem?
Moodleoverflow did not have a passing grade setting. As the moodle core accepts passing grades as completion conditions, a teacher could set the passing grade as condition but the mod_form-validation returned the error that a passing grade needs to be set, although there was no possibility to set it.

What was the solution?
A new field is added to mod_form in the grades section where a teacher can set a passing grade. This field is recognized automatically by the mod_form and handled correctly. A new field is added to the database as well as the setting needs to be saved if the teacher wants to change it.


📋 Checklist

Please confirm the following (check all that apply):

  • 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.
  • If there are changes in the database: I updated/created the necessary upgrade steps in db/upgrade.php and
    updated the version.php.

🔍 Related Issues


@TamaroWalter TamaroWalter self-assigned this Dec 20, 2025
@TamaroWalter TamaroWalter force-pushed the fix/missing_passing_grade branch from e7a9651 to 2b67274 Compare December 20, 2025 22:44
@TamaroWalter TamaroWalter force-pushed the fix/missing_passing_grade branch 3 times, most recently from f249d2a to 05f21fe Compare December 20, 2025 23:22
This commits adds the ability to set a passing grade for a moodleoverflow that can be checked in the activity completions
@TamaroWalter TamaroWalter force-pushed the fix/missing_passing_grade branch from 05f21fe to 1f6e1bf Compare December 20, 2025 23:25
@TamaroWalter TamaroWalter merged commit 7279181 into main Dec 21, 2025
48 checks passed
@TamaroWalter TamaroWalter deleted the fix/missing_passing_grade branch December 21, 2025 13:55
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.

No way to set passing grade for completion

2 participants