Limpan / parsons-puzzle

MIT License
1 stars 0 forks source link

Design database #1

Open Limpan opened 7 years ago

Limpan commented 7 years ago

There needs to be a proper database to manage

Greenheart commented 7 years ago

A Problem could consist of:

Limpan commented 7 years ago

I'd suggest that we make the puzzle code JSON encoded for performance reasons. It can then be decoded either by the web server or in the users browser. I also think we need a name and an instruction for the user. Difficulty should be flexible so that it can be changed in the future. Maybe 1-100? 1-5 can then be mapped to 20, 40, 60, 80 and 100. We need a bit of flexibility for #7.

Greenheart commented 7 years ago

JSON encoding would work.

instruction for the user

Absolutely!

1-100 sounds like a good idea. It can be displayed in many different ways. Will make difficulties flexible if they need to change in the future.

Greenheart commented 7 years ago

The User depends on #13

Greenheart commented 7 years ago

Draft for initial DB model

User

id

username

email

password_hash

role_id

completed_puzzles

total_points


Reward

id

puzzle_id

amount

completion_date


Puzzle / Challenge / Problem

Whatever this should be called.

id

description

hints

difficulty


Hint

id

puzzle_id

line_number

messsage


User Role

permission

display_name


Example roles for the User Role table:

Each role's available actions builds on top of each other. Admins can do everything.

User
Moderator
Administrator
Limpan commented 7 years ago

Quick thoughts. It's no biggie to build a proper role system like Flasky and Chronos. It'll be flexible. I think this one will be worth it.

I'll read up on the OAuth solution that the LTI standard and It's learning uses. Maybe we're good using email as identifier but I'd like to make sure.

Limpan commented 7 years ago

Progress has been made. https://github.com/Limpan/parsons-puzzle/tree/feature/database

Greenheart commented 7 years ago

I didn't get any notification for the last message, I'll check test this locally! :+1:

Greenheart commented 7 years ago

@Limpan What needs to be done on this branch?