diff --git a/README.md b/README.md index 78e97f8..805b83b 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 3.01-QCM_MuscuMaths +# 3.01-QCM_MuscuMaths (Maths'Educ) LogicSys Digital @@ -22,4 +22,5 @@ Convention de nommage des commits : ...Etc... + par GUITARD Maxence, VAN BRABRANDT Jade, DUCOURTHIAL Jérémy, CALATAYUD Yvan, NORTIER Damien \ No newline at end of file diff --git a/Website/controllers/ControllerUser.php b/Website/controllers/ControllerUser.php index 07aaf83..c1aee1e 100644 --- a/Website/controllers/ControllerUser.php +++ b/Website/controllers/ControllerUser.php @@ -339,7 +339,7 @@ class ControllerUser 'idplayer' => $_SESSION["idPlayerConnected"], 'maxscore' => $_SESSION["Score"] ]; - + if($_SESSION["idPlayerConnected"] != null){ if ($this->mdPlayer->verifyJouer($jouer) == null) { $this->mdPlayer->addJouer($jouer); diff --git a/documentation/diagramme_de_cas_d_utilisation.png b/documentation/diagramme_de_cas_d_utilisation.png new file mode 100644 index 0000000..d6dc480 Binary files /dev/null and b/documentation/diagramme_de_cas_d_utilisation.png differ diff --git a/documentation/diagramme_de_cas_d_utilisation.uml b/documentation/diagramme_de_cas_d_utilisation.uml new file mode 100644 index 0000000..b55ce21 --- /dev/null +++ b/documentation/diagramme_de_cas_d_utilisation.uml @@ -0,0 +1,41 @@ +@startuml +left to right direction +"Admin" as Admin +actor "Player" as pl +rectangle Maths'Educ { + usecase "Répondre aux questions" as UC1 + usecase "Créer un compte" as UC2 + usecase "Consulter ses scores" as UC3 + usecase "//Consulter//" as UC4 + usecase "Choisir une série de questions" as UC5 + usecase "S'authentifier" as UC6 + usecase "//Ajouter//" as UC7 + usecase "//Modifier//" as UC8 + usecase "//Supprimer//" as UC9 + usecase "Chapitres" as UC10 + usecase "Questions/Réponses" as UC11 + usecase "Administrateurs" as UC12 +} +Admin-->UC4 +pl --> UC1 +pl --> UC2 +pl --> UC3 +UC1 --> UC5 #line.dashed : include +UC6-->UC2 #line.dashed : extend +UC3-->UC6 #line.dashed : include +UC4-->UC7 #line.dashed : extend +UC4-->UC8 #line.dashed : extend +UC4-->UC9 #line.dashed : extend +UC7<|--UC10 +UC8<|--UC10 +UC9<|--UC10 +UC7<|--UC11 +UC8<|--UC11 +UC9<|--UC11 +UC7<|--UC12 +UC8<|--UC12 +UC9<|--UC12 +UC4<|--UC10 +UC4<|--UC11 +UC4<|--UC12 +@enduml \ No newline at end of file diff --git a/documentation/diagramme_de_classe.html b/documentation/diagramme_de_classe.html deleted file mode 100644 index 7c332ea..0000000 --- a/documentation/diagramme_de_classe.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -FrontControllerControllerAdministratorsaddAdministrator(administrator: EntityAdministrator): voidremoveAdministrator(administrator: EntityAdministrator): voidgetAdministrators(): List<EntityAdministrator>getAdministratorByUsername(username: string): EntityAdministratorverifyAdministratorCredentials(username: string, password: string): intverifyAdministratorByName(nickname: string): intsetAdministratorPassword(username: string, newPassword: string): voidControllerQuestionsaddQuestion(question: EntityQuestion): voidremoveQuestion(question: EntityQuestion): voidgetQuestions(): List<EntityQuestion>getQuestionsByChapterAndDifficulty(chapter: int, difficulty: int): List<EntityQuestion>removeQuestionById(id: int): voidgetQuestionById(id: int): EntityQuestionupdateQuestion(id: int, questionDataArray: EntityQuestion): voidupdateNbFails(question: EntityQuestion): voidupdateDifficulty(question: EntityQuestion): voidControllerAnswersaddAnswer(answer: Answer): intremoveAnswer(answer: Answer): voidgetAnswers(): List<Answer>getAnswersByIdQuestions(idQuestion: int): List<Answer>updateAnswer(answersId: int, answer: Answer): voidremoveAnswerById(id: int): voidControllerLobbiesaddLobby(lobby: EntityLobby): voidremoveLobby(lobby: EntityLobby): voidgetLobbies(): List<EntityLobby>getLobbyById(lobbyId: int): EntityLobbyverifyLobbyPassword(lobbyId: int, password: string): booleansetLobbyPassword(lobbyId: int, newPassword: string): voidControllerPlayersaddPlayer(player: EntityPlayer): voidremovePlayer(player: EntityPlayer): voidgetPlayers(): List<EntityPlayer>getPlayerById(playerId: int): EntityPlayergetPlayerByNickname(nickname: string): EntityPlayergetPlayersInLobby(lobbyId: int): List<EntityPlayer>getPlayersMaxScore(playerId: int): intverifyPlayerCredentials(nickname: string, password: string): intverifyPlayerByName(nickname: string): intsetPlayerPassword(playerId: int, newPassword: string): voidControllerChaptersaddChapter(chapter: EntityChapter): voidremoveChapter(chapter: EntityChapter): voidgetChapters(): List<EntityChapter>getChapterById(chapterId: int): EntityChapterAdministratorsManageraddAdministrator(administrator: Administrator): voidremoveAdministrator(administrator: Administrator): voidgetAdministrators(): List<Administrator>QuestionsManageraddQuestion(question: Question): voidremoveQuestion(question: Question): voidgetQuestions(): List<Question>AnswersManageraddAnswer(answer: Answer): voidremoveAnswer(answer: Answer): voidgetAnswers(): List<Answer>LobbiesManageraddLobby(lobby: Lobby): voidremoveLobby(lobby: Lobby): voidgetLobbies(): List<Lobby>PlayersManageraddPlayer(player: Player): voidremovePlayer(player: Player): voidgetPlayers(): List<Player>ChaptersManageraddChapter(chapter: Chapter): voidremoveChapter(chapter: Chapter): voidgetChapters(): List<Chapter>«Serializable»LobbiesaddLobby(lobby : Lobby )removeLobby(lobby : Lobby )getLobbies(): List<Lobby>Lobbyid: intname: stringpassword: stringnbPlayers: intgetId(): intgetName(): stringgetNbPlayers(): intsetNbPlayers(nbPlayers: int): void«Serializable»AnswersaddAnswer(answer: Answer)removeAnswer(answer: Answer)getAnswers(): List<Answer>Answerid: intcontent: stringidQuestion: intAnswer(id: int, content: string, idQuestion: int)getId(): intgetContent()getIdQuestion()setContent(content: string): void«Serializable»AdministratorsaddAdministrator(administrator: Administrator)removeAdministrator(administrator: Administrator)getAdministrators(): List<Administrator>Administratorid: intusername: stringhashedPassword: stringAdministrator(id: int, username: string, password: string)getId(): intgetUsername()getHashedPassword()setHashedPassword(hashedPassword: string): void«Serializable»QuestionsaddQuestion(question: Question)removeQuestion(question: Question)getQuestions(): List<Question>Questionid: intcontent: stringidChapter: intidAnswerGood: intdifficulty: intnbFails: intQuestion(id: int, content: string, idChapter: int, idAnswerGood: int = -1, difficulty: int = 1, nbFails: int = 0)getId(): intgetContent(): stringgetIdChapter(): intgetIdAnswerGood(): intgetDifficulty(): intgetNbFails(): intsetContent(content: string): voidsetIdAnswerGood(idAnswerGood: int): voidsetDifficulty(difficulty: int): voidsetNbFails(nbFails: int): void«Serializable»ChaptersaddChapter(chapter: Chapter)removeChapter(chapter: Chapter)getChapters(): List<Chapter>Chapterid: intname: stringChapter(id: int, name: string)getId()getName()setName(name: string): void«Serializable»PlayersaddPlayer(player: Player)removePlayer(player: Player)getPlayers(): List<Player>Playerid: intnickname: stringhashedPassword: stringPlayer(id: int, nickname: string, password: string)getId(): intgetNickname(): stringgetHashedPassword(): stringsetHashedPassword(hashedPassword: string): voidEntityAnswerid: intcontent: stringidQuestion: intEntityLobbyid: intname: stringpassword: stringnbPlayers: intidPlayerCreator: intEntityAdministratorid: intusername: stringpassword: stringEntityQuestionid: intcontent: stringdifficulty: intnbfails: intidChapter: intidAnswerGood: intEntityChapterid: intname: stringEntityPlayerid: intnickname: stringpassword: stringGatewayPlayeraddPlayer(player: EntityPlayer)removePlayer(player: EntityPlayer)getPlayers(): List<EntityPlayer>getPlayerById(playerId: int): EntityPlayergetPlayerByNickname(nickname: string): EntityPlayergetPlayersInLobby(lobbyId: int): List<EntityPlayer>getPlayersMaxScore(playerId: int): intverifyPlayerCredentials(nickname: string, password: string): intverifyPlayerByName(nickname: string): intsetPlayerPassword(playerId: int, newPassword: string): voidGatewayLobbyaddLobby(lobby: EntityLobby)removeLobby(lobby: EntityLobby)getLobbies(): List<EntityLobby>getLobbyById(lobbyId: int): EntityLobbyverifyLobbyPassword(lobbyId: int, password: string): booleansetLobbyPassword(lobbyId: int, newPassword: string): voidGatewayChapteraddChapter(chapter: EntityChapter)removeChapter(chapter: EntityChapter)getChapters(): List<EntityChapter>getChapterById(chapterId: int): EntityChapterGatewayAnsweraddAnswer(answer: Answer): intgetAnswerByID(id: int): AnswergetAnswersByIDQuestions(idQuestion: int): List<Answer>updateAnswer(answersId: int, answer: Answer): voidremoveAnswerByID(id: int): voidGatewayQuestiongetQuestions(): List<Question>getQuestionsByChapterAndDifficulty(chapter: int, difficulty: int): List<Question>removeQuestionByID(id: int): voidaddQuestion(questionsDataArray: List<Question>): intgetQuestionByID(id: int): QuestionupdateQuestion(id: int, questionDataArray: Question): voidupdateNbFails(question: Question): voidupdateDifficulty(question: Question): voidGatewayAdministratoraddAdministrator(administrator: EntityAdministrator)removeAdministrator(administrator: EntityAdministrator)getAdministrators(): List<EntityAdministrator>getAdministratorByUsername(username: string): EntityAdministratorverifyAdministratorCredentials(username: string, password: string): intverifyAdministratorByName(nickname: string): intsetAdministratorPassword(username: string, newPassword: string): voidlobbiesanswersadministratorsquestionschaptersplayersctrlAdministratorsctrlQuestionsctrlAnswersctrlLobbiesctrlPlayersctrlChaptersadministratorsManagerquestionsManageranswersManagerlobbiesManagerplayersManagerchaptersManageradministratorsquestionsanswerslobbiesplayerschaptersentAdministratorentQuestionentAnswerentLobbyentPlayerentChapter - - \ No newline at end of file diff --git a/documentation/diagramme_de_classe.png b/documentation/diagramme_de_classe.png new file mode 100644 index 0000000..ad72b49 Binary files /dev/null and b/documentation/diagramme_de_classe.png differ