Ya podemos usar el editor de texto del Moodle con el Google Chrome!!!! Ya era hora
!!!!
Sólo hay que hacer dos pequeños cambios de nada:
1) Editar /lib/editor/htmlarea/htmlarea.php
line 2408 //alert("Mozilla < 1.3 Beta is not supported!\n" +
line 2409 // "I'll try though, but it might not work.");
line 2410 return 'HTMLArea.is_gecko';
line 2414 //return false;
line 2415 return 'HTMLArea.is_gecko';
Quedaría así:
HTMLArea.checkSupportedBrowser = function() {
if (HTMLArea.is_gecko) {
if (navigator.productSub < 20021201) {
alert("You need at least Mozilla-1.3 Alpha.\n" +
"Sorry, your Gecko is not supported.");
return false;
}
if (navigator.productSub < 20030210) {
//alert("Mozilla < 1.3 Beta is not supported!\n" +
// "I'll try, though, but it might not work.");
return 'HTMLArea.is_gecko';
}
}
if(HTMLArea.is_safari) {
//return false;
return 'HTMLArea.is_gecko';
}
return HTMLArea.is_gecko || HTMLArea.is_ie;
};
2) Editar /lib/moodlelib.php en las lineas 6519, 6520 y 6521:
line 6519 } else {
line 6520 return 1;
line 6521 }
Quedaría así:
function can_use_html_editor() {
global $USER, $CFG;
if (!empty($USER->htmleditor) and !empty($CFG->htmleditor)) {
if (check_browser_version('MSIE', 5.5)) {
return 'MSIE';
} else if (check_browser_version('Gecko', 20030516)) {
return 'Gecko';
} else {
return 1; //Pall's Safari/Chrome editor hack
}
}
return false;
}
- Viru
- 15.08.2010
- 2651
Comentarios
Fantástico el método para forzar el WYSIWYG del editor de moodle con Chrome. ¡Muchas gracias!
Añadir nuevo comentario