Skip to content

Commit

Permalink
Merge pull request #246 from notnotmax/v1.5-ugdg2
Browse files Browse the repository at this point in the history
Formatting changes
  • Loading branch information
notnotmax authored Nov 7, 2024
2 parents bebdfa2 + f4a2afe commit 40b26f7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 12 deletions.
10 changes: 7 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1297,9 +1297,13 @@ testers are expected to do more *exploratory* testing.

1. Dealing with missing/corrupted data files

1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_

2. _{ more test cases …​ }_
1. If you encounter an unexpected empty TAHub (no students, consults or lessons) upon startup or your data
is replaced by sample data, your data file may be corrupted.
2. If you wish to try and salvage your data, **do not** perform any command yet. **This will overwrite your data.**
3. Copy your data file to make a safe backup first, and rename it something other than `addressbook`. You can open
this file to view your data in JSON format.
4. TAHub will generate a new data file with sample data. In the meantime, if you are experienced
with JSON, you can attempt to recover your data file by fixing issues in the file, usually syntax/formatting.

### Exporting data

Expand Down
12 changes: 6 additions & 6 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Examples:

Deletes the specified student from TAHub.

Format: `delete INDEX[;INDEX]...`
Format: `delete INDEX[;INDEX]`

* Deletes the student at the specified `INDEX`.
* The index refers to the index number shown in the displayed student list.
Expand Down Expand Up @@ -176,10 +176,11 @@ Displays a list of all consultations in TAHub.

Adds students to an existing consultation, specified by its index.

**Format**: `addtoconsult INDEX [n/NAME]... [i/INDEX]...`
**Format**: `addtoconsult INDEX [n/NAME] [i/INDEX]`

* `INDEX` specifies the consultation to add students to.
* Student names (`n/NAME`) and/or student indices (`i/INDEX`) can be used to specify students.
* Student names (`n/NAME`) and/or student indices (`i/INDEX`) can be used to specify students. At least one name or
index must be provided.
* Students already in the consultation will not be added again, and an error message will be shown.

**Examples**:
Expand All @@ -192,10 +193,9 @@ Adds students to an existing consultation, specified by its index.

Removes specified students from a consultation, identified by its index.

**Format**: `removefromconsult INDEX n/NAME...`
**Format**: `removefromconsult INDEX n/NAME [n/NAME]…`

* `INDEX` is the index of the consultation from which the students will be removed.
* Specify one or more students to remove by their names.

**Examples**:
* `removefromconsult 1 n/John Doe n/Harry Ng` (removes students named John Doe and Harry Ng from the 1st consultation)
Expand All @@ -206,7 +206,7 @@ Removes specified students from a consultation, identified by its index.

Deletes one or more consultations from TAHub by their indices.

**Format**: `deleteconsult INDEX[;INDEX]...`
**Format**: `deleteconsult INDEX[;INDEX]`

* `INDEX` specifies the consultation to delete. You can delete multiple consultations by separating indices with semicolons (`;`).

Expand Down
5 changes: 5 additions & 0 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedStudent
Class JsonAdaptedConsultation
Class JsonAdaptedLesson
Class JsonAdaptedCourse
Class JsonAdaptedStudentLessonInfo
}

}
Expand All @@ -40,7 +42,10 @@ JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedStudent
JsonSerializableAddressBook --> "*" JsonAdaptedConsultation
JsonSerializableAddressBook --> "*" JsonAdaptedLesson
JsonAdaptedStudent --> "*" JsonAdaptedCourse
JsonAdaptedConsultation --> "*" JsonAdaptedStudent
JsonAdaptedLesson --> "*" JsonAdaptedStudentLessonInfo
JsonAdaptedStudentLessonInfo --> "1" JsonAdaptedStudent

@enduml
Binary file modified docs/images/StorageClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.Messages.MESSAGE_INVALID_CONSULTATION_DISPLAYED_INDEX;
import static seedu.address.logic.parser.CliSyntax.PREFIX_INDEX;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;

import java.util.HashSet;
Expand Down Expand Up @@ -32,7 +33,7 @@ public class AddToConsultCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds students to the consultation identified "
+ "by the index number used in the displayed consultation list. "
+ "Parameters: INDEX (must be a positive integer) "
+ "[" + PREFIX_NAME + "NAME]...\n"
+ "[" + PREFIX_NAME + "NAME]… [" + PREFIX_INDEX + "INDEX]…\n"
+ "Example: " + COMMAND_WORD + " 1 n/John Doe n/Harry Ng";

public static final String MESSAGE_ADD_TO_CONSULT_SUCCESS = "Added students to the Consultation: %1$s";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DeleteConsultCommand extends Command {

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Deletes the consultation identified by the index number used in the displayed consultation list.\n"
+ "Parameters: INDEX (must be a positive integer) [;INDEX...]\n"
+ "Parameters: INDEX (must be a positive integer) [;INDEX]\n"
+ "Example: " + COMMAND_WORD + " 1" + DEFAULT_DELIMITER + "2";

public static final String MESSAGE_DELETE_CONSULT_SUCCESS = "Deleted Consult(s):\n%1$s";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package seedu.address.logic.commands.consultation;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;

import java.util.List;

Expand All @@ -25,7 +26,7 @@ public class RemoveFromConsultCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Removes students from the consultation identified by the index.\n"
+ "Parameters: CONSULT_INDEX (must be a positive integer) "
+ "NAME...\n"
+ PREFIX_NAME + "NAME [" + PREFIX_NAME + "NAME]…\n"
+ "Example: " + COMMAND_WORD + " 1 n/Alex Yeoh n/Harry Ng";

public static final String MESSAGE_REMOVE_FROM_CONSULT_SUCCESS =
Expand Down

0 comments on commit 40b26f7

Please sign in to comment.