hodak / gra-pwr.net Goto Github PK
View Code? Open in Web Editor NEWPrepare for multiple-choice exams
Home Page: https://gra-pwr.net
Prepare for multiple-choice exams
Home Page: https://gra-pwr.net
When entering exam solver or exam editor there are multiple queries to database for answers.
These answers should be fetched with one SQL query.
Generally whole app should be responsive, but the solver is the most important thing here and it should fit for mobile devices
In my opinion, questions with one answer(maybe we cannot remember other) should be enabled. Many courses have questions where people remember only correct answer, it's usefull too, but it's restricted in app
This function in controller: https://github.com/hodak/infish/blob/master/app/assets/javascripts/controllers/ExamCtrl.coffee#L62 is responsible for assigning proper classes to answer. This should be a directive.
Each user's answer is saved in database, which will cause db to bloat. I don't think there's a reason to store user answers for long period of time and the easiest solution would be just to run some cron-based scheduler every day and clean old user answers.
Proposed tools:
whenever
gemsidekiq
gemBest "workaround" (altough it's not really a workaround, it should be initial solution) is to create Facebook's developer's app yourself and use your credentials.
But it's not really an easy way to initially set up the application. Maybe there should be some mocking for development, that would allow to log in without directly hitting Facebook? Thoughts anybody?
The name "infish" - :)
Something nice to put in upper-left corner
Thoughts anyone?
Students might want to print the exam with all the questions and answers (marked as correct & incorrect) and study with this.
I know one nice library for Ruby that allows export to PDF: prawnpdf.org
Heroku should be treated more like a staging right now. It has limit of 10k Postgres rows, which won't take us far.
Look into serving assets, I don't think it's configured in any way for production use right now.
Server setup and deployment should be done with Ansible ๐
Currently each person that receives a link to an exam, has an access to edit it - I think it's nice because whole group of people can collaborate on an exam.
But, unfortunately, there's a risk of trolls removing questions, answers, changing answers to be invalid etc.
It's hard issue to resolve, do you have any thoughts on how it could be done?
One idea I have is versioning - each exam change would be saved as a "revision" and signed by user name. It should be possible to compare revisions and rolling back changes. What do you think?
Also, additionally, maybe users should have the ability to "ban" troll from editing the exam - for example vote from 3 different users would ban editing for another user.
What if voters were trolls and they banned everybody?
Hard things ;)
Maybe the user out-voted by 3 different people would lose access to exam, but would get this exam copied into his account?
This code was written very quickly with little tests, it should be reviewed. @wojtekmaciej would you be up for the task? :)
Edit/Add new exam -> Import -> You can see and choose all files from your computer. Only .txt files should be visible.
Space is a keyboard shortcut that can be used to check answer correctness and go to next question. When page is long and screen low it also scrolls down the page. It's undesirable; most likely there should be event.preventDefault()
called.
When you copy link from exam list: http://gra-pwr.net/exams#/
The link looks like this: http://gra-pwr.net/fc7a2f8a-06d7-4ffd-80f8-ddfd69af8531
Instead of: http://gra-pwr.net/exams#/fc7a2f8a-06d7-4ffd-80f8-ddfd69af8531
Same for edit link.
Probably RSpec + Capybara are the best tools for this.
Resource: https://robots.thoughtbot.com/rspec-integration-tests-with-capybara
Also, how to contribute
Is it even necessary? We store some (maybe sensitive?) data, should we have ToS?
I don't have much experience with this, anyone?
I think it's good idea to create note or comments to every questions. Users can explain their way to resolve
When editing an exam there is a console log printed to browser console. Please remove it.
Free for OSS: https://codeship.com/pricing
We've configured HTTPS on gra-pwr.net and currently we can see such error in browser console
Exam solver works offline: when you load exam and lose internet connection, you can still solve the exam and once you regain internet connection, your answers will be synced.
Problem is that answers are saved in memory, so after closing browser before answers are synced, they will be gone.
It would be best if answers were stored in local storage and after proper sync local storage would be emptied (sync
function)
Also, in this case, it would be important to "merge" user answers from local storage and database when entering the exam solver page (the init
function)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.