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

/admin/index.php contains some registration related code that doesn't appear to ever be executed

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.3
    • 2.9
    • Administration
    • MOODLE_28_STABLE
    • MOODLE_29_STABLE
    • MDL-49164_old_rego
    • Hide

      Unused code was removed so testing is just to verify that nothing was broken.
      ----------------------------------------------------------------
      If you don't have a world facing site use ngrok to make your test site publicly available.

      go to /admin/index.php and you should see "Your site is not yet registered." somewhere on the page.

      go to site admin > registration and register your site.

      Once that process is complete return to admin/index.php and the message about not being registered should be gone.

      Go to admin/registration/index.php and unregister.

      return to admin/index.php and the message about not being registered should be back.

      Show
      Unused code was removed so testing is just to verify that nothing was broken. ---------------------------------------------------------------- If you don't have a world facing site use ngrok to make your test site publicly available. go to /admin/index.php and you should see "Your site is not yet registered." somewhere on the page. go to site admin > registration and register your site. Once that process is complete return to admin/index.php and the message about not being registered should be gone. Go to admin/registration/index.php and unregister. return to admin/index.php and the message about not being registered should be back.

    Description

      afaik it can be removed.

      Noticed this while working on MDL-48894.

      These days /admin/index.php displays a notification saying that you are not registered and a button that sends you over to /admin/registration/index.php which handles the registration process. The user is never sent back to /admin/index.php so the following is never executed.

      I don't know how long this has been the case but I suspect it has been quite some time.

      // Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
      if (!empty($id) and $id == $CFG->siteidentifier) {
          set_config('registered', time());
      }
      

      This is only set_config() call that sets the registered item. There is no get_config() call that retrieves it. It appears to be a relic a bygone age.

      Attachments

        Issue Links

          Activity

            People

              andyjdavis Andrew Davis
              andyjdavis Andrew Davis
              Simey Lameze Simey Lameze
              Andrew Lyons Andrew Lyons
              Martin Mastny Martin Mastny
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15