Change 'help' page in MM2 Phonegap build

Change 'help' page in MM2 Phonegap build

de Aaron Harris -
Número de respuestas: 6
I'm currently amending an instance of the MM2 Phonegap build to reflect a Totara Moodle which the app will eventually be connected to.  

Within the app, there is an option of 'Help' with a life ring, but clicking it opens the Moodle Mobile Help page - I need to change this to open another help page with the option to call, send an email, and have a few FAQs listed.  

How do I go about changing this link to open a page within the app instead, please?  

Any help is greatly appreciated sonrisa 
Promedio de valoraciones: -
En respuesta a Aaron Harris

Re: Change 'help' page in MM2 Phonegap build

de Manjunath Moodle -

Hi Aaron,

  One option is to build simple 'customhelp' addon module.  Attaching simple addon with one help page.  You can enhance this based on your need.

In case you want to test addon -

  1. Download & extract addon to '/www/addons folder

  2. Change help link code (line # 51) in www/core/components/sidemenu/templates/menu.html as below -

     <a menu-close class="item item-icon-left" ui-sref="site.customhelp" mm-link title="{{ 'mm.sidemenu.help' | translate}}">

If everything is okay, you will see local custom help page with couple of FAQ questions when you click help on side menu.

Hope it helps.

 

  

 

En respuesta a Manjunath Moodle

Re: Change 'help' page in MM2 Phonegap build

de Aaron Harris -

Hi Manjunath 

Thank you for the addon ZIP - looks to be what I'm after! 
I've done what you said with changing Line #51 and adding the files to the /addons folder, but the 'help' option is no longer a clickable action; if I mouse over the mouse doesn't change, and clicking it just hides the sidebar.  

I've attached a screenshot of the sidebar.  Is there something else which I need to do, please? 

Sidebar

Thank you 

En respuesta a Aaron Harris

Re: Change 'help' page in MM2 Phonegap build

de Manjunath Moodle -

Aaron,

   hope you are using 'moodle mobile 2' repo as base & running gulp after making changes.

   Here is exact change I made in menu.html -

  Before

  <a menu-close class="item item-icon-left" ng-href="{{docsurl}}" mm-link title="{{ 'mm.sidemenu.help' | translate}}">

After  

<a menu-close class="item item-icon-left" ui-sref="site.customhelp" mm-link title="{{ 'mm.sidemenu.help' | translate}}">


En respuesta a Manjunath Moodle

Re: Change 'help' page in MM2 Phonegap build

de Aaron Harris -

I'm using the PhoneGap build from GitHub [https://github.com/moodlehq/moodlemobile-phonegapbuild]

I couldn't get half of the dependencies installed on my machine for the Moodle Mobile 2 repository, so having to use PhoneGap on MAMP 3

En respuesta a Aaron Harris

Re: Change 'help' page in MM2 Phonegap build

de Manjunath Moodle -

Aaron,

   Even through you are including new add-on module correctly, your custom module js files (main.js) may not be getting updated into 'mm.bundle.js' in the build folder (this is all-in-one js file included in index.html). May be this is why click is not working.  Using 'moodle mobile2' repo & gulp would have taken care of this.   Workaround (error prone) is to manually add your help module js file(s) code into 'mm.bundle.js'. 

En respuesta a Manjunath Moodle

Re: Change 'help' page in MM2 Phonegap build

de Aaron Harris -

Manjunath,

Thank you for your patience.  I had installed Node previously, and it had not uninstalled completely when I removed it before. 
I've now got this page working through the Moodle Mobile 2 directory using Ionic.  Thank you very much for your help.  

For future reference in case anyone else requires help, I used the following YouTube video:
youtube.com/watch?v=FtKbGgwFSpw

Thank you again!  It's exactly what I needed! sonrisa