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

Unable to access site home for non-site admin user on moodle 2.0.6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.0.6
    • None
    • Any
    • Any
    • MOODLE_20_STABLE
    • Hide

      Amend code as shown above.

      Show
      Amend code as shown above.
    • Hide

      Login as non admin, click site home.

      Show
      Login as non admin, click site home.

      When logged in as a non-site admin on moodle 2.0.6, clicking on "Site Home" redirects directly to "My Home" so the user can never reach "Site Home".
      This is caused by the logic in index.php for site home being incorrect.

      Currently as :
      } else if ($CFG->defaulthomepage == HOMEPAGE_MY && (optional_param('redirect', true, PARAM_BOOL) || !$hassiteconfig))

      { redirect($CFG->wwwroot .'/my/'); Which redirects if the deafault home page is My Home AND either the redirect param is true OR user is not a site admin But this means that non-site admin users cannot reach Site Home. Should be : }

      else if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', true, PARAM_BOOL) && !$hassiteconfig) {
      redirect($CFG->wwwroot .'/my/');

        1. fix.diff
          0.9 kB
          Matthieu Raggett

            moodle.com Moodle HQ
            mraggett Matthieu Raggett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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