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

Bug: {ifactivitycompleted id}{/ifactivitycompleted} does not work for activities with passing grade #312

Open
7 of 11 tasks
erno774 opened this issue Nov 23, 2024 · 4 comments
Assignees
Labels
bug Ready for testing Feature has been implemented and we are waiting for participant to test.

Comments

@erno774
Copy link

erno774 commented Nov 23, 2024

Prerequisites

  • I'm reporting the issue to the correct repository.
  • I am running the latest version of this plugin (if not, please upgrade first).
  • I checked the README.md and Wiki documentation but did not find my answer.
  • I searched to make sure that this issue had not already been reported.
  • I have, or I know someone who has, the ability and willingness to test the fix on a Moodle LMS-based site.
  • I am submitting no more than one bug report per issue ticket (please do not submit multiple bugs in one issue ticket).
  • I understand that support is provided by volunteer(s).

What happened?

The code {ifactivitycompleted id}TEST_TEXT{/ifactivitycompleted} does not display the TEST_TEXT as it is supposed to do. Behaviour:

  1. When the activity with the references ID such as a quiz can manually be set to "completed" and is set to "completed", the TEST_TEXT is shown to the participant who has completed the activity.
  2. When the activity with the references ID such as a quiz has a passing grade to be "completed" and is "completed", the TEST_TEXT is NOT shown to the participant who has completed the activity.

What do you think should have happened?

I expected the TEST_TEXT between the code {ifactivitycompleted id}{/ifactivitycompleted} to be displayed to the participant, who has completed the corresponding activity, whether or not the activity has a passing grade.

Steps to reproduce

  1. Login as 'teacher'
  2. Go to a 'course'
  3. Activate the filter "filtercodes'
  4. Create a 'quiz' and name it QUIZ1
  5. Set the completion condition of QUIZ1 to 'Students must manually mark the activity as done'
  6. Create another 'quiz' and name it QUIZ2
  7. Set the completion condition of QUIZ2 to 'Add requirement' → 'Receive a grade' → 'Passing grade' → '70'
  8. Add some random questions to QUIZ2
  9. Add the code {ifactivitycompleted id}TEST_TEXT1{/ifactivitycompleted} to a section description and give it the ID of QUIZ1
  10. Add the code {ifactivitycompleted id}TEST_TEXT2{/ifactivitycompleted} to a section description and give it the ID of QUIZ2
  11. Login to the same course as a user
  12. Complete QUIZ1 by clicking 'completed' manually
  13. Complete QUIZ2 by answering the questions correctly
  14. Check if TEST_TEXT1 and TEST_TEXT2 are displayed to this user.

Screenshots

No response

Moodle version

Moodle 4.3.8+ (Build: 20241018)

Installed Moodle UI Language packs.

  • English only
  • One or more other languages/regional dialects (specify below)
  • Other

If other language(s), please specify

No response

Workaround

No, I have not found a workaround.

Additional information

Debugging doesn't show any error regarding this.

System information

No response

Code of Conduct

@davefoord
Copy link

Hi - I too have just spotted this exact same issue, I have tested this in Moodle 4.1 and 4.3 and both have the same issue.

@michael-milette
Copy link
Owner

Hi @erno774 and @davefoord ,

The issue should be resolved for both the ifactviitycompleted and ifnotactviitycompleted tags in the version of FilterCodes here on GitHub. If you would be so kind, I would appreciate it if you would give the master branch here on GitHub a try and let me know if it solves the problem for you. If it does, I will include the fix in the next release of FilterCodes on Moodle.org.

Best regards,

Michael

@michael-milette michael-milette added the Ready for testing Feature has been implemented and we are waiting for participant to test. label Dec 16, 2024
@davefoord
Copy link

Hi Michael - I have downloaded the version from GitHub and it works!

When are you planning to release the next version to the plugins page?

Thanks

@michael-milette
Copy link
Owner

Hi @davefoord ,

Thanks for the feedback. Normally I only release new features at the same time as the next release of Moodle. However, because this is a bug fix, I am planning a release in a week or two, definitely before January 6, 2025.

Best regards,

Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Ready for testing Feature has been implemented and we are waiting for participant to test.
Projects
None yet
Development

No branches or pull requests

3 participants