Skip to content

Commit

Permalink
chore: update quizzes lib to 4.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pol Torrent i Soler authored and toniginard committed Feb 12, 2025
1 parent bd867c8 commit 6815fdd
Show file tree
Hide file tree
Showing 28 changed files with 62 additions and 95 deletions.
24 changes: 7 additions & 17 deletions quizzes/lib/com/wiris/quizzes/impl/QuizzesImpl.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ public function newFeedbackRequest($html, $instance) {
$r = $this->newGradeRequest($instance);
$qr = $r;
$qi = $instance;
$qr->question = $this->cloneQuestion($qr->question);
$qr->question = $this->shallowCopyQuestion($qr->question);
com_wiris_quizzes_impl_QuizzesImpl::setVariables($html, $qr->question, $qi, $qr);
return $r;
}
Expand Down Expand Up @@ -1114,21 +1114,12 @@ public function newVariablesRequestWithQuestionData($html, $instance) {
}
return $this->newVariablesRequest($sb->b, $instance);
}
public function sanitizeForQuizzesService($question) {
$slots = $question->getSlots();
{
$_g = 0;
while($_g < $slots->length) {
$slot = $slots[$_g];
++$_g;
if($slot->getSyntax()->getName() == com_wiris_quizzes_api_assertion_SyntaxName::$MATH_MULTISTEP) {
$slot->setSyntax(com_wiris_quizzes_api_assertion_SyntaxName::$MATH);
}
unset($slot);
}
}
public function shallowCopyQuestion($question) {
$copy = new com_wiris_quizzes_impl_QuestionImpl();
$copy->importQuestion($question->getImpl());
return $copy;
}
public function cloneQuestion($question) {
public function deepCopyQuestion($question) {
$serialized = $question->serialize();
return $this->readQuestion($serialized);
}
Expand All @@ -1141,12 +1132,11 @@ public function newVariablesRequest($html, $instance) {
if($question === null) {
throw new HException("The question must be specified, either as a parameter" . " of this function or as a field of the question instance");
}
$question = $this->cloneQuestion($question);
$question = $this->shallowCopyQuestion($question);
$qr = new com_wiris_quizzes_impl_QuestionRequestImpl();
$qr->question = $question;
$qr->userData = $qi->userData;
com_wiris_quizzes_impl_QuizzesImpl::setVariables($html, $question, $qi, $qr);
$this->sanitizeForQuizzesService($question);
return $qr;
}
public function readQuestionInstance($xml, $q) {
Expand Down
42 changes: 17 additions & 25 deletions quizzes/lib/quizzes.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quizzes/lib/quizzes.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -25066,7 +25066,7 @@ const MathMultiStepAnswerField = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__s
const _sfc_main = /* @__PURE__ */ defineComponent$1({
__name: "AnswerField",
props: {
"modelValue": { required: true },
"modelValue": {},
"modelModifiers": {}
},
emits: ["update:modelValue"],
Expand Down
4 changes: 2 additions & 2 deletions quizzes/lib/strings_graph.ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"downloadText": "Seleccioneu una mida per descarregar el tauler gràfic com una imatge PNG quadrada.",
"downloadHelperText": "Imatge quadrada (1:1)",
"downloadErrorText": "La mida ha de ser un nombre enter positiu.",
"confirm": "Confirmar",
"confirm": "confirma",
"cancel": "cancel·lar",
"sizeInPixels": "Mida en píxels",
"insertANumber": "Inseriu un nombre",
Expand Down Expand Up @@ -220,7 +220,7 @@
"helper_text_start_new_parallel_or_perpendicular": "Pots seleccionar els següents elements:",
"helper_text_start_draw_strokes": "Dibuixa allò que vulguis.",
"line": "una línia",
"vector": "un vector",
"vector": "vector",
"ray": "una semirecta",
"segment": "un segment",
"final_helper_text": "Fet!",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_graph.da.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"helper_text_start_new_parallel_or_perpendicular": "Du kan vælge følgende elementer:",
"helper_text_start_draw_strokes": "Tegn, hvad du vil.",
"line": "en linje",
"vector": "en vektor",
"vector": "vektor",
"ray": "en stråle",
"segment": "et segment",
"final_helper_text": "Udført!",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_graph.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"helper_text_start_new_parallel_or_perpendicular": "Die folgenden Elemente stehen zur Auswahl:",
"helper_text_start_draw_strokes": "Zeichnen Sie, was Sie möchten.",
"line": "eine Linie",
"vector": "ein Vektor",
"vector": "Vektor",
"ray": "ein Strahl",
"segment": "ein Abschnitt",
"final_helper_text": "Fertig!",
Expand Down
4 changes: 2 additions & 2 deletions quizzes/lib/strings_graph.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"downloadText": "Select a size to download the plotter as a square PNG image.",
"downloadHelperText": "Square Image (1:1)",
"downloadErrorText": "Size must be a whole number.",
"confirm": "Confirm",
"confirm": "confirm",
"cancel": "cancel",
"sizeInPixels": "Size in pixels",
"insertANumber": "Insert a number",
Expand Down Expand Up @@ -220,7 +220,7 @@
"helper_text_start_new_parallel_or_perpendicular": "You can select the following elements:",
"helper_text_start_draw_strokes": " Draw whatever you want.",
"line": "a line",
"vector": "a vector",
"vector": "vector",
"ray": "a ray",
"segment": "a segment",
"final_helper_text": "Done!",
Expand Down
4 changes: 2 additions & 2 deletions quizzes/lib/strings_graph.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"downloadText": "Seleccione un tamaño para descargar el tablero gráfico como una imagen cuadrada PNG",
"downloadHelperText": "Imagen cuadrada (1:1)",
"downloadErrorText": "El tamaño debe ser un número entero positivo.",
"confirm": "Confirmar",
"confirm": "confirmar",
"cancel": "cancelar",
"sizeInPixels": "Tamaño en píxeles",
"insertANumber": "Inserte un número",
Expand Down Expand Up @@ -220,7 +220,7 @@
"helper_text_start_new_parallel_or_perpendicular": "Puedes seleccionar los siguientes elementos:",
"helper_text_start_draw_strokes": "Dibuja lo que quieras.",
"line": "una línea",
"vector": "un vector",
"vector": "vector",
"ray": "una semirrecta",
"segment": "un segmento",
"final_helper_text": "¡Hecho!",
Expand Down
4 changes: 2 additions & 2 deletions quizzes/lib/strings_graph.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"tt_measures": "Mesures",
"tt_area": "Zone",
"tt_angle": "Angle",
"tt_length": "Longitud",
"tt_length": "Longueur",
"tt_labels": "Étiquette",
"tt_elementMML": "Expression",
"tt_image": "Image",
Expand Down Expand Up @@ -248,7 +248,7 @@
"newInterpolatingPolynomialByPoints": "Polynôme interpolateur",
"newArea": "Zone",
"newAngle": "Angle",
"newLength": "Longitud",
"newLength": "Longueur",
"newFreeLabel": "Étiquette",
"newElementByLabel": "Expression",
"drawStrokes": "Écriture manuscrite",
Expand Down
4 changes: 2 additions & 2 deletions quizzes/lib/strings_graph.nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"downloadText": "Select a size to download the plotter as a square PNG image.",
"downloadHelperText": "Square Image (1:1)",
"downloadErrorText": "Size must be a whole number.",
"confirm": "Confirm",
"confirm": "confirm",
"cancel": "annuleren",
"sizeInPixels": "Size in pixels",
"insertANumber": "Insert a number",
Expand Down Expand Up @@ -220,7 +220,7 @@
"helper_text_start_new_parallel_or_perpendicular": "You can select the following elements:",
"helper_text_start_draw_strokes": " Draw whatever you want.",
"line": "a line",
"vector": "a vector",
"vector": "vector",
"ray": "a ray",
"segment": "a segment",
"final_helper_text": "Done!",
Expand Down
8 changes: 4 additions & 4 deletions quizzes/lib/strings_graph.no.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"tt_interpolatingPolynomial": "Interpolerende polynom",
"tt_measures": "Målinger",
"tt_area": "Område",
"tt_angle": "Hjørne",
"tt_length": "Lengde",
"tt_angle": "Vinkel",
"tt_length": "lengde",
"tt_labels": "Etiketten",
"tt_elementMML": "Uttrykk",
"tt_image": "Bilde",
Expand Down Expand Up @@ -247,8 +247,8 @@
"newConicByFivePoints": "Konisk",
"newInterpolatingPolynomialByPoints": "Interpolerende polynom",
"newArea": "Område",
"newAngle": "Hjørne",
"newLength": "Lengde",
"newAngle": "Vinkel",
"newLength": "lengde",
"newFreeLabel": "Etiketten",
"newElementByLabel": "Uttrykk",
"drawStrokes": "Håndskrift",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "unitat imaginària",
"mixedfractions": "fraccions mixtes",
"constants": "constants",
"functions": "funcions",
"functions": "pestanya funcions",
"userfunctions": "funcions d'usuari",
"units": "unitats",
"unitprefixes": "prefixos d'unitats",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.da.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "imaginær enhed",
"mixedfractions": "blandede brøker",
"constants": "konstanter",
"functions": "funktioner",
"functions": "fanen funktioner",
"userfunctions": "brugerfunktioner",
"units": "enheder",
"unitprefixes": "enhedspræfikser",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "Imaginäre Einheit",
"mixedfractions": "Gemischte Brüche",
"constants": "Konstanten",
"functions": "Funktionen",
"functions": "Tab „Funktionen",
"userfunctions": "Benutzerfunktionen",
"units": "Einheiten",
"unitprefixes": "Einheitenpräfixe",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.el.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "φανταστική μονάδα",
"mixedfractions": "μικτά κλάσματα",
"constants": "σταθερές",
"functions": "συναρτήσεις",
"functions": "καρτέλα Συναρτήσεις",
"userfunctions": "συναρτήσεις χρήστη",
"units": "μονάδες",
"unitprefixes": "προθέματα μονάδων",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "imaginary unit",
"mixedfractions": "mixed fractions",
"constants": "constants",
"functions": "functions",
"functions": "functions tab",
"userfunctions": "user functions",
"units": "units",
"unitprefixes": "unit prefixes",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "unidad imaginaria",
"mixedfractions": "fracciones mixtas",
"constants": "constantes",
"functions": "funciones",
"functions": "pestaña funciones",
"userfunctions": "funciones de usuario",
"units": "unidades",
"unitprefixes": "prefijos de unidades",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "unité imaginaire",
"mixedfractions": "fractions mixtes",
"constants": "constantes",
"functions": "fonctions",
"functions": "onglet fonctions",
"userfunctions": "fonctions personnalisées",
"units": "unités",
"unitprefixes": "préfixes d'unité",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.it.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "unità immaginaria",
"mixedfractions": "frazioni miste",
"constants": "costanti",
"functions": "funzioni",
"functions": "scheda funzioni",
"userfunctions": "funzioni utente",
"units": "unità",
"unitprefixes": "prefissi unità",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.nn.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "imaginær eining",
"mixedfractions": "blanda brøkar",
"constants": "konstantar",
"functions": "funksjonar",
"functions": "fanen funksjonar",
"userfunctions": "brukarfunksjonar",
"units": "eininger",
"unitprefixes": "einingsprefiks",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.no.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "imaginær enhet",
"mixedfractions": "blandede brøker",
"constants": "konstanter",
"functions": "funksjoner",
"functions": "fanen funksjoner",
"userfunctions": "brukerfunksjoner",
"units": "enheter",
"unitprefixes": "enhetsprefikser",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "unidade imaginária",
"mixedfractions": "frações mistas",
"constants": "constantes",
"functions": "funções",
"functions": "separador de funções",
"userfunctions": "funções do utilizador",
"units": "unidades",
"unitprefixes": "prefixos das unidades",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "unidade imaginária",
"mixedfractions": "frações mistas",
"constants": "constantes",
"functions": "funções",
"functions": "aba de funções",
"userfunctions": "funções do usuário",
"units": "unidades",
"unitprefixes": "prefixos das unidades",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "мнимая единица",
"mixedfractions": "смешанные дроби",
"constants": "постоянные",
"functions": "функции",
"functions": "вкладка «Функции»",
"userfunctions": "функции пользователя",
"units": "единицы",
"unitprefixes": "приставки единиц",
Expand Down
2 changes: 1 addition & 1 deletion quizzes/lib/strings_quizzes.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"imaginary_unit": "虚数单位",
"mixedfractions": "带分数",
"constants": "常量",
"functions": "函数",
"functions": "函数选项卡",
"userfunctions": "用户函数",
"units": "单位",
"unitprefixes": "单位前缀",
Expand Down
25 changes: 5 additions & 20 deletions quizzes/lib/util.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion quizzes/lib/util_tmp.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quizzes/lib/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.12.0.e19fce
dev.ecae05

0 comments on commit 6815fdd

Please sign in to comment.