Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49279

Add support in moodle plugins for exporting "Mobile app addons"

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1
    • 2.8.3, 3.1
    • Other
    • MOODLE_28_STABLE, MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-49279-master
    • Hide
      1. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      2. Create a Token for the student user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      3. Next, you can do a CURL REST call simulating a WS client with the student user.
        • You need to replace the wstoken, and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_plugins_supporting_mobile&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool"

      4. Confirm that: You see a list of empty warnigns and plugins
      5. Now, install in Moodle the local_testservices plugin attached in the issue
      6. Run again the CURL request and confirm that
        • You see now a returned plugin with the following information:

          "plugins":

          "addon": "remotetest",
          "component": "local_testservices",
          "dependencies": [],
          "filehash": "3959862d33e6bb932d5ce7220175eac546e04141",
          "filesize": 1373997,
          "fileurl": "YOUR_MOODLE_URL_/local/testservices/mobile/remotetest.zip",
          "version": "2016101202"
          ,

          "addon": "anothertest",
          "component": "local_testservices",
          "dependencies": [],
          "filehash": "b0b221e62d11ae4257f3e39626193d2402b4593a",
          "filesize": 2751301,
          "fileurl": "YOUR_MOODLE_URL_/local/testservices/mobile/anothertest.zip",
          "version": "2016101202"

          ,
          "warnings":

      Show
      As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user. You need to replace the wstoken, and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_plugins_supporting_mobile&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool" Confirm that: You see a list of empty warnigns and plugins Now, install in Moodle the local_testservices plugin attached in the issue Run again the CURL request and confirm that You see now a returned plugin with the following information: "plugins": "addon": "remotetest", "component": "local_testservices", "dependencies": [], "filehash": "3959862d33e6bb932d5ce7220175eac546e04141", "filesize": 1373997, "fileurl": "YOUR_MOODLE_URL_/local/testservices/mobile/remotetest.zip", "version": "2016101202" , "addon": "anothertest", "component": "local_testservices", "dependencies": [], "filehash": "b0b221e62d11ae4257f3e39626193d2402b4593a", "filesize": 2751301, "fileurl": "YOUR_MOODLE_URL_/local/testservices/mobile/anothertest.zip", "version": "2016101202" , "warnings":

      Moodle Mobile 2 (MM2) is going to be able to pull app plugins (AngularJS modules) from the remote site and lazy load them into the app. This will happen every time a user login into a site (or the remote site information is refreshed).

      We need to find a way to make plugins able to declare that they "export" Mobile app plugins.
      The app plugin should be a zip file containing all the AngularJS module required files. This zip file will be downloaded by the app and injected dinamically.

      The list of available app plugins in a site should be exported via the core_site_get_site_info external function, so we need a way to retrieve a list of app plugins published by Moodle.

      Any type of Moodle plugin must support app plugins (mod, local, admin tools, etc...) so we need to use a generic mechanism

            jleyva Juan Leyva
            jleyva Juan Leyva
            Adrian Greeve Adrian Greeve
            David Monllaó David Monllaó
            Jake Dallimore Jake Dallimore
            Votes:
            5 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.