moodle-student-bridge 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.es.md +2 -2
- package/README.md +2 -2
- package/docs/REMOTO.md +2 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/src/index.js +2 -2
- package/src/restringido.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.2 — 2026-11-23
|
|
4
|
+
|
|
5
|
+
- El modo restringido (cuestionarios) también puede usarse en el servidor remoto, con una llave más:
|
|
6
|
+
`MOODLE_REMOTO_RESTRINGIDO=1` (y la escritura remota `MOODLE_REMOTO_ESCRITURA=1`), además de sus
|
|
7
|
+
tres llaves. Las demás protecciones no cambian.
|
|
8
|
+
|
|
3
9
|
## 1.9.1 — 2026-11-20
|
|
4
10
|
|
|
5
11
|
- Guía [docs/CLIENTES.md](docs/CLIENTES.md) para usarlo con otros clientes MCP: Gemini CLI, ChatGPT,
|
package/README.es.md
CHANGED
|
@@ -209,7 +209,7 @@ Permite abrir un cuestionario, ver sus preguntas, **marcar la respuesta que tú
|
|
|
209
209
|
|
|
210
210
|
- **Triple llave:** `MOODLE_MODO_RESTRINGIDO=1` + `MOODLE_ESCRITURA=1` + `MOODLE_ACEPTO_RESPONSABILIDAD=si`.
|
|
211
211
|
No se puede activar desde el formulario de Claude Desktop.
|
|
212
|
-
- **
|
|
212
|
+
- **En el servidor remoto** exige además `MOODLE_REMOTO_ESCRITURA=1` y `MOODLE_REMOTO_RESTRINGIDO=1`.
|
|
213
213
|
- **La IA no resuelve:** las instrucciones del servidor y cada respuesta le prohíben sugerir, elegir, razonar
|
|
214
214
|
o explicar respuestas durante un intento. Solo marca lo que indiques literalmente.
|
|
215
215
|
- **No se esquiva nada:** si el cuestionario exige Safe Exam Browser o ventana segura, se bloquea; la
|
|
@@ -265,7 +265,7 @@ usa tu propio servidor con `NTFY_SERVER` y `NTFY_TOKEN`.
|
|
|
265
265
|
| `RECORDAR_HORAS`, `INTERVALO_MIN` | Cuándo avisar (por defecto `24,3` y `60`) |
|
|
266
266
|
| `MOODLE_ESCRITURA` | `1` para activar el modo escritura (por defecto desactivado) |
|
|
267
267
|
| `MOODLE_ANONIMO` | `1` para mostrar a los compañeros como alias |
|
|
268
|
-
| `MOODLE_MODO_RESTRINGIDO`, `MOODLE_ACEPTO_RESPONSABILIDAD` | Modo restringido de cuestionarios (`1` y `si`, además de `MOODLE_ESCRITURA=1`);
|
|
268
|
+
| `MOODLE_MODO_RESTRINGIDO`, `MOODLE_ACEPTO_RESPONSABILIDAD` | Modo restringido de cuestionarios (`1` y `si`, además de `MOODLE_ESCRITURA=1`); en remoto también `MOODLE_REMOTO_RESTRINGIDO=1` |
|
|
269
269
|
| `MOODLE_URL_<X>`, `MOODLE_TOKEN_<X>`, `MOODLE_NOMBRE_<X>`, `MOODLE_SITIO` | Moodle adicionales y el activo al arrancar |
|
|
270
270
|
| `RECORDAR_ASISTENCIA` | `0` para desactivar el aviso de clases |
|
|
271
271
|
| `MOODLE_HISTORIAL` | Archivo del historial de acciones de escritura |
|
package/README.md
CHANGED
|
@@ -218,7 +218,7 @@ and never contains the token.
|
|
|
218
218
|
|
|
219
219
|
Lets you open a quiz, view its questions, **mark the answer you say** and submit it. **Off by default**, with
|
|
220
220
|
several barriers: three keys (`MOODLE_MODO_RESTRINGIDO=1`, `MOODLE_ESCRITURA=1`,
|
|
221
|
-
`MOODLE_ACEPTO_RESPONSABILIDAD=si`),
|
|
221
|
+
`MOODLE_ACEPTO_RESPONSABILIDAD=si`; on the remote server also `MOODLE_REMOTO_ESCRITURA=1` and `MOODLE_REMOTO_RESTRINGIDO=1`), the AI is instructed never to suggest or explain
|
|
222
222
|
answers during an attempt, Safe Exam Browser / secure window quizzes are blocked, only the teacher-given
|
|
223
223
|
password can be used, and starting or submitting an attempt needs a confirmation code. Status: **beta**.
|
|
224
224
|
|
|
@@ -262,7 +262,7 @@ own server with `NTFY_SERVER` and `NTFY_TOKEN`.
|
|
|
262
262
|
| `MOODLE_DESCARGAS` | Download folder (default `~/Downloads/moodle-student-bridge`) |
|
|
263
263
|
| `MOODLE_ESCRITURA` | `1` to enable write mode (off by default) |
|
|
264
264
|
| `MOODLE_ANONIMO` | `1` to show classmates as aliases |
|
|
265
|
-
| `MOODLE_MODO_RESTRINGIDO`, `MOODLE_ACEPTO_RESPONSABILIDAD` | Restricted quiz mode (`1` and `si`, plus `MOODLE_ESCRITURA=1`);
|
|
265
|
+
| `MOODLE_MODO_RESTRINGIDO`, `MOODLE_ACEPTO_RESPONSABILIDAD` | Restricted quiz mode (`1` and `si`, plus `MOODLE_ESCRITURA=1`); remotely also `MOODLE_REMOTO_RESTRINGIDO=1` |
|
|
266
266
|
| `MOODLE_URL_<X>`, `MOODLE_TOKEN_<X>`, `MOODLE_NOMBRE_<X>`, `MOODLE_SITIO` | Extra Moodle sites and the one active at start |
|
|
267
267
|
| `RECORDAR_ASISTENCIA` | `0` to turn off class reminders |
|
|
268
268
|
| `MOODLE_HISTORIAL` | Write-action log file |
|
package/docs/REMOTO.md
CHANGED
|
@@ -153,6 +153,7 @@ La URL del conector de claude.ai **no cambia**.
|
|
|
153
153
|
| Exportar `.ics` | guarda el archivo | 🔗 enlace (o `suscripcion=true`, que se actualiza solo) |
|
|
154
154
|
| Entregar archivos | rutas de tu PC o archivos privados | 📤 `preparar_subida` o archivos privados |
|
|
155
155
|
| Modo escritura | `MOODLE_ESCRITURA=1` | además `MOODLE_REMOTO_ESCRITURA=1` |
|
|
156
|
+
| Modo restringido (cuestionarios) | sus tres llaves | además `MOODLE_REMOTO_ESCRITURA=1` y `MOODLE_REMOTO_RESTRINGIDO=1` |
|
|
156
157
|
|
|
157
158
|
## Seguridad
|
|
158
159
|
|
|
@@ -183,3 +184,4 @@ La URL del conector de claude.ai **no cambia**.
|
|
|
183
184
|
| `RENDER_API_KEY` | Para guardar en Render el token renovado desde la página Conectar Moodle |
|
|
184
185
|
| `MOODLE_DATOS` | Carpeta persistente para guardar el token renovado (Docker con volumen) |
|
|
185
186
|
| `MOODLE_REMOTO_ESCRITURA` | `1` para permitir escritura en remoto (además de `MOODLE_ESCRITURA=1`) |
|
|
187
|
+
| `MOODLE_REMOTO_RESTRINGIDO` | `1` para permitir el modo restringido en remoto (además de sus tres llaves y la escritura remota) |
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.2",
|
|
3
3
|
"name": "moodle-student-bridge",
|
|
4
4
|
"display_name": "Moodle Student Bridge",
|
|
5
|
-
"version": "1.9.
|
|
5
|
+
"version": "1.9.2",
|
|
6
6
|
"description": "Connect Claude to your Moodle as a student: deadlines, assignments, quizzes, files, announcements and grades.",
|
|
7
7
|
"long_description": "Uses your own Moodle mobile-app token (service moodle_mobile_app), so it works without an admin-issued API token. Read-only by default. Optional write mode (submit/edit/delete assignment submissions, messages, forum posts) always works in two steps: a preview with every check and warning, then an explicit confirmation code.",
|
|
8
8
|
"author": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moodle-student-bridge",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "MCP bridge for students: connect Claude, Gemini, ChatGPT or any MCP client to your Moodle courses, assignments, quizzes, files and grades using your own mobile-app token — no admin-issued API token needed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"attendance",
|
package/src/index.js
CHANGED
|
@@ -39,7 +39,7 @@ if (MODO_RESTRINGIDO) console.error(`\n${AVISO}\n`);
|
|
|
39
39
|
else if (process.env.MOODLE_MODO_RESTRINGIDO === "1")
|
|
40
40
|
console.error(
|
|
41
41
|
MODO_REMOTO
|
|
42
|
-
? "Modo restringido
|
|
42
|
+
? "Modo restringido NO activado en remoto: requiere MOODLE_ESCRITURA=1, MOODLE_REMOTO_ESCRITURA=1, MOODLE_ACEPTO_RESPONSABILIDAD=si y MOODLE_REMOTO_RESTRINGIDO=1."
|
|
43
43
|
: "Modo restringido NO activado: requiere también MOODLE_ESCRITURA=1 y MOODLE_ACEPTO_RESPONSABILIDAD=si (lee el aviso en docs/ROADMAP.md).",
|
|
44
44
|
);
|
|
45
45
|
|
|
@@ -81,7 +81,7 @@ const anonimo = new Anonimizador({
|
|
|
81
81
|
});
|
|
82
82
|
sitios.alCambiar.push(() => (anonimo.listoHasta = 0));
|
|
83
83
|
|
|
84
|
-
const INFO_SERVIDOR = { name: "moodle-student-bridge", version: "1.9.
|
|
84
|
+
const INFO_SERVIDOR = { name: "moodle-student-bridge", version: "1.9.2" };
|
|
85
85
|
const OPCIONES_SERVIDOR = {
|
|
86
86
|
instructions:
|
|
87
87
|
"Herramientas para el Moodle del estudiante. Las de lectura se pueden usar libremente. " +
|
package/src/restringido.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Existe SOLO para pruebas y para demostrar lo que el MCP es capaz de hacer. Desactivado por defecto.
|
|
4
4
|
// Barreras:
|
|
5
5
|
// - Triple llave: MOODLE_MODO_RESTRINGIDO=1 + MOODLE_ESCRITURA=1 + MOODLE_ACEPTO_RESPONSABILIDAD=si.
|
|
6
|
-
// -
|
|
6
|
+
// - En el servidor remoto exige además MOODLE_REMOTO_RESTRINGIDO=1 y MOODLE_REMOTO_ESCRITURA=1.
|
|
7
7
|
// - La IA no resuelve: marca exactamente la respuesta que el estudiante indique. Las instrucciones del
|
|
8
8
|
// servidor y cada salida le prohíben sugerir, elegir o explicar respuestas durante un intento.
|
|
9
9
|
// - No se esquiva nada: Safe Exam Browser / ventana segura → bloqueado; contraseña → solo la que dio
|
|
@@ -24,7 +24,9 @@ const NO_RESOLVER =
|
|
|
24
24
|
|
|
25
25
|
/** ¿Está activado el modo restringido con sus tres llaves? */
|
|
26
26
|
export function restringidoActivo(env = process.env, { remoto = false } = {}) {
|
|
27
|
-
|
|
27
|
+
const base = env.MOODLE_MODO_RESTRINGIDO === "1" && ["1", "true"].includes(env.MOODLE_ESCRITURA ?? "") && (env.MOODLE_ACEPTO_RESPONSABILIDAD ?? "").toLowerCase() === "si";
|
|
28
|
+
// En remoto, una llave más (igual que la escritura): nadie lo tiene activo en la nube por accidente.
|
|
29
|
+
return base && (!remoto || (env.MOODLE_REMOTO_RESTRINGIDO === "1" && ["1", "true"].includes(env.MOODLE_REMOTO_ESCRITURA ?? "")));
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
/** Reglas de acceso que este modo nunca intenta esquivar. */
|