Code Monkey home page Code Monkey logo

labtool's People

Contributors

chamion avatar cxcorp avatar dependabot[bot] avatar ecliptik avatar epicharri avatar gotonode avatar heikkihei avatar hisahi avatar inla avatar jakousa avatar jiial avatar katri96 avatar keskimaki avatar laatopi avatar leovaris avatar maarila avatar mamelukki avatar mjaakko avatar mluukkai avatar northernlion avatar nullkaaryle avatar ollikehy avatar ootee avatar pumm1 avatar qzuw avatar ruupert avatar tjunno avatar valhekouneli avatar xneme avatar yumol avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

cxcorp qzuw leovaris

labtool's Issues

update email bug

When user logs in and presses the "edit email"-button, email shown is first correct. After updating the email and pressing the button again, email shown is the one that was correct at the time of login.

(e.g. email is [email protected] when loggin in, then you update it to [email protected] and you still see the [email protected] at the edit email form)

Feature request: Use REACT_APP_BACKEND_URL for all requests

Problem:

Current development environment works only if the front end is run on localhost along with the backend. In the current production test server there's another path for the backend.

In a local development environment scenario where the back and front end is not run on localhost from the browsers point of view, one has to go in and change the request urls in the labtool2.0/src/Login.js to something which is the actual host where the back end is. In the current docker-compose.yml file there is already an environment variable called REACT_APP_BACKEND_URL specified and documentated here: https://github.com/labtool/labtool/wiki/Deployment

Solution proposal:

Change the behaviour of these

    if (process.env.NODE_ENV === 'development') {
      backend = 'http://localhost:3001/api/users/update'
    } else {
      backend = '/labtool-backend/users/update'
    }

to

backend = process.env.REACT_APP_BACKEND_URL + '/api/users/update'

or something similar (some check somewhere to see if the REACT_APP_BACKEND_URL is set, and if not then set it to default like http://localhost:3001) so that anyone can just specify where the backend is without having to change the front end code in any way.

api/login

We want path for login to be /api/login instead of just /login

Because everyother path uses api

PUT to /courseinstances/${id}

Example data sent:

`courseActive:"true"
currentWeek:"1"
ohid:"TKT20010.2018.K.K.1" (This can also be taken from url)
weekAmount:"1"
weeklyMaxpoints:"1"`

We want backend to check if the user has rights to modify the course instance specified and updated it with the fields given.

Simple backend admin-page with basic authentication

  • Should provide a route for the page that contains forms for buttons that enable each not yet enabled course.
  • POST route that handles the page post form and redirects back to the form page
  • Needs just Basic html auth alike functionality where the password is taken from the application runtime env variable.

fronend does not respect the react PUBLIC_URL env variable

Issue description:

Production server doesn't reside at the root of the host. The host also might be something different than in development. For that reason using PUBLIC_URL env variable this host and possible path can be specified the docker-compose.yml configuration or in development by telling the react thing its URL (if that was even nescessary in NODE_ENV=development. This feature was working before but something has changed.

This might help to resolve this issue:

https://medium.com/@svinkle/how-to-deploy-a-react-app-to-a-subdirectory-f694d46427c1

Redirect Loop when doing first time login, after entering email

Steps to reproduce:

  1. Login with account information that has no DB entry
  2. Enter email address to email editing page that you are redirected to and press save
  3. You are now in Redirect loop between email changing page redirecting to my courses page and email changing page redirecting my courses page, enjoy!

Token verification unification

Currently there are atleast three different ways how the token is being verified spread out through the backend. All should be using the same type of verification from which the latest incarnation is: #96

#123

Check if user is {registered, student, teacher} on a specific Course Instance

Kysely jossa lähetetään Userin tokeni, opetushallitus kurssi Id, ja palauttaa tiedon onko käyttäjä rekisteröitymätön, opiskelija, vai opettaja kyseisellä kurssilla.

Esim. POST jnqwiou90wqh TKT20011.2018.K.K.2

vastaus voisi olla
{unregistered}, {teacher}, {student} tms mitä vaan millä saa selvää.

Getting all studentinstances with courseinstance id

Mahdollisuus hakea bäkkäriltä kaikki tietyn courseinstancen studentinstancet kyseisen courseinstancen idllä.

Eli jos Tiralabra courseinstancella on 3 studentinstancea, saadaan nämä 3 SI haettua bäkkäristä tiralabran CI id:llä.

Checklist, possible to use existing checklist

This story includes adding the following features:

  • Each course instance's each week has its own checklist. It is empty by default.

Teacher can

Use a checklist

When the teacher is reviewing a student, they see a checklist on the right side of the comment and points fields. The checklist displays the categories of the tasks, and each task under the category it belongs to.

There is a text field on the right side of the checklist. The contents of the text field changes according to what boxes are checked (just like in the current Labtool).

Under the checklist, a point total is displayed. The point total changes according to what boxes are checked, i.e. what tasks are fulfilled.

After choosing the checklist and marking the check-boxes to their will, the teacher can copy the text from the text field and paste it to the feedback field and edit it. The points total is automatically copied to the points field, but it can be edited too before submitting.

Backend function apidoc commenting

Atleast two part process:

  1. Iteration: Just say /** before every function in IntelliJ Webstorm and the thing just autocompletes a skeleton based on function params

  2. Actually comment the functions

#123

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.