Moodle app Customization Help Required

Moodle app Customization Help Required

by Praveen Chamarthi -
Number of replies: 3
Hi Team,

I am Trying to create new page in moodle mobile app but it's not working and any one help me how to create new page in app(i am trying to display data from data base).

I am using cordova ionic and typescript(latest moodle app code).
onclick i am getting data from php server but unable to create new page in app for display data.

Could you please share if any development document for customization.

Thanks!


Average of ratings: -
In reply to Praveen Chamarthi

Re: Moodle app Customization Help Required

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Praveen,

If you're trying to add new pages to the app, the reccommended way to do this is to write a plugin, rather than modifying the app itself. These work by providing Ionic templates and vanilla Javascript (not typescript) to display pages in the app.

There is comprehensive documentation for writing app plugins. If you get stuck, post your questions here (ideally with a link to view you code) and we can try to help.

In reply to Mark Johnson

ตอบ: Re: Moodle app Customization Help Required

by Auychai O -
Hi Mark,

I write plug-in and put it in a local directory.it's not display anything on a mobile app.
this is my code in local/example/db/mobile.php

$addons = array(
"local_example" => array( // Plugin identifier
'handlers' => array( // Different places where the plugin will display content.
'localexample' => array( // Handler unique name (alphanumeric).
'displaydata' => array(
'title' => 'pluginname',
'icon' => 'bluetooth',
'class' => '',
),

'delegate' => 'CoreMainMenuDelegate', // Delegate (where to display the link to the plugin)
'method' => 'mobile_test_view', // Main function in \local_example\output\mobile
)
),
// 'lang' => array( // Language strings that are used in all the handlers.
// array('pluginname', 'local_example'),
// array('example:viewexample', 'local_example')
),
));
I get stuck with this for a week sad
In reply to Auychai O

Re: ตอบ: Re: Moodle app Customization Help Required

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi, I'm happy to help if I can, but this thread was started by Praveen for a separate question. If you've got another issue, could you start your own thread so that the discussions don't get confused? It might be helpful if you can put your plugin on somewhere like GitHub or GitLab so we can see all the code in a more readable format - pasting into forum posts is unfortunately not an easy way to read code.