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

Add an option to display title for the enrol_fee enrolment

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • Hide
      • Before upgrade
      • Create a payment gateway and a payment account with some random data (for this test it does not matter if it does not work). See https://docs.moodle.org/405/en/Payment_gateways
      • Enable enrol_fee ("Enrolment on payment") plugin
      • Add an instance of enrol_fee to a course (use the payment account you set up above), set a non-zero 'Enrolment fee' value for it and a 'Custom instance name'
      • Add an instance of enrol_fee to another course, set a non-zero 'Enrolment fee' value for it but do not set a 'Custom instance name'
      • As a teacher observe how the enrolment method is displayed on both courses "Enrolment methods" pages
      • As a regular user who is not enrolled in this course, go to the course enrolment page
      • Make sure you see the prompts to pay (note, that the custom instance name is not displayed)
      • Pull the patch and run upgrade
      • As a teacher, go to the course enrolment page for both courses
      • Ensure that you can STILL see the custom name you set in the course 1 (it will be displayed differently)
      • As a regular user, go to the course enrolment page
      • Ensure that you STILL do not see the custom names of the instances
      • As a teacher, go to the first course enrolment methods and edit the enrol_fee method
      • Make sure that "Custom instance name" is empty but the "Description" is populated with what used to be the custom instance name from before the upgrade
      • Add a new custom instance name and save
      • Make sure you see both on the course enrolment methods page
      • As a regular student, make sure you can now see the the new custom instance name on the course enrolment page
      Show
      Before upgrade Create a payment gateway and a payment account with some random data (for this test it does not matter if it does not work). See https://docs.moodle.org/405/en/Payment_gateways Enable enrol_fee ("Enrolment on payment") plugin Add an instance of enrol_fee to a course (use the payment account you set up above), set a non-zero 'Enrolment fee' value for it and a 'Custom instance name' Add an instance of enrol_fee to another course, set a non-zero 'Enrolment fee' value for it but do not set a 'Custom instance name' As a teacher observe how the enrolment method is displayed on both courses "Enrolment methods" pages As a regular user who is not enrolled in this course, go to the course enrolment page Make sure you see the prompts to pay (note, that the custom instance name is not displayed) Pull the patch and run upgrade As a teacher, go to the course enrolment page for both courses Ensure that you can STILL see the custom name you set in the course 1 (it will be displayed differently) As a regular user, go to the course enrolment page Ensure that you STILL do not see the custom names of the instances As a teacher, go to the first course enrolment methods and edit the enrol_fee method Make sure that "Custom instance name" is empty but the "Description" is populated with what used to be the custom instance name from before the upgrade Add a new custom instance name and save Make sure you see both on the course enrolment methods page As a regular student, make sure you can now see the the new custom instance name on the course enrolment page
    • Hide

      Code verified against automated checks.

      Checked MDL-84139 using repository: https://github.com/marinaglancy/moodle

      More information about this report

      Built on: Fri Mar 7 08:56:23 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84139 using repository: https://github.com/marinaglancy/moodle main (0 errors / 0 warnings) [branch: MDL-84139 | CI Job ] More information about this report Built on: Fri Mar 7 08:56:23 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84139 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18365/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62874/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62875/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62876/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62877/ App tests (stable app version) / complete) Built on: Wed Feb 26 11:47:27 PM UTC 2025
    • 2
    • WP Sprint 2025-I1.1 (Espresso), WP Sprint 2025-I1.2 (Espresso)

      If a course has several instances of the enrol_fee plugin ("Enrolment on payment"), it is not possible to add any additional information on the course enrolment page. Apart from that, the fact that we do not display a title for this enrolment method, is not consistent with other enrolment plugins.

      Here is the example:

      I add two instances of the enrol_fee method to the same course

      1. One month access. $9.99
      2. Life time access $99.00

      It is possible to configure as a teacher:


      But the student will see this:

      On the screenshot above I also added "Self-enrolment" and "PayPal" instances, both of which have titles that can be configured.

      Note that the enrol_fee has a hardcoded string "This course requires a payment for entry" and all three methods have completely different styling

        1. (1) Passed -- (Main)MDL-84139.png
          (1) Passed -- (Main)MDL-84139.png
          78 kB
        2. (2) Passed -- (Main)MDL-84139.png
          (2) Passed -- (Main)MDL-84139.png
          43 kB
        3. (3) Passed -- (Main)MDL-84139.png
          (3) Passed -- (Main)MDL-84139.png
          107 kB
        4. (4) Passed -- (Main)MDL-84139.png
          (4) Passed -- (Main)MDL-84139.png
          46 kB
        5. configuration.png
          configuration.png
          62 kB
        6. studentview.png
          studentview.png
          80 kB
        7. studentview2.png
          studentview2.png
          28 kB
        8. teacher1.png
          teacher1.png
          75 kB
        9. teacherview2.png
          teacherview2.png
          29 kB
        10. teacherview21.png
          teacherview21.png
          37 kB

            marina Marina Glancy
            marina Marina Glancy
            David Carrillo David Carrillo
            Paul Holden Paul Holden
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 36 minutes
                6h 36m

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