Coder Social home page Coder Social logo

student-queue's People

Contributors

shadow53 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

student-queue's Issues

Replace HTML files with JS constructors?

I had a thought: I have to do an amount of parsing the URL client-side in the HTML files in order to make things link up and work correctly. If I were to instead make a JavaScript template that takes a couple of parameters for each page, I could just put the values I need directly in there without doing any client-side parsing. This may or may not make things easier - I'll have to see. Leaving this here so in remember later though

Possible backend change to something more secure

JavaScript isn't exactly known for being a secure language. There isn't necessarily much secure information to intercept, but that doesn't mean that the program shouldn't be as secure as reasonably possible.

With this in mind, perhaps I should look into rewriting the backend in another language - which would mean reimplementing the websockets on the frontend as well. Given that this program is currently running on my own server hosted by A Small Orange, compatible languages are:

Things I should also keep in mind:

  • I have a little amount of experience in PHP and Python and none in Ruby
    • Though Ruby I hear is easy to learn and understand

Add Postgres Backend

Just a reminder. Currently running Solus Linux and they have Postgres in the repos but not MySQL or MariaDB. So to test on localhost, will need a Postgres backend. Good for testing the issue with listing them as optional dependencies.

Database backends should be listed as Peer Dependencies

According to the NPM docs, it seems like a peerDependency is one that is optional but recommended to have. Adding the backend wrappers to this would make it so that the end user can choose which one they are using rather than have one forced upon them.

Need tests

Yup. Tests are a terrific thing that this project does not yet have. It should, because there have been a couple of times I thought I had everything fixed and, well, I did not :/

Looking at the NPM docs, any testing frameworks should be put in the devDependencies key in package.json, so that they are not brought in when it is being used as part of a larger project.

I've looked a little at Mocha and Chai, as well as Chai-As-Promised to add Promise support to Chai.

HTTPS does not work in Firefox

Ran into an issue where my server running https would fail to connect while localhost would connect fine, finally figured out it was due to loading websockets over WSS. It appears to be an issue in Firefox only, as Chromium seems to load and work fine.

The related Mozilla Bugzilla issue is 1187666. The apparent solution is to load the websocket application directly (not sure if this applies) and accept the certificate. This is a valid certificate on this site however, and Firefox does not throw any invalid certificate errors on other pages, so unless websockets use the default ssl certificate (The shared server's one, which is not in my hostname) instead of the one installed to the site, this should not be happening.

Perhaps fixing issue #1 will fix this issue as well. Until then, HTTPS will need to use Chrome(ium) or maybe IE, or load with HTTP.

Cookies

Basically, if I refresh the teacher or admin pages, I have to type the password in again. I know nothing of setting cookies or the like, but perhaps there would be a way of providing authentication cookies for that particular page.

Plus: if the cookie for the queue admin page authenticates you for the teacher page as well, but not the other way around.

Ability to back up student requests for archival purposes?

Given that the intent behind this application is a real-time way to have students request help on in-class assignments, should there be an option included to have the requests archived? What use would this be to teachers?

I suppose it would be useful to have for teachers who have students who struggle a lot in class and want a record of what problems the student has had.

Transition from most Sockets to request/response by expressjs

After looking more at expressjs request/response, I don't know why I was implementing so much in sockets that would be better as GET/POST requests. Therefore, basically everything but adding/removing help requests - so logging in and anything on an admin page - should be done with request/response, whether through forms or $.ajax().

Teacher Login has "Authorize" and "Login" Buttons

The dialog box has multiple buttons, one placed by HTML ("Authorize") and the other by jQuery UI ("Login"). I need to get rid of one of these and, if I keep the Login button, make it try to log in. Right now it does nothing.

Add Configuration Page

Basically adding a configuration page where the teacher can set options in the future, once different options are available.

No/badly written "home" page

Like the title says. I've implemented a basic home page that allows students to type in the name of a queue and it will try to take them there. It is badly written in that it does no error checking of any kind and, when submitting an empty input field multiple times, you can get something like: http://localhost:3000/////////////////

However I am not sure where to take this and I want to get a home page out there on this next release, so it will have to work for now. I will leave this issue open for further edits.

Invalid requests cause errors

When the user submits bad data, invalid password, goes to an invalid page, or does something that returns a 40x or 50x HTTP status code, either nothing shows up or the page displays something like:

Cannot METHOD /path.

There should be pages that handle the most common 40x and 50x codes and will be sent to the user instead of just the status code and automatically handle things as necessary, either through automatic redirection or giving a link(s) to click.

If at all possible, any invalid GET request should return a "page not found" page instead of just "Cannot GET /path". I am not sure how well this will work with the dynamic modifying of paths, however.

Site Admin page is blank when no queues exist

Basically, if no queues exist then the default "tab" should be the "Add New Queue" one. There's nothing to manage if none exist and having a user make that extra click is kinda stupid.

Server does not display an error when createConfigTable fails

If database permissions are not set up correctly, causing the db.createConfigTable() function to fail, the server still attempts to load the server. The site home page loads, but nothing else does.

If there is a database error, it should display the database error or at least the fact that there was an error - probably using the ErrorPage constructor.

Add ability to log in as student

This will have to be addressed when I figure out cookies most likely, but if I can implement a login system for students - even Google/Facebook login - then I can do more cool stuff involving listing who is connected to the server for teachers, autofilling name field in the help request page, and more personalization for students.

Multiple classrooms per server instance

Now that most of the features are in place for a basic queue system, the next logical step is to consider scaling outward by allowing one installation to hold multiple queues. There are a few things to be done first to make this attainable:

  • Create a configuration page - perhaps a global and a per-queue page.
  • Implement a better way of keeping track of existing requests - perhaps using MongoDB or a similar database. While I'm at it, it would be smart to keep track of which requests were given in what order so that the server can accurately inform the students of what position they are in the list.

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.