Git Product home page Git Product logo

check-in's Introduction

Lab Assistant Manager

Overview

Provides a web-based interface for managing lab assistants. Allows TAs to configure seections for lab assistants to sign up for along with facilitating the check in process.

Branch Organization:

  • master - is the main branch, storing the current code all non-course specific features should be branched from.
  • cs61a - is the master branch for the CS61A course lab assistant manager instance.
  • cs61b - is the master branch for the CS61B course lab assistant manager instance.
  • data8 - is the master branch for the DATA8 course lab assistant manager instance.

How to contribute:

  • Fork the repository. If you are not used to github have a look at fork a repository
  • Create a branch either from master (or a specific course branch if this is a 1 course only feature).
  • Add your features and commit your desired changes.
  • Create a pull request detailing your changes creating pull requests.

Installation

  1. Set up VirtualBox, Vagrant & Homestead

    Download and install virtual box: https://www.virtualbox.org/wiki/Downloads

    Download and install vagrant: https://www.vagrantup.com/downloads.html

    Install the Homestead Vagrant Box: vagrant box add laravel/homestead

    Install Homestead

    cd ~
    git clone https://github.com/laravel/homestead.git Homestead
    # Clone the desired release...
    git checkout v6.1.0
    
    # If on Mac / Linux...
    bash init.sh
    
    # If on Windows...
    init.bat
    

    Update Homestead.yaml to point to where you are cloning this repo. E.g:

    folders:
        - map: ~/Projects/Check-In
          to: /home/vagrant/Code/Check-In
    
    sites:
        - map: la.local
          to: /home/vagrant/Code/Check-In/public
          php: "5.6"
    

    Append the following lines to after.sh:

    # Install MySQL Server, PHP 5.6 and required packages
    sudo apt update
    sudo apt install -y mysql-server php5.6-common php5.6-cli php5.6-curl php5.6-fpm php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
    
    # Use PHP5.6 as system default PHP
    sudo update-alternatives --set php $(which php5.6)
    
    # Change any PHP7 references in Nginx sites
    sudo sed -i -E 's/php7[.0-9]*?/php5.6/g' /etc/nginx/sites-available/*
    
    # Change PHP5.6 FPM to run under vagrant user (necessary for writing data to Check-In folder)
    sudo sed -i -e 's/www-data/vagrant/g' /etc/php/5.6/fpm/pool.d/www.conf
    
    # Reload config changes
    sudo service nginx restart
    sudo service php5.6-fpm restart
    
  2. Set up your hosts file

    You must add the "domains" for your Nginx sites to the hosts file on your machine. The hosts file will redirect requests for your Homestead sites into your Homestead machine. On Mac and Linux, this file is located at /etc/hosts. On Windows, it is located at C:\Windows\System32\drivers\etc\hosts. The lines you add to this file will look like the following:

    192.168.10.10  la.local
    

    Make sure the IP address listed is the one set in your Homestead.yaml file. Once you have added the domain to your hosts file and launched the Vagrant box you will be able to access the site via your web browser:

    http://la.local

  3. Set up environment variables

    cd ~/Projects/Check-In
    # Copy the example environment variable file to .env
    cp env.example .env
    # Edit .env as necessary
    vim .env # or with your editor of choice
    
  4. Start the Vagrant instance

    cd ~/Homestead
    vagrant up
    
  5. SSH into the Vagrant instance

    vagrant ssh
    # Set working directory to project location
    cd ~/Code/Check-In
    
  6. In SSH: Install dependencies using composer (PHP package manager)

    composer install
    
  7. In SSH: Run the database migrations

    php artisan migrate
    
  8. In SSH: Seed the database with initial values

    php artisan db:seed --class DefaultSettingsSeeder
    
  9. In SSH: Generate an application key

    php artisan key:generate
    
  10. Write the codestuffs

    Point your browser to http://la.local.

    Edit files in ~/Projects/Check-In as necessary

  11. Stop the VM when you're done working

    vagrant halt
    

Post-Installation

The next time you want to start working again, simply start the Vagrant instance again

vagrant up

And stop it when you're done

vagrant halt

If you change the sites or maps inside of Homestead.yaml you will need to run the following to update Vagrant:

vagrant reload --provision

Deployment

First point a git remote to the Dokku server (the example below is CS61A specific):

git remote add dokku [email protected]:la

To deploy from master:

git push dokku master

Deploy from another branch:

git push dokku my_branch:master

First Time Deployment

Note: These are deployment instructions to the CS61A managed Dokku platform. They should be generic enough to follow to deploy to your own Dokku instance however.

Tip: add alias dokku="ssh -t [email protected]" to your aliases file (e.g. ~/.bashrc).

dokku apps:create <app_name>
dokku checks:disable <app_name>
git remote add <app_name> [email protected]:<app_name>
dokku mysql:create <db_name>
dokku mysql:link <db_name> <app_name>

dokku config:set --no-restart <app_name> APP_ENV=prod APP_OAUTH_KEY=<oauth secret> COURSE_NAME=CS61A OK_COURSE_OFFERING="cal/cs61a/fa17"
git push <app_name> HEAD:master

dokku enter <app_name> web php artisan key:generate --no-interaction --no-ansi --show
dokku config:set --no-restart <app_name> APP_KEY=<key copied from key:generate command>

dokku enter <app_name> web php artisan migrate --force
dokku enter <app_name> web php artisan db:seed --class=DefaultSettingsSeeder --force

dokku checks:enable <app_name>
dokku ps:restart <app_name>

dokku domains:add <app_name> domain.cs61a.org
dokku letsencrypt <app_name>
# Change OK OAuth to allow the domain redirect URL

Note: when setting course offering, make sure it is exact. "cal/cs61a/fa17" is not the same as "cal/cs61a/fa17/"!

check-in's People

Contributors

chrononyan avatar colinschoen avatar dependabot[bot] avatar itsvs avatar mehrdadn avatar nicholasngai avatar pbitutsky avatar rahularya50 avatar sumukh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

check-in's Issues

"Remember me" login

Currently you have to log in to the app on every use. Since most people use this app from personal devices, I think having "remember me" be the default is a good idea.

Calendar Clicking Issue

Clicking on the date/time boxes should bring up calendar/timeslot popups. However, on many laptops (including my own and several AI's trying to check in), the popup immediately disappears after clicking on the date/time boxes. Safari seems to be fine, but this is a problem on Chrome

Security Audit

We should see if this actually needs to be a private repo; or if it contains any private info.

Section CSV Import use Type Names

Currently the documentation asks for the type name, but the import code is using the type ID which isn't clear. We should be using event type names in the import.

GSI Search

Allow user to start typing GSI name to more easily find it when there are a large number of GSIs.

Serve password fields over https

Firefox and chrome are now warning about GSI password fields over http, so we should switch to https. This would be easy with dokku

Allow TA to check in lab assistant from their user page

Currently, it seems that TAs can only check in lab assistants from the search screen via a button in the right-most column. (picture below)

Current LA Checkin

This button is a bit difficult to find. Also, sometimes the TA might want to check a lab assistant in after clicking on their user page from the search screen. It would be nice to include a Check In button on this screen as well:

screen shot 2018-09-09 at 11 14 07 pm

In lab assistant sign-in, only include current options

Reported by @kavigupta Cal-CS-61A-Staff/oh-queue#123

In the lab assistant sign-in, every possible combination of type/TA options is shown, an AI can choose, for example, Lab / Kavi during my office hours, even though I am not teaching a lab during that time.

It might be helpful if the Lab Assistant Manager only showed current options. An "other" field would also be required if, for example, someone was substituting for someone else.

Include User Hours and Unit Counts in CSV Export

Currently the following fields are included in the ta/downloads/roster CSV export.

  • Name
  • Email
  • GSI
  • Total # of Hours
  • Total # of Check ins
  • Created At

A course staff request involves adding the users units and hours values as well. These values are found on the User model.

Prevent Extra hours

  1. Prevent multiple checkins. Sometimes people write their passwords on the board, and AI's check themselves in multiple times.
  2. Prevent checking in for sections that give more hours. For example, some AI's checkin for guerrilla section (3hr) or lab (1.5hr) at office hour (1hr)
  3. Auto-update TA's secret word each week if he/she doesn't do so herself. Browsers save passwords, including on the AI console

Add URLs for each TA Console Module

TA Console modules should support direct access by specific URL:

E.g.

/ta/console/users
/ta/console/sections
/ta/console/settings

Forms can then redirect to these specific URLs to prevent users from having to constantly and manually navigate back to that module when performing multiple administrative actions.

Create anNOUNCEments tab

Integrate announcements/prep reminders into the AI console (similar to 61A website) so people don't get spammed by long Piazza emails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.