@model ResponseQuestionnaireViewModel @{ ViewData["Title"] = "DisplayQuestionnaire"; Layout = "~/Views/Shared/_QuestionnaireResponse.cshtml"; }

@Model.Title

@Html.Raw(Model.Description)
Questions
@for (int i = 0; i < Model.Questions.Count; i++) {
@(i + 1) @Model.Questions[i].Type.ToString().Replace("_"," ")
}
@for (int i = 0; i < Model.Questions.Count; i++) { var question = Model.Questions[i]; @for (int j = 0; j < question.Answers.Count; j++) { }
@(i + 1) @question.Text
@switch (question.Type) { case QuestionType.Text: @if (question.Answers.Any()) { } break; case QuestionType.Open_ended: @if (question.Answers.Any()) { } break; case QuestionType.CheckBox: case QuestionType.Multiple_choice: case QuestionType.Demographic:
@foreach (var answer in question.Answers) {
@if (answer.IsOtherOption) {
} }
break; case QuestionType.TrueFalse:
@foreach (var answer in question.Answers) {
@if (answer.IsOtherOption) {
} }
break; case QuestionType.Rating:
@foreach (var answer in question.Answers) {
@answer.Text
}
break; case QuestionType.Likert:
@foreach (var answer in question.Answers) { @if (answer.IsOtherOption) {
} }
break; case QuestionType.Matrix:
@foreach (var opt in question.Answers) { } @foreach (var opt in question.Answers) { }
Statement@opt.Text
@question.Text
break; case QuestionType.Image:
@foreach (var answer in question.Answers) {
@if (answer.IsOtherOption) {
@answer.Text
} else { Option }
@if (answer.IsOtherOption) {
} }
break; case QuestionType.Ranking:

Drag to reorder or use the buttons

    @{ int ri = 1; } @foreach (var answer in question.Answers) {
  • @ri. @answer.Text
  • ri++; }
break; case QuestionType.Slider: @if (question.Answers.Any()) {
50
} break; default:
Unsupported question type.
break; }
@if (i > 0) { } @if (i < Model.Questions.Count - 1) { }
}
@section Scripts { }