Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Moodle App Plugins Development Guide: Difference between revisions

From MoodleDocs
mNo edit summary
Line 1: Line 1:
== Plugin identifier ==
[[Mobile_support_for_plugins#Step_1._Update_the_db.2Fmobile.php_file]] currently reads "Plugin identifier - A unique name for the plugin, it can be anything (there’s no need to match the module name)." Why not to recommend to use the frankenstyle plugin name though? What else is a better candidate and why should developers use something else? It is confusing to say "it can be anything" if it is supposed to be unique. --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 19:05, 4 September 2020 (UTC)
[[Mobile_support_for_plugins#Step_1._Update_the_db.2Fmobile.php_file]] currently reads "Plugin identifier - A unique name for the plugin, it can be anything (there’s no need to match the module name)." Why not to recommend to use the frankenstyle plugin name though? What else is a better candidate and why should developers use something else? It is confusing to say "it can be anything" if it is supposed to be unique. --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 19:05, 4 September 2020 (UTC)


----
== Requirements for the site hosting the plugin ==


So, my understanding is that it is expected that the developer uses https://mobileapp.moodledemo.net/ and they make it connect to their own dev site where they have work in progress on the plugin exposed and available. However, it does not seem to be said anywhere. The "Getting started" does not say anything about what site the "app" should connect to, and then the "Development workflow" does neither. Also, it seems that the dev site should be accessible via a public URL, which again is not mentioned anywhere, as far as I could see. --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 19:36, 4 September 2020 (UTC)
So, my understanding is that it is expected that the developer uses https://mobileapp.moodledemo.net/ and they make it connect to their own dev site where they have work in progress on the plugin exposed and available. However, it does not seem to be said anywhere. The "Getting started" does not say anything about what site the "app" should connect to, and then the "Development workflow" does neither. Also, it seems that the dev site should be accessible via a public URL, which again is not mentioned anywhere, as far as I could see. --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 19:36, 4 September 2020 (UTC)


----
== Getting started - instructions simplification ==


There is "First of all, we recommend creating a simple mobile.php for displaying a new main menu option" - but it does not say:
There is "First of all, we recommend creating a simple mobile.php for displaying a new main menu option" - but it does not say:
Line 14: Line 16:
And in either case, what is the recommended contents of the file? --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 21:14, 4 September 2020 (UTC)
And in either case, what is the recommended contents of the file? --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 21:14, 4 September 2020 (UTC)


----
== Formatting the activity module instance name ==


There is external_format_text() used to format the module's intro. Why is there format_string() used to format the name and not external_format_string() ? --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 09:59, 6 September 2020 (UTC)
There is external_format_text() used to format the module's intro. Why is there format_string() used to format the name and not external_format_string() ? --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 09:59, 6 September 2020 (UTC)
----


== Using Desktop App for debugging ==
== Using Desktop App for debugging ==
Line 26: Line 26:
> Alternatively, you can use the Moodle Desktop app, it is based on Chromium so you can enable the "Developer Tools" and inspect the HTML, inject javascript, debug, etc...  
> Alternatively, you can use the Moodle Desktop app, it is based on Chromium so you can enable the "Developer Tools" and inspect the HTML, inject javascript, debug, etc...  


However, I could not easily enable the Developer Tools in the App. Googling for "electron enable developer tools" allowed me to find: "Developer Tools can be accessed ... press Cmd + Opt + I on macOS or Ctrl + Shift + I on Windows or Linux"
However, I could not easily enable the Developer Tools in the App. Googling for "electron enable developer tools" allowed me to find: "Developer Tools can be accessed ... press Cmd + Opt + I on macOS or Ctrl + Shift + I on Windows or Linux" --[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 11:27, 6 September 2020 (UTC)
 
--[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 11:27, 6 September 2020 (UTC)

Revision as of 11:29, 6 September 2020

Plugin identifier

Mobile_support_for_plugins#Step_1._Update_the_db.2Fmobile.php_file currently reads "Plugin identifier - A unique name for the plugin, it can be anything (there’s no need to match the module name)." Why not to recommend to use the frankenstyle plugin name though? What else is a better candidate and why should developers use something else? It is confusing to say "it can be anything" if it is supposed to be unique. --David Mudrak (talk) 19:05, 4 September 2020 (UTC)

Requirements for the site hosting the plugin

So, my understanding is that it is expected that the developer uses https://mobileapp.moodledemo.net/ and they make it connect to their own dev site where they have work in progress on the plugin exposed and available. However, it does not seem to be said anywhere. The "Getting started" does not say anything about what site the "app" should connect to, and then the "Development workflow" does neither. Also, it seems that the dev site should be accessible via a public URL, which again is not mentioned anywhere, as far as I could see. --David Mudrak (talk) 19:36, 4 September 2020 (UTC)

Getting started - instructions simplification

There is "First of all, we recommend creating a simple mobile.php for displaying a new main menu option" - but it does not say:

  • is it db/mobile.php ?
  • or is it classes/output/mobile.php ?

And in either case, what is the recommended contents of the file? --David Mudrak (talk) 21:14, 4 September 2020 (UTC)

Formatting the activity module instance name

There is external_format_text() used to format the module's intro. Why is there format_string() used to format the name and not external_format_string() ? --David Mudrak (talk) 09:59, 6 September 2020 (UTC)

Using Desktop App for debugging

There is

> Alternatively, you can use the Moodle Desktop app, it is based on Chromium so you can enable the "Developer Tools" and inspect the HTML, inject javascript, debug, etc...

However, I could not easily enable the Developer Tools in the App. Googling for "electron enable developer tools" allowed me to find: "Developer Tools can be accessed ... press Cmd + Opt + I on macOS or Ctrl + Shift + I on Windows or Linux" --David Mudrak (talk) 11:27, 6 September 2020 (UTC)