-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature/quiz functionality #564
Feature/quiz functionality #564
Conversation
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 a really good start. I have submitted some fixed to the PR so you will need to git pull -r
before making more changes.
There seems to be commits in this PR that are already in main.
Things that are broken:
- question that is a picture is too big on desktop.
- when answering with picture, it should highlight the picture (in green and red) after selecting an answer (similar to changing the color of the answer bubbles).
I have implemented:
Audio still needs to be implemented, but can be done in a separate PR. |
Modified the layout and page svelte files for the quizzes so they work together fix the quiz JSON file so the answers were correct for one question, and the answers didn't show pictured, which were improper. Made a layout.js file "+layout.js" Started a layout svelte page for layout of quiz GUI. May not be needed. recommitted the original changes for a new branch Quizzes can now be viewed from dropdown menu in English. Added a page.js file for quizzes, created a new id and collections folder in the routes/quizzes folder and moved everything into that. You can now navigate to the quizzes page by clicking on it in the dropdown. Rerouted navigation to the quiz page to include a docset folder. Moved everything in the quiz collections folder into a docset folder Moved this into the quizzes docset folder A bunch of files got removed, so I had to rebuild PWA data files the +page.js file for the quiz page now fetches quiz.json Shifted some of the files around under the route/quiz folder. Also changed the path in BookSelector to better match the path in the quiz folder Changed the path to the quiz files again. in BookSelector, line 58: changed path from 'collection' to 'id' fixed navigation to quiz Removed unnecessary import
Deleted unnecessary layout files format for lint Added more elements to page.svelte changes load data to be export instead of import Fixed the path for navigating the static quiz folder in BookSelector Corrected a mistake with changing the route for navigating to quizzes Was able to get a quiz question with answers to pop onto the screen! Removed languages from imports for quiz page. Not needed. Formatted the quiz buttons in tailwind css and made them buttons. got ready of unneeded comments got rid of unneeded comments Corrected the pathing for quizzes so that it now fetches a quiz from its source. Export quiz types Got quizzes to cycle through questions and images to appear when they exist. Had to add a variable so images can be displayed on the quizzes page for answers too. Removed duplicate sound files in static removed the appdef.xml file duplicate in static format for lint Playing around with the grid functionality for quiz answer buttons
trying to center answer buttons and also preparing to implement audio files Quiz questions programmed to play questions based on correctness of answer. Centered the answer block correctly for quizzes Deleted old quiz JSON file and got quiz page to detect correct from incorrect answers. created 2 separate quiz answer blocks for text and images, then separated them in if statements Removed some redundancies in the quiz page code Everytime you get a quiz question right, a point is added to your score I randomized the order in which quiz answers are displayed. Removed some excess comments Quiz buttons now get highlighted green when answered correctly When a wrong quiz answer is selected, it's highlighted in red. Clicking a quiz answer now colors the answer box red or green rather than what's behind it. Set a timer after a quiz answer is guessed to give the user some time to observe the result of their answer. After a quiz, you now get a score. After a quiz, you now get a message if you getting a passing score. Got rid of unused imports from the quiz Svelte page removed unneeded console logs from the quiz svelte page Divided elements of the score for quizzes in their own div's put the elements of quiz score in flex grids with margins I changed the quiz page code so the navbar is outside the if statement and doesn't get created when switching between score and the quiz itself Finished the quiz score page styling The clicked quiz answer text is now white, and images now display images Started implementing next arrow per quiz question. Paired quiz answers when in image format Put a quiz label on the navbar Corrected the color change for quiz answers that are images to the correct ones Added a display: block to the class of quiz answer images Updated the quiz fork so shuffling answers works and correct answer is highlighted when incorrect quiz answers are selected The next button for quizzes is now centered properly For quizzes, fixed width and padding of image answers a bit. Got the image highlighting working. Completely fixed highlighting for quiz image questions. Fixed an issue for quiz questions where question images wasn't being centered. Removed pairing from quiz page so columns is now handled by the quiz itself gave question-images a class name of quiz-question-image For the quizzes, I made the next button an identifier Quiz image answers are now columned Quiz answers now have flexible sizes for lg, md, and small screens For quizzes, score messages "You Pass" and "Oh Dear" are now centered properly. Removed some unneeded comments.
Use fetch from load method Handle special book type navigation * pass book.type in cell and through menuaction * handle special book types before normal book navigation Fix quiz interaction issues * only accept answer once * style Forward Arrow button Quiz: Set image height The native app hardcodes the image height to 160px Quiz: translate score text Quiz: Set colors for image answers Quiz: Use bodyFontSize and bodyLineHeight Quiz: Get Commentary from Quiz file Quiz: Implement NavBar Quiz: Style image answer and next button Quiz: Style question line-height separate
af76abc
to
fcb6a73
Compare
* Have one place that converts book.type to url * Pass url around * Add url to history when navigating * Use url in history
quiz answer and question audio to be played from.
and unhighlighted functions
seem to be working yet.
from getting bigger than the other set
-1 at the beginning of the onQuestionAnswered function
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 requirement has not been implemented:
ac is the column count for the number of columns to use to display the answer choices. By default, it is set to 2 if the question has an image and more than two answers or if any of the answers to the has an image. Otherwise the default is 1.
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.
Almost there. Please make these changes.
- Remove extra commit for next issue (it needs its own branch/PR).
- Re-add h-40 to quiz-question-image.
1e8784a
to
3acf024
Compare
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.
Looks good to go now. Thanks for all the hard work and persisting!
Fixes #500