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

User Complete/Outline report will not show activities with "view" capability to parent role

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.9.6, 3.0.4
    • 3.0
    • Reports
    • MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-53500-master
    • Hide
      1. Create a course and make sure that Show activity reports is set to Yes.
      2. Enrol a student (the child)
        • Make sure the child is enrolled in the course and has some data on the user outline report - good to have some stuff from the forum activity and an activity that uses the "view" capability like the assignment. (make sure the user is assigned a grade for the assignment)
      3. Set up a parent role: https://docs.moodle.org/28/en/Parent_role
      4. Create another user (the parent) and assign the parent role to the child.
      5. Login as the parent and view the user profile within the course, view the outline report and make sure all activities are displayed (not just forum activity)
      Show
      Create a course and make sure that Show activity reports is set to Yes. Enrol a student (the child) Make sure the child is enrolled in the course and has some data on the user outline report - good to have some stuff from the forum activity and an activity that uses the "view" capability like the assignment. (make sure the user is assigned a grade for the assignment) Set up a parent role: https://docs.moodle.org/28/en/Parent_role Create another user (the parent) and assign the parent role to the child. Login as the parent and view the user profile within the course, view the outline report and make sure all activities are displayed (not just forum activity)

    Description

      The outline and complete user reports (shown under reports on the users profile page) will not show activities that have a "view" capability to the parent role.

      Example - The attendance activity defines the "mod/attendance:view" capability and the modinfo built for the parent role sets uservisible using is_user_access_restricted_by_capability() for each module before allowing it to be displayed - which means that the parent user must be enrolled in the course to allow the outline/complete report to show for that course/user.
      The Forum activity does not have a mod/forum:view capability so this activity will show to users with a parent role.

      I wonder if we could write a hook to the user complete/outline reports that allowed a module to override the uservisible flag and allow the module to check if the user can access the module instead?
      https://github.com/moodle/moodle/blob/master/report/outline/user.php#L126

      I'm not sure how that hook should look - I'm happy to do the development on this if someone has any great ideas!

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              danmarsden Dan Marsden
              cameron1729 cameron1729
              Andrew Lyons Andrew Lyons
              Jun Pataleta Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.