Moodle for mobile

problem when using javascript libraries

 
Picture of behnaz ranjbar
problem when using javascript libraries
 
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: -
Picture of Dani Palou
Re: problem when using javascript libraries
Core developersMoodle HQParticularly helpful MoodlersPlugin 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

 
Average of ratings: -
Picture of behnaz ranjbar
Re: problem when using javascript libraries
 

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

 
Average of ratings: -
Picture of behnaz ranjbar
Re: problem when using javascript libraries
 

could yo please help me how to write it?

 
Average of ratings: -
Picture of behnaz ranjbar
Re: problem when using javascript libraries
 

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?

 
Average of ratings: -
Picture of Dani Palou
Re: problem when using javascript libraries
Core developersMoodle HQParticularly helpful MoodlersPlugin 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

 
Average of ratings: -
Picture of behnaz ranjbar
Re: problem when using javascript libraries
 

you mean by changing it in this path?

core>addon>mod>lesson

 
Average of ratings: -
Picture of Dani Palou
Re: problem when using javascript libraries
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

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

 
Average of ratings: -
Picture of behnaz ranjbar
Re: problem when using javascript libraries
 

yes it was typing mistake thank you so much for answering

 
Average of ratings: -