ndunand / moodle-enrol_attributes

This plugin allows users to be enrolled according to any value stored in their user profile.
https://moodle.org/plugins/enrol_attributes
18 stars 22 forks source link

plugin fails and delay legacy cron processing for plugins #18

Closed nauticalist closed 6 years ago

nauticalist commented 7 years ago

With administrator role I created attributes enrollment type for the seafarer rank custom profile field. When I click force enrollments now it displays [object Object]

I have the same issue with php 7.0.7 and php5.6.

Here is the debugging log

customtext1= stdClass Object ( [rules] => Array ( [0] => stdClass Object ( [param] => rank [value] => Boatswain ) [1] => stdClass Object ( [param] => rank [value] => Pumpman [cond_op] => or ) [2] => stdClass Object ( [param] => rank [value] => Able Seaman [cond_op] => or ) [3] => stdClass Object ( [param] => rank [value] => Ordinary Seaman [cond_op] => or ) [4] => stdClass Object ( [param] => rank [value] => Fitter/Donkeyman [cond_op] => or ) [5] => stdClass Object ( [param] => rank [value] => Oiler [cond_op] => or ) [6] => stdClass Object ( [param] => rank [value] => Wiper [cond_op] => or ) [7] => stdClass Object ( [param] => rank [value] => Chief Cook [cond_op] => or ) [8] => stdClass Object ( [param] => rank [value] => Steward [cond_op] => or ) ) ) line 112 of /enrol/attributes/edit.php: call to debugging() fieldsandrules= Array ( [customuserfields] => Array ( [1] => vtype [2] => rank [3] => sbnumber ) [rules] => Array ( [0] => stdClass Object ( [param] => rank [value] => Boatswain ) [1] => stdClass Object ( [param] => rank [value] => Pumpman [cond_op] => or ) [2] => stdClass Object ( [param] => rank [value] => Able Seaman [cond_op] => or ) [3] => stdClass Object ( [param] => rank [value] => Ordinary Seaman [cond_op] => or ) [4] => stdClass Object ( [param] => rank [value] => Fitter/Donkeyman [cond_op] => or ) [5] => stdClass Object ( [param] => rank [value] => Oiler [cond_op] => or ) [6] => stdClass Object ( [param] => rank [value] => Wiper [cond_op] => or ) [7] => stdClass Object ( [param] => rank [value] => Chief Cook [cond_op] => or ) [8] => stdClass Object ( [param] => rank [value] => Steward [cond_op] => or ) ) ) line 114 of /enrol/attributes/edit.php: call to debugging() arraysql= Array ( [select] => RIGHT JOIN {user_info_data} d1 ON d1.userid = u.id AND d1.fieldid = 2 RIGHT JOIN {user_info_data} d2 ON d2.userid = u.id AND d2.fieldid = 2 RIGHT JOIN {user_info_data} d3 ON d3.userid = u.id AND d3.fieldid = 2 RIGHT JOIN {user_info_data} d4 ON d4.userid = u.id AND d4.fieldid = 2 RIGHT JOIN {user_info_data} d5 ON d5.userid = u.id AND d5.fieldid = 2 RIGHT JOIN {user_info_data} d6 ON d6.userid = u.id AND d6.fieldid = 2 RIGHT JOIN {user_info_data} d7 ON d7.userid = u.id AND d7.fieldid = 2 RIGHT JOIN {user_info_data} d8 ON d8.userid = u.id AND d8.fieldid = 2 RIGHT JOIN {user_info_data} d9 ON d9.userid = u.id AND d9.fieldid = 2 [where] => (d1.data = ? OR d1.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d1.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d1.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d2.data = ? OR d2.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d2.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d2.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d3.data = ? OR d3.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d3.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d3.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d4.data = ? OR d4.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d4.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d4.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d5.data = ? OR d5.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d5.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d5.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d6.data = ? OR d6.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d6.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d6.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d7.data = ? OR d7.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d7.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d7.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d8.data = ? OR d8.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d8.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d8.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d9.data = ? OR d9.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d9.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d9.data LIKE ? COLLATE utf8_bin ESCAPE '\') [params] => Array ( [0] => Boatswain [1] => %;Boatswain [2] => Boatswain;% [3] => %;Boatswain;% [4] => Pumpman [5] => %;Pumpman [6] => Pumpman;% [7] => %;Pumpman;% [8] => Able Seaman [9] => %;Able Seaman [10] => Able Seaman;% [11] => %;Able Seaman;% [12] => Ordinary Seaman [13] => %;Ordinary Seaman [14] => Ordinary Seaman;% [15] => %;Ordinary Seaman;% [16] => Fitter/Donkeyman [17] => %;Fitter/Donkeyman [18] => Fitter/Donkeyman;% [19] => %;Fitter/Donkeyman;% [20] => Oiler [21] => %;Oiler [22] => Oiler;% [23] => %;Oiler;% [24] => Wiper [25] => %;Wiper [26] => Wiper;% [27] => %;Wiper;% [28] => Chief Cook [29] => %;Chief Cook [30] => Chief Cook;% [31] => %;Chief Cook;% [32] => Steward [33] => %;Steward [34] => Steward;% [35] => %;Steward;% ) ) line 116 of /enrol/attributes/edit.php: call to debugging() sqlquery= SELECT DISTINCT u.id FROM {user} u RIGHT JOIN {user_info_data} d1 ON d1.userid = u.id AND d1.fieldid = 2 RIGHT JOIN {user_info_data} d2 ON d2.userid = u.id AND d2.fieldid = 2 RIGHT JOIN {user_info_data} d3 ON d3.userid = u.id AND d3.fieldid = 2 RIGHT JOIN {user_info_data} d4 ON d4.userid = u.id AND d4.fieldid = 2 RIGHT JOIN {user_info_data} d5 ON d5.userid = u.id AND d5.fieldid = 2 RIGHT JOIN {user_info_data} d6 ON d6.userid = u.id AND d6.fieldid = 2 RIGHT JOIN {user_info_data} d7 ON d7.userid = u.id AND d7.fieldid = 2 RIGHT JOIN {user_info_data} d8 ON d8.userid = u.id AND d8.fieldid = 2 RIGHT JOIN {user_info_data} d9 ON d9.userid = u.id AND d9.fieldid = 2 WHERE (d1.data = ? OR d1.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d1.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d1.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d2.data = ? OR d2.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d2.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d2.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d3.data = ? OR d3.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d3.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d3.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d4.data = ? OR d4.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d4.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d4.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d5.data = ? OR d5.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d5.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d5.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d6.data = ? OR d6.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d6.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d6.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d7.data = ? OR d7.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d7.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d7.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d8.data = ? OR d8.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d8.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d8.data LIKE ? COLLATE utf8_bin ESCAPE '\') OR (d9.data = ? OR d9.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d9.data LIKE ? COLLATE utf8_bin ESCAPE '\' OR d9.data LIKE ? COLLATE utf8_bin ESCAPE '\') line 119 of /enrol/attributes/edit.php: call to debugging() countusers= 15 line 121 of /enrol/attributes/edit.php: call to debugging()

ndunand commented 6 years ago

Hi @nauticalist can you check whether this still is an issue with the latest version?

nauticalist commented 6 years ago

@ndunand Hi, Sorry for the late reply. The build 2018092300 work fine. Thanks

ndunand commented 6 years ago

Thanks for your feedback @nauticalist