From 97aff2a91ea5862d6379ebed0b8d7742bf687282 Mon Sep 17 00:00:00 2001 From: Ivan Moll Date: Mon, 17 Oct 2022 13:32:16 +0200 Subject: [PATCH 1/5] Add PHP questions --- server/database/quizzes/php.json | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/server/database/quizzes/php.json b/server/database/quizzes/php.json index 1f721f4..e676c71 100644 --- a/server/database/quizzes/php.json +++ b/server/database/quizzes/php.json @@ -250,5 +250,41 @@ "answer_c": "split(\",\", $array)" }, "correct_answer": "answer_a" + }, + { + "id": "347", + "category": "php", + "level": "facil", + "question": "¿Qué función utilizarias para imprimir por consola?", + "answers": { + "answer_a": "echo('Hello World')", + "answer_b": "console.log('Hello World')", + "answer_c": "System.out.println('Hello World')" + }, + "correct_answer": "answer_a" + }, + { + "id": "348", + "category": "php", + "level": "normal", + "question": "¿Cómo obtener el tipo de objecto en PHP?", + "answers": { + "answer_a": "typeof $object", + "answer_b": "get_class($object)", + "answer_c": "$object instanceof" + }, + "correct_answer": "answer_b" + }, + { + "id": "349", + "category": "php", + "level": "dificil", + "question": "¿Qué función utilizarías de PHP para trabajar con expresiones regulares?", + "answers": { + "answer_a": "reg_match()", + "answer_b": "regexp()", + "answer_c": "preg_match()" + }, + "correct_answer": "answer_c" } ] \ No newline at end of file From 798b533aa80a037cf2748570f43f286f60fde2bf Mon Sep 17 00:00:00 2001 From: Ivan Moll Date: Mon, 17 Oct 2022 21:24:45 +0200 Subject: [PATCH 2/5] Add SQL questions --- server/database/quizzes/sql.json | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/server/database/quizzes/sql.json b/server/database/quizzes/sql.json index ddd9d16..6d9dea5 100644 --- a/server/database/quizzes/sql.json +++ b/server/database/quizzes/sql.json @@ -359,5 +359,41 @@ "answer_d": "DBMS" }, "correct_answer": "answer_a" + }, + { + "id": "350", + "category": "sql", + "level": "normal", + "question": "¿Qué palabra clave de SQL se utiliza para agrupar un conjunto de resultados?", + "answers": { + "answer_a": "GROUP WITH", + "answer_b": "GROUP BY", + "answer_c": "GROUPING BY" + }, + "correct_answer": "answer_b" + }, + { + "id": "351", + "category": "sql", + "level": "dificil", + "question": "¿Cuales de los siguientes tipos de PROCEDURES es correcto?", + "answers": { + "answer_a": "Procedure with CALL parameter", + "answer_b": "Procedure with IN-OUT parameter", + "answer_c": "Procedure with ERASE parameter" + }, + "correct_answer": "answer_b" + }, + { + "id": "352", + "category": "sql", + "level": "normal", + "question": "¿Qué es cierto sobre las TRANSACTIONS?", + "answers": { + "answer_a": "Si falla, tira una excepción de tipo SQLTransactionException", + "answer_b": "Cuando finaliza correctamente registra un log en la tabla mysql_logs", + "answer_c": "Si falla, hace un ROLLBACK de los cambios" + }, + "correct_answer": "answer_c" } ] From 17b2e34e0bc10801bc22b93ff7e3b897e2d09c32 Mon Sep 17 00:00:00 2001 From: Ivan Moll Date: Mon, 17 Oct 2022 21:29:07 +0200 Subject: [PATCH 3/5] Add missed correct answer --- server/database/quizzes/css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/database/quizzes/css.json b/server/database/quizzes/css.json index 9159b31..6c9fefd 100644 --- a/server/database/quizzes/css.json +++ b/server/database/quizzes/css.json @@ -258,7 +258,7 @@ "answer_a": "Verdadero", "answer_b": "Falso" }, - "correct_answer": "" + "correct_answer": "answer_a" }, { "id": "53", From 2224656833196e1ab69b5acf033852d0ea67da4e Mon Sep 17 00:00:00 2001 From: Ivan Moll Date: Mon, 17 Oct 2022 21:52:42 +0200 Subject: [PATCH 4/5] Add CSS questions --- server/database/quizzes/css.json | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/server/database/quizzes/css.json b/server/database/quizzes/css.json index 6c9fefd..53e1cb6 100644 --- a/server/database/quizzes/css.json +++ b/server/database/quizzes/css.json @@ -419,5 +419,41 @@ "answer_d": "font-size: 20px" }, "correct_answer": "answer_a" + }, + { + "id": "353", + "category": "css", + "level": "facil", + "question": "¿Cómo posicionamos un elemento dentro de otro de forma precisa?", + "answers": { + "answer_a": "Padre - position:relative / Hijo - position:absolute", + "answer_b": "Padre - position:absolute / Hijo - position:relative", + "answer_c": "Padre - position:fixed / Hijo - position:absolute" + }, + "correct_answer": "answer_a" + }, + { + "id": "354", + "category": "css", + "level": "normal", + "question": "¿Con que pseudo selector se puede seleccionar el primer hijo, sin tener class name o id?", + "answers": { + "answer_a": "nth-child(0)", + "answer_b": "nth-child(1)", + "answer_c": "nth-first-child" + }, + "correct_answer": "answer_b" + }, + { + "id": "355", + "category": "css", + "level": "dificil", + "question": "¿Qué selector utilizarias para seleccionar un elemento que en el atributo título contenga la palabra \"container\"?", + "answers": { + "answer_a": "[title~=container]", + "answer_b": "[title^=container]", + "answer_c": "[title$=container]" + }, + "correct_answer": "answer_a" } ] From 0feca10460353e1f11e6001aa426203706f53e8b Mon Sep 17 00:00:00 2001 From: Ivan Moll Date: Mon, 17 Oct 2022 22:12:20 +0200 Subject: [PATCH 5/5] Add JS questions --- server/database/quizzes/javascript.json | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/server/database/quizzes/javascript.json b/server/database/quizzes/javascript.json index 4624276..e6cacf9 100644 --- a/server/database/quizzes/javascript.json +++ b/server/database/quizzes/javascript.json @@ -418,5 +418,41 @@ "answer_d": ".replace()" }, "correct_answer": "answer_d" + }, + { + "id": "356", + "category": "javascript", + "level": "dificil", + "question": "¿Qué función tiene el event loop?", + "answers": { + "answer_a": "Es responsable de compilar el código, recopilar y procesar eventos y ejecutar subtareas en cola", + "answer_b": "Es responsable de revisar el código, recopilar y procesar eventos y ejecutar tareas en cola", + "answer_c": "Es responsable de ejecutar el código, recopilar y procesar eventos y ejecutar subtareas en cola" + }, + "correct_answer": "answer_c" + }, + { + "id": "357", + "category": "javascript", + "level": "dificil", + "question": "¿Cuál es la definición de Clousure?", + "answers": { + "answer_a": "Es la combinación de una función agrupada (encerrada) con referencias a su estado circundante (el entorno dislexico)", + "answer_b": "Es la combinación de una función desagrupada (encerrada) con referencias a su estado circundante (el entorno léxico)", + "answer_c": "Es la combinación de una función agrupada (encerrada) con referencias a su estado circundante (el entorno léxico)" + }, + "correct_answer": "answer_c" + }, + { + "id": "358", + "category": "javascript", + "level": "facil", + "question": "¿Qué método de la API del navegador se utiliza para hacer una petición HTTP de forma nativa?", + "answers": { + "answer_a": "fetch(\"https://some-url-here.com\")", + "answer_b": "axios.get(\"https://some-url-here.com\")", + "answer_c": "makeRequest(\"https://some-url-here.com\")" + }, + "correct_answer": "answer_a" } ]