MultiChoiceTask
#include "Tutorial/Tutorial.h"
Inherits from TestQuestion, TutorialElement
Public Functions
Name | |
---|---|
MultiChoiceTask(std::string question, std::vector< std::string > choices, std::vector< int > correctChoices) | |
virtual void | acceptRenderer(ITutorialRenderer * tutorialRenderer) override |
virtual void | onSubmit() override<br>Set m_isCorrect based on the answer. |
Public Attributes
Name | |
---|---|
std::vector< std::string > | m_choices |
std::vector< int > | m_correctChoices |
std::vector< bool > | m_selected |
Additional inherited members
Public Functions inherited from TestQuestion
Name | |
---|---|
TestQuestion(std::string question) | |
void | submit() |
Public Attributes inherited from TestQuestion
Name | |
---|---|
bool | m_isCorrect |
bool | m_isSubmitted |
Public Functions inherited from TutorialElement
Name | |
---|---|
TutorialElement() | |
TutorialElement(std::string content) | |
virtual | ~TutorialElement() =default |
Public Attributes inherited from TutorialElement
Name | |
---|---|
std::string | m_content |
Public Functions Documentation
function MultiChoiceTask
cpp
inline MultiChoiceTask(
std::string question,
std::vector< std::string > choices,
std::vector< int > correctChoices
)
inline MultiChoiceTask(
std::string question,
std::vector< std::string > choices,
std::vector< int > correctChoices
)
function acceptRenderer
cpp
inline virtual void acceptRenderer(
ITutorialRenderer * tutorialRenderer
) override
inline virtual void acceptRenderer(
ITutorialRenderer * tutorialRenderer
) override
Reimplements: TutorialElement::acceptRenderer
function onSubmit
cpp
inline virtual void onSubmit() override
inline virtual void onSubmit() override
Set m_isCorrect based on the answer.
Reimplements: TestQuestion::onSubmit
Public Attributes Documentation
variable m_choices
cpp
std::vector< std::string > m_choices;
std::vector< std::string > m_choices;
variable m_correctChoices
cpp
std::vector< int > m_correctChoices;
std::vector< int > m_correctChoices;
variable m_selected
cpp
std::vector< bool > m_selected;
std::vector< bool > m_selected;
Updated on 2025-01-07 at 13:40:43 +0000