* Install moodle build-in licenses
*/
static public function install_licenses() {
+ $active_licenses = array();
+
$license = new stdclass;
$license->shortname = 'unknown';
$license->source = '';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'allrightsreserved';
$license->source = 'http://en.wikipedia.org/wiki/All_rights_reserved';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'public';
$license->source = 'http://creativecommons.org/licenses/publicdomain/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'cc';
$license->source = 'http://creativecommons.org/licenses/by/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'cc-nd';
$license->source = 'http://creativecommons.org/licenses/by-nd/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'cc-nc-nd';
$license->source = 'http://creativecommons.org/licenses/by-nc-nd/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'cc-nc';
$license->source = 'http://creativecommons.org/licenses/by-nd/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'cc-nc-sa';
$license->source = 'http://creativecommons.org/licenses/by-nc-sa/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
$license->shortname = 'cc-sa';
$license->source = 'http://creativecommons.org/licenses/by-sa/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
+ $active_licenses[] = $license->shortname;
self::add($license);
+
+ set_config('licenses', implode(',', $active_licenses));
}
}