Moodle
  1. Moodle
  2. MDL-29821

Navigation to notes page broken if user cannot access all groups

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Navigation
    • Labels:
      None
    • Testing Instructions:
      Hide
      • Enable notes on your Moodle site.
      • Change capability setting "moodle/site:accessallgroups" to "not set" for role "Nonediting teacher".
      • Create a course.
      • Create a group in the course (make sure that the groupid does not happen to be the same number as the courseid).
      • Enrol a nonediting teacher into the course and group.
      • Log in as the nonediting teacher.
      • In the navigation outline, navigate to the course entry, then "Participants", then click on "Notes".
        Verify that the notes page is being displayed.
      Show
      Enable notes on your Moodle site. Change capability setting "moodle/site:accessallgroups" to "not set" for role "Nonediting teacher". Create a course. Create a group in the course (make sure that the groupid does not happen to be the same number as the courseid). Enrol a nonediting teacher into the course and group. Log in as the nonediting teacher. In the navigation outline, navigate to the course entry, then "Participants", then click on "Notes". Verify that the notes page is being displayed.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When a user has the capability "moodle/notes:view" but not "moodle/site:accessallgroups", he cannot navigate to the notes page using the navigation outline.

      Steps to reproduce:

      • Enable notes on your Moodle site.
      • Change capability setting "moodle/site:accessallgroups" to "not set" for role "Nonediting teacher".
      • Create a course.
      • Create a group in the course (make sure that the groupid does not happen to be the same number as the courseid).
      • Enrol a nonediting teacher into the course and group.
      • Log in as the nonediting teacher.
      • In the navigation outline, navigate to the course entry, then "Participants", then "Notes".
      • Clicking on "Notes" will result in an error message: "Can not find data record in database table course."

      Background: The notes system does not support filtering by group. However, the outline tries to pass a group filter, generating a link to .../notes/index.php?filtertype=course&filterselect=<id> where <id> is the group id. This invalid parameter leads to the error message.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Henning Bostelmann added a comment -

            Since "notes per group" are not implemented - likely not meant to be implemented - it seems best to change the link for the moment. Fix for master on github.

            Show
            Henning Bostelmann added a comment - Since "notes per group" are not implemented - likely not meant to be implemented - it seems best to change the link for the moment. Fix for master on github.
            Hide
            Sam Hemelryk added a comment -

            Sorry Hennning I've only just spotted this now!
            I apologise for my horribly late attention.

            The changes look good for sure and I'll put this up for integration now.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Sorry Hennning I've only just spotted this now! I apologise for my horribly late attention. The changes look good for sure and I'll put this up for integration now. Cheers Sam
            Hide
            Henning Bostelmann added a comment -

            Thanks for reviewing, Sam.

            I've just rebased the fix branch for master. Integrator: please cherry-pick to all 2.x stable branches.

            Show
            Henning Bostelmann added a comment - Thanks for reviewing, Sam. I've just rebased the fix branch for master. Integrator: please cherry-pick to all 2.x stable branches.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Sam Hemelryk added a comment -

            This will be integrated during the next integration cycle thanks Henning

            Show
            Sam Hemelryk added a comment - This will be integrated during the next integration cycle thanks Henning
            Hide
            Sam Hemelryk added a comment -

            Thanks Henning this has been integrated now

            Show
            Sam Hemelryk added a comment - Thanks Henning this has been integrated now
            Hide
            Adrian Greeve added a comment -

            I got a different error message when trying to replicate the problem, but the patch fixes the problem.
            Test passed.
            Thanks!

            Show
            Adrian Greeve added a comment - I got a different error message when trying to replicate the problem, but the patch fixes the problem. Test passed. Thanks!
            Hide
            Eloy Lafuente (stronk7) added a comment -

            The git and cvs repositories are happy receiving your very first contribution to Moodle for 2012. Happy new year!

            Closing, ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The git and cvs repositories are happy receiving your very first contribution to Moodle for 2012. Happy new year! Closing, ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: