-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vignettes #737
base: feature/vignettes-longterm
Are you sure you want to change the base?
Vignettes #737
Conversation
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
…amic form Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
answer model for single answer to slide of questionnaire, user_answer model to store all answers made by a user on a specific questionnaire.
Signed-off-by: Florian <[email protected]>
-Track how often each info slide was accessed -minor bug fixes
-display error message if form submitting is unsuccessful
-validate content type -fix weird bug with migration date -change config to format error messages differently
Signed-off-by: Florian <[email protected]>
-remove git accidents
Signed-off-by: Florian <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Could you please provide an ERD diagram in order to better understand what is going on? See the wiki.
- Please make sure that linting works correctly, otherwise reviewing is a nightmare as I don't want to write comments like: "Remove the whitespaces here after the semicolon". You can use the VSCode "Problems" tab to see all occurrences where ESLint or Rubocop are complaining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's normal to add columns, rename them, later realize that a column would better fit in another table etc. during the development process. But at the end, we should just have as little migrations as possible. E.g. when you remove a column later on, we don't need a migration to add, then remove it, when we merge this PR. Please identify such things and manually condense them, such that most migrations will just create new tables/columns/indices or modify already existing columns, but not those that are only temporarily created on this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also useful in the case we need to revert migrations, since smaller migrations make very clear what was added (instead of added, removed, added again ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully agree, commit a9726f1 should remove all unnecessary migrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of ERB syntax going on in this file. This would probably be a good fit to outsource some of the logic to helper classes where Ruby is first-class citizen. With this, we reduce the "business code logic" from the html file.
This comment is also applicable to other of your .html.erb
files.
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Signed-off-by: Florian <[email protected]>
Vignettes
This pull request is the first of multiple requests to merge vignettes into mampf. While most major features have been implemented, they still lack quality of life and a usable let alone pretty user interface.
Usage
Note
All created questionnaires are found under .../vignettes/questionnaires/
The edit view of a questionnaire lists all slides (by position) and info slides (by title). One can edit a certain slide by clicking on the link, as well as create slides.
A normal slide is part of the linear progression of the questionnaire and can optionally include a question. Question types include text answers, multiple choice answers and a Likert scale. A slide can reference multiple info slides. To select multiple info slides hold ctrl.
An info slide can be referenced by a slide and contains additional information about the slide. This information can be accessed by a user filling out the questionnaire. Each info slide has an icon used as an image for the button that displays the info slide. If this icon is not set, then the title is used.
Note
To fill out a questionnaire navigate to /vignettes/questionnaire/:id/take
Tip
Each user can only fill out a questionnaire once. However this is annoying for testing purposes. Therefore one can currently delete his answer by navigating to /vignettes/questionnaire/:id/take?position=-1 (this is of course only for testing and will be removed)
Additional Features
Statistics
One major feature of questionnaires is the tracking of additional statistics. For each answer the following stats are tracked:
To access these statistics, one can download them in the edit view of a questionnaire as a .csv file.
Unfinished answers
If a user starts filling out a questionnaire but does not finish, their progress is saved. When they return to the questionnaire, they will resume from their last position. This is also used to check that a user can't "cheat" by just setting the position value in the url (e.g /take?position=4)
Known bugs
For reviewers
This feature is limited to very few people for the beginning. Especially the creation of vignettes will be limited to 2 or 3 people. Also the code is for the most part completely disconnected from the codebase. Therefore we may afford some imperfection in the beginning of the release.
Goal for release is the start of the new semester in April 2025.
To-Do's
Essentials
Nice to have