Skip to content

Commit

Permalink
Merge pull request #196 from Lee-Juntong/UGDG
Browse files Browse the repository at this point in the history
UGDG as well as the problem with selfStudy
  • Loading branch information
Lee-Juntong authored Nov 9, 2020
2 parents f7e1afb + a676556 commit 11c3e34
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This gives the application both simplicity and speed, setting it apart from othe
* [Clear events](#clear-events)
* [Mark event as done](#mark-event-as-done)
* [Reminder of deadlines](#reminder-of-deadlines)
* [Repeat of events](#repeat-of-events)
* [FAQs](#FAQ)
* [Command Summary](#command-summary)

Expand Down Expand Up @@ -243,6 +244,15 @@ Format: `reminder`
Example Output:
![reminder](diagrams/reminder.png)

### Repeat of events
Repeat the selected event for several weeks, or repeat all classes this week for several weeks.

Format: `repeat INDEX NUMBER_OF_WEEKS` OR `repeat all NUMBER_OF_WEEKS`

Example Output:
![Repeat1](diagrams/repeat1.png)
![Repeat2](diagrams/repeat2.png)


## FAQ

Expand Down
Binary file added docs/diagrams/repeat1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/diagrams/repeat2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/java/event/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public boolean isDone() {
*
* @return returns a tick if the Event is done, and returns a cross if the Event is not done.
*/
public String getStatusIcon() {
public String getStatus() {
return (isDone ? "Done" : "Not Done");
//return tick or X symbols
}
Expand All @@ -86,7 +86,7 @@ public String getStatusIcon() {
* @return the common part for Event, Assignment, Class.
*/
public String toString() {
return "[" + getStatusIcon() + "]" + description;
return "[" + getStatus() + "]" + description;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/event/SelfStudy.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public SelfStudy(String description, OnlineLocation location, LocalDateTime at,
* @return the string required in a certain format.
*/
public String toString() {
return "[S]" + super.toString() + " (at: " + at.format(DateTimeFormatter.ofPattern("yyyy/MM/dd HH':'mm")) + ")"
return "[S]" + "[" + getStatus() + "]" + description + " (at: " + at.format(DateTimeFormatter.ofPattern(
"yyyy/MM/dd HH':'mm")) + ")"
+ (end != null ? "\n(end at: " + end.format(DateTimeFormatter.ofPattern("yyyy/MM/dd HH':'mm")) + ")" :
"")
+ "\n" + (location != null ? location : link);
Expand Down

0 comments on commit 11c3e34

Please sign in to comment.