Unable to setup Moodle Mobile Development

Unable to setup Moodle Mobile Development

by Jaco Theron -
Number of replies: 3

Following the instructions at https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2 I was still unable to get everything setup the way it should be.

Firstly I had a newer version of Node installed (since my other projects require the latest version). I then created a clean virtual machine to set it up on, installed the recommended version of Node and run the commands as shown on the page.

However, after all of this I still get errors when I try to run the "Install the npm plugins dependencies" - it appears the modules no longer exist since it can't be found (not exact error message, but this was already last week).

It appears to me that the documentation is either out of date, or it is no longer possible to setup the environment.

What I need to do:

I have been contracted to add a company logo to the mobile app using the CSS option (where a CSS file can be specified which will load for that Moodle site to overwrite the existing stylesheet only for the properties defined).

If someone knows which hook (id, class, tag) I can use to just get this logo in the app I would be very grateful (and also possible what size the logo should be to best fit).

Average of ratings: -
In reply to Jaco Theron

Re: Unable to setup Moodle Mobile Development

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Jaco,

what's the exact error you get?

In any case, for doing the CSS changes you can play with the online version here:

http://prototype.moodle.net/mobile/webappquiz/#/site/mm_courses

Or run in the app in the browser downloading the version from here:

https://github.com/moodlehq/moodlemobile-phonegapbuild

Here you have a tutorial: http://www.slideshare.net/juanleyva/creating-moodle-mobile-remote-themes

Juan

In reply to Juan Leyva

Re: Unable to setup Moodle Mobile Development

by Jaco Theron -

Hi Juan

The online version is exactly what I wanted, from the start (just being able to inspect the selectors to write my overwriting styles).

I am, however still having an issue - I keep getting the Cors origins error "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<domain-name>' is therefore not allowed access."

I then add a htaccess header to set it (on the Moodle site) to be "*" - maybe not secure but for now I just need it to start working. This then gives me the error that the 'Access-Control-Allow-Origin' header now have content of "*, *" which is not allowed and therefore it can't load.

Removing the line from the htaccess file immediately results in the first error. I guess it either have no header or it is doubled - both of which result in the files not being able to get loaded.

I am using the latest version of Chromium for this development.

In reply to Jaco Theron

Re: Unable to setup Moodle Mobile Development

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi,

you should connect to a demo working site, like school.demo.moodle.net (student/moodle), it reset hourly but you'll be able to have a working site for your customizations

You may also use http://demo.moodle.net/

Juan