Giter Site home page Giter Site logo

mterwill / office-hours-help-queue Goto Github PK

View Code? Open in Web Editor NEW
84.0 5.0 21.0 1.63 MB

A queue to help manage office hours for large courses

License: GNU General Public License v3.0

Ruby 51.00% JavaScript 26.62% CSS 0.94% HTML 17.42% Dockerfile 0.23% Shell 3.75% Procfile 0.04%
classroom office-hours education course-management

office-hours-help-queue's Introduction

office-hours-help-queue

Build Status

A help queue for office hours written in Ruby on Rails. The frontend uses Semantic UI. We use Action Cable to manage WebSockets.

Documentation

Queue documentation is maintained on the GitHub Wiki for this project.

Anyone can make changes to the wiki, so please feel free to improve it.

Contributing

Pull requests are welcome. There are quite a few open issues. If you are developing something that is not already an open issue, please open one.

Development

You will need Docker installed.

script/setup

The app should now be accessible at http://127.0.0.1:3000.

office-hours-help-queue's People

Contributors

annieli555 avatar cameron-gagnon avatar cerubins avatar dependabot[bot] avatar josherick avatar mayakhanna4 avatar miloath avatar mterwill avatar pl98 avatar sbuttar avatar

Stargazers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

office-hours-help-queue's Issues

First user to login should be global admin

When the concept of a global admin comes about, instead of shimming a user into the database like we do in the README now, just make the first user of an instance the global admin and let them delegate from there.

Handle themes folder

Semantic UI has a themes folder currently in vendor/assets/stylesheets/themes, but this doesn't get compiled in prod. I moved it manually for now. Can we commit it to public/assets? Will that get overwritten?

Frontend refactor

Right now the code's simple enough that my hacky frontend code is working. Might be worth investigating using something more robust, or at the very least factoring some stuff out into more reusable components.

Ability to pin people to the queue

I'm often going through a queue and want to circle back to someone, or leave them on so I can get their email for my reference, but don't want other TAs to call them. It would be nice to pin someone to your queue.

On the backend I think it'd be sufficient to just set resolver but not resolved_at.

Add Travis

Add Travis to the repository once the backend test suite coverage is fixed and improved.

User entry clears on Ajax event

