diff --git a/README.md b/README.md
index ae7013a..1da73d1 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+[](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/frontend-deploy.yml)
+[](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/backend-deploy.yml)
+[](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/deploy.yml)
+
# EvalueTonSavoir
EvalueTonSavoir est une plateforme open source et auto-hébergée qui poursuit le développement du code provenant de https://github.com/ETS-PFE004-Plateforme-sondage-minitest. Cette plateforme minimaliste est conçue comme un outil d'apprentissage et d'enseignement, offrant une solution simple et efficace pour la création de quiz utilisant le format GIFT, similaire à Moodle.
diff --git a/client/src/__tests__/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.test.tsx b/client/src/__tests__/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.test.tsx
index cf4a1fe..d0cc87e 100644
--- a/client/src/__tests__/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.test.tsx
+++ b/client/src/__tests__/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.test.tsx
@@ -15,8 +15,7 @@ describe('MultipleChoiceQuestion', () => {
globalFeedback="feedback"
questionTitle="Test Question"
choices={choices}
- handleOnSubmitAnswer={mockHandleOnSubmitAnswer}
- />
+ handleOnSubmitAnswer={mockHandleOnSubmitAnswer} questionContent={''} />
);
});
diff --git a/client/src/__tests__/components/Questions/NumericalQuestion/NumericalQuestion.test.tsx b/client/src/__tests__/components/Questions/NumericalQuestion/NumericalQuestion.test.tsx
index 37f0daa..65f1548 100644
--- a/client/src/__tests__/components/Questions/NumericalQuestion/NumericalQuestion.test.tsx
+++ b/client/src/__tests__/components/Questions/NumericalQuestion/NumericalQuestion.test.tsx
@@ -18,7 +18,7 @@ describe('NumericalQuestion Component', () => {
};
beforeEach(() => {
- render();
+ render();
});
it('renders correctly', () => {
diff --git a/client/src/__tests__/components/Questions/ShortAnswerQuestion/ShortAnswerQuestion.test.tsx b/client/src/__tests__/components/Questions/ShortAnswerQuestion/ShortAnswerQuestion.test.tsx
index 3af7798..a1774fc 100644
--- a/client/src/__tests__/components/Questions/ShortAnswerQuestion/ShortAnswerQuestion.test.tsx
+++ b/client/src/__tests__/components/Questions/ShortAnswerQuestion/ShortAnswerQuestion.test.tsx
@@ -34,7 +34,7 @@ describe('ShortAnswerQuestion Component', () => {
};
beforeEach(() => {
- render();
+ render();
});
it('renders correctly', () => {
diff --git a/client/src/__tests__/components/Questions/TrueFalseQuestion/TrueFalseQuestion.test.tsx b/client/src/__tests__/components/Questions/TrueFalseQuestion/TrueFalseQuestion.test.tsx
index 2a0b85e..7bf2010 100644
--- a/client/src/__tests__/components/Questions/TrueFalseQuestion/TrueFalseQuestion.test.tsx
+++ b/client/src/__tests__/components/Questions/TrueFalseQuestion/TrueFalseQuestion.test.tsx
@@ -14,7 +14,7 @@ describe('TrueFalseQuestion Component', () => {
};
beforeEach(() => {
- render();
+ render();
});
it('renders correctly', () => {
diff --git a/client/src/pages/Teacher/ManageRoom/ManageRoom.tsx b/client/src/pages/Teacher/ManageRoom/ManageRoom.tsx
index 5d475d0..2155911 100644
--- a/client/src/pages/Teacher/ManageRoom/ManageRoom.tsx
+++ b/client/src/pages/Teacher/ManageRoom/ManageRoom.tsx
@@ -96,8 +96,16 @@ const ManageRoom: React.FC = () => {
socket.on('create-failure', () => {
console.log('Error creating room.');
});
-
-
+ socket.on('user-joined', (user: UserType) => {
+
+ setUsers((prevUsers) => [...prevUsers, user]);
+
+ if (quizMode === 'teacher') {
+ webSocketService.nextQuestion(roomName, currentQuestion);
+ } else if (quizMode === 'student') {
+ webSocketService.launchStudentModeQuiz(roomName, quizQuestions);
+ }
+ });
socket.on('join-failure', (message) => {
setConnectingError(message);
setSocket(null);
diff --git a/docker-compose.yaml b/docker-compose.yaml
index f69d9df..b9588f0 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -7,6 +7,7 @@ services:
container_name: frontend
ports:
- "5173:5173"
+ restart: always
backend:
image: evaluetonsavoir/evaluetonsavoir-backend:latest
@@ -24,6 +25,7 @@ services:
FRONTEND_URL: "http://localhost:5173"
depends_on:
- mongo
+ restart: always
# Ce conteneur sert de routeur pour assurer le bon fonctionnement de l'application
nginx:
@@ -34,6 +36,7 @@ services:
depends_on:
- backend
- frontend
+ restart: always
# Ce conteneur est la base de données principale pour l'application
mongo:
@@ -44,7 +47,7 @@ services:
tty: true
volumes:
- mongodb_data:/data/db
- restart: unless-stopped
+ restart: always
# Ce conteneur assure que l'application est à jour en allant chercher s'il y a des mises à jours à chaque heure
watchtower:
@@ -57,8 +60,8 @@ services:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_DEBUG=true
- WATCHTOWER_INCLUDE_RESTARTING=true
- - WATCHTOWER_POLL_INTERVAL=7200 # every hour
- restart: unless-stopped
+ - WATCHTOWER_SCHEDULE=0 0 5 * * * # At 5 am everyday
+ restart: always
volumes:
mongodb_data: