Moodle for mobile

Moodle in English: Mobile Remote Add On Side Nav Not Appear

 
Picture of Muhammad Syahmi MD Yusoff
Moodle in English: Mobile Remote Add On Side Nav Not Appear
 

Dear Juan/Dani,


Currently i am developing a local plugin, and now i am adding remote add on to my plugin. 

Referring to this moodle doc , and some other example on remote add on. I able to get this far(refer picture below).



Sadly, both Certificate(the one available at moodle plugin directory) and certification path(the one i develop) doesn’t appear. 
Same goes to local moodle install, tried moodle version 3.4 and now 3.4.1 cleaned install, different server also have tried.

I have also tried with another remote addon plugin available on internet. Also not working. I also tried already on bluestack android emulator, and my iphone. Tested also on official moodle mobile apps available on appstore and playstore.

Unfortunately, side nav never showed on moodle mobile apps. I have tried debugging via several browser. I have found that it Set Status notdownloaded(refer picture below). Other than that i have no clue.



Maybe there are simple setting or simple configuration either on moodle side or my plugin side or mobile app side.

I hope you guys can help me with simple example or boilerplate as reference for this issue.

Thanks and regards. Appreciate.

 
Average of ratings: -
Picture of Dani Palou
Re: Moodle in English: Mobile Remote Add On Side Nav Not Appear
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi,

this line is confusing me a bit:

"Unfortunately, side nav never showed on moodle mobile apps."

By side nav you mean the side menu of the app? The certificate addon doesn't display in there.

You say you tried with the official Moodle Mobile app from the app store. Did you try if you could use the mod_certificate in there? You should check that the activity is supported in the app, just create a certificate in a course and check that  you can view it in the app.

Looking at the log you show, it seems the app isn't even starting the download. Here's what it usually displays for mod_certificate:

$mmFilepool: Set status 'downloading' for package mmAddonManager mod_certificate_mod_certificate

$mmEvents: Event mmFilepoolFile:e85b679dd537f71a938e8d7693b690e1:mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38 triggered.

$mmWS: Downloading file MYSITE/mod/certificate/mobile/mod_certificate.zip sites/e85b679dd537f71a938e8d7693b690e1/filepool/mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38.zip true

$mmFS: Create file mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38.zip.tmp in filesystem:http://localhost:8101/persistent/sites/e85b679dd537f71a938e8d7693b690e1/filepool

$mmFS: Write file: sites/e85b679dd537f71a938e8d7693b690e1/filepool/mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38.zip.tmp

$mmFS: Create file mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38.zip.tmp in filesystem:http://localhost:8101/persistent/sites/e85b679dd537f71a938e8d7693b690e1/filepool

$mmWS: Success downloading file MYSITE/mod/certificate/mobile/mod_certificate.zip to sites/e85b679dd537f71a938e8d7693b690e1/filepool/mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38.zip with extension zip

$mmEvents: Event mmFilepoolFile:e85b679dd537f71a938e8d7693b690e1:mod_certificate_63ceb34b9a4a9cb84ad9ad1a63a5ab38 triggered.

$mmFilepool: Set status 'downloaded' for package mmAddonManager mod_certificate_mod_certificate


If your site is public, please check if the log is the same using this "webapp":

https://prototype.moodle.net/mobile/webapp/

Kind regards,

Dani

 
Average of ratings: -
Picture of Muhammad Syahmi MD Yusoff
Re: Moodle in English: Mobile Remote Add On Side Nav Not Appear
 
Hi Dani,


Great! Seems like i manage to get hint to work on this remote add on. Thank you for reply.

I manage to get it download, i debug through android studio using official moodle apk. Seems like it manage to download all file successfully. 




Seems like something wrong since it wont register my $mmSideMenuDelegateProvider addon. Is there any missing code or missing important thing during my setup because i am just newbie in this remote addon thing. Have to follow and make helloworld thing work first. I mean side nav like level up! appear on mobile side (refer picture). 



I will attach my my code here, for you to refer. This code is exactly same from moodle doc. I have tried that mod_certificate also, but i cannot see any different from this tool_ouadmin code. But still not appear. I believe, i almost there. Hopefully you can provide me some more hint or mistake i made here. I just want to make it appear on sidenav.

Thank you Dani. Cheers! smile


 
Average of ratings: -
Picture of Dani Palou
Re: Moodle in English: Mobile Remote Add On Side Nav Not Appear
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi,

your ZIP file contains a directory named "tool_ouadmin" inside, and the app doesn't expect that. Your ZIP should have the addon files (addon.js, lang) in the root of the ZIP file. 

So, instead of having: 

tool_ouadmin.zip > tool_ouadmin > addon.js

It should be:

tool_ouadmin.zip > addon.js

Kind regards,

Dani

 
Average of ratings: -
Picture of Muhammad Syahmi MD Yusoff
Re: Moodle in English: Mobile Remote Add On Side Nav Not Appear
 

Hi Dani, 

Thanks for advise. It works!! Since i am using mac to compress, then mac compress automatically inside folder. I notice when i try to open my tool_ouadmin.zip file from windows. It was inside tool_ouadmin folder from windows view while it looks same on mac. I wonder why there are difference in compressing file between mac and windows. 

So thanks again Dani big grin

Kind and regards.

Syahmi



 
Average of ratings: -