Picture of David Hodge
Mathjax and other plugins with the authoring tool
by David Hodge - Friday, 15 January 2016, 10:45 AM
 

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

Picture of Matt Leathes
Re: Mathjax and other plugins with the authoring tool
by Matt Leathes - Friday, 15 January 2016, 11:47 AM
 

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.

Picture of Brian Quinn
Re: Mathjax and other plugins with the authoring tool
by Brian Quinn - Friday, 15 January 2016, 12:31 PM
 

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

Picture of Matt Leathes
Re: Mathjax and other plugins with the authoring tool
by Matt Leathes - Friday, 15 January 2016, 7:57 PM
 

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.

Picture of David Hodge
Re: Mathjax and other plugins with the authoring tool
by David Hodge - Saturday, 16 January 2016, 10:40 PM
 

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)

Picture of Brian Quinn
Re: Mathjax and other plugins with the authoring tool
by Brian Quinn - Sunday, 17 January 2016, 5:54 PM
 

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

Picture of David Hodge
Re: Mathjax and other plugins with the authoring tool
by David Hodge - Monday, 18 January 2016, 12:41 AM
 

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.

Picture of Matt Leathes
Re: Mathjax and other plugins with the authoring tool
by Matt Leathes - Monday, 11 April 2016, 7:13 PM
 

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

Picture of Chuck Lorenz
Re: Mathjax and other plugins with the authoring tool
by Chuck Lorenz - Sunday, 17 January 2016, 8:48 PM
 

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

Picture of Brian Quinn
Re: Mathjax and other plugins with the authoring tool
by Brian Quinn - Sunday, 17 January 2016, 5:52 PM
 

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