local:shop:structure:handlers:assignroleoncontext

Role Assignment on Context

Moodle Shop: Production Handlers

Function: allows the buyer to be assigned (or to assign to a third party) a particular role on a predefined context.

Pre-payment parameters

  • customersupport: shortname of the customer support course

Post-payment parameters (execution)

Back-office parameters

  • contextlevel(*): The context level (10 ⇒ system, 30 ⇒ course category, 50 ⇒ course, etc…).
  • instance(*): The instance id corresponding to the context. (A minimal structural knowledge of Moodle is required).
  • role(*): The short name of the role
  • starttime: Enrolment start date expressed in Unix seconds (by default, purchase date) (1)
  • endtime: Enrolment end date expressed in Unix seconds (by default, unlimited) (1)
  • duration: Enrolment duration (alternatively to the end date, the end date is the start date plus the duration) expressed in days. (1)

For example, the product whose lifetime is set to 180 days for the customer: duration=180

(*) mandatory parameters

Front-office parameters

  • foruser: the identification number (IDNumber) of the beneficiary.

Notes

  1. Although the notion of role assignment is not dated in Moodle, the intervention of dates in the handler carries the durations over into the product attributes. If an effective end date is mentioned, then the role assignment will end at the product expiry date.
  2. This product can be renewed through the use of an enrolment period extension handler.

Credits

  • Valéry Frémaux (valery@activeprolearn.com) Design - Development
  • Florence Labord (florence@activeprolearn.com) Functional review - Tests

See the implementation sheet - Back to the structure summary - Back to the component summary Local Shop - Back to the catalog

local/shop/structure/handlers/assignroleoncontext.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki