GetModuleIdForQuestion() public method

Gets the ID of the module that the given question belongs to.
public GetModuleIdForQuestion ( int questionId ) : int
questionId int The question's ID.
return int
        public void DeleteQuestion(int questionId)
        {
            var surveyRepository = new SurveyRepository();
            var moduleId = surveyRepository.GetModuleIdForQuestion(questionId);
            if (!this.CanEditModule(moduleId))
            {
                this.DenyAccess();
            }

            surveyRepository.DeleteQuestion(questionId);
        }