mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 08:09:47 +02:00
Added JS template field for JavaScript if needed
This commit is contained in:
parent
f9e2f481df
commit
8ac4971405
7 changed files with 22 additions and 9 deletions
|
@ -90,12 +90,13 @@ function data_backup_one_mod($bf,$preferences,$data) {
|
|||
fwrite ($bf,full_tag("RSSARTICLES",4,false,$data->rssarticles));
|
||||
fwrite ($bf,full_tag("SINGLETEMPLATE",4,false,$data->singletemplate));
|
||||
fwrite ($bf,full_tag("LISTTEMPLATE",4,false,$data->listtemplate));
|
||||
fwrite ($bf,full_tag("ADDTEMPLATE",4,false,$data->addtemplate));
|
||||
fwrite ($bf,full_tag("RSSTEMPLATE",4,false,$data->rsstemplate));
|
||||
fwrite ($bf,full_tag("CSSTEMPLATE",4,false,$data->csstemplate));
|
||||
fwrite ($bf,full_tag("RSSTITLETEMPLATE",4,false,$data->rsstitletemplate));
|
||||
fwrite ($bf,full_tag("LISTTEMPLATEHEADER",4,false,$data->listtemplateheader));
|
||||
fwrite ($bf,full_tag("LISTTEMPLATEFOOTER",4,false,$data->listtemplatefooter));
|
||||
fwrite ($bf,full_tag("ADDTEMPLATE",4,false,$data->addtemplate));
|
||||
fwrite ($bf,full_tag("RSSTEMPLATE",4,false,$data->rsstemplate));
|
||||
fwrite ($bf,full_tag("RSSTITLETEMPLATE",4,false,$data->rsstitletemplate));
|
||||
fwrite ($bf,full_tag("CSSTEMPLATE",4,false,$data->csstemplate));
|
||||
fwrite ($bf,full_tag("JSTEMPLATE",4,false,$data->jstemplate));
|
||||
fwrite ($bf,full_tag("APPROVAL",4,false,$data->approval));
|
||||
fwrite ($bf,full_tag("SCALE",4,false,$data->scale));
|
||||
fwrite ($bf,full_tag("ASSESSED",4,false,$data->assessed));
|
||||
|
|
|
@ -67,6 +67,11 @@ function data_upgrade($oldversion) {
|
|||
if ($oldversion < 2006052400) {
|
||||
table_column('data','','rsstitletemplate','text','','','','not null','rsstemplate');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006081700) {
|
||||
table_column('data', '', 'jstemplate', 'text', '', '', '', 'not null', 'csstemplate');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ CREATE TABLE prefix_data (
|
|||
rsstemplate text NOT NULL default '',
|
||||
rsstitletemplate text NOT NULL default '',
|
||||
csstemplate text NOT NULL default '',
|
||||
jstemplate text NOT NULL default '',
|
||||
approval tinyint(4) unsigned NOT NULL default '0',
|
||||
scale int(10) NOT NULL default '0',
|
||||
assessed int(10) unsigned NOT NULL default '0',
|
||||
|
|
|
@ -151,6 +151,10 @@ function data_upgrade($oldversion) {
|
|||
if ($oldversion < 2006052400) {
|
||||
table_column('data','','rsstitletemplate','text','','','','not null','rsstemplate');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006081700) {
|
||||
table_column('data', '', 'jstemplate', 'text', '', '', '', 'not null', 'csstemplate');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ CREATE TABLE prefix_data (
|
|||
rsstemplate text NOT NULL default '',
|
||||
rsstitletemplate text NOT NULL default '',
|
||||
csstemplate text NOT NULL default '',
|
||||
jstemplate text NOT NULL default '',
|
||||
approval integer NOT NULL default '0',
|
||||
scale integer NOT NULL default '0',
|
||||
assessed integer NOT NULL default '0',
|
||||
|
|
|
@ -68,12 +68,13 @@ function data_restore_mods($mod,$restore) {
|
|||
$database->rssarticles = backup_todb($info['MOD']['#']['RSSARTICLES']['0']['#']);
|
||||
$database->singletemplate = backup_todb($info['MOD']['#']['SINGLETEMPLATE']['0']['#']);
|
||||
$database->listtemplate = backup_todb($info['MOD']['#']['LISTTEMPLATE']['0']['#']);
|
||||
$database->addtemplate = backup_todb($info['MOD']['#']['ADDTEMPLATE']['0']['#']);
|
||||
$database->rsstemplate = backup_todb($info['MOD']['#']['RSSTEMPLATE']['0']['#']);
|
||||
$database->csstemplate = backup_todb($info['MOD']['#']['CSSTEMPLATE']['0']['#']);
|
||||
$database->rsstitletemplate = backup_todb($info['MOD']['#']['RSSTITLETEMPLATE']['0']['#']);
|
||||
$database->listtemplateheader = backup_todb($info['MOD']['#']['LISTTEMPLATEHEADER']['0']['#']);
|
||||
$database->listtemplatefooter = backup_todb($info['MOD']['#']['LISTTEMPLATEFOOTER']['0']['#']);
|
||||
$database->addtemplate = backup_todb($info['MOD']['#']['ADDTEMPLATE']['0']['#']);
|
||||
$database->rsstemplate = backup_todb($info['MOD']['#']['RSSTEMPLATE']['0']['#']);
|
||||
$database->rsstitletemplate = backup_todb($info['MOD']['#']['RSSTITLETEMPLATE']['0']['#']);
|
||||
$database->csstemplate = backup_todb($info['MOD']['#']['CSSTEMPLATE']['0']['#']);
|
||||
$database->jstemplate = backup_todb($info['MOD']['#']['JSTEMPLATE']['0']['#']);
|
||||
$database->approval = backup_todb($info['MOD']['#']['APPROVAL']['0']['#']);
|
||||
$database->scale = backup_todb($info['MOD']['#']['SCALE']['0']['#']);
|
||||
$database->assessed = backup_todb($info['MOD']['#']['ASSESSED']['0']['#']);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// This fragment is called by /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2006080900;
|
||||
$module->version = 2006081700;
|
||||
$module->requires = 2006080900; // Requires this Moodle version
|
||||
$module->cron = 60;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue