Questionnaire utility
Domain/MyClic/Utilities/QuestionnaireUtility.php maps factors to questionnaires and answers storefront questions about which questionnaire a user may open.
getQuestionnaireSlugOfFactor
Some controllers need to verify that a questionnaire is enabled for the current employee's store, but the route has a factor or sub-questionnaire instead of a questionnaire slug.
getQuestionnaireSlugOfFactor() walks config/questionnaires.php and returns the slug whose factors list contains that factor. If none match, it throws QuestionnaireException::mappingFactorFailed($factor).
Factor callers (RenderSubQuestionnaire, SubmitSubQuestionnaire, ShowScore) then use VerifyQuestionnaireEnabledOnCurrentPlatform and VerifyQuestionnaireIsUnlockedForCurrentUser. VerifyQuestionnaireIsEnabledInCurrentStore is only used when the route already has a questionnaire slug (IndexQuestionnaireScores, GetQuestionaireReport).