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

3.0 XML-RPC client/server and 3.1 XML-RPC client/server won't talk to each other

XMLWordPrintable

    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-53962-master-alt
    • Hide

      Prerequisites

      NB: Try and read all of these prerequisites before setting stuff up. There's info contained here that will make the process easier.

      This test requires 4 sites (It would probably be wise for all of these sites to be using the branches from integration.git):

      1. A site running 3.0 with the community hub plugin installed
      2. A site running master with the community hub plugin installed
      3. A site running 3.0 with a course
      4. A site running master with a course

      There is some pretty good documentation on how to set up a hub here, some notes:

      1. Just complete the steps under "How to set up a Moodle Hub server" (you can skip the steps about setting up SMTP and recaptcha)
      2. When you set up the hub, just make it a private hub.
      3. It's helpful to make the hub description something like "Stable 30 hub"

      I also found I needed to comment out calls to update_sendy_list on line 204 and 228 in local/hub/lib.php

      I also found it helpful to give names to things that made them easier to identify. For example:

      • I called the 3.0 hub "Hub 30"
      • I called the master hub "Hub Master
      • I called the regular 3.0 site "Stable 30"
      • I called the regular master site "Master"
      • I gave courses/sites descriptions such as "A course made on master", "A course made on 3.0" , "A site running master" etc - this is useful later

      Testing

      NB: Be sure to pay attention to which site these steps are being done on.

      1. On the site running 3.0:
        1. Navigate to "Site administration" > "Server" > "Hubs"
        2. Enter the URL and password of the hub running 3.0 in the "Private hub URL" section.
        3. Click "Select hub", confirm there are no errors
        4. Complete the registration, change "Privacy" to "Publish the site name with a link"
          • Tip: enter something like "Site running 3.0" in the description
        5. Confirm there are no errors (you may see some warnings about deprecated functions, that should be OK)
        6. Press "Continue" and make sure everything seems OK (you should see the hub you just registered with under "Where your site is registered")
      2. On the hub running 3.0:
        1. Navigate to "Hub" > "Manage sites"
        2. Leave the search fields as they are, and press "Search for sites"
        3. Confirm you see the 3.0 site you just registered, confirm all the settings look correct
        4. Navigate to "Site administration" > "Users" > "Accounts" > "Browse a list of users"
        5. You should see a user with a name that contains "DO NOT DELETE OR MODIFY THIS USER!"
        6. Edit that user, give them an email address
          • I don't know if this is really needed, but when I was testing, if I didn't do this I would get an error saying "user not setup" when attempting to publish the course
      3. On the site running 3.0:
        1. Repeat the sub-steps from step 1, except register with the master hub
      4. On the hub running master:
        1. Repeat the sub-steps from step 2
      5. On the site running 3.0:
        1. Navigate to the course
        2. Browse to "Course administration" > "Publish"
        3. Press "Share this course for people to download"
        4. Select the hub running 3.0 (if you followed the naming suggestions, it should be easy to know which is which)
        5. Press "Upload this course to a hub"
        6. Confirm there are no errors, then complete the form:
          • Give a description like "Course pushed from 3.0 to 3.0", put the same in "Creator notes"
          • Select any subject, it doesn't matter
        7. Press "Upload this course to [hub name]", confirm there are no errors
        8. Press "Jump to final step"
        9. Confirm there are no errors and you see something like "Sending course ...finished"
        10. Press "Continue"
        11. You should now be on a page that shows where the course is published. Confirm you see that it's published on the hub running 3.0
      6. On the hub running 3.0:
        1. Navigate to "Hub" > "Manage courses"
        2. You should see the course you just pushed displayed
        3. Verify all the details look correct
        4. Click the eye icon to make the course visible.
      7. On the site running 3.0
        1. Go back to the "Publish" page for the course (if you didn't do anything else, it should still be on that page from before)
        2. Press the "Check it now" link under "Hub listing"
        3. Confirm there are no errors, and it now says "Listed"
      8. Repeat the sub-steps from step 5, but this time push to the hub running master (be sure to change the relevant fields to reflect that you pushed the course from 3.0 to master)
      9. On the hub running master
        1. Repeat the sub-steps from step 6
      10. On the site running 3.0
        1. Repeat the sub-steps from step 7
      11. All of the above needs to be repeated with the site running master
        • i.e., you need to push the course on master to the hub running 3.0 and the hub running master
        • Tip: Be sure to replace any descriptions etc accordingly (e.g., if before you wrote "course pushed from 3.0 to master", now it would be "course pushed from master to master" )
        • Tip: I'm sorry :[
      12. On the site running 3.0:
        1. Navigate to the course
        2. Add the community finder block
        3. Use the community finder to search for "physics" on the moodle.net hub
        4. Confirm you see a course (PAVE Science 20) and there are no errors
        5. Press the "Show all hubs" link
        6. Select the hub running 3.0 and do a search that would find the courses pushed earlier (If you followed the suggested name, you can just search for "course" since each course is named "A course made on [X]"
        7. Confirm there are no errors and confirm you see the course pushed from 3.0 and the course pushed from master
        8. Repeat the previous 2 steps for the hub running master
      13. On the site running master
        1. Repeat all the sub-steps from step 12
      14. On the site running 3.0:
        1. Navigate to the course publish page
        2. Remove the courses from the hub
        3. Confirm there are no errors
      15. Check on each of the hubs that the courses are no longer listed ("Site administration" > "Hub" > "Manage courses")
      16. On the site running master:
        1. Repeat the sub-steps from step 14
      17. Check on each of the hubs that the courses are no longer listed ("Site administration" > "Hub" > "Manage courses")
      18. On the site running 3.0:
        1. Navigate to "Site administration" > "Server" > "Hubs"
        2. Unregister from both hubs (you can check the options if you like, I don't think it matters)
        3. Confirm there are no errors
      19. Check on each of the hubs that site is longer listed ("Site administration" > "Hub" > "Manage sites")
      20. On the site running master
        1. Repeat the sub-steps from step 18
      21. Check on each of the hubs that site is no longer listed ("Site administration" > "Hub" > "Manage sites")

      Finally, it would be prudent to repeat the testing instructions from MDL-52209

      All done! 🎉 🎉 🎉

      Show
      Prerequisites NB : Try and read all of these prerequisites before setting stuff up. There's info contained here that will make the process easier. This test requires 4 sites (It would probably be wise for all of these sites to be using the branches from integration.git): A site running 3.0 with the community hub plugin installed A site running master with the community hub plugin installed A site running 3.0 with a course A site running master with a course There is some pretty good documentation on how to set up a hub here , some notes: Just complete the steps under "How to set up a Moodle Hub server" (you can skip the steps about setting up SMTP and recaptcha) When you set up the hub, just make it a private hub. It's helpful to make the hub description something like "Stable 30 hub" I also found I needed to comment out calls to update_sendy_list on line 204 and 228 in local/hub/lib.php I also found it helpful to give names to things that made them easier to identify. For example: I called the 3.0 hub "Hub 30" I called the master hub "Hub Master I called the regular 3.0 site "Stable 30" I called the regular master site "Master" I gave courses/sites descriptions such as "A course made on master", "A course made on 3.0" , "A site running master" etc - this is useful later Testing NB : Be sure to pay attention to which site these steps are being done on. On the site running 3.0 : Navigate to "Site administration" > "Server" > "Hubs" Enter the URL and password of the hub running 3.0 in the "Private hub URL" section. Click "Select hub", confirm there are no errors Complete the registration, change "Privacy" to "Publish the site name with a link" Tip : enter something like "Site running 3.0" in the description Confirm there are no errors (you may see some warnings about deprecated functions, that should be OK) Press "Continue" and make sure everything seems OK (you should see the hub you just registered with under "Where your site is registered") On the hub running 3.0 : Navigate to "Hub" > "Manage sites" Leave the search fields as they are, and press "Search for sites" Confirm you see the 3.0 site you just registered, confirm all the settings look correct Navigate to "Site administration" > "Users" > "Accounts" > "Browse a list of users" You should see a user with a name that contains "DO NOT DELETE OR MODIFY THIS USER!" Edit that user, give them an email address I don't know if this is really needed, but when I was testing, if I didn't do this I would get an error saying "user not setup" when attempting to publish the course On the site running 3.0 : Repeat the sub-steps from step 1, except register with the master hub On the hub running master : Repeat the sub-steps from step 2 On the site running 3.0 : Navigate to the course Browse to "Course administration" > "Publish" Press "Share this course for people to download" Select the hub running 3.0 (if you followed the naming suggestions, it should be easy to know which is which) Press "Upload this course to a hub" Confirm there are no errors, then complete the form: Give a description like "Course pushed from 3.0 to 3.0", put the same in "Creator notes" Select any subject, it doesn't matter Press "Upload this course to [hub name]", confirm there are no errors Press "Jump to final step" Confirm there are no errors and you see something like "Sending course ...finished" Press "Continue" You should now be on a page that shows where the course is published. Confirm you see that it's published on the hub running 3.0 On the hub running 3.0 : Navigate to "Hub" > "Manage courses" You should see the course you just pushed displayed Verify all the details look correct Click the eye icon to make the course visible. On the site running 3.0 Go back to the "Publish" page for the course (if you didn't do anything else, it should still be on that page from before) Press the "Check it now" link under "Hub listing" Confirm there are no errors, and it now says "Listed" Repeat the sub-steps from step 5, but this time push to the hub running master (be sure to change the relevant fields to reflect that you pushed the course from 3.0 to master) On the hub running master Repeat the sub-steps from step 6 On the site running 3.0 Repeat the sub-steps from step 7 All of the above needs to be repeated with the site running master i.e., you need to push the course on master to the hub running 3.0 and the hub running master Tip : Be sure to replace any descriptions etc accordingly (e.g., if before you wrote "course pushed from 3.0 to master", now it would be "course pushed from master to master" ) Tip : I'm sorry :[ On the site running 3.0 : Navigate to the course Add the community finder block Use the community finder to search for "physics" on the moodle.net hub Confirm you see a course (PAVE Science 20) and there are no errors Press the "Show all hubs" link Select the hub running 3.0 and do a search that would find the courses pushed earlier (If you followed the suggested name, you can just search for "course" since each course is named "A course made on [X]" Confirm there are no errors and confirm you see the course pushed from 3.0 and the course pushed from master Repeat the previous 2 steps for the hub running master On the site running master Repeat all the sub-steps from step 12 On the site running 3.0 : Navigate to the course publish page Remove the courses from the hub Confirm there are no errors Check on each of the hubs that the courses are no longer listed ("Site administration" > "Hub" > "Manage courses") On the site running master : Repeat the sub-steps from step 14 Check on each of the hubs that the courses are no longer listed ("Site administration" > "Hub" > "Manage courses") On the site running 3.0 : Navigate to "Site administration" > "Server" > "Hubs" Unregister from both hubs (you can check the options if you like, I don't think it matters) Confirm there are no errors Check on each of the hubs that site is longer listed ("Site administration" > "Hub" > "Manage sites") On the site running master Repeat the sub-steps from step 18 Check on each of the hubs that site is no longer listed ("Site administration" > "Hub" > "Manage sites") Finally, it would be prudent to repeat the testing instructions from MDL-52209 All done! 🎉 🎉 🎉

      Copy+paste from MDL-52718:

      if community hubs update to moodle 3.1, older clients (3.0 and 2.9) will be sending the parameters incorrectly, and now that we don't offer introspection, Zend won't be able to work out how to send the data.

      I think the fix is as easy as backporting the change from MDL-52718 to 3.0 and 2.9 (I have tested it with 3.0 and it works).

      poltawski made a comment:

      the important point for this issue is backwards compatibility with existing clients using xml-rpc. (Not necessarily community block, we can just fix that one as you have done.. but I worry that other clients out there out of our control will be impacted)

      This will be a problem if people were sending data incorrectly, but in such a way that Zend could work out how to modify the request to be correct. Now if people send incorrect data to a 3.1 site, it will not be possible for Zend (if they are still on <=3.0) to modify the request. And of course if they are on 3.1 there will be no Zend to modify it in the first place. I suppose we need to make a call on whether or not users should be advised to send data correctly, or whether we should implement introspection in 3.1

            cameron1729 cameron1729
            cameron1729 cameron1729
            Damyon Wiese Damyon Wiese
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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