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

enrolment key input field does not show on /course/enrol.php because /enrol/manual/enrol.html is included from /enrol/paypal/enrol.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      Does not matter
    • Affected Branches:
      MOODLE_18_STABLE

      Description

      When both a course fee and an enrolment key is specified, an enrolling student is supposed to able to enrol either by paying the fee or by entering the enrolment key.

      However, the input field for the enrolment key is not shown on the page /course/enrol.php. Only the paypal option is presented to the prospective student.

      ___________________________________________________________________________________________

      Reason:

      In /enrol/manual/enrol.html there is a function call $this->print_enrolmentkeyfrom( $course );
      $this, however, refers to an enrolment_plugin_paypal object (and not to an enrolmant_plugin_manual object) because /enrol/manual/enrol.html is included by enrolment_plugin_paypal::print_entry($course)

      ___________________________________________________________________________________________

      Work around: In /enrol/manual/enrol.html on line 7 replace

      $this->print_enrolmentkeyfrom( $course );

      by

      enrolment_plugin_manual::print_enrolmentkeyfrom( $course );

      As far as I know, this bug is still present in Moodle 1.8.4 and 1.9

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dougiamas Martin Dougiamas
              Reporter:
              chessweb Ralf Seliger
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: