Code Monkey home page Code Monkey logo

crlstime's People

Contributors

71c avatar derp7777 avatar dougmcg avatar maxtkc avatar medfordengineering avatar minilegobuilder avatar psvenk avatar scornman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crlstime's Issues

Cookies for lunch

Add the capability for the app to use cookies to remember which lunch the user has set, and set the schedule to that lunch when the app is next opened. Default to A lunch.

CRLSTime has no license, which is a very bad thing

CRLSTime has no license as of now. Because everything that is eligible for copyright in the United States (this includes software) is automatically copyrighted with an "All Rights Reserved" license (i.e. no one except for the copyright holder has permission to do anything with the copyrighted work), people cannot legally do anything to CRLSTime except for the permissions given in GitHub's Terms of Service (just viewing and forking the repository, but downloading the code or modifying it are illegal). For more information, see https://choosealicense.com/no-permission/.

Because CRLSTime is a community effort, I see no tangible loss for us from giving members of the general public the rights to download, study, and modify the code. The code is already open to the public on GitHub, but it is not free/libre software or open-source. I propose that we adopt a license that grants these rights to everyone (possibly under certain conditions) and is widely adopted (so that people in the free/libre and open-source software community will be familiar with the license and will not be deterred from contributing to the project).

Some of the most popular licenses can be found at https://choosealicense.com/. The licenses mainly differ on the conditions under which people are given the aforementioned rights, with permissive licenses granting them to anyone and copyleft licenses granting them under the condition that anyone who modifies the code and distributes the modified version must keep it under the same license.

Streamline schedules (do this first)

Right now, we have the clock read from one hard-coded schedule. What we need to do is streamline how it reads the schedule. We will make them lists of nested lists (With each block, e.g. [[8,05,0],[9,25,0],[9,29,0],etc]) and have it read from a schedule list where we can change which list it reads from (e.g. func(list1) --> func(list2)). Once this is done and we can hard-code what the schedules will be (xblock1, xblock2, xblock3, confrenceEarly (no blocks 1-2), conferenceLate (no blocks lunch-3-4), etc). After this, we will move on to how the schedules will be changed.

Up next

At a feature to the clock somewhere that displays what's coming up next on the schedule (only relevant if there is some part of the school day up next).

Time zone differences are not taken into account

I know that this is a pretty low-priority issue, but time zone differences are not taken into account. This means that if it is 2:00 PM local time but it is 3:00 PM Eastern Time, CRLSTime will show the current period as "4" instead of showing a regular clock.

Need mechanism for special days

Right now the schedule is set to the lunch A when the app launches. There is a mechanism for not showing the school schedule during vacation days. But any special schedule (a school day but not a normal schedule) is set manually in the code and the app updated to the site (also done to go from a special day back to normal time). The app needs a mechanism that will automatically set (and unset) special schedules.

Custom themes

User can select from themes with different colors and images for the clock?

Change "Add to Home Screen" icon

When adding CRLSTime to the home screen (at least on iPhones), the icon is not very good (it has a clock but it is cut off at the bottom. I know that there is some way to change this icon for both iPhones and Android phones, but I can't think of it off the top of my head (I'll reply to this post with it later). I was thinking that we use the Falcon mascot that we already have for our favicon (falcon_high_res2.png), but we could also design a new icon that shows a clock.

IMG_2001

Customize schedule

Allow the user to enter their own schedule and have the app display that instead of or in addition to the period. Also requires cookies.

Parent-teacher conferences on 3/12, 3/13, and 3/14

We need to update the code for the parent-teacher conferences on 3/12, 3/13, and 3/14. There already is a defined schedule for the late start (3/13), but not for the early release (3/12) or the evening conferences (3/14).

set dates of modified schedules (feature #2)

Once we have all of the new schedules, we need a mechanism for setting dates of modified schedules and checking if it is one of those dates. It will be something like IF getDate() in modifiedSchedules: schedule = specifiedSchedule ELSE schedule = standardSchedule. The main clock will read from schedule rather than whatever is hardcoded.

one schedule for all lunches (issue #4)

currently, we have 3 different schedules for every different lunch day. We should combind them into one for every schedule by using a dictionary of key-value pairs (eg {"A":[[lunch start], [p3 start]], "B":[[p3 start], [lunch start], [after lunch p3 start]], "C":[[p3 start], [lunch start]]})

Note: Depending on lunch, clock will need to read from an array of varying length, it should check if the time is after the final time, if not the time before that, if not the time before that, so on and so forth until all values have been checked. This check will not be necessary during any time that is not between immediately after p2 and immediately before p4.

Accuracy problem

CRLSTime is subject to the inaccuracies of the device’s clock it is running on. Classroom computers have been off by a lot in the past, and often lag behind "real" time. We don't have control over the device's clock, but we can assume the device has access to the internet. Can we check an external time server and make an adjustment so CRLSTime will display a time closer to the "real" time?

Favicon and Page Title

The two lines below can be added to the to make the page have a good looking tab. The title states what will be written and the link states what will be the icon to the left of that.

<title>CRLS Clock</title>
<link rel="shortcut icon" type="image/x-icon" href="falcon_high_res2.png" />

Face numbering is sometimes bad

image
This shows a face from the first day of 2nd semester (1/30). The face is counting down by 5s, which is the correct increment, but because the period is 38 minutes long the numbering is weird (also results in no 0 at the top). It should start at the largest multiple of 5 (or whatever the interval is) that is less than or equal to the period length.

black/silver days (issue #3)

right now, the barebones black/silver feature has a table with every single black/silver date (only 5 so far, but the plan appears to be to have them all). this is obviously inefficient and needs to be fixed. We will make a function that automatically changes the day at the start of each day, then we will make an array of dates where it should not change (say, for breaks/days off and modified schedules). they release the b/s calendar at the start of the year so we will be able to hard-code this every year. at the start of the day, something will run like IF getDate() NOT IN dontSwitch: switchBS()

Allow override of ServerDate

A lot of the time when I am testing some new code for CRLSTime, it is outside of the school day and I just get a normal clock (so I only know that the code to draw the clock is working). It would be helpful if there was a function in the JavaScript code (exposed only in the developer console, not in the user interface) so that a custom JavaScript Date object can be used instead of ServerDate. I tried to create a simple hack from the developer console to make this work, but I found that I could not do it without reworking the way that dates are handled. I was thinking of something like:

/**
 * This function substitutes a custom date and time for the current date and time
 * on the server.
 * 
 * @param {Date} date: A JavaScript Date object with the desired date and time
 */
function devOverrideDate(date) {
    ...
}

It would also be nice if the reference to the Date object (date) is used to increment the time every second, so that the clock functions in a realistic way.

crlscs.club is missing metadata

The Problem

I noticed that when I go to http://crlscs.club, there is no page title or favicon. This is a minor annoyance, but the problems are much worse for people trying to add the webpage to the home screens of their smartphones (at least for iPhones). On my iPhone SE, when I went to "Add to Home Screen" at http://crlscs.club, the title was not filled out for me (I had to input it manually) and I had to add it to my home screen twice for it to actually show up. Additionally, opening the "app" from my home screen only served as a shortcut to opening the webpage in Safari. However, when I went to https://crlscsclub.github.io/CRLSTime/, the correct page title and favicon show up, and my phone automatically filled out the title as "CRLSTime" and treated it like an app (it took up the full screen and appeared in the app switcher separate from Safari).

While investigating this issue, I read the source code of http://crlscs.club. Here it is:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
  <head>
    <title></title>
        <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
  </head>
  
  <frameset>
    <frame marginwidth=0 marginheight=0 frameborder=0 name="TOPFRAME" src="https://crlscsclub.github.io/CRLSTime/" noresize>
  </frameset>
</html>

This code simply embeds the contents of https://crlscsclub.github.io/CRLSTime/ in the page located at http://crlscs.club, which makes the page function almost exactly the same way as https://crlscsclub.github.io/CRLSTime/. However, the title, favicon, and other metadata of CRLSTime (which are located in the <head> tag inside the embed) are not shown at http://crlscs.club because all of these pieces of information are inside the embed, while browsers look for these pieces of information in the <head> tag of http://crlscs.club (which has an empty <title> tag, no favicon, and no metadata to tell mobile browsers to treat it as a web app).

I have a screen recording of this happening on my phone, but I have not yet uploaded it somewhere so that I can link to it (GitHub doesn't support uploading videos directly to a discussion).

Proposed solution

We do not have to embed https://crlscsclub.github.io/CRLSTime/ at http://crlscs.club. We can have GitHub Pages directly publish content to http://crlscs.club, with https://crlscsclub.github.io/CRLSTime/ redirecting to http://crlscs.club (so that any links pointing to it are not broken). Here are the steps to do this (I think only @dougmcg can do this):

  1. Add crlscs.club as a custom domain for GitHub Pages.
  2. Follow these instructions to set up an apex domain (crlscs.club) and set up a www domain (www.crlscs.club).
  3. Enable HTTPS for the domain. This won't affect the compatibility of the site on older browsers (compared to how it is now), because the site already has an embed from github.io (which enforces HTTPS), which means that the site already does not work on really old browsers that don't support modern encryption algorithms (I tested Firefox 4, 10, and 20, and none of them worked with any GitHub site).

You can read "Using a custom domain with GitHub Pages" for more information.

Daily Announcements and/or DYK Newsletter Display

This would need to be updated, but could be a valuable resource for those who missed the morning announcements. Also, the DYK newsletters are rarely read by students because they arrive via FirstClass, so a list of the headlines on the clock might allow students to actually get something out of them. This could be a static display, or something a little more creative and fancy. It shouldn't be too hard to read, though.
Maybe something like this:
scrollingnews
The only big issue that I see with this, is how it would be updated. We might have to create some sort of admin website that allows for changing the announcements.

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.