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

mobilecssurl is not being returned in WebService get_siteinfo function

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.5
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Go to Site administration / ► Plugins / ► Web services / ► Mobile

      Add a valid url in the mobilecssurlfield

      For testing the WS:

      Use this client:
      https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST

      functionname
      moodle_webservice_get_siteinfo

      no parameters

      Check that in the WS returned information the field mobilecssurl is filled correctly

      Show
      Go to Site administration / ► Plugins / ► Web services / ► Mobile Add a valid url in the mobilecssurlfield For testing the WS: Use this client: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST functionname moodle_webservice_get_siteinfo no parameters Check that in the WS returned information the field mobilecssurl is filled correctly
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Go to Site administration / ► Plugins / ► Web services / ► Mobile

      Add a valid url in the mobilecssurlfield

      Call the get_siteinfo WS function, in the result you will notice that mobilecssurl field is empty:

      {"sitename":"XXXX","username":"student01","firstname":"Student","lastname":"Demo","fullname":"Student Demo","lang":"en","userid":3,"siteurl":"http:\/\/xxxx\/moodle24","userpictureurl":"http:\/\/xxxx\/moodle24\/pluginfile.php\/19\/user\/icon\/f1","functions":[

      {"name":"moodle_enrol_get_users_courses","version":"2012120300.06"}

      ,

      {"name":"moodle_enrol_get_enrolled_users","version":"2012120300.06"}

      ,

      {"name":"moodle_user_get_users_by_id","version":"2012120300.06"}

      ,

      {"name":"moodle_webservice_get_siteinfo","version":"2012120300.06"}

      ,

      {"name":"moodle_notes_create_notes","version":"2012120300.06"}

      ,

      {"name":"moodle_user_get_course_participants_by_id","version":"2012120300.06"}

      ,

      {"name":"moodle_user_get_users_by_courseid","version":"2012120300.06"}

      ,

      {"name":"moodle_message_send_instantmessages","version":"2012120300.06"}

      ,

      {"name":"core_course_get_contents","version":"2012120300.06"}

      ,

      {"name":"core_get_component_strings","version":"2012120300.06"}

      ],"downloadfiles":1,"release":"2.4+ (Build: 20121230)","version":"2012120300.06","mobilecssurl":""}

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              jleyva Juan Leyva added a comment -

              The fix is very simple:

              Change:
              $siteinfo['mobilecssurl'] = get_config('admin', 'mobilecssurl');
              for:
              $siteinfo['mobilecssurl'] = get_config(NULL, 'mobilecssurl');

              Show
              jleyva Juan Leyva added a comment - The fix is very simple: Change: $siteinfo ['mobilecssurl'] = get_config('admin', 'mobilecssurl'); for: $siteinfo ['mobilecssurl'] = get_config(NULL, 'mobilecssurl');
              Hide
              jleyva Juan Leyva added a comment -

              Hi Jerome, can you have some time to finish this peer review, is pretty simple and I would like to see this fixed as soon as possible, thanks

              Show
              jleyva Juan Leyva added a comment - Hi Jerome, can you have some time to finish this peer review, is pretty simple and I would like to see this fixed as soon as possible, thanks
              Hide
              jleyva Juan Leyva added a comment -

              Ping for peer reviewer

              Show
              jleyva Juan Leyva added a comment - Ping for peer reviewer
              Hide
              jerome Jérôme Mouneyrac added a comment - - edited

              Hi Juan,
              you can update the phpunit test too and send it to integration.
              Cheers,
              Jerome

              Show
              jerome Jérôme Mouneyrac added a comment - - edited Hi Juan, you can update the phpunit test too and send it to integration. Cheers, Jerome
              Hide
              jleyva Juan Leyva added a comment -

              Hi, I just updated the phpunit tests, Jerome can you send it to integration?

              I have not permission for doing that

              Show
              jleyva Juan Leyva added a comment - Hi, I just updated the phpunit tests, Jerome can you send it to integration? I have not permission for doing that
              Hide
              jerome Jérôme Mouneyrac added a comment -

              done

              Show
              jerome Jérôme Mouneyrac added a comment - done
              Hide
              damyon Damyon Wiese added a comment -

              Thanks Juan,

              I have integrated this to 24, 25 and master.

              Note: I added a patch to use $CFG for these settings instead since that was a better match for the surrounding code.

              Show
              damyon Damyon Wiese added a comment - Thanks Juan, I have integrated this to 24, 25 and master. Note: I added a patch to use $CFG for these settings instead since that was a better match for the surrounding code.
              Hide
              dmonllao David Monllaó added a comment -

              It passes, the css field is filled and the web service returns it as expected

              Show
              dmonllao David Monllaó added a comment - It passes, the css field is filled and the web service returns it as expected
              Hide
              damyon Damyon Wiese added a comment -

              Moodle has many old functions,
              And although they cause no malfunction,
              There comes a day,
              When they get deprecated away,
              And get and put on the list for expulsion.

              Thanks for all the reports/testing/fixes this week. This issue has been sent upstream.

              Show
              damyon Damyon Wiese added a comment - Moodle has many old functions, And although they cause no malfunction, There comes a day, When they get deprecated away, And get and put on the list for expulsion. Thanks for all the reports/testing/fixes this week. This issue has been sent upstream.

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Sep/13