/timesheet

This project is designed to work as a time tracker for FIRST robotics teams. Once installed, it can be displayed on a lab computer and students can sign in and out to track their hours.

Primary LanguageRuby

Project Intent

This project is designed to work as a time tracker for FIRST robotics teams. Once installed, it can be displayed on a lab computer and students can sign in and out to track their hours. We suggest using a barcode/barcode scanner for the user id etc. It makes the sign in/out process very quick. (Hint: your local grocery store rewards card probably has one!)

Licensing

This work can be reused and modified by teams but may not be sold. Credit must be given to the original author and any changes must be released under similar licencing.

#Live Example There is a live example running on heroku at http://frctimesheet.herokuapp.com/. The admin user is "admin@900.com" with a password of "zebracorns". An example student user is "test@900.com" with a password of "zebra".

Feel free to create new users and timelogs etc. Please do NOT delete or modify these two users.

Statistics/Reporting

Statistics reporting has been implemented in a series of graphs.

Note: For mentors, we suggest setting up a school titled "Mentor". This way you can differentiate between student hours and mentor hours.

The graphs availlable are: Stats By Week:

  • Total Hours Per School Per Week
  • Average Hours Per Student Per School Per Week
  • Total Hours Per Week
  • Cumulative Hours
Stats By School:
  • Total Hours Per School
  • Average Hours Per Student Per School
  • Number of Students Per School

Forms

Forms allows you to add student requirements. They could be (but are not limited to) tool use forms, liability waivers, permission slips, or training on a specific machine. Anything which can have a "yes" or a "no" per student.

Screenshots

The Homepage (Administrators view) Homepage

The Sign-In Page Homepage

A graph representing the total hours per week. Each school has a different line. Homepage

A graph representing the average hours per week. Each school has a different line and it's the total hours/student count. Homepage

A graph representing the average hours per school. It's the total hours/student count. Homepage

A graph representing the number of students per school. Homepage

Installing/Running

Prerequisites

  • PostgreSQL
  • Ruby on Rails 5.1.4

Heroku Setup

I suggest using heroku to host it. It's free (as long as you use no more than 1 thread a month), it allows access from any computer, and has postgres and RoR installed by default.

To install on heroku:

  1. Pull from git run this command in the command line:
$ git clone [repository url]
Note: The repository url can be found on the side of the github page
  1. Modify code/settings to fit your needs
  2. Push to Heroku
  3. Migrate the DB to Heroku: heroku run rake db:migrate

Install elsewhere

I highly suggest that you install it someplace with remote access. That way time requirements can be checked from anywhere.

  1. Install Ruby on Rails (I suggest http://rvm.io/)
  2. Install PostgreSQL (http://www.postgresql.org/)
  3. Pull down the code and set it up
$ git clone [repository url]
$ cd timesheet
$ bundle install
Note: The repository url can be found on the side of the github page
  1. Modify code/settings to fit your needs (you should probably modify config/database.yml to password protect your database)
  2. Start the server
$ rails server -p [port] -e production
Note: This app uses the default rails server, you probably want to switch to thin, passenger or unicorn for better options and stability. Heroku has this by default
Note: By default rails uses port 3000, that would make the url on a local machine localhost:3000 by default websites normally run on 80 (http) or 443 (https). Some machines don't allow servers open on these ports and Apache or custom routing tables can be used.

Misc. Features

Messages

You can leave messages for students which will appear in both their profile and on the login page when they sign in/out. Several color options are available. Messages can be found under the "Users" menu

Hour Exceptions

This allows students to enter their reasons for missing requirements, facilitating communication. Once the hours are made up, admins can mark them as such and the requirements pages will show the requirements as met.

Changing settings

There are some settings which can be changed to adapt this for your team. These can be found in lib/constants.rb

The hour requirements settings can be overridden by creating year specific hour requirements in the App. You can find the links under "Timelogs > Hour Requirements" If no value is put in one of those fields, it will assume there is no requirement for that attribute.

Timezone

Description
The time zone associated with the times. It will determine what times show up, when the end of the day is, etc.
Variable
self.TimeZone
Default
Eastern Standard Time
Modification
Change the string to one of the approved rails timezones.

Last Out

Description
The last possible time to sign out for the day. If a record isn't signed out by then, only 1 minute is credited for the day.
Variable
DAY_END
Default
1 am
Modification
Change the 1 to correspond with the number of hours after midnight to cut off

Build Season Meetings Required

Description
The minimum number of meetings required from a student during build season. This is used in the student view. Will show true/false >based on meeting the different criteria
Variable
BUILD_MEETINGS
Default
2 Meeting
Modification
Change the 2 to the number of meetings required

Pre Season Meetings Required

Description
The minimum number of meetings required from a student during build season. This is used in the student view. Will show true/false >based on meeting the different criteria
Variable
PRE_MEETINGS
Default
1 Meeting
Modification
Change the 2 to the number of meetings required

Default Login

Description
A signin email which shows only student login page. Allows a computer to be set up and not monitored without giving access to student data.
Variable
DEFAULT_LOGIN
Default
"signup@team900.org"
Modification
Change the string to the email of an account. (Must register account in system)

Team Name

Description
The team's name.
Variable
TEAM_NAME
Default
"Zebracorns"
Modification
Change the string to the team name.

Team Number

Description
A string representing the team's number. Shows up on the home screen.
Variable
TEAM_NUMBER
Default
"900"
Modification
Change the string to representing the team's number.

School/Group Descripter

Description
A string representing the main "grouping" of students. Could be school, group, team, division, or any other descriptor your team uses.
Variable
SCHOOL_NAME_REPLACEMENT
Default
"School"
Modification
Change the string to representing the team's main organizational unit.

Freshman Hours

Description
An integer representing the required hours for freshman.
Variable
FRESHMAN_HOURS
Default
6
Modification
Change the integer to be your required hours for freshman.

Sophomores Hours

Description
An integer representing the required hours for sophomores.
Variable
SOPHOMORE_HOURS
Default
8
Modification
Change the integer to be your required hours for sophomores.

Junior Hours

Description
An integer representing the required hours for juniors.
Variable
JUNIOR_HOURS
Default
10
Modification
Change the integer to be your required hours for juniors.

Senior Hours

Description
An integer representing the required hours for senior.
Variable
SENIOR_HOURS
Default
10
Modification
Change the integer to be your required hours for senior.

Leadership Hours

Description
An integer representing the required hours for leadership students.
Variable
LEADERSHIP_HOURS
Default
15
Modification
Change the integer to be your required hours for leadership students.

Preseason Hours

Description
An integer representing the required hours for preseason.
Variable
PRE_HOURS
Default
25
Modification
Change the integer to be your required hours for preseason.

Build Season Maximum Flex Hours

Description
The default number of flex hours given per year. If set to 0, these panels are hidden from students. Flex hours are hours which don't need to be made up, they can be used when students have tests, sickness, etc. They must be submitted before the week is over.
Variable
FLEX_HOURS
Default
15 Hours
Modification
Change the 15 to the number of flex hours per year (0 to disable feature)

Initial Creation

You now need to be sure that you create "years" before a season starts. A year consists of a start date, end date, and build season start date. The time logs are associated with these years as are the statistics.

Timezones

  • UTC -11:00

    • American Samoa
    • International Date Line West
    • Midway Island
  • UTC -10:00

    • Hawaii
  • UTC -09:00

    • Alaska
  • UTC -08:00

    • Pacific Time (US & Canada)
    • Tijuana
  • UTC -07:00

    • Arizona
    • Chihuahua
    • Mazatlan
    • Mountain Time (US & Canada)
  • UTC -06:00

    • Central America
    • Central Time (US & Canada)
    • Guadalajara
    • Mexico City
    • Monterrey
    • Saskatchewan
  • UTC -05:00

    • Bogota
    • Eastern Time (US & Canada)
    • Indiana (East)
    • Lima
    • Quito
  • UTC -04:30

    • Caracas
  • UTC -04:00

    • Atlantic Time (Canada)
    • Georgetown
    • La Paz
    • Santiago
  • UTC -03:30

    • Newfoundland
  • UTC -03:00

    • Brasilia
    • Buenos Aires
    • Greenland
  • UTC -02:00

    • Mid-Atlantic
  • UTC -01:00

    • Azores
    • Cape Verde Is.
  • UTC +00:00

    • Casablanca
    • Dublin
    • Edinburgh
    • Lisbon
    • London
    • Monrovia
    • UTC
  • UTC +01:00

    • Amsterdam
    • Belgrade
    • Berlin
    • Bern
    • Bratislava
    • Brussels
    • Budapest
    • Copenhagen
    • Ljubljana
    • Madrid
    • Paris
    • Prague
    • Rome
    • Sarajevo
    • Skopje
    • Stockholm
    • Vienna
    • Warsaw
    • West Central Africa
    • Zagreb
  • UTC +02:00

    • Athens
    • Bucharest
    • Cairo
    • Harare
    • Helsinki
    • Istanbul
    • Jerusalem
    • Kyiv
    • Pretoria
    • Riga
    • Sofia
    • Tallinn
    • Vilnius
  • UTC +03:00

    • Baghdad
    • Kuwait
    • Minsk
    • Nairobi
    • Riyadh
  • UTC +03:30

    • Tehran
  • UTC +04:00

    • Abu Dhabi
    • Baku
    • Moscow
    • Muscat
    • St. Petersburg
    • Tbilisi
    • Volgograd
    • Yerevan
  • UTC +04:30

    • Kabul
  • UTC +05:00

    • Islamabad
    • Karachi
    • Tashkent
  • UTC +05:30

    • Chennai
    • Kolkata
    • Mumbai
    • New Delhi
    • Sri Jayawardenepura
  • UTC +05:45

    • Kathmandu
  • UTC +06:00

    • Almaty
    • Astana
    • Dhaka
    • Ekaterinburg
  • UTC +06:30

    • Rangoon
  • UTC +07:00

    • Bangkok
    • Hanoi
    • Jakarta
    • Novosibirsk
  • UTC +08:00

    • Beijing
    • Chongqing
    • Hong Kong
    • Krasnoyarsk
    • Kuala Lumpur
    • Perth
    • Singapore
    • Taipei
    • Ulaan Bataar
    • Urumqi
  • UTC +09:00

    • Irkutsk
    • Osaka
    • Sapporo
    • Seoul
    • Tokyo
  • UTC +09:30

    • Adelaide
    • Darwin
  • UTC +10:00

    • Brisbane
    • Canberra
    • Guam
    • Hobart
    • Melbourne
    • Port Moresby
    • Sydney
    • Yakutsk
  • UTC +11:00

    • New Caledonia
    • Vladivostok
  • UTC +12:00

    • Auckland
    • Fiji
    • Kamchatka
    • Magadan
    • Marshall Is.
    • Solomon Is.
    • Wellington
  • UTC +13:00

    • Nuku'alofa
    • Samoa
    • Tokelau Is.