User Tools

Site Tools


TODO List for Varsity Tutors App

Statement of Work

Questions for Chuck

  • Stick w/ $10-$30 ($5 increments) for distance surcharge, or go to $1 increments?
  • Have Chuck verify our new method of accounting for credits versus dollars.


Milestone 1/2 Fixes

  • Add model validations as appropriate.
  • Need to show model errors in flash when unable to validate.
    • Fixed (hopefully) for users/create, but need a more general solution.
  • ClientProfile needs more fields.
    • distance_surcharge (default, can be changed per session)

Milestone 3

  • VERIFY sessions/new functionality.
    • When submitted, reduces client's remaining credits.
      • If credits remaining ⇐ 2 sessions, emails client and manager.
    • Default to today and add jQuery date picker. (CRAIG)
  • ADD sessions/edit functionality.
    • Make sure only managers or owning tutor can edit sessions
    • Make sure credits are issued back if duration or client changes.

Milestone 4

  • CLEANUP client/home (2 hr)
    • Show remaining credit – in dollars and number of sessions.
    • Link to payment page.
    • Link to user/edit to change password or email.
    • Link to list of previous tutoring sessions.
      • Show 'info for client' for each, as well as other details.
    • Info about remaining credit.
      • Should include credit rate, as rates vary.
    • Show names and contact info (email, phone #) for each assigned tutor.
    • Show client's default distance surcharge.
  • ADD tutor/home (4 hr)
    • List of most recent sessions, the pay for each, and PAID status.
    • Total amount due to them.
    • Total amount they've earned, total and per month.
  • CLEANUP tutors/index (managers only) (3 hr)
  • CLEANUP manager/home (2 hr)
    • Access to lists of clients, tutors, etc.
  • ADD tutors/adjust_workload (3 hr)
    • Field to enter (or select) desired number of hours per week.
    • Field to tell us if they want more or less work.
    • Will email admins when form is submitted.

Milestone 5

  • Adjust navigation menu items as appropriate (see meeting notes) (CRAIG)
  • ADD location/list, location/edit, location/add (managers only) (2 hr)
  • MODEL Client Payments (2 hr)
  • MODEL Tutor Payments (2 hr)
  • client/pay (2 hr)
    • Make payments via PayPal.
    • Email admins?
  • client/pay?client= (managers only) (1 hr)
    • Managers can accept client payments by phone.
  • client/signup_and_pay (1 hr)
    • Combined 1-step signup plus pay for hours.
  • tutor/pay (managers only) (6 hr)
    • Provides list of all tutors that need to be paid, and amount for each.
      • Looks at tutoring sessions that have been entered, but not paid.
    • Buttons to mark each tutor as paid, all at a given location, or all.
    • When buttons are pushed, sessions get marked as paid.
      • And tutors' payment record gets updated.
  • client/add_hours (manager only)
    • Manager can give away available hours to clients.
    • Limited to 5 hours added.
  • SETUP Migration of client hours (CRAIG)
    • Pull client hours from Excel spreadsheet into database.

Milestone 6

  • MODEL AuditEvent
  • Add auditing to existing actions
    • Will record following events:
      • tutor/add, tutor/edit, tutor/assign, tutor/pay
      • client/pay
      • session/add, session/add_multi, session/edit
    • Each event will include date/time, current user, data changed.
      • Data changed will come from Rails' model "changed".
  • New action: manager can refund money to a client.
    • Manager can view current dollar balance.
    • Manager can have refund them up to the current balance.
    • Will need to go through PayPal to do the refund.
    • Will need to figure out how PayPal does refunds and credits.
      • Do we need the initial charge confirmation #?
      • Can we credit them partial?
      • Can we credit them for multiple charges?
  • New functionality: on client signup page, verify that they've read policies. (0.5 hr)
    • Include a link to policies page, suggest they read it.
    • Make them check the box saying they've read the policies.
  • NEW: Allow admin to change rates.


  • Move stuff up to Rails-Base.
  • Move rspec custom matchers to separate file, and include it in specs and stories. (CRAIG)
  • Should be able to do user.roles « 'manager' and user.roles.to_s should convert the Roles to strings.
    • Similar for location (or wherever we end up putting that field).
  • User#name and similar should delegate to the Tutor/ClientProfile.
  • Should User#activated and User#suspended be merged into a single 'status' field?
  • Extract the restful_authentication stuff out of the User model, into a plugin.
    • Then just include ResftulAuthentication::UserModel to get all the functionality
    • Perhaps fork the existing resftul_authentication plugin, or create resftul_authentication_hacks
  • Extract the RoleRequirement stuff out of the User model, into a plugin?
    • It only has HABTM :roles and the has_role? method.
  • Delete SessionController#logout
  • Can we somehow modify routing so that we can use user_path in views/session/new instead of session_path?

Handling Client Accounts

Each client will have an account that will keep track of the pre-paid tutoring sessions and available cash. The account will be credited and debited using transactions. The current balance will be calculated by summing up the transactions.

Transaction Events

The following events will cause transactions to be created.

Purchasing Tutoring Units

The client may purchase tutoring credits. A credit transaction associated with the purchase will be created in the client's account.

Receiving Tutoring

The client will receive a tutoring session. A debit transaction with the number of units tutored plus any distance surcharge will be created in the client's account.

Manager Refund

The manager may refund dollars or tutoring units to a client. A credit transaction with the number of units or dollars refunded will be created in the client's account.

PayPal Refund

The client may receive a refund to his PayPal account. A debit transaction with the dollars refunded will be created in the client's account.

Transaction Description

A transaction will have a date, description and an associated event (see above). The transaction will also have one or more splits. Each split will have a number of fields described below.

Transaction Split Fields

  • Item type
    • ACT/SAT Tutoring
    • Subject Tutoring
    • Cash
  • Unit type
    • 15 minute tutoring unit
    • dollar
  • Price per unit
  • Number units
    • Credit - positive number
    • Debit - negative number

Creating Transactions for Tutoring Sessions

When a client receives a tutoring session, his account will be debited the number of units received plus any distance surcharge. Since the distance surcharge is billed in dollars, there needs to be enough cash in the client's account to cover it. If the client does not have enough cash, enough of his pre-paid tutoring units will be "sold" to cover the shortfall. Any remaining cash will be credited back to the client's account.

Tutoring Session Transaction Example

Before the tutoring session, the client has in his account:

  • 10 subject tutoring units @ $5 each
  • 3 subject tutoring units @ $6 each
  • no cash

The client receives a subject tutoring session that last 1 hour (4 units) and has a distance surcharge of $8.

The transaction would look like this:

8/19Subject TutoringTutoring Session for Bob on 8/19

The transaction splits would look like this:

Item typeUnit typePrice per unitNumber units
Subject Tutoring15 minute tutoring unit$5-4
Subject Tutoring15 minute tutoring unit$6-2

After the tutoring session, the client has in his account:

  • 6 subject tutoring units @ $5 each
  • 1 subject tutoring units @ $6 each
  • $4 cash
varsity/todo.txt · Last modified: 2012/12/10 22:41 (external edit)