moodle-filter_filtercodes icon indicating copy to clipboard operation
moodle-filter_filtercodes copied to clipboard

Feature Request: FilterCode based on completion of another course

Open davefoord opened this issue 3 years ago • 6 comments

Would it be possible to have an if filter code that is based on the completion of another course?

Something along the lines of:

{ifcoursecomplete courseshortname} and then the corresponding negative {ifcoursenotcomplete coursehsortname}

That way I could show different content based on whether they have or haven't completed another course.

(or could use course ID rather than shortname)

Thanks in advance.

davefoord avatar Jul 29 '21 11:07 davefoord

Hi @davefoord ,

It would be possible to do this.

Michael

michael-milette avatar Jul 29 '21 15:07 michael-milette

That would be excellent if this could be added. Thanks

davefoord avatar Jul 29 '21 15:07 davefoord

Actually just thinking this through, using the course shortname would be better than using course ID, as if the course ever had to be recreated from a back up the courseid would change but the shortname would remain the same.

davefoord avatar Jul 29 '21 15:07 davefoord

Hi @davefoord

Normally I would agree. However, unlike in many parts of Moodle where the shortname is a label that is never seen by students, the course name is displayed. If the course shortname changes by even one character (correcting a typo for example), you might need to go though a considerable amount of your course content to update the shortname, depending on how often you used the new tag. Of course if you cloned the course, you would need to do the same thing anyway.

Could you provide me with a few examples of use case of how you would use this? Have you considered using the Conditional Activities to restrict visibility of content in your course depending on completion of another course?

Best regards,

Michael

michael-milette avatar Jul 29 '21 18:07 michael-milette

Hey folks. I managed to do this with filtercodes by pairing it with the subcourse plugin. You add a hidden subcourse activity and set it to self-complete when the targeted course within the subcourse activity is complete. You can then use that subcourse activity ID and it's completion status as the reference for the 'ifactivitycompleted' filtercode.

LogFish avatar Mar 29 '23 21:03 LogFish

Thanks LogFish - yes what you have described would do this. I have only just realised that it was back in 2021 that I started this thread, and I never actually provided the use case examples that I was asked to provide (sorry I was on holiday at the time).

The use case for me, is in some of my Moodles, I am creating my own labels within courses that link to the different activities within the course (eg all the activities are available but not visible) so the way into them is via the mechanism I have created. This basically makes the interface much simpler and cleaner for the user, so yes I can use restrict access to limit access to certain items, I also want to be able to mirror that within the labels that I have produced.

Obviously this is a very niche way of working, that most other's won't follow, and especially as we move to Moodle 4.1 this method actually becomes harder to manage, so I think will get used less, but I can still see a use for people to add textual items into something e.g. 'Well done {firtname}, you have completed the Health and Safety module - the other core module that you need to complete is introduction to safeguarding'

davefoord avatar Mar 30 '23 06:03 davefoord