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

moodle/site:viewuseridentity & others are relevant to all contexts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.5.4, 3.6.2
    • 2.6.4, 2.7.1, 3.4.5, 3.5.2, 3.6.1
    • Roles / Access
    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • Hide
      1. Go to 'Permissions' in the settings for any activity.
      2. Verify that the capabilities moodle/site:accessallgroups, moodle/site:viewfullnames, moodle/site:trustconten and moodle/site:viewuseridentity are all listed there.
      3. Check Permissions in the course settings.
      4. Verify that those four capabilities appear alongside all the rest.
      Show
      Go to 'Permissions' in the settings for any activity. Verify that the capabilities moodle/site:accessallgroups, moodle/site:viewfullnames, moodle/site:trustconten and moodle/site:viewuseridentity are all listed there. Check Permissions in the course settings. Verify that those four capabilities appear alongside all the rest.

    Description

      To reproduce.

      1. Go to any quiz (to pick just one relevant example).
      2. Do Administration -> Check permissions for any user.

      Expected result: moodle/site:viewuseridentity capability is listed, because it affects what can be seen in the quiz reports, or log report.

      Actual result: permisisons for that capability is not shown.

      Because this affects the logs report, it is relevant to all contexts, so it probably needs to be fixed in context_module::get_capabilities. I guess all the context_XXX classes should be reviewed at the same time.

      The following capabilities should similarly be overridable in activity contexts:

      • moodle/site:accessallgroups
      • moodle/site:viewfullnames
      • moodle/site:trustcontent

      Having just worked on MDL-63818 and MDL-63772, I now see that the right fix is to just change the capability definition to say 'contextlevel' => CONTEXT_MODULE, for these caps, then they will show up when overriding permissions in system, course cat, course or module contexts.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Jason Platts Jason Platts
              Jake Dallimore Jake Dallimore
              Anna Carissa Sadia Anna Carissa Sadia
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jan/19

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m