Skip to content

Commit

Permalink
Merge pull request #192 from marioalvaro/branch-UD-DG-Finishing
Browse files Browse the repository at this point in the history
Update UG and DG
  • Loading branch information
marioalvaro authored Nov 13, 2023
2 parents aceb1a9 + a29a457 commit f629726
Show file tree
Hide file tree
Showing 9 changed files with 525 additions and 61 deletions.
146 changes: 111 additions & 35 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The following section gives an overview of the parameters used for the commands
| e/ | Email of the student | Must consist of an alphanumeric prefix, @ symbol and a domain | [email protected], [email protected] | 12@, 1234gmail |
| s/ | Student ID of the student | Must begin and end with a capital letter and have 7 digits in between them | A1234567W | a1234567w, a123w, B1234567 |
| g/ | Tutorial group of the student | Must consist of a capital letter followed by 2 digits | T06, L10 | T1, t10, T111, @T11 |
| t/ | Tag of the student | Must only contain alphanumeric characters | Potential TA, Makeup exam | deans_list |
| t/ | Tag of the student | Must only contain alphanumeric characters and no space | PotentialTA, MakeupExam | deans_list, Potential TA |



Expand All @@ -110,21 +110,24 @@ The following section gives an overview of the parameters used for the commands

### Student Score Parameters

| Parameter | Description | Constraints | Valid Examples | Invalid Examples |
|-----------|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|--------------------|
| m/ | Marks of the Student Score, in absolute terms | Must be a non-negative number, though decimals are allowed. Cannot exceed the maximum marks of the graded component this score is related to | 0, 0.23, 30.00, 20 | -1, ⅔, 2^3, twelve |
| x/ | Comments of the student score | Must only contain alphanumeric characters | Nice work!, Check number 2 | 好的 |
| t/ | Tags of the student score | Must only contain alphanumeric characters | Highest score, Makeup exam | @plagiarism |
| INDEX | The index of the target student score | Positive integer | 1, 10, 21 | -2, 0, 03 |
| Parameter | Description | Constraints | Valid Examples | Invalid Examples |
|-----------|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------------------------|
| m/ | Marks of the Student Score, in absolute terms | Must be a non-negative number, though decimals are allowed. Cannot exceed the maximum marks of the graded component this score is related to | 0, 0.23, 30.00, 20 | -1, ⅔, 2^3, twelve |
| x/ | Comments of the student score | Must only contain alphanumeric characters | Nice work!, Check number 2 | 好的 |
| t/ | Tags of the student score | Must only contain alphanumeric characters and no space | HighestScore, MakeupExam | @plagiarism, Highest Score |
| INDEX | The index of the target student score | Positive integer | 1, 10, 21 | -2, 0, 03 |

### Command Related Parameters

