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

Error on login/index.php #139

Closed ocimjr closed 5 years ago

ocimjr commented 5 years ago

Hi, after install panopto block we have an error on login page (login/index.php) : Exception : Too few arguments to function panopto_data::__construct(), 0 passed in [dirroot]/blocks/panopto/classes/task/sync_user_all.php on line 60 and exactly 1 expected

Stack trace: line 129 of /blocks/panopto/lib/panopto_data.php: ArgumentCountError thrown line 60 of /blocks/panopto/classes/task/sync_user_all.php: call to panopto_data->__construct() line 220 of /blocks/panopto/classes/rollingsync.php: call to block_panopto\task\sync_user_all->execute() line ? of unknownfile: call to block_panopto_rollingsync::userloggedin() line 155 of /lib/classes/event/manager.php: call to call_user_func() line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers() line 834 of /lib/classes/event/base.php: call to core\event\manager::dispatch() line 4447 of /lib/moodlelib.php: call to core\event\base->trigger() line 181 of /login/index.php: call to complete_user_login()

so on blocks/panopto/classes/task/sync_user_all.php line 60 the script call : $serverpanopto = new \panopto_data();

But looking into file lib/panopto_data.php we can see the constructor has to have a 1 parameter line 129 : public function __construct($moodlecourseid) {

Thank you for fixing this.

jmalmsten-panopto commented 5 years ago

Hi,

It looks like in PHP 7.1.x this error was added.

http://php.net/manual/en/migration71.incompatible.php#migration71.incompatible.too-few-arguments-exception

I will make an internal work item to fix this. This should be included in an upcoming release before the Holiday.

As a workaround I would suggest disabling syncing users at log in, as long as the block is visible it will sync the users when they attempt to view it.

If you need further assistance please open a support ticket with Panopto.

hohno-panopto commented 5 years ago

Hello, 2018121000 Release should have fixed this issue. Please try it.