SQL queries coming back with errors in provider.php. Changing ge.userid to pe.userid and g.id to p.id fixes these errors.
There were 4 errors:
1) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_override_unexpired_role
Unexpected debugging() call detected.
Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g"
LINE 8: JOIN phpu_pcast p ON g.id = cm.instance
^
SELECT DISTINCT u.id
FROM phpu_user u
JOIN (SELECT ge.userid
FROM phpu_context c
JOIN phpu_course_modules cm ON cm.id = c.instanceid AND c.contextlevel = $1
JOIN phpu_modules m ON m.id = cm.module AND m.name = $2
JOIN phpu_pcast p ON g.id = cm.instance
JOIN phpu_pcast_episodes pe ON pe.pcastid = p.id
WHERE c.id = $3) target ON u.id = target.userid
[array (
0 => 70,
1 => 'pcast',
2 => 110001,
)])
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 341 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
line 1027 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 56 of /privacy/classes/local/request/userlist.php: call to pgsql_native_moodle_database->get_records_sql()
line 142 of /mod/pcast/classes/privacy/provider.php: call to core_privacy\local\request\userlist->add_from_sql()
line 8154 of /lib/moodlelib.php: call to mod_pcast\privacy\provider::get_users_in_context()
line 578 of /privacy/classes/manager.php: call to component_class_callback()
line 611 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
line 285 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
line 451 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->get_users_in_context()
line 388 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
line 946 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->process_approved_deletions()
line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to tool_dataprivacy\expired_contexts_test->test_process_course_context_with_override_unexpired_role()
line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
line 122 of /vendor/bin/phpunit: call to include()
2) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_override_expired_role
Unexpected debugging() call detected.
Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g"
LINE 8: JOIN phpu_pcast p ON g.id = cm.instance
^
SELECT DISTINCT u.id
FROM phpu_user u
JOIN (SELECT ge.userid
FROM phpu_context c
JOIN phpu_course_modules cm ON cm.id = c.instanceid AND c.contextlevel = $1
JOIN phpu_modules m ON m.id = cm.module AND m.name = $2
JOIN phpu_pcast p ON g.id = cm.instance
JOIN phpu_pcast_episodes pe ON pe.pcastid = p.id
WHERE c.id = $3) target ON u.id = target.userid
[array (
0 => 70,
1 => 'pcast',
2 => 110001,
)])
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 341 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
line 1027 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 56 of /privacy/classes/local/request/userlist.php: call to pgsql_native_moodle_database->get_records_sql()
line 142 of /mod/pcast/classes/privacy/provider.php: call to core_privacy\local\request\userlist->add_from_sql()
line 8154 of /lib/moodlelib.php: call to mod_pcast\privacy\provider::get_users_in_context()
line 578 of /privacy/classes/manager.php: call to component_class_callback()
line 611 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
line 285 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
line 451 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->get_users_in_context()
line 388 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
line 1034 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->process_approved_deletions()
line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to tool_dataprivacy\expired_contexts_test->test_process_course_context_with_override_expired_role()
line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
line 122 of /vendor/bin/phpunit: call to include()
3) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_user_in_both_lists
Unexpected debugging() call detected.
Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g"
LINE 8: JOIN phpu_pcast p ON g.id = cm.instance
^
SELECT DISTINCT u.id
FROM phpu_user u
JOIN (SELECT ge.userid
FROM phpu_context c
JOIN phpu_course_modules cm ON cm.id = c.instanceid AND c.contextlevel = $1
JOIN phpu_modules m ON m.id = cm.module AND m.name = $2
JOIN phpu_pcast p ON g.id = cm.instance
JOIN phpu_pcast_episodes pe ON pe.pcastid = p.id
WHERE c.id = $3) target ON u.id = target.userid
[array (
0 => 70,
1 => 'pcast',
2 => 110001,
)])
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 341 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
line 1027 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 56 of /privacy/classes/local/request/userlist.php: call to pgsql_native_moodle_database->get_records_sql()
line 142 of /mod/pcast/classes/privacy/provider.php: call to core_privacy\local\request\userlist->add_from_sql()
line 8154 of /lib/moodlelib.php: call to mod_pcast\privacy\provider::get_users_in_context()
line 578 of /privacy/classes/manager.php: call to component_class_callback()
line 611 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
line 285 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
line 451 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->get_users_in_context()
line 388 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
line 1123 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->process_approved_deletions()
line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to tool_dataprivacy\expired_contexts_test->test_process_course_context_with_user_in_both_lists()
line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
line 122 of /vendor/bin/phpunit: call to include()
4) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_user_in_both_lists_expired
Unexpected debugging() call detected.
Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g"
LINE 8: JOIN phpu_pcast p ON g.id = cm.instance
^
SELECT DISTINCT u.id
FROM phpu_user u
JOIN (SELECT ge.userid
FROM phpu_context c
JOIN phpu_course_modules cm ON cm.id = c.instanceid AND c.contextlevel = $1
JOIN phpu_modules m ON m.id = cm.module AND m.name = $2
JOIN phpu_pcast p ON g.id = cm.instance
JOIN phpu_pcast_episodes pe ON pe.pcastid = p.id
WHERE c.id = $3) target ON u.id = target.userid
[array (
0 => 70,
1 => 'pcast',
2 => 110001,
)])
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 341 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
line 1027 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 56 of /privacy/classes/local/request/userlist.php: call to pgsql_native_moodle_database->get_records_sql()
line 142 of /mod/pcast/classes/privacy/provider.php: call to core_privacy\local\request\userlist->add_from_sql()
line 8154 of /lib/moodlelib.php: call to mod_pcast\privacy\provider::get_users_in_context()
line 578 of /privacy/classes/manager.php: call to component_class_callback()
line 611 of /privacy/classes/manager.php: call to core_privacy\manager::component_class_callback()
line 285 of /privacy/classes/manager.php: call to core_privacy\manager->handled_component_class_callback()
line 451 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to core_privacy\manager->get_users_in_context()
line 388 of /admin/tool/dataprivacy/classes/expired_contexts_manager.php: call to tool_dataprivacy\expired_contexts_manager->delete_expired_context()
line 1219 of /admin/tool/dataprivacy/tests/expired_contexts_test.php: call to tool_dataprivacy\expired_contexts_manager->process_approved_deletions()
line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to tool_dataprivacy\expired_contexts_test->test_process_course_context_with_user_in_both_lists_expired()
line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestCase->runTest()
line 80 of /lib/phpunit/classes/advanced_testcase.php: call to PHPUnit\Framework\TestCase->runBare()
line 728 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
line 904 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
line 653 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
line 144 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->run()
line 97 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
line 98 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
line 122 of /vendor/bin/phpunit: call to include()
SQL queries coming back with errors in provider.php. Changing ge.userid to pe.userid and g.id to p.id fixes these errors.
There were 4 errors:
1) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_override_unexpired_role Unexpected debugging() call detected. Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g" LINE 8: JOIN phpu_pcast p ON g.id = cm.instance ^
[array ( 0 => 70, 1 => 'pcast', 2 => 110001, )])
/var/www/stfx-main-campus/lib/phpunit/classes/advanced_testcase.php:88
2) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_override_expired_role Unexpected debugging() call detected. Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g" LINE 8: JOIN phpu_pcast p ON g.id = cm.instance ^
[array ( 0 => 70, 1 => 'pcast', 2 => 110001, )])
/var/www/stfx-main-campus/lib/phpunit/classes/advanced_testcase.php:88
3) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_user_in_both_lists Unexpected debugging() call detected. Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g" LINE 8: JOIN phpu_pcast p ON g.id = cm.instance ^
[array ( 0 => 70, 1 => 'pcast', 2 => 110001, )])
/var/www/stfx-main-campus/lib/phpunit/classes/advanced_testcase.php:88
4) tool_dataprivacy\expired_contexts_test::test_process_course_context_with_user_in_both_lists_expired Unexpected debugging() call detected. Debugging: Error reading from database (ERROR: missing FROM-clause entry for table "g" LINE 8: JOIN phpu_pcast p ON g.id = cm.instance ^
[array ( 0 => 70, 1 => 'pcast', 2 => 110001, )])
/var/www/stfx-main-campus/lib/phpunit/classes/advanced_testcase.php:88