Code Monkey home page Code Monkey logo

moodle-filter_wiris's People

Contributors

carla-at-wiris avatar dagobertorobayorodriguez avatar danowar2k avatar dcanet-at-wiris avatar diegowiris avatar hqiu-at-wiris avatar icaparros-at-wiris avatar jgonzalez-at-wiris avatar mcagigas-at-wiris avatar ptorrent-at-wiris avatar usantos-at-wiris avatar xripoll-at-wiris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-filter_wiris's Issues

And I press "Toggle" Behat Step failing in Tiny_wiris

While adding Tiny_wiris i found a problem with the Behat automated tests from lib/editor/tiny/plugins/wiris/tests/behat
Specially in the step
And I press "Toggle" in "FIELDNAME" field in TinyMCE 6 editor

For example in edit_formula.feature, see:

Scenario: Create a formulas                                               # /builds/moodle/lib/editor/tiny/plugins/wiris/tests/behat/edit_formula.feature:17
And I press "Toggle" in "General description" field in TinyMCE 6 editor  # /builds/moodle/lib/editor/tiny/plugins/wiris/tests/behat/edit_formula.feature:24
"Toggle" button not found in "General description" field

This caused by a string change here in filter_wiris, see fix: Test for Moodle 4.4 compatibility
The string changed from "More..." to "Reveal or hide additional toolbar items", but i don't see it added in any language File, so the Toggle button it's actually showing "More..." text.

So changing "Reveal or hide additional toolbar items" back to "More..." fix the issue, here in behat_wiris_page.php
"Toggle" => "More..."

Can you fix those Behat steps? Thanks in advice

Latest release does not work in IE11

Testing in IE 11.576.14393.0
Tested both Atto and Tinymce using the latest plugins of Wiris 4.1.0.1357
Running Moodle 3.1.3+

Can't move equation from Wiris popup to Moodle editor.
When viewing previously saved equations, the filter is not processing inside the editor.

Undefined variable: carry

La versió nova del filtre de wiris té el warning següent (perquè fa referència a una variable que no està declarada enlloc):

Notice: Undefined variable: carry in /dades/agora/html/moodle2/filter/wiris/lib.php on line 125

Wiris doesn't change safeXml content back to normal XML on Solaris because of using non-Multibyte stripos function

Hello,

Wiris filters the input by checking for unicode char « in the string. stripos is used, which is non-multibyte. Which doesn't matter on many Linux systems. stripos makes lower case chars out of the haystack, but just ignores the Multibyte chars (doesn't change them, not even to lower case versions).

But on Solaris, rather on PHP 7.1.x (PHP 5.6.x worked), when you have a string like this: "uPPerCase«math[...]", Solaris changes to lowercase and can't find the needle anymore.

Easy solution: Just search for multibyte needles using mb_stripos.

Pull request follows.

CSS overwrites moodle css

The new css file causes most text to be bold and all tables to have borders. Easily noticeable on the calendar block. The css should have more specific selectors.

FR: Move configuration.ini to moodledata or into the database

The current style to change some of the configuration of this plugin is to store it in the file https://github.com/wiris/moodle-filter_wiris/blob/stable/configuration.ini.dist (without the .dist suffix).

This is kind of the only Moodle plugin I know of that stores configuration data in the code folder. Could you please move that part of the configuration to either entries in the Moodle config_plugins table or to a Wiris folder inside moodledata?

Leaving the configuration in the code folder may lead to problems and additional steps during deployment of new plugin versions or to possibly ignoring the configuration because of the unusual storing point.

EDIT: The storing point is maybe something used for each and every Wiris plugin. If that is the case, changing the path for Wiris for Moodle only would of course not be feasible. But you could abstract away from the concrete configuration file, its path and how to read it, and then you could have a "general way" (as a file, in the plugin folder) and a Moodle plugin way (in the db or in moodledata as a file)

mdl4.1 syntax error

Parse error: syntax error, unexpected '$', expecting '|' or variable (T_VARIABLE) in ./filter/wiris/integration/lib/com/wiris/plugin/impl/RenderImplIntegratedServices.class.php on line 32
Errors parsing ./filter/wiris/integration/lib/com/wiris/plugin/impl/RenderImplIntegratedServices.class.php
xargs: php: exited with status 255; aborting

cheers

Not Install plugins in PHP 8.0

Install plugins in PHP 8.0.7
Press "Upgrade Moodle database now" shows:

uncaught exception: Too few arguments to function _hx_error_handler(), 4 passed and exactly 5 expected

in file: /www/moodle/filter/wiris/integration/lib/php/Boot.class.php line 253
#0 [internal function]: _hx_error_handler()
#1 /www/moodle/filter/wiris/integration/lib/php/Boot.class.php(876): file_put_contents()
#2 /www/moodle/filter/wiris/integration/lib/com/wiris/system/CallWrapper.class.php(44): require_once('...')
#3 /www/moodle/filter/wiris/classes/pluginwrapper.php(80): com_wiris_system_CallWrapper->init()
#4 /www/moodle/filter/wiris/classes/pluginwrapper.php(54): filter_wiris_pluginwrapper->init()
#5 /www/moodle/filter/wiris/settings.php(35): filter_wiris_pluginwrapper->__construct()
#6 /www/moodle/lib/classes/plugininfo/filter.php(88): include('...')
#7 /www/moodle/admin/settings/plugins.php(245): core\plugininfo\filter->load_settings()
#8 /www/moodle/lib/adminlib.php(8842): require('...')
#9 /www/moodle/admin/upgradesettings.php(22): admin_get_root()
#10 {main}

uncaught exception: Creation of dynamic property filter_wiris_pluginwrapper::$moodleConfig is deprecated (errno: 8192)

Moodle version: Moodle 4.2
PHP Version: 8.2.5
Plugin ID: filter_wiris
Plugin version: 8.2.6 (2023042400)

Problem
After upgrading the PHP on our server to version 8.2.5, the "Site administration" main page is unreachable, and also the at least the "Plugins overview" page. Instead of the page itself, we see the following message:

uncaught exception: Creation of dynamic property filter_wiris_pluginwrapper::$moodleConfig is deprecated (errno: 8192) in /var/www/html/moodle/filter/wiris/classes/pluginwrapper.php at line #85Creation of dynamic property filter_wiris_pluginwrapper::$moodleConfig is deprecated

in file: /var/www/html/moodle/filter/wiris/classes/pluginwrapper.php line 85
#0 /var/www/html/moodle/filter/wiris/classes/pluginwrapper.php(85): _hx_error_handler()
#1 /var/www/html/moodle/filter/wiris/classes/pluginwrapper.php(54): filter_wiris_pluginwrapper->init()
#2 /var/www/html/moodle/filter/wiris/settings.php(35): filter_wiris_pluginwrapper->__construct()
#3 /var/www/html/moodle/lib/classes/plugininfo/filter.php(138): include('...')
#4 /var/www/html/moodle/admin/settings/plugins.php(273): core\plugininfo\filter->load_settings()
#5 /var/www/html/moodle/lib/adminlib.php(8709): require('...')
#6 /var/www/html/moodle/admin/index.php(842): admin_get_root()
#7 {main}

Quiz preview broken when using Wiris Cloze

Quiz preview broken and showing wiris stacktrace.

  1. Create a course.
  2. Turn edit mode to On.
  3. Add a quiz.
  4. Go to the quiz and add question:
    Select WIRIS QUIZZES -Cloze Science
    name: my Wiris Q
    question text (copy and paste to editor): test123 {1:SA:=#m1100000000} {1:MCS:=#SG11#SG12~#SG13~#SG14}
    «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mo»§#8943;«/mo»«/math»
  5. Click "Decode and verify the question text" and save it.
  6. Click the Quiz tab.
  7. Click Preview quiz button.
  8. Do not do anything.
  9. Click the Questions tab
  10. Click the bottom "Add" > Select Description.
    name: description
    text: (copy and paste to editor): test123 {1:SA:=#m1100000000} {1:MCS:=#SG11#SG12~#SG13~#SG14}
    «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mo»§#8943;«/mo»«/math»
  11. Save changes.
  12. Click the "move" icon of the description you have just added and select "After page1".
  13. Click on the Quiz tab.
  14. Click Preview quiz

RESULT:
you will get the error below:

Exception - Undefined property: _hx_array::$a (errno: 2) in [dirroot]/filter/wiris/integration/lib/php/Lib.class.php at line #31

More information about this error
Debug info:
Error code: generalexceptionmessage
Stack trace:

    line 49 of /question/type/wq/quizzes/lib/com/wiris/quizzes/wrap/QuestionWrap.class.php: HException thrown
    line 264 of /question/type/shortanswerwiris/question.php: call to com_wiris_quizzes_wrap_QuestionWrap->getSlots()
    line 254 of /question/type/shortanswerwiris/question.php: call to qtype_shortanswerwiris_question->is_text_answer()
    line 322 of /question/type/shortanswerwiris/question.php: call to qtype_shortanswerwiris_question->format_answer()
    line 93 of /question/type/multianswerwiris/renderer.php: call to qtype_shortanswerwiris_question->get_correct_response()
    line 199 of /question/type/multianswerwiris/renderer.php: call to qtype_multianswerwiris_shortanswer_helper_question->get_correct_response()
    line 32 of /question/type/multianswerwiris/renderer.php: call to qtype_multianswerwiris_wirisanswerfield_renderer->subquestion()
    line 71 of /question/type/multianswer/renderer.php: call to qtype_multianswerwiris_helper_renderer->subquestion()
    line 30 of /question/type/wq/renderer.php: call to qtype_multianswer_renderer->formulation_and_controls()
    line 403 of /question/engine/renderer.php: call to qtype_wq_renderer->formulation_and_controls()
    line 108 of /question/engine/renderer.php: call to core_question_renderer->formulation()
    line 113 of /question/behaviour/behaviourbase.php: call to core_question_renderer->question()
    line 907 of /question/engine/questionattempt.php: call to question_behaviour->render()
    line 461 of /question/engine/questionusage.php: call to question_attempt->render()
    line 1783 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->render_question()
    line 1745 of /mod/quiz/attemptlib.php: call to quiz_attempt->render_question_helper()
    line 521 of /mod/quiz/renderer.php: call to quiz_attempt->render_question()
    line 459 of /mod/quiz/renderer.php: call to mod_quiz_renderer->attempt_form()
    line 139 of /mod/quiz/attempt.php: call to mod_quiz_renderer->attempt_page()

You will never be able to preview the quiz again.

Exception thrown on Quiz re-calculate statistics

'Learning Check #19' (138454) in course 2122W ES201-04 (88534) has most recent attempt finished at 23/02/22, 17:41:00 so re-calculating statistics for 18 attempts, start time 24/08/23, 13:51:43 ...
Exception - Call to a member function getMessage() on string

Error code: generalexceptionmessage

  • line 35 of /filter/wiris/integration/lib/com/wiris/plugin/impl/FolderTreeStorageAndCache.class.php: Error thrown
  • line 119 of /filter/wiris/integration/lib/com/wiris/plugin/impl/TextServiceImpl.class.php: call to com_wiris_plugin_impl_FolderTreeStorageAndCache->storeData()
  • line 70 of /filter/wiris/integration/lib/com/wiris/plugin/impl/TextServiceImpl.class.php: call to com_wiris_plugin_impl_TextServiceImpl->jsonResponse()
  • line 71 of /filter/wiris/integration/lib/com/wiris/plugin/impl/TextFilter.class.php: call to com_wiris_plugin_impl_TextServiceImpl->mathml2accessible()
  • line 188 of /filter/wiris/integration/lib/com/wiris/plugin/impl/TextFilter.class.php: call to com_wiris_plugin_impl_TextFilter->math2Img()
  • line 227 of /filter/wiris/integration/lib/com/wiris/plugin/impl/TextFilter.class.php: call to com_wiris_plugin_impl_TextFilter->filterMath()
  • line 21 of /filter/wiris/integration/lib/com/wiris/plugin/impl/TextServiceImpl.class.php: call to com_wiris_plugin_impl_TextFilter->filter()
  • line 84 of /filter/wiris/subfilters/php.php: call to com_wiris_plugin_impl_TextServiceImpl->filter()
  • line 62 of /filter/wiris/filter.php: call to filter_wiris_php->filter()
  • line 513 of /lib/filterlib.php: call to filter_wiris->filter()
  • line 188 of /lib/filterlib.php: call to moodle_text_filter->filter_stage_post_clean()
  • line 230 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
  • line 1360 of /lib/weblib.php: call to filter_manager->filter_text()
  • line 1058 of /question/engine/lib.php: call to format_text()
  • line 268 of /question/type/multichoice/questiontype.php: call to question_utils::to_plain_text()
  • line 87 of /question/classes/statistics/responses/analyser.php: call to qtype_multichoice->get_possible_responses()
  • line 746 of /mod/quiz/report/statistics/report.php: call to core_question\statistics\responses\analyser->__construct()
  • line 716 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->analyse_responses_for_questions()
  • line 669 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->analyse_responses_for_all_questions_and_subquestions()
  • line 945 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->get_all_stats_and_analysis()
  • line 108 of /mod/quiz/report/statistics/classes/task/recalculate.php: call to quiz_statistics_report->calculate_questions_stats_for_question_bank()
  • line 405 of /lib/classes/cron.php: call to quiz_statistics\task\recalculate->execute()
  • line 208 of /lib/classes/cron.php: call to core\cron::run_inner_scheduled_task()
  • line 125 of /lib/classes/cron.php: call to core\cron::run_scheduled_tasks()
  • line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()

Text file busy error

During a Moodle quiz, we experienced the follow message. Is this an issue with how the filter works, or is it a server configuration issue?

error

MathType filter by WIRIS - PHP 8.1 Error/Exception

Hi,

Moodle version: Moodle 4.1.1
PHP Version: 8.1.16
Plugin ID: filter_wiris
Plugin version: 8.0.1 (2022112300)

Problem
After upgrading the PHP on our server to version 8.1.16, the "Site administration" main page is unreachable, and also the at least the "Plugins overview" page. Instead of the page itself, we see the following message:

uncaught exception: strpos(): Passing null to parameter #3 ($offset) of type int is deprecated (errno: 8192) in *PATH*/moodle/filter/wiris/integration/lib/php/Boot.class.php at line #369strpos(): Passing null to parameter #3 ($offset) of type int is deprecated

in file: *PATH*/moodle/filter/wiris/integration/lib/php/Boot.class.php line 369
#0 [internal function]: _hx_error_handler()
#1 *PATH*/moodle/filter/wiris/integration/lib/php/Boot.class.php(369): strpos()
#2 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(118): _hx_index_of()
#3 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(108): com_wiris_system_Storage::isSystemFile()
#4 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(100): com_wiris_system_Storage::getCallerFile()
#5 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(95): com_wiris_system_Storage::setResourcesDir()
#6 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/system/Storage.class.php(83): com_wiris_system_Storage::getResourcesDir()
#7 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.class.php(8): com_wiris_system_Storage::newResourceStorage()
#8 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/ConfigurationImpl.class.php(152): com_wiris_plugin_impl_DefaultConfigurationUpdater->updateConfiguration()
#9 *PATH*/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/ConfigurationImpl.class.php(163): com_wiris_plugin_impl_ConfigurationImpl->initialize0()
#10 *PATH*/moodle/filter/wiris/classes/pluginwrapper.php(117): com_wiris_plugin_impl_ConfigurationImpl->getProperty()
#11 *PATH*/moodle/filter/wiris/settings.php(42): filter_wiris_pluginwrapper->was_editor_enabled()
#12 *PATH*/moodle/lib/classes/plugininfo/filter.php(133): include('...')
#13 *PATH*/moodle/admin/settings/plugins.php(268): core\plugininfo\filter->load_settings()
#14 *PATH*/moodle/lib/adminlib.php(8831): require('...')
#15 *PATH*/moodle/lib/classes/plugininfo/base.php(539): admin_get_root()
#16 *PATH*/moodle/admin/renderer.php(1850): core\plugininfo\base->get_settings_url()
#17 *PATH*/moodle/admin/renderer.php(351): core_admin_renderer->plugins_control_panel()
#18 *PATH*/moodle/admin/plugins.php(217): core_admin_renderer->plugin_management_page()
#19 {main}

"PATH", of course, is not the original text. We "blurred" the actual path in this bug report.

This bug is a serious issue that prevents us not only from using the plugin, but also impacts the general use of the system. Please fix this bug as soon as possible.

Moodle 4.1 supports PHP 8.1 officially, to the best of our knowledge, so if the plugin supports Moodle 4.1 officially, and it does, it should also be able to work correctly in a PHP 8.1 environment.

Thanks

Wiris filter attempts explicit path load of configurationjs.php, prevents TinyMCE editor from loading

Moodle: 3.9
Wiris: 7.26.0 2021050600

We have updated to Moodle 3.9 and Wiris 7.26.0 and have discovered that the TinyMCE editor no longer loads. We've discovered that Moodle is trying to fetch the file /filter/wiris/integration/configurationjs.php (with an explicit /filter/wiris/... path) which doesn't work on our instance as our Moodle is in a sub-directory.

The browser loads these files and other TinyMCE files fine,
/moodle3/lib/editor/tinymce/tiny_mce/3.5.11/tiny_mce.js
/moodle3/lib/editor/tinymce/tiny_mce/3.5.11/plugins/visualchars/editor_plugin.js

If I deliberately copy configurationjs.php onto the webserver into a directory were it is accessible as /filter/wiris/integration/configurationjs.php then the TinyMCE editor loads correctly.

I think Wiris' TinyMCE plugin contains an explicit path to /filter/wiris instead of filter/wiris

Issue trying to save a quizz with WIRIS answers

Hi,

We have a moddle installation with the WIRIS plugin integrated. When we are resolving a quizz, the WIRIS editor is working properly in the quizz editor, but when we try to save the response (processattempt) we're getting the following error:

Unknown driver native/mysql

Needless to say that this is a moodle already in production and that all other plugins are working and therefore getting the database driver / properties properly, so in this case this is the only plugin showing up this error. All the responses I could find to this scenario talks about a global issue vs a particular one.

Sorry for not providing more details, I'm not the administrator of the platform but trying to find a lead to help them figure out the issue so we can use this amazing plugin. Is there anything that you think may be affecting the DBconfig only for the WIRIS plugin?

Thank you!

missing $string['privacy:metadata']

Got this when running vendor/bin/phpunit "provider_testcase" privacy/tests/provider_test.php

1) provider_testcase::test_null_provider with data set "filter_wiris" ('filter_wiris', 'filter_wiris\privacy\provider')
Expectation failed, debugging() was triggered.
Debugging: Invalid get_string() identifier: 'privacy:metadata' or component 'filter_wiris'. Perhaps you are missing $string['privacy:metadata'] = ''; in /siteroot/filter/wiris/lang/en/filter_wiris.php?
* line 353 of /lib/classes/string_manager_standard.php: call to debugging()
* line 7410 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
* line 90 of /privacy/tests/provider_test.php: call to get_string()
* line 1154 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to provider_testcase->test_null_provider()
* line 842 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 693 of /vendor/phpunit/phpunit/src/Framework/TestResult.php: call to advanced_testcase->runBare()
* line 796 of /vendor/phpunit/phpunit/src/Framework/TestCase.php: call to PHPUnit\Framework\TestResult->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestCase->run()
* line 746 of /vendor/phpunit/phpunit/src/Framework/TestSuite.php: call to PHPUnit\Framework\TestSuite->run()
* line 652 of /vendor/phpunit/phpunit/src/TextUI/TestRunner.php: call to PHPUnit\Framework\TestSuite->run()
* line 206 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\TestRunner->doRun()
* line 162 of /vendor/phpunit/phpunit/src/TextUI/Command.php: call to PHPUnit\TextUI\Command->run()
* line 61 of /vendor/phpunit/phpunit/phpunit: call to PHPUnit\TextUI\Command::main()

Failed asserting that 1 matches expected 0.

/siteroot/lib/phpunit/classes/advanced_testcase.php:367
/siteroot/privacy/tests/provider_test.php:91
/siteroot/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
 vendor/bin/phpunit "provider_testcase" privacy/tests/provider_test.php

Will send a PR soon

EN_US

We are having an issue when using English US as the default language for Moodle. It breaks the buttons in the atto editor. We get a 404 error in the browser for the language string. Editor/atto/plugins/wiris/lang/en_us is missing. I copied the en folder and made it en_us and the editor started working again.

not UTF8 files and strange characters

hi,
in integration/lib, a lot of files aren't in UTF8, and have strange characters.
Exemple in integration/lib/Hash.class.php:
line 14:

$»it = $it;
while($»it->hasNext()) {

line 57: else if(isset($this->»dynamics[$m]) && is_callable($this->»dynamics[$m]))

Is it correct ?

"Not equal to" symbol displaying as a hyphen in demos on IE edge

I've noticed that the "not equal to" symbol is displaying as a hyphen, but only in IE edge. See the PHP integration demo here for example: http://www.wiris.com/plugins/demo/tinymce4/php/.

To reproduce, in IE edge click the "Insert special characters" button, then search for "8800" or select the "not equal to" characer. It shows correctly in the editor, however, once you click "Ok" the symbol shows up as a hyphen (see below):

Screen Shot 2019-12-03 at 11 18 32 AM

This happens with any of the integration demos and only in IE edge. I'm assuming it has to do with this specific package, but I could be wrong.

Any idea what is causing this?

Manage MathType Web Integration configuration data dinamically using Moodle's Admin settings UI

Manage MathType Web Integration configuration data dinamically using Moodle's Admin settings UI

We want to allow users to manage the MathType Web Integration configuration settings data dinamically using Moodle's Admin settings UI and store them using a Moodle's complaing solution.

We've defined these next user stories:

01: Manage settings dinamically

As a Moodle Administrator,
I want to manage the configuration settings from the MathType Web Integration library,
that is a third-party dependency of the plugin,
using the regular Moodle's Admin UI,
so I don't need to manage them using a static file on the plugin's root folder.

02: Upgrading the plugin

As a Moodle Administrator
when upgrading to the latest version of this plugin,
of an instance using the filter/wiris/configuration.ini file method,
I want an automatic upgrade path to keep things consistent, and
be informed of any important information.

Issue definition

This plugin stores some of its configuration's settings data in the plugin's root folder, using a static file named configuration.ini.dist.

The configuration.ini.dist is part of the "MathType Web Integration PHP" library filter that allows Moodle to access the render services provided by the Wiris API.

For more details, visit MathType Configuration table docs page and thirdpartylibs.xml.

Analysis

Using a static file to store configuration's settings data is bad since:

  • It may lead to problems and additional steps during deployment of new plugin versions or to possibly ignoring the configuration because of the unusual storing point.
  • The configuration file can be potentially be removed when upgrading this plugin's code on the Moodle instance.
  • It's not a Moodle plugin development good practice.

Motivation

The reasons to keep this file on the Moodle's root folder are:

  • Compatibility with other PHP platforms where the MathType Web Integrations PHP library is used.
  • Software maintanability: the same strategy is used for other back-end platforms like .Net, Java or Rails.
  • Historical reasons: this library is being used for more than a decade now, so any solution we may come with should aim for complete backward compatibility.
  • Therefore, It would require a new feature request to specify which problem needs to be solved and a proposed solution.

Feature request specification

We want to expose this configuration settings using Moodle's Admin settings UI and store them on a more Moodle's native way like config_plugins tables or the Moodledata directory.

In other words, the plugin's configuration settings data should be stored dinamically.

The plugin will expose "MathType Web Integration PHP" library configuration settings using Moodle's Admin settings UI, instead of the configuration.ini.dist configuration file.

Admin users will be able to manage the MathType Web Integration Library Server configuration file (configuration.ini) settings using Moodle's UI.

The configuration settings data will be stored using Moodle plugins development best practices. Like config_plugins tables, the Moodledata directory.

At the same time, we want to offer backward compatibility with Moodle installations using the current configuration.ini.dist method.

Therefore, the solution proposed must also include an upgrade path when updating to this version of the plugin.

So it would need to be decided what to do if the /configuration.ini.dist file already exists on a Moodle's instance.

Other details

  • The original motivation of this feature request is @danowar2k 's reported issue: #79.

Issue with Wiris filter and Moodle 4.2

When testing the upgrade to Moodle 4.2 I run into a serious issue with the Wiris Filter plugin :

uncaught exception: require_once(/var/www/html/lib/editor/tinymce/lib.php): Failed to open stream: No such file or directory (errno: 2) in /var/www/html/filter/wiris/classes/pluginwrapper.php at line #160require_once(/var/www/html/lib/editor/tinymce/lib.php): Failed to open stream: No such file or directory

in file: /var/www/html/filter/wiris/classes/pluginwrapper.php line 160
#0 /var/www/html/filter/wiris/classes/pluginwrapper.php(160): _hx_error_handler()
#1 /var/www/html/filter/wiris/classes/pluginwrapper.php(160): require_once()
#2 /var/www/html/filter/wiris/classes/configurationupdater.php(51): filter_wiris_pluginwrapper::get_wiris_plugin()
#3 /var/www/html/filter/wiris/classes/pluginwrapper.php(85): filter_wiris_configurationupdater->__construct()
#4 /var/www/html/filter/wiris/classes/pluginwrapper.php(54): filter_wiris_pluginwrapper->init()
#5 /var/www/html/filter/wiris/settings.php(35): filter_wiris_pluginwrapper->__construct()
#6 /var/www/html/lib/classes/plugininfo/filter.php(138): include('...')
#7 /var/www/html/admin/settings/plugins.php(273): core\plugininfo\filter->load_settings()
#8 /var/www/html/lib/adminlib.php(8709): require('...')
#9 /var/www/html/admin/upgradesettings.php(22): admin_get_root()
#10 {main}

This makes the Admin panel inusable.

I guess it might have something to do with the legacy MCE editor which was removed in Moodle 4.2. lib/editor/tinymce is no longer present in 4.2, only lib/editor/tiny.

Unit test failure - test_filter_safexml_with_performance_svg

This just started happening and was passing before with the exact same code. I think it's reaching out to talk to an external service?

  1. filter_wiris_filter_performance_svg_testcase::test_filter_safexml_with_performance_svg
    Failed asserting that false is true.

/var/www/site/filter/wiris/tests/filter_performance_svg_test.php:84
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "filter_wiris_filter_performance_svg_testcase" filter/wiris/tests/filter_performance_svg_test.php

Update error "Index filter_wiris_formulas->md5 does not exist"

Hi,

i got an error during updating Wiris Version 2017040600 (4.2.0.1364) to 2019071200 (7.15.0) with Moodle Version: 3.2.7 (Build: 20180115)

Error:
Debug info: Index filter_wiris_formulas->md5 does not exist. Drop skipped Error code: ddlunknownerror Stack trace: • line 857 of /lib/ddl/database_manager.php: ddl_exception thrown • line 96 of /filter/wiris/db/upgrade.php: call to database_manager->drop_index() • line 558 of /lib/upgradelib.php: call to xmldb_filter_wiris_upgrade() • line 1748 of /lib/upgradelib.php: call to upgrade_plugins() • line 693 of /admin/index.php: call to upgrade_noncore()

Commenting out line 96 from upgrade.php
--> //$dbman->drop_index($table, $index);
fixes the error for me.

uncaught exception: Call to undefined function uuid_make()in file: lib/setuplib.php line 618

Hi,

This error occured when I tried to start a quiz or when I tried to update plugins:

uncaught exception: Call to undefined function uuid_make()in file: /home/maicolml/public_html/quiz/lib/setuplib.php line 618

Now I have commented these lines of the setuplib.php file and it works:

if (function_exists("uuid_create")) { $context = null; uuid_create($context);  uuid_make($context, UUID_MAKE_V4); uuid_export($context, UUID_FMT_STR, $uuid); } else { 

Please delete them otherwise users that will install WIRIS plugin will affect this issue...

Steps to test this:

  • Install WIRIS plugin
  • Make a quiz with WIRIS plugin
  • Try to start the quiz or update a plugin

Wiris-filter disables filepicker on IE11

Hello,

If I have filter_wiris 7.12.0.1412 (2019040800) enabled on a course on Moodle 3.5.5 I cannot add any files to f.ex. assignment additional files field or Course summary files with Internet Explorer 11, it just loads forever.

So the wiris filter disables filepicker in certain fields with IE11. Seems like a pretty bad bug. @manuelwiris

With another browser like Chrome filepicker works wiris filter enabled on a course.

"Passing glue string after array is deprecated" - error under PHP 7.4

In PHP 7.4, the ability to pass the glue string after the array has been deprecated for the implode function and its join alias.

In the filter/wiris/integration/lib/php/Boot.class.php file, there are two occurrences of the join functions on lines 834 and 840 are two occurrences of this function with the incorrect parameter order which results in the script crashing.

I have not checked other files for use of the join function.

Array and string offset deprecated on PHP 7.4

When testing on a machine with PHP 7.4.3 I receive the message:

Array and string offset access syntax with curly braces is deprecated in /data/mdl38/www/filter/wiris/integration/lib/php/Boot.class.php on line 221

stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known

I am getting the following error on a quiz page that uses WIRIS with ATTO

uncaught exception: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known (errno: 2) in /var/www/moodle/filter/wiris/integration/lib/sys/net/Socket.class.php at line #76

in file: /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php line 61
#0 /var/www/moodle/filter/wiris/integration/lib/php/Boot.class.php(769): com_wiris_plugin_impl_HttpImpl_0(Object(com_wiris_plugin_impl_HttpImpl), NULL, 'http://www.wiri...', 'stream_socket_c...')
#1 /var/www/moodle/filter/wiris/integration/lib/haxe/Http.class.php(532): _hx_lambda->execute('stream_socket_c...')
#2 /var/www/moodle/filter/wiris/integration/lib/php/Boot.class.php(769): haxe_Http_5(true, Object(com_wiris_plugin_impl_HttpImpl), Object(com_wiris_plugin_impl_HttpImpl), Array, Object(haxe_io_BytesOutput), true, 'stream_socket_c...')
#3 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(27): _hx_lambda->execute('stream_socket_c...')
#4 /var/www/moodle/filter/wiris/integration/lib/haxe/Http.class.php(444): com_wiris_plugin_impl_HttpImpl->onError('stream_socket_c...')
#5 /var/www/moodle/filter/wiris/integration/lib/haxe/Http.class.php(458): haxe_Http->customRequest(true, Object(haxe_io_BytesOutput), Object(sys_net_Socket), NULL)
#6 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(40): haxe_Http->request(true)
#7 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(252): com_wiris_plugin_impl_HttpImpl->request(true)
#8 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/TextFilter.class.php(58): com_wiris_plugin_impl_RenderImpl->showImage('17b181be2d99c11...', 'filterMath(Object(com_wiris_plugin_impl_TextFilterTags), '

<...', Array, true)
#11 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/TextServiceImpl.class.php(9): com_wiris_plugin_impl_TextFilter->filter('

<...', Array)
#12 /var/www/moodle/filter/wiris/filter.php(113): com_wiris_plugin_impl_TextServiceImpl->filter('

<...', Array)
#13 /var/www/moodle/lib/filterlib.php(176): filter_wiris->filter('

<...', Array)
#14 /var/www/moodle/lib/filterlib.php(218): filter_manager->apply_filter_chain('

<...', Array, Array, NULL)
#15 /var/www/moodle/lib/weblib.php(1282): filter_manager->filter_text('

<...', Object(context_module), Array)
#16 /var/www/moodle/question/type/questionbase.php(364): format_text('

<...', '1', Array)
#17 /var/www/moodle/question/type/questionbase.php(387): question_definition->format_text('

<...', '1', Object(question_attempt), 'question', 'generalfeedback', '201107')
#18 /var/www/moodle/question/type/rendererbase.php(177): question_definition->format_generalfeedback(Object(question_attempt))
#19 /var/www/moodle/question/type/rendererbase.php(120): qtype_renderer->general_feedback(Object(question_attempt))
#20 /var/www/moodle/question/engine/renderer.php(411): qtype_renderer->feedback(Object(question_attempt), Object(mod_quiz_display_options))
#21 /var/www/moodle/question/engine/renderer.php(113): core_question_renderer->outcome(Object(question_attempt), Object(qbehaviour_interactive_renderer), Object(qtype_numerical_renderer), Object(mod_quiz_display_options))
#22 /var/www/moodle/question/behaviour/behaviourbase.php(113): core_question_renderer->question(Object(question_attempt), Object(qbehaviour_interactive_renderer), Object(qtype_numerical_renderer), Object(mod_quiz_display_options), 2)
#23 /var/www/moodle/question/engine/questionattempt.php(829): question_behaviour->render(Object(mod_quiz_display_options), 2, Object(core_question_renderer), Object(qtype_numerical_renderer))
#24 /var/www/moodle/question/engine/questionusage.php(449): question_attempt->render(Object(mod_quiz_display_options), 2)
#25 /var/www/moodle/mod/quiz/attemptlib.php(1537): question_usage_by_activity->render_question('2', Object(mod_quiz_display_options), 2)
#26 /var/www/moodle/mod/quiz/attemptlib.php(1500): quiz_attempt->render_question_helper('2', true, Object(moodle_url), Object(theme_remui\output\mod_quiz_renderer), NULL)
#27 /var/www/moodle/mod/quiz/renderer.php(187): quiz_attempt->render_question('2', true, Object(theme_remui\output\mod_quiz_renderer), Object(moodle_url))
#28 /var/www/moodle/mod/quiz/renderer.php(56): mod_quiz_renderer->questions(Object(quiz_attempt), true, Array, 0, true, Object(mod_quiz_display_options))
#29 /var/www/moodle/mod/quiz/review.php(259): mod_quiz_renderer->review_page(Object(quiz_attempt), Array, 0, true, true, Object(mod_quiz_display_options), Array)
#30 {main}

Script source issue

Hello. Using Moodle 3.9 and Wiris Filter 7.24. Until yesterday, everything was fine. No change was maded and today equation editor is not loading. In console I've noticed that:


15:24:05.530 GEThttps://www.wiris.net//demo/editor/editor?lang=en&stats-editor=unknown&stats-mode=safeXml&stats-version=7.23.0
[HTTP/2 403 Forbidden 716ms]

There is double slash after domain name. But in settings all is correct:
Service path is set to /demo/editor/render

I've tried to remove first slash in setting but that do not solve the issue.

Thank you.

french quotqtion marks (« ») replaced by < >

Hi,
since 4.9.0.1380 (or maybe before), in Atto editor, french quotation marks (« ») replaced by < >when we save, or just when we switch view with the HTML button.
We have updated plugin to 4.11.0.1383, and problem is still present.
When we remove wiris button (row "math = wiris" in "editor_atto | toolbar" parameter), we don't have problem anymore.

Upload filepicker error when atto_collapse showgroups is set to display MathType and/or ChemType

Hi,
We have a bug in a upload filepicker when atto_collapse showgroups is set to display MathType and ChemType button.

To reproduce our error:

  • Go to Plugins -> Text editors -> Atto HTML Editor -> Collapse toolbar settings and set showgroups to 11 or 12.
  • Go to an existing forum post, and reply (for example). And the upload filepicker shows the following error:
    Uncaught TypeError: t is undefined yui_combo.php:14:4457 _setVisibility https://yoursite.com/theme/yui_combo.php?3.17.2/querystring-stringify/querystring-stringify-min.js&m/1603783230/editor_atto/editor/editor-min.js&m/1603783230/editor_atto/menu/menu-min.js&m/1603783230/editor_atto/plugin/plugin-min.js&m/1603783230/atto_collapse/button/button-min.js&m/1603783230/atto_title/button/button-min.js&m/1603783230/atto_bold/button/button-min.js&m/1603783230/atto_italic/button/button-min.js&m/1603783230/atto_unorderedlist/button/button-min.js&m/1603783230/atto_orderedlist/button/button-min.js&m/1603783230/atto_indent/button/button-min.js&m/1603783230/atto_link/button/button-min.js&m/1603783230/atto_emojipicker/button/button-min.js&m/1603783230/atto_image/button/button-min.js&m/1603783230/atto_media/button/button-min.js&m/1603783230/atto_recordrtc/button/button-min.js&m/1603783230/atto_recordrtc/recording/recording-min.js&m/1603783230/atto_managefiles/button/button-min.js&m/1603783230/atto_h5p/button/button-min.js&m/1603783230/atto_underline/button/button-min.js:14 _addButtons https://yoursite.com/theme/yui_combo.php?m/1603783230/atto_strike/button/button-min.js&m/1603783230/atto_subscript/button/button-min.js&m/1603783230/atto_superscript/button/button-min.js&m/1603783230/atto_align/button/button-min.js&3.17.2/arraylist/arraylist-min.js&3.17.2/widget-parent/widget-parent-min.js&3.17.2/widget-child/widget-child-min.js&3.17.2/tabview-base/tabview-base-min.js&3.17.2/node-focusmanager/node-focusmanager-min.js&3.17.2/tabview/tabview-min.js&3.17.2/array-extras/array-extras-min.js&m/1603783230/atto_equation/button/button-min.js&m/1603783230/atto_charmap/button/button-min.js&m/1603783230/atto_table/button/button-min.js&m/1603783230/atto_clear/button/button-min.js&m/1603783230/atto_undo/button/button-min.js&m/1603783230/atto_accessibilitychecker/button/button-min.js&m/1603783230/atto_accessibilityhelper/button/button-min.js&m/1603783230/atto_wiris/button/button-min.js&3.17.2/promise/promise-min.js&m/1603783230/atto_html/beautify/beautify-min.js:63 initializer https://yoursite.com/theme/yui_combo.php?m/1603783230/atto_strike/button/button-min.js&m/1603783230/atto_subscript/button/button-min.js&m/1603783230/atto_superscript/button/button-min.js&m/1603783230/atto_align/button/button-min.js&3.17.2/arraylist/arraylist-min.js&3.17.2/widget-parent/widget-parent-min.js&3.17.2/widget-child/widget-child-min.js&3.17.2/tabview-base/tabview-base-min.js&3.17.2/node-focusmanager/node-focusmanager-min.js&3.17.2/tabview/tabview-min.js&3.17.2/array-extras/array-extras-min.js&m/1603783230/atto_equation/button/button-min.js&m/1603783230/atto_charmap/button/button-min.js&m/1603783230/atto_table/button/button-min.js&m/1603783230/atto_clear/button/button-min.js&m/1603783230/atto_undo/button/button-min.js&m/1603783230/atto_accessibilitychecker/button/button-min.js&m/1603783230/atto_accessibilityhelper/button/button-min.js&m/1603783230/atto_wiris/button/button-min.js&3.17.2/promise/promise-min.js&m/1603783230/atto_html/beautify/beautify-min.js:63 _initHierarchy https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 _baseInit https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 init https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:311 _initBase https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 v https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 o https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:319 e https://yoursite.com/theme/yui_combo.php?3.17.2/querystring-stringify/querystring-stringify-min.js&m/1603783230/editor_atto/editor/editor-min.js&m/1603783230/editor_atto/menu/menu-min.js&m/1603783230/editor_atto/plugin/plugin-min.js&m/1603783230/atto_collapse/button/button-min.js&m/1603783230/atto_title/button/button-min.js&m/1603783230/atto_bold/button/button-min.js&m/1603783230/atto_italic/button/button-min.js&m/1603783230/atto_unorderedlist/button/button-min.js&m/1603783230/atto_orderedlist/button/button-min.js&m/1603783230/atto_indent/button/button-min.js&m/1603783230/atto_link/button/button-min.js&m/1603783230/atto_emojipicker/button/button-min.js&m/1603783230/atto_image/button/button-min.js&m/1603783230/atto_media/button/button-min.js&m/1603783230/atto_recordrtc/button/button-min.js&m/1603783230/atto_recordrtc/recording/recording-min.js&m/1603783230/atto_managefiles/button/button-min.js&m/1603783230/atto_h5p/button/button-min.js&m/1603783230/atto_underline/button/button-min.js:13 n https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:335 setupPlugins https://yoursite.com/theme/yui_combo.php?3.17.2/querystring-stringify/querystring-stringify-min.js&m/1603783230/editor_atto/editor/editor-min.js&m/1603783230/editor_atto/menu/menu-min.js&m/1603783230/editor_atto/plugin/plugin-min.js&m/1603783230/atto_collapse/button/button-min.js&m/1603783230/atto_title/button/button-min.js&m/1603783230/atto_bold/button/button-min.js&m/1603783230/atto_italic/button/button-min.js&m/1603783230/atto_unorderedlist/button/button-min.js&m/1603783230/atto_orderedlist/button/button-min.js&m/1603783230/atto_indent/button/button-min.js&m/1603783230/atto_link/button/button-min.js&m/1603783230/atto_emojipicker/button/button-min.js&m/1603783230/atto_image/button/button-min.js&m/1603783230/atto_media/button/button-min.js&m/1603783230/atto_recordrtc/button/button-min.js&m/1603783230/atto_recordrtc/recording/recording-min.js&m/1603783230/atto_managefiles/button/button-min.js&m/1603783230/atto_h5p/button/button-min.js&m/1603783230/atto_underline/button/button-min.js:9 initializer https://yoursite.com/theme/yui_combo.php?3.17.2/querystring-stringify/querystring-stringify-min.js&m/1603783230/editor_atto/editor/editor-min.js&m/1603783230/editor_atto/menu/menu-min.js&m/1603783230/editor_atto/plugin/plugin-min.js&m/1603783230/atto_collapse/button/button-min.js&m/1603783230/atto_title/button/button-min.js&m/1603783230/atto_bold/button/button-min.js&m/1603783230/atto_italic/button/button-min.js&m/1603783230/atto_unorderedlist/button/button-min.js&m/1603783230/atto_orderedlist/button/button-min.js&m/1603783230/atto_indent/button/button-min.js&m/1603783230/atto_link/button/button-min.js&m/1603783230/atto_emojipicker/button/button-min.js&m/1603783230/atto_image/button/button-min.js&m/1603783230/atto_media/button/button-min.js&m/1603783230/atto_recordrtc/button/button-min.js&m/1603783230/atto_recordrtc/recording/recording-min.js&m/1603783230/atto_managefiles/button/button-min.js&m/1603783230/atto_h5p/button/button-min.js&m/1603783230/atto_underline/button/button-min.js:9 _initHierarchy https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 _baseInit https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 init https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:311 _initBase https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 v https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279 o https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:319 e https://yoursite.com/theme/yui_combo.php?3.17.2/querystring-stringify/querystring-stringify-min.js&m/1603783230/editor_atto/editor/editor-min.js&m/1603783230/editor_atto/menu/menu-min.js&m/1603783230/editor_atto/plugin/plugin-min.js&m/1603783230/atto_collapse/button/button-min.js&m/1603783230/atto_title/button/button-min.js&m/1603783230/atto_bold/button/button-min.js&m/1603783230/atto_italic/button/button-min.js&m/1603783230/atto_unorderedlist/button/button-min.js&m/1603783230/atto_orderedlist/button/button-min.js&m/1603783230/atto_indent/button/button-min.js&m/1603783230/atto_link/button/button-min.js&m/1603783230/atto_emojipicker/button/button-min.js&m/1603783230/atto_image/button/button-min.js&m/1603783230/atto_media/button/button-min.js&m/1603783230/atto_recordrtc/button/button-min.js&m/1603783230/atto_recordrtc/recording/recording-min.js&m/1603783230/atto_managefiles/button/button-min.js&m/1603783230/atto_h5p/button/button-min.js&m/1603783230/atto_underline/button/button-min.js:9 <anonymous> https://yoursite.com/theme/yui_combo.php?3.17.2/querystring-stringify/querystring-stringify-min.js&m/1603783230/editor_atto/editor/editor-min.js&m/1603783230/editor_atto/menu/menu-min.js&m/1603783230/editor_atto/plugin/plugin-min.js&m/1603783230/atto_collapse/button/button-min.js&m/1603783230/atto_title/button/button-min.js&m/1603783230/atto_bold/button/button-min.js&m/1603783230/atto_italic/button/button-min.js&m/1603783230/atto_unorderedlist/button/button-min.js&m/1603783230/atto_orderedlist/button/button-min.js&m/1603783230/atto_indent/button/button-min.js&m/1603783230/atto_link/button/button-min.js&m/1603783230/atto_emojipicker/button/button-min.js&m/1603783230/atto_image/button/button-min.js&m/1603783230/atto_media/button/button-min.js&m/1603783230/atto_recordrtc/button/button-min.js&m/1603783230/atto_recordrtc/recording/recording-min.js&m/1603783230/atto_managefiles/button/button-min.js&m/1603783230/atto_h5p/button/button-min.js&m/1603783230/atto_underline/button/button-min.js:9 <anonymous> https://yoursite.com/mod/forum/post.php?post=&postformat=0&subject=Re:+test+fichero+pdf&reply=26666&sesskey=lJ0amW1tZo#mformforum:2660 _notify https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:9 T https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:9 _finish https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:16 _onSuccess https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:16 p https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:17 _insert https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:17 p https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:17 onSuccess https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:17 _finish https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:12 _next https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:12 _progress https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:13 h https://yoursite.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:12

If you set showgroups to less than 11, the bug does not appear.

Versions:

  • Moodle: 3.9.1
  • Wiris atto editor: 2020090300

Selecció_123
Selecció_122
Selecció_121

Random error that shows up

I have a simple equation in a course label. Sometimes I get the following error and sometimes it works as expected.

uncaught exception: fopen(/var/www/moodledata/SharedCache/cachestore_file/default_application/core_databasemeta/bbf-cache/bbf213178611dfbe0e377620f6d0b86824991516.cache): failed to open stream: No such file or directory (errno: 2) in /var/www/moodle/cache/stores/file/lib.php at line #358fopen(/var/www/moodledata/SharedCache/cachestore_file/default_application/core_databasemeta/bbf-cache/bbf213178611dfbe0e377620f6d0b86824991516.cache): failed to open stream: No such file or directory

in file: /var/www/moodle/cache/stores/file/lib.php line 358
#0 [internal function]: _hx_error_handler(2, 'fopen(/var/www/...', '/var/www/moodle...', 358, Array)
#1 /var/www/moodle/cache/stores/file/lib.php(358): fopen('/var/www/moodle...', 'rb')
#2 /var/www/moodle/cache/classes/loaders.php(303): cachestore_file->get('bbf213178611dfb...')
#3 /var/www/moodle/cache/classes/loaders.php(1461): cache->get('filter_active', 0)
#4 /var/www/moodle/lib/dml/mysqli_native_moodle_database.php(585): cache_application->get('filter_active')
#5 /var/www/moodle/lib/dml/moodle_database.php(618): mysqli_native_moodle_database->get_columns('filter_active')
#6 /var/www/moodle/lib/dml/moodle_database.php(1306): moodle_database->where_clause('filter_active', Array)
#7 /var/www/moodle/lib/filterlib.php(1100): moodle_database->get_records('filter_active', Array, 'sortorder', 'filter,active,s...')
#8 /var/www/moodle/lib/filterlib.php(686): filter_get_global_states()
#9 /var/www/moodle/filter/wiris/classes/configurationupdater.php(62): filter_get_globally_enabled()
#10 /var/www/moodle/filter/wiris/classes/configurationupdater.php(97): filter_wiris_configurationupdater->get_latex_status()
#11 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/ConfigurationImpl.class.php(151): filter_wiris_configurationupdater->updateConfiguration(Array)
#12 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/ConfigurationImpl.class.php(162): com_wiris_plugin_impl_ConfigurationImpl->initialize0()
#13 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/TextFilter.class.php(151): com_wiris_plugin_impl_ConfigurationImpl->getProperty('wiriseditormath...', 'data-mathml')
#14 /var/www/moodle/filter/wiris/integration/lib/com/wiris/plugin/impl/TextFilter.class.php(218): com_wiris_plugin_impl_TextFilter->filterMath(Object(com_wiris_plugin_impl_TextFilterTags), '
filter('
apply_filter_chain('

Question preview error Undefined property: _hx_array::$a

Using environment
Moodle Code: 4.1.3 (Build: 20230424)
Filter Wiris: 2023042400

Setup = Enabled site wide Filter MathType by WIRIS.

  1. Create a course.
  2. Go to the Question Bank.
  3. Add a Question.
  4. Select WIRIS QUIZZES -Cloze Science
    name: my Wiris Q
    question text (copy and paste to editor): test123 {1:SA:=#m1100000000} {1:MCS:=#SG11#SG12~#SG13~#SG14}
    «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mo»§#8943;«/mo»«/math»
  5. Click "Decode and verify the question text" and save it.
  6. Preview the question.
    RESULT:
Exception - Undefined property: _hx_array::$a (errno: 2) in [dirroot]/filter/wiris/integration/lib/php/Lib.class.php at line #31

Debug info:
Error code: generalexceptionmessage 
Stack trace:

    line 49 of /question/type/wq/quizzes/lib/com/wiris/quizzes/wrap/QuestionWrap.class.php: HException thrown
    line 264 of /question/type/shortanswerwiris/question.php: call to com_wiris_quizzes_wrap_QuestionWrap->getSlots()
    line 254 of /question/type/shortanswerwiris/question.php: call to qtype_shortanswerwiris_question->is_text_answer()
    line 322 of /question/type/shortanswerwiris/question.php: call to qtype_shortanswerwiris_question->format_answer()
    line 184 of /question/type/multianswer/question.php: call to qtype_shortanswerwiris_question->get_correct_response()
    line 161 of /question/type/wq/question.php: call to qtype_multianswer_question->get_correct_response()
    line 322 of /question/type/multianswerwiris/question.php: call to qtype_wq_question->get_correct_response()
    line 1291 of /question/engine/questionattempt.php: call to qtype_multianswerwiris_question->get_correct_response()
    line 828 of /question/engine/questionusage.php: call to question_attempt->get_correct_response()
    line 235 of /question/bank/previewquestion/preview.php: call to question_usage_by_activity->get_correct_response()

FR: Option to disable converting MathML to image

Wiris helps in storing MathML to the database by converting MathML to SafeXML so that Moodle's HMTLPurifier doesn't clean the math tags before storing to database.

Wiris then also converts the SafeXML to regular MathML (at least I presume it does) before requesting an image from the Wiris servers for the converted formula.

To be able to use Moodle's MathJax filter instead for displaying the MathML formula, it would be nice to have the option to disable replacing the MathML with the image HTML.

If disabled, the filter would just output the MathML so that other filters can postprocess it.

Would that be possible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.