Skip to content

TestQuestion

#include "Tutorial/Tutorial.h"

Inherits from TutorialElement

Inherited by ChoiceTask, InputTask, MultiChoiceTask

Public Functions

Name
TestQuestion(std::string question)
virtual voidonSubmit() =0<br>Set m_isCorrect based on the answer.
voidsubmit()

Public Attributes

Name
boolm_isCorrect
boolm_isSubmitted

Additional inherited members

Public Functions inherited from TutorialElement

Name
TutorialElement()
TutorialElement(std::string content)
virtual~TutorialElement() =default
virtual voidacceptRenderer(ITutorialRenderer * tutorialRenderer) =0

Public Attributes inherited from TutorialElement

Name
std::stringm_content

Public Functions Documentation

function TestQuestion

cpp
inline explicit TestQuestion(
    std::string question
)
inline explicit TestQuestion(
    std::string question
)

function onSubmit

cpp
virtual void onSubmit() =0
virtual void onSubmit() =0

Set m_isCorrect based on the answer.

Reimplemented by: ChoiceTask::onSubmit, MultiChoiceTask::onSubmit, InputTask::onSubmit

function submit

cpp
inline void submit()
inline void submit()

Public Attributes Documentation

variable m_isCorrect

cpp
bool m_isCorrect = false;
bool m_isCorrect = false;

variable m_isSubmitted

cpp
bool m_isSubmitted = false;
bool m_isSubmitted = false;

Updated on 2025-01-07 at 13:40:43 +0000