Quiz - Fix linefeed issue blocking JS execution (although it goes against code conventions) and update language terms - refs #3090

pull/3354/head
Yannick Warnier 5 years ago
parent 403224e132
commit 362f1a1396
  1. 24
      main/exercise/UniqueAnswerImage.php
  2. 15
      main/exercise/question.class.php
  3. 9
      main/lang/english/trad4all.inc.php
  4. 5
      main/lang/french/trad4all.inc.php
  5. 9
      main/lang/spanish/trad4all.inc.php

@ -65,7 +65,7 @@ class UniqueAnswerImage extends UniqueAnswer
if (isset($zoomOptions['options'])) {
$finderFolder = api_get_path(WEB_PATH).'vendor/studio-42/elfinder/';
$html .= '<!-- elFinder CSS (REQUIRED) -->';
$html .= '<link rel="stylesheet" type="text/css" media="screen"
$html .= '<link rel="stylesheet" type="text/css" media="screen"
href="'.$finderFolder.'css/elfinder.full.css">';
$html .= '<link rel="stylesheet" type="text/css" media="screen" href="'.$finderFolder.'css/theme.css">';
@ -106,13 +106,13 @@ class UniqueAnswerImage extends UniqueAnswer
var iname = "answer["+id+"]";
CKEDITOR.instances[iname].insertHtml(\'
<img
id="zoom_picture"
class="zoom_picture"
src="\'+imageZoom+\'"
data-zoom-image="\'+imageZoom+\'"
width="200px"
height="150px"
<img
id="zoom_picture"
class="zoom_picture"
src="\'+imageZoom+\'"
data-zoom-image="\'+imageZoom+\'"
width="200px"
height="150px"
/>\');
$("#elfinder").elfinder("destroy"); //close the window after image is selected
@ -253,11 +253,11 @@ class UniqueAnswerImage extends UniqueAnswer
'<br><div class="form-group ">
<label for="question_admin_form_btn_add_img['.$i.']" class="col-sm-2 control-label"></label>
<div class="col-sm-8">
<button class="add_img_link btn btn-info btn-sm"
name="btn_add_img['.$i.']"
type="submit"
<button class="add_img_link btn btn-info btn-sm"
name="btn_add_img['.$i.']"
type="submit"
id="question_admin_form_btn_add_img['.$i.']">
<em class="fa fa-plus"></em> '.get_lang('AddZoomImage').'
<em class="fa fa-plus"></em> '.get_lang('AddImageWithZoom').'
</button>
</div>
<div class="col-sm-2"></div>

@ -1636,14 +1636,7 @@ abstract class Question
e.stopPropagation();
var imageZoom = $("input[name=\'imageZoom\']").val();
var imageWidth = $("input[name=\'imageWidth\']").val();
CKEDITOR.instances.questionDescription.insertHtml(\'
<img
id="zoom_picture"
class="zoom_picture"
src="\'+imageZoom+\'"
data-zoom-image="\'+imageZoom+\'"
width="\'+imageWidth+\'px"
/>\');
CKEDITOR.instances.questionDescription.insertHtml(\'<img id="zoom_picture" class="zoom_picture" src="\'+imageZoom+\'" data-zoom-image="\'+imageZoom+\'" width="\'+imageWidth+\'px" />\');
});
$("input[name=\'imageZoom\']").on("click", function(){
@ -1705,10 +1698,10 @@ abstract class Question
$form->addElement('html', '<div id="advanced_params_options" style="display:none">');
if (isset($zoomOptions['options'])) {
$form->addElement('text', 'imageZoom', get_lang('UrlImage'));
$form->addElement('text', 'imageWidth', get_lang('PxWidth'));
$form->addElement('text', 'imageZoom', get_lang('ImageURL'));
$form->addElement('text', 'imageWidth', get_lang('PixelWidth'));
$form->addButton('btn_create_img', get_lang('AddEditor'), 'plus', 'info', 'small', 'create_img_link');
$form->addButton('btn_create_img', get_lang('AddToEditor'), 'plus', 'info', 'small', 'create_img_link');
}
$form->addHtmlEditor(

@ -5362,10 +5362,6 @@ $BlockCopyPasteForStudentsComment = "Block learners the ability to copy and past
$MoreButtonsForMaximizedModeTitle = "Buttons bar extended";
$MoreButtonsForMaximizedModeComment = "Enable button bars extended when the WYSIWYG editor is maximized";
$Editor = "HTML Editor";
$AddEditor = "Add to editor";
$UrlImage = "URL image";
$PxWidth = "px width";
$AddZoomImage = "Add zoom image";
$GoToCourseAfterLoginTitle = "Go directly to the course after login";
$GoToCourseAfterLoginComment = "When a user is registered in one course, go directly to the course after login";
$AllowStudentsDownloadFoldersTitle = "Allow learners to download directories";
@ -8563,4 +8559,9 @@ $UpdateUserListXMLCSV = "Update user list";
$DonateToTheProject = "Chamilo is an Open Source project and this portal is provided to our community free of charge by the Chamilo Association, which pursues the goal of improving the availability of a quality education around the globe.<br /><br />
However, developing Chamilo and providing this service are expensive and having a little bit of help from you would go a long way to ensure these services improve faster over time.<br /><br />
Creating a course on this portal is one of the most resource-intensive operation. Please consider making a contribution to the Chamilo Association before creating this course to help keep this service free for all!";
$MyStudentPublications = "My assignments";
$AddToEditor = "Add to editor";
$ImageURL = "Image URL";
$PixelWidth = "px width";
$AddImageWithZoom = "Add image with zoom";
?>

@ -8491,4 +8491,9 @@ $UpdateUserListXMLCSV = "Mise à jour d'utilisateurs";
$DonateToTheProject = "Chamilo est un projet Open Source et ce portail est offert gratuitement à la communauté par l'Association Chamilo, dont l'objectif est d'améliorer la disponibilité d'une éducation de qualité partout dans le monde.<br /><br />
Développer Chamilo et fournir ce service de portail gratuit sont néanmoins des tâches coûteuses, et un peu d'aide de votre part permettrait de soutenir nos efforts et de faire progresser le projet Chamilo plus rapidement sur le long terme.<br /><br />
Créer un cours sur ce portail est, par ailleurs, l'un des éléments qui consomme le plus de ressources. Merci de considérer le fait de contribuer de manière symbolique au projet et nous aider à maintenir ce service gratuit pour tous en nous faisant don de quelques euros avant de créer ce cours!";
$MyStudentPublications = "Mes travaux";
$AddToEditor = "Ajouter à l'éditeur";
$ImageURL = "URL de l'image";
$PixelWidth = "largeur en px";
$AddImageWithZoom = "Ajouter image avec zoom";
?>

@ -5362,10 +5362,6 @@ $BlockCopyPasteForStudentsComment = "Bloquear a los estudiantes la posibilidad d
$MoreButtonsForMaximizedModeTitle = "Barras de botones extendidas";
$MoreButtonsForMaximizedModeComment = "Habilitar las barras de botones extendidas cuando el editor WYSIWYG está maximizado";
$Editor = "Editor HTML";
$AddEditor = "Añadir al editor";
$UrlImage = "URL imagen";
$PxWidth = "Ancho en px";
$AddZoomImage = "Agregar imagen con zoom";
$GoToCourseAfterLoginTitle = "Ir directamente al curso tras identificarse";
$GoToCourseAfterLoginComment = "Cuando un usuario está inscrito solamente en un curso, ir directamente al curso después de identificarse";
$AllowStudentsDownloadFoldersTitle = "Permitir a los estudiantes descargar directorios";
@ -8591,4 +8587,9 @@ $UpdateUserListXMLCSV = "Actualizar lista de usuarios";
$DonateToTheProject = "Chamilo es un proyecto Open Source (o \"Software Libre\") y este portal está proveído a nuestra comunidad sin costo por la Asociación Chamilo, que persigue el objetivo de mejorar la calidad de una educación de calidad en todo el mundo.<br /><br />
Desarrollar Chamilo y proveer este servicio son, no obstante, tareas costosas, y su ayuda contribuiría de manera significativa en asegurar que estos servicios se mejoren más rápido en el tiempo.<br /><br />
Crear un curso en este portal es una de las operaciones más exigentes en términos de recursos para nuestro servicio. Le rogamos considere contribuir simbólicamente un monto pequeño para la Asociación Chamilo antes de crear este curso, con el objetivo de ayudarnos a mantener este servicio de buena calidad y gratuito para todos!";
$MyStudentPublications = "Mis tareas";
$AddToEditor = "Añadir al editor";
$ImageURL = "URL imagen";
$PixelWidth = "Ancho en px";
$AddImageWithZoom = "Agregar imagen con zoom";
?>
Loading…
Cancel
Save