]> git.mjollnir.org Git - moodle.git/commitdiff
UTF8 migration - now supporting PostgreSQL
authorpatrickslee <patrickslee>
Fri, 10 Mar 2006 03:43:33 +0000 (03:43 +0000)
committerpatrickslee <patrickslee>
Fri, 10 Mar 2006 03:43:33 +0000 (03:43 +0000)
25 files changed:
admin/index.php
admin/utfdbmigrate.html [new file with mode: 0644]
admin/utfdbmigrate.php
backup/db/migrate2utf8.php
blocks/db/migrate2utf8.php
blocks/rss_client/db/migrate2utf8.php
lang/en_utf8/admin.php
lib/db/migrate2utf8.php
mod/assignment/db/migrate2utf8.php
mod/chat/db/migrate2utf8.php
mod/choice/db/migrate2utf8.php
mod/data/db/migrate2utf8.php
mod/exercise/db/migrate2utf8.php
mod/forum/db/migrate2utf8.php
mod/glossary/db/migrate2utf8.php
mod/hotpot/db/migrate2utf8.php
mod/journal/db/migrate2utf8.php
mod/label/db/migrate2utf8.php
mod/lams/db/migrate2utf8.php
mod/lesson/db/migrate2utf8.php
mod/resource/db/migrate2utf8.php
mod/scorm/db/migrate2utf8.php
mod/survey/db/migrate2utf8.php
mod/wiki/db/migrate2utf8.php
mod/workshop/db/migrate2utf8.php

index b36b8288f9ab5cfd351f4432e8967216a351e8a9..59f6110dd1a177fe701a83e4e16c4ef7209c4d00 100644 (file)
     print_simple_box_start('center', '100%', '', 20);
     print_heading($stradministration);
 
