{{ :logo-apl.png?nolink |}} ===== Enrolment in a Course (Purchase for Oneself) - Implementation ===== ===== Product Automation Handler ===== ==== Scenario ==== The main scenario of this handler, on purchase validation, is to enrol the buyer in a course designated by the internal parameters. This enrolment can be done under a role to be defined, **by default the standard Moodle Student role**. If a course intended for user support exists, a secondary enrolment in **customer support** can be triggered. The enrolment can be configured with a duration. By default it is permanent. If the duration is defined and the product is "**renewable**", it will be possible to extend the enrolment duration on the same product code. ==== Implementation ==== ** Data to prepare (prerequisites):** === Date encoding === In a first version, "advanced" date input interfaces are not yet developed. Dates must be given as a number of seconds since the start of the universe date (for Linux fans, of course, this date is January 1st, 1970 at 00:00). You can use an online tool such as [[http://www.timestamp.fr]] to find the integer that represents your date. === Parameter string encoding === The "internal" parameter string is encoded URL-style (key1=value1&key2=value2&etc...) ----- [[:local:shop:structure:handlers:enrolonecourse|See the structure documentation of this handler]] - [[:local:shop:userguide:salesadmin|Back to setting up and running a commercial offer]] -[[:local:shop|Back to the Local Shop component summary]] - [[:start|Back to the catalogue]]