GithubHelp home page GithubHelp logo

Comments (9)

danmarsden avatar danmarsden commented on September 4, 2024

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.

davidpesce avatar davidpesce commented on September 4, 2024

Yeah, that's even better! We'll get to work on that.

from moodle-local_recompletion.

davidpesce avatar davidpesce commented on September 4, 2024

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.

danmarsden avatar danmarsden commented on September 4, 2024

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:
  • if (!$config->recompletionemailenable) {

    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.

davidpesce avatar davidpesce commented on September 4, 2024

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.

danmarsden avatar danmarsden commented on September 4, 2024

If you see value there and do the development go for it!

from moodle-local_recompletion.

davidpesce avatar davidpesce commented on September 4, 2024

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.

danmarsden avatar danmarsden commented on September 4, 2024

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.

davidpesce avatar davidpesce commented on September 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.