If I'm typing to add myself to the queue and someone else joins, when they pop into the queue the textboxes clear themselves, losing what I've written :(

Support semesters

Right now each course has no notion of a semester.

Adding this notion is important if we are going to provide any sort of robust tracking/analytics.

Clear invalid user cookies

If the db gets reset and a user has a persisted cookie in their browser, you have to go manually clear the cache. It looks like we can do this server-side upon not finding a user by using cookies.delete :user_id, but it doesn't work on a first shot. The method does return a value, though...

Restrict to only one open request per person

Right now the frontend prevents more than one request per person, but the backend will allow it.

If there are eventually per-course/per-queue configurations, this would be nice to be able to set.

Forms should handle errors

Right now MySQL enforces constraints, they're not in rails, nor do the forms render errors nicely on the admin side. There aren't really any forms on the user-facing side.

Intermittent loading lapses

I've noticed on rare occasions that the data continues to spin and lot load. I haven't been able to track down the root cause but would like to note it here.

Move templates to folder

classroom-help-queue/app/views/course_queues/ is littered with templates. Move them to a folder and extract shared ones to another shared folder.

CourseQueueOnlineInstructors deleted when offline

There is an is_online column in the database for CourseQueueOnlineInstructor, however right now they are simply being destroyed when going offline. This was to make it easier to determine active queues (we just join now), and simpler to begin as a whole.

However, I'd like to begin collecting data on on/offline instructors (and when they came on/offline) so we can eventually use this data. Not presently sure of the best way to go about it.

I'm now realizing the is_online column is probably useless, and we can go ahead and drop it when looking at #6.

Handle empty state

The landing page needs to better display an empty state both for when there are no classes and when there are no open queues.

Need admin interface

Right now everything has to be created manually in the database. It'd be great to get an admin interface, or at least for instructors to be able to create new queues for courses they admin.

WebSocket error messages

Probably has something to do with the nginx reverse proxy. I think it's set to /cable right now and this looks like it's requesting /cable/.

I, [2016-09-06T06:20:10.861752 #8714]  INFO -- : [348838b5-29a6-4cf5-a2cc-5d639ed8b364] Finished "/cable/" [WebSocket] for 68.40.195.218 at 2016-09-06 06:20:10 +0000
I, [2016-09-06T06:20:11.480329 #8714]  INFO -- : [e18ef3c3-f311-4e30-b434-8e030e78fa31] Started GET "/cable" for 68.40.195.218 at 2016-09-06 06:20:11 +0000
I, [2016-09-06T06:20:11.481667 #8714]  INFO -- : [e18ef3c3-f311-4e30-b434-8e030e78fa31] Started GET "/cable/" [WebSocket] for 68.40.195.218 at 2016-09-06 06:20:11 +0000
E, [2016-09-06T06:20:11.481819 #8714] ERROR -- : [e18ef3c3-f311-4e30-b434-8e030e78fa31] Request origin not allowed: null
E, [2016-09-06T06:20:11.481960 #8714] ERROR -- : [e18ef3c3-f311-4e30-b434-8e030e78fa31] Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)

Course password to promote to instructor

Instead of instructors having to manually add everyone, it'd be nice if you could just have a password and give them that so they could promote themselves. Like Gradescope's code thing.

Create documentation

Documentation needs to be created:

  • README
    • Deployment information (might be cool to get a "deploy to Heroku" setup)
    • Dev environment setup
    • Bootstrapping users, courses, etc.
  • CONTRIBUTING

Queue JS loaded on landing page

E, [2016-09-06T07:18:40.917335 #9551] ERROR -- : Could not execute command from {"command"=>"subscribe", "identifier"=>"{\"channel\":\"QueueChannel\"}"}) [ActiveRecord::RecordNotFound - Couldn't find CourseQueue with 'id'=]: /home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-5.0.0.1/lib/active_record/core.rb:173:in `find' | /home/deploy/eecshelp/app/channels/queue_channel.rb:5:in `subscribed' | /home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.1/lib/action_cable/channel/base.rb:236:in `block in subscribe_to_channel' | /home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call' | /home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'

Show estimated wait time

It'd be super cool to calculate some historical stats (maybe since the queue has been open today would be a good measure) and then use them to calculate and display to the user an estimated wait time based on their position in the queue.

Course index page

root should just redirect_to /courses and courses should list the courses, then drill down to queues. The LandingController functionality can be migrated and removed.

Standardize jbuilder/json

Right now it's a mix of the two, and I'm using User::PROTECTED_FIELDS to exclude sensitive data. As far as I know there's no great way to handle this, but it'd be worth looking into more.

Docker compose fails

✔ ~/Development/um/eecs.help [master|✔]
01:08 $ docker-compose up -d
Creating network "eecshelp_default" with the default driver
Building web
Step 1 : FROM ruby:2.3.1
2.3.1: Pulling from library/ruby
357ea8c3d80b: Pull complete
52befadefd24: Pull complete
3c0732d5313c: Pull complete
855820c72656: Pull complete
79b1403edee4: Pull complete
816e8b50d36d: Pull complete
5e35b3ade062: Pull complete
0fa708653111: Pull complete
Digest: sha256:6da2268270168527a72962ef1a83fff5fbdf6c0c672e8f39c4b10e027ca1e858
Status: Downloaded newer image for ruby:2.3.1
 ---> e0f509c5f9ee
Step 2 : RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
 ---> Running in 8b86e8cf4732
Reading package lists...
Building dependency tree...
Reading state information...
libpq-dev is already the newest version.
The following extra packages will be installed:
  dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libc-ares2 libdpkg-perl libfakeroot
  libfile-fcntllock-perl libtimedate-perl libv8-3.14.5
Suggested packages:
  debian-keyring
The following NEW packages will be installed:
  build-essential dpkg-dev fakeroot libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-ares2 libdpkg-perl
  libfakeroot libfile-fcntllock-perl libtimedate-perl libv8-3.14.5 nodejs
0 upgraded, 13 newly installed, 0 to remove and 19 not upgraded.
Need to get 4910 kB of archives.
After this operation, 12.5 MB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ jessie/main libc-ares2 amd64 1.10.0-2 [76.7 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main libtimedate-perl all 2.3000-2 [42.2 kB]
Get:3 http://httpredir.debian.org/debian/ jessie/main libdpkg-perl all 1.17.27 [1075 kB]
Get:4 http://httpredir.debian.org/debian/ jessie/main dpkg-dev all 1.17.27 [1548 kB]
Get:5 http://httpredir.debian.org/debian/ jessie/main build-essential amd64 11.7 [7114 B]
Get:6 http://httpredir.debian.org/debian/ jessie/main libfakeroot amd64 1.20.2-1 [44.7 kB]
Get:7 http://httpredir.debian.org/debian/ jessie/main fakeroot amd64 1.20.2-1 [84.7 kB]
Get:8 http://httpredir.debian.org/debian/ jessie/main libalgorithm-diff-perl all 1.19.02-3 [51.7 kB]
Get:9 http://httpredir.debian.org/debian/ jessie/main libalgorithm-diff-xs-perl amd64 0.04-3+b1 [12.2 kB]
Get:10 http://httpredir.debian.org/debian/ jessie/main libalgorithm-merge-perl all 0.08-2 [13.5 kB]
Get:11 http://httpredir.debian.org/debian/ jessie/main libfile-fcntllock-perl amd64 0.22-1+b1 [36.4 kB]
Get:12 http://httpredir.debian.org/debian/ jessie/main libv8-3.14.5 amd64 3.14.5.8-8.1 [1269 kB]
Get:13 http://httpredir.debian.org/debian/ jessie/main nodejs amd64 0.10.29~dfsg-2 [648 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 4910 kB in 5s (819 kB/s)
Selecting previously unselected package libc-ares2:amd64.
(Reading database ... 21156 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.10.0-2_amd64.deb ...
Unpacking libc-ares2:amd64 (1.10.0-2) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.17.27_all.deb ...
Unpacking libdpkg-perl (1.17.27) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.17.27_all.deb ...
Unpacking dpkg-dev (1.17.27) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_11.7_amd64.deb ...
Unpacking build-essential (11.7) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../libfakeroot_1.20.2-1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.20.2-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1_amd64.deb ...
Unpacking fakeroot (1.20.2-1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../libalgorithm-diff-perl_1.19.02-3_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.02-3) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-3+b1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-3+b1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../libalgorithm-merge-perl_0.08-2_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-2) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-1+b1_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-1+b1) ...
Selecting previously unselected package libv8-3.14.5.
Preparing to unpack .../libv8-3.14.5_3.14.5.8-8.1_amd64.deb ...
Unpacking libv8-3.14.5 (3.14.5.8-8.1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_0.10.29~dfsg-2_amd64.deb ...
Unpacking nodejs (0.10.29~dfsg-2) ...
Setting up libc-ares2:amd64 (1.10.0-2) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libdpkg-perl (1.17.27) ...
Setting up dpkg-dev (1.17.27) ...
Setting up build-essential (11.7) ...
Setting up libfakeroot:amd64 (1.20.2-1) ...
Setting up fakeroot (1.20.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libalgorithm-diff-perl (1.19.02-3) ...
Setting up libalgorithm-diff-xs-perl (0.04-3+b1) ...
Setting up libalgorithm-merge-perl (0.08-2) ...
Setting up libfile-fcntllock-perl (0.22-1+b1) ...
Setting up libv8-3.14.5 (3.14.5.8-8.1) ...
Setting up nodejs (0.10.29~dfsg-2) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.19-18+deb8u4) ...
 ---> 8cb653f29147
Removing intermediate container 8b86e8cf4732
Step 3 : RUN mkdir /usr/src/eecshelp
 ---> Running in f2a94a30a0af
 ---> 3c53256c1702
Removing intermediate container f2a94a30a0af
Step 4 : WORKDIR /usr/src/eecshelp
 ---> Running in eaa1cbb8410d
 ---> e4af43121023
Removing intermediate container eaa1cbb8410d
Step 5 : ADD Gemfile /usr/src/eecshelp/Gemfile
 ---> e41b8c2b65a0
Removing intermediate container e0b9eb49c302
Step 6 : ADD Gemfile.lock /usr/src/eecshelp/Gemfile.lock
 ---> 0d7818add9c0
Removing intermediate container 8abac2bc7337
Step 7 : RUN bundle install
 ---> Running in 37e4573d833b
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Installing rake 11.2.2
Installing concurrent-ruby 1.0.2
Installing i18n 0.7.0
Installing minitest 5.9.0
Installing thread_safe 0.3.5
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile2 2.1.0
Installing pkg-config 1.1.7
Installing rack 2.0.1
Installing nio4r 1.2.1 with native extensions
Installing websocket-extensions 0.1.2
Installing mime-types-data 3.2016.0521
Installing arel 7.1.1
Installing byebug 9.0.5 with native extensions
Installing coffee-script-source 1.10.0
Installing execjs 2.7.0
Installing method_source 0.8.2
Installing thor 0.19.1
Installing debug_inspector 0.0.2 with native extensions
Installing multipart-post 2.0.0
Installing ffi 1.9.14 with native extensions
Installing hashie 3.4.4
Installing multi_json 1.12.1
Installing jwt 1.5.4

Bundler::GemspecError: Could not read gem at /usr/local/bundle/cache/libv8-3.16.14.15-x86_64-linux.gem. It may be corrupted.
Installing rb-fsevent 0.9.7
Installing multi_xml 0.5.5
Installing mysql2 0.4.4 with native extensions
Installing puma 3.6.0 with native extensions
Using bundler 1.12.5
Installing redis 3.3.1
Installing ref 2.0.0
Installing sass 3.4.22
Installing tilt 2.0.5
Installing spring 1.7.2
Installing sqlite3 1.3.11 with native extensions
Installing tzinfo 1.2.2
Installing nokogiri 1.6.8 with native extensions
Installing rack-test 0.6.3
Installing sprockets 3.7.0
Installing websocket-driver 0.6.4 with native extensions
Installing mime-types 3.1
Installing coffee-script 2.4.1
Installing uglifier 3.0.2
Installing faraday 0.9.2
Installing rb-inotify 0.9.7
Installing omniauth 1.3.1
An error occurred while installing libv8 (3.16.14.15), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.16.14.15'` succeeds before bundling.
ERROR: Service 'web' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 5
✘-1 ~/Development/um/eecs.help [master|✔]
01:14 $

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.