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

Only languages in the langmenu are being returned for site plugins

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.3
    • Fix Version/s: 3.5.6, 3.6.4
    • Component/s: Other
    • Labels:
    • Testing Instructions:
      Hide
      1. As admin, install the Italian and Portuguese language packs via Site administration > Language > Language packs
      2. Download and install the Mod Custom Certificate plugin from here: https://github.com/markn86/moodle-mod_customcert/archive/MOODLE_36_STABLE.zip (the contents of the zip has to be placed in the mod/customcert folder)
      3. Now, in the language settings, enable the option "Display language menu" and in the "Languages on language menu" option set the following value "en, it"
      4. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      5. Create a Token in the mobile app service for any user in the site (not an admin account)
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Open the console an execute this new curl request, replacing wstoken with the token you just created and the site url with yours.

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

      7. And check that among the returned data you see a field "lang" with a json string that contains strings in English, Italian and Portuguese
      Show
      As admin, install the Italian and Portuguese language packs via Site administration > Language > Language packs Download and install the Mod Custom Certificate plugin from here: https://github.com/markn86/moodle-mod_customcert/archive/MOODLE_36_STABLE.zip (the contents of the zip has to be placed in the mod/customcert folder) Now, in the language settings, enable the option "Display language menu" and in the "Languages on language menu" option set the following value "en, it" As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for any user in the site (not an admin account) Click on Site administration ► Plugins ► Web services ► Manage tokens Open the console an execute this new curl request, replacing wstoken with the token you just created and the site url with yours. curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_plugins_supporting_mobile&wstoken=3af67232a7596ceb658df4db329e5ad6' | python -m "json.tool" And check that among the returned data you see a field "lang" with a json string that contains strings in English, Italian and Portuguese
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-65141-master

      Description

      Right now, for site plugins, we are just returning the languages enabled but the current function that checks that returns only languages in the langmenu if they are present.

      We must fix that because we may have enabled languages but not in the langmenu

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Dani Palou
            Integrator:
            Jun Pataleta
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 25 minutes
                2h 25m