From 5d8c3d03c5bc69cd200dda599634e5f6e6ccf944 Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Thu, 14 Dec 2023 14:37:26 +0100 Subject: [PATCH 01/17] Extension Requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bon les gars je vais pas passer par 4 chemins : Zǎoshang hǎo zhōngguó xiànzài wǒ yǒu BING CHILLING 🥶🍦 wǒ hěn xǐhuān BING CHILLING 🥶🍦 dànshì sùdù yǔ jīqíng 9 bǐ BING CHILLING 🥶🍦 sùdù yǔ jīqíng sùdù yǔ jīqíng 9 wǒ zuì xǐhuān suǒyǐ…xiànzài shì yīnyuè shíjiān zhǔnbèi 1 2 3 liǎng gè lǐbài yǐhòu sùdù yǔ jīqíng 9 ×3 bùyào wàngjì bùyào cu òguò jìdé qù diànyǐngyuàn kàn sùdù yǔ jīqíng 9 yīn wéi fēicháng hǎo diànyǐng dòngzuò fēicháng hǎo chàbùduō yīyàng BING CHILLING 🥶🍦zàijiàn 🥶🍦 Co-authored-by: Anthony Debucquoy Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/4 Reviewed-by: Debucquoy Anthony Reviewed-by: Maxime <231026@umons.ac.be> Co-authored-by: LeoMoulin Co-committed-by: LeoMoulin --- Documents/proto/general/openapi.yaml | 215 ++++++++++++++++++++++++++- 1 file changed, 214 insertions(+), 1 deletion(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 95b6d36..55e8168 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -377,7 +377,141 @@ paths: description: Cursus modified '401': $ref: '#/components/responses/UnauthorizedError' + + /Requests/{type}: + get: + summary: Give an array of every requests of the specified type + tags : + - Requests + - SI + - Ext (Student Registration) + responses : + '200': + description : OK + content : + application/json : + schema : + type : array + items : + allOf: + - type : object + properties : + id : + type : integer + - oneOf : + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type + parameters: + - name: type + in: path + description: type of the request + required: true + schema: + type: integer + post : + summary: create a request + tags : + - Requests + - Guest + - Student + - Ext (Student Registration) + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + oneOf: + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type + responses: + '201': + description: New request created + '401': + $ref : '#/components/responses/UnauthorizedError' + + /Requests/{type}/{id}: + parameters: + - name: type + in: path + description: type of the request + required: true + schema: + type: integer + + - name : id + in : path + description: id of the selected Request + required : true + schema : + type : integer + + get : + summary : Get all the data composing a request + tags : + - Requests + - SI + - Teacher + - Ext (Student Registration) + responses : + '200': + description : OK + content : + application/json : + schema : + allOf: + - type : object + properties : + id : + type : integer + - oneOf : + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type + + patch: + summary: Change the state of request + tags: + - Requests + - SI + - Teacher + - Ext (Student Registration) + security: + - bearer: [] + requestBody: + required : true + content: + application/x-www-form-urlencoded: + schema: + oneOf : + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type + responses: + '201': + description: State modified + '401': + $ref: '#/components/responses/UnauthorizedError' /lesson: post: @@ -884,8 +1018,86 @@ components: "courses": ['Math', 'Info'] } Roles: - type: string + type: string enum: [teacher, student, secretary] + + RegRequest: + type : object + properties: + Name : + type: string + Firstname : + type : string + Address : + $ref: "#/components/schemas/Address" + Email: + type : string + BirthDate: + type : string + description: Follow the iso 8601 ("YYYY-MM-DD") + Cursus: + type : integer + description : ID of a specific cursus + Photo: + type : string + description: Path of the picture that the user uploaded + + IdentityCard: + type : string + description: Path of the picture of the user's identity card + Degree: + type : string + description: Path of the pdf containing the user's degree + Certificate: + type : string + description: Path of the pdf containing the user's admission certificate (optionnal) + ForeignerCertificate: + type : string + description: Path of the pdf containing the user's foreigner certificate (optionnal) + State: + type : string + + + RRRequest: + type : object + properties : + RegNo : + type : integer + NewCursusid : + type : integer + State : + type : string + + + SSRequest: + type : object + properties : + RegNo : + type : integer + Amount : + type : integer + Document : + type : string + description : justification document for a scholarship + + UnRegRequest : + type : object + properties : + RegNo : + type : integer + State : + type : string + + ExempRequest : + type : object + properties : + RegNo : + type : integer + Courseid : + type : integer + State : + type : string + Article: type: object properties: @@ -1018,6 +1230,7 @@ components: "displayMode": "grid", "UserId": 12 } + responses: UnauthorizedError: description: Unauthorized access or missing bearer -- 2.46.0 From 26bcb045ed3f5650c33ce8b999c6b95a286dda78 Mon Sep 17 00:00:00 2001 From: Debucquoy Anthony Date: Thu, 14 Dec 2023 15:15:39 +0100 Subject: [PATCH 02/17] Extension Messagerie (#11) Voici le use case de messagerie. et l'interaction overview messagerie. Co-authored-by: Debucquoy Co-authored-by: Anthony Debucquoy Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/11 Reviewed-by: Maxime <231026@umons.ac.be> --- .../extension_messagerie.tex | 74 +++++++++---------- .../interaction_diagram.uml | 17 ++--- .../use_case_messagerie.uml | 9 +-- 3 files changed, 45 insertions(+), 55 deletions(-) diff --git a/Documents/proto/messaging_extension/extension_messagerie.tex b/Documents/proto/messaging_extension/extension_messagerie.tex index 16d8fe0..ac82f0f 100644 --- a/Documents/proto/messaging_extension/extension_messagerie.tex +++ b/Documents/proto/messaging_extension/extension_messagerie.tex @@ -3,6 +3,7 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath, amsfonts, amssymb, amsthm} +\usepackage{dirtytalk} \usepackage{tikz} \usepackage{biblatex} @@ -20,77 +21,74 @@ \resizebox{345pt}{!}{ \input{./use_case_messagerie.tex} } -\caption{Use Case Diagram of the messaging extension} +\caption{Use Case Diagram pour l'extension de messagerie} \label{fig:useCase:msg_ext} \end{figure} -In the diagram Figure~\ref{fig:useCase:msg_ext}, -the <> definition is not pulled from the "Genie logiciel" course -of the University of Mons (UMONS). It is in fact the definition from -the Dan Pilone's pocket reference \cite{Pilone2006-fn}. +Dans le diagramme \ref{fig:useCase:msg_ext}, la définition du <> est tirée du livre: +"uml Pocket reference" de Dan Pilone \cite{Pilone2006-fn}. + +\say{Use case extension encapsulates a distinct flow of events + that are not considered part of the normal or basic flow. + They are not necessarily exceptional conditions.} \subsection{Answer topic} -The user should be able to answer to a topic created by a teacher. -This answer will depend on the type of topic. The answer could be a selection on a poll, -a private answer (which mean that the answer is not visible to the other users except to the professor). -The answer could finally be a basic answer to the topic and be visible to other users browsing the topic. +L'utilisateur doit être capable de répondre à un topic crée par l'enseignant. +Cette réponse va dépendre du type de topic. Elle peut être une réponse à un questionnaire, +un message privé (qui ne serait pas visible par les autres utilisateur excepté l'enseignant) ou +une simple réponse qui serait visible par tous. \subsection{Create discutions} -The user can select multiple users and group them into a discussion. -In this discussion, users will be able to exchange messages readable by -every other members of the discussion +L'utilisateur peut séléctionner plusieurs utilisateurs et les include dans un groupe de discussion. +Dans cette discussion, les utilisateurs peuvent échanger des messages lisible par les autres membres du +groupe \subsubsection{Send messages} -Allow the creation of a message in a discussion. -The text sent to others shall be received by other users -and these users shall be notified of this message by the notification -system. +Permet la création d'un message dans une discusison. +Ce message va être reçu par les autres utilisateur et ceux-ci vont être notifié +du message par le système de notification \subsection{Ask appointment} -A student can ask for an appointment to a teacher. -In this request, the student will have to give a date, a time -and a subject he want to propose to the teacher. +Un étudiant peut demander un rendes-vous à un enseignant. +Dans cette demande, l'étudiant doit donner une date qui lui convient pour ce rendez-vous +ainsi qu'une raison à ce rendez-vous. \subsubsection{Export to calendar} -When an appointment is made. The program can export the event -to an open format that can be read by calendar software to add -the event to the user's calendar. +Quand un rendez-vous est crée, Le programme peut exporter l'événement dans un +format libre qui pourra être lu par les programme de gestions de planning. \subsection{Manage appointment} -When a teacher received an appointment, he is able to -validate, deny or propose a new appointment schedule to the -student. +Quand un enseignant reçois une demande de rendez-vous, +il a la possibilité de valider/refuser ou de proposer un nouveau rendez-vous +à l'étudiant \subsubsection{Propose new appointment} -If the teacher can't attend to an appointment because of his -schedule, he can make a new time proposal and send it to -the student. The student then receive a notification of -the proposed modifications. +Si l'enseignant n'est pas disponible pour le rendez-vous proposé, +il peut alors proposer un nouveau créneau horaire et l'envoyer à l'étudiant. +L'étudiant reçois alors une notification du nouveau créneau horaire. \subsection{Create forum} -The teacher can create a new forum under a specific course -The new forum will then make every student of this course -follow the forum and its topic. +L'enseignant peut créer un nouveau forum lié à un cours. +Ce nouveau forum enregistrera les étudiant du cours automatiquement. \subsubsection{Post topics} -The teacher can post a new topic inside a forum to let -the student know of something specific or to ask a question to -them. +L'enseignant peut envoyer un topic dans un forum pour préciser quelque chose aux étudiants +ou pour poser une questions \subsubsection{Post poll} -When posting a topic to a forum, the teacher can choose to -make the post as a poll. In that case, student will have to vote -for one of the options or if allowed by the teacher, create a new option. +Lors d'un post, il est possible de choisir de créer un questionnaire à choix multiples ou non. +Dans ce cas, les étudiants vont devoir voter pour l'une des options proposée ou potentiellement +crée une nouvelle option. \printbibliography diff --git a/Documents/proto/messaging_extension/interaction_diagram.uml b/Documents/proto/messaging_extension/interaction_diagram.uml index cfb2254..889465d 100644 --- a/Documents/proto/messaging_extension/interaction_diagram.uml +++ b/Documents/proto/messaging_extension/interaction_diagram.uml @@ -1,23 +1,19 @@ @startuml -note - Appointment -endnote +mainframe Appointment start -:Asking Apointment] +:Asking Appointment] repeat if (accepted) is (yes) then :Export to calendar] stop else (no) - :Propose new apointment] + :Propose new appointment] endif @enduml @startuml -note - Messaging -endnote +mainframe Messaging start split :Create Discution] @@ -31,10 +27,7 @@ stop @enduml @startuml -note - Forum -endnote - +mainframe Forum start :Forum Creation] diff --git a/Documents/proto/messaging_extension/use_case_messagerie.uml b/Documents/proto/messaging_extension/use_case_messagerie.uml index d0d4b8b..90e8375 100644 --- a/Documents/proto/messaging_extension/use_case_messagerie.uml +++ b/Documents/proto/messaging_extension/use_case_messagerie.uml @@ -5,14 +5,13 @@ left to right direction :Student: as s :Teacher: as t - package "Messagerie"{ (Answer topics) as at -(Ask appointement) as aa -(Create Discution) as cd +(Ask appointment) as aa +(Create Discussion) as cd (Create Forum) as cf -(Manage appointement) as ma +(Manage appointment) as ma s -- at s -- aa @@ -32,7 +31,7 @@ cf <-- pt : << include >> pt <|-- (Post poll) cd <-- (Send messages) : << include >> -ma <-- (Propose new appointment) : << exlude>> \n [refuse] +ma <-- (Propose new appointment) : << extends >> \n [refuse] } -- 2.46.0 From 55e095bcc6f939342a9c72cdfaef5a05a31a11d2 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Thu, 14 Dec 2023 20:58:09 +0100 Subject: [PATCH 03/17] small indentation error --- Documents/proto/general/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 55e8168..014861d 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -1018,7 +1018,7 @@ components: "courses": ['Math', 'Info'] } Roles: - type: string + type: string enum: [teacher, student, secretary] RegRequest: -- 2.46.0 From 4f1a44549b743631da89abfb42f01697a17a6dbb Mon Sep 17 00:00:00 2001 From: Debucquoy Anthony Date: Fri, 15 Dec 2023 14:36:10 +0100 Subject: [PATCH 04/17] ERB msg done (#14) # Entity relational diagram ## Messaging extension ```mermaid %%{init: { "er": {"fontSize": 25}}}%% erDiagram %% General Users %% Messages Discussions{ Integer id PK String name } Messages{ Integer id PK Integer response FK "Messages" String content } Discussions ||--o{ Messages: "" Discussions ||--o{ Users: "" Messages o|--o{ Messages: "answers" %% Forums Forums{ Integer id PK String name } Topics{ Integer id PK String subject String content Boolean locked } Answers{ Integer id PK String content Boolean anonymous TimeStamp creation_time } Polls{ Integer id PK enum PollType } Options{ Integer id PK String name } Forums ||--o{ Users: "Registered" Forums ||--|| Teacher: "Owner" Forums ||--|| Course: "" Forums ||--o{ Topics: "" Forums ||--o{ Polls: "" Topics ||--|| Teacher: "Author" Topics ||--|| Users: "Author" Topics ||--o{ Answers: "" Polls ||--o{ Options: "" Options ||--o{ Votes : "" Votes }o--|| Users: "Voter" %% Appointments Teachers Appointments{ Integer id PK TIME sent_time enum Status } Appointments ||--|| Teachers: "" Appointments ||--|| Users: "" ``` Debucquoy Anthony Co-authored-by: Debucquoy Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/14 Reviewed-by: Maxime <231026@umons.ac.be> --- Documents/proto/messaging_extension/ERD.md | 87 ++++++++++++++++++++ Documents/proto/messaging_extension/Makefile | 1 + 2 files changed, 88 insertions(+) create mode 100644 Documents/proto/messaging_extension/ERD.md diff --git a/Documents/proto/messaging_extension/ERD.md b/Documents/proto/messaging_extension/ERD.md new file mode 100644 index 0000000..0a4108c --- /dev/null +++ b/Documents/proto/messaging_extension/ERD.md @@ -0,0 +1,87 @@ +# Entity relational diagram + +## Messaging extension + +```mermaid +%%{init: { "er": {"fontSize": 25, "stroke": "black" }}}%% +erDiagram + +%% General +Users + +%% Messages +Discussions{ + Integer id PK + String name +} + +Messages{ + Integer id PK + Integer response FK "Messages" + String content +} + +Discussions ||--o{ Messages: "" +Discussions ||--o{ Users: "" + +Messages o|--o{ Messages: "answers" + +%% Forums +Forums{ + Integer id PK + String name + Integer course FK "Course" +} + +Topics{ + Integer id PK + String subject + String content + Boolean locked +} +Answers{ + Integer id PK + String content + Boolean anonymous + TimeStamp creation_time +} + +Polls{ + Integer id PK + enum PollType +} +Options{ + Integer id PK + String name +} + +Forums ||--o{ Users: "Registered" +Forums ||--|| Teacher: "Owner" +Forums ||--o{ Topics: "" +Forums ||--o{ Polls: "" + +Topics ||--|| Teacher: "Author" +Topics ||--|| Users: "Author" +Topics ||--o{ Answers: "" + +Polls ||--o{ Options: "" + +Options ||--o{ Votes : "" + +Votes }o--|| Users: "Voter" + + +%% Appointments +Teacher +Appointments{ + Integer id PK + Integer teacher FK "Teacher" + TIME sent_time + enum Status +} + +Appointments ||--|| Users: "" + +``` + +Debucquoy Anthony diff --git a/Documents/proto/messaging_extension/Makefile b/Documents/proto/messaging_extension/Makefile index cf0e6b4..8bd79dc 100644 --- a/Documents/proto/messaging_extension/Makefile +++ b/Documents/proto/messaging_extension/Makefile @@ -13,6 +13,7 @@ use_case_messagerie.tex: use_case_messagerie.uml image: use_case_messagerie.uml interaction_diagram.uml plantuml $^ + mmdc -i ERD.md -o ERD.png extension_messagerie.bbl: extension_messagerie.bcf biber extension_messagerie -- 2.46.0 From abef330bd72a8614f64bddfce51fb63b4fdd9f8c Mon Sep 17 00:00:00 2001 From: Debucquoy Anthony Date: Fri, 15 Dec 2023 14:36:44 +0100 Subject: [PATCH 05/17] class diagram messaging extension (#13) Co-authored-by: Anthony Debucquoy Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/13 Reviewed-by: Maxime <231026@umons.ac.be> --- Documents/proto/messaging_extension/Makefile | 3 +- Documents/proto/messaging_extension/class.uml | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 Documents/proto/messaging_extension/class.uml diff --git a/Documents/proto/messaging_extension/Makefile b/Documents/proto/messaging_extension/Makefile index 8bd79dc..7ba3e31 100644 --- a/Documents/proto/messaging_extension/Makefile +++ b/Documents/proto/messaging_extension/Makefile @@ -11,7 +11,7 @@ extension_messagerie.pdf:use_case_messagerie.tex extension_messagerie.bbl extens use_case_messagerie.tex: use_case_messagerie.uml plantuml -tlatex:nopreamble use_case_messagerie.uml -image: use_case_messagerie.uml interaction_diagram.uml +image: use_case_messagerie.uml interaction_diagram.uml class.uml plantuml $^ mmdc -i ERD.md -o ERD.png @@ -25,6 +25,7 @@ clean: latexmk -C rm -f use_case_messagerie.tex rm -f extension_messagerie.{bbl,run.xml} + rm -f class.tex run: extension_messagerie.pdf xdg-open $< diff --git a/Documents/proto/messaging_extension/class.uml b/Documents/proto/messaging_extension/class.uml new file mode 100644 index 0000000..48ef5b9 --- /dev/null +++ b/Documents/proto/messaging_extension/class.uml @@ -0,0 +1,86 @@ +@startuml +title Class diagram for Messaging extension + +package Messages { + class Message{ + content: String + response: Message + respond(User, String) + } + class Discussion{ + name: String + users: ArrayList + invite(User) + sendMessage(User, String) + } + Discussion *-- Message +} + +package Forums { + class Forum{ + name: String + Owner: Teacher + Registered: ArrayList + {static} createForum(Course): Forum + createTopic(String): Topic + createPoll(String, PollType, ArrayList