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

get_my_courses doesn't properly generate the user accessdata when userid != $USER->id

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.9
    • Fix Version/s: None
    • Component/s: Libraries
    • Labels:
      None
    • Database:
      Any
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      Problem:
      When an administrator visits a user's profile page it can sometimes load a course list different from what the user sees.

      How to duplicate:

      • Override the permission moodle/course:view on a course
      • View any user profile not enrolled in the course and without a site level role
        • notice that the above course is not in the user's courses
      • login as the user and view the user profile
        • notice the above course now appears

      MDL-8902 This is a better solution than the attached patch then update user/view.php and replace get_my_courses with get_my_enrolled_courses

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting this issue.

              We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

              If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

              Michael d;

              lqjjLKA0p6

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
              Hide
              salvetore Michael de Raadt added a comment -

              I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

              Show
              salvetore Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: