cursiveinc / moodle-tinymce_cursive

The Cursive plugin for Moodle extends TinyMCE to create a new layer of data (key event logs) which can be used in many ways (feedback, scoring, authentication) and can be connected to Cursive's ML server.
Other
2 stars 4 forks source link

Plugin cannot be properly installed in Moodle 4.1 # #65

Open sumaiyamannan opened 1 week ago

sumaiyamannan commented 1 week ago

Hi,

The issue I had reported earlier was closed too early. It is still failing. It now gives the below error

plugin branch: moodle-4.1 PHP 7.4 Postgres 12

Default exception handler: Invalid user Debug: 
Error code: invaliduser
* line 556 of /lib/classes/user.php: moodle_exception thrown
* line 1056 of /lib/externallib.php: call to core_user::require_active_user()
* line 74 of /lib/editor/tiny/plugins/cursive/db/install.php: call to external_generate_token_for_current_user()
* line 37 of /lib/editor/tiny/plugins/cursive/db/install.php: call to create_token_for_user()
* line 767 of /lib/upgradelib.php: call to xmldb_tiny_cursive_install()
* line 1953 of /lib/upgradelib.php: call to upgrade_plugins()
* line 202 of /admin/cli/upgrade.php: call to upgrade_noncore()

!!! Invalid user !!!
!! 
Error code: invaliduser !!
!! Stack trace: * line 556 of /lib/classes/user.php: moodle_exception thrown
* line 1056 of /lib/externallib.php: call to core_user::require_active_user()
* line 74 of /lib/editor/tiny/plugins/cursive/db/install.php: call to external_generate_token_for_current_user()
* line 37 of /lib/editor/tiny/plugins/cursive/db/install.php: call to create_token_for_user()
* line 767 of /lib/upgradelib.php: call to xmldb_tiny_cursive_install()
* line 1953 of /lib/upgradelib.php: call to upgrade_plugins()
* line 202 of /admin/cli/upgrade.php: call to upgrade_noncore()
nawazsharif commented 19 hours ago

@sumaiyamannan The issue has been resolved. https://github.com/cursiveinc/moodle-tinymce_cursive/tree/MOODLE_401_STABLE

sumaiyamannan commented 3 hours ago

@nawazsharif It is installing but failing phpunit tests same like in the 4.5 branch

There was 1 error:
1) tool_uploadcourse\course_test::test_reset
Unexpected debugging() call detected.
Debugging: Exception encountered in event observer '\tiny_cursive\observers::reset_tracking_data': Error reading from database (ERROR:  value "160000" is out of range for type smallint
SELECT id, filename FROM phpu_tiny_cursive_files WHERE courseid = $1 
[array (
  0 => '160000',
)])
* 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 1508 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
* line 1459 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select()
* line 200 of /lib/editor/tiny/plugins/cursive/classes/observers.php: call to moodle_database->get_records()
* line ? of unknownfile: call to tiny_cursive\observers::reset_tracking_data()
* 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 835 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
* line 5721 of /lib/moodlelib.php: call to core\event\base->trigger()
* line 1209 of /admin/tool/uploadcourse/classes/course.php: call to reset_course_userdata()
* line 903 of /admin/tool/uploadcourse/classes/course.php: call to tool_uploadcourse_course->reset()
* line 1073 of /admin/tool/uploadcourse/tests/course_test.php: call to tool_uploadcourse_course->proceed()
* line 1548 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to tool_uploadcourse\course_test->test_reset()
* 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 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 675 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->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 97 of phpvfscomposer:///vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()
* line 118 of /vendor/bin/phpunit: call to include()

Can you please fix and test that the unittests are passing at your end? Thank you Sumaiya