Skip to content

/export-questions should be treated differently #45

@omiras

Description

@omiras

Acabado con issure #27

Ademas encontrado que si usuario va a la ruta /export-questions sin poner ?numberQuestions=[number], en este caso el servidor deja funcionar.
He areglado esta cosa con implemetacion de download-error.ejs para mandar una pantalla informativa a usuari como el puede descargar fichero con preguntas : Image

A normal user using a web browser should not be able to perform a GET request to /export-questions.

That said, at least we provide a clear and user-friendly error message. However, the user may not understand why they cannot access this endpoint. Additionally, only we, as developers, are aware of the existence of /export-questions.

With this in mind, we could consider the following options:

  1. Set Default Values:
    If a user performs a GET request to /export-questions without a query string, we could set default values for numberQuestions. This way, the user would experience some "magic" functionality even if they don’t understand where the behavior originates.

  2. Optimal Approach:
    If no numberQuestions parameter is provided to the endpoint, we could use res.redirect to send the user to /template-form.


Acceptance Criteria

  • If a user navigates directly to /export-questions, they should be redirected to /template-form.
  • If a user navigates to /template-form, they should be able to download a file compatible with either the Kahoot or Blooket applications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions