Skip to content

Commit

Permalink
Merge branch 'master' into fix-help-window-bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica2828 authored Nov 7, 2024
2 parents 2ab4a77 + ac3a8b2 commit 9b0cec4
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 55 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@

# EduContacts

**EduContacts** is a desktop application designed for **tertiary teachers and educators** to manage contacts with
**EduContacts** is a desktop application designed for **tertiary teachers and educators** to manage contacts with
students, parents, and faculty across multiple classes or educational years.

- It is optimized for those who prefer to work with a **Command Line Interface** (CLI) while still having the
- It is optimized for those who prefer to work with a **Command Line Interface** (CLI) while still having the
- benefits of a **Graphical User Interface** (GUI).
- It helps educators keep communication organized, track academic progress, and support parent-teacher interactions
- It helps educators keep communication organized, track academic progress, and support parent-teacher interactions
- efficiently, often across large groups.

## Value Proposition

An address book tailored for educators simplifies student and parent contact management, enhances communication
An address book tailored for educators simplifies student and parent contact management, enhances communication
tracking, and integrates progress reports, helping teachers save time and foster effective collaboration across the school community.

## Features

- **Class/Group-Based Contact Management**: Organize contacts by class, subject, or school year for easy access.
- **Parent-Teacher Communication Tracking**: Keep a history of messages or meetings with parents and faculty.
- **Student Progress and Grade Tracking**: Link contact information with student records and academic performance.
- **Event Scheduling and Reminders**: Integrate with school calendars to manage parent-teacher meetings,
- **Event Scheduling and Reminders**: Integrate with school calendars to manage parent-teacher meetings,
report deadlines, or school events.
- **Group Messaging**: Enable teachers to send messages to an entire class or group of parents at once,
- **Group Messaging**: Enable teachers to send messages to an entire class or group of parents at once,
streamlining communication.
- **Custom Fields**: Add notes for individual students (e.g., learning accommodations,
- **Custom Fields**: Add notes for individual students (e.g., learning accommodations,
behavioral issues, or special needs).
- **Integration with School Management Systems**: Sync with platforms like Google Classroom or
- **Integration with School Management Systems**: Sync with platforms like Google Classroom or
school LMS (Learning Management Systems).

## Getting Started
Expand Down
31 changes: 15 additions & 16 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ All these, including the `MainWindow`, inherit from the abstract `UiPart` class
classes that represent parts of the visible GUI.

The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that
are in the `src/main/resources/view` folder. For example, the layout of the
[`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java)
are in the `src/main/resources/view` folder. For example, the layout of the
[`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java)
is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)

**The `UI` component,**
Expand All @@ -107,7 +107,7 @@ is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3
* listens for changes to `Model` data so that the UI can be updated with the modified data.
* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands.
* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.

#### `CommandHistory` Integration

The `CommandHistory` class, located in `seedu.address.ui.util`, is responsible for tracking user-entered commands.
Expand Down Expand Up @@ -158,8 +158,8 @@ How the parsing works:
The `Model` component,

* stores the contact data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
* a `Person` object stores `StudentId`, `Name`, `Address`, `Phone`, `Email`, `Role`, `Course` objects.
* contains an ArrayList of `Module` objects which is optional.
* a `Person` object stores `StudentId`, `Name`, `Address`, `Phone`, `Email`, `Role`, `Course` objects.
* contains an ArrayList of `Module` objects which is optional.
* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList<Person>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
* is intentionally designed to be independent of other components (e.g., UI, Logic, Storage) to maintain a clean separation of concerns. This ensures that the Model layer is solely responsible for managing data and that data structures make sense on their own. This independence enables easier maintenance, testing, and adaptability of the data structures, as changes in one component (e.g., UI) do not affect the Model.
Expand Down Expand Up @@ -562,7 +562,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
* 2b1. EduContacts overwrites the old grade with the new grade.

Use case ends.

**Use case: UC08 - Add contacts of next-of-kins of a student**

**MSS**
Expand Down Expand Up @@ -668,7 +668,7 @@ testers are expected to do more *exploratory* testing.

