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

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 2.9
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull Master Branch:
      MDL-49164_old_rego

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15