changed to use utfconvert function

This commit is contained in:
moodler 2006-01-31 02:15:21 +00:00
parent 9ae17efc1c
commit 136b6ab33f
22 changed files with 286 additions and 270 deletions

View file

@ -18,9 +18,9 @@ function migrate2utf8_assignment_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($assignment->name, $fromenc);
$result = utfconvert($assignment->name, $fromenc);
$newassignment = new object;
@ -52,9 +52,9 @@ function migrate2utf8_assignment_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($assignment->description, $fromenc);
$result = utfconvert($assignment->description, $fromenc);
$newassignment = new object;
$newassignment->id = $recordid;

View file

@ -19,9 +19,9 @@ function migrate2utf8_chat_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($chat->name, $fromenc);
$result = utfconvert($chat->name, $fromenc);
$newchat = new object;
$newchat->id = $recordid;
@ -51,9 +51,9 @@ function migrate2utf8_chat_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($chat->intro, $fromenc);
$result = utfconvert($chat->intro, $fromenc);
$newchat = new object;
$newchat->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_choice_options_text($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($choiceoption->text, $fromenc);
$result = utfconvert($choiceoption->text, $fromenc);
$newchoiceoption = new object;
$newchoiceoption->id = $recordid;
@ -63,9 +63,9 @@ function migrate2utf8_choice_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($choice->name, $fromenc);
$result = utfconvert($choice->name, $fromenc);
$newchoice = new object;
$newchoice->id = $recordid;
@ -95,9 +95,9 @@ function migrate2utf8_choice_text($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($choice->text, $fromenc);
$result = utfconvert($choice->text, $fromenc);
$newchoice = new object;
$newchoice->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_data_fields_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($datafield->name, $fromenc);
$result = utfconvert($datafield->name, $fromenc);
$newdatafield = new object;
$newdatafield->id = $recordid;
@ -75,9 +75,9 @@ function migrate2utf8_data_fields_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($datafield->description, $fromenc);
$result = utfconvert($datafield->description, $fromenc);
$newdatafield = new object;
$newdatafield->id = $recordid;
@ -108,9 +108,9 @@ function migrate2utf8_data_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->name, $fromenc);
$result = utfconvert($data->name, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -141,9 +141,9 @@ function migrate2utf8_data_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->intro, $fromenc);
$result = utfconvert($data->intro, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -174,9 +174,9 @@ function migrate2utf8_data_singletemplate($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->singletemplate, $fromenc);
$result = utfconvert($data->singletemplate, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -207,9 +207,9 @@ function migrate2utf8_data_listtemplate($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->listtemplate, $fromenc);
$result = utfconvert($data->listtemplate, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -240,9 +240,9 @@ function migrate2utf8_data_addtemplate($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->addtemplate, $fromenc);
$result = utfconvert($data->addtemplate, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -273,9 +273,9 @@ function migrate2utf8_data_rsstemplate($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->rsstemplate, $fromenc);
$result = utfconvert($data->rsstemplate, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -306,9 +306,9 @@ function migrate2utf8_data_listtemplateheader($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->listtemplateheader, $fromenc);
$result = utfconvert($data->listtemplateheader, $fromenc);
$newdata= new object;
$newdata->id = $recordid;
@ -339,9 +339,9 @@ function migrate2utf8_data_listtemplatefooter($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($data->listtemplatefooter, $fromenc);
$result = utfconvert($data->listtemplatefooter, $fromenc);
$newdata= new object;
$newdata->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_exercise_elements_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($exerciseelement->description, $fromenc);
$result = utfconvert($exerciseelement->description, $fromenc);
$newexerciseelement = new object;
$newexerciseelement->id = $recordid;
@ -75,9 +75,9 @@ function migrate2utf8_exercise_grades_feedback($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($exercisegrade->feedback, $fromenc);
$result = utfconvert($exercisegrade->feedback, $fromenc);
$newexercisegrade = new object;
$newexercisegrade->id = $recordid;
@ -119,9 +119,9 @@ function migrate2utf8_exercise_rubrics_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($exerciserubric->description, $fromenc);
$result = utfconvert($exerciserubric->description, $fromenc);
$newexerciserubric = new object;
$newexerciserubric->id = $recordid;
@ -152,9 +152,9 @@ function migrate2utf8_exercise_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($exercise->name, $fromenc);
$result = utfconvert($exercise->name, $fromenc);
$newexercise = new object;
$newexercise->id = $recordid;

View file

@ -20,9 +20,9 @@ function migrate2utf8_forum_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($forum->name, $fromenc);
$result = utfconvert($forum->name, $fromenc);
$newforum = new object;
$newforum->id = $recordid;
@ -53,9 +53,9 @@ function migrate2utf8_forum_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($forum->intro, $fromenc);
$result = utfconvert($forum->intro, $fromenc);
$newforum = new object;
$newforum->id = $recordid;

View file

@ -30,9 +30,9 @@ function migrate2utf8_glossary_categories_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($glossarycategory->name, $fromenc);
$result = utfconvert($glossarycategory->name, $fromenc);
$newglossarycategory = new object;
$newglossarycategory->id = $recordid;
@ -63,9 +63,9 @@ function migrate2utf8_glossary_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($glossary->name, $fromenc);
$result = utfconvert($glossary->name, $fromenc);
$newglossary = new object;
$newglossary->id = $recordid;
@ -96,9 +96,9 @@ function migrate2utf8_glossary_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($glossary->intro, $fromenc);
$result = utfconvert($glossary->intro, $fromenc);
$newglossary = new object;
$newglossary->id = $recordid;

View file

@ -21,9 +21,9 @@ function migrate2utf8_hotpot_strings_string($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($hotpotstrings->string, $fromenc);
$result = utfconvert($hotpotstrings->string, $fromenc);
$newhotpotstrings = new object;
$newhotpotstrings->id = $recordid;
@ -64,9 +64,9 @@ function migrate2utf8_hotpot_questions_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($hotpotquestion->name, $fromenc);
$result = utfconvert($hotpotquestion->name, $fromenc);
$newhotpotquestion = new object;
$newhotpotquestion->id = $recordid;
@ -97,9 +97,9 @@ function migrate2utf8_hotpot_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($hotpot->name, $fromenc);
$result = utfconvert($hotpot->name, $fromenc);
$newhotpot = new object;
$newhotpot->id = $recordid;
@ -130,9 +130,9 @@ function migrate2utf8_hotpot_summary($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($hotpot->summary, $fromenc);
$result = utfconvert($hotpot->summary, $fromenc);
$newhotpot = new object;
$newhotpot->id = $recordid;
@ -163,9 +163,9 @@ function migrate2utf8_hotpot_password($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($hotpot->password, $fromenc);
$result = utfconvert($hotpot->password, $fromenc);
$newhotpot = new object;
$newhotpot->id = $recordid;

View file

@ -20,9 +20,9 @@ function migrate2utf8_journal_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($journal->name, $fromenc);
$result = utfconvert($journal->name, $fromenc);
$newjournal = new object;
$newjournal->id = $recordid;
@ -53,9 +53,9 @@ function migrate2utf8_journal_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($journal->intro, $fromenc);
$result = utfconvert($journal->intro, $fromenc);
$newjournal = new object;
$newjournal->id = $recordid;

View file

@ -20,9 +20,9 @@ function migrate2utf8_label_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($label->name, $fromenc);
$result = utfconvert($label->name, $fromenc);
$newlabel = new object;
$newlabel->id = $recordid;
@ -53,9 +53,9 @@ function migrate2utf8_label_content($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($label->content, $fromenc);
$result = utfconvert($label->content, $fromenc);
$newlabel = new object;
$newlabel->id = $recordid;

View file

@ -20,9 +20,9 @@ function migrate2utf8_lams_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
echo "lamslamslams ".$fromenc;
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lams->name, $fromenc);
$result = utfconvert($lams->name, $fromenc);
$newlams = new object;
$newlams->id = $recordid;
@ -53,9 +53,9 @@ function migrate2utf8_lams_introduction($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lams->introduction, $fromenc);
$result = utfconvert($lams->introduction, $fromenc);
$newlams = new object;
$newlams->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_lesson_answers_answer($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lessonanswers->answer, $fromenc);
$result = utfconvert($lessonanswers->answer, $fromenc);
$newlessonanswers = new object;
$newlessonanswers->id = $recordid;
@ -75,9 +75,9 @@ function migrate2utf8_lesson_answers_response($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lessonanswers->response, $fromenc);
$result = utfconvert($lessonanswers->response, $fromenc);
$newlessonanswers = new object;
$newlessonanswers->id = $recordid;
@ -126,9 +126,9 @@ function migrate2utf8_lesson_pages_contents($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lessonpages->contents, $fromenc);
$result = utfconvert($lessonpages->contents, $fromenc);
$newlessonpages = new object;
$newlessonpages->id = $recordid;
@ -169,9 +169,9 @@ function migrate2utf8_lesson_pages_title($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lessonpages->title, $fromenc);
$result = utfconvert($lessonpages->title, $fromenc);
$newlessonpages = new object;
$newlessonpages->id = $recordid;
@ -202,9 +202,9 @@ function migrate2utf8_lesson_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($lesson->name, $fromenc);
$result = utfconvert($lesson->name, $fromenc);
$newlesson = new object;
$newlesson->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_quiz_questions_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizquestions->name, $fromenc);
$result = utfconvert($quizquestions->name, $fromenc);
$newquizquestion = new object;
$newquizquestion->id = $recordid;
@ -75,9 +75,9 @@ function migrate2utf8_quiz_questions_questiontext($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizquestions->questiontext, $fromenc);
$result = utfconvert($quizquestions->questiontext, $fromenc);
$newquizquestion = new object;
$newquizquestion->id = $recordid;
@ -122,9 +122,9 @@ function migrate2utf8_quiz_numerical_units_unit($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quiznumericalunits->unit, $fromenc);
$result = utfconvert($quiznumericalunits->unit, $fromenc);
$newquiznumericalunits = new object;
$newquiznumericalunits->id = $recordid;
@ -168,9 +168,9 @@ function migrate2utf8_quiz_match_sub_questiontext($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizmatchsub->questiontext, $fromenc);
$result = utfconvert($quizmatchsub->questiontext, $fromenc);
$newquizmatchsub = new object;
$newquizmatchsub->id = $recordid;
@ -214,9 +214,9 @@ function migrate2utf8_quiz_match_sub_answertext($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizmatchsub->answertext, $fromenc);
$result = utfconvert($quizmatchsub->answertext, $fromenc);
$newquizmatchsub = new object;
$newquizmatchsub->id = $recordid;
@ -260,9 +260,9 @@ function migrate2utf8_quiz_answers_answer($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizanswer->answer, $fromenc);
$result = utfconvert($quizanswer->answer, $fromenc);
$newquizanswer = new object;
$newquizanswer->id = $recordid;
@ -306,9 +306,9 @@ function migrate2utf8_quiz_answers_feedback($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizanswer->feedback, $fromenc);
$result = utfconvert($quizanswer->feedback, $fromenc);
$newquizanswer = new object;
$newquizanswer->id = $recordid;
@ -354,9 +354,9 @@ function migrate2utf8_quiz_dataset_definitions_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizdatasetdefinition->name, $fromenc);
$result = utfconvert($quizdatasetdefinition->name, $fromenc);
$newquizdatasetdefinition = new object;
$newquizdatasetdefinition->id = $recordid;
@ -396,9 +396,9 @@ function migrate2utf8_quiz_categories_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizcategory->name, $fromenc);
$result = utfconvert($quizcategory->name, $fromenc);
$newquizcategory = new object;
$newquizcategory->id = $recordid;
@ -438,9 +438,9 @@ function migrate2utf8_quiz_categories_info($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quizcategory->info, $fromenc);
$result = utfconvert($quizcategory->info, $fromenc);
$newquizcategory = new object;
$newquizcategory->id = $recordid;
@ -471,9 +471,9 @@ function migrate2utf8_quiz_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quiz->name, $fromenc);
$result = utfconvert($quiz->name, $fromenc);
$newquiz = new object;
$newquiz->id = $recordid;
@ -505,9 +505,9 @@ function migrate2utf8_quiz_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quiz->intro, $fromenc);
$result = utfconvert($quiz->intro, $fromenc);
$newquiz = new object;
$newquiz->id = $recordid;
@ -538,9 +538,9 @@ function migrate2utf8_quiz_password($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($quiz->password, $fromenc);
$result = utfconvert($quiz->password, $fromenc);
$newquiz = new object;
$newquiz->id = $recordid;

View file

@ -20,9 +20,9 @@ function migrate2utf8_resource_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($resource->name, $fromenc);
$result = utfconvert($resource->name, $fromenc);
$newresource = new object;
$newresource->id = $recordid;
@ -53,9 +53,9 @@ function migrate2utf8_resource_reference($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($resource->reference, $fromenc);
$result = utfconvert($resource->reference, $fromenc);
$newresource = new object;
$newresource->id = $recordid;
@ -85,9 +85,9 @@ function migrate2utf8_resource_summary($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($resource->summary, $fromenc);
$result = utfconvert($resource->summary, $fromenc);
$newresource = new object;
$newresource->id = $recordid;
$newresource->summary = $result;
@ -116,10 +116,8 @@ function migrate2utf8_resource_alltext($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($resource->alltext, $fromenc);
$result = utfconvert($resource->alltext, $fromenc);
$newresource = new object;
$newresource->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_scorm_scoes_manifest($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->manifest, $fromenc);
$result = utfconvert($scormscoes->manifest, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -75,9 +75,9 @@ function migrate2utf8_scorm_scoes_organization($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->organization, $fromenc);
$result = utfconvert($scormscoes->organization, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -119,9 +119,9 @@ function migrate2utf8_scorm_scoes_parent($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->parent, $fromenc);
$result = utfconvert($scormscoes->parent, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -164,9 +164,9 @@ function migrate2utf8_scorm_scoes_identifier($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->identifier, $fromenc);
$result = utfconvert($scormscoes->identifier, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -208,9 +208,9 @@ function migrate2utf8_scorm_scoes_launch($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->launch, $fromenc);
$result = utfconvert($scormscoes->launch, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -252,9 +252,9 @@ function migrate2utf8_scorm_scoes_parameters($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->parameters, $fromenc);
$result = utfconvert($scormscoes->parameters, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -296,9 +296,9 @@ function migrate2utf8_scorm_scoes_scormtype($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->scormtype, $fromenc);
$result = utfconvert($scormscoes->scormtype, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -340,9 +340,9 @@ function migrate2utf8_scorm_scoes_title($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->title, $fromenc);
$result = utfconvert($scormscoes->title, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -384,9 +384,9 @@ function migrate2utf8_scorm_scoes_prerequisites($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->prerequisites, $fromenc);
$result = utfconvert($scormscoes->prerequisites, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -428,9 +428,9 @@ function migrate2utf8_scorm_scoes_maxtimeallowed($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->maxtimeallowed, $fromenc);
$result = utfconvert($scormscoes->maxtimeallowed, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -472,9 +472,9 @@ function migrate2utf8_scorm_scoes_timelimitaction($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->timelimitaction, $fromenc);
$result = utfconvert($scormscoes->timelimitaction, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -516,9 +516,9 @@ function migrate2utf8_scorm_scoes_datafromlms($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->datafromlms, $fromenc);
$result = utfconvert($scormscoes->datafromlms, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -560,9 +560,9 @@ function migrate2utf8_scorm_scoes_masteryscore($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scormscoes->masteryscore, $fromenc);
$result = utfconvert($scormscoes->masteryscore, $fromenc);
$newscormscoes = new object;
$newscormscoes->id = $recordid;
@ -594,9 +594,9 @@ function migrate2utf8_scorm_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scorm->name, $fromenc);
$result = utfconvert($scorm->name, $fromenc);
$newscorm = new object;
$newscorm->id = $recordid;
@ -627,9 +627,9 @@ function migrate2utf8_scorm_reference($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scorm->reference, $fromenc);
$result = utfconvert($scorm->reference, $fromenc);
$newscorm = new object;
$newscorm->id = $recordid;
@ -660,9 +660,9 @@ function migrate2utf8_scorm_summary($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scorm->summary, $fromenc);
$result = utfconvert($scorm->summary, $fromenc);
$newscorm = new object;
$newscorm->id = $recordid;
@ -693,9 +693,9 @@ function migrate2utf8_scorm_options($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($scorm->options, $fromenc);
$result = utfconvert($scorm->options, $fromenc);
$newscorm = new object;
$newscorm->id = $recordid;

View file

@ -21,9 +21,9 @@ function migrate2utf8_survey_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($survey->name, $fromenc);
$result = utfconvert($survey->name, $fromenc);
$newsurvey = new object;
$newsurvey->id = $recordid;
@ -54,9 +54,9 @@ function migrate2utf8_survey_intro($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($survey->intro, $fromenc);
$result = utfconvert($survey->intro, $fromenc);
$newsurvey = new object;
$newsurvey->id = $recordid;

View file

@ -20,9 +20,9 @@ function migrate2utf8_wiki_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($wiki->name, $fromenc);
$result = utfconvert($wiki->name, $fromenc);
$newwiki = new object;
$newwiki->id = $recordid;
@ -53,9 +53,9 @@ function migrate2utf8_wiki_summary($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($wiki->summary, $fromenc);
$result = utfconvert($wiki->summary, $fromenc);
$newwiki = new object;
$newwiki->id = $recordid;
@ -86,9 +86,9 @@ function migrate2utf8_wiki_pagename($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($wiki->pagename, $fromenc);
$result = utfconvert($wiki->pagename, $fromenc);
$newwiki = new object;
$newwiki->id = $recordid;
@ -119,9 +119,9 @@ function migrate2utf8_wiki_initialcontent($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($wiki->initialcontent, $fromenc);
$result = utfconvert($wiki->initialcontent, $fromenc);
$newwiki = new object;
$newwiki->id = $recordid;

View file

@ -31,9 +31,9 @@ function migrate2utf8_workshop_stockcomments_comments($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshopstockcomments->comments, $fromenc);
$result = utfconvert($workshopstockcomments->comments, $fromenc);
$newworkshopstockcomments = new object;
$newworkshopstockcomments->id = $recordid;
@ -75,9 +75,9 @@ function migrate2utf8_workshop_rubrics_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshoprubrics->description, $fromenc);
$result = utfconvert($workshoprubrics->description, $fromenc);
$newworkshoprubrics = new object;
$newworkshoprubrics->id = $recordid;
@ -119,9 +119,9 @@ function migrate2utf8_workshop_grades_feedback($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshopgrades->feedback, $fromenc);
$result = utfconvert($workshopgrades->feedback, $fromenc);
$newworkshopgrades = new object;
$newworkshopgrades->id = $recordid;
@ -163,9 +163,9 @@ function migrate2utf8_workshop_elements_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshopelements->description, $fromenc);
$result = utfconvert($workshopelements->description, $fromenc);
$newworkshopelements = new object;
$newworkshopelements->id = $recordid;
@ -196,9 +196,9 @@ function migrate2utf8_workshop_name($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshop->name, $fromenc);
$result = utfconvert($workshop->name, $fromenc);
$newworkshop = new object;
$newworkshop->id = $recordid;
@ -229,9 +229,9 @@ function migrate2utf8_workshop_description($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshop->description, $fromenc);
$result = utfconvert($workshop->description, $fromenc);
$newworkshop = new object;
$newworkshop->id = $recordid;
@ -262,9 +262,9 @@ function migrate2utf8_workshop_password($recordid){
$fromenc = get_original_encoding($sitelang, $courselang, $userlang);
/// We are going to use textlib facilities
$textlib = textlib_get_instance();
/// Convert the text
$result = $textlib->convert($workshop->password, $fromenc);
$result = utfconvert($workshop->password, $fromenc);
$newworkshop = new object;
$newworkshop->id = $recordid;