Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registryConf.module.create is not a function error when trying to display EULA #160

Open
julesfm opened this issue Nov 22, 2023 · 1 comment

Comments

@julesfm
Copy link

julesfm commented Nov 22, 2023

I'm running Moodle 4.3, which produces a warning saying the modal_factory has been deprecated (but it should still work). I'm running the latest release of turnitinsim under the Boost theme.
Whenever a user tries to display the EULA, there is a JavaScript error in the console saying the above, and clicking on the "show me the eula" link appears to do nothing.
There is no way therefore to accept the EULA.

Is there a quick fix please?

Thanks!
Jules.

image
@julesfm
Copy link
Author

julesfm commented Dec 8, 2023

This appears to be related to the new change a54ba682a4b73af116b0e01e56568d02ff1d590f in Moodle lib/amd/src/modal_factory.js dated September 8th:

This commits adds a new static `create()` method to replace the existing
ModalFactory.create approach.

This allows the creation of a modal to now be simplified to:

```js
import SomeModalClass from 'mymodule/wherever';

// ...

const modal = await SomeModalClass.create();


Prior to this change the modal was instantiated via the ModalFactory,
but the Type of modal was typically pulled from the ModalClass itself
via the registry. Essentially it used to require three modules to
instantiate a single Modal, and now it takes just one.

which sadly has broken the Tii EULA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant