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

Users with /enrol/paypal:unenrol permission not able to edit or delete PayPal enrolments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.2.7, 2.3.4, 2.4.1
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide
      1. Visit <yoursite>/admin/settings.php?section=manageenrols and turn on PayPal.
      2. Click on the settings and set PayPal your PayPal account
      3. In the config.php file add '$CFG->usepaypalsandbox = true;'
      4. Create a course that uses the PayPal enrolment plugin and set the price to $1.
      5. Log in as a student and click on the course, then the PayPal link.
      6. Enter your email and password.
      7. Confirm payment and click on the link to go back to your Moodle site.
      8. Login as admin or another user with the capability "enrol/paypal:unenrol".
      9. Go into the course created above.
      10. Go to "Course administration/Users/Enrolled users".
      11. The student you enroled above should be listed including the unenrol icon on the left side.
      12. Click on this icon and follow the process. There shouldn't be any error messages.
      13. Check that the user is unenroled from this course.
      Show
      Visit <yoursite>/admin/settings.php?section=manageenrols and turn on PayPal. Click on the settings and set PayPal your PayPal account In the config.php file add '$CFG->usepaypalsandbox = true;' Create a course that uses the PayPal enrolment plugin and set the price to $1. Log in as a student and click on the course, then the PayPal link. Enter your email and password. Confirm payment and click on the link to go back to your Moodle site. Login as admin or another user with the capability "enrol/paypal:unenrol". Go into the course created above. Go to "Course administration/Users/Enrolled users". The student you enroled above should be listed including the unenrol icon on the left side. Click on this icon and follow the process. There shouldn't be any error messages. Check that the user is unenroled from this course.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-34591_master

      Description

      Neither the manager nor the super admin can delete or edit a PayPal enrollment. Possibly related, the student cannot reenroll through PayPal. He/she can be enrolled manually, or by another method, but not through PayPal.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            thanks for the report

            Show
            skodak Petr Skoda added a comment - thanks for the report
            Hide
            icauto Doug added a comment -

            Isnt this a duplicate of :

            http://tracker.moodle.org/browse/MDL-32387

            Looks the same to me?

            Doug

            Show
            icauto Doug added a comment - Isnt this a duplicate of : http://tracker.moodle.org/browse/MDL-32387 Looks the same to me? Doug
            Hide
            jeffsibi Jeff Rader added a comment -

            It may have the same root cause, but the problem is different. 32387 has more to do with not allowing users to re-enroll using the same enrollment method. This is similar, but in earlier versions (I'm not sure how far back it changed, but 2.0 worked) the admin could adjust the enrollment end date to allow extending the enrollment date.

            For both of these, previous functionality was taken away in the upgrades. If I get some time, I'll try to trace back where it changed.

            Show
            jeffsibi Jeff Rader added a comment - It may have the same root cause, but the problem is different. 32387 has more to do with not allowing users to re-enroll using the same enrollment method. This is similar, but in earlier versions (I'm not sure how far back it changed, but 2.0 worked) the admin could adjust the enrollment end date to allow extending the enrollment date. For both of these, previous functionality was taken away in the upgrades. If I get some time, I'll try to trace back where it changed.
            Hide
            icauto Doug added a comment -

            That makes sense.

            Thanks.

            If you look at the Tracker and search for PayPal issues. There are many since PayPal was made part of the core. We need to get them fixed as many people are limping that are using PayPal.

            Thanks

            Doug

            Show
            icauto Doug added a comment - That makes sense. Thanks. If you look at the Tracker and search for PayPal issues. There are many since PayPal was made part of the core. We need to get them fixed as many people are limping that are using PayPal. Thanks Doug
            Hide
            grabs Andreas Grabs added a comment -

            Hi, it's just the unenrol feature only what I have fixed here but better than nothing .
            Best regards
            Andreas

            Show
            grabs Andreas Grabs added a comment - Hi, it's just the unenrol feature only what I have fixed here but better than nothing . Best regards Andreas
            Hide
            icauto Doug added a comment -

            Hello,

            So this will allow me to see a RED unenroll for the student like other forms of enrollment do today?

            Thanks

            doug

            Show
            icauto Doug added a comment - Hello, So this will allow me to see a RED unenroll for the student like other forms of enrollment do today? Thanks doug
            Hide
            grabs Andreas Grabs added a comment -

            Yes with this patch you will be able to unenrol the users in the same way as selfenrol for instance.
            Andreas

            Show
            grabs Andreas Grabs added a comment - Yes with this patch you will be able to unenrol the users in the same way as selfenrol for instance. Andreas
            Hide
            icauto Doug added a comment -

            THANK YOU very much.

            That is one step in the right direction. Is it final now and tested so users can use it?

            I am not sure how this works.

            Doug

            Show
            icauto Doug added a comment - THANK YOU very much. That is one step in the right direction. Is it final now and tested so users can use it? I am not sure how this works. Doug
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Andreas, this has been integrated now.

            Doug, now that this has been integrated it is inline to be included with the next weekly releases, although it must first pass testing.
            Providing it does when we release the next weekly releases on either Thursday or Friday this will be considered fix.
            If you are not using the weekly releases you will need to wait until the next minor release (2.2.7, 2.3.4, or 2.4.1) in a months time.

            Many thanks
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Andreas, this has been integrated now. Doug, now that this has been integrated it is inline to be included with the next weekly releases, although it must first pass testing. Providing it does when we release the next weekly releases on either Thursday or Friday this will be considered fix. If you are not using the weekly releases you will need to wait until the next minor release (2.2.7, 2.3.4, or 2.4.1) in a months time. Many thanks Sam
            Hide
            jeffsibi Jeff Rader added a comment -

            I don't mean to mess things up, but I didn't have time to review things previously. I have taken Doug's patch and added in functionality to edit the paypal enrolment as well.
            https://github.com/coderader/moodle_23/tree/MDL-34591
            Sorry, I haven't figured out the best way for me to submit something like this.

            Show
            jeffsibi Jeff Rader added a comment - I don't mean to mess things up, but I didn't have time to review things previously. I have taken Doug's patch and added in functionality to edit the paypal enrolment as well. https://github.com/coderader/moodle_23/tree/MDL-34591 Sorry, I haven't figured out the best way for me to submit something like this.
            Hide
            icauto Doug added a comment -

            Jeff,

            What are you stating? That you took Andreas patch above, and added the functionality to edit the Paypal enrollment(such as length of time) to Andreas patch giving us the ability to delete the student or unenroll them?

            Thanks

            doug

            Show
            icauto Doug added a comment - Jeff, What are you stating? That you took Andreas patch above, and added the functionality to edit the Paypal enrollment(such as length of time) to Andreas patch giving us the ability to delete the student or unenroll them? Thanks doug
            Hide
            jeffsibi Jeff Rader added a comment -

            Yes. I thought you did the patch, but I guess it was Andreas'. Should we throw this over into a new issue or try to fix it here.

            Show
            jeffsibi Jeff Rader added a comment - Yes. I thought you did the patch, but I guess it was Andreas'. Should we throw this over into a new issue or try to fix it here.
            Hide
            damyon Damyon Wiese added a comment -

            Test passed - works as expected.

            Thanks!

            Show
            damyon Damyon Wiese added a comment - Test passed - works as expected. Thanks!
            Hide
            damyon Damyon Wiese added a comment -

            (Tested on 22, 23 and master).

            Show
            damyon Damyon Wiese added a comment - (Tested on 22, 23 and master).
            Hide
            icauto Doug added a comment -

            Jeff,

            I do not know. That would be up to the powers to be. I am just happy it is getting done.

            Question to moodle community, how does Jeff get his fix for moodle tested and implemented for paypal so future updates of moodle include them?

            Doug

            Show
            icauto Doug added a comment - Jeff, I do not know. That would be up to the powers to be. I am just happy it is getting done. Question to moodle community, how does Jeff get his fix for moodle tested and implemented for paypal so future updates of moodle include them? Doug
            Hide
            damyon Damyon Wiese added a comment -

            Yes, if you have additional fixes, put them in a separate issue.

            Show
            damyon Damyon Wiese added a comment - Yes, if you have additional fixes, put them in a separate issue.
            Hide
            jeffsibi Jeff Rader added a comment -

            So, I need to resubmit this somewhere Damyon?

            Show
            jeffsibi Jeff Rader added a comment - So, I need to resubmit this somewhere Damyon?
            Hide
            icauto Doug added a comment -

            Hello,

            Just start a new Tracker item. Copy me when you do it so i can follow it.

            Doug

            Show
            icauto Doug added a comment - Hello, Just start a new Tracker item. Copy me when you do it so i can follow it. Doug
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

            Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao
            Hide
            jeffsibi Jeff Rader added a comment - - edited

            I created a new Bug for the edit section MDL-37175

            Show
            jeffsibi Jeff Rader added a comment - - edited I created a new Bug for the edit section MDL-37175

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13