Mathjax and other plugins with the authoring tool

Rather then resurrect an old thread from May 2015...

I appreciate that some of the extra plugins that people have made do not yet have schemas and therefore cannot be formally loaded into the authoring tool.

However, I wonder if plugins like the MathJax one can be manually added to a course created using the authoring tool retrospectively? It feels like there may just be an appropriate place in the directory structure to copy the plugin's files and perhaps update one other file to inform the framework that there is another plugin in load? Is there just somewhere clever to put the Mathjax-master directory?

The reason I would have thought this has a chance is... that the MathJax plugin purely runs some javascript and post-formats the html after all components are loaded), i.e. it doesn't provide any new components or things that need configuring in the authoring tool.

I assume this applies to a variety of other plugins too, so the answer is probably already well known by someone.

Thanks, David

Re: Mathjax and other plugins with the authoring tool

Hi David

That's a really good point - although the mathJax plugin can have config information placed in the .json, it doesn't need it - and so would work perfectly well without it.

I actually think this is the first time we have encountered this.

An interesting one for someone on the AT team to answer.

In the meantime, it should be fairly simple to make a properties.schema for the mathJax extension, I'll try and find some time to do this today.

Re: Mathjax and other plugins with the authoring tool

David/Matt,

Some very minor changes to the mathJax plugin would allow it to be uploaded as an extension compatible with the authoring tool.  I wouldn't recommend going outside the UI and placing folders or files on the filesystem to get this to work.

To second what you've said, Matt, from what I can see the changes to config.json could be optional also.

Regards,

Brian

Re: Mathjax and other plugins with the authoring tool

Hi Brian

If you had an extension that didn't require any kind of .json config, would it be possible to set that up to work in the AT? Every example I've seen so far has required you to define at least one property to be set somewhere.

Re: Mathjax and other plugins with the authoring tool

Thanks all, very quick responses. I did have a look at schemas a while back but had no idea how to write one so gave up.

In the longer term I will have to wait for it to be added to the list of plugins compatible with the authoring tool, but in the meantime is there perhaps an answer to where I can put the files to make them compile next to the course to at least get some output or should I just give up for now? I think Brian suggests about that putting files in places isn't the way to go (i.e. perhaps it just won't work)

Re: Mathjax and other plugins with the authoring tool

Hi David,

Until a schema is in place, a quick solution would be to copy the mathJax extension folder into the /temp folder in the authoring tool (specifically in /temp/{id}/adapt_framework/src/extensions/). Then the next time you re-build the course in the authoring tool the mathJax code will get picked up as part of the build.

Hope this helps.

Brian

Re: Mathjax and other plugins with the authoring tool

Thanks for the help, but I think I'm just having to give up for now. I cannot get things to work. I think this approach won't show any evidence the plugin's loaded so it's hard to diagnose why it's not doing the formatting I need.

I also tried Tom Taylor's recommendation from months ago to bump up the version number in bower.json, then I was able to load it through the plugin manager. That led to a preview error unfortunately. And now it seems impossible to remove that entry from the plugin manager as well, it's like a zombie plugin.

I had tried the /temp/ directory idea previously and it hadn't worked. I guess that maybe the plugin has ceased to work since I last had hoped to use Adapt six months ago, but since I'm only playing around with the authoring tool now I don't have a minimal example to import and test now.

It's annoying as this is the only hurdle to me creating things, but I just cannot live without maths equations.

If anyone is able to put the plugin directory from https://github.com/cgkineo/adapt-mathJax/archive/master.zip into the src directory and create an empty course with the following text "\$$x^2 \$$" in it and get it to format as x-squared I'd love to hear it -- in which case it might just be that I've played around too much and messed up my entire installation now.

Re: Mathjax and other plugins with the authoring tool

I've now updated our MathJax extension to include an authoring tool schema

Re: Mathjax and other plugins with the authoring tool

Hi David,

I've been working on this article about creating a properties.schema for the authoring tool wiki. It's not yet complete. It's long! and slightly disorganized. But maybe there's enough in it now to jump start your understanding. In case you're feeling ambitious...

Chuck

Re: Mathjax and other plugins with the authoring tool

Hi Matt,

Yes, it's still possible, even if the extension doesn't require modifications to the existing JSON.  Tom Taylor made a change some time back in the authoring tool to make this optional

There is an argument to make that even if no modifications are required the extension should implement some kind of _isEnabled attribute though, so it can be toggled on and off.

Brian