GithubHelp home page GithubHelp logo

catalyst / moodle-mod_reengagement Goto Github PK

View Code? Open in Web Editor NEW
23.0 42.0 39.0 382 KB

Allows timed release of content and emails users to remind them to complete a course activity

PHP 99.35% Gherkin 0.65%

moodle-mod_reengagement's Introduction

Re-engagement plugin developed by Catalyst IT Build Status

Allows timed release of content and emails users to remind them to complete course activities

More documentation available here: https://docs.moodle.org/en/Reengagement_activity

Branches

The git branches here support the following versions.

Moodle version Branch
Mooodle 3.5 MOODLE_35_STABLE
Moodle 3.6 -> 3.8 MOODLE_38_STABLE
Moodle 3.9 -> 3.10 MOODLE_39_STABLE
Moodle 3.11 MOODLE_311_STABLE
Moodle 4.0 MOODLE_400_STABLE
Totara 12 TOTARA_12

moodle-mod_reengagement's People

Contributors

alexmorrisnz avatar brendanheywood avatar danmarsden avatar ellatait07 avatar euven avatar fashberg avatar gabguev avatar iv-enovation avatar joshwillcock avatar kiklop74 avatar kingdavid127 avatar markuskgit avatar matt-catalyst avatar matthewhilton avatar omanpaur8 avatar peterbulmer avatar peterburnett avatar pramithkm avatar rajandangi avatar sumaiyamannan avatar tatiana-gl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-mod_reengagement's Issues

unit test failures (GDPR userlist)

Provider_testcase::test_userdata_provider_implements_userlist with data set "mod_reengagement" ('mod_reengagement', 'mod_reengagement\privacy\provider')
Failed asserting that false is true.

Change third party recipient

IT is a good Idea to send an email to a third party recipient (inform the teacher, the tutor or the parent), but it would be more easily manageable if instead of an email address we had a choice like teacher, mentee or non-editing teacher. Then, the script could go into the database to get the teacher's email address.

This way, duplication of a course to be use by another teacher would be much more easy.

Error reading from the database

I have a question about the operation of this plugin. We test it in courses with 400 people and everything was ok but when we test it in one of our big courses (30.000 enrolled users), it died. The people don't receive the email and we obtain an error that says "Error reading from the database". Do you have any idea what may be happening and how could we solve it?

Change %coursename% place holder string

The string for the default email place holders is %coursename% which is not a valid place holder token. Perhaps change this to a valid token so users don't have to change the default configuration to get it to work.

Thanks!

Error when I add Reengagement

I want to add one reengagement into the course but not success.
Moodle version: 3.3
Reengagement version: 3.3.1 2017050800

I changed the column type VARCHAR and after work, but I dont know if it is going to cause trouble in the future.

Debug info: Column 'visibleoncoursepage' cannot be null
INSERT INTO mdl_course_modules (course,module,instance,visible,visibleoncoursepage,visibleold,idnumber,groupmode,groupingid,completion,completiongradeitemnumber,completionview,completionexpected,availability,showdescription,added) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '10',
1 => 26,
2 => 0,
3 => 0,
4 => NULL,
5 => 0,
6 => '',
7 => 0,
8 => 0,
9 => 2,
10 => NULL,
11 => 0,
12 => 0,
13 => NULL,
14 => 0,
15 => 1495716800,
)]
Error code: dmlwriteexception
Stack trace:
line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1259 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1305 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 830 of /course/lib.php: call to mysqli_native_moodle_database->insert_record()
line 108 of /course/modlib.php: call to add_course_module()
line 154 of /course/modedit.php: call to add_moduleinfo()

Can not duplicate instance

same as in #21

Debug info:
Field 'thirdpartyemails' doesn't have a default value INSERT INTO mdl_reengagement (name,timecreated,timemodified,emailuser,emailsubject,emailcontent,emailcontentformat,duration,suppresstarget,emaildelay,emailrecipient,emailsubjectmanager,emailcontentmanager,emailcontentmanagerformat,course) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [array ( 0 => 'Erinnerung', 1 => 1491255586, 2 => '0', 3 => '2', 4 => 'Jetzt ist die nächste Frage drann...', 5 => 'This is a reminder email from course %coursename%.', 6 => '1', 7 => '300', 8 => '0', 9 => '300', 10 => '0', 11 => '', 12 => '', 13 => '0', 14 => '4', )] Error code: dmlwriteexception

  • line 482 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1259 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1305 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 70 of /mod/reengagement/backup/moodle2/restore_reengagement_stepslib.php: call to mysqli_native_moodle_database->insert_record()
  • line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_reengagement_activity_structure_step->process_reengagement()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 201 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
  • line 177 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
  • line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 335 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 3311 of /course/lib.php: call to restore_controller->execute_plan()
  • line 3238 of /course/lib.php: call to duplicate_module()
  • line 118 of /course/rest.php: call to mod_duplicate_activity()

Debug info:
Field 'thirdpartyemails' doesn't have a default value INSERT INTO mdl_reengagement (name,timecreated,timemodified,emailuser,emailsubject,emailcontent,emailcontentformat,duration,suppresstarget,emaildelay,emailrecipient,emailsubjectmanager,emailcontentmanager,emailcontentmanagerformat,course) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [array ( 0 => 'Erinnerung', 1 => 1491255586, 2 => '0', 3 => '2', 4 => 'Jetzt ist die nächste Frage drann...', 5 => 'This is a reminder email from course %coursename%.', 6 => '1', 7 => '300', 8 => '0', 9 => '300', 10 => '0', 11 => '', 12 => '', 13 => '0', 14 => '4', )] Error code: dmlwriteexception

Error when trying to setup phpunit

Setup: docker image moodlehq/moodle-php-apache:7.0
Moodle version 3.5.2

The setup goes just fine. However when I try to setup phpunit environment I get the following:

Default exception handler: Cannot be executed during upgrade Debug: 
Error code: cannotexecduringupgrade
* line 1443 of /lib/setuplib.php: moodle_exception thrown
* line 2159 of /lib/modinfolib.php: call to upgrade_ensure_not_running()
* line 905 of /course/lib.php: call to get_fast_modinfo()
* line 948 of /course/lib.php: call to course_create_sections_if_missing()
* line 22 of /mod/oublog/settings.php: call to course_add_cm_to_section()
* line 89 of /lib/classes/plugininfo/mod.php: call to include()
* line 47 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
* line 7999 of /lib/adminlib.php: call to require()
* line 8101 of /lib/adminlib.php: call to admin_get_root()
* line 35 of /mod/reengagement/db/install.php: call to admin_write_settings()
* line 782 of /lib/upgradelib.php: call to xmldb_reengagement_install()
* line 512 of /lib/upgradelib.php: call to upgrade_plugins_modules()
* line 1857 of /lib/upgradelib.php: call to upgrade_plugins()
* line 491 of /lib/installlib.php: call to upgrade_noncore()
* line 461 of /lib/phpunit/classes/util.php: call to install_cli_database()
* line 150 of /admin/tool/phpunit/cli/util.php: call to phpunit_util::install_site()

I think that the problem is in xmldb_reengagement_install function which looks like this:

function xmldb_reengagement_install() {
    $settings = array('s__enablecompletion' => 1, 's__enableavailability' => 1);
    admin_write_settings($settings);

    return true;
}

I think it should look like this:

function xmldb_reengagement_install() {
    set_config('enablecompletion', 1);
    set_config('enableavailability', 1);
    return true;
}

Notify time adds 10 extra minutes. (Improve reporting on users going through re-engagement process.)

Hello,

"notify time"-column date/time should stop when reminder count is run out but it adds 10 minutes to that time for some reason.

Steps to repeat:

  1. Create engagement
  • Notification delay 10min
  • reminder count: 2
  • Reengagement duration: 1 week.
  1. Notice how the last email message is received at f.ex

06.05.2020 13:21

but if you look inside the re-engagement activity "notify time" states 13:31 and not 13:21 as it should.

reengagment sends notifications to teachers and students?

looks like the capability "startreengagement" is used to obtain a list of people that should be sent the re-engagment notification - this is given to the student, teahcer and editingteacher roles by default. I'm not sure that is correct? - shouldn't we just be notifying students by default? - @peterbulmer thoughts?

Field "grade" does not exist in table "reengagement"

When I want to add a new scale in Site administration > Grades > Scale, I receive the error code: ddlfieldnotexist

Stack trace:
line 628 of /lib/dml/moodle_database.php: dml_exception thrown
line 1826 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
line 543 of /mod/reengagement/lib.php: call to moodle_database->record_exists()
line 310 of /lib/grade/grade_scale.php: call to reengagement_scale_used_anywhere()
line 146 of /grade/edit/scale/index.php: call to grade_scale->is_used()

We are using Moodle 3.1.1 (Build: 20160811) with the reengagement plugin version 3.1.5 (2016081600)

With kind regards,
Hartmut

Error if showdescription somehow gets set to true

I experienced an issue with the cron for this plug in giving the following error:

Scheduled task failed: Reengagement cron task (mod_reengagement\task\cron_task),Error reading from database
Scheduled task exception: Reengagement cron task - Error reading from database Debug: Unknown column 'intro' in 'field list'
SELECT name, intro, introformat FROM mdl_reengagement WHERE id = ?
[array (
  0 => '2',
)]
Error code: dmlreadexception
* line 445 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1094 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1496 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 1468 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
* line 1447 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 1151 of /course/lib.php: call to moodle_database->get_record()
* line 618 of /lib/modinfolib.php: call to get_array_of_activities()
* line 451 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()
* line 412 of /lib/modinfolib.php: call to course_modinfo->__construct()
* line 2078 of /lib/modinfolib.php: call to course_modinfo::instance()
* line 628 of /mod/reengagement/lib.php: call to get_fast_modinfo()
* line 219 of /mod/reengagement/lib.php: call to reengagement_get_startusers()
* line 52 of /mod/reengagement/classes/task/cron_task.php: call to reengagement_crontask()
* line 75 of /lib/cronlib.php: call to mod_reengagement\task\cron_task->execute()
* line 61 of /admin/cli/cron.php: call to cron_run()

This appears to be because Moodle is looking for a modname_get_coursemodule_info function for the module and if it does not exist, it checks to see if showdescription is set in the course_modules table for that module's instances and if so, it looks for a 'intro' and 'introformat' field in the module's table.

I'm not sure what setting caused showdescription to equal true for one of my instances, because I can't find the setting that controls that for this module, but one was set to true, which makes me think it is somehow possible.

I think a good solution here would be to add the modname_get_coursemodule_info function to the code.

Ability to insert images directly into email

Is there a way to embed images directly into the email message that gets sent out, rather than just using a url? Images hosted within Moodle/Totara get stripped out when the email sends, so it would be good to be able to add images without having to host them on another site.

Fatal error on T12 with missing grade items

So we have a client on T12 with this plugin, and completions tag as COMPLETION_COMPLETE_PASS or COMPLETION_COMPLETE_FAIL as completion statuses for that client (as expected).

