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

When token is rejected from moodle.net provide UI to "forget registration"

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      When MDLSITE-4780 is completed

      Test 1
      1. Use ngrok to make the site available from internet
      2. Register the site
      3. Modify table mdl_registration_hubs in the db and replace token with random string
      4. go to site administration>registration and update the site, it should request new token silently
      5. modify token again in the db
      6. run "Site registration" scheduled task:

        php admin/tool/task/cli/schedule_task.php --execute="\core\task\registration_cron_task"
        

        1. Confirm that it displays an error that the token was not found
      7. check that your site now thinks that it is not registered
      8. register again
      9. unregister the site
      Test 2.
      1. Register the site
      2. Change site url (restart ngrok)
      3. Update your registration
        1. Confirm that you are redirect to the page that asks what do you want to do with your site
      4. choose "Update registration url for an existing site", and complete registration
      5. Change site url again
      6. Click on "Unregister" and submit the form
        1. Confirm that an error was displayed to inform you that the url does not match but your token was deleted
          (note, site initial registration was not deleted from moodle.net, this is done on purpose as a solution for copied sites).
      7. Register the site again
        1. Confirm that you are redirect to the page that asks what do you want to do with the existing registration
      8. Choose "Update registration url for an existing site"
      9. Unregister the site
      Show
      When MDLSITE-4780 is completed Test 1 Use ngrok to make the site available from internet Register the site Modify table mdl_registration_hubs in the db and replace token with random string go to site administration>registration and update the site, it should request new token silently modify token again in the db run "Site registration" scheduled task: php admin/tool/task/cli/schedule_task.php --execute="\core\task\registration_cron_task" Confirm that it displays an error that the token was not found check that your site now thinks that it is not registered register again unregister the site Test 2. Register the site Change site url (restart ngrok) Update your registration Confirm that you are redirect to the page that asks what do you want to do with your site choose "Update registration url for an existing site", and complete registration Change site url again Click on "Unregister" and submit the form Confirm that an error was displayed to inform you that the url does not match but your token was deleted (note, site initial registration was not deleted from moodle.net, this is done on purpose as a solution for copied sites). Register the site again Confirm that you are redirect to the page that asks what do you want to do with the existing registration Choose "Update registration url for an existing site" Unregister the site
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:
      wip-MDL-61424-35
    • Pull Master Branch:
      wip-MDL-61424-master

      Description

      In the situations similar to MDLSITE-5362 and MDLSITE-4780 it can occur that a moodle site thinks that it is registered but moodle.net does not have registration information.

      As part of the error message that "token not found" offer admin to register the site again

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18