Skip to content

Commit

Permalink
Merge 6940639 into bd609cd
Browse files Browse the repository at this point in the history
  • Loading branch information
meisbokai committed Nov 12, 2018
2 parents bd609cd + 6940639 commit 78dda51
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 134 deletions.
207 changes: 101 additions & 106 deletions docs/DeveloperGuide.adoc

Large diffs are not rendered by default.

35 changes: 17 additions & 18 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif::[]

image::Banner.png[450,290]

ClassRepo is targeted at secondary school users who *prefer to use a desktop app for managing all their school related
ClassRepo is targeted at secondary school users who *prefer to use a desktop app for managing all their school-related
information*.
ClassRepo is *optimized for those who prefer to work with a Command Line Interface* (CLI). +

Expand Down Expand Up @@ -139,8 +139,8 @@ Format: `add NAME [p]p/PHONE_NUMBER [p]e/EMAIL [p]a/ADDRESS [t/TAG]...`

****
Words in `UPPER_CASE` are the parameters, items in `SQUARE_BRACKETS` are optional,
items with `...` after them can have multiple instances. Order of parameters are fixed. +
Put a `p` before the phone / email / address prefixes to mark it as `private`. `private` details can only
items with `...` after them can have multiple instances. Order of parameters is fixed. +
Put a `p` before the phone/ email/address prefixes to mark it as `private`. `private` details can only
be seen using the `viewall` command. +
Persons can have any number of tags (including 0).
****
Expand All @@ -165,7 +165,7 @@ Format: `list`
[[listall]]
==== Listing all persons (detailed view) : `listall` image:Tutor.png[16,16]
Displays all persons (showing all non-private details) in the address book as a list with index numbers. +
Format: `listall`
Format: `listall`

==== Finding all persons containing any keyword in their name: `find` image:Basic.png[16,16]

Expand Down Expand Up @@ -279,7 +279,7 @@ Example(s):

* `list` +
`addacc 1 JohnDoe1337 P455W0RD Admin` +
Adds an account with the username of `JohnDoe1337`, password of `P455W0RD` and privilege level of `Admin`
Adds an account with the username of `JohnDoe1337`, password of `P455W0RD` and privilege level of `Admin`
to the first person in the list.

==== Delete the account of a person: `deleteacc` image:Admin.png[16,16]
Expand Down Expand Up @@ -339,7 +339,7 @@ Adds an exam to the exam book, with the number of takers initialised as `0`. +
Format: `addexam [p]e/EXAM_NAME s/SUBJECT_NAME d/EXAM_DATE st/EXAM_START_TIME et/EXAM_END_TIME dt/EXAM_DETAILS`

****
Words in `UPPER_CASE` are the parameters, items in `SQUARE_BRACKETS` are optional. Order of parameters are fixed. +
Words in `UPPER_CASE` are the parameters, items in `SQUARE_BRACKETS` are optional. Order of parameters is fixed. +
Put a `p` before the exam name prefix to mark the exam as `private`.
****

