HTMLArea.I18N undefined en Moodle 1.9.4+

Re: HTMLArea.I18N undefined en Moodle 1.9.4+

de Gustavo Adolfo de la Fuente -
Número de respuestas: 0
Siguiendo la info de la consola de errores, pude detemrinar que la indefinición es:

En el archivo: htmlarea.php

En la ejecución del siguiente lazo for:

for (var i in this.btnList) {
var btn = this.btnList[i];
btn[1] = _editor_url + this.imgURL + btn[1];
if (typeof HTMLArea.I18N.tooltips[i] != "undefined") {
btn[0] = HTMLArea.I18N.tooltips[i];
}

Y al agregar una línea para depurar encuentro que el valor de i cuando falla es:

HTMLArea.I18N.tooltips[createanchor]



Pero en la definición de btnList (que esta unas lineas mas arriba...) está clara la construcción, es el elemento 16: (lo marco en rojo), pero...porque no existe en la instancia HTMLArea.I18N.tooltips? Pero si cuando pulso F5?

Donde se instancia HTMLArea.I18N? Porque al pulsar repetidamente F5 presenta la falla alternativamente?

this.btnList = {
bold: [ "Bold", "ed_format_bold.gif", false, function(e) {e.execCommand("bold");} ],
italic: [ "Italic", "ed_format_italic.gif", false, function(e) {e.execCommand("italic");} ],
underline: [ "Underline", "ed_format_underline.gif", false, function(e) {e.execCommand("underline");} ],
strikethrough: [ "Strikethrough", "ed_format_strike.gif", false, function(e) {e.execCommand("strikethrough");} ],
subscript: [ "Subscript", "ed_format_sub.gif", false, function(e) {e.execCommand("subscript");} ],
superscript: [ "Superscript", "ed_format_sup.gif", false, function(e) {e.execCommand("superscript");} ],
justifyleft: [ "Justify Left", "ed_align_left.gif", false, function(e) {e.execCommand("justifyleft");} ],
justifycenter: [ "Justify Center", "ed_align_center.gif", false, function(e) {e.execCommand("justifycenter");} ],
justifyright: [ "Justify Right", "ed_align_right.gif", false, function(e) {e.execCommand("justifyright");} ],
justifyfull: [ "Justify Full", "ed_align_justify.gif", false, function(e) {e.execCommand("justifyfull");} ],
insertorderedlist: [ "Ordered List", "ed_list_num.gif", false, function(e) {e.execCommand("insertorderedlist");} ],
insertunorderedlist: [ "Bulleted List", "ed_list_bullet.gif", false, function(e) {e.execCommand("insertunorderedlist");} ],
outdent: [ "Decrease Indent", "ed_indent_less.gif", false, function(e) {e.execCommand("outdent");} ],
indent: [ "Increase Indent", "ed_indent_more.gif", false, function(e) {e.execCommand("indent");} ],
forecolor: [ "Font Color", "ed_color_fg.gif", false, function(e) {e.execCommand("forecolor");} ],
hilitecolor: [ "Background Color", "ed_color_bg.gif", false, function(e) {e.execCommand("hilitecolor");} ],
inserthorizontalrule: [ "Horizontal Rule", "ed_hr.gif", false, function(e) {e.execCommand("inserthorizontalrule");} ],
createanchor: [ "Create anchor", "ed_anchor.gif", false, function(e) {e.execCommand("createanchor", true);} ],
createlink: [ "Insert Web Link", "ed_link.gif", false, function(e) {e.execCommand("createlink", true);} ],
unlink: [ "Remove Link", "ed_unlink.gif", false, function(e) {e.execCommand("unlink");} ],
nolink: [ "No link", "ed_nolink.gif", false, function(e) {e.execCommand("nolink");} ],
insertimage: [ "Insert/Modify Image", "ed_image.gif", false, function(e) {e.execCommand("insertimage");} ],
inserttable: [ "Insert Table", "insert_table.gif", false, function(e) {e.execCommand("inserttable");} ],
htmlmode: [ "Toggle HTML Source", "ed_html.gif", true, function(e) {e.execCommand("htmlmode");} ],
popupeditor: [ "Enlarge Editor", "fullscreen_maximize.gif", true, function(e) {e.execCommand("popupeditor");} ],
about: [ "About this editor", "ed_about.gif", true, function(e) {e.execCommand("about");} ],
showhelp: [ "Help using editor", "ed_help.gif", true, function(e) {e.execCommand("showhelp");} ],
undo: [ "Undoes your last action", "ed_undo.gif", false, function(e) {e.execCommand("undo");} ],
redo: [ "Redoes your last action", "ed_redo.gif", false, function(e) {e.execCommand("redo");} ],
clean: [ "Clean Word HTML", "ed_wordclean.gif", false, function(e) {e.execCommand("killword"); }],
lefttoright: [ "Direction left to right", "ed_left_to_right.gif", false, function(e) {e.execCommand("lefttoright");} ],
righttoleft: [ "Direction right to left", "ed_right_to_left.gif", false, function(e) {e.execCommand("righttoleft");} ],
<?php if (!empty($CFG->aspellpath) && file_exists($CFG->aspellpath) && !empty($CFG->editorspelling)) {
echo 'spellcheck: ["Spell-check", "spell-check.gif", false, spellClickHandler ],'."\n";
}?>
insertsmile: ["Insert Smiley", "em.icon.smile.gif", false, function(e) {e.execCommand("insertsmile");} ],
insertchar: [ "Insert Char", "icon_ins_char.gif", false, function(e) {e.execCommand("insertchar");} ],
search_replace: [ "Search and replace", "ed_replace.gif", false, function(e) {e.execCommand("searchandreplace");} ]
};


Desde ya muchas gracias.

Gustavo.
Buenos Aires - Argentina