Panopto / Moodle-2.0-plugin-for-Panopto

Panopto's integration with the Moodle LMS.
http://www.panopto.com
GNU General Public License v3.0
18 stars 38 forks source link

PHP Notice: Undefined index: targetservers #166

Closed slewislcm closed 3 years ago

slewislcm commented 4 years ago

Hello, I'm getting this line in the php errors logs, every time a user logs in. Not a huge issue, but filling up the logs. PHP Notice: Undefined index: targetservers in E:\sites\public_html\blocks\panopto\classes\task\sync_user_login.php on line 47
$targetservers = $eventdata['targetservers']; if (!isset($targetservers) || empty($targetservers)) { $targetservers = panopto_get_target_panopto_servers(); } Plugin version 2020072700. I'm using moodle 3.8.3 / PHP 7.3.17 In panopto settings automatic_operation_target_server is set, 'Authenticate and sync to Panopto on Moodle login (not recommended)' is ticked. The error goes, when I untick sync on login. thanks, Simon

jrchamp commented 4 years ago

Yeah it looks like the current code is: https://github.com/Panopto/Moodle-2.0-plugin-for-Panopto/blob/32168b868446504e60f4f730fead7194b893ebfd/classes/task/sync_user_login.php#L47-L50 When it should be:

            if (empty($eventdata['targetservers'])) {
                $targetservers = panopto_get_target_panopto_servers();
            } else {
                $targetservers = $eventdata['targetservers'];
            }
slewislcm commented 4 years ago

great. That's sorted it. Thanks for the quick reply.

jmalmsten-panopto commented 3 years ago

Hi,

This should be resolved with the latest release of the Panopto block.

Thanks, Joe