install.php 480 B

123456789101112131415161718192021
  1. <?php
  2. // This file replaces:
  3. // * STATEMENTS section in db/install.xml
  4. // * lib.php/modulename_install() post installation hook
  5. // * partially defaults.php
  6. function xmldb_sloodle_install() {
  7. global $DB;
  8. // Moodle 2 only - on Moodle 1.x you'll have to insert them manually...
  9. if ($DB != null) {
  10. $newCurrency = new stdClass();
  11. $newCurrency->name="Credits";
  12. $DB->insert_record('sloodle_currency_types', $newCurrency, false);
  13. }
  14. }