+/// Deprecated database! Warning!!
+    if (!empty($CFG->migrated_to_new_db)) {
+        print_simple_box_start('center','50%');
+        print_string('dbmigrationdeprecateddb','admin');
+        print_simple_box_end();
+    }
+
     if (!empty($CFG->upgrade)) {  // Print notice about extra upgrading that needs to be done
         print_simple_box(get_string("upgrade$CFG->upgrade", "admin",
                                     "$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php"), "center", '50%');
diff --git a/admin/utfdbmigrate.html b/admin/utfdbmigrate.html
new file mode 100644 (file)
index 0000000..7854b57
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+   if (!isset($form->dbhost)) {
+       $form->dbhost = '';
+   }
+   if (!isset($form->dbname)) {
+       $form->dbname = '';
+   }
+   if (!isset($form->dbuser)) {
+       $form->dbuser = '';
+   }
+   if (!isset($form->dbpass)) {
+       $form->dbpass = '';
+   }
+   if (!isset($form->dbcluster)) {
+       $form->dbcluster = '';
+   }
+?>
+<form name="migratefrom" action="utfdbmigrate.php" method="POST">
+<input name="migrate" type="hidden" value="1" />
+<input name="sesskey" type="hidden" value="<?php echo sesskey() ?>" />
+<?php if (isset($err["dbconnect"])) formerr($err["dbconnect"]); ?>
+<table cellpadding="9" cellspacing="0" >
+<tr valign="top">
+    <td align="right"><?php print_string("dbhost", "install") ?>:</td>
+    <td><input type="text" name="dbhost" value="<?php p($form->dbhost) ?>" />
+    </td>
+</tr>
+<tr valign="top">
+    <td align="right"><?php print_string("database", "install") ?>:</td>
+    <td><input type="text" name="dbname" value="<?php p($form->dbname) ?>" />
+    </td>
+</tr>
+<tr valign="top">
+    <td align="right"><?php print_string("user") ?>:</td>
+    <td><input type="text" name="dbuser" value="<?php p($form->dbuser) ?>" />
+    </td>
+</tr>
+<tr valign="top">
+    <td align="right"><?php print_string("password") ?>:</td>
+    <td><input type="text" name="dbpass" value="<?php p($form->dbpass) ?>" />
+    </td>
+</tr>
+<tr valign="top">
+    <td align="right"><?php print_string("pgcluster", "admin") ?>:</td>
+    <td><input type="text" name="dbcluster" value="<?php p($form->dbcluster) ?>" />
+    <br />
+    <?php print_string("pgclusterdescription", "admin") ?>
+    </td>
+</tr>
+</table>
+<center>
+<input type="submit" value="<?php print_string('continue') ?>"/>
+&nbsp;<input type="button" value="<?php print_string('cancel') ?>" onclick="javascript:history.go(-1)" />
+</center>
\ No newline at end of file
index a2c01576b92df18cb9f3331adffdb158ffb58ac6..f522fc5e01b6e5e974a5aa7f4c44b1189e2cd61a 100755 (executable)
 
     //else if $migrate
     else if ($migrate && confirm_sesskey()) {
-        echo '<div align="center">';
-        print_simple_box_start('center','50%');
-        print_string('dbmigratewarning2','admin');
-        print_simple_box_end();
-        //put the site in maintenance mode
-        check_dir_exists($CFG->dataroot.'/'.SITEID, true);
-        
-        if (touch($filename)) {
-            $file = fopen($filename, 'w');
-            fwrite($file, get_string('maintinprogress','admin'));
-            fclose($file);
+        if ($CFG->dbtype == 'postgres7' && !is_postgres_utf8()) {
+            $continue = false;
+            if (($form = data_submitted()) && isset($form->dbhost)) {
+                validate_form($form, $err);
+
+                if (count($err) == 0) {
+                    $_SESSION['newpostgresdb'] = $form;
+                    $continue = true;
+                }
+            }
         } else {
-            notify (get_string('maintfileopenerror','admin'));
+            $continue = true;
         }
-        //print second confirmation box
-        echo '<form name="migratefrom" action="utfdbmigrate.php" method="POST">';
-        echo '<input name="confirm" type="hidden" value="1" />';
-        echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
+        if ($continue) {
+            echo '<div align="center">';
+            print_simple_box_start('center','50%');
+            print_string('dbmigratewarning2','admin');
+            print_simple_box_end();
+            //put the site in maintenance mode
+            check_dir_exists($CFG->dataroot.'/'.SITEID, true);
+
+            if (touch($filename)) {
+                $file = fopen($filename, 'w');
+                fwrite($file, get_string('maintinprogress','admin'));
+                fclose($file);
+            } else {
+                notify (get_string('maintfileopenerror','admin'));
+            }
+            //print second confirmation box
+            echo '<form name="migratefrom" action="utfdbmigrate.php" method="POST">';
+            echo '<input name="confirm" type="hidden" value="1" />';
+            echo '<input name="sesskey" type="hidden" value="'.sesskey().'" />';
         
-        $xmls = utf_get_xml();
-        $sumrecords = 0;   //this is the sum of all records of relavent tables.
-        foreach ($xmls as $xml) {    ///foreach xml file, we must get a list of tables
-            $dbtables = $xml['DBMIGRATION']['#']['TABLES'][0]['#']['TABLE'];    //real db tables
+            $xmls = utf_get_xml();
+            $sumrecords = 0;   //this is the sum of all records of relavent tables.
+            foreach ($xmls as $xml) {    ///foreach xml file, we must get a list of tables
+                $dbtables = $xml['DBMIGRATION']['#']['TABLES'][0]['#']['TABLE'];    //real db tables
             
-            foreach ($dbtables as $dbtable) {
-                $dbtablename = $dbtable['@']['name'];
-                $sumrecords += count_records($dbtablename);
+                foreach ($dbtables as $dbtable) {
+                    $dbtablename = $dbtable['@']['name'];
+                    $sumrecords += count_records($dbtablename);
+                }
+            }
+            echo 'Total number of records in your database is <b>'.$sumrecords.'</b>';
+            if ($sumrecords > 10000) {
+                echo '<br />Number of Records to process before halting (Leave blank for no limit) <input name="maxrecords" type="text" value="" />';
             }
-        }
-        echo 'Total number of records in your database is <b>'.$sumrecords.'</b>';
-        if ($sumrecords > 10000) {
-            echo '<br />Number of Records to process before halting (Leave blank for no limit) <input name="maxrecords" type="text" value="" />';
-        }
 
-        //print the "i-know-what-lang-to-use" menu
-        $enc = array('af' => 'iso-8859-1', 'ar' => 'windows-1256', 'be' => 'windows-1251', 'bg' => 'windows-1251', 'bs' => 'windows-1250', 'cs' => 'iso-8859-2', 'da' => 'iso-8859-1', 'de' => 'iso-8859-1', 'de_du' => 'iso-8859-1', 'de_utf8' => 'utf-8', 'el' => 'windows-1253', 'en' => 'iso-8859-1', 'en_ja' => 'euc-jp', 'en_us' => 'iso-8859-1', 'en_utf8' => 'utf-8', 'es' => 'iso-8859-1', 'es_ar' => 'iso-8859-1', 'es_es' => 'iso-8859-1', 'es_mx' => 'iso-8859-1', 'et' => 'iso-8859-1', 'eu' => 'iso-8859-1', 'fa' => 'windows-1256', 'fa_utf8' => 'utf-8', 'fi' => 'iso-8859-1', 'fil' => 'iso-8859-15', 'fr' => 'iso-8859-1', 'fr_ca' => 'iso-8859-15', 'ga' => 'iso-8859-1', 'gl' => 'iso-8859-1', 'he' => 'ISO-8859-8-I', 'he_utf8' => 'utf-8', 'hi' => 'iso-8859-1', 'hr' => 'windows-1250', 'hr_utf8' => 'utf-8', 'hu' => 'iso-8859-2', 'id' => 'iso-8859-1', 'it' => 'iso-8859-1', 'ja' => 'EUC-JP', 'ja_utf8' => 'UTF-8', 'ka_utf8' => 'UTF-8', 'km_utf8' => 'UTF-8', 'kn_utf8' => 'utf-8', 'ko' => 'EUC-KR', 'ko_utf8' => 'UTF-8', 'lt' => 'windows-1257', 'lv' => 'ISO-8859-4', 'mi_nt' => 'iso-8859-1', 'mi_tn_utf8' => 'utf-8', 'ms' => 'iso-8859-1', 'nl' => 'iso-8859-1', 'nn' => 'iso-8859-1', 'no' => 'iso-8859-1', 'no_gr' => 'iso-8859-1', 'pl' => 'iso-8859-2', 'pt' => 'iso-8859-1', 'pt_br' => 'iso-8859-1', 'ro' => 'iso-8859-2', 'ru' => 'windows-1251', 'sk' => 'iso-8859-2', 'sl' => 'iso-8859-2', 'sl_utf8' => 'utf-8', 'so' => 'iso-8859-1', 'sq' => 'iso-8859-1', 'sr_utf8' => 'utf-8', 'sv' => 'iso-8859-1', 'th' => 'TIS-620', 'th_utf8' => 'UTF-8', 'tl' => 'iso-8859-15', 'tl_utf8' => 'UTF-8', 'tr' => 'iso-8859-9', 'uk' => 'windows-1251', 'vi_utf8' => 'UTF-8', 'zh_cn' => 'GB18030', 'zh_cn_utf8' => 'UTF-8', 'zh_tw' => 'Big5', 'zh_tw_utf8' => 'UTF-8');
+            //print the "i-know-what-lang-to-use" menu
+            $enc = array('af' => 'iso-8859-1', 'ar' => 'windows-1256', 'be' => 'windows-1251', 'bg' => 'windows-1251', 'bs' => 'windows-1250', 'cs' => 'iso-8859-2', 'da' => 'iso-8859-1', 'de' => 'iso-8859-1', 'de_du' => 'iso-8859-1', 'de_utf8' => 'utf-8', 'el' => 'windows-1253', 'en' => 'iso-8859-1', 'en_ja' => 'euc-jp', 'en_us' => 'iso-8859-1', 'en_utf8' => 'utf-8', 'es' => 'iso-8859-1', 'es_ar' => 'iso-8859-1', 'es_es' => 'iso-8859-1', 'es_mx' => 'iso-8859-1', 'et' => 'iso-8859-1', 'eu' => 'iso-8859-1', 'fa' => 'windows-1256', 'fa_utf8' => 'utf-8', 'fi' => 'iso-8859-1', 'fil' => 'iso-8859-15', 'fr' => 'iso-8859-1', 'fr_ca' => 'iso-8859-15', 'ga' => 'iso-8859-1', 'gl' => 'iso-8859-1', 'he' => 'ISO-8859-8-I', 'he_utf8' => 'utf-8', 'hi' => 'iso-8859-1', 'hr' => 'windows-1250', 'hr_utf8' => 'utf-8', 'hu' => 'iso-8859-2', 'id' => 'iso-8859-1', 'it' => 'iso-8859-1', 'ja' => 'EUC-JP', 'ja_utf8' => 'UTF-8', 'ka_utf8' => 'UTF-8', 'km_utf8' => 'UTF-8', 'kn_utf8' => 'utf-8', 'ko' => 'EUC-KR', 'ko_utf8' => 'UTF-8', 'lt' => 'windows-1257', 'lv' => 'ISO-8859-4', 'mi_nt' => 'iso-8859-1', 'mi_tn_utf8' => 'utf-8', 'ms' => 'iso-8859-1', 'nl' => 'iso-8859-1', 'nn' => 'iso-8859-1', 'no' => 'iso-8859-1', 'no_gr' => 'iso-8859-1', 'pl' => 'iso-8859-2', 'pt' => 'iso-8859-1', 'pt_br' => 'iso-8859-1', 'ro' => 'iso-8859-2', 'ru' => 'windows-1251', 'sk' => 'iso-8859-2', 'sl' => 'iso-8859-2', 'sl_utf8' => 'utf-8', 'so' => 'iso-8859-1', 'sq' => 'iso-8859-1', 'sr_utf8' => 'utf-8', 'sv' => 'iso-8859-1', 'th' => 'TIS-620', 'th_utf8' => 'UTF-8', 'tl' => 'iso-8859-15', 'tl_utf8' => 'UTF-8', 'tr' => 'iso-8859-9', 'uk' => 'windows-1251', 'vi_utf8' => 'UTF-8', 'zh_cn' => 'GB18030', 'zh_cn_utf8' => 'UTF-8', 'zh_tw' => 'Big5', 'zh_tw_utf8' => 'UTF-8');
 
-        echo '<br />The whole site is in this encoding: (leave blank if you are not sure)';
-        echo '<select name="globallang"><option value="">I am not sure</option>';
-        foreach ($enc as $lang => $encoding) {
-            echo '<option value="'.$encoding.'">'.$lang.'</option>';
-        }
-        echo '</select>';
+            echo '<br />The whole site is in this encoding: (leave blank if you are not sure)';
+            echo '<select name="globallang"><option value="">I am not sure</option>';
+            foreach ($enc as $lang => $encoding) {
+                echo '<option value="'.$encoding.'">'.$lang.'</option>';
+            }
+            echo '</select>';
         
-        echo '<p /><input type="submit" value="'.get_string('continue').'"/>';
-        echo '<input type="button" value="'.get_string('cancel').'" onclick="javascript:history.go(-1)" />';
-        echo '</form>';
-        echo '</div>';
+            echo '<p /><input type="submit" value="'.get_string('continue').'"/>';
+            echo '<input type="button" value="'.get_string('cancel').'" onclick="javascript:history.go(-1)" />';
+            echo '</form>';
+            echo '</div>';
 
+        } else {
+            echo '<div align="center">';
+            print_simple_box_start('center','50%');
+            print_string('dbmigratepostgres','admin');
+            print_simple_box_end();
+
+            print_simple_box_start("center", "");
+            include("utfdbmigrate.html");
+            print_simple_box_end();
+        }
     }
     
     else {    //else, print welcome to migrate page message
@@ -164,6 +188,40 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
 
     //if unicodedb is set, migration is complete. die here;
     if (!$crash = get_record('config','name','dbmigration')) {
+        //Duplicate the database if not unicode for postgres7
+        if ($CFG->dbtype == 'postgres7' && !is_postgres_utf8() && !is_postgres_setup()) {
+            echo '<script>';
+            echo 'document.getElementById("text").innerHTML = "Copying data to the UTF8 database for processing...";'."\n";
+            echo '</script>';
+
+            if ($_SESSION['newpostgresdb']->dbcluster) {
+                $cluster = ' --cluster ' . $_SESSION['newpostgresdb']->dbcluster;
+            } else {
+                $cluster = '';
+            }
+            $cmd = "PGPASSWORD={$CFG->dbpass} pg_dump -Fp -E 'UNICODE' -O -x -U {$CFG->dbuser}$cluster";
+            if ($CFG->dbhost)  {
+                $host = split(":", $CFG->dbhost);
+                if ($host[0]) $cmd .= " -h {$host[0]}";
+                if (isset($host[1])) $cmd .= " -p {$host[1]}";
+            }
+            $cmd .= " {$CFG->dbname} | iconv -f UTF-8 -t UTF-8 -c | PGPASSWORD={$_SESSION['newpostgresdb']->dbpass} psql -q -U {$_SESSION['newpostgresdb']->dbuser} -v ON_ERROR_STOP=1$cluster";
+            if ($_SESSION['newpostgresdb']->dbhost)  {
+                $host = split(":", $_SESSION['newpostgresdb']->dbhost);
+                if ($host[0]) $cmd .= " -h {$host[0]}";
+                if (isset($host[1])) $cmd .= " -p {$host[1]}";
+            }
+            $cmd .= " {$_SESSION['newpostgresdb']->dbname}";
+            exec($cmd.' 2>&1 > /dev/null', $output, $return_var);
+            if ($return_var) { // we are dead!
+                echo '<br />';
+                print_simple_box_start('center','50%');
+                print_string('dbmigrationdupfailed','admin',htmlspecialchars(implode("\n", $output)));
+                print_simple_box_end();
+                print_footer();
+                exit;
+            }
+        }
 
         $migrationconfig = new object;
         $migrationconfig->name = 'dbmigration';
@@ -330,8 +388,8 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                                                 $courseid = get_record_sql(preg_replace($patterns, $replacements, $sqldetectcourse));
 
                                                 $sitelang   = $CFG->lang;
-                                                $courselang = get_course_lang($courseid->course);
-                                                $userlang   = get_user_lang($userid->userid);
+                                                $courselang = get_course_lang(isset($courseid->course)?$courseid->course:1);
+                                                $userlang   = get_user_lang(isset($userid->userid)?$userid->userid:1);
 
                                                 $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
                                             }
@@ -342,7 +400,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                                                 $newrecord = new object;
                                                 $newrecord->id = $record->id;
                                                 $newrecord->{$fieldname} = $result;
-                                                update_record($dbtablename,$newrecord);
+                                                migrate2utf8_update_record($dbtablename,$newrecord);
                                             }
                                             if ($debug) {
                                                 $db->debug=0;
@@ -474,6 +532,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                     } else {
 
                     //posgresql code here
+                    //No we don't need to do anything here
                     
                     }
 
@@ -513,6 +572,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
 
                 } else {
                   ///posgresql code here
+                  ///No we don't need to do anything here
 
                 }
 
@@ -542,23 +602,39 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
             } else {
 
                 ///posgresql code here
+                ///No we don't need to do anything here
             }
         }
     }
 
