mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
adding date created and date modified for comments
This commit is contained in:
parent
e03f2fec99
commit
8e24bfe7e8
@ -231,6 +231,8 @@ function backup_data_comments($bf,$preferences,$recordid){
|
||||
fwrite ($bf,full_tag("RECORDID",8,false,$com_sub->recordid));
|
||||
fwrite ($bf,full_tag("USERID",8,false,$com_sub->userid));
|
||||
fwrite ($bf,full_tag("CONTENT",8,false,$com_sub->content));
|
||||
fwrite ($bf,full_tag("CREATED",8,false,$com_sub->created));
|
||||
fwrite ($bf,full_tag("MODIFIED",8,false,$com_sub->modified));
|
||||
//End submission
|
||||
$status =fwrite ($bf,end_tag("COMMENT",7,true));
|
||||
}
|
||||
|
@ -23,6 +23,12 @@ function data_upgrade($oldversion) {
|
||||
table_column("data", "", "assessed", "integer", "10");
|
||||
table_column("data", "", "assesspublic", "integer", "4");
|
||||
}
|
||||
|
||||
if ($oldversion < 2006022700) {
|
||||
table_column("data_comments", "", "created", "integer", "10");
|
||||
table_column("data_comments", "", "modified", "integer", "10");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -90,6 +90,8 @@ CREATE TABLE prefix_data_comments (
|
||||
userid int(10) unsigned NOT NULL default '0',
|
||||
recordid int(10) unsigned NOT NULL default '0',
|
||||
content text default '',
|
||||
created int(10) unsigned NOT NULL default '0',
|
||||
modified int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
@ -24,6 +24,11 @@ function data_upgrade($oldversion) {
|
||||
table_column("data", "", "assesspublic", "integer");
|
||||
}
|
||||
|
||||
if ($oldversion < 2006022700) {
|
||||
table_column("data_comments", "", "created", "integer");
|
||||
table_column("data_comments", "", "modified", "integer");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,9 @@ CREATE TABLE prefix_data_comments (
|
||||
id SERIAL PRIMARY KEY,
|
||||
userid int4 NOT NULL default '0',
|
||||
recordid int4 NOT NULL default '0',
|
||||
content text
|
||||
content text,
|
||||
created integer NOT NULL default '0',
|
||||
modified integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
|
||||
|
@ -345,7 +345,8 @@ function data_comments_restore_mods ($oldid, $newid, $info, $rec_info) {
|
||||
$comment -> recordid = $newid;
|
||||
$comment -> userid = backup_todb($com_info['#']['USERID']['0']['#']);
|
||||
$comment -> content = backup_todb($com_info['#']['CONTENT']['0']['#']);
|
||||
|
||||
$comment -> created = backup_todb($com_info['#']['CREATED']['0']['#']);
|
||||
$comment -> modified = backup_todb($com_info['#']['MODIFIED']['0']['#']);
|
||||
$status = insert_record ("data_comments",$comment);
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// This fragment is called by /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2006020801;
|
||||
$module->version = 2006022700;
|
||||
$module->requires = 2005060223; // Requires this Moodle version
|
||||
$module->cron = 60;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user