Closed fnitu closed 3 years ago
To be checked with the server endpoint.
We need to save first the quiz details. The new question card will not be displayed before.
After saving the quiz details, a new request has to be done to the server using the received quiz id from the previous call. This request will create a question. e.g. (quiz/
The response will contain the id of the question that will be set in the new quiz question card.
The new question card will contain a save button, that will be used for updating. When saving the question, the question id + the question details will be sent.
When clicking the "Add question", a save action will be performed, followed on success by a new request to the quiz/
After further analysis, in order to make it more similar with the course content creation, the following will apply:
We need to save first the quiz details (/api/admin/quizzes). We will receive and store the quiz id. The new question card will not be displayed before the quiz save action.
Initially, it will not have any questions. In this case, a new card is shown: "You have no questions assigned." + a button "Add question"
When this is clicked, a default question + default options will be sent as a POST request to /api/admin/quizzes/{quizId}/questions This request should contain as a reply the question id. (already implemented on server)
Each question card will also contain a save button, that will make a PUT request to update the current question. (not yet implemented on server)
Hi @razvantudorache ,
Please update the "Save" button on the questionnaire details to use the green color, same as for questions.
Please move the "Add question" and "Delete" buttons to the left side of the question card. On the right hand side, only the "Save" button should remain.
Modifications from the last comment have been applied. Waiting for server integration:
Hi,
All new quiz APIs have been integrated.
A new end-point is requested for deleting a question.
Hi,
Please change the routes to admin/quiz-list/quiz and admin/quiz-list/quiz/:id. The routes should be parent/child with quiz-list.
Hi,
The route has been modified as requested (quiz-list/quiz and quiz-list/quiz/:id) but without the relation parent - child with quiz-list. In order to have that relation a new page must be created that will contain another router-outlet.
From my opinion this relation is not needed because these two pages (quiz-list and quiz) don't have common elements to require a router-outlet (in order to refresh just a part of the page).
In the "New quiz page" we should have a section that allow the creation of multiple questions: Fields:
The order of the questions and question options will be given by the order of the array.
A validation (BE/FE) should be done when selecting the question type to have at least one option.
Drag and drop - to be handled in a separate ticket