| Parameter | Description | Constraints | Valid Examples | Invalid Examples |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|----------------------------|
| o/ | Used in the [sortStu](#sorting-students-sortstu) command, the selected parameter of students to be sorted | Only parameters in the list (full list under the description of [sortStu](#sorting-students-sortstu) command) are allowed | n, totalscore, tut | studentName, overall score |
| r/ | Used in the [sortStu](#sorting-students-sortstu) and [sortStuScore](#sorting-students-scores-sortscore) commands, the reverse order (to arrange the list either in ascending or descending order) | Only parameters in the list (full list under the description of [sortStu](#sorting-students-sortstu) and [sortScore](#sorting-students-scores-sortscore) commands) are allowed | t, f, decreasing | True, ascending |
| st/ | Used in the [stats](#calculating-overall-statistics-stats) and [compStats](#calculating-statistics-of-a-graded-component-compstats) commands, the statistical measures to be calculated | Only parameters in the list (full list under the description of [stats](#calculating-overall-statistics-stats) and [compStats](#calculating-statistics-of-a-graded-component-compstats) commands) are allowed | max, upperQuartile | quartile, correlation |
| pg/ | Used in autograde command, .... | | | |

| Parameter | Description | Constraints | Valid Examples | Invalid Examples |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|-----------------------------|
| o/ | Used in the [sortStu](#sorting-students-sortstu) command, the selected parameter of students to be sorted | Only parameters in the list (The full list can be found under the description of [sortStu](#sorting-students-sortstu) command) are allowed | n, totalscore, tut | studentName, overall score |
| r/ | Used in the [sortStu](#sorting-students-sortstu) and [sortStuScore](#sorting-students-scores-sortscore) commands, the reverse order (to arrange the list either in ascending or descending order) | Only parameters in the list (The full list can be found under the description of [sortStu](#sorting-students-sortstu) and [sortScore](#sorting-students-scores-sortscore) commands) are allowed | t, f, decreasing | True, ascending |
| st/ | Used in the [stats](#calculating-overall-statistics-stats) and [compStats](#calculating-statistics-of-a-graded-component-compstats) commands, the statistical measures to be calculated | Only parameters in the list (The full list can be found under the description of [stats](#calculating-overall-statistics-stats) and [compStats](#calculating-statistics-of-a-graded-component-compstats) commands) are allowed | max, upperQuartile | quartile, correlation |
| pg/ | Used in [autoGrade](#auto-grading-all-the-students) to determine the passing value of the grade | At most 11 number, with each of them must be an integer. Furthermore, the value must be decreasing and cannot exceed 100 or below 0 | 90 80 50 30 20, 0, 100 | 101, -2, 90 70 75, 90 90 90 | | |
| ag/ | Used in [autoGrade](#auto-grading-all-the-students) to determine the grading method | One of the: p, percentile, Percentile, a, absolute, Absolute | p, percentile, Percentile, a, absolute, Absolute | Asolut, persentil |


<box type="info" seamless>

Expand Down Expand Up @@ -249,7 +252,9 @@ Edits an existing graded component’s details in the database, based on the 1-b

Format: `editComp INDEX [c/COMP_NAME] [w/WEIGHTAGE] [mm/MAX_MARKS]`

* If no parameters, except the index, are provided, the graded component will remain unchanged.

* if no parameters except index are passed in, it will throw an error.


Examples: `editComp 4 c/Midterm Exam mm/55` edits the fourth graded component in the Graded Components list to have a name of “Midterm Exam”, and a maximum mark of 55.

Expand All @@ -265,10 +270,10 @@ Note: a StudentScore will be automatically added when a graded component is crea
* The mark given cannot exceed the maximum marks for the associated graded component.
* Please refrain from entering numbers with more than 2 decimal places of precision.

Format: `editScore INDEX [m/SCORE] [x/comment]`
Format: `editScore INDEX [m/SCORE] [x/comment] [t/tags]`

* if the mark is being edited, the new mark should be more than 0 and not exceed the associated component's maximum marks.
* if no parameters except index are passed in, the score will remain unchanged.
* if no parameters except index are passed in, it will throw an error.

Examples: `editScore 7 m/57` assigns a mark of 57 for the seventh student score in the Student Scores list.

Expand Down Expand Up @@ -433,6 +438,9 @@ The `PASSING_VALUE` are numbers that determine the boundary for each grade
* Value `30` given to `B`
* Any Value below `30` will be given `F`

**Important Note:**
* The `autoGrade` command works on the filtered student list. This would allow for example, to grade students only compared to their own tutorial group. To automatically grade every student in the module, please use `findStu` command to display every student.

Example:
* `autoGrade ag/absolute pg/95 80 70 55 40 20`. This would automatically grade student by using absolute grade threshold. Student with total score `95%` above will be given `A+`, total score below `95%` and `90` above will be given `A`, and so on, while below `20%` will be given `F`.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 124 additions & 0 deletions docs/diagrams/AutoGradeCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

Actor previous_code as user USER_COLOR

box Logic LOGIC_COLOR_T1
participant "a:AutoGradeCommand" as AutoGradeCommand LOGIC_COLOR
participant "ed:EditStudentDescriptor" as EditStudentDescriptor LOGIC_COLOR
participant ":EditStudentCommand" as EditStudentCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box

create AutoGradeCommand
user -> AutoGradeCommand
activate AutoGradeCommand

user <-- AutoGradeCommand
deactivate AutoGradeCommand

user -> AutoGradeCommand : execute()
activate AutoGradeCommand

AutoGradeCommand -> Model : sortStudent("o", true)
activate Model

AutoGradeCommand <-- Model
deactivate Model

alt PERCENTILE
AutoGradeCommand -> AutoGradeCommand : setGradeThresholdPercentile()
activate AutoGradeCommand

AutoGradeCommand --> AutoGradeCommand
deactivate AutoGradeCommand
AutoGradeCommand -[hidden]-> AutoGradeCommand

else ABSOLUTE
AutoGradeCommand -> AutoGradeCommand : setGradeThresholdAbsolute()
activate AutoGradeCommand

AutoGradeCommand --> AutoGradeCommand
deactivate AutoGradeCommand

AutoGradeCommand -[hidden]-> AutoGradeCommand
end

AutoGradeCommand -> AutoGradeCommand : addGradeToAllStudent()
activate AutoGradeCommand

AutoGradeCommand -> Model : getFilteredStudentList()
activate Model

AutoGradeCommand <-- Model
deactivate Model

loop studentList.size()
AutoGradeCommand -> AutoGradeCommand
activate AutoGradeCommand

create EditStudentDescriptor
AutoGradeCommand -> EditStudentDescriptor
activate EditStudentDescriptor

AutoGradeCommand <-- EditStudentDescriptor
deactivate EditStudentDescriptor

AutoGradeCommand -> AutoGradeCommand : createGraded()
activate AutoGradeCommand

AutoGradeCommand --> AutoGradeCommand : studentGrade
deactivate AutoGradeCommand

AutoGradeCommand -> EditStudentDescriptor : setStudentGrade()
activate EditStudentDescriptor

AutoGradeCommand <-- EditStudentDescriptor : ed
deactivate EditStudentDescriptor

EditStudentDescriptor -[hidden]-> EditStudentDescriptor
destroy EditStudentDescriptor

AutoGradeCommand --> AutoGradeCommand
deactivate AutoGradeCommand

create EditStudentCommand
AutoGradeCommand -> EditStudentCommand
activate EditStudentCommand

AutoGradeCommand <-- EditStudentCommand
deactivate EditStudentCommand

AutoGradeCommand -> EditStudentCommand : execute()
activate EditStudentCommand

AutoGradeCommand <-- EditStudentCommand
deactivate EditStudentCommand

EditStudentCommand -[hidden]-> EditStudentCommand
destroy EditStudentCommand

AutoGradeCommand -[hidden]-> AutoGradeCommand

end

AutoGradeCommand --> AutoGradeCommand
deactivate AutoGradeCommand

create CommandResult
AutoGradeCommand -> CommandResult
activate CommandResult

CommandResult --> AutoGradeCommand
deactivate CommandResult

AutoGradeCommand -> user : result
deactivate AutoGradeCommand


@enduml
Binary file added docs/diagrams/AutoGradeParserSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions docs/diagrams/AutoGradeParserSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":ModuLightParser" as ModuLightParser LOGIC_COLOR
participant ":AutoGradeCommandParser" as AutoGradeCommandParser LOGIC_COLOR
participant "a:AutoGradeCommand" as AutoGradeCommand LOGIC_COLOR
end box

[-> LogicManager : execute("autoGrade ...")
activate LogicManager

LogicManager -> ModuLightParser : parseCommand("autoGrade ...")
activate ModuLightParser

create AutoGradeCommandParser
ModuLightParser -> AutoGradeCommandParser
activate AutoGradeCommandParser

AutoGradeCommandParser --> ModuLightParser
deactivate AutoGradeCommandParser

ModuLightParser -> AutoGradeCommandParser : parse()
activate AutoGradeCommandParser

AutoGradeCommandParser -> AutoGradeCommandParser : mapToFloat()
activate AutoGradeCommandParser
AutoGradeCommandParser --> AutoGradeCommandParser
deactivate AutoGradeCommandParser

AutoGradeCommandParser -> AutoGradeCommandParser : checkAutoGradeType()
activate AutoGradeCommandParser
AutoGradeCommandParser --> AutoGradeCommandParser
deactivate AutoGradeCommandParser

create AutoGradeCommand
AutoGradeCommandParser -> AutoGradeCommand
activate AutoGradeCommand

AutoGradeCommand --> AutoGradeCommandParser : a
deactivate AutoGradeCommand

AutoGradeCommandParser --> ModuLightParser : a
deactivate AutoGradeCommandParser
AutoGradeCommandParser -[hidden]-> ModuLightParser
destroy AutoGradeCommandParser

ModuLightParser --> LogicManager : a
deactivate ModuLightParser

LogicManager -> AutoGradeCommand : execute()
activate AutoGradeCommand

AutoGradeCommand --> LogicManager : result
deactivate AutoGradeCommand

[<--LogicManager
deactivate LogicManager

@enduml
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

![Ui](images/Ui_navigate.png)

**AModuLight is a desktop student grades system application.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).
**A ModuLight is a desktop student grades system application.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).

* If you are interested in using ModuLight, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#Quick-start).
* If you are interested about developing ModuLight, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
Expand Down
Loading

0 comments on commit f629726

Please sign in to comment.