Problem is, on the course view for the activity, Totara 12 inside course/renderer.php tries to determine the icon to use for completion, and if the state is COMPLETION_COMPLETE_PASS or COMPLETION_COMPLETE_FAIL, it attempts to load the grade_item attached to the completion and this returns false (rather than a grade_item, because there isn't one) and fails because it can't determine if the grade_item is hidden or not.

This seems to be a non-trivial change to mod_reengagement but I think it might need to be fixed here rather than not. I've patched our client's Totara core for now so that if it doesn't get a grade_item, it just gives it the completed icon anyway.

Debug notice on possible performance improvement in participants class when testing on M37

In testing the latest version 2019011700 release 3.6.1 from Moodle.org on Moodle 3.7 (Build: 20190520) I'm seeing the following notices with debug enabled, although the plugin does still appear to function - just seeing if it's acceptable to run this version on M37 and if this would cause any problems when running the plugin on that version once it's available to clients:

Please do not call get_users_roles() with $checkparentcontexts = true and $userids array not set. This combination causes large Moodle sites with lots of site-wide role assignments to run out of memory.

    line 2812 of /lib/accesslib.php: call to debugging()
    line 250 of /mod/reengagement/classes/table/participants.php: call to get_users_roles()
    line 226 of /mod/reengagement/view.php: call to mod_reengagement\table\participants->__construct()

Support multilanguage mail texts

Hi all,

first of all, thanks for providing this very useful plugin!

I have a small feature request:
We have a multilanguage Totara site which has multiple language packs activated and provides course content in multiple languages. We would also like to use mod_reengagement for sending reminder messages in the user's preferred language. However, we have seen that mod_reengagement does not yet support Moodle's multilanguage tags (or generally: Moodle filters) in the mail body.

Would you mind adding this feature into the next version by, presumably, processing the mail body with filter_text() ?

Thanks in advance,
Alex

Add option to send notification based on capability

It would be useful if teachers could be notified in a course - but based on a new capability and it might also be useful to have a way to support the non-editing teacher and only notify them about users that are in their groups.

Reengagement date and time inconsistency

Our customer decided to start using the reengagement activity with the already created course, it has lots of users enrolled into it.

The goal is to email the user with a delay based on the user enrolment date.

The activity works fine with the newly enrolled users, the date and time of the reengagement are calculated correctly for them.

For the users who were enrolled before the reengagement activity was created, their reengagement date and time are calculated incorrectly. The activity just adds a delay time to the time the activity was created.

Example:

Course was created on 18/06/19
User A was enrolled into the course on 18/06/19
Reengagement activity with 5 days delay based on the user enrolment date was created on 20/06/19
User B was enrolled into the course on 20/06/19

In this scenario user A will be emailed on 25/06/19, user B will be emailed on 25/06/19 as well.

Your feedback would be much appreciated.

Allow user notification to be disabled.

The Totara version allows the user notification to be disabled but the Moodle version does not. Now that the third-party recipients field has been added we should allow the user notification to be disabled.

The Totara version provides a drop-list of options for choosing who gets the notification - it might make more sense and a better UI to convert these to checkboxes (send user/send manager/send third-party)

The reply adress ist not really defined

The reply adress ist not really defined
emailsenduser is not set.

PHP Notice: Undefined variable: emailsenduser in /var/www/vhosts/trendinnovation.lern.link/www/moodle/mod/reengagement/lib.php on line 506

BUG: After deleting reengagement activity, mails are still being sent

After a sh*tload of Emails send out to users, I'm pretty sure the following problem is occuring:

  1. If you add a reengagement activity, set it up, then change your mind and delete it... the mdl_reengagement_inprogress table is still being populated with tasks and the emails are still being send out.
  2. If you change your reengagement settings, the same error occurs: the old corresponding mdl_reengagement_inprogress records still exist and will be added together with the new setup.

We have students complaining about reengagement mails. When we asked to forward these mails, we could see by the subject that these mails belong to a reengagement activity that had been deleted a long time ago.

I also noticed that the reengagement activity is not going to the course recyclebin. So is it properly deleted?

I solved this by deleting the reengagement activity in the MySQL database mdl_reengagement table.

Please do not call get_users_roles() with $checkparentcontexts = true and $userids array not set. This combination causes large Moodle sites with lots of site-wide role assignemnts to run out of memory.

The following error has appeared in our moodle installation v3.5.

We're using: Reengagement v3.4.1 - 2017122005

URL: mod/reengagement/view.php?id=276

Please do not call get_users_roles() with $checkparentcontexts = true and $userids array not set. This combination causes large Moodle sites with lots of site-wide role assignemnts to run out of memory.
line 2730 of /lib/accesslib.php: call to debugging()
line 247 of /mod/reengagement/classes/table/participants.php: call to get_users_roles()
line 226 of /mod/reengagement/view.php: call to mod_reengagement\table\participants->__construct()

Improvement: Send Test Email

When setting up the emails, it would be helpful to be able to have the plugin send the editing user a test copy of the email so we can see what the final email looks like before it goes out to students.

Restricted activity not shown after reengagement completed

Using the latest plugin and moodle, Here is the scenario to reproduce the issue.
1- creating a reengagement activity of five minutes, without any restriction, named r1.
2- creating an assignment activity, restricted to r1 completion, and hidden if user does not meet requirement.

I log in as a test user and enroll it to the course. I wait for five minutes but nothing happens.

screenshot from 2017-12-03 19-25-21

In this example, wait activity is set to be 5 mins. I waited for 10 mins with no luck.

What could be wrong?

Add check for last cron, check for disabled e-mail

it would be handy to show a warning in the editing interface if e-mail is disabled or if cron is not running regularly - might cut down on some of the people reporting problems in the forums when they are installing this on a local test site.

Emails get sent even if course is hidden

Hi,
I've changed some ideas with Dan on the forum about the fact that the messages are sent even if the course is hidden.
I've tweaked the SQL a bit in order to check that variable. What do you think?

SELECT cm.id as id, cm.id as cmid, cm.availability, r.id as rid, r.course as courseid, r.duration, r.emaildelay FROM {reengagement} r INNER JOIN {course_modules} cm on cm.instance = r.id JOIN {course} c ON c.id = r.course JOIN {modules} m on m.id = cm.module WHERE m.name = 'reengagement' AND c.visible = 1 ORDER BY r.id ASC
Thanks

Email reply variable question

The email sent to users from my test server has a no reply for reply address, although I have the support contact email configured, which can mean they're filtered as spam, is there any way to avoid this? Is this a server setting only?
from: 3.1 Site noreply@debian
reply-to: Do not reply to this email noreply@debian

Cant install error in version.php file.

When i download from moodle.org and install on a moodle 3.6 i get this error:

Plugin block_reengagement does not declare valid $plugin->component in its version.php.
line 315 of /lib/classes/plugin_manager.php: call to debugging()
line 335 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()
line 217 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()
line 143 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()
line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
line 355 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
line 1118 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins()
line 1239 of /admin/renderer.php: call to core_plugin_manager->missing_dependencies()
line 212 of /admin/renderer.php: call to core_admin_renderer->missing_dependencies()
line 679 of /admin/index.php: call to core_admin_renderer->upgrade_plugin_check_page()

and then on next page : ( it says The plugin "mod_reengagement" is installed in the wrong place $CFG->dirroot/blocks/reengagement", it was expected herer "$CFG->dirroot/mod/reengagement")

Plugin'et "mod_reengagement" er installeret et forkert sted "$CFG->dirroot/blocks/reengagement", forventet sted er "$CFG->dirroot/mod/reengagement"

Mere information om denne fejl
Debug info:
Error code: detectedmisplacedplugin
Stack trace:

line 903 of /lib/upgradelib.php: plugin_misplaced_exception thrown
line 520 of /lib/upgradelib.php: call to upgrade_plugins_blocks()
line 1852 of /lib/upgradelib.php: call to upgrade_plugins()
line 694 of /admin/index.php: call to upgrade_noncore()

You need to see if the plugin is a block or mod in the version file.

reengagement observing restrict access rules

Hello! I'm not sure how or where to fix this, but I would like to see the reengagement plugin 'observe' the restrict access rules.

Use Case:
A course that is built with two separate groups that have both shared content and topic sections that are shown/hidden using restrict access and groups. Currently, all learners are emailed regardless of whether they can see the topic section/activities or not.

I have two test students in the pre-k section and one student in the infant/toddler section. All three students received the messages set in both sections. (see image)

Ideally, only the students who have access to the activities/section will receive the emails.

reengagement

Can you get me started with how to add this functionality?

Thanks,

Erin

5 minute minimum times

(Pull request coming)
Currently re-engagement is limited to minimum times of 5 minutes. I want to relax that.

Help with timed release

Hi,

I read the documentation about the timed release function HERE and I thought I set all the settings correctly but it did not seem to work.

Basically I was trying this out with two testing quizzes: MCQ first and MCQ second. Moodle version is 2.9 and completion tracking is enabled for the course. For testing purposes, I want the MCQ second to be opened 5 minutes after the MCQ first is marked complete. Based on my understanding of the plugin, it can be used as a timer to delay the release of activities.

When MCQ first is marked complete, the Reengagement activity should be accessible. Since the reengagement activity is hidden from the user, it should act as a timer. After 5 minutes, the reengagement activity is marked complete and the MCQ second should be released. I tested it using a student account (not switching roles). The MCQ first is marked complete but the MCQ second is not released. And as a student, I cannot check whether the reengagement activity is now marked complete.

I have attached the settings page below and hopefully someone could help me figure out what went wrong. Perhaps I did not understand the function of the plugin correctly? Any advice is appreciated.

Thanks for reading my post :)

1

2

Second message is never sent.

Hello

Second message after the first one doesn't seem to work at all. Tested with Moodle 3.5 & mod_reengagement 3.5.2 (2018040501)

Steps to repeat:

  1. Check that \mod_reengagement\task\cron_task is run every minute.

  2. Add user to a course, check enrolment time f.ex 8:20AM.

  3. Create re-engagement -activity with settings:

  • Notify user: After delay
  • notification delay: 10 minutes
  • reminder count: 2
  • Activity completion: Reengagement duration 5 minutes
  1. First message arrives at 8:35AM (shoudn't it arrive 8:30?)

  2. Then another message doesn't arrive at all, when it should arrive at 8:45AM (notification delay 10)

Unable to restore course containing reengagement instance on M32

When attempting to restore a course containing an instance of mod_reengagement version 2016112400 release 3.2.1 on Moodle 3.2.2 (Build: 20170313) I get the following error which indicates the 'thirdpartyemails' field needs to be included in the activity backup/restore. This is a problem because the user will not know that their course backup cannot be restored until they try later (i.e. no warnings are present during backup, it just finishes backup successfully):

Error writing to database

More information about this error

×Debug info: Field 'thirdpartyemails' doesn't have a default value
INSERT INTO mdl_reengagement (name,timecreated,timemodified,emailuser,emailsubject,emailcontent,emailcontentformat,duration,suppresstarget,emaildelay,emailrecipient,emailsubjectmanager,emailcontentmanager,emailcontentmanagerformat,course) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => 'testreengagement',
1 => 1489538729,
2 => '0',
3 => '0',
4 => '',
5 => 'This is a reminder email from course %coursename%.',
6 => '1',
7 => '300',
8 => '0',
9 => '604800',
10 => '0',
11 => '',
12 => '',
13 => '0',
14 => 3,
)]
Error code: dmlwriteexception
×Stack trace:
line 482 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1259 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1305 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 70 of /mod/reengagement/backup/moodle2/restore_reengagement_stepslib.php: call to mysqli_native_moodle_database->insert_record()
line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_reengagement_activity_structure_step->process_reengagement()
line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
line ? of unknownfile: call to progressive_parser->end_tag()
line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
line 201 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
line 177 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 335 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
line 111 of /backup/restore.php: call to restore_ui->execute()