-    /*********************************
-     * now we modify the db encoding *
-     *********************************/
-    $SQL = 'ALTER DATABASE '.$CFG->dbname.' CHARACTER SET utf8';
-    execute_sql($SQL, $debug);
+    if ($CFG->dbtype=='mysql') {
+        /*********************************
+         * now we modify the db encoding *
+         *********************************/
+        $SQL = 'ALTER DATABASE '.$CFG->dbname.' CHARACTER SET utf8';
+        execute_sql($SQL, $debug);
+    } else {
+        if (!is_postgres_utf8()) {
+            //This old database is now deprecated
+            set_config('migrated_to_new_db','1');
+        }
+    }
     delete_records('config','name','dbmigration');    //bye bye
     
     //These have to go!
     if ($debug) {
         $db->debug=999;
     }
+    if ($CFG->dbtype == 'postgres7') {
+        $backup_db = $GLOBALS['db'];
+        $GLOBALS['db'] = &get_postgres_db();
+    }
     execute_sql('TRUNCATE TABLE '.$CFG->prefix.'cache_text', $debug);
     execute_sql('TRUNCATE TABLE '.$CFG->prefix.'cache_filters', $debug);
+    if ($CFG->dbtype == 'postgres7') {
+        $GLOBALS['db'] = $backup_db;
+        unset($backup_db);
+    }
     if ($debug) {
         $db->debug=0;
     }
@@ -566,7 +642,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
     $sitelanguage = get_record('config','name', 'lang');
     if (strstr($sitelanguage->value, 'utf8')===false and $sitelanguage->value) {
         $sitelanguage->value.='_utf8';
-        update_record('config',$sitelanguage);
+        migrate2utf8_update_record('config',$sitelanguage);
     }
 
     //finish the javascript bar
@@ -592,7 +668,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
     @unlink($CFG->dataroot.'/cache/languages');
 
     //set the final flag
-    set_config('unicodedb','true');    //this is the main flag for unicode db
+    migrate2utf8_set_config('unicodedb','true');    //this is the main flag for unicode db
     
 }
 
@@ -704,6 +780,85 @@ function utfconvert($string, $enc) {
     return $result;
 }
 
+function validate_form(&$form, &$err) {
+    global $CFG;
+
+    $newdb = &ADONewConnection('postgres7');
+    error_reporting(0);  // Hide errors
+    $dbconnected = $newdb->Connect($form->dbhost,$form->dbuser,$form->dbpass,$form->dbname);
+    error_reporting($CFG->debug);  // Show errors
+    if (!$dbconnected) {
+        $err['dbconnect'] = get_string('dbmigrateconnecerror', 'admin');
+        return;
+    }
+
+    if (!is_postgres_utf8($newdb)) {
+        $err['dbconnect'] = get_string('dbmigrateencodingerror', 'admin', $encoding);
+        return;
+    }
+
+    return;
+}
+
+function is_postgres_utf8($thedb = null) {
+    if ($thedb === null) {
+        $thedb = &$GLOBALS['db'];
+    }
+
+    $db_encoding_postgres = $thedb->GetOne('SHOW server_encoding');
+    if (strtoupper($db_encoding_postgres) == 'UNICODE' || strtoupper($db_encoding_postgres) == 'UTF8') {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+function &get_postgres_db() {
+    static $postgres_db;
+
+    if (!$postgres_db) {
+        if (is_postgres_utf8()) {
+            $postgres_db = &$GLOBALS['db'];
+        } else {
+            $postgres_db = &ADONewConnection('postgres7');
+            $postgres_db->Connect($_SESSION['newpostgresdb']->dbhost,$_SESSION['newpostgresdb']->dbuser,$_SESSION['newpostgresdb']->dbpass,$_SESSION['newpostgresdb']->dbname);
+        }
+    }
+
+    return $postgres_db;
+}
+
+function is_postgres_setup() {
+    $postgres_db = &get_postgres_db();
+
+    return $GLOBALS['db']->MetaTables() == $postgres_db->MetaTables();
+}
+
+function migrate2utf8_update_record($table,$record) {
+    global $CFG;
+
+    if ($CFG->dbtype == 'mysql') {
+        update_record($table,$record);
+    } else {
+        $backup_db = $GLOBALS['db'];
+        $GLOBALS['db'] = &get_postgres_db();
+        global $in;
+        $in = true;
+        update_record($table,$record);
+        $GLOBALS['db'] = $backup_db;
+    }
+}
+
+function migrate2utf8_set_config($name, $value, $plugin=NULL) {
+    if ($CFG->dbtype == 'mysql') {
+        set_config($name, $value, $plugin);
+    } else {
+        $backup_db = $GLOBALS['db'];
+        $GLOBALS['db'] = &get_postgres_db();
+        set_config($name, $value, $plugin);
+        $GLOBALS['db'] = $backup_db;
+    }
+}
 
 function utf_get_xml () {
     global $CFG;
index a5e91f3c7d7c879c859ab572ac36a4364b129c42..b6577b89fac6363cf2c1d028cd9a935307cbcc98 100755 (executable)
@@ -33,7 +33,7 @@ function migrate2utf8_backup_ids_info($recordid){
         $newbackupids = new object;
         $newbackupids->id = $recordid;
         $newbackupids->info = $result;
-        update_record('backup_ids',$newbackupids);
+        migrate2utf8_update_record('backup_ids',$newbackupids);
     }
 /// And finally, just return the converted field
     return $result;
index 61b6b18de1e48cf72ff4c694c8fc654c36cf29a3..6cb873e3b7840b1295d0928e23530437279051e9 100755 (executable)
@@ -31,7 +31,7 @@ function migrate2utf8_block_instance_configdata($recordid){
         
         $blockinstance->configdata = base64_encode(serialize($blah));
 
-        update_record('block_instance',$blockinstance);
+        migrate2utf8_update_record('block_instance',$blockinstance);
 
         return $blah;
 
@@ -57,7 +57,7 @@ function migrate2utf8_block_instance_configdata($recordid){
 
         $blockinstance->configdata = base64_encode(serialize($blah));
 
-        update_record('block_instance',$blockinstance);
+        migrate2utf8_update_record('block_instance',$blockinstance);
 
         return $blah;
 
index c700080520cd91f118368c4430b9397ff64d6568..7149f4546ade025f6cd77e37f8047a48b84a349d 100755 (executable)
@@ -33,7 +33,7 @@ function migrate2utf8_block_rss_client_title($recordid){
         $newrssclient = new object;
         $newrssclient->id = $recordid;
         $newrssclient->title = $result;
-        update_record('block_rss_client',$newrssclient);
+        migrate2utf8_update_record('block_rss_client',$newrssclient);
     }
 /// And finally, just return the converted field
     return $result;
@@ -83,7 +83,7 @@ function migrate2utf8_block_rss_client_preferredtitle($recordid){
         $newrssclient = new object;
         $newrssclient->id = $recordid;
         $newrssclient->preferredtitle = $result;
-        update_record('block_rss_client',$newrssclient);
+        migrate2utf8_update_record('block_rss_client',$newrssclient);
 /// And finally, just return the converted field
     }
     return $result;
@@ -132,7 +132,7 @@ function migrate2utf8_block_rss_client_description($recordid){
         $newrssclient = new object;
         $newrssclient->id = $recordid;
         $newrssclient->description = $result;
-        update_record('block_rss_client',$newrssclient);
+        migrate2utf8_update_record('block_rss_client',$newrssclient);
     }
 /// And finally, just return the converted field
     return $result;
index 169232fef764f53f8d97fc2974f985aceec08dbd..5a3c6e7c260fe4baf1c1dace04542f0717f4309a 100644 (file)
@@ -128,8 +128,13 @@ $string['confirmation'] = 'Confirmation';
 $string['confirminstall'] = 'You are about to install language pack ($a), are you sure?';
 $string['cronwarning'] = 'The <a href=\"cron.php\">cron.php maintenance script</a> has not been run for at least 24 hours. <br />The <a href=\"../doc/?frame=install.html&amp;sub=cron\">installation documentation</a> explains how you can automate this.';
 $string['dbmigrate'] = 'Moodle Database Migration';
+$string['dbmigrationdeprecateddb'] = '<font color=\"#ff0000\">This database is migrated to a new UTF8 database and deprecated. Please edit your config.php and use the new database for this moodle.</font>';
+$string['dbmigrationdupfailed'] = 'Database duplication failed with possible error:<font color=\"#ff0000\"><pre>$a</pre></font>';
 $string['dbmigratewarning'] = 'Please make sure that you have backed up your moodle database before commencing this procedure. If you are unsure of how to do that, please contact your system admin. Your Moodle site will be put under maintenance mode after you start the migration process';
 $string['dbmigratewarning2'] = '<b>Warning: You are about to start the database migration process. Please be very sure that your entire Moodle database is backed up.</b>';
+$string['dbmigrateconnecerror'] = 'Could not connect to the database specified.';
+$string['dbmigrateencodingerror'] = 'The database specified has encoding $a rather than required UNICODE/UTF8.<br />Please specify another.';
+$string['dbmigratepostgres'] = 'It seems that you are using PostgreSQL as the database server. To continue the migration process you need to manually create a new database with encoding \"UNICODE\"(PostgreSQL 7) or \"UTF8\" (PostgreSQL 8) to store the migrated data. Please enter your new database connection settings below to continue:';
 $string['density'] = 'Density';
 $string['download'] = 'Download';
 $string['edithelpdocs'] = 'Edit help documents';
@@ -195,6 +200,12 @@ $string['pathdvips'] = 'Path of <i>dvips</i> binary';
 $string['pathconvert'] = 'Path of <i>convert</i> binary';
 $string['pathlatex'] = 'Path of <i>latex</i> binary';
 $string['pleaseregister'] = 'Please register your site to remove this button';
+$string['pgcluster'] = 'PostgreSQL Cluster';
+$string['pgclusterdescription'] = '<pre>PostgreSQL version/cluster parameter
+for command line operations.
+If you only have one postgresql
+on your system or you are not
+sure what this is, leave this blank.</pre>';
 $string['remotelangnotavailable'] = 'Because Moodle can not connect to download.moodle.org, we are unable to do language pack installation automatically. Please download the appropriate zip file(s) from the list below, copy them to your $a directory and unzip them manually.';
 $string['sitelangchanged'] = 'Site language setting changed successfully';
 $string['sitemaintenance'] = 'The site is undergoing maintenance and is currently not available';
index 002ff3ece711dca1564c413d4c5477fad11eff86..fc6260efec4bc842e28516a2f6c0bb88c39cff92 100755 (executable)
@@ -36,7 +36,7 @@ function migrate2utf8_event_name($recordid){
         $newevent = new object;
         $newevent->id = $recordid;
         $newevent->name = $result;
-        update_record('event',$newevent);
+        migrate2utf8_update_record('event',$newevent);
     }
 /// And finally, just return the converted field
     return $result;
@@ -77,7 +77,7 @@ function migrate2utf8_event_description($recordid){
         $newevent = new object;
         $newevent->id = $recordid;
         $newevent->description = $result;
-        update_record('event',$newevent);
+        migrate2utf8_update_record('event',$newevent);
     }
 /// And finally, just return the converted field
     return $result;
@@ -115,7 +115,7 @@ function migrate2utf8_config_value($recordid){
         $newconfig = new object;
         $newconfig->id = $recordid;
         $newconfig->value = $result;
-        update_record('config',$newconfig);
+        migrate2utf8_update_record('config',$newconfig);
     }
 /// And finally, just return the converted field
     return $result;
@@ -153,7 +153,7 @@ function migrate2utf8_config_plugins_value($recordid){
         $newconfigplugins = new object;
         $newconfigplugins->id = $recordid;
         $newconfigplugins->value = $result;
-        update_record('config_plugins',$newconfigplugins);
+        migrate2utf8_update_record('config_plugins',$newconfigplugins);
     }
 /// And finally, just return the converted field
     return $result;
@@ -191,7 +191,7 @@ function migrate2utf8_course_categories_name($recordid){
         $newcoursecategories = new object;
         $newcoursecategories->id = $recordid;
         $newcoursecategories->name = $result;
-        update_record('course_categories',$newcoursecategories);
+        migrate2utf8_update_record('course_categories',$newcoursecategories);
     }
 /// And finally, just return the converted field
     return $result;
@@ -230,7 +230,7 @@ function migrate2utf8_course_categories_description($recordid){
         $newcoursecategories = new object;
         $newcoursecategories->id = $recordid;
         $newcoursecategories->description = $result;
-        update_record('course_categories',$newcoursecategories);
+        migrate2utf8_update_record('course_categories',$newcoursecategories);
     }
 /// And finally, just return the converted field
     return $result;
@@ -269,7 +269,7 @@ function migrate2utf8_course_sections_summary($recordid){
         $newcoursesections = new object;
         $newcoursesections->id = $recordid;
         $newcoursesections->summary = $result;
-        update_record('course_sections',$newcoursesections);
+        migrate2utf8_update_record('course_sections',$newcoursesections);
     }
 /// And finally, just return the converted field
     return $result;
@@ -310,7 +310,7 @@ function migrate2utf8_course_request_fullname($recordid){
         $newcourserequest = new object;
         $newcourserequest->id = $recordid;
         $newcourserequest->fullname = $result;
-        update_record('course_request',$newcourserequest);
+        migrate2utf8_update_record('course_request',$newcourserequest);
     }
 /// And finally, just return the converted field
     return $result;
@@ -351,7 +351,7 @@ function migrate2utf8_course_request_shortname($recordid){
         $newcourserequest = new object;
         $newcourserequest->id = $recordid;
         $newcourserequest->shortname = $result;
-        update_record('course_request',$newcourserequest);
+        migrate2utf8_update_record('course_request',$newcourserequest);
     }
 /// And finally, just return the converted field
     return $result;
@@ -392,7 +392,7 @@ function migrate2utf8_course_request_summary($recordid){
         $newcourserequest = new object;
         $newcourserequest->id = $recordid;
         $newcourserequest->summary = $result;
-        update_record('course_request',$newcourserequest);
+        migrate2utf8_update_record('course_request',$newcourserequest);
     }
 /// And finally, just return the converted field
     return $result;
@@ -433,7 +433,7 @@ function migrate2utf8_course_request_reason($recordid){
         $newcourserequest = new object;
         $newcourserequest->id = $recordid;
         $newcourserequest->reason = $result;
-        update_record('course_request',$newcourserequest);
+        migrate2utf8_update_record('course_request',$newcourserequest);
     }
 /// And finally, just return the converted field
     return $result;
@@ -474,7 +474,7 @@ function migrate2utf8_course_request_password($recordid){
         $newcourserequest = new object;
         $newcourserequest->id = $recordid;
         $newcourserequest->password = $result;
-        update_record('course_request',$newcourserequest);
+        migrate2utf8_update_record('course_request',$newcourserequest);
     }
 /// And finally, just return the converted field
     return $result;
@@ -512,7 +512,7 @@ function migrate2utf8_grade_category_name($recordid){
         $newgradecategory = new object;
         $newgradecategory->id = $recordid;
         $newgradecategory->name = $result;
-        update_record('grade_category',$newgradecategory);
+        migrate2utf8_update_record('grade_category',$newgradecategory);
     }
 /// And finally, just return the converted field
     return $result;
@@ -551,7 +551,7 @@ function migrate2utf8_grade_letter_letter($recordid){
         $newgradeletter = new object;
         $newgradeletter->id = $recordid;
         $newgradeletter->letter = $result;
-        update_record('grade_letter',$newgradeletter);
+        migrate2utf8_update_record('grade_letter',$newgradeletter);
     }
 /// And finally, just return the converted field
     return $result;
@@ -590,7 +590,7 @@ function migrate2utf8_groups_name($recordid){
         $newgroup = new object;
         $newgroup->id = $recordid;
         $newgroup->name = $result;
-        update_record('groups',$newgroup);
+        migrate2utf8_update_record('groups',$newgroup);
     }
 /// And finally, just return the converted field
     return $result;
@@ -629,7 +629,7 @@ function migrate2utf8_groups_description($recordid){
         $newgroup = new object;
         $newgroup->id = $recordid;
         $newgroup->description = $result;
-        update_record('groups',$newgroup);
+        migrate2utf8_update_record('groups',$newgroup);
     }
 /// And finally, just return the converted field
     return $result;
@@ -668,7 +668,7 @@ function migrate2utf8_groups_lang($recordid){
         $newgroup = new object;
         $newgroup->id = $recordid;
         $newgroup->lang = $result;
-        update_record('groups',$newgroup);
+        migrate2utf8_update_record('groups',$newgroup);
     }
 /// And finally, just return the converted field
     return $result;
@@ -707,7 +707,7 @@ function migrate2utf8_groups_password($recordid){
         $newgroup = new object;
         $newgroup->id = $recordid;
         $newgroup->password = $result;
-        update_record('groups',$newgroup);
+        migrate2utf8_update_record('groups',$newgroup);
     }
 /// And finally, just return the converted field
     return $result;
@@ -748,7 +748,7 @@ function migrate2utf8_message_message($recordid){
         $newmessage = new object;
         $newmessage->id = $recordid;
         $newmessage->message = $result;
-        update_record('message',$newmessage);
+        migrate2utf8_update_record('message',$newmessage);
     }
 /// And finally, just return the converted field
     return $result;
@@ -789,7 +789,7 @@ function migrate2utf8_message_read_message($recordid){
         $newmessageread = new object;
         $newmessageread->id = $recordid;
         $newmessageread->message = $result;
-        update_record('message_read',$newmessageread);
+        migrate2utf8_update_record('message_read',$newmessageread);
     }
 /// And finally, just return the converted field
     return $result;
@@ -828,7 +828,7 @@ function migrate2utf8_modules_search($recordid){
         $newmodules = new object;
         $newmodules->id = $recordid;
         $newmodules->search = $result;
-        update_record('modules',$newmodules);
+        migrate2utf8_update_record('modules',$newmodules);
     }
 /// And finally, just return the converted field
     return $result;
@@ -864,7 +864,7 @@ function migrate2utf8_user_idnumber($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->idnumber = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -900,7 +900,7 @@ function migrate2utf8_user_firstname($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->firstname = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -936,7 +936,7 @@ function migrate2utf8_user_lastname($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->lastname = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -971,7 +971,7 @@ function migrate2utf8_user_institution($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->institution = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1007,7 +1007,7 @@ function migrate2utf8_user_department($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->department = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     /// And finally, just return the converted field
     }
     return $result;
@@ -1042,7 +1042,7 @@ function migrate2utf8_user_address($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->address = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1078,7 +1078,7 @@ function migrate2utf8_user_city($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->city = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1113,7 +1113,7 @@ function migrate2utf8_user_description($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->description = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1149,7 +1149,7 @@ function migrate2utf8_user_secret($recordid){
         $newuser = new object;
         $newuser->id = $recordid;
         $newuser->secret = $result;
-        update_record('user',$newuser);
+        migrate2utf8_update_record('user',$newuser);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1174,13 +1174,13 @@ function migrate2utf8_user_lang($recordid){
     $newuser = new object;
     $newuser->id = $user->id;
     $newuser->lang = $user->lang;
-    $result = update_record('user',$newuser);
+    $result = migrate2utf8_update_record('user',$newuser);
     
     $langsused = get_record('config','name','langsused');
     $langs = explode(',',$langsused->value);
     if (!in_array($user->lang, $langs)) {
         $langsused->value .= ','.$user->lang;
-        update_record('config',$langsused);
+        migrate2utf8_update_record('config',$langsused);
     }
     
 
@@ -1221,7 +1221,7 @@ function migrate2utf8_course_password($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->password = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1260,7 +1260,7 @@ function migrate2utf8_course_fullname($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->fullname = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1298,7 +1298,7 @@ function migrate2utf8_course_shortname($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->shortname = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1336,7 +1336,7 @@ function migrate2utf8_course_idnumber($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->idnumber = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1373,7 +1373,7 @@ function migrate2utf8_course_summary($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->summary = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1417,7 +1417,7 @@ function migrate2utf8_course_teacher($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->teacher = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1456,7 +1456,7 @@ function migrate2utf8_course_teachers($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->teachers = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1495,7 +1495,7 @@ function migrate2utf8_course_student($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->student = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1533,7 +1533,7 @@ function migrate2utf8_course_students($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->students = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     }
 /// And finally, just return the converted field
     return $result;
@@ -1571,7 +1571,7 @@ function migrate2utf8_course_cost($recordid){
         $newcourse = new object;
         $newcourse->id = $recordid;
         $newcourse->cost = $result;
-        update_record('course',$newcourse);
+        migrate2utf8_update_record('course',$newcourse);
     /// And finally, just return the converted field
     }
     return $result;
@@ -1591,9 +1591,17 @@ function migrate2utf8_course_lang($recordid){
     $newcourse = new object;
     $newcourse->id = $course->id;
     $newcourse->lang = $course->lang;
-    update_record('course',$newcourse);
+    migrate2utf8_update_record('course',$newcourse);
     require_once($CFG->dirroot.'/course/lib.php');
+    if ($CFG->dbtype == 'postgres7') {
+        $backup_db = $GLOBALS['db'];
+        $GLOBALS['db'] = &get_postgres_db();
+    }
     $result = rebuild_course_cache($recordid);    //takes care of serialized modinfo
+    if ($CFG->dbtype == 'postgres7') {
+        $GLOBALS['db'] = $backup_db;
+        unset($backup_db);
+    }
 /// And finally, just return the converted field
 
 
@@ -1601,7 +1609,7 @@ function migrate2utf8_course_lang($recordid){
     $langs = explode(',',$langsused->value);
     if (!in_array($course->lang, $langs)) {
         $langsused->value .= ','.$course->lang;
-        update_record('config',$langsused);
+        migrate2utf8_update_record('config',$langsused);
     }
 
     return $result;
index e570330f8466fcac201a2a87dc8fc748721b7289..1adb3ba3eabb7203fc5ccb66b542f1181f5f0f72 100755 (executable)
@@ -30,7 +30,7 @@ function migrate2utf8_assignment_name($recordid){
         $newassignment = new object;
         $newassignment->id = $recordid;
         $newassignment->name = $result;
-        update_record('assignment',$newassignment);
+        migrate2utf8_update_record('assignment',$newassignment);
     }
 /// And finally, just return the converted field
 
@@ -68,7 +68,7 @@ function migrate2utf8_assignment_description($recordid){
         $newassignment = new object;
         $newassignment->id = $recordid;
         $newassignment->description = $result;
-        update_record('assignment',$newassignment);
+        migrate2utf8_update_record('assignment',$newassignment);
     }
 /// And finally, just return the converted field
     return $result;
index f76b5a7df6f39db3825252dd63261eff03d9e781..947ca8fb1a63e240f87a276f80fab4f9980fc298 100755 (executable)
@@ -31,7 +31,7 @@ function migrate2utf8_chat_name($recordid){
         $newchat = new object;
         $newchat->id = $recordid;
         $newchat->name = $result;
-        update_record('chat',$newchat);
+        migrate2utf8_update_record('chat',$newchat);
     }
 /// And finally, just return the converted field
     return $result;
@@ -69,7 +69,7 @@ function migrate2utf8_chat_intro($recordid){
         $newchat = new object;
         $newchat->id = $recordid;
         $newchat->intro = $result;
-        update_record('chat',$newchat);
+        migrate2utf8_update_record('chat',$newchat);
     }
 /// And finally, just return the converted field
     return $result;
index 9ce50ad74e16ebfd6a58327cc56294b5654e29ca..e2acaa3884aae970439ecf6e6a4f4a080b97d21c 100755 (executable)
@@ -43,7 +43,7 @@ function migrate2utf8_choice_options_text($recordid){
         $newchoiceoption = new object;
         $newchoiceoption->id = $recordid;
         $newchoiceoption->text = $result;
-        update_record('choice_options',$newchoiceoption);
+        migrate2utf8_update_record('choice_options',$newchoiceoption);
     }
 /// And finally, just return the converted field
     return $result;
@@ -80,7 +80,7 @@ function migrate2utf8_choice_name($recordid){
         $newchoice = new object;
         $newchoice->id = $recordid;
         $newchoice->name = $result;
-        update_record('choice',$newchoice);
+        migrate2utf8_update_record('choice',$newchoice);
     }
 /// And finally, just return the converted field
     return $result;
@@ -117,7 +117,7 @@ function migrate2utf8_choice_text($recordid){
         $newchoice = new object;
         $newchoice->id = $recordid;
         $newchoice->text = $result;
-        update_record('choice',$newchoice);
+        migrate2utf8_update_record('choice',$newchoice);
     }
 /// And finally, just return the converted field
     return $result;
index 88f814ed8d9a621d0fe826b260a6a8db0bd17cac..4cbb53341ef9b57caea5d53d11139d061a9c9f39 100755 (executable)
@@ -42,7 +42,7 @@ function migrate2utf8_data_fields_name($recordid){
         $newdatafield = new object;
         $newdatafield->id = $recordid;
         $newdatafield->name = $result;
-        update_record('data_fields',$newdatafield);
+        migrate2utf8_update_record('data_fields',$newdatafield);
     }
 /// And finally, just return the converted field
     return $result;
@@ -91,7 +91,7 @@ function migrate2utf8_data_fields_description($recordid){
         $newdatafield = new object;
         $newdatafield->id = $recordid;
         $newdatafield->description = $result;
-        update_record('data_fields',$newdatafield);
+        migrate2utf8_update_record('data_fields',$newdatafield);
     }
 /// And finally, just return the converted field
     return $result;
@@ -129,7 +129,7 @@ function migrate2utf8_data_name($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->name = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -167,7 +167,7 @@ function migrate2utf8_data_intro($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->intro = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -206,7 +206,7 @@ function migrate2utf8_data_singletemplate($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->singletemplate = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -245,7 +245,7 @@ function migrate2utf8_data_listtemplate($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->listtemplate = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -284,7 +284,7 @@ function migrate2utf8_data_addtemplate($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->addtemplate = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -322,7 +322,7 @@ function migrate2utf8_data_rsstemplate($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->rsstemplate = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -359,7 +359,7 @@ function migrate2utf8_data_listtemplateheader($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->listtemplateheader = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
@@ -397,7 +397,7 @@ function migrate2utf8_data_listtemplatefooter($recordid){
         $newdata= new object;
         $newdata->id = $recordid;
         $newdata->listtemplatefooter = $result;
-        update_record('data',$newdata);
+        migrate2utf8_update_record('data',$newdata);
     }
 /// And finally, just return the converted field
     return $result;
index 1f9f6d4768283d235bc893eb824bb3c4783ba212..42817733bd63b3b857a11449372b9c8f2707424d 100755 (executable)
@@ -43,7 +43,7 @@ function migrate2utf8_exercise_elements_description($recordid){
         $newexerciseelement = new object;
         $newexerciseelement->id = $recordid;
         $newexerciseelement->description = $result;
-        update_record('exercise_elements',$newexerciseelement);
+        migrate2utf8_update_record('exercise_elements',$newexerciseelement);
     }
 /// And finally, just return the converted field
     return $result;
@@ -92,7 +92,7 @@ function migrate2utf8_exercise_grades_feedback($recordid){
         $newexercisegrade = new object;
         $newexercisegrade->id = $recordid;
         $newexercisegrade->feedback = $result;
-        update_record('exercise_grades',$newexercisegrade);
+        migrate2utf8_update_record('exercise_grades',$newexercisegrade);
     }
 /// And finally, just return the converted field
     return $result;
@@ -141,7 +141,7 @@ function migrate2utf8_exercise_rubrics_description($recordid){
         $newexerciserubric = new object;
         $newexerciserubric->id = $recordid;
         $newexerciserubric->description = $result;
-        update_record('exercise_rubrics',$newexerciserubric);
+        migrate2utf8_update_record('exercise_rubrics',$newexerciserubric);
     }
 /// And finally, just return the converted field
     return $result;
@@ -179,7 +179,7 @@ function migrate2utf8_exercise_name($recordid){
         $newexercise = new object;
         $newexercise->id = $recordid;
         $newexercise->name = $result;
-        update_record('exercise',$newexercise);
+        migrate2utf8_update_record('exercise',$newexercise);
     }
 /// And finally, just return the converted field
     return $result;
index a277e862593a0cd1cddbe64c641bd384916ac330..d6f5451a0e3bf5ea531348e00d0fc1dfc51f4855 100755 (executable)
@@ -31,7 +31,7 @@ function migrate2utf8_forum_name($recordid){
         $newforum = new object;
         $newforum->id = $recordid;
         $newforum->name = $result;
-        update_record('forum',$newforum);
+        migrate2utf8_update_record('forum',$newforum);
     }
 /// And finally, just return the converted field
     return $result;
@@ -70,7 +70,7 @@ function migrate2utf8_forum_intro($recordid){
         $newforum = new object;
         $newforum->id = $recordid;
         $newforum->intro = $result;
-        update_record('forum',$newforum);
+        migrate2utf8_update_record('forum',$newforum);
     }
 /// And finally, just return the converted field
     return $result;
index 39581a1e5b3d65d83a68d5c8bf05eb9d36c076db..8969ce241e274b443a2dfb09f7ad496001abbaea 100755 (executable)
@@ -41,7 +41,7 @@ function migrate2utf8_glossary_categories_name($recordid){
         $newglossarycategory = new object;
         $newglossarycategory->id = $recordid;
         $newglossarycategory->name = $result;
-        update_record('glossary_categories',$newglossarycategory);
+        migrate2utf8_update_record('glossary_categories',$newglossarycategory);
     }
 /// And finally, just return the converted field
     return $result;
@@ -79,7 +79,7 @@ function migrate2utf8_glossary_name($recordid){
         $newglossary = new object;
         $newglossary->id = $recordid;
         $newglossary->name = $result;
-        update_record('glossary',$newglossary);
+        migrate2utf8_update_record('glossary',$newglossary);
     }
 /// And finally, just return the converted field
     return $result;
@@ -117,7 +117,7 @@ function migrate2utf8_glossary_intro($recordid){
         $newglossary = new object;
         $newglossary->id = $recordid;
         $newglossary->intro = $result;
-        update_record('glossary',$newglossary);
+        migrate2utf8_update_record('glossary',$newglossary);
     }
 /// And finally, just return the converted field
     return $result;
index e57bfbbe99a940941cb522df7a2c1bb528b079b1..4fe747519d3bebb196db8823bee1cecb483f51ca 100755 (executable)
@@ -33,7 +33,7 @@ function migrate2utf8_hotpot_strings_string($recordid){
         $newhotpotstrings = new object;
         $newhotpotstrings->id = $recordid;
         $newhotpotstrings->string = $result;
-        update_record('hotpot_strings',$newhotpotstrings);
+        migrate2utf8_update_record('hotpot_strings',$newhotpotstrings);
     /// And finally, just return the converted field
     }
     return $result;
@@ -81,7 +81,7 @@ function migrate2utf8_hotpot_questions_name($recordid){
         $newhotpotquestion = new object;
         $newhotpotquestion->id = $recordid;
         $newhotpotquestion->name = $result;
-        update_record('hotpot_questions',$newhotpotquestion);
+        migrate2utf8_update_record('hotpot_questions',$newhotpotquestion);
     /// And finally, just return the converted field
     }
     return $result;
@@ -119,7 +119,7 @@ function migrate2utf8_hotpot_name($recordid){
         $newhotpot = new object;
         $newhotpot->id = $recordid;
         $newhotpot->name = $result;
-        update_record('hotpot',$newhotpot);
+        migrate2utf8_update_record('hotpot',$newhotpot);
 /// And finally, just return the converted field
     }
     return $result;
@@ -157,7 +157,7 @@ function migrate2utf8_hotpot_summary($recordid){
         $newhotpot = new object;
         $newhotpot->id = $recordid;
         $newhotpot->summary = $result;
-        update_record('hotpot',$newhotpot);
+        migrate2utf8_update_record('hotpot',$newhotpot);
     }
 /// And finally, just return the converted field
     return $result;
@@ -195,7 +195,7 @@ function migrate2utf8_hotpot_password($recordid){
         $newhotpot = new object;
         $newhotpot->id = $recordid;
         $newhotpot->password = $result;
-        update_record('hotpot',$newhotpot);
+        migrate2utf8_update_record('hotpot',$newhotpot);
     }
 /// And finally, just return the converted field
     return $result;
index 98df391b14e33ea06fe247bea3073d73d591b3e5..6db0b71110b579da54d544e4f26271816bad1ca4 100755 (executable)
@@ -31,7 +31,7 @@ function migrate2utf8_journal_name($recordid){
         $newjournal = new object;
         $newjournal->id = $recordid;
         $newjournal->name = $result;
-        update_record('journal',$newjournal);
+        migrate2utf8_update_record('journal',$newjournal);
     }
 /// And finally, just return the converted field
     return $result;
@@ -69,7 +69,7 @@ function migrate2utf8_journal_intro($recordid){
         $newjournal = new object;
         $newjournal->id = $recordid;
         $newjournal->intro = $result;
-        update_record('journal',$newjournal);
+        migrate2utf8_update_record('journal',$newjournal);
     }
 /// And finally, just return the converted field
     return $result;
index e25bac3eecc12beed6d9e68198c694e6a28d526b..b093c67b25af66e01d03ea8de4353fffa927f198 100755 (executable)
@@ -31,7 +31,7 @@ function migrate2utf8_label_name($recordid){
         $newlabel = new object;
         $newlabel->id = $recordid;
         $newlabel->name = $result;
-        update_record('label',$newlabel);
+        migrate2utf8_update_record('label',$newlabel);
     }
 /// And finally, just return the converted field
     return $result;
@@ -69,7 +69,7 @@ function migrate2utf8_label_content($recordid){
         $newlabel = new object;
         $newlabel->id = $recordid;
         $newlabel->content = $result;
-        update_record('label',$newlabel);
+        migrate2utf8_update_record('label',$newlabel);
     }
 /// And finally, just return the converted field
     return $result;
index c8bf0f8da9f8c4b742e5e46420c70a88bd1e500c..6d86848286220653c76c704583e2d32ea4293b29 100755 (executable)
@@ -32,7 +32,7 @@ function migrate2utf8_lams_name($recordid){
         $newlams = new object;
         $newlams->id = $recordid;
         $newlams->name = $result;
-        update_record('lams',$newlams);
+        migrate2utf8_update_record('lams',$newlams);
     }
 /// And finally, just return the converted field
     return $result;
@@ -70,7 +70,7 @@ function migrate2utf8_lams_introduction($recordid){
         $newlams = new object;
         $newlams->id = $recordid;
         $newlams->introduction = $result;
-        update_record('lams',$newlams);
+        migrate2utf8_update_record('lams',$newlams);
     }
 /// And finally, just return the converted field
     return $result;
index 6284985c765e190199f898eeeabc41b4b02c4a82..338c556e5ffa12fe6b53a618a76156116d5afcab 100755 (executable)
@@ -42,7 +42,7 @@ function migrate2utf8_lesson_answers_answer($recordid){
         $newlessonanswers = new object;
         $newlessonanswers->id = $recordid;
         $newlessonanswers->answer = $result;
-        update_record('lesson_answers',$newlessonanswers);
+        migrate2utf8_update_record('lesson_answers',$newlessonanswers);
     }
 /// And finally, just return the converted field
     return $result;
@@ -91,7 +91,7 @@ function migrate2utf8_lesson_answers_response($recordid){
         $newlessonanswers = new object;
         $newlessonanswers->id = $recordid;
         $newlessonanswers->response = $result;
-        update_record('lesson_answers',$newlessonanswers);
+        migrate2utf8_update_record('lesson_answers',$newlessonanswers);
     }
 /// And finally, just return the converted field
     return $result;
@@ -147,7 +147,7 @@ function migrate2utf8_lesson_pages_contents($recordid){
         $newlessonpages = new object;
         $newlessonpages->id = $recordid;
         $newlessonpages->contents = $result;
-        update_record('lesson_pages',$newlessonpages);
+        migrate2utf8_update_record('lesson_pages',$newlessonpages);
     }
 /// And finally, just return the converted field
     return $result;
@@ -195,7 +195,7 @@ function migrate2utf8_lesson_pages_title($recordid){
         $newlessonpages = new object;
         $newlessonpages->id = $recordid;
         $newlessonpages->title = $result;
-        update_record('lesson_pages',$newlessonpages);
+        migrate2utf8_update_record('lesson_pages',$newlessonpages);
     }
 /// And finally, just return the converted field
     return $result;
@@ -233,7 +233,7 @@ function migrate2utf8_lesson_name($recordid){
         $newlesson = new object;
         $newlesson->id = $recordid;
         $newlesson->name = $result;
-        update_record('lesson',$newlesson);
+        migrate2utf8_update_record('lesson',$newlesson);
     }
 /// And finally, just return the converted field
     return $result;
index c71837b4fac2fc336881dd11d8c854c97a112180..efdb49969e5ca6ca0c900c14f85ef2d579fdb978 100755 (executable)
@@ -31,7 +31,7 @@ function migrate2utf8_resource_name($recordid){
         $newresource = new object;
         $newresource->id = $recordid;
         $newresource->name = $result;
-        update_record('resource',$newresource);
+        migrate2utf8_update_record('resource',$newresource);
     }
 /// And finally, just return the converted field
     return $result;
@@ -70,7 +70,7 @@ function migrate2utf8_resource_reference($recordid){
         $newresource = new object;
         $newresource->id = $recordid;
         $newresource->reference = $result;
-        update_record('resource',$newresource);
+        migrate2utf8_update_record('resource',$newresource);
     }
 /// And finally, just return the converted field
     return $result;
@@ -107,7 +107,7 @@ function migrate2utf8_resource_summary($recordid){
         $newresource = new object;
         $newresource->id = $recordid;
         $newresource->summary = $result;
-        update_record('resource',$newresource);
+        migrate2utf8_update_record('resource',$newresource);
     }
 /// And finally, just return the converted field
     return $result;
@@ -143,7 +143,7 @@ function migrate2utf8_resource_alltext($recordid){
         $newresource = new object;
         $newresource->id = $recordid;
         $newresource->alltext = $result;
-        update_record('resource',$newresource);
+        migrate2utf8_update_record('resource',$newresource);
     }
 /// And finally, just return the converted field
     return $result;
index 0de59debb07847576663f11761102ee5fb382fa7..96c12cf40030479fe15b84abf76d4f10a1b70919 100755 (executable)
@@ -43,7 +43,7 @@ function migrate2utf8_scorm_scoes_manifest($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->manifest = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -93,7 +93,7 @@ function migrate2utf8_scorm_scoes_organization($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->organization = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -143,7 +143,7 @@ function migrate2utf8_scorm_scoes_parent($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->parent = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -193,7 +193,7 @@ function migrate2utf8_scorm_scoes_identifier($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->identifier = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -242,7 +242,7 @@ function migrate2utf8_scorm_scoes_launch($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->launch = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -292,7 +292,7 @@ function migrate2utf8_scorm_scoes_parameters($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->parameters = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -342,7 +342,7 @@ function migrate2utf8_scorm_scoes_scormtype($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->scormtype = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -392,7 +392,7 @@ function migrate2utf8_scorm_scoes_title($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->title = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -442,7 +442,7 @@ function migrate2utf8_scorm_scoes_prerequisites($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->prerequisites = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -492,7 +492,7 @@ function migrate2utf8_scorm_scoes_maxtimeallowed($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->maxtimeallowed = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -542,7 +542,7 @@ function migrate2utf8_scorm_scoes_timelimitaction($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->timelimitaction = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -592,7 +592,7 @@ function migrate2utf8_scorm_scoes_datafromlms($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->datafromlms = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -641,7 +641,7 @@ function migrate2utf8_scorm_scoes_masteryscore($recordid){
         $newscormscoes = new object;
         $newscormscoes->id = $recordid;
         $newscormscoes->masteryscore = $result;
-        update_record('scorm_scoes',$newscormscoes);
+        migrate2utf8_update_record('scorm_scoes',$newscormscoes);
     }
 /// And finally, just return the converted field
     return $result;
@@ -680,7 +680,7 @@ function migrate2utf8_scorm_name($recordid){
         $newscorm = new object;
         $newscorm->id = $recordid;
         $newscorm->name = $result;
-        update_record('scorm',$newscorm);
+        migrate2utf8_update_record('scorm',$newscorm);
     }
 /// And finally, just return the converted field
     return $result;
@@ -718,7 +718,7 @@ function migrate2utf8_scorm_reference($recordid){
         $newscorm = new object;
         $newscorm->id = $recordid;
         $newscorm->reference = $result;
-        update_record('scorm',$newscorm);
+        migrate2utf8_update_record('scorm',$newscorm);
     }
 /// And finally, just return the converted field
     return $result;
@@ -756,7 +756,7 @@ function migrate2utf8_scorm_summary($recordid){
         $newscorm = new object;
         $newscorm->id = $recordid;
         $newscorm->summary = $result;
-        update_record('scorm',$newscorm);
+        migrate2utf8_update_record('scorm',$newscorm);
     }
 /// And finally, just return the converted field
     return $result;
@@ -794,7 +794,7 @@ function migrate2utf8_scorm_options($recordid){
         $newscorm = new object;
         $newscorm->id = $recordid;
         $newscorm->options = $result;
-        update_record('scorm',$newscorm);
+        migrate2utf8_update_record('scorm',$newscorm);
     }
 /// And finally, just return the converted field
     return $result;
index d6396f861bac6b712ca70b76a8c3d3ea58bddf80..83d2e9e13257a05ad637350f3992c227b57a0e90 100755 (executable)
@@ -33,7 +33,7 @@ function migrate2utf8_survey_name($recordid){
         $newsurvey = new object;
         $newsurvey->id = $recordid;
         $newsurvey->name = $result;
-        update_record('survey',$newsurvey);
+        migrate2utf8_update_record('survey',$newsurvey);
     }
 /// And finally, just return the converted field
     return $result;
@@ -71,7 +71,7 @@ function migrate2utf8_survey_intro($recordid){
         $newsurvey = new object;
         $newsurvey->id = $recordid;
         $newsurvey->intro = $result;
-        update_record('survey',$newsurvey);
+        migrate2utf8_update_record('survey',$newsurvey);
     }
 /// And finally, just return the converted field
     return $result;
index c531a0d25785134011b564bc08bd7a210bea98aa..fbf143b472fe020dac5a71f6721ac9041b426d65 100755 (executable)
@@ -32,7 +32,7 @@ function migrate2utf8_wiki_name($recordid){
         $newwiki = new object;
         $newwiki->id = $recordid;
         $newwiki->name = $result;
-        update_record('wiki',$newwiki);
+        migrate2utf8_update_record('wiki',$newwiki);
     }
 /// And finally, just return the converted field
     return $result;
@@ -71,7 +71,7 @@ function migrate2utf8_wiki_summary($recordid){
         $newwiki = new object;
         $newwiki->id = $recordid;
         $newwiki->summary = $result;
-        update_record('wiki',$newwiki);
+        migrate2utf8_update_record('wiki',$newwiki);
     }
 /// And finally, just return the converted field
     return $result;
@@ -110,7 +110,7 @@ function migrate2utf8_wiki_pagename($recordid){
         $newwiki = new object;
         $newwiki->id = $recordid;
         $newwiki->pagename = $result;
-        update_record('wiki',$newwiki);
+        migrate2utf8_update_record('wiki',$newwiki);
     }
 /// And finally, just return the converted field
     return $result;
@@ -148,7 +148,7 @@ function migrate2utf8_wiki_initialcontent($recordid){
         $newwiki = new object;
         $newwiki->id = $recordid;
         $newwiki->initialcontent = $result;
-        update_record('wiki',$newwiki);
+        migrate2utf8_update_record('wiki',$newwiki);
     }
 /// And finally, just return the converted field
     return $result;
index 4eec9a1694cd52f16aa3fcbc2ba241aa9877e026..f99b56ff2fe8e73d5b3bab90707b9bd9370ff889 100755 (executable)
@@ -43,7 +43,7 @@ function migrate2utf8_workshop_stockcomments_comments($recordid){
         $newworkshopstockcomments = new object;
         $newworkshopstockcomments->id = $recordid;
         $newworkshopstockcomments->comments = $result;
-        update_record('workshop_stockcomments',$newworkshopstockcomments);
+        migrate2utf8_update_record('workshop_stockcomments',$newworkshopstockcomments);
     }
 /// And finally, just return the converted field
     return $result;
@@ -93,7 +93,7 @@ function migrate2utf8_workshop_rubrics_description($recordid){
         $newworkshoprubrics = new object;
         $newworkshoprubrics->id = $recordid;
         $newworkshoprubrics->description = $result;
-        update_record('workshop_rubrics',$newworkshoprubrics);
+        migrate2utf8_update_record('workshop_rubrics',$newworkshoprubrics);
     }
 /// And finally, just return the converted field
     return $result;
@@ -143,7 +143,7 @@ function migrate2utf8_workshop_grades_feedback($recordid){
         $newworkshopgrades = new object;
         $newworkshopgrades->id = $recordid;
         $newworkshopgrades->feedback = $result;
-        update_record('workshop_grades',$newworkshopgrades);
+        migrate2utf8_update_record('workshop_grades',$newworkshopgrades);
     }
 /// And finally, just return the converted field
     return $result;
@@ -193,7 +193,7 @@ function migrate2utf8_workshop_elements_description($recordid){
         $newworkshopelements = new object;
         $newworkshopelements->id = $recordid;
         $newworkshopelements->description = $result;
-        update_record('workshop_elements',$newworkshopelements);
+        migrate2utf8_update_record('workshop_elements',$newworkshopelements);
     }
 /// And finally, just return the converted field
     return $result;
@@ -231,7 +231,7 @@ function migrate2utf8_workshop_name($recordid){
         $newworkshop = new object;
         $newworkshop->id = $recordid;
         $newworkshop->name = $result;
-        update_record('workshop',$newworkshop);
+        migrate2utf8_update_record('workshop',$newworkshop);
     }
 /// And finally, just return the converted field
     return $result;
@@ -269,7 +269,7 @@ function migrate2utf8_workshop_description($recordid){
         $newworkshop = new object;
         $newworkshop->id = $recordid;
         $newworkshop->description = $result;
-        update_record('workshop',$newworkshop);
+        migrate2utf8_update_record('workshop',$newworkshop);
     }
 /// And finally, just return the converted field
     return $result;
@@ -307,7 +307,7 @@ function migrate2utf8_workshop_password($recordid){
         $newworkshop = new object;
         $newworkshop->id = $recordid;
         $newworkshop->password = $result;
-        update_record('workshop',$newworkshop);
+        migrate2utf8_update_record('workshop',$newworkshop);
     }
 /// And finally, just return the converted field
     return $result;