Skip to content

issue #174: make sure that timecompleted reset to 0 when OPERATOR_ANY - #175

Open
dmitriim wants to merge 1 commit into
MOODLE_404_STABLEfrom
issue174
Open

issue #174: make sure that timecompleted reset to 0 when OPERATOR_ANY#175
dmitriim wants to merge 1 commit into
MOODLE_404_STABLEfrom
issue174

Conversation

@dmitriim

Copy link
Copy Markdown
Member

fixes #174

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a bug where the course_completed condition stored the current timestamp in timecompleted when the operator was set to "Any", causing existing completions to be excluded. The fix overrides retrieve_config_data to zero out timecompleted when OPERATOR_ANY is selected.

Changes:

  • Override retrieve_config_data in course_completed to reset timecompleted to 0 for OPERATOR_ANY.
  • Add three PHPUnit tests covering the new reset behavior, preservation for BEFORE/AFTER, and SQL query behavior for OPERATOR_ANY.
  • Bump plugin version/release to 2026051400.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
classes/local/tool_dynamic_cohorts/condition/course_completed.php Adds retrieve_config_data override to zero out timecompleted for OPERATOR_ANY.
tests/local/tool_dynamic_cohorts/condition/course_completed_test.php Adds tests verifying reset, preservation, and SQL behavior.
version.php Bumps version and release to 2026051400.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Course completed condition saves current timestamp when "Completion date" is set to "Any"

2 participants