1. Download the jar file and copy into an empty folder.

2. Double-click the jar file.<br>
2. Double-click the jar file.<br>
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

2. Saving window preferences
Expand Down Expand Up @@ -698,17 +698,17 @@ testers are expected to do more *exploratory* testing.
2. Deleting a person while only one person is being shown

1. Prerequisites: Filter persons using the `filter` command until only one person remains. Multiple persons in the list. Person that remains has Student ID `12345678`. One person in the list has Student ID `11111111`

2. Test case: `delete 12345678`<br>
Expected: Person with Student ID `12345678` is deleted. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated. List of persons shown is now blank.

3. Test case: `delete 11111111`<br>
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.

3. Deleting a person while no persons are in the list

1. Prerequisites: Delete all persons in the list using the `clear` command.

2. Test case: `delete 12345678`<br>
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.

Expand All @@ -719,7 +719,7 @@ testers are expected to do more *exploratory* testing.
1. Dealing with missing data files

1. To simulate a missing file, in the same folder as the jar file, navigate to the `data` folder and delete the `address.json` file in the folder.

2. Launch EduContacts by double-clicking the jar file.<br>
Expected: EduContacts is populated by a set of default list of persons. A new `address.json` file will be created in the `data` folder after closing the app or executing a command.

Expand All @@ -744,10 +744,10 @@ _{to work on in the future}_

* Description: Allow users to move inactive or irrelevant entries to an archive.
* Benefits:
* Reduces clutter in the main data set, making it easier to manage and navigate active records without losing historical data.
* Lower the load on real-time data processing by isolating inactive records.
* Retain archived data for historical records or compliance requirements.
* Provide a safe way to store inactive data without risking deletion or loss.
* Reduces clutter in the main data set, making it easier to manage and navigate active records without losing historical data.
* Lower the load on real-time data processing by isolating inactive records.
* Retain archived data for historical records or compliance requirements.
* Provide a safe way to store inactive data without risking deletion or loss.

### Importing contact data

Expand All @@ -767,4 +767,3 @@ _{to work on in the future}_
* Enable users to share their contact lists with others.
* Allow users to organize and manipulate their contact data externally.
* Help users comply with data export regulations or organizational policies.

45 changes: 29 additions & 16 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# EduContacts User Guide

<br>
<br>

EduContacts is a **desktop app for Educators in Tertiary Institution to manage contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps. For educators who may be less experienced with command-based tools, EduContacts also includes user-friendly and intuitive features and guidance, making it accessible for all users.

