This is a test site. Any changes will be lost!

Course ordering and invoicing: Difference between revisions

From MoodleDocs
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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 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.


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.
Both the module and the enrolment plugin were created and are currently maintained by [[User:David Mudrak|David Mudrak]].
 
The module was created and is currently maintained by [[User:David Mudrak|David Mudrak]].


==Screenshots==
==Screenshots==
Line 14: Line 12:
<br clear="all" />
<br clear="all" />


==Installation==
==Installation of the module==
 
* Moodle 1.8 - checkout [[CVS for Administrators|CVS]] MOODLE_18_STABLE branch or download [http://download.moodle.org/plugins18/mod/cord.zip the 1.8 build]
* Moodle 1.9 - checkout [[CVS for Administrators|CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/mod/cord.zip the 1.9 build]
 
The source codes of the module live in [[CVS for Administrators|CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ 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


* Moodle 1.8 - checkout [[CVS]] HEAD branch or download [http://download.moodle.org/plugins/mod/cord.zip the build]
==Installation of the enrolment plugin==
* newer versions have not been tested yet


The source codes live in [[CVS]] [http://cvs.moodle.org/contrib/plugins/mod/cord/ contrib/plugins/mod/cord]. To checkout the module, go to the Moodle mod/ directory and use:
* Moodle 1.8 - you can use standard [[External database enrolment]] plugin to control enrolments
cvs -z3 -d:ext:myusername@cvs.moodle.org:/cvsroot/moodle co -d cord contrib/plugins/mod/cord
* Moodle 1.9 - checkout [[CVS for Administrators|CVS]] MOODLE_19_STABLE branch or download [http://download.moodle.org/plugins19/enrol/cord.zip the 1.9 build] of the enrolment plugin


TODO: how to setup the module - the outline follows
The source codes of the enrolment plugin live in [[CVS for Administrators|CVS]] [http://cvs.moodle.org/contrib/plugins/enrol/cord/ 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


# set up external DB enrolment
As usually, visit your /admin page to finish the installation.
# create an instance of the module
 
# override desired roles - allow them to order courses (mod/cord:ordercourse)
==Post-installation setup==
# set up the cost of the courses
 
===Moodle 1.9 specific===
* configure and enable the enrolment plugin
 
===Moodle 1.8 specific===
 
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.
 
# Go to the Administration > Courses > Enrolments
# 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
# Enable External Database plugin
 
===Create an instance of the module===
# Usually, you will want just one instance of the module. The Front page is a good place for it.
# 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===
# 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==
Line 53: Line 84:
|-
|-
|}
|}
==UML diagrams==
[[Image:corduml-uc-usersactions.png|thumb|Use case: User's actions|300px|left]]
[[Image:corduml-uc-adminsactions.png|thumb|Use case: Admin's actions|300px|left]]
[[Image:corduml-erd.png|thumb|ER diagram:Module tables and relationships|300px|left]]
[[Image:corduml-sq-orderproc.png|thumb|Sequence diagram:Order processing|300px|left]]
[[Image:corduml-st-orderproc.png|thumb|State diagram:Order processing|300px|left]]
[[Image:corduml-cl-courseorder.png|thumb|Class diagram:Course order classes|300px|left]]
<br clear="all" />


==See also==
==See also==


* [http://moodle.org/mod/data/view.php?d=13&rid=1693 Modules and plugins database record]
* [http://moodle.org/mod/data/view.php?d=13&rid=1693 Modules and plugins database record]

Latest revision as of 11:43, 23 October 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. 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


Installation of the module

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

Installation of the enrolment plugin

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 usually, visit your /admin page to finish the installation.

Post-installation setup

Moodle 1.9 specific

  • configure and enable the enrolment plugin

Moodle 1.8 specific

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