vfremaux / moodle-mod_sharedresource

A special "resource" like module that allows site wide resource sharing in Moodle. Initially provided for Moodle 1.9 implementations as central repository, might be candidate to add to moodle 2 a complete metadata handled public resource repository engine.
6 stars 2 forks source link

Language customization fails due to (non-UTF8) language package/files encoding #3

Open emostoyanov opened 10 years ago

emostoyanov commented 10 years ago

If I enable Sharedresource module in Moodle 2.4 and try to customize language (Site administration -> Language -> Language customisation, choose language and press Open language pack for editing) there is an error message: "Error writing to database" and in error log:

[Tue Sep 24 13:54:05 2013] [error] [client xxx.xxx.xxx.xxx] Default exception handler: Error writing to database Debug: Incorrect string value: '\x96 2002...' for column 'original' at row 1\nINSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)\n[array (\n 0 => 'bg',\n 1 => '409',\n 2 => 'descriptionlom',\n 3 => 'Learning Object Metadata is a data model, usually encoded in XML, used to describe a learning object and similar digital resources used to support learning. The purpose of learning object metadata is to support the reusability of learning objects, to aid discoverability, and to facilitate their interoperability, usually in the context of online learning management systems (LMS).

\n\nThe IEEE 1484.12.1 \x96 2002 Standard for Learning Object Metadata is an internationally-recognised open standard (published by the Institute of Electrical and Electronics Engineers Standards Association, New York) for the description of \x93learning objects\x94. Relevant attributes of learning objects to be described include: type of object; author; owner; terms of distribution; format; and pedagogical attributes, such as teaching or interaction style.

\n

More informations here : <a href=\\"http://en.wikipedia.org/wiki/Learning_Object_Metadata\\\\">Wikipedia page of LOM
',\n 4 => NULL,\n 5 => 1380020045,\n 6 => 0,\n 7 => NULL,\n 8 => NULL,\n)]\nError code: dmlwriteexception\n* line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown\n* line 1107 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 1149 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n* line 190 of /admin/tool/customlang/locallib.php: call to mysqli_native_moodle_database->insert_record()\n* line 60 of /admin/tool/customlang/index.php: call to tool_customlang_utils::checkout()\n, referer: http://moodle/admin/tool/customlang/index.php?lng=bg

And more (if I correct/change this one in language file):

[Tue Sep 24 14:10:47 2013] [error] [client xxx.xxx.xxx.xxx] Default exception handler: Error writing to database Debug: Incorrect string value: '\xE9vised' for column 'original' at row 1\nINSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)\n[array (\n 0 => 'bg',\n 1 => '409',\n 2 => 'revised',\n 3 => 'R\xe9vised',\n 4 => NULL,\n 5 => 1380021047,\n 6 => 0,\n 7 => NULL,\n 8 => NULL,\n)]\nError code: dmlwriteexception\n* line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown\n* line 1107 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 1149 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n* line 190 of /admin/tool/customlang/locallib.php: call to mysqli_native_moodle_database->insert_record()\n* line 60 of /admin/tool/customlang/index.php: call to tool_customlang_utils::checkout()\n, referer: http://moodle/admin/tool/customlang/index.php?lng=bg

I had to de-install sharedresource module in order to be able to customize the language. There is no such problem with other modules I enable in Moodle.

Greetings, Emil Stoyanov

vfremaux commented 10 years ago

Just fixing thos two language issues should do the trick....

I fix that my side ofr next distribution sync.

Thank Valery.

Le 24/09/2013 13:42, Emil Ivanov Stoyanov a écrit :

If I enable Sharedresource module in Moodle 2.4 and try to customize language (Site administration -> Language -> Language customisation, choose language and press Open language pack for editing) there is an error message: "Error writing to database" and in error log:

[Tue Sep 24 13:54:05 2013] [error] [client xxx.xxx.xxx.xxx] Default exception handler: Error writing to database Debug: Incorrect string value: '\x96 2002...' for column 'original' at row 1\nINSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)\n[array (\n 0 => 'bg',\n 1 => '409',\n 2 => 'descriptionlom',\n 3 => 'Learning Object Metadata is a data model, usually encoded in XML, used to describe a learning object and similar digital resources used to support learning. The purpose of learning object metadata is to support the reusability of learning objects, to aid discoverability, and to facilitate their interoperability, usually in the context of online learning management systems (LMS).

\n\nThe IEEE 1484.12.1 \x96 2002 Standard for Learning Object Metadata is an internationally-recognised open standard (published by the Institute of Electrical and Electronics Enginee rs Standards Association, New York) for the description of \x93learning objects\x94. Relevant attributes of learning objects to be described include: type of object; author; owner; terms of distribution; format; and pedagogical attributes, such as teaching or interaction style.

\n

More informations here : Wikipedia page of LOM',\n 4 => NULL,\n 5 => 1380020045,\n 6 => 0,\n 7 => NULL,\n 8 => NULL,\n)]\nError code: dmlwriteexception\n* line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown\n* line 1107 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 1149 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n* line 190 of /admin/tool/customlang/locallib.php: call to mysqli_native_moodle_database->insert_record()\n* line 60 of /admin/tool/customlang/index.php: call to tool_customlang_utils::checkout()\n, referer: http://mood le/admin /tool/customlang/index.php?lng=bg

And more (if I correct/change this one in language file):

[Tue Sep 24 14:10:47 2013] [error] [client xxx.xxx.xxx.xxx] Default exception handler: Error writing to database Debug: Incorrect string value: '\xE9vised' for column 'original' at row 1\nINSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)\n[array (\n 0 => 'bg',\n 1 => '409',\n 2 => 'revised',\n 3 => 'R\xe9vised',\n 4 => NULL,\n 5 => 1380021047,\n 6 => 0,\n 7 => NULL,\n 8 => NULL,\n)]\nError code: dmlwriteexception\n* line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown\n* line 1107 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 1149 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n* line 190 of /admin/tool/customlang/locallib.php: call to mysqli_native_moodle_database->insert_record()\n* line 60 of /admin/tool/customlan g/index. php: call to tool_customlang_utils::checkout()\n, referer: http://moodle/admin/tool/customlang/index.php?lng=bg

I had to de-install sharedresource module in order to be able to customize the language. There is no such problem with other modules I enable in Moodle.

Greetings, Emil Stoyanov

— Reply to this email directly or view it on GitHub https://github.com/vfremaux/moodle-mod_sharedresource/issues/3.

emostoyanov commented 10 years ago

Thanks!