Comments (9)
definitely happy for features that control this to land in the plugin - I'm not quite sure that it makes sense to have a new setting to "move" course completion records to the recompletion_cc table though - the plugin already does that when triggering a recompletion process.
What I think you want to occur is allow the normal recompletion process to trigger - clearing their completion record, and archiving it if set, but if the user is not still enrolled - don't send a notification asking them to recomplete.
To do this - I'd a new setting that allows the teacher to decide if the notification should be sent when the user is no longer enrolled in the course - but I'd be just as happy to accept a patch that set it at the ite-level setting if you didn't want to give teachers the ability to control it.
doest that make sense? - would that suit your needs?
from moodle-local_recompletion.
Yeah, that's even better! We'll get to work on that.
from moodle-local_recompletion.
Where would you like the function that evaluates whether they are actively enrolled? I think the old way was to include it in locallib.php, but wondered if you wanted a helper.php/utilities.php in classes dir.
from moodle-local_recompletion.
I would probably just make the recompletion email checkbox into a drop list:
https://github.com/danmarsden/moodle-local_recompletion/blob/74c8cc7fabc1c0881e9711d5d9b3f865298e3ece/classes/recompletion_form.php#L70C41-L70C64
with the options "disabled", "Send to all users with a completion record", "Send to users with a current enrolment"
- not sure those text strings are quite right - but "all users" would be the current behaviour and the "send to users with a current enrolment would just add an is_enrolled() style check here:
-
so if recompletionemailenable empty - return, if recompletionemailenable = 1 (old setting) just send it, if recompletionemailenable = 2 (new setting that you are adding) - do an is_enrolled check and if true, send the notification.
of course don't use magic numbers - we'd need to define some new constants for the recompletionemailenable setting - mayve LOCAL_RECOMPLETION_NOTIFICATION_DISABLED, LOCAL_RECOMPLETION_NOTIFICATION_ENABLED, LOCAL_RECOMPLETION_NOTIFICATION_ENROLLED
(or something similar.
hopefully that makes it even simpler to implement and meets your needs?
from moodle-local_recompletion.
That's a similar approach to what I was thinking, but yours simplifies it even further.
There is the possibility of a fourth option. Is it worthwhile to differentiate between the last two? Our client is interested in the last one (only actively enrolled users are notified - ignore suspended enrollments).
Disabled
Send to all users (with a completion record)
Send to all users (with an enrollment)
Send to all users (with an active enrollment)
Thoughts?
from moodle-local_recompletion.
If you see value there and do the development go for it!
from moodle-local_recompletion.
Ok, back at it today. The existing admin name is recompletionemailenable. Would you rather it remain the same or be changed to a different name? Either way, I'll need to add an upgrade step. Thoughts?
from moodle-local_recompletion.
happy for your pull request to use the same name and we can change it later - but also happy for you to change it as part of your patch - up to you. :-)
from moodle-local_recompletion.
I ended up leaving the enable/disable checkbox and when enabled, it allows various levels. Defaults to previous behavior.
from moodle-local_recompletion.
Related Issues (20)
- Privacy provider is refering to non existing table HOT 2
- SQL error during update to 2024022200 HOT 1
- Default settings are only used in form and not applied to course unless recompletion course settings page saved. HOT 1
- Privacy provider refers to non-existent string (unit test failure) HOT 1
- local_recompletion_config enable value is always set to 1 HOT 2
- support for mod_videotime HOT 1
- Invalid default setting for recompletiontype HOT 2
- Feature Request: Force Manual Recompletion HOT 1
- M4.3 - 2024042200 - error while updating HOT 2
- issue when upgrading to 2024042200 HOT 2
- Error on updating to 2024042200 version on database Postgresql HOT 1
- Plug in cannont reset the Course HOT 4
- reset period HOT 1
- Add test for recompletion settings page
- Upgrade fails due to missing 'global $OUTPUT' HOT 3
- Error on Recompletion Task - failed to execute during scheduled cron run time - plugin version 2024071103 (2024071103) moodle 4.4+ (Build: 20240510) HOT 4
- wrong time despite correct period HOT 1
- Send recompletion message from an email different than the primary site admin HOT 1
- Error while processing privacy data HOT 1
- Feature Request - Support for mod_booking, delete all bookings on recompletion HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-local_recompletion.