This commit is contained in:
Melanie St-Hilaire 2024-04-16 15:31:25 -04:00
commit f2c5232565
7 changed files with 24 additions and 10 deletions

View file

@ -1,3 +1,7 @@
[![CI/CD Pipeline for Frontend](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/frontend-deploy.yml/badge.svg)](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/frontend-deploy.yml)
[![CI/CD Pipeline for Backend](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/backend-deploy.yml/badge.svg)](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/backend-deploy.yml)
[![CI/CD Pipeline for Nginx Router](https://github.com/louis-antoine-etsmtl/EvalueTonSavoir/actions/workflows/deploy.yml/badge.svg)](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.

View file

@ -15,8 +15,7 @@ describe('MultipleChoiceQuestion', () => {
globalFeedback="feedback"
questionTitle="Test Question"
choices={choices}
handleOnSubmitAnswer={mockHandleOnSubmitAnswer}
/>
handleOnSubmitAnswer={mockHandleOnSubmitAnswer} questionContent={''} />
);
});

View file

@ -18,7 +18,7 @@ describe('NumericalQuestion Component', () => {
};
beforeEach(() => {
render(<NumericalQuestion {...sampleProps} />);
render(<NumericalQuestion questionContent={''} {...sampleProps} />);
});
it('renders correctly', () => {

View file

@ -34,7 +34,7 @@ describe('ShortAnswerQuestion Component', () => {
};
beforeEach(() => {
render(<ShortAnswerQuestion {...sampleProps} />);
render(<ShortAnswerQuestion questionContent={''} {...sampleProps} />);
});
it('renders correctly', () => {

View file

@ -14,7 +14,7 @@ describe('TrueFalseQuestion Component', () => {
};
beforeEach(() => {
render(<TrueFalseQuestion {...sampleProps} />);
render(<TrueFalseQuestion questionContent={''} {...sampleProps} />);
});
it('renders correctly', () => {

View file

@ -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);

View file

@ -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: