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

user profile shows no courses for admins due to get_my_courses thinking they are guests

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.2
    • 1.8.3, 1.9
    • Roles / Access
    • None
    • MOODLE_18_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      With a fresh install of 1.8.2, the user profile is missing the course listing.

      A bit of debugging in /lib/datalib.php showed that this statement in get_my_courses evaluates to true for site admins, even when they are teachers:

      if (has_capability('moodle/legacy:guest',$sitecontext,$userid,true))

      { return(array()); }

      For students and teachers, there is no problem.

      Attachments

        Activity

          People

            lazyfish Yu Zhang
            mattgibson Matt Gibson
            Nobody Nobody
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07