Skip to content

Commit

Permalink
Merge pull request #355 from Arquisoft/develop-teresa
Browse files Browse the repository at this point in the history
Fixing wise men statistics
  • Loading branch information
uo289689 authored Apr 28, 2024
2 parents a05bd01 + c6a462f commit e42350d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
6 changes: 3 additions & 3 deletions questions/utils/question.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@
{
"property": "P3032",
"template": {
"es": "Cuál es la velocidad máxima de x",
"en": "What is the maximum speed of x",
"fr": "Quelle est la vitesse maximale de x"
"es": "Cuál es la mayor velocidad de x",
"en": "What is the greatest speed of x",
"fr": "Quelle est la vitesse plus grand de x"
},
"category": ["Cars"]
}
Expand Down
25 changes: 22 additions & 3 deletions webapp/src/pages/games/WiseMenStackGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,29 @@ const WiseMenStackGame = () => {
try {
await axios.put(`${apiEndpoint}/statistics`, {
username:username,
the_callenge_earned_money:0,
the_callenge_correctly_answered_questions:0,
the_callenge_incorrectly_answered_questions:0,
the_callenge_total_time_played:0,
the_callenge_games_played:0,
wise_men_stack_earned_money:totalScore,
wise_men_stack_correctly_answered_questions:correctlyAnsweredQuestions,
wise_men_stack_incorrectly_answered_questions:incorrectlyAnsweredQuestions,
wise_men_stack_games_played:1
wise_men_stack_games_played:1,
warm_question_earned_money: 0,
warm_question_correctly_answered_questions: 0,
warm_question_incorrectly_answered_questions: 0,
warm_question_passed_questions: 0,
warm_question_games_played: 0,
discovering_cities_earned_money: 0,
discovering_cities_correctly_answered_questions: 0,
discovering_cities_incorrectly_answered_questions: 0,
discovering_cities_games_played: 0,
online_earned_money: 0,
online_correctly_answered_questions: 0,
online_incorrectly_answered_questions: 0,
online_total_time_played: 0,
online_games_played: 0,
});
} catch (error) {
console.error("Error:", error);
Expand Down Expand Up @@ -173,7 +192,7 @@ const WiseMenStackGame = () => {
const userResponse = {
question: questionData.question,
response: response,
options: questionData.options,
options: possibleAnswers,
correctAnswer: questionData.correctAnswer
};
setUserResponses(prevResponses => [...prevResponses, userResponse]);
Expand Down Expand Up @@ -322,7 +341,7 @@ const WiseMenStackGame = () => {
</IconButton>
:
// Cronómetro
<CountdownCircleTimer data-testid="circleTimer" key={questionCountdownKey} isPlaying = {questionCountdownRunning} duration={15} colorsTime={[10, 6, 3, 0]}
<CountdownCircleTimer data-testid="circleTimer" key={questionCountdownKey} isPlaying = {questionCountdownRunning} duration={60} colorsTime={[10, 6, 3, 0]}
colors={[theme.palette.success.main, "#F7B801", "#f50707", theme.palette.error.main]} size={100} onComplete={() => selectResponse(-1, "FAILED")}>
{({ remainingTime }) => {
return (
Expand Down

0 comments on commit e42350d

Please sign in to comment.