Closed mazitov-az closed 11 months ago
Hello!
I`m using:
Here`s my error log: Type: Warning Error message: Constant ALLOWED_DIMS already defined File: /moodle_path/filter/jsxgraph/filter.php Line: 411
There are same errors with constants:
I tried to preview quiz question, which uses jsgraph filter. During page rendering, function, described below, has been called several times:
private function get_board_html(...) { ... define('ALLOWED_DIMS', ["aspect-ratio", "width", "height", "max-width", "max-height"]); define('AR', "aspect-ratio"); define('ALLOWED_DIMS_EXCEPT_AR', ["width", "height", "max-width", "max-height"]); define('WIDTHS', ["width", "max-width"]); ...
So on it`s second call function tries to define some global constants, that were already defined at previous call. This causes an error.
My suggestion is to move these constants to the class context. #38
Closed by #f2fff79d80e93963cd04470c303999867df38c07.
Thank you for your suggestion!
Hello!
I`m using:
Here`s my error log: Type: Warning Error message: Constant ALLOWED_DIMS already defined File: /moodle_path/filter/jsxgraph/filter.php Line: 411
There are same errors with constants:
I tried to preview quiz question, which uses jsgraph filter. During page rendering, function, described below, has been called several times:
So on it`s second call function tries to define some global constants, that were already defined at previous call. This causes an error.
My suggestion is to move these constants to the class context. #38