PROJECT: T.A.rence

I’m Kai Zhe, a student currently pursuing a major in Computer Science at the National University of Singapore(NUS).

Overview

T.A.rence is a class management system for teaching assistants in NUS. It tracks all classes taught by the TA and all relevant information pertaining to each class, such as upcoming events, student participation, assignment scores and the number of hours taught for each module.

Summary of contributions

Major Enhancement: added Model skeleton

Created models used in T.A.rence

  • Summary of the features:

    • Created most of the model classes used in the T.A.rence application (Modules, Tutorials, Students, Assignments, Attendance)

  • Justification:

    • The models form the backbone of the Application and defines the operations it can perform.

  • Highlights:

    • Many of the models are interdependent on each other, eg. deleting a Tutorial will also delete all the Students contained within it.

    • The interdependence, while useful feature-wise, also leads to high coupling and it was challenging to maintain consistency within the different models/data structures.

Added the ability for the user to import tutorials via an NUSMods shared url, mark/export attendance of students in a tutorial and CRUD features for Assignments and Events.

  • Summary of the features:

    • Enables the user to record and export students' attendance (Refer to the user guide below)

    • Enables the user to track tutorial assignments and students' performance

    • Enables the user to keep track of events(both past and upcoming) such as tutorials, exam dates, submission deadlines as well as hours logged for easier payment claims.

    • ImportTutorialsCommand makes use of NUSMods data to automatically import modules based on the NUSMods url. It does not require an internet connection.

  • Justification:

    • Tracking participation, tutorial assignments, upcoming events as well as compatibility with NUSMods are essential features that cater to any TA in NUS.

  • Highlights:

    • The user need only define the semester start date for the hours logged in a tutorial to be updated automatically. The application will determine the dates of completed tutorials from the current date, the semester start date to then calculate the hours logged by the TA.

    • The application relies on precached NUSMods data of all existing tutorials in AY 2019-2020, hence it does not rely on a internet connection. Even then, the loading of the all the data into T.A.rence at initialization is not too computationally/memory intensive, without significant lag. This is partly because extraneous elements (Lectures, Venues) have been filtered out in the cached data to reduce file size.

    • Retrieval of NUSMods tutorials after the initialization is also efficient since the cached data is loaded into a data structure of nested HashMaps that has keys in the following order: Module code, Semester, Lesson Type(Sectionals, Tutorials, Labs) and finally a unique ClassNo.

    • The primary challenge in implementing the importing of tutorials was ensuring the compatibility between the cached data and the Tutorial Class already defined in Application. This required delving into NUSMods data to understand the general structure of the JSON, as well as reading existing API documentation.

  • Credits:

    • NUS modules and tutorials data was retrieved from NUSMods database [NUSMods]

  • Minor enhancement:

    • Added ability for the user to enter multiple commands separated by the "+" delimiter in a single input (eg. command1 + command2 + command3)

  • Code contributed:

  • [Commits]

  • [Pull Requests]

  • [RepoSense Code Contribution Dashboard]

  • Other contributions:

    • Project management:

      • Added issues on Github for milestones, bugs

    • Documentation:

Contributions to the User Guide

Import tutorials via NUSMods url: import

Imports tutorials via NUSMods url. Does not require an internet connection.

Format: import [URL]

Example:

Command synonyms: importtutorials, importmods, importtutorial

Marks attendance of a tutorial markAttendance

Marks/Toggles attendance of a tutorial or a student.

Format:

  • markAttendance i/[TUTORIAL_INDEX] w/[WEEK]

  • markAttendance tn/[TUTORIAL_NAME] m/[MODULE_NAME] w/[WEEK] n/[STUDENT NAME]

  • WEEK is a positive integer between 1 to 13

Example:

  • markAttendance i/1 w/5

  • markAttendance n/John Doe tn/Lab 1 m/CS1010 w/5

Example of marking attendance of student: Inputting "markAttendance n/Mark tn/Lab Session m/CS1010S w/7" will toggle the attendance of Mark in tutorial of name "Lab Session" and the attendance table of the tutorial will be displayed accordingly.

MarkAttendance1
MarkAttendance2

Example of marking attendance of tutorial: When "markAttendance tn/Lab Session m/CS1010S w/7" is inputted, the application will prompt the user to mark/toggle the attendance of the first student in the tutorial.

MarkAttendance3

The user may input "y" or "n", after which the command will be executed/cancelled respectively and the application will prompt the user to mark the attendance of the next student.

MarkAttendance4

You can use either tutorial index or tutorial name with module code to specify the tutorial.
Specifying the student name marks/toggles the attendance of a student, otherwise the entire tutorial will have their attendance marked.

Command Synonyms: mark, marka, markatt

Exports attendance of a tutorial to csv exportAttendance

Exports attendance of a tutorial.

Format:

  • exportAttendance i/[TUTORIAL_INDEX] f/[FILENAME](Optional)

  • TUTORIAL_INDEX is a non-negative integer (>= 0)

Example:

  • exportAttendance tn/Lab 1 m/CS1010 f/exportedAttendance

You can use either tutorial index or tutorial name with module code to specify the tutorial.
The filename field is optional and the tutorial name will be specified as the filename by default.

  • E.g exportAttendance i/1 f/exportedAttendance

Command Synonyms: export, exporta, exportatt, exportattendance

Adding an Event : addEvent

Adds an Event to a Tutorial.

Format:

  • addEvent i/[TUTORIAL_INDEX] n/[EVENT_NAME] sd/[START_DATE] ed/[END_DATE]

Example:

  • addEvent i/1 n/Lab01 sd/09-11-2001 0000 ed/31-10-2019 2359

  • TUTORIAL_INDEX is a non-negative integer (>= 0)

  • START_DATE and END_DATE follows the format of dd-mm-yy hhmm e.g 31-10-2019 2359

You can specify the full tutorial name and module code instead of the index

  • This will be in the format:

  • tn/[TUTORIAL_NAME] m/[MODULE_CODE] n/[EVENT_NAME] sd/[START_TIME] ed/[END_TIME]

  • addEvent tn/Lab 1 m/CS1010 n/Lab01 sd/09-11-2001 0000 ed/31-10-2019 2359

Command synonyms: adde, addev, addevnt

Set start of semester : setSemStart

Sets the start date of the semester. Determines dates of tutorial Events.

Format: * setSemStart sd/[START_DATE] * START_DATE follows the format of dd-mm-yy e.g 31-10-2019

Example:

  • setSemStart sd/31-12-2001

Command synonyms: setsemstart, setst, setsem

Contributions to the Developer Guide

Model component

ModelClassDiagram
Figure 1. Structure of the Model Component

API : Model.java

The Model,

  • stores a UserPref object that represents the user’s preferences.

  • stores the Address Book data.

  • exposes an unmodifiable ObservableList<Student> that can be 'observed'

  • exposes an unmodifiable ObservableList<Tutorial> that can be 'observed'

  • exposes an unmodifiable ObservableList<Module> that can be 'observed'

  • does not depend on any of the other three components.

Mark Attendance feature

The MarkAttendance command lets T.A.rence mark the attendance of a specified student in a tutorial.

Implementation

The MarkAttendance command must include the following:

  • The week of the tutorial

  • Tutorial name

  • Module code

Alternatively, the index of the tutorial can be used in place of the tutorial name and module code. Optionally, the user can also choose to indicate the student’s name.

If the user uses both the indexing and full input format, the command will throw an error due to ambiguity.
  • The MarkAttendance command will also automatically be updated within the application’s storage system and the updated attendance will be reflected in the application’s GUI.

Below is an activity diagram showing the process of invoking the MarkAttendance command.

MarkAttendanceActivityDiagram

The MarkAttendanceCommand has two formats, the first with a student’s name specified and the other without. Specifying the student name will toggle the attendance of the student in the tutorial, while the other format will mark/toggle the attendance of the entire tutorial sequentially. For the second case, the application will prompt the user to mark/toggle the attendance of each student in the tutorial one by one. Errors will be thrown if the tutorial/module/student cannot be found, or if the week specified is invalid.

The sequence diagram below shows the interaction between the Logic componenents for marking the attendance of a single student.

MarkAttendanceSequenceDiagram

Entering the input will call the execute() method in LogicManager, which identifies the command as a MarkAttendanceCommand via ApplicationParser.parse(). MarkAttendanceCommand.parse() is then called to parse the input and extract the relevant information (tutorial name, module code, student name) which is used to initialize the MarkAttendanceCommand, which finally modifies the student’s attendance when executed.