Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* quiz squash #3 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 * quiz squash #2 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 * quiz squash #1 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. * Fix formatting 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 * remove accidentally added static files * Removed unneeded lines * Got the audio button added to the navbar for quizzes * The audio icon is now properly placed in the navbar for quizzes * Added a quizAudioActive store to the audio.js file * Quiz: switch from book.type to url in events * Have one place that converts book.type to url * Pass url around * Add url to history when navigating * Use url in history * Fix formatting * I think I've been able to implement most of what's needed for quiz answer and question audio to be played from. * For the playQuizAnswerAudio function, I put back both the highlighted and unhighlighted functions * I think I almost got the audio file pathing sorted out, but it doesn't seem to be working yet. * Quick change in quizzes page from answer.hasAudio to answer.audio * Set the quiz answer images to a maximum size and width to keep one set from getting bigger than the other set * Removed unnecessary comments * got rid of the currentAnswerIndex stuff in onNextQuestion function for the quiz page * Streamlined quiz answer and question audio to play from the playSound function * Add listener back into the quiz page * audio.js quizAudioActive is now set to true by default * audio for quiz questions and answers fully works * Quiz answers are now highlighted when audio is played * For quizzes, the audio now cuts off when an answer is selected. * Removed or commented out some console logs. Set textHighlightIndex to -1 at the beginning of the onQuestionAnswered function * text highlighting bugs for the quizzes has been fixed. * Removed console.logs from quiz svelte page * Quiz questions now shuffle * Reviewed the code and got rid of some unused variables and console logs * Corrected an issue where the first quiz question wasn't getting shuffled by calling the shuffle function inside onMount * removed an unused quizzes variable from the bookSelector * I implemented onDestory for the quiz page so the audio stops playing when the HTML page is unrendered or destroyed * Restore delay in display correct answer when wrong * For quizzes, I added the ability for an explanation to an answer to be displayed. Needs work. * Took out old shuffle toggle stuff from quiz page. The explanation is good to go * I believe I got explanation audio to work for quizzes. Need to test it * Removed unneeded comments * Removed more unneeded comments * Quiz page now checks if explanations are on the question or answer level then delivers an explanation accordingly, if it exists (audio included) * Convert Quiz to put explanation at correct level * If the explanation is before the answers, then it is at the question-level. * If the explanation is after all of the answers, it is at the question-level. * Otherwise, it is at the question level * Explanation audio now stops once the next button is clicked * Quiz right and wrong answer audio now tied to the json file * Quiz right and wrong answer audio can now select one randomy based on multiple if multiple exist in the json quiz file * Modified it so explanations aren't given on correct answers. * Corrected the pathing of quiz right and wrong answer audio files * ConvertBooks now has default right and wrong quiz audio files if other audio files, right or wrong, don't exist * Got rid of an unneeded comment in the quiz svelte page * Display quiz book in list of books converted * Fix answer audio sound location * default sounds are in /assets/ * custom sounds are in /clips/ * For quizzes, put back the answer audio and highlights * For quizzes, got the right and wrong answer audio working again * Audio is no longer stopping like it's supposed to. Need to fix * Corrected an issue where the audio wasn't stopping when onDestroy function is called * changed quiz right/wrong audio pathing to clips instead of assets * Made some more corrections to quiz right/wrong audio pathing * for quizzes, right/wrong audio plays, and then explanation audio * Fix runtime a11y and unused style warnings * Change columns (\ac) to be per-question * Quiz answers are now divided into columns based on what's in the JSON file * Fixed the quiz column changes so everything is now there. * Got rid of an extra bracket in a div class * The default number of columns is now 2 for quiz answers * quiz answers can now be divided into 3 columns * Removed tables from quiz page and converted to tailwind grid * Quiz answer sizes now accommodate for columns * Made some changes to quiz answer div classes * Made some changes to the sizing of quiz answers * Styled the quiz answers again * fixed a columns typo in the quiz page * I think I've finished touching up the quiz answer styling * Ignore ally warning * Tightening up quiz classes * Finished tightening up quiz classes * Made one last change to quiz class tightening * Added the h-40 back into quiz question images --------- Co-authored-by: Chris Hubbard <[email protected]>
- Loading branch information