Expand All @@ -25,6 +25,7 @@ EduContacts is a **desktop app for Educators in Tertiary Institution to manage c
- [Listing students by certain attributes : `filter`](#listing-students-by-certain-attributes-filter)
- [Adding a module to a student: `module`](#adding-a-module-to-a-student-module)
- [Deleting a person : `delete`](#deleting-a-person-delete)
- [Finding a person: `find`](#finding-a-person--find)
- [Clearing all entries : `clear`](#clearing-all-entries-clear)
- [Exiting the program : `exit`](#exiting-the-program-exit)
3. [FAQ](#faq)
Expand Down Expand Up @@ -57,7 +58,7 @@ EduContacts is a **desktop app for Educators in Tertiary Institution to manage c
```bash
cd ~/Desktop/EduContacts
```

and use the following command to run the application:

```bash
Expand All @@ -71,17 +72,17 @@ EduContacts is a **desktop app for Educators in Tertiary Institution to manage c
1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.<br>
Some example commands you can try:

```bash
list
```bash
list
```
Lists all contacts.

```bash
```bash
add 12345678 n/John Doe p/99999999 e/[email protected] a/123 Jane Doe Road c/Computer Science t/Student
```
```
Adds a contact named `John Doe` to EduContacts.
```bash

```bash
delete 12345678
```
Deletes a student contact with StudentID `12345678`.
Expand All @@ -107,6 +108,9 @@ EduContacts is a **desktop app for Educators in Tertiary Institution to manage c

**Notes about the command format:**<br>

* All command words should be in lowercase.


* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br>
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.

Expand All @@ -127,7 +131,7 @@ EduContacts is a **desktop app for Educators in Tertiary Institution to manage c
Shows a message explaining how to access the help page.

Format:
```bash
```bash
help
```
![help message](images/helpMessage.png)
Expand All @@ -141,7 +145,7 @@ Alternatively, you can click the button on the top right hand corner as indicate

Adds a person contact to the EduContacts.

Format:
Format:
```bash
add ID n/NAME p/PHONE e/EMAIL a/ADDRESS c/COURSE r/ROLE
```
Expand All @@ -158,7 +162,7 @@ Examples:

Shows a list of all persons in EduContacts.

Format:
Format:
```bash
list
```
Expand Down Expand Up @@ -233,7 +237,7 @@ filter [KEYWORD_PREFIX] [MORE_KEYWORDS]
* **For filtering by Course:**

* Use prefix `c/`
* Partial matching is supported, but the first keyword must match the beginning of the course name.
* Partial matching is supported, but the first keyword must match the beginning of the course name.
e.g `Engineer` will match courses like "Engineering" but not "Civil Engineering".

<box type="tip" seamless>
Expand All @@ -243,11 +247,20 @@ filter [KEYWORD_PREFIX] [MORE_KEYWORDS]

Examples:
* ```filter n/John``` returns `john` and `John Doe`
* `filter m/CS2103T` returns a list of all students with module CS2103T.
* `filter m/CS2103T` returns a list of all students with module CS2103T.
* `filter c/Computer Science` returns a list of all students with course Computer Science.<br>
* `filter n/alex david` returns `Alex Yeoh`, `David Li`

![result for 'find alex david'](images/filterAlexDavidResult.png)
<br>

<box type="info" seamless>

**Note:** After using `filter`, only the persons displayed in the filtered list can be edited or deleted, and persons not shown in this truncated list cannot be modified.

To return to display the full list of persons, use `list` command.

</box>

<div style="page-break-after: always;"></div>

Expand All @@ -270,7 +283,7 @@ Examples:

Deletes the specified person from EduContacts.

Format:
Format:
```bash
delete ID
```
Expand All @@ -292,15 +305,15 @@ Format: `find ID`
* Finds student with the specified `ID`.

Examples:
* `find 12345678` will find student contact with `ID: 12345678` and display their details.
* `find 12345678` will find student contact with `ID: 12345678` and display their details

<div style="page-break-after: always;"></div>

### Clearing all entries : `clear`

Clears all entries from EduContacts.

Format:
Format:
```bash
clear
```
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class Messages {

public static final String MESSAGE_UNKNOWN_COMMAND = "Unknown command";
public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format! \n%1$s";
public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX = "The person index provided is invalid";
public static final String MESSAGE_INVALID_PERSON_DISPLAYED_STUDENTID = "The person studentID provided is invalid";
public static final String MESSAGE_INVALID_PERSON_DISPLAYED_STUDENTID =
"No student with this Student ID is currently being displayed";
public static final String MESSAGE_PERSONS_LISTED_OVERVIEW = "%1$d persons listed!";
public static final String MESSAGE_DUPLICATE_FIELDS =
"Multiple values specified for the following single-valued field(s): ";
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/seedu/address/logic/commands/DeleteCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public class DeleteCommand extends Command {
+ "Parameters: "
+ "ID\n"
+ "or: "
+ "ID MODULE_KEYWORD"
+ "ID MODULE_KEYWORD\n"
+ "Example: " + COMMAND_WORD + " "
+ "12345678"
+ "12345678\n"
+ "or: " + COMMAND_WORD + " "
+ "12345678 m/CS2103T";

public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Student: %1$s";
public static final String MESSAGE_DELETE_MODULE_SUCCESS = "Deleted Module: %1$s";

public static final String MESSAGE_PERSON_NOT_FOUND = "No student is found with Student ID: %1$s";
public static final String MESSAGE_PERSON_NOT_FOUND =
"No student with Student ID: %1$s is currently being displayed";
public static final String MESSAGE_MODULE_NOT_FOUND = "No module is found for this student: %1$s";
private final StudentId studentId;
private final Module module;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class FindCommand extends Command {
+ "12345678";

public static final String MESSAGE_FIND_PERSON_SUCCESS = "Found Student: %1$s";
public static final String MESSAGE_PERSON_NOT_FOUND = "No student is found with Student ID: %1$s";
public static final String MESSAGE_PERSON_NOT_FOUND =
"No student with Student ID: %1$s is currently being displayed";
private final StudentId studentId;

/**
Expand Down
25 changes: 19 additions & 6 deletions src/main/java/seedu/address/logic/parser/FilterCommandParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

import seedu.address.logic.commands.FilterCommand;
import seedu.address.logic.parser.exceptions.ParseException;
Expand All @@ -27,6 +28,7 @@ public class FilterCommandParser implements Parser<FilterCommand> {
public FilterCommand parse(String args) throws ParseException {
ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_MODULE, PREFIX_COURSE);

argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_NAME, PREFIX_MODULE, PREFIX_COURSE);
validateArguments(argMultimap);

if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
Expand All @@ -42,27 +44,38 @@ public FilterCommand parse(String args) throws ParseException {

private void validateArguments(ArgumentMultimap argMultimap) throws ParseException {
if (!argMultimap.getPreamble().isEmpty()
|| argMultimap.getValue(PREFIX_NAME).isPresent()
&& argMultimap.getValue(PREFIX_NAME).get().isEmpty()
|| argMultimap.getValue(PREFIX_MODULE).isPresent()
&& argMultimap.getValue(PREFIX_MODULE).get().isEmpty()
|| argMultimap.getValue(PREFIX_COURSE).isPresent()
&& argMultimap.getValue(PREFIX_COURSE).get().isEmpty()) {
|| (argMultimap.getValue(PREFIX_NAME).isPresent()
&& argMultimap.getValue(PREFIX_NAME).get().isEmpty())
|| (argMultimap.getValue(PREFIX_MODULE).isPresent()
&& argMultimap.getValue(PREFIX_MODULE).get().isEmpty())
|| (argMultimap.getValue(PREFIX_COURSE).isPresent()
&& argMultimap.getValue(PREFIX_COURSE).get().isEmpty())) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FilterCommand.MESSAGE_USAGE));
}

long prefixCount = Stream.of(PREFIX_NAME, PREFIX_MODULE, PREFIX_COURSE)
.filter(prefix -> argMultimap.getValue(prefix).isPresent())
.count();

if (prefixCount > 1) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FilterCommand.MESSAGE_USAGE));
}
}

private FilterCommand createFilterCommandByName(ArgumentMultimap argMultimap) {
assert argMultimap.getValue(PREFIX_NAME).isPresent() : "PREFIX_NAME should be present";
List<String> nameKeywords = Arrays.asList(argMultimap.getValue(PREFIX_NAME).get().split("\\s+"));
return new FilterCommand(new NameContainsKeywordsPredicate(nameKeywords));
}

private FilterCommand createFilterCommandByModule(ArgumentMultimap argMultimap) {
assert argMultimap.getValue(PREFIX_MODULE).isPresent() : "PREFIX_MODULE should be present";
String moduleKeyword = argMultimap.getValue(PREFIX_MODULE).get();
return new FilterCommand(new ModuleContainsKeywordsPredicate(moduleKeyword));
}

private FilterCommand createFilterCommandByCourse(ArgumentMultimap argMultimap) {
assert argMultimap.getValue(PREFIX_COURSE).isPresent() : "PREFIX_COURSE should be present";
List<String> courseKeywords = Arrays.asList(argMultimap.getValue(PREFIX_COURSE).get().split("\\s+"));
return new FilterCommand(new CourseContainsKeywordsPredicate(courseKeywords));
}
Expand Down
Loading

0 comments on commit 9b0cec4

Please sign in to comment.