mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
adding utf8 support scripts
This commit is contained in:
parent
1e4d9ff6dc
commit
fb7b685530
68
backup/db/migrate2utf8.php
Executable file
68
backup/db/migrate2utf8.php
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
<?
|
||||||
|
function migrate2utf8_backup_lob_info($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
/// Some trivial checks
|
||||||
|
if (empty($recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$backuplog = get_record('backup_log', 'id', $recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sitelang = $CFG->lang;
|
||||||
|
$courselang = get_course_lang($backuplog->courseid); //Non existing!
|
||||||
|
$userlang = get_main_teacher_lang($backuplog->courseid); //N.E.!!
|
||||||
|
|
||||||
|
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
|
||||||
|
|
||||||
|
/// We are going to use textlib facilities
|
||||||
|
$textlib = textlib_get_instance();
|
||||||
|
/// Convert the text
|
||||||
|
$result = $textlib->convert($backuplog->info, $fromenc);
|
||||||
|
|
||||||
|
$newbackuplog = new object;
|
||||||
|
$newbackuplog->id = $recordid;
|
||||||
|
$newbackuplog->info = $result;
|
||||||
|
update_record('backup_log',$newbackuplog);
|
||||||
|
/// And finally, just return the converted field
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function migrate2utf8_backup_ids_info($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
/// Some trivial checks
|
||||||
|
if (empty($recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$backupids= get_record('backup_ids', 'id', $recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sitelang = $CFG->lang;
|
||||||
|
$courselang = null;
|
||||||
|
$userlang = null; //N.E.!!
|
||||||
|
|
||||||
|
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
|
||||||
|
|
||||||
|
/// We are going to use textlib facilities
|
||||||
|
$textlib = textlib_get_instance();
|
||||||
|
/// Convert the text
|
||||||
|
$result = $textlib->convert($backupids->info, $fromenc);
|
||||||
|
|
||||||
|
$newbackupids = new object;
|
||||||
|
$newbackupids->id = $recordid;
|
||||||
|
$newbackupids->info = $result;
|
||||||
|
update_record('backup_ids',$newbackupids);
|
||||||
|
/// And finally, just return the converted field
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
?>
|
40
backup/db/migrate2utf8.xml
Executable file
40
backup/db/migrate2utf8.xml
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
<DBMIGRATION type="backup" VERSION="2005120100">
|
||||||
|
<TABLES>
|
||||||
|
<TABLE name="backup_config">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
<FIELD name="value" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="backup_courses">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="laststatus" method="NO_CONV" type="char" length="1" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="backup_files">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="file_type" method="NO_CONV" type="varchar" length="10" />
|
||||||
|
<FIELD name="path" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="backup_ids">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="table_name" method="NO_CONV" type="varchar" length="30" />
|
||||||
|
<FIELD name="info" method="PHP_FUNCTION" type="varchar" length="255">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_bckup_ids_info(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="backup_log">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="info" method="PHP_FUNCTION" type="varchar" length="255">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_backup_log_info(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
</TABLES>
|
||||||
|
</DBMIGRATION>
|
13
blocks/db/migrate2utf8.php
Executable file
13
blocks/db/migrate2utf8.php
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
<?
|
||||||
|
function migrate2utf8_block_instance_configdata($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function migrate2utf8_block_pinned_configdata($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
31
blocks/db/migrate2utf8.xml
Executable file
31
blocks/db/migrate2utf8.xml
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
<DBMIGRATION type="blocks" VERSION="2005120100">
|
||||||
|
<TABLES>
|
||||||
|
<TABLE name="block">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="NO_CONV" type="varchar" length="40" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="block_instance">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="pagetype" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="position" method="NO_CONV" type="varchar" length="10" />
|
||||||
|
<FIELD name="configdata" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_block_instance_configdata(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="block_pinned">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="pagetype" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="position" method="NO_CONV" type="varchar" length="10" />
|
||||||
|
<FIELD name="configdata" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_block_instance_configdata(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
</TABLES>
|
||||||
|
</DBMIGRATION>
|
124
blocks/rss_client/db/migrate2utf8.php
Executable file
124
blocks/rss_client/db/migrate2utf8.php
Executable file
@ -0,0 +1,124 @@
|
|||||||
|
<?
|
||||||
|
function migrate2utf_block_rss_client_title($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
/// Some trivial checks
|
||||||
|
if (empty($recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$rssclient = get_record('block_rss_client','id',$recordid) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = get_record('user','id',$rssclient->userid);
|
||||||
|
|
||||||
|
$sitelang = $CFG->lang;
|
||||||
|
$courselang = NULL; //Non existing!
|
||||||
|
$userlang = $user->lang; //N.E.!!
|
||||||
|
|
||||||
|
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
|
||||||
|
|
||||||
|
/// We are going to use textlib facilities
|
||||||
|
$textlib = textlib_get_instance();
|
||||||
|
/// Convert the text
|
||||||
|
$result = $textlib->convert($rssclient->title, $fromenc);
|
||||||
|
|
||||||
|
$newrssclient = new object;
|
||||||
|
$newrssclient->id = $recordid;
|
||||||
|
$newrssclient->title = $result;
|
||||||
|
update_record('block_rss_client',$newrssclient);
|
||||||
|
/// And finally, just return the converted field
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function migrate2utf_block_rss_client_preferredtitle($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
/// Some trivial checks
|
||||||
|
if (empty($recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$SQL = "SELECT brc.userid
|
||||||
|
FROM {$CFG->prefix}block_rss_client brc
|
||||||
|
WHERE brc.id = $recordid";
|
||||||
|
|
||||||
|
if (!$rssuserid = get_record_sql($SQL) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$rssclient = get_record('block_rss_client','id',$recordid) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = get_record('user','id',$rssuserid->userid);
|
||||||
|
|
||||||
|
$sitelang = $CFG->lang;
|
||||||
|
$courselang = NULL; //Non existing!
|
||||||
|
$userlang = $user->lang; //N.E.!!
|
||||||
|
|
||||||
|
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
|
||||||
|
|
||||||
|
/// We are going to use textlib facilities
|
||||||
|
$textlib = textlib_get_instance();
|
||||||
|
/// Convert the text
|
||||||
|
$result = $textlib->convert($rssclient->preferredtitle, $fromenc);
|
||||||
|
|
||||||
|
$newrssclient = new object;
|
||||||
|
$newrssclient->id = $recordid;
|
||||||
|
$newrssclient->preferredtitle = $result;
|
||||||
|
update_record('block_rss_client',$newrssclient);
|
||||||
|
/// And finally, just return the converted field
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function migrate2utf_block_rss_client_description($recordid){
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
|
/// Some trivial checks
|
||||||
|
if (empty($recordid)) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$SQL = "SELECT brc.userid
|
||||||
|
FROM {$CFG->prefix}block_rss_client brc
|
||||||
|
WHERE brc.id = $recordid";
|
||||||
|
|
||||||
|
if (!$rssuserid = get_record_sql($SQL) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$rssclient = get_record('block_rss_client','id',$recordid) {
|
||||||
|
log_the_problem_somewhere();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = get_record('user','id',$rssuserid->userid);
|
||||||
|
|
||||||
|
$sitelang = $CFG->lang;
|
||||||
|
$courselang = NULL; //Non existing!
|
||||||
|
$userlang = $user->lang; //N.E.!!
|
||||||
|
|
||||||
|
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
|
||||||
|
|
||||||
|
/// We are going to use textlib facilities
|
||||||
|
$textlib = textlib_get_instance();
|
||||||
|
/// Convert the text
|
||||||
|
$result = $textlib->convert($rssclient->description, $fromenc);
|
||||||
|
|
||||||
|
$newrssclient = new object;
|
||||||
|
$newrssclient->id = $recordid;
|
||||||
|
$newrssclient->description = $result;
|
||||||
|
update_record('block_rss_client',$newrssclient);
|
||||||
|
/// And finally, just return the converted field
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
?>
|
24
blocks/rss_client/db/migrate2utf8.xml
Executable file
24
blocks/rss_client/db/migrate2utf8.xml
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
<DBMIGRATION type="block/block_rss_client" VERSION="2005120100">
|
||||||
|
<TABLES>
|
||||||
|
<TABLE name="block_rss_client">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="title" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_bloack_rss_client_title(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="preferredtitle" method="PLAIN_SQL_UPDATE" type="varchar" length="64">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_bloack_rss_client_preferredtitle(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="description" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_bloack_rss_client_description(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="url" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
</TABLES>
|
||||||
|
</DBMIGRATION>
|
1254
lib/db/migrate2utf8.php
Executable file
1254
lib/db/migrate2utf8.php
Executable file
File diff suppressed because it is too large
Load Diff
436
lib/db/migrate2utf8.xml
Executable file
436
lib/db/migrate2utf8.xml
Executable file
@ -0,0 +1,436 @@
|
|||||||
|
<DBMIGRATION type="lib" VERSION="2005120100">
|
||||||
|
<TABLES>
|
||||||
|
<TABLE name="config">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
<FIELD name="value" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_config_value(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="config_plugins">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="plugin" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
<FIELD name="name" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
<FIELD name="value" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_config_plugins_value(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="course_categories">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="PHP_FUNCTION" type="varchar" length="255">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_categories_name(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="description" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_categories_description(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="course_sections">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="summary" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_sections_summary(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="sequence" method="NO_CONV" type="text" length="0" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="course_request">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="fullname" method="PHP_FUNCTION" type="varchar" length="254">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_request_fullname(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="shortname" method="PHP_FUNCTION" type="varchar" length="15">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_request_shortname(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="summary" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_request_summary(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="reason" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_request_reason(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="password" method="PHP_FUNCTION" type="varchar" length="50">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_course_request_password(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="event">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="PLAIN_SQL_UPDATE" type="varchar" length="255">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT e.userid
|
||||||
|
FROM {$CFG->prefix}event e
|
||||||
|
WHERE e.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT e.courseid
|
||||||
|
FROM {$CFG->prefix}event e
|
||||||
|
WHERE e.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="description" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT e.userid
|
||||||
|
FROM {$CFG->prefix}event e
|
||||||
|
WHERE e.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT e.courseid
|
||||||
|
FROM {$CFG->prefix}event e
|
||||||
|
WHERE e.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="modname" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="eventtype" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="cache_filters">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="md5key" method="NO_CONV" type="varchar" length="32" />
|
||||||
|
<FIELD name="rawtext" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_cache_filters_rawtext(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="cache_text">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="md5key" method="NO_CONV" type="varchar" length="32" />
|
||||||
|
<FIELD name="formattedtext" method="PHP_FUNCTION" type="longtext" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_cache_filters_formattedtext(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="grade_letter">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="letter" method="PHP_FUNCTION" type="varchar" length="8">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_grade_letter_letter(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="groups">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="PHP_FUNCTION" type="varchar" length="254">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_groups_name(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="description" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_groups_description(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="lang" method="PHP_FUNCTION" type="varchar" length="10">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_groups_lang(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="theme" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_groups_theme(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="log">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="ip" method="NO_CONV" type="varchar" length="15" />
|
||||||
|
<FIELD name="module" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="action" method="NO_CONV" type="varchar" length="15" />
|
||||||
|
<FIELD name="url" method="NO_CONV" type="varchar" length="100" />
|
||||||
|
<FIELD name="info" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT l.userid
|
||||||
|
FROM {$CFG->prefix}log l
|
||||||
|
WHERE l.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT l.course
|
||||||
|
FROM {$CFG->prefix}log l
|
||||||
|
WHERE l.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="log_display">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="module" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="action" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="mtable" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="field" method="NO_CONV" type="varchar" length="40" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="message">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="message" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_message_message(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="messagetype" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="message_read">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="message" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_message_read_message(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="messagetype" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="modules">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="PLAIN_SQL_UPDATE" type="varchar" length="20" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="scale">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="PLAIN_SQL_UPDATE" type="varchar" length="255">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT s.userid
|
||||||
|
FROM {$CFG->prefix}scale s
|
||||||
|
WHERE s.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT s.courseid
|
||||||
|
FROM {$CFG->prefix}scale s
|
||||||
|
WHERE s.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="scale" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT s.userid
|
||||||
|
FROM {$CFG->prefix}scale s
|
||||||
|
WHERE s.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT s.courseid
|
||||||
|
FROM {$CFG->prefix}scale s
|
||||||
|
WHERE s.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="description" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT s.userid
|
||||||
|
FROM {$CFG->prefix}scale s
|
||||||
|
WHERE s.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT s.courseid
|
||||||
|
FROM {$CFG->prefix}scale s
|
||||||
|
WHERE s.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="timezone">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="NO_CONV" type="varchar" length="100" />
|
||||||
|
<FIELD name="rule" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="dst_time" method="NO_CONV" type="varchar" length="5" />
|
||||||
|
<FIELD name="std_time" method="NO_CONV" type="varchar" length="5" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="user_students">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="enrol" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="user_teachers">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="role" method="NO_CONV" type="varchar" length="40">
|
||||||
|
<SQL_DETECT_USER>
|
||||||
|
SELECT ut.userid
|
||||||
|
FROM {$CFG->prefix}user_teachers ut
|
||||||
|
WHERE ut.id = RECORDID
|
||||||
|
</SQL_DETECT_USER>
|
||||||
|
<SQL_DETECT_COURSE>
|
||||||
|
SELECT ut.course
|
||||||
|
FROM {$CFG->prefix}user_teachers ut
|
||||||
|
WHERE ut.id = RECORDID
|
||||||
|
</SQL_DETECT_COURSE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="enrol" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="stats_user_daily">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="stattype" method="NO_CONV" type="varchar" length="30" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="stats_user_monthly">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="stattype" method="NO_CONV" type="varchar" length="30" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="stats_user_weekly">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="stattype" method="NO_CONV" type="varchar" length="30" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="user_preferences">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="name" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="value" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="user">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="auth" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="username" method="NO_CONV" type="varchar" length="100" />
|
||||||
|
<FIELD name="password" method="PHP_FUNCTION" type="varchar" length="32">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_password(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="idnumber" method="PHP_FUNCTION" type="varchar" length="64">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_idnumber(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="firstname" method="PHP_FUNCTION" type="varchar" length="20">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_firstname(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="lastname" method="PHP_FUNCTION" type="varchar" length="20">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_lastname(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="email" method="NO_CONV" type="varchar" length="100" />
|
||||||
|
<FIELD name="icq" method="NO_CONV" type="varchar" length="15" />
|
||||||
|
<FIELD name="skype" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="yahoo" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="aim" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="msn" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="phone1" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="phone2" method="NO_CONV" type="varchar" length="20" />
|
||||||
|
<FIELD name="institution" method="PHP_FUNCTION" type="varchar" length="40">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_institution(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="department" method="PHP_FUNCTION" type="varchar" length="30">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_department(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="address" method="PHP_FUNCTION" type="varchar" length="70">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_address(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="city" method="PHP_FUNCTION" type="varchar" length="20">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_city(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="country" method="NO_CONV" type="char" length="2" />
|
||||||
|
<FIELD name="theme" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="timezone" method="NO_CONV" type="varchar" length="100" />
|
||||||
|
<FIELD name="lastIP" method="NO_CONV" type="varchar" length="15" />
|
||||||
|
<FIELD name="secret" method="PHP_FUNCTION" type="varchar" length="15">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_secret(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="url" method="NO_CONV" type="varchar" length="255" />
|
||||||
|
<FIELD name="description" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_description(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
<TABLE name="course">
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD name="password" method="PHP_FUNCTION" type="varchar" length="50">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_password(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="fullname" method="PHP_FUNCTION" type="varchar" length="254">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_fullname(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="shortname" method="PHP_FUNCTION" type="varchar" length="15">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_shortname(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="idnumber" method="PHP_FUNCTION" type="varchar" length="100">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_idnumber(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="summary" method="PHP_FUNCTION" type="text" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_summary(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="format" method="NO_CONV" type="varchar" length="10" />
|
||||||
|
<FIELD name="modinfo" method="PHP_FUNCTION" type="longtext" length="0">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_modinfo(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="teacher" method="PHP_FUNCTION" type="varchar" length="100">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_teacher(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="teachers" method="PHP_FUNCTION" type="varchar" length="100">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_teachers(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="student" method="PHP_FUNCTION" type="varchar" length="100">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_student(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="students" method="PHP_FUNCTION" type="varchar" length="100">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_students(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="cost" method="PHP_FUNCTION" type="varchar" length="10">
|
||||||
|
<PHP_FUNCTION>
|
||||||
|
migrate2utf8_user_cost(RECORDID)
|
||||||
|
</PHP_FUNCTION>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD name="theme" method="NO_CONV" type="varchar" length="50" />
|
||||||
|
<FIELD name="lang" method="NO_CONV" type="varchar" length="10" />
|
||||||
|
</FIELDS>
|
||||||
|
</TABLE>
|
||||||
|
</TABLES>
|
||||||
|
</DBMIGRATION>
|
Loading…
x
Reference in New Issue
Block a user