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

Roles assignment not synchronised with the role of the user

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Roles / Access
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      1.Login as a teacher
      2.Inside a course ,choose settings->user->enrolled users
      3.Now for one enrolled user ,delete all its role make it empty,now click on the other enrolled user and try to assign the rule
      4.Enrollment window is not synchronized with the role of the user,like for example if the user is just "student" now the enrollment window will not only have disable student button but it might have a disable "non editable teacher" which is wrong

        Gliffy Diagrams

          Attachments

          1. enrollment.png
            enrollment.png
            77 kB
          2. patch.txt
            0.8 kB
          3. patch.txt
            0.6 kB
          4. patch.txt
            0.6 kB

            Activity

            Hide
            tsala Helen Foster added a comment -

            Nikhil, thanks for your report. It seems the Ajaxy interface gets confused when attempting to remove then add roles.

            Show
            tsala Helen Foster added a comment - Nikhil, thanks for your report. It seems the Ajaxy interface gets confused when attempting to remove then add roles.
            Hide
            nikhilgupta0901 Nikhil Gupta added a comment -

            I have fixed the bug and attaching the patch file with it.

            Show
            nikhilgupta0901 Nikhil Gupta added a comment - I have fixed the bug and attaching the patch file with it.
            Hide
            skodak Petr Skoda added a comment -

            Reassigning to code author, the attached patch does not solve the problem for me, there is a bug somewhere in the role assign code.

            How to reproduce:
            1/ enrol at least 3 users to a course with 3 different role
            2/ refresh page
            3/ click on add roles of the first user - work (1 non selectable)
            4/ click on add roles of the second user - problem (2 non selectable)
            5/ click on add roles of the third user - problem (3 non selectable)
            6/ refresh page, try clicking in different order

            It looks like the list of assignable roles from previous dialog affects the next one...

            Show
            skodak Petr Skoda added a comment - Reassigning to code author, the attached patch does not solve the problem for me, there is a bug somewhere in the role assign code. How to reproduce: 1/ enrol at least 3 users to a course with 3 different role 2/ refresh page 3/ click on add roles of the first user - work (1 non selectable) 4/ click on add roles of the second user - problem (2 non selectable) 5/ click on add roles of the third user - problem (3 non selectable) 6/ refresh page, try clicking in different order It looks like the list of assignable roles from previous dialog affects the next one...
            Hide
            nikhilgupta0901 Nikhil Gupta added a comment -

            srry i incorrectly make the patch, try it now...srry for the incovenience...

            Show
            nikhilgupta0901 Nikhil Gupta added a comment - srry i incorrectly make the patch, try it now...srry for the incovenience...
            Hide
            nikhilgupta0901 Nikhil Gupta added a comment -

            @skodak i made the patch incorrectly ...now i am submitting the patch again and its working good with the change and have tried your above example also and its working good at it ...

            Show
            nikhilgupta0901 Nikhil Gupta added a comment - @skodak i made the patch incorrectly ...now i am submitting the patch again and its working good with the change and have tried your above example also and its working good at it ...
            Hide
            skodak Petr Skoda added a comment -

            thanks! I will test it later today.

            Show
            skodak Petr Skoda added a comment - thanks! I will test it later today.
            Hide
            skodak Petr Skoda added a comment -

            This issue will be fixed in the next weekly build, thanks a lot for the report and the patch!

            Petr

            Show
            skodak Petr Skoda added a comment - This issue will be fixed in the next weekly build, thanks a lot for the report and the patch! Petr

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/May/11