Moodle
  1. Moodle
  2. MDL-39563

mobilecssurl is not being returned in WebService get_siteinfo function

    Details

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

      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":""}

        Issue Links

          Activity

          Hide
          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
          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
          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
          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
          Juan Leyva added a comment -

          Ping for peer reviewer

          Show
          Juan Leyva added a comment - Ping for peer reviewer
          Hide
          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
          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
          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
          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
          Jérôme Mouneyrac added a comment -

          done

          Show
          Jérôme Mouneyrac added a comment - done
          Hide
          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 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
          David Monllaó added a comment -

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

          Show
          David Monllaó added a comment - It passes, the css field is filled and the web service returns it as expected
          Hide
          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 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: