-
Notifications
You must be signed in to change notification settings - Fork 197
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
Handle editor preview state for Lesson Actions block #3821
Comments
Editor Design
Some changes:
|
As per a design review, the following changes should be made to the current design:
|
➤ donnapep commented: This card is responsible for handling the view state and highlighting the buttons in the selected state. |
@donnapep, could you explain the following item?
|
This was just an issue with the design images, should be all good with using the button blocks. |
Describe the solution you'd like
Create a block that handles the Complete Lesson, Reset Lesson and Next Lesson functionality. Each button block should support configuration of the following settings:
The parent block should support the following
VisibilityAvailable Actions settings:true
)- Next Lesson button (toggle, defaulttrue
)The Complete Lesson button is always displayed.The Complete Lesson button is always displayed for an enrolled user who has met the necessary conditions.
The Next Lesson button is always displayed, regardless of whether or not the user is enrolled.
Functionality
and Next Lessonbutton should be displayed, and the Complete Lesson button should be hidden.and Next Lessonbutton should be hidden.Visibility
The logic for determining the visibility of the buttons on the frontend should be the same as it is for the legacy buttons. If more than one button is displayed (e.g. Reset Lesson, Next Lesson), they should be beside each other.
Although the visibility of the existing Reset Lesson button is tied to the Allow user to retake the quiz setting, this seems like a nonsensical association that we should not carry over to this block.
Notices
Notices displayed as part of the button functionality (for example, Congratulations! You have passed this lesson. displaying after clicking on Complete Lesson) should not be part of the block and will be handled separately. This is so that notices aren't displayed at potentially odd locations on the page.
Context
The block replaces these buttons:



Editor Considerations
As per a design discussion, the block toolbar should enable switching between the different views. If either the Reset Lesson button or Next Lesson button settings are disabled, the toolbar updates appropriately. If both are disabled, then the toolbar switcher should be hidden.
Text
Lesson Actions Block Description
Enable an enrolled user to perform specific actions for a lesson.
Complete Lesson Block Description
Enable an enrolled user to mark the lesson as complete.
Next Lesson Block Description
Enable a user to move to the next lesson.
Reset Lesson Block Description
Enable an enrolled user to reset their progress in the lesson.
The text was updated successfully, but these errors were encountered: