problem when using javascript libraries

problem when using javascript libraries

by behnaz ranjbar -
Number of replies: 8
hi everyone,
we are using 'ace editor' in our lesson activity... it has some javascript libraries
that as you know in mobile app it can not be shown..can we do anything to have it in the app too?
totally, there isn't any way to have javascript in mobile app even in the new version?
because lots of plugins are javascript based too, like vpl.
thanks for your attention
Average of ratings: -
In reply to behnaz ranjbar

Re: problem when using javascript libraries

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi,

right now there's no easy way to include external libraries in the official Moodle Mobile app. The only possible way would be to support a plugin in the Mobile app, and make that plugin return the library as plain Javascript. We haven't tested that, so I'm not sure if it will work.

Cheers,

Dani

In reply to Dani Palou

Re: problem when using javascript libraries

by behnaz ranjbar -

thank you so much yes after so many days i found out that.

so i've tried javascript field of return array in mobile.php in so many ways and i could show something like alert box or for example changing the color of that page's text but still don't know how to pass a javascript library from there 

i asked this question from stackoverflow too but they refer me to moodle experts again

In reply to Dani Palou

Re: problem when using javascript libraries

by behnaz ranjbar -

could yo please help me how to write it?

In reply to behnaz ranjbar

Re: problem when using javascript libraries

by behnaz ranjbar -

hi dani,

as i started to work on it newly i realized that there isn't such a delegate even for this work. cause we use this editor in our lesson activity and mobile supports this activity  by nature so we can't even use corecoursemodule delegate.

it seems impossible?yeah?

In reply to behnaz ranjbar

Re: problem when using javascript libraries

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi,

you cannot overwrite an activity supported by the Mobile app. If you want to change the behaviour of lesson then you'll probably have to create your custom version of the mobile app.

Cheers,

Dani

In reply to Dani Palou

Re: problem when using javascript libraries

by behnaz ranjbar -

you mean by changing it in this path?

core>addon>mod>lesson

In reply to behnaz ranjbar

Re: problem when using javascript libraries

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes, but it's src>addon, not core>addon.

In reply to Dani Palou

Re: problem when using javascript libraries

by behnaz ranjbar -

yes it was typing mistake thank you so much for answering