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.

Course ordering and invoicing: Difference between revisions

From MoodleDocs
Line 47: Line 47:
# 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.
# 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 cost of the courses===
===Set up the courses===
# Only courses with not-zero cost can be orderd using Course ordering and invoicing module
# Only courses with not-zero cost can be orderd using Course ordering and invoicing module. Set the cost of all orders you want to offer your students
# Do not forget to change course setting 'Course enrollable' to 'No' to prevent users from direct enrolment


==How to customize the invoice==
==How to customize the invoice==

Revision as of 14:24, 25 September 2008

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.

The module uses External database enrolment plugin. 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.

The module was created and is 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


Installation

The source codes 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

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

Post-installation setup

Set up external DB enrolment

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

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.
  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 orderd using Course ordering and invoicing module. Set the cost of all orders 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