Add option to not track completion of reengagement

Based on my understanding of how this code works, I'm not sure that this is possible without a complete rewrite but I'll ask anyway.

Is there a reason why reengagements are forced to have activity completion turned on for them with "Show activity as complete when conditions are met"?

This causes all reengagements to get counted by Moodle's default get_course_progress_percentage function that is used (among other places) in the updated course overview block for Moodle 3.3 and on. The reason why this is an issue is that we for example have an reengagement set to occur 5 minutes after enrollment that sends a welcome email to these students. But because this reengagement then gets counted as "complete" users who have never logged in still show 4% complete on anything using core Moodle's progress functions including our custom progress reports.

Is it possible to change this or am I correct in my understanding of the plugin and its coding?

allow multiple reminders

It would be nice if you could send out multiple reminders using the same activity - at the moment to do this requires multiple re-engagement activities to be set up.

How to use the release functionality

I found the documentation overall very clear but on the ability to release activities based on the Reengagement activity, I wasn't able to set one up in the way I thought it would work.
If you have an assignment task 1, and assignment task 2, how to set up a reengagement activity based on task 1 completion to release task 2 access, a small step by step on this configuration would be great!

Email are not sent

Hi Dan,
I have problem with Reengagement plugin. Emails are not sent. At first, I thought something was wrong in activity settings, but when I got a message stating date and time of sent emails in the activity, I knew activity settings were OK.

So I went into different server logs to try to find the source of the problem. I finally found something in the cron log. Here is one entry:
Execute scheduled task: Tâche crom de réengagement (mod_reengagement\task\cron_task)
... started 08:00:01. Current memory use 6.9Mo.
... used 39 dbqueries
... used 0.32810091972351 seconds
Scheduled task failed: Tâche crom de réengagement (mod_reengagement\task\cron_task),Erreur de lecture de la base de données

I removed and reinstalled the plugin. Just to make sure... same kind of entry in the cron log. Can you help me solve the problem?

For your information, we're running Moodle 3.2.1+ (Build: 20170216) Version 2016120501.08 and mysqlnd 5.0.11-dev.

As per your request "enable the global showcrondebugging setting", since i'm not a sysadmin, I do not know how to do that. Could you be more specific, please?

Thanks for your assistance!

A few @copyrights missing

Just a few files, such as index.php, lib.php and view.php are missing correct author or copyright information so we know who to contact in the event of an emergency!

Error when adding a reengagement - undefined function

Hey folks, the reengagement activity still sends out an email but there is no info about when emails were sent + to whom etc and this error displays on the reengagement's page. Using the latest version (d38635a) & just creating a reengagement that sends an email after 5 minutes, everything else default.

Here's the error:

Debug info: 
Error code: generalexceptionmessage
×Stack trace:
line 253 of \mod\reengagement\classes\table\participants.php: Error thrown
line 226 of \mod\reengagement\view.php: call to mod_reengagement\table\participants->__construct()

It looks as if a function from locallib.php (get_viewable_roles) is being called but locallib isn't being included within classes/table/participants.php

Cheers, hope that helps

latest M3.3 / 34+ versions encountering errors on Totara 12

When viewing a course with the latest Moodle 3.3 version 2017102004 or 3.4 version 2017122005 installed on Totara 12, I see the following with debugging on:

The module reengagement does not define the standard capability mod/reengagement:addinstance
    line 2078 of /course/lib.php: call to debugging()
    line 674 of /course/lib.php: call to course_allowed_module()
    line 320 of /course/renderer.php: call to get_module_metadata()
    line 866 of /course/format/renderer.php: call to core_course_renderer->course_section_add_cm_control()
    line 56 of /course/format/topics/format.php: call to format_section_renderer_base->print_multiple_section_page()
    line 288 of /course/view.php: call to require()

When trying to add a reengagement instance in a course I get the following errors which prevent it from being accessed/configured after being added to course:

Capability "mod/reengagement:startreengagement" was not found! This has to be fixed in code.
    line 418 of /lib/accesslib.php: call to debugging()
    line 81 of /mod/reengagement/view.php: call to has_capability()

Capability "mod/reengagement:editreengagementduration" was not found! This has to be fixed in code.
    line 418 of /lib/accesslib.php: call to debugging()
    line 82 of /mod/reengagement/view.php: call to has_capability()

Coding error detected, it must be fixed by a programmer: notlocalisederrormessage
Debug info: error
Error code: codingerror
Stack trace:
    line 858 of /lib/deprecatedlib.php: coding_exception thrown
    line 85 of /mod/reengagement/view.php: call to error()

Coding error detected, it must be fixed by a programmer: Unknown method called against core_user_renderer :: unified_filter
Debug info:
Error code: codingerror
Stack trace:
    line 138 of /lib/outputrenderers.php: coding_exception thrown
    line 215 of /mod/reengagement/view.php: call to plugin_renderer_base->__call()

Noting neither of these errors occur on latest Moodle 3.5 using latest version 2017122005, so these errors appear to be Totara-specific and I wasn't sure whether that's a supported platform

Deprecation warnings on M3.9

Moodle 3.9 deprecates user_get_participants_sql() and core_user_renderer->unified_filter().
The replacement is \core\table\participants_search::class.

@danmarsden thoughts on moving mod_reenagement onto this new class and putting out a MOODLE_38_STABLE release for the current codebase?

Not sending emails

I'm testing this plugin to send course suggestions when a user has completed a course, currently set to send with no delay after they have completed the course, but nothing is being sent to my email addresses.

Inside the '_reengagement' table, I can see the emails are there but not been sent. [there is an old one in there too which should have sent more than 24 hours ago]

Branch naming conventions

It's slightly unclear from the Github repository, which branch (naming convention really) to use for Moodle 3.1 and this would possibly compound with future Moodle releases, perhaps a comment in the README to confirm that the master branch is the one to use for the supported 3.1 version or a slight tidy-up perhaps?

Notification Enhancements

We have the need to use the reengagement activity to send Notifications or reminders based on course triggers, but still find it very limited. As such here are suggested enhancements:

  • More options for Triggers, especially need: Course Start Date, Enrollment end date, etc.
  • More wildcards for the email body text, especially need: %Course Start Date%, %Instructor%, etc.
  • Ability to selectively choose who the Notification goes to, especially need : only instructor, only third party filled in email, etc.

Thanks for your consideration!

Enhancement Request: prevent cancellations x days/hours/minutes before a session is due to start (i.e. control last-minute cancellations)

The cancellation feature is very useful; however, a learner can cancel his/her session enrolment at any time in the lead-up to a scheduled classroom session. Needless to say, a trainer may be left with a half-empty room at the last minute. It would desirable to control this situation by preventing said cancellations x days/hours/minutes before a scheduled session is due to start. Please advise if Catalyst are now only enhancing this plugin on a 'user-pays' basis.

Improve branch documentation

Just for quick reference it would be nice to have a branch table for branch -> version inside the readme, as the plugin directory may not always be current.

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.