-
Notifications
You must be signed in to change notification settings - Fork 297
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
Quiz exercises
: Fix an issue with the multiple choice visual mode
#9284
Conversation
|
src/test/playwright/support/pageobjects/exercises/quiz/QuizExerciseCreationPage.ts
Show resolved
Hide resolved
WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MultipleChoiceQuestionEditComponent
participant MarkdownEditor
participant VisualChild
User->>MultipleChoiceQuestionEditComponent: Save Question
MultipleChoiceQuestionEditComponent->>MultipleChoiceQuestionEditComponent: Check Editing Mode
alt Visual Mode
MultipleChoiceQuestionEditComponent->>VisualChild: Parse Question
VisualChild-->>MultipleChoiceQuestionEditComponent: Return Parsed Content
MultipleChoiceQuestionEditComponent->>MarkdownEditor: Update Markdown Content
else Markdown Mode
MultipleChoiceQuestionEditComponent->>MarkdownEditor: Parse Markdown
end
MultipleChoiceQuestionEditComponent-->>User: Confirm Save
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 2
.../quiz/shared/questions/multiple-choice-question/multiple-choice-visual-question.component.ts
Show resolved
Hide resolved
src/test/playwright/e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
Show resolved
Hide resolved
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.
Code
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.
Tested on TS4, works as expected
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.
Code 👍
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.
tested on ts3, works as expected
Checklist
General
Client
Motivation and Context
Closes #9281.
When using the multiple choice visual mode, it was possible for the changes to be discarded when saving the quiz. This happened because the component retrieved the text from the wrong source (the outdated markdown editor, rather than the visual component)
Description
When preparing to save while the editor is in visual mode, retrieves the text from the visual editor and stores it in the markdown editor. This triggers an update of the question and stores all changes.
Also, added a small e2e Test that checks if the Visual editor works as intended.
Steps for testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Manual Tests
Summary by CodeRabbit
New Features
Bug Fixes
Tests