Run moodle mobile app code directly in web browser

Run moodle mobile app code directly in web browser

by Sunny Teacher -
Number of replies: 11
Hi  Juan, hi all,

Not sure if my question is stupid but I try the following:

  1. I downloaded the moodle app code from https://github.com/moodlehq/moodlemobile-phonegapbuild
  2. On my PC, I click on the file index.html
  3. the app loading screen opens but nothing furhter happens

I already searched for an answer and the only thing I found was an already closed forum: https://moodle.org/mod/forum/discuss.php?d=331429 There someone else asked similar question and Juan replied that using above git folder should work (if I understood everything right).

I would be very happy for any help.

Greetings,
Sunny
Average of ratings: -
In reply to Sunny Teacher

Re: Run moodle mobile app code directly in web browser

by Péter Lukács -
You clearly dont understand how forum threads work, isnt it?
There are 2 solutions on your link read again the answers ffs!



In reply to Péter Lukács

Re: Run moodle mobile app code directly in web browser

by Sunny Teacher -

Hi Peter,

The links in my original post only contain one answer to my problem:

"Alternatively, if you only want to run the app in the browser (ant not develop) you can download all the required files from here: https://github.com/moodlehq/moodlemobile-phonegapbuild" (by Juan)

So based on this suggestion, I did the following:

  1. I downloaded the moodle app code from https://github.com/moodlehq/moodlemobile-phonegapbuild
  2. On my PC, I click on the file index.html
  3. the app loading screen opens but nothing furhter happens
But as mentioned in my original post, this did not work. (Btw: I also tried to put the package on a server and access it via index.html with a browser, but same restult.)

Is there something I have overseen?

For any help I am thankful.

Sunny

In reply to Sunny Teacher

Re: Run moodle mobile app code directly in web browser

by Péter Lukács -

Clearly you have problems with reading:

"Hello Azmat,

this is because the repository doesn't include some required libraries.  You need to run:

bower install

This should be enough to make it work in a browser without ionic serve.

You have a complete guide on how to setup the environment in here:

https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2

Kind regards,

Dani"


You're welcome!


In reply to Péter Lukács

Re: Run moodle mobile app code directly in web browser

by Sunny Teacher -
Did you see the reply to the post you quoted? It says:

"Alternatively, if you only want to run the app in the browser (ant not develop) you can download all the required files from here: https://github.com/moodlehq/moodlemobile-phonegapbuild"

And that's what I tired but without success. 

I am thankful for any help,
Sunny




In reply to Sunny Teacher

Re: Run moodle mobile app code directly in web browser

by Péter Lukács -

1. But why did you just skip the first solution???

2. The second solution is working like a charm, see proof. In case of problems, its recommended to copy the files from moodlemobile-phonegapbuild to your webserver.



Sorry to say this but why are you forcing to achieve something when you clearly dont understand even the basics?



In reply to Péter Lukács

Re: Run moodle mobile app code directly in web browser

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 Péter,

forum participants are reminded to show respect and consideration to others, as mentioned in our site policy. Please try not to be rude with other users with sentences like "read again the answers ffs" or "Clearly you have problems with reading".

Cheers,

Dani

In reply to Sunny Teacher

Re: Run moodle mobile app code directly in web browser

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,

please notice that in order to use the latest version of the app (v3.5.1) you need to use the branch v3.5.0 of that repo. Please check if it works for you using that branch.

Cheers,

Dani

In reply to Dani Palou

Re: Run moodle mobile app code directly in web browser

by Sunny Teacher -
Hi,

the problem is that if I run the phonegap app code after I downloaded it on my PC (click on index.html). I can't get further than:
So the screen does not jump to the login page as in Peter's screenshot.
(This code is from the master branch. If I take the code from the 5.0.0 branch, only a blank screen appears).

Does this way actually work?

Greetings,
Sunny








In reply to Sunny Teacher

Re: Run moodle mobile app code directly in web browser

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,

yes, the method works, I just did it myself. Which browser are you using to open the file? Please notice that the app only works in Chrome and Chromium.

Cheers,

Dani

In reply to Dani Palou

Re: Run moodle mobile app code directly in web browser

by Péter Lukács -

Dear Dani, i think "Chrome only" isnt true anymore.  If you examine my screenshot i made it in Firefox, not in Chrome.

In reply to Péter Lukács

Re: Run moodle mobile app code directly in web browser

by Sunny Teacher -

I managed to run the 3.5.0 branch in chrome (only the lang strings did not load).

But I think I figured out by myself what causes the difficulties: the file main.js is 10MB big. Another JS file 7MB.