Expand Down Expand Up @@ -376,7 +376,7 @@ Format: `editexam INDEX [p/PRIVATE_STATUS] [e/EXAM_NAME] [s/SUBJECT_NAME] [d/EXA
****
Edits the exam at the specified `INDEX`.
The index refers to the index number shown in the most recent exams listing.
Words in `UPPER_CASE` are the parameters, items in `SQUARE_BRACKETS` are optional. Order of parameters are fixed. At least 1 item in `SQUARE_BRACKETS` must be present.
Words in `UPPER_CASE` are the parameters, items in `SQUARE_BRACKETS` are optional. Order of parameters is fixed. At least 1 item in `SQUARE_BRACKETS` must be present.
****

[NOTE]
Expand Down Expand Up @@ -436,7 +436,7 @@ Deregisters the 2nd person in the address book for the 2nd exam in the exam book

==== Viewing exams : `viewexams` image:Basic.png[16,16]

View the exams for a specificied person in the address book. +
View the exams for a specified person in the address book. +
Format: `viewexams INDEX`

****
Expand Down Expand Up @@ -481,7 +481,7 @@ FEE must have the form of 2 decimal places +
DUE_DATE must have the form of DD-MM-YYYY

****
Words in `UPPER_CASE` are the parameters, the order of parameters are fixed.
Words in `UPPER_CASE` are the parameters, the order of parameters is fixed.
Fees are automatically marked as `private`. `private` details can only
be seen using the `viewall` command, or for fees specifically, the `viewfees` command.
Expand Down Expand Up @@ -583,7 +583,7 @@ Example(s):

* `addassess Mathematics final class test`

==== Listing all assessments : `listassess` image:Tutor.png[16,16]
==== Listing all assessments : `listassess` image:Basic.png[16,16]

Shows a list of all assessments in the address book, along with an index for each +
Format: `listassess`
Expand All @@ -599,7 +599,7 @@ The index refers to the index number shown in the most recent assessments listin

Example(s):

* `listassess` +
* `listassess` +
`deleteassess 1`

==== Adding grades to a person : `addgrades` image:Tutor.png[16,16]
Expand Down Expand Up @@ -641,7 +641,8 @@ Using `list` command

Example(s):

* `viewgrades 1` +
* `list` +
`viewgrades 1` +
The results will be displayed as a list of assessments the student has taken and their corresponding grades.

==== Deleting a grade : `deletegrades` image:Tutor.png[16,16]
Expand Down Expand Up @@ -696,15 +697,15 @@ If you change/ update grades after already generating a statistic, you must dele
statistics book to ensure that it is up to date.
====

==== Listing all statistics : `liststatistics` image:Tutor.png[16,16]
==== Listing all statistics : `liststatistics` image:Basic.png[16,16]

Shows a list of all statistics in the statistics book, along with an index for each +
Format: `liststatistics`

[NOTE]
====
If you delete an assessment after generating its statistics, this statistic will still remain in the statistics book. This
is to ensure that the school can maintain a record of all its statistics over time, if needed, even though the assessment
is to ensure that the school can maintain a record of all its statistics over time if needed, even though the assessment
may have ended and the grades are awarded to students. It is up to the school to decide how long they want to store their
statistics for.
====
Expand All @@ -727,7 +728,7 @@ Example(s):
// tag::attendance[]
=== Attendance Commands

Below are the commands that deals with attendance data:
Below are the commands that deal with attendance data:

==== Updates the attendance of a person: `attendance` image:Tutor.png[16,16]
Updates the attendance of the target person. +
Expand Down Expand Up @@ -808,7 +809,7 @@ Example(s):
`replaceAtten 1 d/29-09-2018 att/1` +
Replaces the attendance of the first person in the list as present for the date 29th September 2018.

=== Coming is v2.0:
==== Coming in v2.0:
==== Update multiple people attendance: `multiAtten` image:Tutor.png[16,16]
Updates the attendance of multiple people based on the list of index. +
Format: `multiAtten i/MULTIPLE_INDEX d/DATE att/ATTENDANCE`
Expand All @@ -828,8 +829,6 @@ Marks the attendance of the people with index 1, 2, 4 and 5 in the list as prese
* `list` +
`attendance i/0 d/0 att/0` +
Marks the attendance of everybody on the list as absent for today's date.


// end::attendance[]

== Saving the data
Expand Down
2 changes: 1 addition & 1 deletion docs/team/meisbokai.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In this project, I serve mainly as a Code Quality checker. Aside from the code q
*** Continuously updated the feature introduced by me (attendance): https://github.com/CS2113-AY1819S1-F10-1/main/pull/214[#214] | https://github.com/CS2113-AY1819S1-F10-1/main/pull/209[#209] | https://github.com/CS2113-AY1819S1-F10-1/main/pull/2126[#126] | https://github.com/CS2113-AY1819S1-F10-1/main/pull/68[#68]
*** Wrote additional tests for existing features to increase coverage: https://github.com/CS2113-AY1819S1-F10-1/main/pull/214[#214] | https://github.com/CS2113-AY1819S1-F10-1/main/pull/209[#209] | https://github.com/CS2113-AY1819S1-F10-1/main/pull/2126[#126] | https://github.com/CS2113-AY1819S1-F10-1/main/pull/68[#68]
** Documentation:
*** Reviewed grammar and spelling for UG and DG: https://github.com/CS2113-AY1819S1-F10-1/main/pull/209[#209]
*** Reviewed grammar and spelling for UG and DG: https://github.com/CS2113-AY1819S1-F10-1/main/pull/270[#270]| https://github.com/CS2113-AY1819S1-F10-1/main/pull/209[#209]
** Community:
*** PRs reviewed (with non-trivial review comments): https://github.com/CS2113-AY1819S1-F10-1/main/pull/221[#221]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ReplaceAttendanceCommand extends IndexFormatCommand {
public static final String COMMAND_WORD = "replaceAtten";
public static final String MESSAGE_USAGE = COMMAND_WORD + ":\n"
+ "Replaces the pre-existing attendance of a student. \n"
+ "Parameters: indexOfPerson d/dd-mm-yyyy att/attendance \n"
+ "Parameters: INDEX d/DD-MM-YYYY att/ISPRESENT \n"
+ "\tExample: " + COMMAND_WORD + " " + "1 d/29-09-2018 att/1 \n"
+ "\tTo input today's date, input d/0";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class UpdateAttendanceCommand extends IndexFormatCommand {
public static final String COMMAND_WORD = "attendance";
public static final String MESSAGE_USAGE = COMMAND_WORD + ":\n"
+ "Updates the attendance of a student. \n"
+ "Parameters: indexOfPerson d/dd-mm-yyyy att/attendance \n"
+ "Parameters: INDEX d/DD-MM-YYYY att/ISPRESENT \n"
+ "\tExample: " + COMMAND_WORD + " " + "1 d/29-09-2018 att/1 \n"
+ "\tTo input today's date, input d/0";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ViewAttendanceDateCommand extends Command {
public static final String COMMAND_WORD = "viewAttenDate";
public static final String MESSAGE_USAGE = COMMAND_WORD + ":\n"
+ "Views the attendance of the date. \n"
+ "Parameters: d/date \n"
+ "Parameters: d/DD-MM-YYYY \n"
+ "\tExample: " + COMMAND_WORD + " " + "d/28-10-2018";
public static final String MESSAGE_SUCCESS = "Attendance for the given date, ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ViewAttendancePersonCommand extends IndexFormatCommand {
public static final String COMMAND_WORD = "viewAttenPerson";
public static final String MESSAGE_USAGE = COMMAND_WORD + ":\n"
+ "Views the attendance of a student. \n"
+ "Parameters: indexOfStudent \n"
+ "Parameters: INDEX \n"
+ "\tExample: " + COMMAND_WORD + " " + "1";

public static final String MESSAGE_SUCCESS = "Attendance for student, ";
Expand Down
12 changes: 7 additions & 5 deletions src/seedu/addressbook/parser/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ private Command prepareUpdateAttendance(String args) {
matcher.group("date"),
isPresentBool);
} catch (NumberFormatException nfe) { //do the most specific catch on top
return new IncorrectCommand(nfe.getMessage());
return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
UpdateAttendanceCommand.MESSAGE_USAGE));
} catch (java.text.ParseException pe) {
return new IncorrectCommand(MESSAGE_DATE_CONSTRAINTS);
} catch (IllegalValueException ive) {
Expand Down Expand Up @@ -612,12 +613,12 @@ private Command prepareReplaceAttendance(String args) {
matcher.group("date"),
isPresentBool);
} catch (NumberFormatException nfe) { //do the most specific catch on top
return new IncorrectCommand(nfe.getMessage());
return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
ReplaceAttendanceCommand.MESSAGE_USAGE));
} catch (java.text.ParseException pe) {
return new IncorrectCommand(MESSAGE_DATE_CONSTRAINTS);
} catch (IllegalValueException ive) {
return new IncorrectCommand(MESSAGE_DATE_CONSTRAINTS + MESSAGE_DATE_CONSTRAINTS
+ ReplaceAttendanceCommand.MESSAGE_USAGE);
return new IncorrectCommand(MESSAGE_DATE_CONSTRAINTS + ReplaceAttendanceCommand.MESSAGE_USAGE);
}

}
Expand All @@ -637,7 +638,8 @@ private Command prepareViewAttendance(String args) {
final int targetIndex = parseInt(matcher.group("targetIndex"));
return new ViewAttendancePersonCommand(targetIndex);
} catch (NumberFormatException nfe) { //do the most specific catch on top
return new IncorrectCommand(nfe.getMessage());
return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
ViewAttendancePersonCommand.MESSAGE_USAGE));
}
}

Expand Down

0 comments on commit 78dda51

Please sign in to comment.