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

print_user() currently gets it's own context, should also check user context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      print_user() prints a user with little shortcut links to activity reports etc

      To print these it uses has_capability() against the course $context.

      However, to cope with cases like parent roles, it should also check against the user context (just like those profile sub-pages themselves do)

      Now that user/index.php includes the user context info with the $user object this is available cheaply, so it should be simple to modify the capability checks in print_user() to use them.

        Attachments

          Activity

            People

            Assignee:
            lazyfish Yu Zhang
            Reporter:
            dougiamas Martin Dougiamas
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08