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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Roles / Access
    • Labels:
      None
    • Environment:
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07