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

Hub registration form not correctly displaying saved values

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      You need to use sites you have never yet registered with moodle.net . Use ngrok to make local test sites visible from internet.

      1. Go to Site administration > Registration
      2. Inspect the default values in the form:
        • country should be your country from the profile. If neither your country nor site default country is set it should be empty and not be defaulting to "Afganistan" (btw we have surprisingly large number of registered sites from Afganistan)
        • postal address and geolocation should be empty (and not "0")
        • contact phone should be pre-filled with the phone from your profile
        • "Email notifications" should be "Yes"
      3. Change "Email notifications" to "No", fill other required fields, add a phone and register your site
      4. Open "Registration" page again
      5. Make sure the form kept the values from the previous registration (especially "Email notifications" and "Phone")
      6. Change "Email notification" to "Yes" and update your registration (note! the email you specify will be actually added to security list)
      7. Open registration form again and make sure the values in the form are correct
      8. Go to "Site administration > Server > Hubs" and unregister your site (this will not remove your email from the security list but you can later unsubscribe)

      Note: since MDL-58694 was integrated in core but the respective patch for the hub is not yet included in moodle.net, it is currently impossible to register 3.4dev site on moodle.net . You can either try to revert commit for MDL-58694 or just skip the registration part of testing on master

      Show
      You need to use sites you have never yet registered with moodle.net . Use ngrok to make local test sites visible from internet. Go to Site administration > Registration Inspect the default values in the form: country should be your country from the profile. If neither your country nor site default country is set it should be empty and not be defaulting to "Afganistan" (btw we have surprisingly large number of registered sites from Afganistan) postal address and geolocation should be empty (and not "0") contact phone should be pre-filled with the phone from your profile "Email notifications" should be "Yes" Change "Email notifications" to "No", fill other required fields, add a phone and register your site Open "Registration" page again Make sure the form kept the values from the previous registration (especially "Email notifications" and "Phone") Change "Email notification" to "Yes" and update your registration (note! the email you specify will be actually added to security list) Open registration form again and make sure the values in the form are correct Go to "Site administration > Server > Hubs" and unregister your site (this will not remove your email from the security list but you can later unsubscribe) Note: since MDL-58694 was integrated in core but the respective patch for the hub is not yet included in moodle.net, it is currently impossible to register 3.4dev site on moodle.net . You can either try to revert commit for MDL-58694 or just skip the registration part of testing on master
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      wip-MDL-58362-master
    • Sprint:
      3.4 Sprint 2

      Description

      the Site Administration -> Registration form saves values into mdl_config_plugins to set defaults on the form - this is currently broken on some fields.

      specifically, 'emailalert' will always have its select item default to option 1 "Yes, please notify me about important issues" which gives the impression you are currently subscribed to the security mailing list.

      The problem is due to saving an int 0 or 1 into the mdl_config_plugins table where the field is set to 'text' and then doing a type & value comparison in code to determine the default select option - as strings are always true the default value is always 1 ( i guess )

       

      There may be other fields on this form that have this issue as i didnt test them all.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Sep/17