Course ordering and invoicing

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Course ordering and invoicing.

The module allows authenticated users to fill course enrolment order form. Payment reminder is sent automatically. Administrator has to manually approve the order, eg. according to a bank account listings. After approving the order, the invoice is emailed to the users. Supports VAT calculation (since 1.9). The module uses its own enrolment plugin that has to be installed. It may be useful for sites where users must pay to be enrolled into a course but for some reasons, PayPal and other plugins can not be used.

Both the module and the enrolment plugin were created and are currently maintained by David Mudrak.

Screenshots

The ordering form
Order confirmation
List of user's orders
The list of all approved orders
Example of PDF invoice produced by the module


Step 1 - Installation of the module

  • Moodle 1.8 - checkout CVS MOODLE_18_STABLE branch or download the 1.8 build module zip file
  • Moodle 1.9 - checkout CVS MOODLE_19_STABLE branch or download the 1.9 build module zip file

If you download the zip file, unzip then install the cord/ folder into your moodle mod/ folder.

The source codes of the module live in CVS contrib/plugins/mod/cord. To checkout the MOODLE_19_STABLE branch of the module, go to the Moodle mod/ directory and use:

cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/mod/cord

Step 2 -Installation of the enrolment plugin

If you download the zip file, unzip then install the cord/ folder into your moodle enrol/ folder.

The source codes of the enrolment plugin live in CVS contrib/plugins/enrol/cord. To checkout the MOODLE_19_STABLE branch of the plugin, go to the Moodle enrol/ directory and use:

cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord -r MOODLE_19_STABLE contrib/plugins/enrol/cord

As usual, visit your /admin page to finish the installation.

Step 3 - Post-installation setup

Moodle 1.9

  • configure and enable the enrolment plugin (admin > courses > enrolments)

Moodle 1.8

The module saves the information about confirmed course orders into its own table. This table can be used by External database enrolment plugin to control enrolments. You need to configure your Moodle site to use External database enrolment to use this module.

  1. Go to the Administration > Courses > Enrolments
  2. Edit settings of External Database
    • enrol_dbtype, enrol_dbhost, enrol_dbuser, enrol_dbpass, enrol_dbname - set these fields point to the Moodle database itself, i.e. use the same values as are in your config.php
    • enrol_dbtable = mdl_cord_enrolments (use your own prefix instead of mdl_ if you have such one)
    • enrol_localcoursefield = id
    • enrol_localuserfield = id
    • enrol_db_localrolefield = shortname
    • enrol_remotecoursefield = courseid
    • enrol_remoteuserfield = userid
    • enrol_db_defaultcourseroleid = default
    • enrol_db_autocreate = No
  3. Enable External Database plugin

Both Moodle 1.9 and 1.8

Create an instance of the module

  1. Usually, you will want just one instance of the module. The Front page is a good place for it (add an Activity > Course Order).
  2. Override desired roles and allow them to order courses (mod/cord:ordercourse). You will probably want to allow Authenticated user role to order your courses.

Set up the courses

  1. Only courses with not-zero cost can be ordered using Course ordering and invoicing module. Within your course(s) Settings, select the Course Ordering enrolment plugin, save then again within Settings set the cost of the course(s) you want to offer your students
  2. Do not forget to change course setting 'Course enrollable' to 'No' to prevent users from direct enrolment

How to customize the invoice

TODO

How to report a bug

Please, use Tracker. Course ordering if one of the components in "Non-core contributed modules" project. See the list of tracked issues at http://tracker.moodle.org/browse/CONTRIB/component/10327.

Capabilities

Capability Description Status
mod/cord:ordercourse a user can submit course ordering form implemented
mod/cord:manageorders a user can approve or delete submitted orders implemented

UML diagrams

Use case: User's actions
Use case: Admin's actions
ER diagram:Module tables and relationships
Sequence diagram:Order processing
State diagram:Order processing
Class diagram:Course order classes


See also